Skip to content

fix(openai): enforce strict tool schema for Kimi Coding API#3098

Merged
amitksingh1490 merged 1 commit intotailcallhq:mainfrom
ffrappo:fix/kimi-coding-strict-tool-schema
Apr 21, 2026
Merged

fix(openai): enforce strict tool schema for Kimi Coding API#3098
amitksingh1490 merged 1 commit intotailcallhq:mainfrom
ffrappo:fix/kimi-coding-strict-tool-schema

Conversation

@ffrappo
Copy link
Copy Markdown
Contributor

@ffrappo ffrappo commented Apr 21, 2026

Problem

The Kimi Coding endpoint (`https://api.kimi.com/coding/v1\`) validates tool JSON schemas strictly and rejects schemas that include nullable enum patterns (e.g. `null` inside `enum`) that Forge already normalizes for other providers via `EnforceStrictToolSchema`.

The `kimi_coding` provider was not included in that pipeline, so requests with tools could fail against the Kimi Coding API.

Change

Include the `kimi_coding` provider in the same strict-schema branch as Fireworks, OpenCode Zen/Go, and XAI.

Testing

  • `cargo build -p forge_main --release` (local)

Made with Cursor

Kimi Coding (api.kimi.com) rejects nullable tool JSON schemas the same way as Fireworks and XAI. Enable EnforceStrictToolSchema for the kimi_coding provider.

Made-with: Cursor
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Apr 21, 2026
@amitksingh1490 amitksingh1490 merged commit 78481e8 into tailcallhq:main Apr 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants