mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 20:17:03 +00:00
feat: support minimal codex effort aliases
This commit is contained in:
1 parent
f0ad68d446
commit
6569eed15b
18 files changed
+204
-29
No files matched your search
@@ -218,6 +218,18 @@ supports_websockets = false
|
||||
const rawText = fs.readFileSync(configPath, 'utf8');
|
||||
expect(rawText).toContain('model = "gpt-5.5"');
|
||||
expect(rawText).toContain('model_reasoning_effort = "xhigh"');
|
||||
});
|
||||
|
||||
it('normalizes a native Codex minimal effort alias when adding the missing provider', async () => {
|
||||
fs.mkdirSync(codexHome, { recursive: true });
|
||||
fs.writeFileSync(configPath, 'model = "gpt-5.5-minimal"\n', 'utf8');
|
||||
|
||||
const result = await ensureCodexCliproxyProviderConfig(8317, env);
|
||||
|
||||
expect(result.changed).toBe(true);
|
||||
const rawText = fs.readFileSync(configPath, 'utf8');
|
||||
expect(rawText).toContain('model = "gpt-5.5"');
|
||||
expect(rawText).toContain('model_reasoning_effort = "minimal"');
|
||||
expect(rawText).toContain('[model_providers.cliproxy]');
|
||||
});
|
||||
|
||||
|
||||
@@ -819,6 +819,32 @@ process.exit(0);
|
||||
expect(codexConfig).not.toContain('gpt-5.5-high-fast');
|
||||
});
|
||||
|
||||
it('normalizes ccsxp native low Codex tuning aliases in config.toml', () => {
|
||||
if (process.platform === 'win32') return;
|
||||
|
||||
const codexHome = path.join(tmpHome, '.codex');
|
||||
fs.mkdirSync(codexHome, { recursive: true });
|
||||
fs.writeFileSync(path.join(codexHome, 'config.toml'), 'model = "gpt-5.5-low-fast"\n');
|
||||
|
||||
const result = runCcsxpAlias(['fix failing tests'], {
|
||||
...process.env,
|
||||
CI: '1',
|
||||
NO_COLOR: '1',
|
||||
HOME: tmpHome,
|
||||
CCS_HOME: tmpHome,
|
||||
CCS_CODEX_PATH: fakeCodexPath,
|
||||
CCS_TEST_CODEX_ARGS_OUT: codexArgsLogPath,
|
||||
CCS_TEST_CODEX_ENV_OUT: codexEnvLogPath,
|
||||
});
|
||||
|
||||
expect(result.status).toBe(0);
|
||||
const codexConfig = fs.readFileSync(path.join(codexHome, 'config.toml'), 'utf8');
|
||||
expect(codexConfig).toContain('model = "gpt-5.5"');
|
||||
expect(codexConfig).toContain('model_reasoning_effort = "low"');
|
||||
expect(codexConfig).toContain('service_tier = "priority"');
|
||||
expect(codexConfig).not.toContain('gpt-5.5-low-fast');
|
||||
});
|
||||
|
||||
it('loads the configured cliproxy provider env_key for ccsxp launches', () => {
|
||||
if (process.platform === 'win32') return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user