Skip to content

Commit f0d0cb1

Browse files
committed
fix: allow bailian provider in resolveThinkingProfile
The thinking policy resolver only checked for 'vllm' provider, excluding 'bailian' (Alibaba Cloud) even when thinkingFormat was correctly set in compat. This prevented Bailian/Qwen models from using reasoning/thinking features. Adds bailian to isVllmQwenThinkingCompat in both: - src/agents/embedded-agent-runner/model.compat.ts - src/agents/model-selection-shared.ts Fixes #26037
1 parent d685037 commit f0d0cb1

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/agents/embedded-agent-runner/model.compat.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ export function resolveMergedConfiguredModelReasoning(params: {
6868
function isVllmQwenThinkingCompat(params: { provider: string; compat?: unknown }): boolean {
6969
const thinkingFormat = readCompatThinkingFormat(params.compat);
7070
return (
71-
normalizeProviderId(params.provider) === "vllm" &&
71+
(normalizeProviderId(params.provider) === "vllm" ||
72+
normalizeProviderId(params.provider) === "bailian") &&
7273
(thinkingFormat === "qwen" || thinkingFormat === "qwen-chat-template")
7374
);
7475
}

src/agents/model-selection-shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,7 @@ function isVllmQwenThinkingCompat(
14381438
compat?: { thinkingFormat?: unknown } | null,
14391439
): boolean {
14401440
return (
1441-
providerId === "vllm" &&
1441+
(providerId === "vllm" || providerId === "bailian") &&
14421442
(compat?.thinkingFormat === "qwen" || compat?.thinkingFormat === "qwen-chat-template")
14431443
);
14441444
}

0 commit comments

Comments
 (0)