Skip to content

fix(models): price cliproxy-gateway routed ids as the models they wrap - #1439

Merged
iamtoruk merged 2 commits into
mainfrom
pr1364-rebased
Sep 15, 2026
Merged

iamtoruk merged 2 commits into
mainfrom
pr1364-rebased

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

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.

ozymandiashh and others added 2 commits September 15, 2026 09:59
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.
@iamtoruk
iamtoruk merged commit 954bfe3 into main Sep 15, 2026
20 checks passed
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.

2 participants