Added in proper checks for customer tiers in 429/Quota error messaging (#3863)

Co-authored-by: Ioannis Papapanagiotou <iduckhd@hotmail.com>
This commit is contained in:
Bryan Morgan
2025-07-11 11:25:30 -04:00
committed by GitHub
parent c9e1e6d3bd
commit cdbe2fffd9
5 changed files with 79 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ import {
ContentGeneratorConfig,
createContentGeneratorConfig,
} from '../core/contentGenerator.js';
import { UserTierId } from '../code_assist/types.js';
import { ToolRegistry } from '../tools/tool-registry.js';
import { LSTool } from '../tools/ls.js';
import { ReadFileTool } from '../tools/read-file.js';
@@ -323,6 +324,14 @@ export class Config {
return this.quotaErrorOccurred;
}
async getUserTier(): Promise<UserTierId | undefined> {
if (!this.geminiClient) {
return undefined;
}
const generator = this.geminiClient.getContentGenerator();
return await generator.getTier?.();
}
getEmbeddingModel(): string {
return this.embeddingModel;
}