Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

fix: add transform case for gemini if mcp tool has missing array items#5846

Merged
rekram1-node merged 1 commit intoanomalyco:devanomalyco/opencode:devfrom
majiayu000:fix/gemini-mcp-array-itemsmajiayu000/opencode:fix/gemini-mcp-array-itemsCopy head branch name to clipboard
Dec 20, 2025
Merged

fix: add transform case for gemini if mcp tool has missing array items#5846
rekram1-node merged 1 commit intoanomalyco:devanomalyco/opencode:devfrom
majiayu000:fix/gemini-mcp-array-itemsmajiayu000/opencode:fix/gemini-mcp-array-itemsCopy head branch name to clipboard

Conversation

@majiayu000
Copy link
Contributor

  • ensure array schemas include an items definition for Gemini models
  • add regression test for missing items

Tests: bun test test/provider/transform.test.ts

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@rekram1-node rekram1-node changed the title Fix Gemini MCP tool schemas missing array items fix: add transform case for gemini if mcp tool has missing array items Dec 20, 2025
@rekram1-node rekram1-node merged commit d89b567 into anomalyco:dev Dec 20, 2025
2 checks passed
@majiayu000 majiayu000 deleted the fix/gemini-mcp-array-items branch December 21, 2025 09:24
mugnimaestra added a commit to mugnimaestra/opencode that referenced this pull request Feb 3, 2026
This extends the existing fix from PR anomalyco#5846 to handle additional edge cases:
- 2D arrays (array of arrays) where inner array is missing items
- Arrays with empty items objects {} that lack a type
- Deeply nested array structures

The fix ensures all array items have at least a default type of 'string'
when no type is specified, preventing Gemini API validation errors.

Fixes anomalyco#5832
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.