Skip to content

Commit 691cf5c

Browse files
committed
fix(core): disable qwen json response format
1 parent 296545f commit 691cf5c

2 files changed

Lines changed: 5 additions & 16 deletions

File tree

packages/core/src/ai-model/models/qwen.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import type {
99
ChatCompletionParamsResult,
1010
ModelAdapterDefinition,
1111
} from './types';
12-
import { isLocateIntent } from './utils/intent';
1312

1413
const defaultBboxSize = 20;
1514

@@ -68,9 +67,11 @@ const buildQwenChatCompletionParams = (
6867

6968
// Alibaba Cloud Model Studio JSON mode:
7069
// https://help.aliyun.com/zh/model-studio/json-mode
71-
if (isLocateIntent(input.intent)) {
72-
commonOverrideConfig.response_format = { type: 'json_object' };
73-
}
70+
// Observed in qwen3.6 grounding runs: enabling this can make the model
71+
// return only ["bbox_2d"] without coordinates.
72+
// if (isLocateIntent(input.intent)) {
73+
// commonOverrideConfig.response_format = { type: 'json_object' };
74+
// }
7475

7576
const modelSpecificConfig: Record<string, unknown> = {};
7677

packages/core/tests/unit-test/model-adapter/qwen.test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -298,18 +298,6 @@ describe('qwen model adapter', () => {
298298
});
299299
});
300300

301-
it('uses json_object response format for qwen3 locate intent', () => {
302-
const qwen3VlResult =
303-
qwen3VlAdapter.chatCompletion.buildChatCompletionParams({
304-
intent: 'default',
305-
userConfig: {},
306-
});
307-
308-
expect(qwen3VlResult.config.response_format).toEqual({
309-
type: 'json_object',
310-
});
311-
});
312-
313301
it('normalizes actual-pixel bbox coordinates for qwen2.5-vl', () => {
314302
const locateAdapter = qwen25Adapter.locate;
315303
expect(locateAdapter.kind).toBe('standard');

0 commit comments

Comments
 (0)