mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-15 18:15:40 +00:00
feat(cliproxy): add xAI Grok provider
This commit is contained in:
1 parent
1b67c7840b
commit
54a2b4759b
37 files changed
+510
-54
No files matched your search
@@ -94,12 +94,20 @@ describe('ProfileDetector', () => {
|
||||
});
|
||||
|
||||
it('should detect newly added cliproxy providers', () => {
|
||||
expect(detector.detectProfileType('xai').provider).toBe('xai');
|
||||
expect(detector.detectProfileType('gitlab').provider).toBe('gitlab');
|
||||
expect(detector.detectProfileType('codebuddy').provider).toBe('codebuddy');
|
||||
expect(detector.detectProfileType('kilo').provider).toBe('kilo');
|
||||
expect(detector.detectProfileType('qoder').provider).toBe('qoder');
|
||||
});
|
||||
|
||||
it('should resolve the grok CLI alias to canonical xai routing', () => {
|
||||
const result = detector.detectProfileType('grok');
|
||||
expect(result.type).toBe('cliproxy');
|
||||
expect(result.name).toBe('xai');
|
||||
expect(result.provider).toBe('xai');
|
||||
});
|
||||
|
||||
it('should detect settings-based profile from unified config', () => {
|
||||
const settingsPath = path.join(tempDir, 'glm.settings.json');
|
||||
fs.writeFileSync(settingsPath, JSON.stringify({ env: { ANTHROPIC_MODEL: 'glm-4' } }));
|
||||
|
||||
Reference in new issue
Block a user