mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
feat: add yolo mode support to auto vision model switch (#652)
* feat: add yolo mode support to auto vision model switch * feat: add cli args & env variables for switch behavoir * fix: use dedicated model names and settings * docs: add vision model instructions * fix: failed test case * fix: setModel failure
This commit is contained in:
@@ -72,6 +72,19 @@ async function createMockConfig(
|
||||
} as unknown as ToolRegistry;
|
||||
|
||||
vi.spyOn(config, 'getToolRegistry').mockReturnValue(mockToolRegistry);
|
||||
|
||||
// Mock getContentGeneratorConfig to return a valid config
|
||||
vi.spyOn(config, 'getContentGeneratorConfig').mockReturnValue({
|
||||
model: DEFAULT_GEMINI_MODEL,
|
||||
authType: AuthType.USE_GEMINI,
|
||||
});
|
||||
|
||||
// Mock setModel method
|
||||
vi.spyOn(config, 'setModel').mockResolvedValue();
|
||||
|
||||
// Mock getSessionId method
|
||||
vi.spyOn(config, 'getSessionId').mockReturnValue('test-session');
|
||||
|
||||
return { config, toolRegistry: mockToolRegistry };
|
||||
}
|
||||
|
||||
|
||||
@@ -826,7 +826,7 @@ export class SubAgentScope {
|
||||
);
|
||||
|
||||
if (this.modelConfig.model) {
|
||||
this.runtimeContext.setModel(this.modelConfig.model);
|
||||
await this.runtimeContext.setModel(this.modelConfig.model);
|
||||
}
|
||||
|
||||
return new GeminiChat(
|
||||
|
||||
Reference in New Issue
Block a user