diff --git a/src/components/HarnessWizard.tsx b/src/components/HarnessWizard.tsx index ee484645b..384fb9e24 100644 --- a/src/components/HarnessWizard.tsx +++ b/src/components/HarnessWizard.tsx @@ -671,8 +671,8 @@ const MODEL_PROVIDERS: { }, { key: "apiBase", - name: "API base URL", - helpText: "optional · the provider API endpoint", + name: "Custom API base URL", + helpText: "optional · leave blank to use the model provider's default endpoint", placeholder: "https://…", required: false, requiredError: "", diff --git a/src/handlers/harness/create/create.screen.test.tsx b/src/handlers/harness/create/create.screen.test.tsx index a446aaac7..d09189670 100644 --- a/src/handlers/harness/create/create.screen.test.tsx +++ b/src/handlers/harness/create/create.screen.test.tsx @@ -245,6 +245,8 @@ describe("harness create wizard", () => { await r.press("down"); // litellm await waitForText(r.lastFrame, "● litellm"); await r.press("return"); // focus the model id field + await waitForText(r.lastFrame, "Custom API base URL"); + expect(r.lastFrame()).toContain("leave blank to use the model provider's default endpoint"); await r.write("anthropic/claude-3-sonnet"); await r.press("return"); // api key arn — optional, leave empty await r.press("return"); // api base url — optional, leave empty diff --git a/src/handlers/project/HarnessModelField.tsx b/src/handlers/project/HarnessModelField.tsx index 737d37ac4..1a2536904 100644 --- a/src/handlers/project/HarnessModelField.tsx +++ b/src/handlers/project/HarnessModelField.tsx @@ -107,7 +107,7 @@ export function harnessModelSummary(values: HarnessModelValues): Record { await screen.press("return"); // LiteLLM is the one provider with an API base; its key is optional. - await waitForText(screen.lastFrame, "API base URL"); + await waitForText(screen.lastFrame, "Custom API base URL"); + expect(screen.lastFrame()).toContain( + "leave blank to use the model provider's default endpoint", + ); expect(screen.lastFrame()).toContain(`bedrock/${DEFAULT_HARNESS_MODEL.modelId}`); await screen.press("return"); // keep the default model ID await screen.press("return"); // no API key ARN @@ -247,7 +250,7 @@ describe("project add harness wizard", () => { await waitForText(screen.lastFrame, "this harness will be added to agentcore.json"); const review = flatFrame(screen.lastFrame); expect(review).toContain("provider litellm"); - expect(review).toContain("API base URL https://llm.example.com/v1"); + expect(review).toContain("Custom API base URL https://llm.example.com/v1"); expect(review).not.toContain("API key ARN"); await screen.press("return"); diff --git a/src/handlers/project/create/create.screen.test.tsx b/src/handlers/project/create/create.screen.test.tsx index d14879562..5573f5df8 100644 --- a/src/handlers/project/create/create.screen.test.tsx +++ b/src/handlers/project/create/create.screen.test.tsx @@ -345,7 +345,10 @@ describe("project create wizard", () => { const scrolled = await settledLines(); expect(scrolled[firstContentLine]).not.toBe(" choose a model provider"); expect(scrolled).toContain(" model ID"); - expect(scrolled).toContain(" API base URL"); + expect(scrolled).toContain(" Custom API base URL"); + expect(scrolled.join("\n")).toContain( + "leave blank to use the model provider's default endpoint", + ); // Moving back up to fields that are still visible does not shift the view. await r.press("up");