mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
refactor: use qwen3.5-plus to replace vision-model
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
f90ed9efe9
commit
a55e96a6a3
14 changed files with 38 additions and 43 deletions
|
|
@ -62,7 +62,7 @@ describe('useVisionAutoSwitch helpers', () => {
|
|||
const result = shouldOfferVisionSwitch(
|
||||
parts,
|
||||
AuthType.QWEN_OAUTH,
|
||||
'vision-model',
|
||||
'qwen3.5-plus',
|
||||
true,
|
||||
);
|
||||
expect(result).toBe(false);
|
||||
|
|
@ -161,7 +161,7 @@ describe('useVisionAutoSwitch helpers', () => {
|
|||
const result = shouldOfferVisionSwitch(
|
||||
parts,
|
||||
AuthType.QWEN_OAUTH,
|
||||
'vision-model',
|
||||
'qwen3.5-plus',
|
||||
true,
|
||||
);
|
||||
expect(result).toBe(false);
|
||||
|
|
@ -526,7 +526,7 @@ describe('useVisionAutoSwitch hook', () => {
|
|||
it('does not switch in YOLO mode when already using vision model', async () => {
|
||||
const config = createMockConfig(
|
||||
AuthType.QWEN_OAUTH,
|
||||
'vision-model',
|
||||
'qwen3.5-plus',
|
||||
ApprovalMode.YOLO,
|
||||
);
|
||||
const onVisionSwitchRequired = vi.fn();
|
||||
|
|
@ -728,7 +728,7 @@ describe('useVisionAutoSwitch hook', () => {
|
|||
|
||||
expect(switchResult.shouldProceed).toBe(true);
|
||||
expect(switchResult.originalModel).toBe('qwen3-coder-plus');
|
||||
expect(config.setModel).toHaveBeenCalledWith('vision-model', {
|
||||
expect(config.setModel).toHaveBeenCalledWith('qwen3.5-plus', {
|
||||
reason: 'vision_auto_switch',
|
||||
context: 'Default VLM switch mode: once (one-time override)',
|
||||
});
|
||||
|
|
@ -764,7 +764,7 @@ describe('useVisionAutoSwitch hook', () => {
|
|||
|
||||
expect(switchResult.shouldProceed).toBe(true);
|
||||
expect(switchResult.originalModel).toBeUndefined(); // No original model for session switch
|
||||
expect(config.setModel).toHaveBeenCalledWith('vision-model', {
|
||||
expect(config.setModel).toHaveBeenCalledWith('qwen3.5-plus', {
|
||||
reason: 'vision_auto_switch',
|
||||
context: 'Default VLM switch mode: session (session persistent)',
|
||||
});
|
||||
|
|
@ -813,7 +813,7 @@ describe('useVisionAutoSwitch hook', () => {
|
|||
);
|
||||
const onVisionSwitchRequired = vi
|
||||
.fn()
|
||||
.mockResolvedValue({ modelOverride: 'vision-model' });
|
||||
.mockResolvedValue({ modelOverride: 'qwen3.5-plus' });
|
||||
const { result } = renderHook(() =>
|
||||
useVisionAutoSwitch(
|
||||
config,
|
||||
|
|
|
|||
|
|
@ -20,16 +20,23 @@ describe('availableModels', () => {
|
|||
describe('Qwen models', () => {
|
||||
const qwenModels = getFilteredQwenModels(true);
|
||||
|
||||
it('should include coder model', () => {
|
||||
const coderModel = qwenModels.find((m) => m.id === MAINLINE_CODER);
|
||||
it('should include default model (qwen3.5-plus)', () => {
|
||||
const defaultModel = qwenModels.find((m) => m.id === MAINLINE_CODER);
|
||||
expect(defaultModel).toBeDefined();
|
||||
expect(defaultModel?.id).toBe('qwen3.5-plus');
|
||||
});
|
||||
|
||||
it('should include coder-model as non-vision alternative', () => {
|
||||
const coderModel = qwenModels.find((m) => m.id === 'coder-model');
|
||||
expect(coderModel).toBeDefined();
|
||||
expect(coderModel?.isVision).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should include vision model', () => {
|
||||
it('should include vision model (qwen3.5-plus with vision capability)', () => {
|
||||
const visionModel = qwenModels.find((m) => m.id === MAINLINE_VLM);
|
||||
expect(visionModel).toBeDefined();
|
||||
expect(visionModel?.isVision).toBe(true);
|
||||
expect(visionModel?.id).toBe('qwen3.5-plus');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -197,8 +204,8 @@ describe('availableModels', () => {
|
|||
expect(isVisionModel(MAINLINE_VLM)).toBe(true);
|
||||
});
|
||||
|
||||
it('should return false for non-vision model', () => {
|
||||
expect(isVisionModel(MAINLINE_CODER)).toBe(false);
|
||||
it('should return false for coder-model (non-vision)', () => {
|
||||
expect(isVisionModel('coder-model')).toBe(false);
|
||||
});
|
||||
|
||||
it('should return false for unknown model', () => {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export type AvailableModel = {
|
|||
isVision?: boolean;
|
||||
};
|
||||
|
||||
export const MAINLINE_VLM = 'vision-model';
|
||||
export const MAINLINE_VLM = 'qwen3.5-plus';
|
||||
export const MAINLINE_CODER = DEFAULT_QWEN_MODEL;
|
||||
|
||||
const CACHED_QWEN_OAUTH_MODELS: AvailableModel[] = QWEN_OAUTH_MODELS.map(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue