Skip to content
Open
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
7 changes: 5 additions & 2 deletions core/llm/fetchModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,11 @@ async function fetchGeminiModels(
): Promise<FetchedModel[]> {
const base = apiBase || "https://generativelanguage.googleapis.com/v1beta/";
const url = new URL("models", base);
url.searchParams.set("key", apiKey ?? "");
const response = await fetch(url);
const response = await fetch(url, {
headers: {
"x-goog-api-key": apiKey ?? "",
},
});
if (!response.ok) {
throw new Error(`Failed to fetch Gemini models: ${response.status}`);
}
Expand Down
6 changes: 3 additions & 3 deletions extensions/cli/src/smoke-api/smoke-api-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export async function cleanupSmokeContext(
}
}

// Override via SMOKE_MODEL env var. Falls back to claude-3-haiku which is
// widely available and cheap.
const SMOKE_MODEL = process.env.SMOKE_MODEL || "claude-3-haiku-20240307";
// Override via SMOKE_MODEL env var. Falls back to claude-haiku-4-5-20251001
// which is widely available and cost-effective.
const SMOKE_MODEL = process.env.SMOKE_MODEL || "claude-haiku-4-5-20251001";

/**
* Writes a YAML config that points at the real Anthropic API.
Expand Down
Loading