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-genai in v1.4.x to support the patch_size field, or
- Gate
qwen3.5 model 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
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:
Steps to Reproduce
qwen3.5-*model from the model catalogRoot Cause
The
genai_config.jsonforqwen3.5models contains a"patch_size": 16field in themodel.visionsection:The
onnxruntime-genaiversion bundled with extension v1.4.3 does not recognizepatch_sizeas a valid vision config field. Theqwen3.5model catalog entries were published targeting a newer runtime version than what ships with the current extension, causing a version mismatch.Workaround
Remove the
patch_sizefield from the downloaded model config:Note: the path will differ depending on which
qwen3.5variant was downloaded.Expected Fix
Either:
onnxruntime-genaiin v1.4.x to support thepatch_sizefield, orqwen3.5model catalog entries so they are only shown for extension versions that support themSpecifications