Repository navigation
fix(logs): report resolved upstream model in egress audit rows - #864
Merged
Merged
Conversation
The log window's upstream-model column read ProxyRequest.model, which chat.ts fills with a *display* name: buildDisplayModelName() re-appends the -high / -fast suffixes parseModelName() had just stripped. Requests carrying a local suffix therefore advertised a model that was never requested upstream - gpt-6-high showed as gpt-6-astra-high while the wire saw gpt-6-astra. Route every egress audit row through upstreamModelOf(), which returns the resolved id the translation layer actually sent. No new suffix handling is introduced, so a model whose real id ends in an effort word is still reported verbatim. Ingress rows, the client-facing model echo, and reasoning-effort / fast-tier / routing behavior are unchanged. Refs #848
6 of 7 tasks
This was referenced Oct 21, 2026
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
Report the model ID actually sent upstream in egress audit and stream-close logs, rather than the client-facing display model with local processing suffixes. Replayed from PR #859 onto the latest
dev, preserving its configurable upstream path behavior.Changes
ProxyRequest.codexRequest.modelinsrc/routes/shared/proxy-handler-utils.ts.-high,-fast, unsuffixed, and legitimate upstream suffix cases; update the changelog.Test Plan
npm test(318 files passed, 5 skipped; 3,367 tests passed, 52 skipped)npm run build(web production build and TypeScript compilation)node_modules/.bin/tsc.cmd --noEmitgit diff --check origin/dev...HEADNotes
PR #859 remains open and was not merged. In the only cherry-pick conflict, retained
dev's configurableupstreamPathand applied the resolved-model logging change.Linked Issues
Refs #848; replaces #859.