perf: request low reasoning effort for OpenAI agents
This commit is contained in:
@@ -48,7 +48,7 @@ describe('managed A-Copilot backend', () => {
|
||||
await provider.complete({ provider: 'A_COPILOT', model: 'ignored', apiKey: 'ignored', endpointUrl: 'https://untrusted.test', system: 'agent instructions', json: true, messages: [{ role: 'user', content: 'test' }] });
|
||||
expect(fetchMock.mock.calls[0][0]).toBe('https://api.openai.com/v1/chat/completions');
|
||||
expect(fetchMock.mock.calls[0][1].headers.Authorization).toBe('Bearer shared-openai-key');
|
||||
expect(JSON.parse(fetchMock.mock.calls[0][1].body)).toMatchObject({ model: 'gpt-6-astra', response_format: { type: 'json_object' }, messages: [{ role: 'system', content: 'agent instructions' }, { role: 'user', content: 'test' }] });
|
||||
expect(JSON.parse(fetchMock.mock.calls[0][1].body)).toMatchObject({ model: 'gpt-6-astra', reasoning_effort: 'low', response_format: { type: 'json_object' }, messages: [{ role: 'system', content: 'agent instructions' }, { role: 'user', content: 'test' }] });
|
||||
});
|
||||
|
||||
it('never falls back to a different server provider when its configured key is missing', async () => {
|
||||
|
||||
Reference in New Issue
Block a user