Custom provider reasoning effort not injected: OpenAI camelCase vs snake_case; Anthropic output_config dropped
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Custom-provider reasoning effort is not reliably injected in ZCode 3.7.7.
- OpenAI-compatible path: ZCode sends camelCase
reasoningEffort, while DeepSeek/Kimi document snake_casereasoning_effort; servers return 200 but silently ignore the unknown field, so low/high/max does not actually change behavior. - Anthropic-compatible path: the catalog writes
output_config.effort, but the main request injector only reads top-leveleffort/reasoningEffort, sooutput_configis dropped from real chat requests; high and max produce the same request. The connectivity test masks this by falling back tothoughtLevel. thinking.type: "disabled"is omitted by the Anthropic main-path injector, so the off state depends on endpoint defaults.
Environment
- ZCode: 3.7.7 win-x64
- OS: Windows 11 build 26200
- Providers/models: Kimi Code
k3(https://api.kimi.com/coding/v1, OpenAI-compatible), DeepSeekdeepseek-v4-flash(https://api.deepseek.comandhttps://api.deepseek.com/anthropic)
Official parameter references
- DeepSeek chat:
thinking.typeenabled/disabled default enabled;reasoning_effortlow/high/max default high; response usesreasoning_content. - DeepSeek Anthropic endpoint:
thinkingsupported butbudget_tokensignored;output_configonly supportseffort. - Kimi K3: top-level
reasoning_effortlow/high/max default max; K3 always thinks;max_completion_tokensdefault 131072 / max 1048576. - Kimi Code API documents OpenAI-compatible base
https://api.kimi.com/coding/v1and Anthropic-compatible basehttps://api.kimi.com/coding/; it does not rename reasoning to camelCase.
Evidence
- Installed catalog
resources/model-providers/models_catalog_china_llm_zcode_2026-06-03.jsonmaps openai-compatible reasoning toreasoningEffort; Anthropic effort is nested at["output_config","effort"]. - Connectivity logs under
%USERPROFILE%\.zcode2\logsshow OpenAI-compatible probes sending"reasoningEffort":"max"; Anthropic probes showoutput_config.effortonly because the connectivity builder falls back tothoughtLevel. - Rollout records under
%USERPROFILE%\.zcode\cli olloutshow real chat behavior differs from connectivity probes. After locally patching only the catalog key toreasoning_effort, real Kimi k3 requests separate correctly: lowreasoningTokens44/189 vs maxreasoningTokens495/475 in repeated checks.
Expected
- OpenAI-compatible providers receive
reasoning_effort(or a provider-correct field), notreasoningEffort. - Anthropic main requests read
providerOptions.anthropic.output_config?.effortor the catalog maps to top-leveleffort;thinking.type:"disabled"is explicitly sent. - Connectivity tests use the exact same injection path as real chat requests.
Actual
- UI level changes are accepted but can be silently ignored by providers.
- Anthropic high/max real requests are identical; connectivity test can look healthy while the real request drops
output_config.
Suggested minimal catalog patch for the OpenAI-compatible key
This patch fixed the OpenAI-compatible path locally. It is against the installed resource file; the source path may differ.
zcode-reasoning-effort-snake-case.patch
diff --git a/resources/model-providers/models_catalog_china_llm_zcode_2026-06-03.json b/resources/model-providers/models_catalog_china_llm_zcode_2026-06-03.json
--- a/resources/model-providers/models_catalog_china_llm_zcode_2026-06-03.json
+++ b/resources/model-providers/models_catalog_china_llm_zcode_2026-06-03.json
@@ -51,7 +51,7 @@
"set": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "low"
}
@@ -74,7 +74,7 @@
"set": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "high"
}
@@ -97,7 +97,7 @@
"set": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "max"
}
@@ -145,7 +145,7 @@
"set": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "low"
}
@@ -168,7 +168,7 @@
"set": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "high"
}
@@ -191,7 +191,7 @@
"set": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "max"
}
@@ -239,7 +239,7 @@
"set": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "low"
}
@@ -262,7 +262,7 @@
"set": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "high"
}
@@ -285,7 +285,7 @@
"set": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "max"
}
@@ -764,7 +764,7 @@
"unset": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
]
}
]
@@ -802,7 +802,7 @@
},
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "high"
}
@@ -841,7 +841,7 @@
},
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "max"
}
@@ -897,7 +897,7 @@
"unset": [
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
]
}
]
@@ -935,7 +935,7 @@
},
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "high"
}
@@ -974,7 +974,7 @@
},
{
"path": [
- "reasoningEffort"
+ "reasoning_effort"
],
"value": "max"
}
Notes
- I can provide redacted logs and a small direct-API repro script if needed.
- Please treat connectivity success as insufficient validation for this bug; verify the real chat wire body or compare provider
reasoning_content/reasoningTokensacross low and max.
Contributor guide
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 with resources/model-providers/models_catalog_china_llm_zcode_2026-06-03.json, then trace its settings through the real chat request injector and the connectivity builder. Compare rollout records under %USERPROFILE%.zcode\cli\rollout with connectivity logs under %USERPROFILE%.zcode\v2\logs. Done means real requests use provider-correct effort fields, preserve Anthropic output_config and disabled thinking, and connectivity exercises the same injection path.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100