Skip to content

fix(providers): correct Google, Copilot, and Doubao usage - #5291

Open
steipete wants to merge 1 commit into
mainfrom
triage/20260921-w72-providers-c
Open

steipete wants to merge 1 commit into
mainfrom
triage/20260921-w72-providers-c

Conversation

@steipete

@steipete steipete commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Google Developer Program can return a granted credit with no remaining amount, Copilot can report positive overage alongside a full unused quota, and Doubao's individual probe models have been retired. This fixes those response-handling failures while retaining existing account and authentication selection.

  • Google: show Not applied for an unclaimed monthly credit. Adopts @djbclark's fix(googledeveloper): show Not applied for a granted credit with no remaining amount #5146 with co-author credit; the fork denied the maintainer push despite reporting maintainer edits enabled.
  • Copilot: show Status: Unavailable for the demonstrated contradictory token-billing response. Valid zero and nonzero usage remain supported; no allowance or spend is inferred from overage.
  • Doubao: use the documented ark-code-latest Coding Plan alias and remove the retired-model retry loop. The existing ambiguous-zero confirmation remains.
  • Document @dreameta's community Volcengine balance plugin and its independent billing permissions. The plugin is linked, not bundled.

Validation used synthetic transport fixtures and isolated test stores. The new regressions failed against main before the fixes: Google threw the unrecognized-response error, Copilot exposed a zero-credit bar, and Doubao returned UnsupportedModel. The installed 0.85.0 config had these providers disabled with no saved credentials, so no live account usage probe was run.

source Scripts/test_environment.sh
swift test --build-system native --jobs 2 -Xswiftc -gnone --filter 'Copilot|Doubao|GoogleDeveloperPluginTests|BrowserCookiePromptContractTests|ProviderTriageScreenshotTests'
# 276 tests in 27 Swift Testing suites passed; temporary synthetic renderer passed.
swift test --build-system native --jobs 2 -Xswiftc -gnone --skip-build --filter 'Copilot|Doubao|GoogleDeveloperPluginTests|BrowserCookiePromptContractTests'
# 276 tests in 27 suites passed after removing the temporary renderer.
swift test --build-system native --jobs 2 -Xswiftc -gnone --filter DoubaoUsageFetcherTests
# 54 tests in 3 suites passed after the test-layout lint correction.
make check
# Done linting! Found 0 violations, 0 serious in 3258 files.

All heavy commands ran through the host build-slot wrapper. Catalog precheck and git diff --check are clean. Independent review found no actionable P0–P2 findings. The synthetic Copilot before/after captures were inspected and are retained locally for the maintainer; no proof artifacts are committed.

Production diff against main: 5 files, +52/-42 lines (net +10). Tests: +45 lines under Tests and +18 under TestsPlugin. Changelog bullets are supplied to the maintainer separately for the current release wave.

Fixes #5145
Fixes #5227
Fixes #5256
Closes #5178
Closes #5146

Treat unclaimed Google credits as Not applied, hide contradictory zero-use Copilot quotas when the same token-billed response reports overage, and probe Doubao with the documented Coding Plan alias. Link the separately installed Volcengine balance plugin with its billing permission requirements.

Adopts #5146 after the contributor fork rejected a maintainer push with HTTP 403 despite allowing maintainer edits.

Fixes #5145
Fixes #5227
Fixes #5256
Closes #5178
Closes #5146

Co-authored-by: Daniel JB Clark <djbclark@gmail.com>
@clawsweeper

clawsweeper Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

🦞👀
Pull request received.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-05T00:13:16.439033Z 210bf7c PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Dec 5, 2026
@clawsweeper

clawsweeper Bot commented Dec 5, 2026

Copy link
Copy Markdown

Codex review: passed.

What this changes

Correct Google unclaimed-credit handling, suppress contradictory Copilot usage meters, update Doubao’s probe model, and document a community balance plugin.

Example: Google returns an unclaimed $100 grant as [["USD",100],null,"",5,2].

  • Before: Refreshing fails with an unrecognized-response error.
  • After: The card shows Not applied and points to the benefits page.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why.
Proof confidence 🦐 gold shrimp (3/6) The reviewer assessed the terminal evidence as insufficient.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

The scores reflect the reviewer's assessment. Real behavior proof is not required for maintainer- or bot-authored pull requests.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users encounter a failed Google refresh, misleading unused Copilot quota, or failed Doubao refresh despite valid provider sessions or credentials.
Reason: Concrete reported failures justify the small repairs, and maintainer authorship establishes direction for the narrow Copilot suppression, Doubao replacement, and community documentation.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR repairs three documented provider failures still present on main, and the pinned diff has no actionable correctness or security findings.

Reviewed head: 210bf7c9efee26a66c441314e5bbfdb4c3f1d4f5

Before merge

None.

Findings

None.

Agent review details

How this fits together

Provider fetchers and the bundled Google plugin turn authenticated API responses into shared usage snapshots consumed by the menu card and CLI.

flowchart LR
  A[Existing provider credentials] --> B[Provider fetchers and Google plugin]
  C[Provider API responses] --> B
  B --> D[Response validation and mapping]
  D --> E[Shared usage snapshot]
  E --> F[Menu card and CLI]
Loading

Technical review

Best possible solution:

Land these focused response-handling repairs while retaining the existing account selection, allowance settings, and separate community-plugin boundary.

Do we have a high-confidence way to reproduce the issue?

The linked reports provide concrete failing responses and affected 0.85.0 behavior, and main’s parser, quota mapping, and retired probe list explain those failures without executing target code.

Is this the best way to solve the issue?

The changes repair the demonstrated inputs in existing production owners, preserve valid usage handling, and avoid adding billing credentials or another balance implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 44839248b5ba.

Provenance checked

  • Google unapplied-credit classification keeps the original intent (4d88d95: The provider established a non-error Not applied state for unclaimed monthly credits; this adds another observed encoding of that state.)
  • Copilot quota and credit presentation keeps the original intent (feat(copilot): add optional seat credit allowances #2647: Credit counters remain text unless a user supplies an allowance, while earlier quota repairs avoid fabricated usage; the new suppression addresses evidence that both zero counters and the legacy quota are unreliable.)
  • Doubao model fallback changes intended behavior with a stated reason (6eb3699: The original list accommodated model access differences between keys; the PR explicitly replaces retired IDs with the account-configured Coding Plan alias.)
  • Doubao ambiguous-zero confirmation keeps the original intent (a317098: Repeated successful zero-remaining responses cannot reliably establish exhaustion; the existing confirmation and cancellation behavior remain in use.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 9ea096e adds Sources/CodexBarCore/Providers/Copilot/CopilotUsageFetcher.swift:91 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9ea096edac67; files: Sources/CodexBarCore/Providers/Copilot/CopilotUsageFetcher.swift)
  • fatih akyon: Raw commit 4d88d95 adds Sources/CodexBarCore/Resources/Plugins/googledeveloper.ts:125 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4d88d9584d53; files: Sources/CodexBarCore/Resources/Plugins/googledeveloper.ts)
  • DanyITnerd: Raw commit 2edc439 adds Sources/CodexBarCore/Providers/Copilot/CopilotUsageFetcher.swift:190 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2edc439c21bb; files: Sources/CodexBarCore/Providers/Copilot/CopilotUsageFetcher.swift)
  • Zhongyue Lin: Raw commit a317098 adds Sources/CodexBarCore/Providers/Doubao/DoubaoUsageFetcher.swift:154 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a31709838797; files: Sources/CodexBarCore/Providers/Doubao/DoubaoUsageFetcher.swift)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production and regression scope Production +52/-42 lines; tests +63 lines Small changes in existing owners receive distinct regression coverage for each reported failure.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed December 4, 2026, 7:25 PM ET / December 5, 2026, 00:25 UTC.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

1 participant