Skip to content

fix(pixel-edge): reject unstripped whitespace in access mode target model - #5738

Open
Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-edge-model-contract-whitespace
Open

Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-edge-model-contract-whitespace

Conversation

@Vishaaallll

Copy link
Copy Markdown

Why this matters

In ods/extensions/services/pixel-edge/access_mode.py, valid_model_contract(value) permits spaces in the model name pattern [A-Za-z0-9._+:/ @(),=-]{0,255}. Consequently, names with trailing spaces like "qwen2.5:7b " pass validation, leading to mismatch against canonical route keys in provider coordination.

This surgical fix verifies value['model'] == value['model'].strip(), guaranteeing model names in contracts are whitespace-clean.

Validation

  • Baseline reproduction: verified that "qwen2.5:7b " evaluated to True on baseline.
  • Post-fix behavior: returns False when model names carry leading or trailing whitespace.
  • Telemetry: pixel-edge suite: 2 passed. New-test syntax and diff checks pass; new regression wired into Linux CI.

Overlap check

Inspected open/closed PRs. PR #5731 handled model target name stripping in portal models; zero overlap with access mode contracts.

Risk / AI disclosure

AI-assisted investigation, patch, and regression tests. Restricts model contract name formatting. Independent review remains a gate.

Follow-up integration evidence

Composed locally with public-beta at 4fa6ad170 without conflicts. CI and unit checks pass.

…odel

Signed-off-by: Vishaaallll <Vishaaallll@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant