Skip to content

OpenAICUAClient.ts and AnthropicCUAClient.ts pass the whole clientOptions to the LLM constructor #644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/agent/OpenAICUAClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class OpenAICUAClient extends AgentClient {
(clientOptions?.apiKey as string) || process.env.OPENAI_API_KEY || "";
this.organization =
(clientOptions?.organization as string) || process.env.OPENAI_ORG;
this.baseURL = (clientOptions?.baseURL as string) || undefined;

// Get environment if specified
if (
Expand All @@ -57,6 +58,10 @@ export class OpenAICUAClient extends AgentClient {
apiKey: this.apiKey,
};

if (this.baseURL) {
this.clientOptions.baseURL = this.baseURL;
}

// Initialize the OpenAI client
this.client = new OpenAI(this.clientOptions);
}
Expand Down