Deepseek v3.2 - Azure Foundry - It works partially, tools and todos not. #4071

Open
opened 2026-02-16 17:42:30 -05:00 by yindo · 3 comments
Owner

Originally created by @edisonpaul4 on GitHub (Jan 1, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I am trying to use Deepseek V3.2 from Azure Foundry.

This is my opencode.json (directly setting AZURE_API_KEY and AZURE_RESOURCE_NAME doesnt work)

{
"$schema": "https://opencode.ai/config.json",
"model": "azure-foundry/DeepSeek-V3.2",
"provider": {
"azure-foundry": {
"npm": "@ai-sdk/openai-compatible",
"name": "Azure AI Foundry",
"options": {
"baseURL": "https://{{redacted}}.services.ai.azure.com/openai/v1/",
"apiKey": "{env:AZURE_API_KEY}"
},
"models": {
"DeepSeek-V3.2": {
"name": "DeepSeek-V3.2",
"interleaved": {
"field": "reasoning_content",
}
}
}
}
}
}

and the output is:

in CLI MODE:
opencode run --model "azure-foundry/DeepSeek-V3.2" "write an hellow world in python, dont check any other file" --print-logs

`
I'll create a simple "hello world" Python file as requested without checking other files.

print("Hello World")

Since this is a trivial single-step task and you explicitly asked not to check any other files, I'll create it directly.

<write
content="print("Hello World")"
filePath="/home/edisonpaul4/Documents/code/deuna/prd-people/deuna-msa-pp-user/hello_world.py"
description="Create hello world Python file"
/>

`

From UI:

Image

OpenCode version

1.0.223

Steps to reproduce

  1. Use my opencode.json
  2. Try to do anything that needs to use a tool.

Screenshot and/or share link

Image

Operating System

PopOS 24.04

Terminal

Cosmic Terminal

Originally created by @edisonpaul4 on GitHub (Jan 1, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I am trying to use Deepseek V3.2 from Azure Foundry. This is my opencode.json (directly setting AZURE_API_KEY and AZURE_RESOURCE_NAME doesnt work) { "$schema": "https://opencode.ai/config.json", "model": "azure-foundry/DeepSeek-V3.2", "provider": { "azure-foundry": { "npm": "@ai-sdk/openai-compatible", "name": "Azure AI Foundry", "options": { "baseURL": "https://{{redacted}}.services.ai.azure.com/openai/v1/", "apiKey": "{env:AZURE_API_KEY}" }, "models": { "DeepSeek-V3.2": { "name": "DeepSeek-V3.2", "interleaved": { "field": "reasoning_content", } } } } } } and the output is: in CLI MODE: opencode run --model "azure-foundry/DeepSeek-V3.2" "write an hellow world in python, dont check any other file" --print-logs ` I'll create a simple "hello world" Python file as requested without checking other files. ```python print("Hello World") ``` Since this is a trivial single-step task and you explicitly asked not to check any other files, I'll create it directly. <write content="print(\"Hello World\")" filePath="/home/edisonpaul4/Documents/code/deuna/prd-people/deuna-msa-pp-user/hello_world.py" description="Create hello world Python file" /> ` From UI: <img width="647" height="712" alt="Image" src="https://github.com/user-attachments/assets/b9cd9802-a32c-49c9-bdcd-efe3d17ea628" /> ### OpenCode version 1.0.223 ### Steps to reproduce 1. Use my opencode.json 2. Try to do anything that needs to use a tool. ### Screenshot and/or share link <img width="647" height="712" alt="Image" src="https://github.com/user-attachments/assets/617cc20d-eb43-4495-ab52-baacd53a2d62" /> ### Operating System PopOS 24.04 ### Terminal Cosmic Terminal
yindo added the bug label 2026-02-16 17:42:30 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 1, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5577: DeepSeek V3.2 : reasoning_content not cleared from message history on new turns, causing excess token usage and violating API spec
  • #6040: reasoning_content not sent when using @ai-sdk/openai-compatible with deepseek-reasoner

Both issues discuss the same core problem with how DeepSeek's interleaved reasoning_content field is handled in OpenCode, which appears to be causing tools and todos to fail.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 1, 2026): This issue might be a duplicate of existing issues. Please check: - #5577: DeepSeek V3.2 : reasoning_content not cleared from message history on new turns, causing excess token usage and violating API spec - #6040: reasoning_content not sent when using @ai-sdk/openai-compatible with deepseek-reasoner Both issues discuss the same core problem with how DeepSeek's interleaved `reasoning_content` field is handled in OpenCode, which appears to be causing tools and todos to fail. Feel free to ignore if none of these address your specific case.
Author
Owner

@edisonpaul4digitec commented on GitHub (Jan 7, 2026):

Any news ? :(

@edisonpaul4digitec commented on GitHub (Jan 7, 2026): Any news ? :(
Author
Owner

@ink-splatters commented on GitHub (Feb 14, 2026):

BUMP!

❯ opencode --version
1.2.1

The same with Ollama Cloud. This is not a provider issue, unless providers share the same codepath.

Thinking: I need to understand the current codebase and work through this request systematically. First, let me explore the project structure and understand what's in src/google/google.py. Let me start by examining the file.

<function_calls>
<invoke name="read">
<parameter name="filePath" string="true">/Users/pa/.home/dev/google1/src/google/google.py</parameter>
</invoke>
</function_calls>

▣  Build · deepseek-v3.2 · 21.9s

has function call failed and can you fix that

Thinking: The read tool call seems to have failed. Let me check what's in the src/google directory first and see what files exist. Use glob to find the file. Also need to understand the project structure. Let me also check for uv configuration and understand what tools are available. Use multiple parallel tools. First, glob for google.py, then check for uv.toml or pyproject.toml, and also check for poe tasks. Let's do these in parallel.

<function_calls>
<invoke name="glob">
<parameter name="pattern" string="true">*/google.py</parameter>
</invoke>
<invoke name="glob">
<parameter name="pattern" string="true">uv.toml</parameter>
</invoke>
<invoke name="glob">
<parameter name="pattern" string="true">pyproject.toml</parameter>
</invoke>
<invoke name="glob">
<parameter name="pattern" string="true">pyproject.lock</parameter>
</invoke>
<invoke name="glob">
<parameter name="pattern" string="true">*/poe.toml</parameter>
</invoke>
</function_calls>

▣  Build · deepseek-v3.2 · 7.0s
@ink-splatters commented on GitHub (Feb 14, 2026): **BUMP!** ```sh ❯ opencode --version 1.2.1 ``` The same with Ollama Cloud. This is not a provider issue, unless providers share the same codepath. ``` Thinking: I need to understand the current codebase and work through this request systematically. First, let me explore the project structure and understand what's in src/google/google.py. Let me start by examining the file. <function_calls> <invoke name="read"> <parameter name="filePath" string="true">/Users/pa/.home/dev/google1/src/google/google.py</parameter> </invoke> </function_calls> ▣ Build · deepseek-v3.2 · 21.9s has function call failed and can you fix that Thinking: The read tool call seems to have failed. Let me check what's in the src/google directory first and see what files exist. Use glob to find the file. Also need to understand the project structure. Let me also check for uv configuration and understand what tools are available. Use multiple parallel tools. First, glob for google.py, then check for uv.toml or pyproject.toml, and also check for poe tasks. Let's do these in parallel. <function_calls> <invoke name="glob"> <parameter name="pattern" string="true">*/google.py</parameter> </invoke> <invoke name="glob"> <parameter name="pattern" string="true">uv.toml</parameter> </invoke> <invoke name="glob"> <parameter name="pattern" string="true">pyproject.toml</parameter> </invoke> <invoke name="glob"> <parameter name="pattern" string="true">pyproject.lock</parameter> </invoke> <invoke name="glob"> <parameter name="pattern" string="true">*/poe.toml</parameter> </invoke> </function_calls> ▣ Build · deepseek-v3.2 · 7.0s ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4071