diff --git a/.github/scripts/integration-governance.cjs b/.github/scripts/integration-governance.cjs index 2b3a06934f..dced6e68ad 100644 --- a/.github/scripts/integration-governance.cjs +++ b/.github/scripts/integration-governance.cjs @@ -9,7 +9,7 @@ const MAX_COMMITS = 1000; const MAX_AUTHOR_BATCH = 50; // This literal is inside the enrolled .github closure. A caller-supplied // preparedBy.sourceSHA must never choose a new executable verifier tree. -const TRUSTED_SCRIPTS_TREE = '78d89054cc569554b1066b2eb2e322a7f38c285a'; +const TRUSTED_SCRIPTS_TREE = 'c269cb813e67f341946dedd7ba9ab967a0530831'; const SOURCE = 'https://github.com/kubernetes-sigs/kubebuilder-release-tools/tree/012269a88fa4c034a0acf1ba84c26b195c0dbab4'; const sha = value => crypto.createHash('sha256').update(value).digest('hex'); const git = (args, cwd = process.cwd()) => diff --git a/changelog.d/fixed-18753-claude-fable-haiku-5-5-models.md b/changelog.d/fixed-18753-claude-fable-haiku-5-5-models.md new file mode 100644 index 0000000000..aa008b3b8b --- /dev/null +++ b/changelog.d/fixed-18753-claude-fable-haiku-5-5-models.md @@ -0,0 +1 @@ +- **The claude model dropdown now offers Fable 5.2, Fable 5.1, Haiku 5.5 and the `fable` alias, and their spend is priced exactly** ([#18753](https://github.com/hivecommons/hive/issues/18753)). The pinned Claude Code 2.1.326 accepts all four, but the dashboard's allowlist, its static fallback and the browser's first-paint list stopped at Fable 5 and Haiku 4.5, so a live Anthropic catalog that listed the newer models was cut back to the old ones. The price table gains Fable 5.2 ($8 in / $40 out, $0.20 cache read, $10 cache write) and Haiku 5.5 ($0.10 / $0.50, $0.01, $0.125) from Anthropic's pricing page, so their spend is no longer a tier guess. Haiku 5.5 is priced at its base rate for prompts up to 100,000 tokens; longer prompts bill higher and are undercounted. diff --git a/src/pkg/dashboard/cli_model_lists_9804_test.go b/src/pkg/dashboard/cli_model_lists_9804_test.go index b794c37bf9..e1a07d189a 100644 --- a/src/pkg/dashboard/cli_model_lists_9804_test.go +++ b/src/pkg/dashboard/cli_model_lists_9804_test.go @@ -1,6 +1,7 @@ package dashboard import ( + "net/http" "regexp" "strings" "testing" @@ -93,6 +94,75 @@ func TestIssue9804AllowlistsKeepLiveSonnet55(t *testing.T) { } } +// TestIssue18753ClaudeListsOfferFableAndHaiku55 pins the #18753 refresh: the +// ids Claude Code 2.1.326 accepts (Fable 5.2 from 2.1.321, Fable 5.1 from +// 2.1.257, Haiku 5.5 from 2.1.293) and the bare `fable` alias are in every +// claude list, and the browser fallback still matches the Go one. +func TestIssue18753ClaudeListsOfferFableAndHaiku55(t *testing.T) { + newIDs := []string{"claude-fable-5-2", "claude-fable-5-1", "claude-haiku-5-5", "fable"} + html := indexHTML(t) + lists := []struct { + name string + ids []string + }{ + {"claudeStaticModels", claudeStaticModels}, + {"claudePinnedCLIModels", claudePinnedCLIModels}, + {"CLAUDE_CLI_MODELS", htmlModelValues(t, html, "CLAUDE_CLI_MODELS")}, + } + for _, l := range lists { + for _, id := range newIDs { + if !contains(l.ids, id) { + t.Errorf("%s missing %q: %v", l.name, id, l.ids) + } + } + } + if !contains(claudeAlwaysIncludeModels, "fable") { + t.Errorf("claudeAlwaysIncludeModels missing the bare fable alias: %v", claudeAlwaysIncludeModels) + } + // Newest first within the Fable family, as the lists already order Opus + // and Sonnet. + for _, l := range lists { + i52, i51, i5 := modelIndex(l.ids, "claude-fable-5-2"), modelIndex(l.ids, "claude-fable-5-1"), modelIndex(l.ids, "claude-fable-5") + if !(i52 < i51 && i51 < i5) { + t.Errorf("%s Fable order = 5.2@%d 5.1@%d 5@%d, want newest first", l.name, i52, i51, i5) + } + } +} + +// TestIssue18753LiveClaudeModelsSurviveAllowlist: a live /v1/models answer +// carrying the new ids keeps them after the pinned-CLI cut, while an id the +// pinned CLI is not known to accept is still dropped. +func TestIssue18753LiveClaudeModelsSurviveAllowlist(t *testing.T) { + writeClaudeCredentials(t, "tok", futureExpiryMs()) + t.Setenv("ANTHROPIC_API_KEY", "") + ts := claudeModelsTestServer(t, http.StatusOK, + `{"data":[{"id":"claude-fable-5-2"},{"id":"claude-haiku-5-5"},{"id":"claude-fable-5-1"},{"id":"claude-mythos-5-2"},{"id":"claude-opus-5-5"}]}`, nil) + redirectAnthropicEndpoint(t, ts.URL) + + s := &Server{cliModels: newCLIModelCache(), logger: testLogger()} + r := s.queryCLIModels("claude") + if r.fallback { + t.Fatalf("live probe must not be fallback: %+v", r) + } + for _, want := range []string{"claude-fable-5-2", "claude-haiku-5-5", "claude-fable-5-1", "claude-opus-5-5", "fable"} { + if !contains(r.models, want) { + t.Errorf("live claude list lost %q: %v", want, r.models) + } + } + if contains(r.models, "claude-mythos-5-2") { + t.Errorf("claude-mythos-5-2 is not in claudePinnedCLIModels and must be cut: %v", r.models) + } +} + +func modelIndex(list []string, want string) int { + for i, v := range list { + if v == want { + return i + } + } + return -1 +} + func TestIssue9804OmpSonnet55ReasoningLevels(t *testing.T) { if got := ompStaticReasoningEfforts["anthropic/claude-sonnet-5-5"]; !equalStrings(got, []string{"low", "medium", "high", "xhigh", "max"}) { t.Fatalf("Sonnet 5.5 OMP reasoning levels = %v", got) diff --git a/src/pkg/dashboard/cli_models.go b/src/pkg/dashboard/cli_models.go index 81000fd55a..c24e1b50eb 100644 --- a/src/pkg/dashboard/cli_models.go +++ b/src/pkg/dashboard/cli_models.go @@ -266,15 +266,22 @@ func setCopilotSDKHelperPathForTest(t interface { // file) or fails. Live discovery via api.anthropic.com/v1/models is strongly // preferred; this is only a floor so the dropdown is never empty. Refreshed // 2026-08-03 from a live /v1/models response (11 ids, in API order); -// claude-sonnet-5-5 added per the Claude Code 2.1.284 changelog (#9804). Keep -// it in sync with CLAUDE_CLI_MODELS in static/index.html. Both the canonical -// ids AND the bare aliases the CLI accepts are included. +// claude-sonnet-5-5 added per the Claude Code 2.1.284 changelog (#9804). +// Refreshed 2026-11-17 (#18753) from Anthropic's models overview and the +// Claude Code changelog: claude-fable-5-2 (2.1.321), claude-fable-5-1 +// (2.1.257), claude-haiku-5-5 (2.1.293) and the bare `fable` alias, all +// accepted by the pinned 2.1.326. Keep it in sync with CLAUDE_CLI_MODELS in +// static/index.html. Both the canonical ids AND the bare aliases the CLI +// accepts are included. var claudeStaticModels = []string{ "claude-opus-5-5", "claude-opus-5", "claude-sonnet-5-5", "claude-sonnet-5", + "claude-fable-5-2", + "claude-fable-5-1", "claude-fable-5", + "claude-haiku-5-5", "claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-4-6", @@ -287,6 +294,7 @@ var claudeStaticModels = []string{ "opus", "sonnet", "haiku", + "fable", } // copilotStaticModels is the fallback offered when the Copilot models probe @@ -393,6 +401,7 @@ var claudeAlwaysIncludeModels = []string{ "opus", "sonnet", "haiku", + "fable", } // bobStaticModels is bob's complete model list: exactly one entry, the auto @@ -443,16 +452,21 @@ var geminiStaticModels = []string{ } // claudePinnedCLIModels is the closed model set accepted by the Claude Code -// version pinned in src/Dockerfile. The Anthropic account catalog can list -// models that the installed CLI refuses with "version X or newer is required"; -// intersecting live and fallback lists with this set keeps the dashboard from -// offering a value this image cannot launch (#8418). +// version pinned in src/Dockerfile (2.1.326 as of #18753). The Anthropic +// account catalog can list models that the installed CLI refuses with +// "version X or newer is required"; intersecting live and fallback lists with +// this set keeps the dashboard from offering a value this image cannot launch +// (#8418). Each id's first accepting CLI version is recorded in +// src/scripts/cli-model-requirements.txt. var claudePinnedCLIModels = []string{ "claude-opus-5-5", "claude-opus-5", "claude-sonnet-5-5", "claude-sonnet-5", + "claude-fable-5-2", + "claude-fable-5-1", "claude-fable-5", + "claude-haiku-5-5", "claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-4-6", @@ -464,6 +478,7 @@ var claudePinnedCLIModels = []string{ "opus", "sonnet", "haiku", + "fable", } // geminiPinnedCLIModels is the conservative Gemini CLI allowlist used to bound diff --git a/src/pkg/dashboard/static-src/js/backends-tokens.js b/src/pkg/dashboard/static-src/js/backends-tokens.js index 0d7c676c0c..a637b0ffb4 100644 --- a/src/pkg/dashboard/static-src/js/backends-tokens.js +++ b/src/pkg/dashboard/static-src/js/backends-tokens.js @@ -49,13 +49,18 @@ // pkg/dashboard/cli_models.go; keep the two lists in sync). Refreshed // 2026-08-03 from a live /v1/models response, in API order, plus the bare // aliases the claude CLI accepts as --model values; Sonnet 5.5 added per - // the Claude Code 2.1.284 changelog (#9804). + // the Claude Code 2.1.284 changelog (#9804). Refreshed 2026-11-17 + // (#18753) from Anthropic's models overview and the Claude Code + // changelog: Fable 5.2, Fable 5.1, Haiku 5.5 and the `fable` alias. const CLAUDE_CLI_MODELS = [ { value: 'claude-opus-5-5', label: 'Opus 5.5' }, { value: 'claude-opus-5', label: 'Opus 5' }, { value: 'claude-sonnet-5-5', label: 'Sonnet 5.5' }, { value: 'claude-sonnet-5', label: 'Sonnet 5' }, + { value: 'claude-fable-5-2', label: 'Fable 5.2' }, + { value: 'claude-fable-5-1', label: 'Fable 5.1' }, { value: 'claude-fable-5', label: 'Fable 5' }, + { value: 'claude-haiku-5-5', label: 'Haiku 5.5' }, { value: 'claude-opus-4-8', label: 'Opus 4.8' }, { value: 'claude-opus-4-7', label: 'Opus 4.7' }, { value: 'claude-sonnet-4-6', label: 'Sonnet 4.6' }, @@ -67,6 +72,7 @@ { value: 'opus', label: 'Opus (alias)' }, { value: 'sonnet', label: 'Sonnet (alias)' }, { value: 'haiku', label: 'Haiku (alias)' }, + { value: 'fable', label: 'Fable (alias)' }, ]; const COPILOT_CLI_MODELS = [ // Auto sentinel: `copilot --model auto` lets the Copilot CLI pick/adjust diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index eacfc4c168..dff06d651d 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -39256,13 +39256,18 @@