Commit Graph

26 Commits

Author SHA1 Message Date
Gaurav Ghosh
e75c7418d4 fix: use vi.restoreAllMocks and toMatchSnapshot in dialog tests
- OverageMenuDialog.test.tsx: add afterEach with vi.restoreAllMocks(),
  remove RadioButtonSelect mock, use renderWithProviders + toMatchSnapshot
  for rendering tests and keyboard input for handler tests
- EmptyWalletDialog.test.tsx: same treatment as OverageMenuDialog
- useQuotaAndFallback.test.ts: vi.clearAllMocks() → vi.restoreAllMocks()
  in afterEach to prevent test pollution
2026-02-27 07:39:55 -08:00
Gaurav Ghosh
6836f0e1b2 feat: implement G1 AI credits overage flow with billing telemetry
Adds end-to-end support for Google One AI credits in quota exhaustion flows:

- New billing module (packages/core/src/billing/) with credit balance
  checking, overage strategy management, and G1 URL construction
- OverageMenuDialog and EmptyWalletDialog UI components for quota
  exhaustion with credit purchase options
- Credits flow handler extracted to creditsFlowHandler.ts with overage
  menu, empty wallet, and auto-use-credits logic
- Server-side credit tracking: enabledCreditTypes on requests,
  consumed/remaining credits from streaming responses
- Billing telemetry events (overage menu shown, option selected, credits
  used, credit purchase click, API key updated)
- OpenTelemetry metrics for overage option and credit purchase counters
- Credit balance display in /stats command with refresh support
- Settings: general.overageStrategy (ask/always/never) for credit usage
- Error handling: INSUFFICIENT_G1_CREDITS_BALANCE as terminal error
  regardless of domain field presence
- Persistent info message after
2026-02-25 05:08:13 -08:00
Sehoon Shon
f97b04cc9a feat(models): support Gemini 3.1 Pro Preview and fixes (#19676) 2026-02-20 19:19:21 +00:00
Sehoon Shon
15ef1cd797 feat(cli): handle invalid model names in useQuotaAndFallback (#19222) 2026-02-16 19:55:17 +00:00
Spencer
6dae3a5402 Feature/quota visibility 16795 (#18203) 2026-02-10 02:53:10 +00:00
Sehoon Shon
61d92c4a21 Remove previewFeatures and default to Gemini 3 (#18414) 2026-02-06 18:02:57 +00:00
Gaurav
5fe328c56a Improve error messages on failed onboarding (#17357) 2026-01-26 14:31:19 +00:00
Gaurav
3b626e7c61 Add interactive ValidationDialog for handling 403 VALIDATION_REQUIRED errors. (#16231) 2026-01-21 00:23:01 +00:00
Adam Weidman
e34f0b4a98 fix: update currentSequenceModel when modelChanged (#17051) 2026-01-20 06:25:15 +00:00
N. Taylor Mullen
461c277bf2 Support for Built-in Agent Skills (#16045) 2026-01-10 06:26:58 +00:00
Christian Gunderman
c87d1aed4c Fix an issue where the agent stops prematurely (#16269) 2026-01-09 23:05:27 +00:00
Sehoon Shon
69fc75c0b2 do not persist the fallback model (#15483) 2025-12-26 16:08:44 +00:00
Tommaso Sciortino
bf90b59935 feat: launch Gemini 3 Flash in Gemini CLI ️ (#15196)
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
Co-authored-by: joshualitt <joshualitt@google.com>
Co-authored-by: Sehoon Shon <sshon@google.com>
Co-authored-by: Adam Weidman <65992621+adamfweidman@users.noreply.github.com>
Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com>
Co-authored-by: Jenna Inouye <jinouye@google.com>
2025-12-17 09:43:21 -08:00
Christian Gunderman
7f2d33458a Disallow unnecessary awaits. (#15172) 2025-12-17 05:28:18 +00:00
Sehoon Shon
d8a3d08f8e fallback to flash for TerminalQuota errors (#13791) 2025-11-25 21:17:22 +00:00
Shreya Keshive
86828bb561 feat: launch Gemini 3 in Gemini CLI 🚀🚀🚀 (in main) (#13287)
Co-authored-by: Adam Weidman <65992621+adamfweidman@users.noreply.github.com>
Co-authored-by: Sehoon Shon <sshon@google.com>
Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com>
Co-authored-by: Sandy Tao <sandytao520@icloud.com>
Co-authored-by: Abhi <43648792+abhipatel12@users.noreply.github.com>
Co-authored-by: Aishanee Shah <aishaneeshah@gmail.com>
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
Co-authored-by: Gal Zahavi <38544478+galz10@users.noreply.github.com>
Co-authored-by: Jacob Richman <jacob314@gmail.com>
Co-authored-by: joshualitt <joshualitt@google.com>
Co-authored-by: Jenna Inouye <jinouye@google.com>
2025-11-18 09:01:16 -08:00
Adam Weidman
1e42fdf6c2 fix(cli): handle flash model errors gracefully (#12667) 2025-11-06 22:13:38 +00:00
Sehoon Shon
31b34b11ab Let users know when falling back to flash, and update the error messa… (#12640) 2025-11-06 18:43:21 +00:00
Jacob Richman
54fa26ef0e Fix tests to wrap all calls changing the UI with act. (#12268) 2025-10-30 18:50:26 +00:00
Jacob Richman
13aa0148e7 Migrate tests to use avoid jsdom (#12118) 2025-10-28 17:32:15 +00:00
Jacob Richman
ee66732ad2 First batch of fixing tests to use best practices. (#11964) 2025-10-25 21:41:53 +00:00
Gaurav
ee92db7533 fix: handle request retries and model fallback correctly (#11624) 2025-10-24 18:09:06 +00:00
Gaurav
996c9f5955 Revert "fix: handle request retries and model fallback correctly" (#11164) 2025-10-14 23:30:59 +00:00
Gaurav
319f43fa23 fix: handle request retries and model fallback correctly (#9407) 2025-10-03 20:24:50 +00:00
Abhi
538e6cd19a feat(routing): Initialize model routing architecture (#8153) 2025-09-11 17:38:50 +00:00
Abhi
f6f2fff724 refactor: Centralize and improve model fallback handling (#7634) 2025-09-08 20:19:52 +00:00