Skip to content

Generic AI provider support #64

Description

@gempir

It would be nice if we are not limited to specific providers.

Our company hosts their own "openrouter"-like proxy, in opencode you can configure providers like so and can specify a sdk to use.
This makes the configuration super flexible.

See more here https://opencode.ai/docs/providers/#custom-provider

{
  "llm-proxy-openai-compatible": {
    "npm": "@ai-sdk/openai-compatible",
    "name": "LLM Proxy",
    "options": {
      "apiKey": "{env:LLM_PROXY_API_KEY}",
      "baseURL": "{env:LLM_PROXY_API_BASE_URL}/api/v1/proxy/openai/auto"
    },
    "models": {
      "google/gemini-3.5-flash": {
        "name": "google/gemini-3.5-flash"
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions