Repository navigation
fix(api): treat cx/* and codex/* as equivalent API-key model permissions - #8805
Merged
diegosouzapw merged 1 commit intoJul 28, 2026
Conversation
Dashboard Codex restrictions use the public cx/ alias while /v1/responses normalizes bare Codex IDs to codex/, so allow/block checks falsely 403'd. Expand permission candidates via the provider registry alias map. Closes cheaper-inference#8803
diegosouzapw
merged commit Jul 28, 2026
3e6684e
into
cheaper-inference:release/v3.8.49
5 checks passed
diegosouzapw
added a commit
that referenced
this pull request
Jul 28, 2026
…0 test file-size: apiKeys.ts 1518 -> 1529 (#8805, treating cx/* and codex/* as equivalent provider prefixes in API-key model permissions) and chatCore.ts 5006 -> 5020 (#8806, passing the real response payload into plugin onResponse hooks instead of a hardcoded {status:200}). Both extend existing call sites rather than adding a branch. stryker: account-fallback-cf1010-no-retry-8775.test.ts covers accountFallback.ts but was missing from tap.testFiles, which would redden Fast Quality Gates on every subsequent PR.
Merged
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
…ons (cheaper-inference#8805) Dashboard Codex restrictions use the public cx/ alias while /v1/responses normalizes bare Codex IDs to codex/, so allow/block checks falsely 403'd. Expand permission candidates via the provider registry alias map. Closes cheaper-inference#8803
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
…0 test file-size: apiKeys.ts 1518 -> 1529 (cheaper-inference#8805, treating cx/* and codex/* as equivalent provider prefixes in API-key model permissions) and chatCore.ts 5006 -> 5020 (cheaper-inference#8806, passing the real response payload into plugin onResponse hooks instead of a hardcoded {status:200}). Both extend existing call sites rather than adding a branch. stryker: account-fallback-cf1010-no-retry-8775.test.ts covers accountFallback.ts but was missing from tap.testFiles, which would redden Fast Quality Gates on every subsequent PR.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…ons (cheaper-inference#8805) Dashboard Codex restrictions use the public cx/ alias while /v1/responses normalizes bare Codex IDs to codex/, so allow/block checks falsely 403'd. Expand permission candidates via the provider registry alias map. Closes cheaper-inference#8803
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…0 test file-size: apiKeys.ts 1518 -> 1529 (cheaper-inference#8805, treating cx/* and codex/* as equivalent provider prefixes in API-key model permissions) and chatCore.ts 5006 -> 5020 (cheaper-inference#8806, passing the real response payload into plugin onResponse hooks instead of a hardcoded {status:200}). Both extend existing call sites rather than adding a branch. stryker: account-fallback-cf1010-no-retry-8775.test.ts covers accountFallback.ts but was missing from tap.testFiles, which would redden Fast Quality Gates on every subsequent PR.
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
cx/alias, while/v1/responsesnormalizes bare Codex model IDs tocodex/before API-key permission checks.getModelPermissionCandidatesvia the provider registry alias map socx/*andcodex/*match for bothallowedModelsandblockedModels.Closes #8803
Test plan
node --import tsx/esm --test tests/unit/db-apiKeys-crud.test.tsnode --import tsx/esm --test tests/unit/apikeys-model-permissions-split.test.tscx/gpt-5.6-terrain the Dashboard, thenPOST /v1/responseswith baregpt-5.6-terra(orcodex/gpt-5.6-terra) and confirm 200 instead of 403openai/gpt-5.6-terraremains denied when onlycx/gpt-5.6-terra*is allowed