Skip to content

"Provider returned error" with openrouter/openai/gpt-* #7542

Closed

Description

@jdanbrown

Description

Image

Looks widespread with openrouter/openai/gpt models, but not openai/gpt models:

# openrouter/openai/*

$ opencode -m openrouter/openai/gpt-5.2 run 'hi'
Error: Provider returned error
$ opencode -m openrouter/openai/gpt-5.1 run 'hi'
Error: Provider returned error
$ opencode -m openrouter/openai/gpt-5 run 'hi'
Error: Provider returned error
$ opencode -m openrouter/openai/gpt-5-pro run 'hi'
Error: Provider returned error
$ opencode -m openrouter/openai/gpt-5-mini run 'hi'
Error: Provider returned error
$ opencode -m openrouter/openai/gpt-5-nano run 'hi'
Error: Provider returned error
$ opencode -m openrouter/openai/gpt-5-codex run 'hi'
Error: Provider returned error
$ opencode -m openrouter/openai/gpt-4.1 run 'hi'
Error: Provider returned error

# openai/*

$ opencode -m openai/gpt-5.2 run 'hi'

Hi! What are you working on today—do you want help debugging something, making a change in a repo, or just a quick coding question?

$ opencode -m openai/gpt-5-mini run 'hi'

Hey — how can I help you today?

Here's the openrouter/openai/gpt-5.2 error from top with --print-logs:

Here's a formatted version of the big error={...} json blob from --print-logs:

I used a blank config:

$ opencode debug config
{
  "$schema": "https://opencode.ai/config.json",
  "agent": {},
  "mode": {},
  "plugin": [],
  "command": {},
  "username": "danb",
  "keybinds": {
    "leader": "ctrl+x",
    "app_exit": "ctrl+c,ctrl+d,<leader>q",
    "editor_open": "<leader>e",
    "theme_list": "<leader>t",
    "sidebar_toggle": "<leader>b",
    "scrollbar_toggle": "none",
    "username_toggle": "none",
    "status_view": "<leader>s",
    "session_export": "<leader>x",
    "session_new": "<leader>n",
    "session_list": "<leader>l",
    "session_timeline": "<leader>g",
    "session_fork": "none",
    "session_rename": "none",
    "session_share": "none",
    "session_unshare": "none",
    "session_interrupt": "escape",
    "session_compact": "<leader>c",
    "messages_page_up": "pageup",
    "messages_page_down": "pagedown",
    "messages_half_page_up": "ctrl+alt+u",
    "messages_half_page_down": "ctrl+alt+d",
    "messages_first": "ctrl+g,home",
    "messages_last": "ctrl+alt+g,end",
    "messages_next": "none",
    "messages_previous": "none",
    "messages_last_user": "none",
    "messages_copy": "<leader>y",
    "messages_undo": "<leader>u",
    "messages_redo": "<leader>r",
    "messages_toggle_conceal": "<leader>h",
    "tool_details": "none",
    "model_list": "<leader>m",
    "model_cycle_recent": "f2",
    "model_cycle_recent_reverse": "shift+f2",
    "model_cycle_favorite": "none",
    "model_cycle_favorite_reverse": "none",
    "command_list": "ctrl+p",
    "agent_list": "<leader>a",
    "agent_cycle": "tab",
    "agent_cycle_reverse": "shift+tab",
    "variant_cycle": "ctrl+t",
    "input_clear": "ctrl+c",
    "input_paste": "ctrl+v",
    "input_submit": "return",
    "input_newline": "shift+return,ctrl+return,alt+return,ctrl+j",
    "input_move_left": "left,ctrl+b",
    "input_move_right": "right,ctrl+f",
    "input_move_up": "up",
    "input_move_down": "down",
    "input_select_left": "shift+left",
    "input_select_right": "shift+right",
    "input_select_up": "shift+up",
    "input_select_down": "shift+down",
    "input_line_home": "ctrl+a",
    "input_line_end": "ctrl+e",
    "input_select_line_home": "ctrl+shift+a",
    "input_select_line_end": "ctrl+shift+e",
    "input_visual_line_home": "alt+a",
    "input_visual_line_end": "alt+e",
    "input_select_visual_line_home": "alt+shift+a",
    "input_select_visual_line_end": "alt+shift+e",
    "input_buffer_home": "home",
    "input_buffer_end": "end",
    "input_select_buffer_home": "shift+home",
    "input_select_buffer_end": "shift+end",
    "input_delete_line": "ctrl+shift+d",
    "input_delete_to_line_end": "ctrl+k",
    "input_delete_to_line_start": "ctrl+u",
    "input_backspace": "backspace,shift+backspace",
    "input_delete": "ctrl+d,delete,shift+delete",
    "input_undo": "ctrl+-,super+z",
    "input_redo": "ctrl+.,super+shift+z",
    "input_word_forward": "alt+f,alt+right,ctrl+right",
    "input_word_backward": "alt+b,alt+left,ctrl+left",
    "input_select_word_forward": "alt+shift+f,alt+shift+right",
    "input_select_word_backward": "alt+shift+b,alt+shift+left",
    "input_delete_word_forward": "alt+d,alt+delete,ctrl+delete",
    "input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace",
    "history_previous": "up",
    "history_next": "down",
    "session_child_cycle": "<leader>right",
    "session_child_cycle_reverse": "<leader>left",
    "session_parent": "<leader>up",
    "terminal_suspend": "ctrl+z",
    "terminal_title_toggle": "none",
    "tips_toggle": "<leader>h"
  }
}

Plugins

none

OpenCode version

1.1.10

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS 26.2

Terminal

vscode terminal

Activity

  1. github-actions commented on Jan 9, 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. jdanbrown commented on Jan 16, 2026

    @jdanbrown
    ContributorAuthor

    Seems fixed now in 1.1.25. Not sure what fixed it, but maybe this other openrouter gpt fix?

    $ opencode -m openrouter/openai/gpt-5.2 run 'hi'
    |  task     Respond to greeting
    
    hi — what are we working on?
    
    - Debugging (paste the error + the command you ran)
    - Adding/refactoring a feature (tell me the goal + constraints)
    - Tests (what’s failing / what coverage you want)
    - Git workflow (commit/branch/PR help)
    - Docs or CLI polish
    
    If you have a repo, drop the path (or `pwd` output) and what you want to do.
    
    $ opencode -m openrouter/openai/gpt-5.1 run 'hi'
    
    Hey!  
    
    What are you working on today, or how can I help with your code?
    
    $ opencode -m openrouter/openai/gpt-5 run 'hi'
    
    Hey! What can I help you build or debug today?
    
    $ opencode -m openrouter/openai/gpt-5.2-codex run 'hi'
    
    Hey! How can I help?
  3. rekram1-node commented on Jan 16, 2026

    @rekram1-node
    Collaborator

    Yeah idk if we did anything on our end

  4. rekram1-node commented on Jan 16, 2026

    @rekram1-node
    Collaborator

    ig we can close as completed

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 working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions