Sync upstream through 8ef86077e - #98
Merged
Merged
Conversation
Crof removed subscription request quotas and now returns null requests_plan/usable_requests. Parse credits only and show the dollar balance as the primary usage window. Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
Add a separate xai provider for xAI developer-platform billing from the documented Management API (management key + team ID): prepaid credit balance from /prepaid/balance (inverted ledger in string USD cents; a 200 without a parseable total is an error, never $0.00) and a 30-day daily USD spend dashboard from /usage via the shared cost-history seam. History is best-effort enrichment - its failure keeps the balance while auth failures and cancellation escalate - and limitReached marks the window "(partial)" with estimated confidence instead of exact. No coupling to the Grok subscription provider. Covers descriptor, fetcher, settings reader/store, registries, config projection, widget and CLI switches, template icon with a Grok-distinctness test, docs, and fixture-based tests on stubbed transports. Moves ProviderIdentitySnapshot to its own file to hold the UsageFetcher length limit. (#1712)
The generic no-window providerCost fallback printed the prepaid balance as "Cost: 7.4 / 0.0", presenting money remaining as spend against a zero budget. Exclude xAI's balance-shaped providerCost from that fallback and add a dedicated Balance + spend-window line to the CLI text, card body, and card extras renderers, matching the Devin/MiMo balance-line pattern. Flagged by Codex review on #2472.
Route xAI through cleanPlanName so the CLI plan badge shows "Management API" instead of the .capitalized mangling "Management Api" seen in live verification on #2472. Document that the balance is the posted prepaid ledger: spend posts at billing-cycle close, so mid-cycle the ledger balance exceeds the Console's live remaining credit by the cycle's unposted spend, as confirmed on a real account.
…ded plan_family StepFun runs two Step Plan billing models side by side after the 2026-06-18 upgrade (docs/zh/step-plan/upgrade-notice): the grandfathered Coding Plan meters rolling 5-hour/weekly windows, while the current Token Plan meters a monthly Credit pool via plan_credit_rate_limit (its rate windows come back as 0 with reset_time "0"). isCreditPlan trusted plan_family == 2 first, so a windowed plan that ever reported plan_family=2 (or any future family-id change) would route to the credit renderer — dropping the real 5h/weekly windows and showing a bogus credit balance. Classify by the shape the payload actually carries (a live window reset time means Coding Plan; no window plus a Credit pool means Token Plan) and use plan_family only as a tie-breaker for an otherwise-ambiguous payload. Adds tests for the window-wins-over-family-id case and the ambiguous fallback. Verified live against a Token Plan account (still renders the credit balance).
- Add CurrencyExchange service with cross-currency conversion via open.er-api.com - 24h rate caching with hardcoded fallbacks for offline use - UsageFormatter: smart conversion methods (auto-follow provider vs explicit currency) - Settings: preferredCurrencyCode preference with Picker UI - Thread preferredCurrency through providerCostSection, ampCreditsLine, sakanaPayAsYouGoSection - Update MenuDescriptor, MenuCardView, MenuBarLayout cost paths - Add zh-Hans localization for currency_auto - Trigger rate fetch on app launch and settings change - 43 tests pass including cross-currency conversion tests
- Fix line_length violations by extracting cost variables - Fix multiline_parameters / multiline_arguments formatting - Fix unused_closure_parameter by restructuring closures - Fix function_body_length by extracting resolvePaceAndForecast helper - Fix nested string interpolation causing parse errors
Credits-only Crof windows have no duration, so a $0 balance was treated like a depleted session quota. Skip Crof in sessionQuotaWindow, cover depletion/top-up in the transition tests, and add Linux credits-only decoding proof. Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
Only skip session-quota transitions when Crof has no secondary quota window. Quota-backed Crof snapshots keep notification eligibility. Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
…ation Classify StepFun Coding vs Token Plan by payload shape, not a hard-coded plan_family
feat: multi-currency cost display with live exchange rates (Issue #2449)
Fix Claude scoped weekly pace
feat: add xAI platform billing provider
Fix Crof usage for PAYG credits-only API
…-tail-8ef86077-20260729 # Conflicts: # README.md # Scripts/check-site-locales.mjs # Sources/CodexBar/UsageStore+WidgetSnapshot.swift # Sources/CodexBarCore/Generated/CodexParserHash.generated.swift # Sources/CodexBarCore/UsageFetcher.swift # docs/cli-configuration.md # docs/configuration.md # docs/index.html # docs/llms.txt # docs/providers.md # docs/site-locales.mjs
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Owner
Author
|
Reviewed high-risk surfaces: provider/auth/quota accuracy, process/CLI/runtime configuration, mobile/widget/CloudKit sync compatibility, branding/release ownership, and validation coverage. QuotaKit adaptations and all local results are recorded in the PR body; required CI is now being monitored against exact head |
ColumbusLabs
force-pushed
the
automation/upstream-tail-8ef86077-20260729
branch
from
July 29, 2026 23:54
21d1bf6 to
cfb4d65
Compare
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.
Upstream range
ab31038ed8cf66a1231ef5f21a07e56a4037221a8ef86077e70ac27d45ddddaf49e409824ccdf668Review and QuotaKit adaptations
UPSTREAM_MONITOR_BASE;UPSTREAM_VERSIONremains v0.43.0.Validation
./Scripts/check_upstreams.sh— 0 commits beyond reviewed headgit diff --check— passedswift build— passedPARSER_LINT_BASE=origin/main ./Scripts/lint.sh lint— passed; 0 format changes, 0 lint violations, localization complete, public branding audit clean, provider palette 66/66make test— 798 selections, 67/67 groups passed first attempt, 0 retries, 0 timeoutsBuild numbers are unchanged.