feat(ai): add OpenRouter provider recipe#1210
Closed
davemorin wants to merge 1 commit into
Closed
Conversation
a4f97aa to
f756f2b
Compare
6 tasks
Owner
|
Thank you, @davemorin! Cherry-picked and shipped as #1246 (v0.37.4.0). Master had moved past the base your PR was opened against (v0.37.0 → v0.37.3 shipped in between), so I extracted the OpenRouter additions onto current master and folded in corrections from a Codex outside-voice review:
You're credited in the CHANGELOG + the recipe-add commit message. Closing this one in favor of #1246. Thanks again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add OpenRouter as a first-class OpenAI-compatible provider recipe.
This lets users configure
openrouter:<model-id>directly instead of routing through LiteLLM when they already have an OpenRouter key. The recipe covers:openrouter:openai/text-embedding-3-smallby defaultOPENROUTER_API_KEYauth with optionalOPENROUTER_BASE_URLVerification
bun test test/ai/recipe-openrouter.test.tsbun test test/ai/recipes-existing-regression.test.tsbun test test/ai/gateway-chat.test.tsbun test test/ai/no-batch-cap-suppression.serial.test.tsbun test test/aibun run typecheckbun run src/cli.ts providers env openrouterOPENROUTER_API_KEY=fake bun run src/cli.ts providers listRisk
Low. This adds a new static recipe and registry entry without changing existing provider behavior. Existing auth regression tests still pass.