Skip to content

Gemini models in Task (subagent) session immediately stopped with @ai-sdk/openai-compatible #14063

@feiwhang

Description

@feiwhang

Description

❌ Task tool doesn't wait → subagent terminates immediately (empty results)

"gemini": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Gemini",
      "options": {
        "baseURL": "<baseURL>",
        "headers": {
          "Authorization": "<Auth>"
        }
      },
      "models": {
        "gemini-3-pro-preview": {
          "name": "gemini-3-pro-preview",
          "options": {
            "thinkingLevel": {
              "type": "high"
            }
          }
        },
        "gemini-3-flash-preview": {
          "name": "gemini-3-flash-preview",
          "options": {
            "thinkingLevel": {
              "type": "low"
            }
          }
        }
      }
    }

Plugins

No response

OpenCode version

1.2.5

Steps to reproduce

  1. Config @explore subagent to use @ai-sdk/openai-compatible gemini models like gemini-3-flash-preview
  2. Test main agent to invoke @explore
  3. Notice inside subagent Task tool, it run for a bit then immediately stopped and return empty result to main agent.

Screenshot and/or share link

Image

Operating System

macOS

Terminal

iTerm2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions