Skip to content

Add OpenPaths provider#72

Open
lee101 wants to merge 1 commit into
meltylabs:mainfrom
lee101:openpaths-provider
Open

Add OpenPaths provider#72
lee101 wants to merge 1 commit into
meltylabs:mainfrom
lee101:openpaths-provider

Conversation

@lee101

@lee101 lee101 commented Jun 16, 2026

Copy link
Copy Markdown

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 from ProviderOpenRouter with the base URL set to https://openpaths.io/v1.
  • src/core/chorus/Models.ts: register ProviderOpenPaths in the getProvider switch; add openpaths to the ProviderName union and ApiKeys; add downloadOpenPathsModels (fetches https://openpaths.io/v1/models, namespaces ids as openpaths::); add the openpaths context-limit pattern.
  • src/core/chorus/api/ModelsAPI.ts: download OpenPaths models when an OpenPaths key is present, plus a useRefreshOpenPathsModels hook wired into the refresh flow (mirrors OpenRouter).
  • src/core/utilities/ProxyUtils.ts: add openpaths to the provider-to-key and display-name maps.
  • src/core/utilities/Settings.ts: add openpaths to the persisted apiKeys.
  • src/ui/components/ApiKeysForm.tsx: add an OpenPaths entry (links to https://openpaths.io/account).
  • src/ui/components/ui/provider-logo.tsx: add an openpaths case 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 — passes
  • npx prettier --check on changed files — passes
  • npx eslint on changed files — passes
  • Full Tauri/Rust build not run (heavy); changes are additive and type-checked.

🤖 Generated with Claude Code

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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +54 to +58
id: "openpaths",
name: "OpenPaths",
placeholder: "op-...",
url: "https://openpaths.io/account",
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant