You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[mcp] Can't submit a message using Anthropic Sonnet 4.5 and MCP tools due to "String should match pattern" #3354
@eddienubes well only to a point, an example of this is that google gemini has much more strict json schema than openai does, so for gemini models we need to do X, but for anthropic we need to do Y, etc
So not literally every provider but some of the large ones have different rules
@rekram1-node hiya! I can volunteer implementing char escaping for major providers such as google, anthropic and others that require special treatment. Is there anything I need to consider before jumpstarting?
Thanks @eddienubes that'd be awesome. I will give you some reference files:
transform.ts has schema function that currently does nothing but we should add a case for github-copilot provider here I believe, and then we need to define some transformation for the tool schemas to map to a github copilot compatible format.
Activity
github-actions commentedon Oct 22, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 22, 2025
basically we need to sanitize all mcp server tools per provider to adjust their schemas to be compliant
eddienubes commentedon Oct 22, 2025
@rekram1-node does sanitization need to be different for each provider? (assuming that's what
per providermeans)rekram1-node commentedon Oct 22, 2025
@eddienubes well only to a point, an example of this is that google gemini has much more strict json schema than openai does, so for gemini models we need to do X, but for anthropic we need to do Y, etc
So not literally every provider but some of the large ones have different rules
eddienubes commentedon Oct 25, 2025
@rekram1-node hiya! I can volunteer implementing char escaping for major providers such as google, anthropic and others that require special treatment. Is there anything I need to consider before jumpstarting?
rekram1-node commentedon Oct 25, 2025
Thanks @eddienubes that'd be awesome. I will give you some reference files:
transform.ts has
schemafunction that currently does nothing but we should add a case forgithub-copilotprovider here I believe, and then we need to define some transformation for the tool schemas to map to a github copilot compatible format.transform.ts: https://github.com/sst/opencode/blob/ae62bc8b1fce194ae99a05251ed4bf85e38acc32/packages/opencode/src/provider/transform.ts#L157
Function is used here:
https://github.com/sst/opencode/blob/ae62bc8b1fce194ae99a05251ed4bf85e38acc32/packages/opencode/src/session/prompt.ts#L520
bientavu commentedon Oct 31, 2025
Hello guys, same issue on my side, voting for this fix 👍