Skip to content

Support user-defined OpenAI-compatible providers as first-class entries (not just the hand-curated registry list) #547

Description

@ruttybob

Problem

The registry only knows a fixed, hand-curated list of first-class providers (coworker/providers/registry.py). If a user's gateway/vendor isn't on the list, the only escape hatch is pointing the OpenAI slot at a foreign base_url — which mislabels every model ("GPT-5.6 · via "), collides with real OpenAI key handling, and breaks down completely with two such gateways at once (the slot is single).

Vendors exposing /v1/chat/completions multiply faster than registry PRs land: LiteLLM proxies, vLLM, corporate routers, regional resellers. Each new vendor is currently a code change.

Proposal

Let users add their own OpenAI-compatible providers from the UI/CLI: display name + base_url + API key (+ optional curated model id list). The added provider becomes a first-class dynamic descriptor, not a hack of the OpenAI slot:

  • Its own profile (key stored via SecretStore) and its own model-id namespace, so two gateways coexist and routing stays unambiguous.
  • Shows up in ProviderSetup / settings / model pickers like any stock entry.
  • Editable and removable without touching code.

Design notes from a working implementation in our fork (happy to upstream it):

  • Profile lives in the secret store under a provider:<slug> key carrying a "wire": "openai-compat" marker — discovery scans the store for the marker, so there is no separate index that can drift.
  • Model ids are <slug>:<bare>; builtin-name collisions are rejected at creation.
  • Slug frozen after creation (renaming = delete + recreate) because curated model ids embed it.

Related: #545 (reasoning-effort knob for these providers), #546 (example of why the hand-curated list doesn't scale).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions