Skip to content

fix: route OpenRouter-only providers through OpenRouter API#38

Merged
houko merged 1 commit intomainfrom
fix/openrouter-routing
Apr 2, 2026
Merged

fix: route OpenRouter-only providers through OpenRouter API#38
houko merged 1 commit intomainfrom
fix/openrouter-routing

Conversation

@houko
Copy link
Copy Markdown
Contributor

@houko houko commented Apr 2, 2026

Summary

  • 20 OpenRouter-only providers now use base_url = "https://openrouter.ai/api/v1" + api_key_env = "OPENROUTER_API_KEY" instead of empty base_url with key_required = false
  • Morph: corrected to official API https://api.morphllm.com/v1 (was incorrectly empty)
  • sync-pricing.py: new providers default to OpenRouter routing instead of key_required = false

Why

Providers with key_required = false and empty base_url showed as "configured" in the dashboard but couldn't actually be used. Routing through OpenRouter makes them testable and usable when the user has OPENROUTER_API_KEY set.

Test plan

  • Dashboard shows OpenRouter-only providers as "configured" when OPENROUTER_API_KEY is set
  • Testing these providers hits OpenRouter successfully
  • python scripts/sync-pricing.py --dry-run --create-missing generates correct configs

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
@houko houko merged commit aa58229 into main Apr 2, 2026
3 checks passed
@houko houko deleted the fix/openrouter-routing branch April 2, 2026 15:41
Copy link
Copy Markdown

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

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: 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"),
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 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 👍 / 👎.

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