Skip to content

Custom provider with Openai compatible API Straico (successfully connected) showing blank output and keep looping #10573

Closed as not planned

Description

@imquangdang

Description

  1. As stated in document https://opencode.ai/docs/providers/ . I want to create a custom provider connection to use with their API. In this case, it's Straico (The API docs here)
  2. It successful (api connection) but the output of the OpenCode seems frozen, but actually it's looping something (as my API credit get spent nonstop)
  3. This issue seems like happening with other users as well, but in different situation with different provider. (search in Github and Discord)
  4. My custom provider setting in config.json file.
  "$schema": "https://opencode.ai/config.json",
    "provider": {
    "straico": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Straico",
      "options": {
        "baseURL": "https://api.straico.com/v2"
      },
      "models": {
        "anthropic/claude-sonnet-4.5": {
          "name": "Claude 4.5 Sonnet"
        },
        "openai/gpt-5.2": {
          "name": "GPT-5.2"
        },
        "x-ai/grok-4-fast-reasoning": {
          "name": "Grok 4 Fast Reasoning"
        }
      }
    }
  }

Plugins

MCP, Chrome DevTool

OpenCode version

1.1.30 until 1.1.35

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

MacOS Tahoe 26.2

Terminal

Warp

Activity

  1. github-actions commented on Jan 25, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  2. mosfor commented on Jan 25, 2026

    @mosfor

    yeah I have the same issue and without a custom provider just with the default provider and also with other providers like google, for me the first request goes will but some times the second or the third request wont output anything just looping

    Image
  3. abankalarm commented on Feb 11, 2026

    @abankalarm

    Same issue, OpenAi custom provider calls fails and loop, antrhropic provider bugs out sometimes but works.
    In network logs, i can see openai provider trying to send the same user request in loop

  4. qwowboyp commented on Feb 22, 2026

    @qwowboyp

    I've also encountered this using the built‑in xai/grok-4-1-fast. I started a small TODO task and it ran normally at first. I stepped away for about two hours, and when I came back the UI was blank with an "interrupt" indicator in the lower-left; the TODO had only reached about 17% completion. Checking the xAI dashboard shows about $9 of usage was consumed, but the OpenCode sidebar context shows less than $0.10.

    As a note: pressing the ESC key twice within the same session seemed to restore normal operation. I switched to Gemini 3.1 Pro and it completed the remaining work in 2 minutes 45 seconds. I am using OpenCode version 1.2.10.

  5. Delqhi commented on Mar 7, 2026

    @Delqhi

    This looks like the same custom-provider failure family we hit: the provider connects, but OpenCode ends up with blank output or a broken loop because the endpoint only partially matches the OpenAI tool / stream contract.

    What worked in our fork was an opt-in compatibility layer for custom providers:

    • request adapter for tools / tool_choice -> legacy functions / function_call
    • parser middleware for legacy function_call, text-only tool intents, JSON tool blocks, and wrapped <tool_call> payloads
    • optional session repair when a tool-capable turn ends with finish_reason=stop
    • minimized tool payload / allowlist for brittle providers

    That made a previously broken OpenAI-compatible provider usable for multi-turn tool execution on our side.

    Related issues: #234, #15756, #5210.

    If the maintainers are interested, I can turn that into a PR behind explicit custom-provider config.

  6. removed
    bugSomething isn't working
    on May 3, 2026
  7. github-actions commented on Jul 6, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions