fix(provider): strip Nvidia Kimi tool schemas#28997
Open
VIVAAN-DHAWAN wants to merge 1 commit into
Open
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: I found a potentially related PR: #25492: This PR appears to address a similar issue with Kimi/Moonshot models and JSON schema handling. While the current PR (28997) specifically targets Nvidia-hosted Kimi models with a schema stripping approach, PR #25492 may have tackled a related schema depth limitation for the same provider. You should verify whether #25492 is still open or merged, and if there's any overlap in scope or approach. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #26662
Type of change
What does this PR do?
Nvidia-hosted Kimi K2.6 rejects normal tool parameter schemas with an internal server error: unhashable type: dict.
This keeps the existing Moonshot/Kimi handling, and adds the same practical fallback for Nvidia Kimi: send a minimal object schema for tool parameters. That avoids the provider-side schema hashing crash while still allowing tools to be offered.
How did you verify your code works?
From packages/opencode:
From the repo root:
I also checked the related open PR #25492. That PR is about Moonshot schema depth, while this one is scoped to the Nvidia-hosted Kimi provider error.
Screenshots / recordings
Not a UI change.
Checklist