Update footer test for big-pickle BYOK fallback.

This commit is contained in:
Colin McDonnell
2026-05-22 16:06:50 +00:00
committed by pullfrog[bot]
parent 7c5ed7add0
commit 58e5b74cb8
4 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -4,17 +4,17 @@ import { buildPullfrogFooter } from "./buildPullfrogFooter.ts";
describe("buildPullfrogFooter — fallbackFrom annotation", () => {
it("renders the provider display name when fallbackFrom is set", () => {
const footer = buildPullfrogFooter({
model: "opencode/minimax-m2.5-free",
model: "opencode/big-pickle",
fallbackFrom: "anthropic/claude-opus",
});
expect(footer).toContain(
"Using `MiniMax M2.5` (free) (credentials for Anthropic not configured)"
"Using `Big Pickle` (free) (credentials for Anthropic not configured)"
);
});
it("works for OpenAI's display name too", () => {
const footer = buildPullfrogFooter({
model: "opencode/minimax-m2.5-free",
model: "opencode/big-pickle",
fallbackFrom: "openai/gpt",
});
expect(footer).toContain("(credentials for OpenAI not configured)");
@@ -22,7 +22,7 @@ describe("buildPullfrogFooter — fallbackFrom annotation", () => {
it("falls back to the raw provider key when the slug provider is unknown to the catalog", () => {
const footer = buildPullfrogFooter({
model: "opencode/minimax-m2.5-free",
model: "opencode/big-pickle",
fallbackFrom: "some-unknown/model",
});
expect(footer).toContain("(credentials for some-unknown not configured)");
+2 -3
View File
@@ -4,15 +4,14 @@ import { hasProviderKey } from "./apiKeys.ts";
* Slug we fall back to when a BYOK-required model is configured but the
* runner has no provider key in env. Picked because it's free
* (`isFree: true`, `envVars: []` — see `action/models.ts`), stable, and
* currently the strongest free OpenCode model in the catalog. If a
* smarter free model is added later, update this single constant.
* currently served by OpenCode Zen without a key.
*
* The slug is intentionally hard-coded and not a config knob — the
* fallback is a safety net, not a user-facing preference, and adding a
* config surface here would just push the same "what to fall back to"
* decision into another setting that goes stale the same way.
*/
export const FREE_FALLBACK_SLUG = "opencode/minimax-m2.5-free";
export const FREE_FALLBACK_SLUG = "opencode/big-pickle";
export type FallbackDecision = { fallback: false } | { fallback: true; from: string; to: string };