fix: route OpenRouter-only providers through OpenRouter API#38
Conversation
Providers without their own public API now use OpenRouter as their base_url with OPENROUTER_API_KEY, making them testable and usable when the user has an OpenRouter key configured. - 20 OpenRouter-only providers: set base_url to openrouter.ai/api/v1 - morph: set correct official API (api.morphllm.com/v1) - sync-pricing.py: default to OpenRouter routing for new providers
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23e738ce30
ℹ️ 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".
| "arcee-ai": ("https://api.arcee.ai/v1", "ARCEE_API_KEY"), | ||
| "inception": ("https://api.inceptionlabs.ai/v1", "INCEPTION_API_KEY"), | ||
| "morph": ("https://api.morphlabs.io/v1", "MORPH_API_KEY"), | ||
| "morph": ("https://api.morphllm.com/v1", "MORPH_API_KEY"), |
There was a problem hiding this comment.
Update committed Morph URL when changing generator default
Changing PROVIDER_API["morph"] here does not update the already-committed providers/morph.toml, because update_toml_prices() only rewrites pricing fields and leaves provider metadata untouched. As a result, this commit introduces a config drift where newly generated Morph files use api.morphllm.com but the registry still serves api.morphlabs.io, so users continue getting the old endpoint unless someone manually edits providers/morph.toml.
Useful? React with 👍 / 👎.
Summary
base_url = "https://openrouter.ai/api/v1"+api_key_env = "OPENROUTER_API_KEY"instead of empty base_url withkey_required = falsehttps://api.morphllm.com/v1(was incorrectly empty)sync-pricing.py: new providers default to OpenRouter routing instead ofkey_required = falseWhy
Providers with
key_required = falseand emptybase_urlshowed as "configured" in the dashboard but couldn't actually be used. Routing through OpenRouter makes them testable and usable when the user hasOPENROUTER_API_KEYset.Test plan
OPENROUTER_API_KEYis setpython scripts/sync-pricing.py --dry-run --create-missinggenerates correct configs