mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +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:
parent
c9e1e6d3bd
commit
cdbe2fffd9
5 changed files with 79 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue