mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user