Skip to content

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

Closed

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

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Feb 18, 2026
  2. github-actions commented on Feb 18, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or related to existing issues. Please check:

  3. rekram1-node commented on Feb 18, 2026

    @rekram1-node
    Contributor

    What provider are u using?

  4. rekram1-node commented on Feb 18, 2026

    @rekram1-node
    Contributor

    I think this is a bug w/ ur provider.

  5. JoeyVinc commented on Feb 24, 2026

    @JoeyVinc

    Have the same issue. I use Litellm as provider.

  6. rekram1-node commented on Apr 6, 2026

    @rekram1-node
    Contributor

    I think this should be fixed now, litellm with gemini models wasnt sending proper stop reason, we added a handle for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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