mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-16 02:15:23 +00:00
fix(codex): normalize CLIProxy responses routes (#1605)
Normalize Codex Responses base URLs so CCS-backed Codex launches use /backend-api/codex on the original CLIProxy backend. Share the Codex Responses route builder with ccsxp provider repair, and repair stale native Codex provider auth blocks when env_key token injection is used.
This commit is contained in:
1 parent
36ea9064e7
commit
ba0e768fbf
6 files changed
+100
-23
No files matched your search
@@ -124,21 +124,26 @@ exit 0
|
||||
|
||||
const argsLog = fs.readFileSync(codexArgsLogPath, 'utf8');
|
||||
expect(argsLog).toContain('model_provider="ccs_runtime"');
|
||||
expect(argsLog).toContain('model_providers.ccs_runtime.base_url="http://127.0.0.1:8317/api/provider/codex"');
|
||||
expect(argsLog).toContain(
|
||||
'model_providers.ccs_runtime.base_url="http://127.0.0.1:8317/backend-api/codex"'
|
||||
);
|
||||
expect(argsLog).toContain('model_reasoning_effort="high"');
|
||||
expect(argsLog).not.toContain('mcp_servers.ccs_browser.command=');
|
||||
expect(argsLog).not.toContain('mcp_servers.ccs_browser.args=["-y","@playwright/mcp@0.0.70"]');
|
||||
expect(argsLog).toContain('smoke');
|
||||
expect(fs.readFileSync(codexEnvLogPath, 'utf8')).toBe('bridge-token');
|
||||
});
|
||||
}, 15000);
|
||||
|
||||
it('rejects native Codex profile flags when CCS manages the bridge runtime', () => {
|
||||
if (process.platform === 'win32') return;
|
||||
|
||||
const result = runCcs(['codex-api', '--target', 'codex', '--profile', 'other', 'smoke'], baseEnv);
|
||||
const result = runCcs(
|
||||
['codex-api', '--target', 'codex', '--profile', 'other', 'smoke'],
|
||||
baseEnv
|
||||
);
|
||||
|
||||
expect(result.status).toBe(1);
|
||||
expect(result.stderr).toContain('does not allow --profile/-p');
|
||||
expect(fs.existsSync(codexArgsLogPath)).toBe(false);
|
||||
});
|
||||
}, 15000);
|
||||
});
|
||||
Reference in new issue
Block a user