diff --git a/.changeset/short-pears-do.md b/.changeset/short-pears-do.md new file mode 100644 index 000000000..940ecbd5c --- /dev/null +++ b/.changeset/short-pears-do.md @@ -0,0 +1,5 @@ +--- +'@livekit/agents': patch +--- + +When using the `LLM.withAzure` method, the `apiKey` is redundant, but we need to set it to bypass the LLM's default apiKey check diff --git a/plugins/openai/src/llm.ts b/plugins/openai/src/llm.ts index b895937a1..0622a6a0d 100644 --- a/plugins/openai/src/llm.ts +++ b/plugins/openai/src/llm.ts @@ -100,6 +100,7 @@ export class LLM extends llm.LLM { return new LLM({ temperature: opts.temperature, user: opts.user, + apiKey: opts.apiKey, // this is redundant, but we need to set it to bypass the LLM's default apiKey check client: new AzureOpenAI(opts), }); }