Skip to content

Custom OpenAI provider 404 with empty URL (opencode.ai zen/go/v1) #8517

@anmolxlight

Description

@anmolxlight

Bug Description

When using a custom OpenAI-type provider pointing to opencode.ai, requests fail with:

Note the empty URL — goose appears to be making a request to a relative/blank path.

Steps to Reproduce

  1. Configure goose with a custom provider for opencode.ai using base_url
  2. Run
    ( O)> ● new session · custom_opencode minimax-m2.5
    _
    _) 20260413_42 · /home/ubuntu
    L L goose is ready
    ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ 0% 0/128k

● session closed · 20260413_42
3. Send any message
4. Error:

Expected Behavior

Requests should go to (verified working via curl with the same API key).

Provider Config

{
  "name": "custom_opencode",
  "engine": "openai",
  "base_url": "https://opencode.ai/zen/go/v1",
  "api_key_env": "CUSTOM_OPENCODE_API_KEY",
  "models": [
    {"name": "minimax-m2.5", "context_limit": 128000}
  ]
}

Investigation Findings

  • with the same base_url + API key to returns 200
  • The 404 error message has an empty URL — goose is constructing a request to a relative path with no host
  • goose session starts successfully; error only occurs when sending a message
  • The empty URL in the error suggests a routing bug in how goose constructs provider requests for custom OpenAI-type engines

Version

goose 1.30.0

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