mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 18:18:21 +00:00
fix(codex): normalize native cliproxy tuning aliases (#1254)
This commit is contained in:
1 parent
53730c0165
commit
609bed0c39
5 files changed
+174
-14
No files matched your search
@@ -747,6 +747,36 @@ process.exit(0);
|
||||
]);
|
||||
});
|
||||
|
||||
it('normalizes ccsxp native 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-high-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);
|
||||
expect(readLoggedCodexCalls(codexArgsLogPath)).toEqual([
|
||||
['--config', 'model_provider="cliproxy"', 'fix failing tests'],
|
||||
]);
|
||||
const codexConfig = fs.readFileSync(path.join(codexHome, 'config.toml'), 'utf8');
|
||||
expect(codexConfig).toContain('model = "gpt-5.5"');
|
||||
expect(codexConfig).toContain('model_reasoning_effort = "high"');
|
||||
expect(codexConfig).toContain('service_tier = "priority"');
|
||||
expect(codexConfig).toContain('[model_providers.cliproxy]');
|
||||
expect(codexConfig).not.toContain('gpt-5.5-high-fast');
|
||||
});
|
||||
|
||||
it('loads the configured cliproxy provider env_key for ccsxp launches', () => {
|
||||
if (process.platform === 'win32') return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user