Add OpenPaths provider#72
Conversation
OpenPaths (https://openpaths.io) is an OpenAI-compatible model gateway, mirroring the existing OpenRouter integration: - ProviderOpenPaths: OpenAI-compatible client pointed at https://openpaths.io/v1 - ProviderName union, getProvider switch, ApiKeys, Settings, and ProxyUtils provider maps extended with openpaths - downloadOpenPathsModels fetches https://openpaths.io/v1/models and namespaces ids as openpaths::; wired into model refresh hooks - ApiKeysForm entry linking to https://openpaths.io/account Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41c3f5f9be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| id: "openpaths", | ||
| name: "OpenPaths", | ||
| placeholder: "op-...", | ||
| url: "https://openpaths.io/account", | ||
| }, |
There was a problem hiding this comment.
Surface OpenPaths models in the picker
When a user adds an OpenPaths key here, fetchModelConfigs can download openpaths:: model configs, but the model picker never renders that provider: ManageModelsBox only groups OpenRouter/local plus direct providers anthropic, openai, google, perplexity, and grok (src/ui/components/ManageModelsBox.tsx:497-508). Since openpaths is not in any group, downloaded OpenPaths models are filtered out of picker/search and the new provider cannot be selected through the UI.
Useful? React with 👍 / 👎.
What
Adds OpenPaths as a model provider. OpenPaths is an OpenAI-compatible model gateway (similar in shape to the existing OpenRouter integration), so this change mirrors the OpenRouter wiring as closely as possible.
Users add their OpenPaths API key in Settings (key page: https://openpaths.io/account), and OpenPaths models become available alongside the other providers.
Changes
src/core/chorus/ModelProviders/ProviderOpenPaths.ts(new): OpenAI-compatible provider, copied fromProviderOpenRouterwith the base URL set tohttps://openpaths.io/v1.src/core/chorus/Models.ts: registerProviderOpenPathsin thegetProviderswitch; addopenpathsto theProviderNameunion andApiKeys; adddownloadOpenPathsModels(fetcheshttps://openpaths.io/v1/models, namespaces ids asopenpaths::); add theopenpathscontext-limit pattern.src/core/chorus/api/ModelsAPI.ts: download OpenPaths models when an OpenPaths key is present, plus auseRefreshOpenPathsModelshook wired into the refresh flow (mirrors OpenRouter).src/core/utilities/ProxyUtils.ts: addopenpathsto the provider-to-key and display-name maps.src/core/utilities/Settings.ts: addopenpathsto the persistedapiKeys.src/ui/components/ApiKeysForm.tsx: add an OpenPaths entry (links to https://openpaths.io/account).src/ui/components/ui/provider-logo.tsx: add anopenpathscase to satisfy the exhaustiveness check (placeholder icon for now).Additive and minimal — no existing behavior changed. OpenRouter-specific aggregation (web search) was intentionally left untouched since it doesn't map to a plain OpenAI-compatible gateway.
Testing
npx tsc --noEmit— passesnpx prettier --checkon changed files — passesnpx eslinton changed files — passes🤖 Generated with Claude Code