Skip to content

[BUG] Gemini 3 on OpenRouter API tool result error - All Tools Broken #10307

@mrkmg

Description

@mrkmg

Problem (one or two sentences)

When using OpenRouter and Gemini 3, anytime roo tries to use a tool, it fails with a 400 Provider Error.

This leaves Gemini completely broken.

Context (who is affected and when)

Using Gemini 3 pro preview on openrouter, no tool calls work

Reproduction steps

  1. Use Open Router and Gemini 3 Pro Preview
  2. Try to do anything

Expected result

No error

Actual result

Errors

Variations tried (optional)

I don't have access to other providers

App Version

3.37.0

API Provider (optional)

OpenRouter

Model Used (optional)

Gemini 3 Pro Preview

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

400
OpenRouter completion error: Gemini models require OpenRouter reasoning details to be preserved in each request. Please refer to our docs: https://openrouter.ai/docs/guides/best-practices/reasoning-tokens#preserving-reasoning-blocks. Upstream error: {
  "error": {
    "code": 400,
    "message": "Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:new_task` , position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.",
    "status": "INVALID_ARGUMENT"
  }
}



Date/time: 2025-12-23T13:22:49.746Z
Extension version: 3.37.0
Provider: openrouter
Model: google/gemini-3-pro-preview

400
OpenRouter completion error: Gemini models require OpenRouter reasoning details to be preserved in each request. Please refer to our docs: https://openrouter.ai/docs/guides/best-practices/reasoning-tokens#preserving-reasoning-blocks. Upstream error: {
  "error": {
    "code": 400,
    "message": "Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:update_todo_list` , position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.",
    "status": "INVALID_ARGUMENT"
  }
}



// Please share this file with Roo Code Support (support@roocode.com) to diagnose the issue faster
// Just make sure you're OK sharing the contents of the conversation below.

{
  "error": {
    "timestamp": "2025-12-23T13:16:07.592Z",
    "version": "3.37.0",
    "provider": "openrouter",
    "model": "google/gemini-3-pro-preview",
    "details": "400\nOpenRouter completion error: Gemini models require OpenRouter reasoning details to be preserved in each request. Please refer to our docs: https://openrouter.ai/docs/guides/best-practices/reasoning-tokens#preserving-reasoning-blocks. Upstream error: {\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:new_task` , position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}"
  },
  "history": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "REMOVED"
        },
        {
          "type": "text",
          "text": "REMOVED"
        }
      ],
      "ts": 1766495649479
    },
    {
      "role": "assistant",
      "content": [
        {
          "type": "tool_use",
          "id": "tool_new_task_k7LktBScQZtG5uIJYm6g",
          "name": "new_task",
          "input": {
            "mode": "code",
            "message": "Update overview-channel.ts to support multiple filters",
            "todos": "[ ] Update `checkAndUpdateOverviews` to include filters in the query\n[ ] Update `checkIfUpdateNeeded` to use multiple filters logic\n[ ] Update `fetchFilteredTickets` to use multiple filters logic\n[ ] Update `buildOverviewEmbeds` to handle titles for multiple filters"
          }
        }
      ],
      "ts": 1766495688590,
      "reasoning_details": [
        {
          "type": "reasoning.text",
          "text": "REMOVED",
          "format": "google-gemini-v1",
          "index": 0
        },
        {
          "type": "reasoning.encrypted",
          "data": "REMOVED",
          "id": "tool_new_task_k7LktBScQZtG5uIJYm6g",
          "format": "google-gemini-v1",
          "index": 0
        }
      ]
    },
    {
      "role": "user",
      "content": [
        {
          "type": "tool_result",
          "tool_use_id": "tool_new_task_k7LktBScQZtG5uIJYm6g",
          "content": "{\"status\":\"denied\",\"message\":\"The user denied this operation and provided the following feedback\",\"feedback\":\"No need to to use subtasks\"}"
        },
        {
          "type": "text",
          "text": "<environment_details>\n# VSCode Visible Files\nbot\\src\\services\\overview-channel.ts\n\n# VSCode Open Tabs\nbot/src/services/overview-channel.ts,bot/src/commands/overview.ts,shared/prisma/schema.prisma\n\n# Current Time\nCurrent time in ISO 8601 UTC format: 2025-12-23T13:15:04.300Z\nUser time zone: America/New_York, UTC-5:00\n\n# Current Cost\n$0.12\n\n# Current Mode\n<slug>code</slug>\n<name>💻 Code</name>\n<model>google/gemini-3-pro-preview</model>\n<tool_format>native</tool_format>\nYou have not created a todo list yet. Create one with `update_todo_list` if your task is complicated or involves multiple steps.\n</environment_details>"
        }
      ],
      "ts": 1766495704303
    }
  ]
}



// Please share this file with Roo Code Support (support@roocode.com) to diagnose the issue faster
// Just make sure you're OK sharing the contents of the conversation below.

{
  "error": {
    "timestamp": "2025-12-23T13:22:58.105Z",
    "version": "3.37.0",
    "provider": "openrouter",
    "model": "google/gemini-3-pro-preview",
    "details": "400\nOpenRouter completion error: Gemini models require OpenRouter reasoning details to be preserved in each request. Please refer to our docs: https://openrouter.ai/docs/guides/best-practices/reasoning-tokens#preserving-reasoning-blocks. Upstream error: {\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:update_todo_list` , position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}"
  },
  "history": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "REMOVED"
        },
        {
          "type": "text",
          "text": "REMOVED"
        }
      ],
      "ts": 1766496074639
    },
    {
      "role": "assistant",
      "content": [
        {
          "type": "tool_use",
          "id": "tool_update_todo_list_mL716LwhunURIXx4ZUZf",
          "name": "update_todo_list",
          "input": {
            "todos": "[ ] Update `fetchFilteredTickets` in `bot/src/services/overview-channel.ts` to support multiple filters\n[ ] Update `checkIfUpdateNeeded` in `bot/src/services/overview-channel.ts` to support multiple filters\n[ ] Update `buildOverviewEmbeds` in `bot/src/services/overview-channel.ts` to handle titles for multiple filters"
          }
        }
      ],
      "ts": 1766496112549,
      "reasoning_details": [
        {
          "type": "reasoning.text",
          "text": "REMOVED",
          "format": "google-gemini-v1",
          "index": 0
        },
        {
          "type": "reasoning.encrypted",
          "data": "REMOVED",
          "id": "tool_update_todo_list_mL716LwhunURIXx4ZUZf",
          "format": "google-gemini-v1",
          "index": 0
        }
      ]
    },
    {
      "role": "user",
      "content": [
        {
          "type": "tool_result",
          "tool_use_id": "tool_update_todo_list_mL716LwhunURIXx4ZUZf",
          "content": "Todo list updated successfully."
        },
        {
          "type": "text",
          "text": "<environment_details>\n# VSCode Visible Files\n..\\..\\..\\AppData\\Local\\Temp\\roo-diagnostics-a7c08862-1766495767594.json\n\n# VSCode Open Tabs\nbot/src/services/overview-channel.ts,../../../AppData/Local/Temp/roo-diagnostics-a7c08862-1766495767594.json,bot/src/commands/overview.ts,shared/prisma/schema.prisma\n\n# Current Time\nCurrent time in ISO 8601 UTC format: 2025-12-23T13:21:52.685Z\nUser time zone: America/New_York, UTC-5:00\n\n# Current Cost\n$0.11\n\n# Current Mode\n<slug>code</slug>\n<name>💻 Code</name>\n<model>google/gemini-3-pro-preview</model>\n<tool_format>native</tool_format>\n====\n\nREMINDERS\n\nBelow is your current list of reminders for this task. Keep them updated as you progress.\n\n| # | Content | Status |\n|---|---------|--------|\n| 1 | Update `fetchFilteredTickets` in `bot/src/services/overview-channel.ts` to support multiple filters | Pending |\n| 2 | Update `checkIfUpdateNeeded` in `bot/src/services/overview-channel.ts` to support multiple filters | Pending |\n| 3 | Update `buildOverviewEmbeds` in `bot/src/services/overview-channel.ts` to handle titles for multiple filters | Pending |\n\n\nIMPORTANT: When task status changes, remember to call the `update_todo_list` tool to update your progress.\n\n</environment_details>"
        }
      ],
      "ts": 1766496112695
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions