Skip to content

Conversation

necaris
Copy link
Contributor

@necaris necaris commented Jul 23, 2025

In addition to built-in tools in TOOL_MAPPING, add Gemini tool sanitization to MCP.tools() as well. This should have broader effects -- like fixing #1052 .

@necaris necaris force-pushed the test/gemini-sanitize branch 3 times, most recently from ae235d5 to 7091508 Compare July 28, 2025 12:57
@necaris
Copy link
Contributor Author

necaris commented Jul 28, 2025

@thdxr turns out my previous fix didn't go far enough, would appreciate 👀 here too.

necaris and others added 4 commits August 4, 2025 13:34
Extends existing Gemini compatibility by applying provider-specific
transformations at the middleware level, ensuring consistent tool schema
handling for both built-in and MCP tools.

Co-Authored-By: opencode <noreply@opencode.ai>
Fixed syntax error in session/index.ts where an if statement inside a .then()
block was missing its closing brace, causing TypeScript compilation to fail.

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
Implemented the missing transformToolSchema function that converts Zod schemas
to JSON schemas and applies provider-specific transformations. This method is
used by the session chat functionality to transform tool schemas for different
providers, particularly applying Gemini-specific sanitization for Google provider.

The function handles both Zod schemas and plain JSON schema objects, and includes
error handling with logging for failed transformations.

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
@necaris necaris force-pushed the test/gemini-sanitize branch from 7091508 to 7e472f3 Compare August 4, 2025 18:16
…ema in ProviderTransform

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
@necaris necaris marked this pull request as draft August 13, 2025 04:50
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.

1 participant