Skip to content

fix: send Anthropic Messages effort#296

Draft
musnows wants to merge 1 commit into
KunAgent:developfrom
musnows:codex/fix-anthropic-messages-effort
Draft

fix: send Anthropic Messages effort#296
musnows wants to merge 1 commit into
KunAgent:developfrom
musnows:codex/fix-anthropic-messages-effort

Conversation

@musnows

@musnows musnows commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • send output_config.effort for Anthropic Messages adaptive thinking requests
  • keep off mapped to thinking: { type: "disabled" }
  • add a model client regression test for /v1/messages reasoning effort

Root cause

The UI and runtime preserved the selected reasoning effort, but the Anthropic Messages adapter collapsed every non-off effort into thinking: { type: "adaptive" }. That enabled adaptive thinking, but dropped the concrete effort level, so compatible upstream services could show an empty reasoning strength.

Anthropic's current docs state that adaptive thinking is enabled with thinking: { type: "adaptive" }, while thinking depth is controlled by the output_config.effort parameter:

Fixes #281

Validation

  • npm --prefix kun test -- tests/model-client.test.ts
  • npm --prefix kun run build

@musnows musnows force-pushed the codex/fix-anthropic-messages-effort branch from 0713998 to 620d569 Compare June 14, 2026 10:23
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