Repository navigation
fix(models): price cliproxy-gateway routed ids as the models they wrap - #1439
Merged
Merged
Conversation
codex-cliproxy-gateway forwards only cliproxy/* ids to a local CLIProxyAPI, so routed Codex sessions record cliproxy/<id> model names, sometimes with a CLIProxyAPI provider path behind the wrapper (cliproxy/zcode/glm-5.3-flash). None of those match a pricing row, so the tokens were counted but the dollars were not, and the models table hides zero-cost rows — routed spend looked absent rather than unpriced. Peel the cliproxy/ wrapper like the other routing wrappers and treat zcode as a known vendor namespace so the provider path strips to its priced glm-* leaf. An unknown vendor behind the wrapper still fails closed.
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.
Rebase of #1364 by @ozymandiashh onto main, author's commit kept. Only CHANGELOG conflicted.
Testing
Synthetic Codex rollout with cliproxy ids: day total $8.75 to $24.07, unknown vendor behind the wrapper stays unpriced. cliproxy and zcode collide with no catalog namespace. models tests 244/244, tsc clean. No UI change.