Skip to content

Commit 41ae6cb

Browse files
authored
chore: Set the LLM client's global host value to the provided API URL in CLI environment (#1928)
chore: Set the LLM client's global host value to the provided API URL in the CLI environment
1 parent 42c4dfc commit 41ae6cb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/cli/lib/charm.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { CharmsController } from "@commontools/charm/ops";
88
import { join } from "@std/path";
99
import { isVNode, type VNode } from "@commontools/html";
1010
import { FileSystemProgramResolver } from "@commontools/js-runtime";
11+
import { setLLMUrl } from "@commontools/llm";
1112

1213
export interface EntryConfig {
1314
mainPath: string;
@@ -42,6 +43,7 @@ async function makeSession(config: SpaceConfig): Promise<Session> {
4243
}
4344

4445
export async function loadManager(config: SpaceConfig): Promise<CharmManager> {
46+
setLLMUrl(config.apiUrl);
4547
const session = await makeSession(config);
4648
// Use a const ref object so we can assign later while keeping const binding
4749
const charmManagerRef: { current?: CharmManager } = {};

0 commit comments

Comments
 (0)