Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17937e4ab0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if err = applyChannelServiceTierPricing(c, info, &priceData); err != nil { | ||
| logger.LogWarn(c, fmt.Sprintf("resolve service_tier pricing failed: %v", err)) | ||
| } |
There was a problem hiding this comment.
Recompute service-tier ratio after channel retry selection
Applying applyChannelServiceTierPricing here locks PriceData.ServiceTierRatio and QuotaToPreConsume to the channel chosen before request execution, but the retry path can switch channels later (getChannel + SetupContextForSelectedChannel in controller/relay.go) without rerunning pricing. If the fallback channel has different service_tier overrides or service_tier_ratios, both settlement and logs use the stale multiplier from the failed channel, causing incorrect billing on retried requests.
Useful? React with 👍 / 👎.
|
Closing this because the correct upstream PR is now open at QuantumNous#3482. |
Summary
Testing