-
Notifications
You must be signed in to change notification settings - Fork 100
Description
Description
Google models in opencode give the following error even when they don't need to use firecrawl.
So all google model prompts fail with the following error if firecrawl is enabled.
When I disable firecrawl google models work fine in opencode.
All other models work fine in opencode when firecrawl is enabled and they can use firecrawl normally.
I can also normally use firecrawl in gemini-cli and on vscode copilot with google models.
Reproduction Steps
Steps to reproduce the behavior:
I have authenticated with google oauth:
"google": {
"type": "oauth",
"refresh": "-----------------------",
"access": "--------------------------",
"expires": XXXXXXXX,
"email": "myemail"
}
I also have installed firecrawl mcp server in opencode.
"firecrawl": {
"enabled": true,
"type": "local",
"command": ["npx", "-y", "firecrawl-mcp"],
"environment": {
"FIRECRAWL_API_KEY": "XXXXXXXXXXXXXXXXXXXX",
},
},
Environment
- OS: Linux
Opencode Information
- Opencode Type: cli
- Opencode Version: 1.1.53
Debug Information
Bad Request: [{
"error": {
"code": 400,
"message": "Unable to submit request because `firecrawl_firecrawl_scrape` functionDeclaration `parameters.formats` schema specified other fields alongside any_of. When using any_of, it must be the only field set. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling",
"errors": [
{
"message": "Unable to submit request because `firecrawl_firecrawl_scrape` functionDeclaration `parameters.formats` schema specified other fields alongside any_of. When using any_of, it must be the only field set. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT"
}
}
]
Debug Logs:
Click to expand debug information
[Gemini Debug] OAuth exchange: POST https://oauth2.googleapis.com/token
[Gemini Debug] OAuth exchange response: 400 Bad Request
[Gemini Debug] OAuth exchange error body: {
"error": "invalid_grant",
"error_description": "Malformed auth code."
}
[Gemini Debug] OAuth refresh: POST https://oauth2.googleapis.com/token
[Gemini Debug] OAuth refresh success: expires_in=3599s refresh_rotated=no
[Gemini Debug GEMINI-1] POST https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse
[Gemini Debug GEMINI-1] Original URL: https://generativelanguage.googleapis.com/v1beta/models/gemini-3-flash-preview:streamGenerateContent?alt=sse
[Gemini Debug GEMINI-1] Project: XXXXXXXXXXXX
[Gemini Debug GEMINI-1] Streaming: yes
[Gemini Debug GEMINI-1] Headers: {"accept":"text/event-stream","authorization":"[redacted]","client-metadata":"ideType=IDE_UNSPECIFIED,platform=PLATFORM_UNSPECIFIED,pluginType=GEMINI","content-type":"application/json","user-agent":"google-api-nodejs-client/9.15.1","x-goog-api-client":"gl-node/22.17.0","x-goog-api-key":""}
[Gemini Debug GEMINI-1] Body Preview: {"project":"XXXXXXXXXXXX","model":"gemini-3-flash-preview","request":{"generationConfig":{"maxOutputTokens":32000,"temperature":0.5,"topK":64,"topP":0.95,"thinkingConfig":{"thinkingLevel":"minimal"}},"contents":[{"role":"user","parts":[{"text":"Generate a title for this conversation:\n"}]},{"role":"user","parts":[{"text":"what time is it now?"}]}],"systemInstruction":{"parts":[{"text":"You are a title generator. You output ONLY a thread title. Nothing else.\n\n<task>\nGenerate a brief title that would help the user find this conversation later.\n\nFollow all rules in <rules>\nUse the <examples> so you know what a good title looks like.\nYour output must be:\n- A single line\n- ≤50 characters\n- No explanations\n</task>\n\n<rules>\n- you MUST use the same language as the user message you are summarizing\n- Title must be grammatically correct and read naturally - no word salad\n- Never include tool names in the title (e.g. \"read tool\", \"bash tool\", \"edit tool\")\n- Focus on the main topic or question the user needs to retrieve\n- Vary your phrasing - avoid repetitive patterns like always starting with \"Analyzing\"\n- When a file is mentioned, focus on WHAT the user wants to do WITH the file, not just that they shared it\n- Keep exact: technical terms, numbers, filenames, HTTP codes\n- Remove: the, this, my, a, an\n- Never assume tech stack\n- Never use tools\n- NEVER respond to questions, just generate a title for the conversation\n- The title should NEVER include \"summarizing\" or \"generating\" when generating a title\n- DO NOT SAY YOU CANNOT GENERATE A TITLE OR COMPLAIN ABOUT THE INPUT\n- Always output something meaningful, even if the input is minimal.\n- If the user message is short or conversational (e.g. \"hello\", \"lol\", \"what's up\", \"hey\"):\n → create a title that reflects the user's tone or intent (such as Greeting, Quick check-in, Light chat, Intro message, etc.)\n</rules>\n\n<examples>\n\"debug 500 errors in production\" → Debugging prod... (truncated 580 chars)
[Gemini Debug] OAuth refresh: POST https://oauth2.googleapis.com/token
[Gemini Debug] OAuth refresh: POST https://oauth2.googleapis.com/token
[Gemini Debug] OAuth refresh success: expires_in=3599s refresh_rotated=no
[Gemini Debug GEMINI-2] POST https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse
[Gemini Debug GEMINI-2] Original URL: https://generativelanguage.googleapis.com/v1beta/models/gemini-3-flash-preview:streamGenerateContent?alt=sse
[Gemini Debug GEMINI-2] Project: XXXXXXXXXXXX
[Gemini Debug GEMINI-2] Streaming: yes
[Gemini Debug GEMINI-2] Headers: {"accept":"text/event-stream","authorization":"[redacted]","client-metadata":"ideType=IDE_UNSPECIFIED,platform=PLATFORM_UNSPECIFIED,pluginType=GEMINI","content-type":"application/json","user-agent":"google-api-nodejs-client/9.15.1","x-goog-api-client":"gl-node/22.17.0","x-goog-api-key":""}
[Gemini Debug GEMINI-2] Body Preview: {"project":"XXXXXXXXXXXX","model":"gemini-3-flash-preview","request":{"generationConfig":{"maxOutputTokens":32000,"temperature":1,"topK":64,"topP":0.95,"thinkingConfig":{"thinkingLevel":"high","includeThoughts":true}},"contents":[{"role":"user","parts":[{"text":"what time is it now?"}]}],"systemInstruction":{"parts":[{"text":"You are opencode, an interactive CLI agent specializing in software engineering tasks. Your primary goal is to help users safely and efficiently, adhering strictly to the following instructions and utilizing your available tools.\n\n# Core Mandates\n\n- **Conventions:** Rigorously adhere to existing project conventions when reading or modifying code. Analyze surrounding code, tests, and configuration first.\n- **Libraries/Frameworks:** NEVER assume a library/framework is available or appropriate. Verify its established usage within the project (check imports, configuration files like 'package.json', 'Cargo.toml', 'requirements.txt', 'build.gradle', etc., or observe neighboring files) before employing it.\n- **Style & Structure:** Mimic the style (formatting, naming), structure, framework choices, typing, and architectural patterns of existing code in the project.\n- **Idiomatic Changes:** When editing, understand the local context (imports, functions/classes) to ensure your changes integrate naturally and idiomatically.\n- **Comments:** Add code comments sparingly. Focus on *why* something is done, especially for complex logic, rather than *what* is done. Only add high-value comments if necessary for clarity or if requested by the user. Do not edit comments that are separate from the code you are changing. *NEVER* talk to the user or describe your changes through comments.\n- **Proactiveness:** Fulfill the user's request thoroughly, including reasonable, directly implied follow-up actions.\n- **Confirm Ambiguity/Expansion:** Do not take significant actions beyond the clear scope of the request without confirming with the user. If asked *ho... (truncated 83448 chars)
[Gemini Debug] OAuth refresh success: expires_in=3599s refresh_rotated=no
[Gemini Debug GEMINI-3] POST https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse
[Gemini Debug GEMINI-3] Original URL: https://generativelanguage.googleapis.com/v1beta/models/gemini-3-flash-preview:streamGenerateContent?alt=sse
[Gemini Debug GEMINI-3] Project: XXXXXXXXXXXX
[Gemini Debug GEMINI-3] Streaming: yes
[Gemini Debug GEMINI-3] Headers: {"accept":"text/event-stream","authorization":"[redacted]","client-metadata":"ideType=IDE_UNSPECIFIED,platform=PLATFORM_UNSPECIFIED,pluginType=GEMINI","content-type":"application/json","user-agent":"google-api-nodejs-client/9.15.1","x-goog-api-client":"gl-node/22.17.0","x-goog-api-key":""}
[Gemini Debug GEMINI-3] Body Preview: {"project":"XXXXXXXXXXXX","model":"gemini-3-flash-preview","request":{"generationConfig":{"maxOutputTokens":32000,"temperature":0.5,"topK":64,"topP":0.95,"thinkingConfig":{"thinkingLevel":"minimal"}},"contents":[{"role":"user","parts":[{"text":"\n The following is the text to summarize:\n <text>\n what time is it now?\n </text>\n "}]}],"systemInstruction":{"parts":[{"text":"You are a title generator. You output ONLY a thread title. Nothing else.\n\n<task>\nGenerate a brief title that would help the user find this conversation later.\n\nFollow all rules in <rules>\nUse the <examples> so you know what a good title looks like.\nYour output must be:\n- A single line\n- ≤50 characters\n- No explanations\n</task>\n\n<rules>\n- you MUST use the same language as the user message you are summarizing\n- Title must be grammatically correct and read naturally - no word salad\n- Never include tool names in the title (e.g. \"read tool\", \"bash tool\", \"edit tool\")\n- Focus on the main topic or question the user needs to retrieve\n- Vary your phrasing - avoid repetitive patterns like always starting with \"Analyzing\"\n- When a file is mentioned, focus on WHAT the user wants to do WITH the file, not just that they shared it\n- Keep exact: technical terms, numbers, filenames, HTTP codes\n- Remove: the, this, my, a, an\n- Never assume tech stack\n- Never use tools\n- NEVER respond to questions, just generate a title for the conversation\n- The title should NEVER include \"summarizing\" or \"generating\" when generating a title\n- DO NOT SAY YOU CANNOT GENERATE A TITLE OR COMPLAIN ABOUT THE INPUT\n- Always output something meaningful, even if the input is minimal.\n- If the user message is short or conversational (e.g. \"hello\", \"lol\", \"what's up\", \"hey\"):\n → create a title that reflects the user's tone or intent (such as Greeting, Quick check-in, Light chat, Intro message, etc.)\n</rules>\n\n<examples>\n... (truncated 631 chars)
[Gemini Debug GEMINI-1] Response 200 OK (1084ms)
[Gemini Debug GEMINI-1] Response Headers: {"alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000","content-disposition":"attachment","content-type":"text/event-stream","date":"Sat, 07 Feb 2026 15:08:37 GMT","server":"ESF","server-timing":"gfet4t7; dur=981","transfer-encoding":"chunked","vary":"Origin, X-Origin, Referer","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-xss-protection":"0"}
[Gemini Debug GEMINI-1] Note: Streaming SSE payload (body omitted)
[Gemini Debug GEMINI-3] Response 200 OK (2095ms)
[Gemini Debug GEMINI-3] Response Headers: {"alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000","content-disposition":"attachment","content-type":"text/event-stream","date":"Sat, 07 Feb 2026 15:08:39 GMT","server":"ESF","server-timing":"gfet4t7; dur=945","transfer-encoding":"chunked","vary":"Origin, X-Origin, Referer","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-xss-protection":"0"}
[Gemini Debug GEMINI-3] Note: Streaming SSE payload (body omitted)
[Gemini Debug GEMINI-2] Response 429 Too Many Requests (3366ms)
[Gemini Debug GEMINI-2] Response Headers: {"alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000","content-length":"895","content-type":"application/json; charset=UTF-8","date":"Sat, 07 Feb 2026 15:08:40 GMT","retry-after":"1","retry-after-ms":"831","server":"ESF","server-timing":"gfet4t7; dur=330","vary":"Origin, X-Origin, Referer","x-cloudaicompanion-trace-id":"XXXXXXXXXXXX","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-xss-protection":"0"}
[Gemini Debug GEMINI-2] Trace ID: XXXXXXXXXXXX
[Gemini Debug GEMINI-2] Note: Streaming SSE payload (buffered)
[Gemini Debug GEMINI-2] Response Body Preview: [{
"error": {
"code": 429,
"message": "You have exhausted your capacity on this model. Your quota will reset after 0s.",
"errors": [
{
"message": "You have exhausted your capacity on this model. Your quota will reset after 0s.",
"domain": "global",
"reason": "rateLimitExceeded"
}
],
"status": "RESOURCE_EXHAUSTED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "RATE_LIMIT_EXCEEDED",
"domain": "cloudcode-pa.googleapis.com",
"metadata": {
"uiMessage": "true",
"model": "gemini-3-flash-preview",
"quotaResetDelay": "830.956646ms",
"quotaResetTimeStamp": "2026-02-07T15:08:41Z"
}
},
{
"@type": "type.googleapis.com/google.rpc.RetryInfo",
"retryDelay": "0.830956646s"
}
]
}
}
]
[Gemini Debug] OAuth refresh: POST https://oauth2.googleapis.com/token
[Gemini Debug] OAuth refresh success: expires_in=3599s refresh_rotated=no
[Gemini Debug GEMINI-4] POST https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse
[Gemini Debug GEMINI-4] Original URL: https://generativelanguage.googleapis.com/v1beta/models/gemini-3-flash-preview:streamGenerateContent?alt=sse
[Gemini Debug GEMINI-4] Project: XXXXXXXXXXXX
[Gemini Debug GEMINI-4] Streaming: yes
[Gemini Debug GEMINI-4] Headers: {"accept":"text/event-stream","authorization":"[redacted]","client-metadata":"ideType=IDE_UNSPECIFIED,platform=PLATFORM_UNSPECIFIED,pluginType=GEMINI","content-type":"application/json","user-agent":"google-api-nodejs-client/9.15.1","x-goog-api-client":"gl-node/22.17.0","x-goog-api-key":""}
[Gemini Debug GEMINI-4] Body Preview: {"project":"XXXXXXXXXXXX","model":"gemini-3-flash-preview","request":{"generationConfig":{"maxOutputTokens":32000,"temperature":1,"topK":64,"topP":0.95,"thinkingConfig":{"thinkingLevel":"high","includeThoughts":true}},"contents":[{"role":"user","parts":[{"text":"what time is it now?"}]}],"systemInstruction":{"parts":[{"text":"You are opencode, an interactive CLI agent specializing in software engineering tasks. Your primary goal is to help users safely and efficiently, adhering strictly to the following instructions and utilizing your available tools.\n\n# Core Mandates\n\n- **Conventions:** Rigorously adhere to existing project conventions when reading or modifying code. Analyze surrounding code, tests, and configuration first.\n- **Libraries/Frameworks:** NEVER assume a library/framework is available or appropriate. Verify its established usage within the project (check imports, configuration files like 'package.json', 'Cargo.toml', 'requirements.txt', 'build.gradle', etc., or observe neighboring files) before employing it.\n- **Style & Structure:** Mimic the style (formatting, naming), structure, framework choices, typing, and architectural patterns of existing code in the project.\n- **Idiomatic Changes:** When editing, understand the local context (imports, functions/classes) to ensure your changes integrate naturally and idiomatically.\n- **Comments:** Add code comments sparingly. Focus on *why* something is done, especially for complex logic, rather than *what* is done. Only add high-value comments if necessary for clarity or if requested by the user. Do not edit comments that are separate from the code you are changing. *NEVER* talk to the user or describe your changes through comments.\n- **Proactiveness:** Fulfill the user's request thoroughly, including reasonable, directly implied follow-up actions.\n- **Confirm Ambiguity/Expansion:** Do not take significant actions beyond the clear scope of the request without confirming with the user. If asked *ho... (truncated 83448 chars)
[Gemini Debug GEMINI-4] Response 400 Bad Request (327ms)
[Gemini Debug GEMINI-4] Response Headers: {"alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000","content-length":"801","content-type":"application/json; charset=UTF-8","date":"Sat, 07 Feb 2026 15:08:41 GMT","server":"ESF","server-timing":"gfet4t7; dur=302","vary":"Origin, X-Origin, Referer","x-cloudaicompanion-trace-id":"XXXXXXXXXXXXXX","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-xss-protection":"0"}
[Gemini Debug GEMINI-4] Trace ID: XXXXXXXXXXXXXXX
[Gemini Debug GEMINI-4] Note: Streaming SSE payload (buffered)
[Gemini Debug GEMINI-4] Response Body Preview: [{
"error": {
"code": 400,
"message": "Unable to submit request because `firecrawl_firecrawl_scrape` functionDeclaration `parameters.formats` schema specified other fields alongside any_of. When using any_of, it must be the only field set. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling",
"errors": [
{
"message": "Unable to submit request because `firecrawl_firecrawl_scrape` functionDeclaration `parameters.formats` schema specified other fields alongside any_of. When using any_of, it must be the only field set. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT"
}
}
]
Additional Context
Again to be clear this happens only with google models when firecrawl mcp is enabled EVEN WHEN not used by the prompt, making all prompts fail with google models.
This is not critical, I can disable firecrawl to work with google models but it could be a more serious bug that affects other functionalities.
Also I see on the debug log errors about rateLimitExceeded but I don't have any problems using gemini models when firecrawl is disabled.