feat: AK optional

This commit is contained in:
Simon
2026-03-19 19:50:05 +08:00
parent bdf79b7c10
commit fe82b11285
14 changed files with 30 additions and 102 deletions

View File

@@ -50,7 +50,7 @@ export class OpenAIClient implements LLMClient {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${this.config.apiKey}`,
...(this.config.apiKey && { Authorization: `Bearer ${this.config.apiKey}` }),
},
body: JSON.stringify(requestBody),
signal: abortSignal,