Skip to content

Could not set base URL for Cerebras provider #4086

Closed

Description

@franchb

Description

Config is

❯ cat ~/.local/share/opencode/config.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "cerebras": {
      "options": {
          "baseURL": "https://deno-proxy.franchb.deno.net/api.cerebras.ai/v1"
      }
    }
  }
}

But base URL is still default:

ERROR 2025-11-08T17:55:55 +226ms service=session.prompt session=ses_59b63bae7ffeSi1looXdSuqdoW error={"error":{"name":"AI_APICallError","url":"https://api.cerebras.ai/v1/chat/completions",

OpenCode version

1.0.45

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Fedora 42

Terminal

fish

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 8, 2025
  2. OpeOginni commented on Nov 8, 2025

    @OpeOginni
    Contributor

    Tried it and it seems to work for me

  3. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 8, 2025
  4. rekram1-node commented on Nov 8, 2025

    @rekram1-node
    Contributor

    @OpeOginni u did it with the cerebras provider too? not just like a random one right?

  5. OpeOginni commented on Nov 8, 2025

    @OpeOginni
    Contributor

    Yes, Used the Demo Proxy as well (from issue), seemed to work too

  6. rekram1-node commented on Nov 8, 2025

    @rekram1-node
    Contributor

    Gotcha, @franchb did you restart opencode after making this change?

    Can u show me output of opencode debug config?

  7. self-assigned this
    on Nov 8, 2025
  8. rekram1-node commented on Nov 8, 2025

    @rekram1-node
    Contributor

    thanks @OpeOginni for testing!

  9. franchb commented on Nov 9, 2025

    @franchb
    Author

    Hi!

    I've updated to latest opencode v1.0.49, fully restarted my laptop. The same error again.

    opencode debug config
    {
      "agent": {},
      "mode": {},
      "plugin": [],
      "command": {},
      "username": "<redacted>",
      "keybinds": {
        "leader": "ctrl+x",
        "app_exit": "ctrl+c,ctrl+d,<leader>q",
        "editor_open": "<leader>e",
        "theme_list": "<leader>t",
        "sidebar_toggle": "<leader>b",
        "status_view": "<leader>s",
        "session_export": "<leader>x",
        "session_new": "<leader>n",
        "session_list": "<leader>l",
        "session_timeline": "<leader>g",
        "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_copy": "<leader>y",
        "messages_undo": "<leader>u",
        "messages_redo": "<leader>r",
        "messages_toggle_conceal": "<leader>h",
        "model_list": "<leader>m",
        "model_cycle_recent": "f2",
        "model_cycle_recent_reverse": "shift+f2",
        "command_list": "ctrl+p",
        "agent_list": "<leader>a",
        "agent_cycle": "tab",
        "agent_cycle_reverse": "shift+tab",
        "input_clear": "ctrl+c",
        "input_forward_delete": "ctrl+d",
        "input_paste": "ctrl+v",
        "input_submit": "return",
        "input_newline": "shift+return,ctrl+j",
        "history_previous": "up",
        "history_next": "down",
        "session_child_cycle": "ctrl+right",
        "session_child_cycle_reverse": "ctrl+left"
      }
    }
    
  10. rekram1-node commented on Nov 9, 2025

    @rekram1-node
    Contributor

    @franchb where did you set that base url?

    Given it isn't in your config it seems like you placed it in the wrong spot?

    Oh i see u stated here:
    cat ~/.local/share/opencode/config.json

    ^^ This config isn't ever read, you can read more about config locations here

    So the global config needs to be in ~/.config/opencode/opencode.json (you can also use .jsonc if u prefer doesnt matter either way)

  11. franchb commented on Nov 9, 2025

    @franchb
    Author

    Works! Thank you!

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