fix(ci): suppress bearer auth for Azure API keys

This commit is contained in:
Yichen Jiang
2026-07-19 14:10:47 +08:00
parent 39dea6107e
commit fc478d675c
2 changed files with 5 additions and 2 deletions

View File

@@ -176,7 +176,7 @@ describe('PiAiAdapter provider routing', () => {
provider: 'openai',
apiKey: 'test-key',
baseURL: `${server.url}/api/projects/openai/openai/v1`,
headers: { 'api-key': 'test-key' },
headers: { 'api-key': 'test-key', Authorization: '' },
maxRetries: 0,
}],
})
@@ -184,6 +184,7 @@ describe('PiAiAdapter provider routing', () => {
expect(result.finish.kind).toBe('error')
expect(server.paths).toEqual(['/api/projects/openai/openai/v1/responses'])
expect(server.headers[0]?.['api-key']).toBe('test-key')
expect(server.headers[0]?.authorization).toBe('')
})
it.each([

View File

@@ -23,7 +23,9 @@ const providerCases: ProviderCase[] = [
provider: 'openai',
api: 'openai-responses',
model: process.env.DSH_PI_AI_OPENAI_MODEL ?? 'gpt-5.5',
...azureOpenAIKey ? { apiKey: azureOpenAIKey, headers: { 'api-key': azureOpenAIKey } } : {},
...azureOpenAIKey
? { apiKey: azureOpenAIKey, headers: { 'api-key': azureOpenAIKey, Authorization: '' } }
: {},
...openAIBaseURL ? { baseURL: openAIBaseURL } : {},
},
{