microsoft / microsoft/foundry-dev-tools
qwen3.5-* models fail to load: genai_config.json contains `patch_size` field unsupported by bundled onnxruntime-genai (v1.4.3)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 260
- Avg merge
- 42m
- Merged PRs (30d)
- 29
Description
Description
Attempting to load any qwen3.5-* model (e.g. qwen3.5-2b-cuda-gpu:2) fails immediately with a JSON parse error at model load time.
Expected Behavior
The model loads and responds to prompts successfully.
Actual Behavior
The model fails to load with:
Failed loading model qwen3.5-2b-cuda-gpu:2. Error encountered while parsing
'C:\Users\<user>\.aitk\models\Microsoft\qwen3.5-2b-cuda-gpu-2\v2\genai_config.json'
JSON Error: model:vision: Unknown value "patch_size" at line 68 index 23
Steps to Reproduce
- Install Foundry Toolkit v1.4.3
- Download any
qwen3.5-*model from the model catalog - Load the model in GitHub Copilot
Root Cause
The genai_config.json for qwen3.5 models contains a "patch_size": 16 field in the model.vision section:
"vision": {
"filename": "vision.onnx",
"config_filename": "processor_config.json",
"spatial_merge_size": 2,
"tokens_per_second": 2.0,
"patch_size": 16,
...
}
The onnxruntime-genai version bundled with extension v1.4.3 does not recognize patch_size as a valid vision config field. The qwen3.5 model catalog entries were published targeting a newer runtime version than what ships with the current extension, causing a version mismatch.
Workaround
Remove the patch_size field from the downloaded model config:
$config = "$env:USERPROFILE\.aitk\models\Microsoft\qwen3.5-2b-cuda-gpu-2\v2\genai_config.json"
$json = Get-Content $config -Raw | ConvertFrom-Json
$json.model.vision.PSObject.Properties.Remove("patch_size")
$json | ConvertTo-Json -Depth 20 | Set-Content $config
Note: the path will differ depending on which qwen3.5 variant was downloaded.
Expected Fix
Either:
- Update the bundled
onnxruntime-genaiin v1.4.x to support thepatch_sizefield, or - Gate
qwen3.5model catalog entries so they are only shown for extension versions that support them
Specifications
- Extension version: 1.4.3
- VS Code version: 1.123.0
- Platform: Windows x64
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the bundled onnxruntime-genai version and the model catalog entries that publish qwen3.5 configurations, then compare them with genai_config.json and its model.vision.patch_size field. Determine whether runtime support or catalog gating is the applicable fix, and verify that qwen3.5 models load successfully on extension v1.4.3 without manual configuration edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- ai, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100