-
Notifications
You must be signed in to change notification settings - Fork 625
fix(vision,telemetry): sync captions into the passthrough body and persist ordinary attempts #1139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0b72795
d3bea65
c7dddb2
90fa982
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1649,6 +1649,19 @@ async function handleResponsesInner( | |
| const adapterProvider = resolveWireProtocolOverride(route.providerName, route.modelId, route.provider, inboundWire); | ||
| const adapter = resolveAdapter(adapterProvider, config.cacheRetention); | ||
| logCtx.providerAdapter = adapter.name; | ||
| // Ordinary requests receive one durable attempt only after their final initial | ||
| // adapter is resolved. Combo children own their attempt and retries keep it. | ||
| if (!options.comboAttempt && !logCtx.activeAttempt) { | ||
| const attempt = beginRequestAttempt( | ||
| (logCtx.attempts?.length ?? 0) + 1, | ||
| logCtx.provider, | ||
| route.modelId, | ||
| adapter.name, | ||
| ); | ||
| logCtx.activeAttempt = attempt; | ||
| logCtx.activeAttemptStartedAt = Date.now(); | ||
| (logCtx.attempts ??= []).push(attempt); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Once every ordinary request gets this non-empty Useful? React with 👍 / 👎. |
||
| } | ||
| sealRequestAttemptIdentity(logCtx.activeAttempt, logCtx.provider, adapter.name); | ||
| const isPassthrough = "passthrough" in adapter && !!adapter.passthrough; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For OpenAI virtual models such as
gpt-5.6-sol-pro,applyOpenAiVirtualModelhas already rewrittenroute.modelIdto the wire model (gpt-5.6-sol) while retaining the selected model inlogCtx.model. Persisting the rewritten value here changes usage reporting becauseusageAttributionstreats any non-emptyattemptsarray as authoritative and ignores the top-level model/resolvedModel pair. Consequently, all newly logged ordinary Pro requests are grouped and priced as the base model instead of the selected Pro model. Preserve the selected model in the attempt (or carry selected/resolved identities separately and update the usage projection).Useful? React with 👍 / 👎.