cant request gemini #1763

Closed
opened 2026-02-16 17:32:31 -05:00 by yindo · 6 comments
Owner

Originally created by @thesyd1982 on GitHub (Sep 19, 2025).

Originally assigned to: @thdxr on GitHub.

when i write an input i got this error with all gemini models
AI_APICallError: Invalid value at
'tools.function_declarations[16].parameters.properties[1].value.any_of[1].propertie
s[2].value.enum[0]' (TYPE_STRING), true

Originally created by @thesyd1982 on GitHub (Sep 19, 2025). Originally assigned to: @thdxr on GitHub. when i write an input i got this error with all gemini models AI_APICallError: Invalid value at 'tools.function_declarations[16].parameters.properties[1].value.any_of[1].propertie s[2].value.enum[0]' (TYPE_STRING), true
yindo closed this issue 2026-02-16 17:32:31 -05:00
Author
Owner

@rekram1-node commented on GitHub (Sep 19, 2025):

looks like you may be using an mcp server?

Whatever mcp server u are using serves tools that gemini cant use

Ideally we could sanitize these for you but this looks like it is due to an mcp server to me

@rekram1-node commented on GitHub (Sep 19, 2025): looks like you may be using an mcp server? Whatever mcp server u are using serves tools that gemini cant use Ideally we could sanitize these for you but this looks like it is due to an mcp server to me
Author
Owner

@thesyd1982 commented on GitHub (Sep 19, 2025):

nope cause if i change the model to claude sonnet it works, and i've tested the gemini api connection it works and i'm logged, the probleme occurs when i change model to any gemini model
Ps: sorry for my bad english

@thesyd1982 commented on GitHub (Sep 19, 2025): nope cause if i change the model to claude sonnet it works, and i've tested the gemini api connection it works and i'm logged, the probleme occurs when i change model to any gemini model Ps: sorry for my bad english
Author
Owner

@rekram1-node commented on GitHub (Sep 19, 2025):

@thesyd1982 yeah but that would be expected if this was an mcp server at fault.

Anthropic allows a lot of tool schemas, gemini is much more strict about schemas it allows. If you have an mcp server and you disable it, then try to use gemini it should work

@rekram1-node commented on GitHub (Sep 19, 2025): @thesyd1982 yeah but that would be expected if this was an mcp server at fault. Anthropic allows a lot of tool schemas, gemini is much more strict about schemas it allows. If you have an mcp server and you disable it, then try to use gemini it should work
Author
Owner

@thesyd1982 commented on GitHub (Sep 19, 2025):

ok im gona remove all mcp's and i'll tel you :)

@thesyd1982 commented on GitHub (Sep 19, 2025): ok im gona remove all mcp's and i'll tel you :)
Author
Owner

@thesyd1982 commented on GitHub (Sep 19, 2025):

Wow, you're right, that's it. I deleted all my MCPs (which work fine with Claude Provider) and now it works. Thank you very much.

@thesyd1982 commented on GitHub (Sep 19, 2025): Wow, you're right, that's it. I deleted all my MCPs (which work fine with Claude Provider) and now it works. Thank you very much.
Author
Owner

@rekram1-node commented on GitHub (Sep 19, 2025):

No problem :) eventually we will want to sanitize the mcp server tools on your behalf potentially to better allow compatibility but for now this is expected because without opencode you wouldn't be able to use the mcp server with gemini anyways

@rekram1-node commented on GitHub (Sep 19, 2025): No problem :) eventually we will want to sanitize the mcp server tools on your behalf potentially to better allow compatibility but for now this is expected because without opencode you wouldn't be able to use the mcp server with gemini anyways
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1763