Show DeepSeek Platform usage with cost summary#2270
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 4:41 PM ET / 20:41 UTC. Summary Reproducibility: no. live current-main reproduction was established here; source inspection gives a high-confidence configuration path where Cost summary is enabled and the former explicit extras opt-in is disabled. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep DeepSeek Platform usage behind explicit browser-session consent; after product approval, either preserve the existing opt-in or add a clearly worded DeepSeek-specific consent path with migration and fresh-install and upgrade coverage. Do we have a high-confidence way to reproduce the issue? No live current-main reproduction was established here; source inspection gives a high-confidence configuration path where Cost summary is enabled and the former explicit extras opt-in is disabled. Is this the best way to solve the issue? No. The display goal is reasonable, but repurposing a generic persisted Cost summary setting as consent for a private Chrome-session probe is not the narrowest safe solution without approved migration semantics. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7f8d33f8451c. Label changesLabel justifications:
Evidence reviewedSecurity concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (3 earlier review cycles)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 482bc03c02
ℹ️ 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".
| override.provider == provider | ||
| else { return true } | ||
| guard provider == .deepseek else { return settings.showOptionalCreditsAndExtraUsage } | ||
| guard settings.costUsageEnabled, settings.showOptionalCreditsAndExtraUsage else { return false } |
There was a problem hiding this comment.
Stop gating DeepSeek cost usage on extras
When DeepSeek's Cost summary is set to Inline/Submenu/Both but "Show credits & extra usage" is off, this guard still returns false, so ProviderFetchContext.includeOptionalUsage is false and DeepSeekProviderDescriptor.loadUsage skips importing/fetching the Platform usage summary. That leaves the new cost-summary chart and notes unavailable even though Cost summary is enabled, which preserves the user-facing failure this change is meant to move away from; the DeepSeek branch should key off the Cost summary setting and active-account check, not the extras toggle.
Useful? React with 👍 / 👎.
|
Maintainer verification complete.
Live DeepSeek account verification was unavailable; no real session or credentials were used. Merged as 92362b1. |
Summary
Why
DeepSeek detailed Platform data is cost and token usage, but its rendering did not follow the Cost summary setting. Users could authenticate successfully and see their balance while the available usage chart remained hidden.
This is a follow-up to #2135.
Consent boundary
DeepSeek detailed usage continues to use the existing selected Chrome session. Both a non-Off Cost summary option and Show credits & extra usage are required to run that Platform usage probe and show its cost and token data inline. Turning either setting off disables detailed usage. Balance and sign-in guidance remain independent.
Validation
swift test --filter MenuCardDeepSeekTests(9 tests passed)swift test --filter ProviderSettingsDescriptorTests(36 tests passed)make check(format and lint clean)Live DeepSeek account verification was unavailable for the maintainer review. Endpoint and source audit confirmed the existing official
api.deepseek.comandplatform.deepseek.comsurfaces remain unchanged.