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

Open
opened 2026-02-16 18:07:35 -05:00 by yindo · 3 comments
Owner

Originally created by @imquangdang on GitHub (Jan 25, 2026).

Originally assigned to: @thdxr on GitHub.

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

Originally created by @imquangdang on GitHub (Jan 25, 2026). Originally assigned to: @thdxr on GitHub. ### 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)](https://documenter.getpostman.com/view/5900072/2s9YyzddrR#fdf5e52e-ce1e-4d78-b176-3cb192cc72bc) 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 <img width="3376" height="1910" alt="Image" src="https://github.com/user-attachments/assets/41f0a920-67b6-4ec0-b9e9-a9dfc3b2ee4f" /> ### Operating System MacOS Tahoe 26.2 ### Terminal Warp
yindo added the bug label 2026-02-16 18:07:35 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 25, 2026):

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

  • #2724: No output in Opencode with OpenAI-compatible Straico provider (exact same provider and symptoms)
  • #5674: Custom OpenAI-compatible provider options not being passed to API calls (likely root cause)
  • #5356: OpenCode repeatedly executes a command non-stop (similar looping behavior)
  • #9445: Planner agent gets stuck in infinite loop (related looping issue)
  • #1298: Custom provider AI_TypeValidationError with OpenAI-compatible API

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

@github-actions[bot] commented on GitHub (Jan 25, 2026): This issue might be a duplicate of existing issues. Please check: - #2724: No output in Opencode with OpenAI-compatible Straico provider (exact same provider and symptoms) - #5674: Custom OpenAI-compatible provider options not being passed to API calls (likely root cause) - #5356: OpenCode repeatedly executes a command non-stop (similar looping behavior) - #9445: Planner agent gets stuck in infinite loop (related looping issue) - #1298: Custom provider AI_TypeValidationError with OpenAI-compatible API Feel free to ignore if none of these address your specific case.
Author
Owner

@mosfor commented on GitHub (Jan 25, 2026):

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
@mosfor commented on GitHub (Jan 25, 2026): 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 <img width="1351" height="217" alt="Image" src="https://github.com/user-attachments/assets/e3c87907-b37e-4aaa-9b98-6aff5b8eea41" />
Author
Owner

@abankalarm commented on GitHub (Feb 11, 2026):

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

@abankalarm commented on GitHub (Feb 11, 2026): 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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7560