claude-code-router
claude-code-router copied to clipboard
Gemini models ?
First thanks for this project!
As I understand the models used needs to be openAI compatible, correct ?
Is there a way to use Gemini models like flash/flash-lite ?
I tried several things without any success so far.
I previously integrated Gemini into Claude Code using this documentation: https://ai.google.dev/gemini-api/docs/openai. However, I found that the Gemini model isn’t capable of driving Claude Code effectively—it’s just too dumb.
maybe this isn't true anymore with 2.5 released?
EDIT: When running with Gemini 2.5 I get the following error
message: 'Provider returned error',
code: 400,
metadata: {
raw: '{\n' +
' "error": {\n' +
' "code": 400,\n' +
` "message": "* GenerateContentRequest.tools[0].function_declarations[2].parameters.properties[invocations].items.properties[input].properties: should be non-empty for OBJECT type\\n* GenerateContentRequest.tools[0].function_declarations[11].parameters.properties[url].format: only 'enum' and 'date-time' are supported for STRING type\\n",\n` +
' "status": "INVALID_ARGUMENT"\n' +
' }\n' +
'}\n',
provider_name: 'Google AI Studio'
}
},
maybe this isn't true anymore with 2.5 released?
EDIT: When running with Gemini 2.5 I get the following error
message: 'Provider returned error', code: 400, metadata: { raw: '{\n' + ' "error": {\n' + ' "code": 400,\n' + ` "message": "* GenerateContentRequest.tools[0].function_declarations[2].parameters.properties[invocations].items.properties[input].properties: should be non-empty for OBJECT type\\n* GenerateContentRequest.tools[0].function_declarations[11].parameters.properties[url].format: only 'enum' and 'date-time' are supported for STRING type\\n",\n` + ' "status": "INVALID_ARGUMENT"\n' + ' }\n' + '}\n', provider_name: 'Google AI Studio' } },
I'm testing the next version: it will allow users to rewrite the Claude Code prompt to better adapt to other LLMs, and enable users to customize the router for more granular task splitting based on different needs. The next version is expected to be released later next week.
Thanks for your work, and please let us know if it's possible to help you with anything.
Thanks for your work, and please let us know if it's possible to help you with anything.
I just released the test code on the dev/custom-prompt branch. This is still in the testing phase and does not yet have good compatibility with Gemini.
Does gemini 2.5 pro now work properly on Claude-code?
Does gemini 2.5 pro now work properly on Claude-code?
Yes, though I’ve only tried using it by OpenRouter.