mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 10:18:14 +00:00
feat(api): add Alibaba Coding Plan preset and providers promotion
This commit is contained in:
1 parent
08eb46a5de
commit
8811e5320f
13 files changed
+226
-47
No files matched your search
@@ -2,6 +2,22 @@ import { describe, expect, it } from 'bun:test';
|
||||
import { getPresetById, isValidPresetId } from '../../../src/api/services/provider-presets';
|
||||
|
||||
describe('provider-presets', () => {
|
||||
it('resolves Alibaba Coding Plan preset id', () => {
|
||||
const preset = getPresetById('alibaba-coding-plan');
|
||||
expect(preset?.id).toBe('alibaba-coding-plan');
|
||||
expect(preset?.baseUrl).toBe('https://coding-intl.dashscope.aliyuncs.com/apps/anthropic');
|
||||
expect(preset?.defaultProfileName).toBe('alibaba-plan');
|
||||
});
|
||||
|
||||
it('resolves alibaba alias to Alibaba Coding Plan preset', () => {
|
||||
const preset = getPresetById('alibaba');
|
||||
expect(preset?.id).toBe('alibaba-coding-plan');
|
||||
});
|
||||
|
||||
it('treats alibaba alias as a valid preset id', () => {
|
||||
expect(isValidPresetId('alibaba')).toBe(true);
|
||||
});
|
||||
|
||||
it('resolves canonical km preset id', () => {
|
||||
const preset = getPresetById('km');
|
||||
expect(preset?.id).toBe('km');
|
||||
@@ -25,4 +41,9 @@ describe('provider-presets', () => {
|
||||
it('treats legacy kimi alias as a valid preset id', () => {
|
||||
expect(isValidPresetId('kimi')).toBe(true);
|
||||
});
|
||||
|
||||
it('uses non-reserved default profile name for qwen API preset', () => {
|
||||
const preset = getPresetById('qwen');
|
||||
expect(preset?.defaultProfileName).toBe('qwen-api');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user