Repository navigation
fix(providers): route OrcaRouter chat requests to /v1/chat/completions - #11923
Merged
diegosouzapw merged 2 commits intoAug 30, 2026
Conversation
The OrcaRouter registry baseUrl was the bare API root "https://api.orcarouter.ai/v1". DefaultExecutor.buildUrl returns baseUrl verbatim for this provider, so chat requests were POSTed to /v1 and rejected upstream with 404 "Invalid URL (POST /v1)". Align with every other OpenAI-format registry entry, which carries the full /chat/completions path in baseUrl. Model discovery is unaffected: the discovery route strips /chat/completions and /v1 before re-deriving /v1/models, so it resolves to the same endpoint.
diegosouzapw
merged commit Aug 30, 2026
2201143
into
cheaper-inference:release/v3.8.51
3 checks passed
5 tasks
diegosouzapw
added a commit
that referenced
this pull request
Aug 30, 2026
…11923) (#12118) #11923 (2201143) deliberately routes OrcaRouter chat requests to https://api.orcarouter.ai/v1/chat/completions; the golden snapshot in tests/unit/provider-translate-path-golden.test.ts still pinned /v1, so Unit Tests fast-path (2/4) is red on the release tip for every PR. Regenerated with UPDATE_GOLDEN=1 — the only delta is the orcarouter block. Refs #11923
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
cheaper-inference#11923) Boarded with 8 other PRs in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles, check-native-deps all green. Retargeted from main to release/v3.8.51. One-line baseUrl fix with a live endpoint probe documenting the exact 404→401 transition — solid verification. Thanks.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…heaper-inference#11923) (cheaper-inference#12118) cheaper-inference#11923 (3e1e063) deliberately routes OrcaRouter chat requests to https://api.orcarouter.ai/v1/chat/completions; the golden snapshot in tests/unit/provider-translate-path-golden.test.ts still pinned /v1, so Unit Tests fast-path (2/4) is red on the release tip for every PR. Regenerated with UPDATE_GOLDEN=1 — the only delta is the orcarouter block. Refs cheaper-inference#11923
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.
Problem
Chat requests routed to the
orcarouterprovider fail with:Root cause
The OrcaRouter registry entry set
baseUrlto the bare API roothttps://api.orcarouter.ai/v1. For this provider (executor: "default",format: "openai"),DefaultExecutor.buildUrlreturnsbaseUrlverbatim (nothing is appended when there is no per-request override and nourlSuffix), so chat requests are POSTed to the API root and the upstream rejects them with404 Invalid URL (POST /v1). Every other OpenAI-format registry entry carries the full/chat/completionspath inbaseUrl; OrcaRouter was the outlier.Fix
Verification
POST https://api.orcarouter.ai/v1returns404 Invalid URL (POST /v1);POST https://api.orcarouter.ai/v1/chat/completionsreturns401 Invalid API key(route exists and accepts the request; only the key is rejected).src/app/api/providers/[id]/models/route.tsstrips/chat/completionsand/v1before re-deriving/v1/models, so both the old and newbaseUrlresolve to the samehttps://api.orcarouter.ai/v1/models.npm run build) passes.