Repository navigation
fix(opencode): move type-specific keywords into gemini union branches - #49392
Open
axiom-of-choice wants to merge 1 commit into
Open
axiom-of-choice wants to merge 1 commit into
axiom-of-choice wants to merge 1 commit into
Conversation
3 of 6 tasks
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Related PR Found: PR #43495: fix(opencode): fold schema items into gemini union branches Why it's related: This PR addresses a partial fix to the same issue. According to your PR description, #43495 moves |
Author
|
Full error from error |
This branch has not been deployed
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 #34130
Closes #48073
Type of change
What does this PR do?
The Gemini sanitizer splits
type: ["array","null"]intoanyOf: [{ type: "array" }]but leavesitemson the parent, and nullable objects leaveproperties/requiredthere too. Gemini rejects both. This moves those keywords into the matchinganyOfbranch.#43495 moves
itemsonly, so nullable objects still fail.How did you verify your code works?
To reproduce, add the Kaggle MCP server and run any prompt on a Gemini model:
{ "mcp": { "kaggle": { "type": "remote", "url": "https://www.kaggle.com/mcp" } } }Before: 400 with 130 schema errors (full log in the comments). With this change, the same 71 tools through
ProviderTransform.schemaand@ai-sdk/googleget a 200. Added a test with that schema shape.Screenshots / recordings
Not a UI change.
Checklist