fix(proxy): detect dashscope compatible-mode profiles

This commit is contained in:
Tam Nhu Tran committed 2026-04-14 23:49:34 -04:00
1 parent 7b64852495
commit a6aa576d5a
3 files changed
+28 -6

No files matched your search

+13
View File
@@ -37,4 +37,17 @@ describe('resolveOpenAICompatProfileConfig', () => {
expect(result).toBeNull();
});
it('prefers OpenAI-compatible URL inference over stale anthropic provider hints', () => {
const result = resolveOpenAICompatProfileConfig('q', '/tmp/q.settings.json', {
ANTHROPIC_BASE_URL: 'https://dashscope-us.aliyuncs.com/compatible-mode/v1',
ANTHROPIC_AUTH_TOKEN: 'q-token',
ANTHROPIC_MODEL: 'qwen3.6-plus',
CCS_DROID_PROVIDER: 'anthropic',
});
expect(result).not.toBeNull();
expect(result?.provider).toBe('generic-chat-completion-api');
expect(result?.model).toBe('qwen3.6-plus');
});
});