Skip to content

feat: implement Google Agy quota provider and companion auth integration#130

Open
anthonyhaussman wants to merge 8 commits into
slkiser:mainfrom
anthonyhaussman:feat/tone/opencode-agy-auth
Open

feat: implement Google Agy quota provider and companion auth integration#130
anthonyhaussman wants to merge 8 commits into
slkiser:mainfrom
anthonyhaussman:feat/tone/opencode-agy-auth

Conversation

@anthonyhaussman

@anthonyhaussman anthonyhaussman commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduces the google-agy quota provider, enabling the system to fetch and display usage data from the Google Agy Code Assist API.

# Current returns:
> node dist/bin/opencode-quota.js show --provider google-agy
[Google Agy]
Claude and GPT models                           4d
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░    0% left
Gemini Models                                   3d
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░    1% left

Linked Issue

#125

OpenCode Validation

  • Current production released OpenCode version tested: 1.17.4
  • Why this version is relevant to the fix:

Quality Checklist

  • I ran pnpm run typecheck
  • I ran pnpm test
  • I ran pnpm run build
  • This is the smallest safe root-cause fix (no unnecessary hook/output mutation logic)
  • I preserved behavioral invariants and updated/added boundary tests as needed
  • I updated docs for user-facing workflow/command/config changes (README.md and CONTRIBUTING.md when applicable)
  • For new API-key/token providers, I started from contributing/provider-template/ or explained why the template does not apply
  • For provider setup/auth wording changes, I checked the relevant dummy .ts template in contributing/provider-template/ and verified README.md against src/lib/provider-metadata.ts (authentication/authFallbacks) and provider auth resolver/diagnostics behavior

Assisted-by: Gemini 3.5 Flash
Assisted-by: Gemini 3.5 Flash
Assisted-by: Gemini 3.5 Flash
Prioritize managed and quota project IDs across Agy, Gemini CLI, and
Google providers. Add activity request ID tracking to Agy quota
requests and update the user agent. Enhance display name formatting
to handle Claude version strings and support unlimited quota values.
Implement logic in the Google Agy provider to consolidate related model variants (e.g., Gemini 2.5, Claude 4.6) into canonical display groups. This reduces clutter by showing only the lowest remaining quota percentage for each family and filters out unsupported models.

Assisted-by: Gemini 3.1 Pro
@anthonyhaussman anthonyhaussman force-pushed the feat/tone/opencode-agy-auth branch from 62d6301 to 73081f5 Compare June 16, 2026 11:26
@anthonyhaussman anthonyhaussman marked this pull request as ready for review June 16, 2026 16:25
@slkiser

slkiser commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Will adopt after I start and review the README.

I’m not ready to fully kill off opencode-antigravity-auth, but Google is moving fast here and that Noe's plugin is not updating at the same pace. So opencode-agy-auth will briefly share the spotlight after some warnings via announcements.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants