mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 22:15:33 +00:00
fix(proxy): support opt-in OpenAI reasoning shaping
This commit is contained in:
1 parent
288ee71c82
commit
8282ff68a1
4 files changed
+158
-10
No files matched your search
@@ -28,6 +28,20 @@ describe('resolveOpenAICompatProfileConfig', () => {
|
||||
expect(result?.insecure).toBe(true);
|
||||
});
|
||||
|
||||
it('supports opt-in reasoning payload shaping for opaque OpenAI-compatible model IDs', () => {
|
||||
const result = resolveOpenAICompatProfileConfig('gateway', '/tmp/gateway.settings.json', {
|
||||
ANTHROPIC_BASE_URL: 'https://gateway.example.com/v1',
|
||||
ANTHROPIC_AUTH_TOKEN: 'gateway-token',
|
||||
ANTHROPIC_MODEL: 'b3f9a2c7e8d14f60',
|
||||
CCS_DROID_PROVIDER: 'generic-chat-completion-api',
|
||||
CCS_OPENAI_REASONING_MODEL: 'yes',
|
||||
});
|
||||
|
||||
expect(result).not.toBeNull();
|
||||
expect(result?.provider).toBe('generic-chat-completion-api');
|
||||
expect(result?.forceOpenAIReasoningModel).toBe(true);
|
||||
});
|
||||
|
||||
it('ignores Anthropic-compatible profiles', () => {
|
||||
const result = resolveOpenAICompatProfileConfig('glm', '/tmp/glm.settings.json', {
|
||||
ANTHROPIC_BASE_URL: 'https://api.z.ai/api/anthropic',
|
||||
|
||||
Reference in new issue
Block a user