fix(ai): scoped antigravity quota blocks by model family

- Added CredentialRankingStrategy scope hooks so providers can rank and block only the limits relevant to the requested model.
- Scoped Antigravity usage reports by model family: Gemini/Gemma use Google counters, Claude uses Anthropic counters, and GPT/OpenAI models use OpenAI counters.
- Added scoped backoff keys so a Gemini quota block no longer suppresses healthy Claude/OpenAI Antigravity sessions on the same OAuth credential.
- Threaded modelId through coding-agent API-key resolvers and usage-limit rotation paths.
- Added regression coverage proving a Google/Gemini exhaustion block still allows Claude selection on the same credential.

Fixes #2198
This commit is contained in:
roboomp
2026-06-10 08:26:00 +02:00
committed by can1357
parent c546d98f34
commit 8c3149e5a9
19 changed files with 239 additions and 82 deletions
@@ -115,6 +115,7 @@ export async function generateCommitMessage(
apiKey: registry.resolver(candidate.model.provider, {
sessionId,
baseUrl: candidate.model.baseUrl,
modelId: candidate.model.id,
}),
maxTokens,
reasoning: toReasoningEffort(candidate.thinkingLevel),