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"
      }
    }
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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