Skip to content

fix(azure): add Kimi K2.7 Code reasoning effort controls - #11457

Open
strange0g wants to merge 1 commit into
anomalyco:devfrom
strange0g:fix/azure-kimi-reasoning-effort
Open

strange0g wants to merge 1 commit into
anomalyco:devfrom
strange0g:fix/azure-kimi-reasoning-effort

Conversation

@strange0g

Copy link
Copy Markdown

What

azure/kimi-k2.7-code reasons by default and returns its chain of thought in reasoning_content, but the catalog declared no effort control, so OpenCode exposed no effort variants for it.

Fix

providers/azure/models/kimi-k2.7-code.toml:

reasoning = { supported = true, toggle = true, effort = ["low", "medium", "high", "max"] }

The [api.chat-completions] table already sets compatibility = { reasoning_field = "reasoning_content" }.

Evidence (live, 2026-10-25, on a Foundry resource)

POST /models/chat/completions?api-version=2024-05-01-preview:

  • no parameter → reasoning runs and reasoning_content is populated;
  • reasoning_effort=none|low|medium|high|max → accepted; none gives reasoning_tokens: 0;
  • the endpoint's own 400 names the enum and rejects minimal/xhigh (unlike DeepSeek V4 on the same surface);
  • the model returns tool_calls.

Scope note

I checked the other Azure Kimi entries too. kimi-k2.5, kimi-k2.6, and the Kimi K3 deployments are not deployed on the resource I tested (every call returns "The API deployment for this resource does not exist"), so I left them unchanged — there is no live evidence for their controls here.

Validation

  • bun validate — passes.
  • bun run v1:check — reports the expected data change (listed for approval, per AGENTS.md): api reasoning_options: [] -> [toggle, effort low/medium/high/max] for azure/kimi-k2.7-code and its azure-cognitive-services alias.

Kimi K2.7 Code on Azure (Foundry) reasons by default and returns its chain of
thought in reasoning_content, but the catalog declared no effort control, so
OpenCode exposed no effort variants.

Verified live 2026-10-25 against a Foundry resource:
- reasoning is on by default and reasoning_content is populated without a parameter
- reasoning_effort accepts none|low|medium|high|max; the endpoint's own 400 names the
  enum, and minimal/xhigh are rejected (unlike DeepSeek V4 on the same surface)
- none disables reasoning
- the model returns tool_calls

Adds { supported = true, toggle = true, effort = [low, medium, high, max] }.
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/azure/models/kimi-k2.7-code.toml:40 - Check: AGENTS.md Reasoning controls §3 and audit-reasoning-options Step 3 toggle rules — off via effort=none must be effort with none and no toggle. Why: The PR's own evidence says off is reasoning_effort=none on a single field, not a separate on/off field, matching same-surface peer providers/azure/models/deepseek-v4-pro.toml:16 which uses effort = ["none", "low", "high", "max"] with no toggle and notes off is effort=none rather than a toggle. The proposed toggle = true with effort = ["low", "medium", "high", "max"] invents a separate toggle and hides the documented none level. Action: Change to reasoning = { supported = true, effort = ["none", "low", "medium", "high", "max"] } with no toggle, and keep a leading top-of-file # Effort: reasoning_effort = none|low|medium|high|max comment noting off is effort=none.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant