microsoft / microsoft/foundry-local

Unable to use Foundry Local model through NPU with Github Copilot

Open
#828 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.6k
Forks
369
Avg merge
2d 17h
Merged PRs (30d)
39

Description

I'm trying to use a local model through an NPU (On a Snapdragon X Elite device) + Github Copilot, but I get the following logs while doing so.
Microsoft Foundry Local VS Code Extension Version: 1.4.3
VS Code version: 1.125.1
The logs (from VS Code) are attached below.
If you need any more info and you're also able to provide steps so I can obtain them, I'm available to help.
```2026-06-22T01:11:43.8396548+03:00 Loading model:qwen2.5-coder-7b-instruct-qnn-npu:1
2026-06-22 01:12:01.413 [info] Information: Microsoft.Neutron.OpenAI.Provider.OpenAIServiceProviderOnnx [1401] 2026-06-22T01:12:01.4117388+03:00 Finish loading model:qwen2.5-coder-7b-instruct-qnn-npu:1 elapsed time:00:00:17.5720719
2026-06-22 01:12:01.421 [info] Information: Microsoft.Neutron.OpenAI.Provider.OpenAIServiceProviderOnnx [1401] 2026-06-22T01:12:01.4117388+03:00 Finish loading model:qwen2.5-coder-7b-instruct-qnn-npu:1 elapsed time:00:00:17.5720719
2026-06-22 01:12:01.421 [info] Information: Microsoft.Neutron.Telemetry.MicrosoftTelemetry [0] 2026-06-22T01:12:01.4131012+03:00 [Telemetry] AppName:Neutron UserAgent:NeutronServer Command:ModelLoad Status:Success Direct:True Time:17574ms
2026-06-22 01:12:01.421 [info] Information: Microsoft.Neutron.OpenAI.Provider.OpenAIServiceProviderOnnx [1401] 2026-06-22T01:12:01.4117388+03:00 Finish loading model:qwen2.5-coder-7b-instruct-qnn-npu:1 elapsed time:00:00:17.5720719
2026-06-22 01:12:01.422 [info] Information: Microsoft.Neutron.Telemetry.MicrosoftTelemetry [0] 2026-06-22T01:12:01.4131012+03:00 [Telemetry] AppName:Neutron UserAgent:NeutronServer Command:ModelLoad Status:Success Direct:True Time:17574ms
2026-06-22 01:12:01.422 [info] Information: Microsoft.Neutron.Telemetry.MicrosoftTelemetry [0] 2026-06-22T01:12:01.4131012+03:00 [Telemetry] AppName:Neutron UserAgent:NeutronServer Command:ModelLoad Status:Success Direct:True Time:17574ms
2026-06-22 01:12:01.437 [info] Information: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.436455+03:00 HandleChatCompletionAsStreamRequest -> model:qwen2.5-coder-7b-instruct-qnn-npu:1 MaxCompletionTokens:(null) maxTokens:(null) temperature:(null) topP:(null)
2026-06-22 01:12:01.437 [info] Information: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.436455+03:00 HandleChatCompletionAsStreamRequest -> model:qwen2.5-coder-7b-instruct-qnn-npu:1 MaxCompletionTokens:(null) maxTokens:(null) temperature:(null) topP:(null)
2026-06-22 01:12:01.437 [info] Information: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.436455+03:00 HandleChatCompletionAsStreamRequest -> model:qwen2.5-coder-7b-instruct-qnn-npu:1 MaxCompletionTokens:(null) maxTokens:(null) temperature:(null) topP:(null)
2026-06-22 01:12:01.446 [info] Error: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.4446967+03:00 [json.exception.type_error.302] type must be string, but is array
2026-06-22 01:12:01.447 [info] Error: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.4446967+03:00 [json.exception.type_error.302] type must be string, but is array
2026-06-22 01:12:01.447 [info] Error: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.4446967+03:00 [json.exception.type_error.302] type must be string, but is array
2026-06-22 01:12:01.973 [info] Information: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.9728077+03:00 HandleChatCompletionAsStreamRequest -> model:qwen2.5-coder-7b-instruct-qnn-npu:1 MaxCompletionTokens:(null) maxTokens:(null) temperature:(null) topP:(null)
2026-06-22 01:12:01.973 [info] Information: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.9728077+03:00 HandleChatCompletionAsStreamRequest -> model:qwen2.5-coder-7b-instruct-qnn-npu:1 MaxCompletionTokens:(null) maxTokens:(null) temperature:(null) topP:(null)
2026-06-22 01:12:01.974 [info] Information: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.9728077+03:00 HandleChatCompletionAsStreamRequest -> model:qwen2.5-coder-7b-instruct-qnn-npu:1 MaxCompletionTokens:(null) maxTokens:(null) temperature:(null) topP:(null)
2026-06-22 01:12:01.977 [info] Error: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.9771391+03:00 [json.exception.type_error.302] type must be string, but is array
2026-06-22 01:12:01.978 [info] Error: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.9771391+03:00 [json.exception.type_error.302] type must be string, but is array
2026-06-22 01:12:01.978 [info] Error: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:01.9771391+03:00 [json.exception.type_error.302] type must be string, but is array
2026-06-22 01:12:02.782 [info] Information: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:02.7821072+03:00 HandleChatCompletionAsStreamRequest -> model:qwen2.5-coder-7b-instruct-qnn-npu:1 MaxCompletionTokens:(null) maxTokens:(null) temperature:(null) topP:(null)
2026-06-22 01:12:02.782 [info] Information: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:02.7821072+03:00 HandleChatCompletionAsStreamRequest -> model:qwen2.5-coder-7b-instruct-qnn-npu:1 MaxCompletionTokens:(null) maxTokens:(null) temperature:(null) topP:(null)
2026-06-22 01:12:02.782 [info] Information: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:02.7821072+03:00 HandleChatCompletionAsStreamRequest -> model:qwen2.5-coder-7b-instruct-qnn-npu:1 MaxCompletionTokens:(null) maxTokens:(null) temperature:(null) topP:(null)
2026-06-22 01:12:02.787 [info] Error: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:02.7874721+03:00 [json.exception.type_error.302] type must be string, but is array
2026-06-22 01:12:02.788 [error] Unable to call the qwen2.5-coder-7b-instruct-qnn-npu:1 inference endpoint due to 500. Please check if the input or configuration is correct. 500 status code (no body)
2026-06-22 01:12:02.832 [info] Error: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:02.7874721+03:00 [json.exception.type_error.302] type must be string, but is array
2026-06-22 01:12:02.833 [info] Error: Microsoft.Neutron.OpenAI.Delegates.OpenAIApi [0] 2026-06-22T01:12:02.7874721+03:00 [json.exception.type_error.302] type must be string, but is array```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the request through the Foundry Local VS Code Extension with the qwen2.5-coder-7b-instruct-qnn-npu:1 model, then inspect the OpenAIApi path indicated by the logs. Trace the type_error.302 failure where an array is treated as a string; done means the Copilot request completes without the 500 inference error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, vscode
Domain
ai, api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.