Skip to content

fix(provider): support Kimi K3 reasoning effort#37514

Closed
BiuBiu2015 wants to merge 1 commit into
anomalyco:devfrom
BiuBiu2015:fix-k3-effort
Closed

fix(provider): support Kimi K3 reasoning effort#37514
BiuBiu2015 wants to merge 1 commit into
anomalyco:devfrom
BiuBiu2015:fix-k3-effort

Conversation

@BiuBiu2015

@BiuBiu2015 BiuBiu2015 commented Jul 17, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #37418

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Kimi K3 declares low, high, and max effort levels in models.dev, but the Anthropic-compatible provider did not recognize the kimi-k3 family. The effort conversion returned no variants and OpenCode fell back to Anthropic budget-token variants.

This change maps Kimi K3 effort metadata to adaptive thinking options so the Anthropic SDK sends thinking.type = adaptive with the selected output_config.effort. It also adds transform and provider regression coverage for all three levels.

How did you verify your code works?

  • cd packages/opencode && bun test test/provider/transform.test.ts test/provider/provider.test.ts: 445 passed, 0 failed
  • cd packages/opencode && bun run typecheck: passed
  • Sent sanitized live requests through the Kimi Code endpoint for low, high, and max; each request used adaptive thinking with the matching effort and was accepted

Screenshots / recordings

Not applicable; this change only affects provider request options.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Kimi K3 models using Anthropic-compatible endpoint derive adaptive
low/high/max variants from models.dev, preventing budget-token fallback.

Includes unit and provider regression coverage.
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@BiuBiu2015

Copy link
Copy Markdown
Author

Superseded by #37519, which fixes the issue with a more general reasoning-options implementation.

@BiuBiu2015 BiuBiu2015 closed this Jul 18, 2026
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.

Kimi K3 reasoning variants incorrectly use budget tokens instead of effort

1 participant