Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions src/components/HarnessWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: "",
Expand Down
2 changes: 2 additions & 0 deletions src/handlers/harness/create/create.screen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/handlers/project/HarnessModelField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function harnessModelSummary(values: HarnessModelValues): Record<string,
provider: providerLabel(values.provider),
model: model.modelId,
...(model.apiKeyArn !== undefined && { "API key ARN": model.apiKeyArn }),
...(model.apiBase !== undefined && { "API base URL": model.apiBase }),
...(model.apiBase !== undefined && { "Custom API base URL": model.apiBase }),
};
}

Expand Down Expand Up @@ -159,8 +159,8 @@ function modelFields(provider: HarnessModelProvider): ModelField[] {
if (provider === "lite_llm") {
fields.push({
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: "",
Expand Down
7 changes: 5 additions & 2 deletions src/handlers/project/add/harness/harness.screen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ describe("project add harness wizard", () => {
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
Expand All @@ -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");

Expand Down
5 changes: 4 additions & 1 deletion src/handlers/project/create/create.screen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading