claude: Fable 5.2 on Vertex, Bedrock, Desktop's fable tier and Anthropic's fast mode
Anthropic launched Claude Fable 5.2 (claude-fable-5-2) on 11-09 (thelegendof2414 on X: not in magpie's list). Checked against Anthropic's "What's new in Fable 5.2" page, AWS's model card, models.dev and Claude Code 2.1.321's own bundle: - Claude subscription and Anthropic API: the list follows models.dev, which already has claude-fable-5-2 (8/40, cache read 0.2, write 10, 1M context, 128k out), so it shows once the catalog syncs (at most 24h). TestClaudeAccountListsFable52 holds that with the literal models.dev row: listed first, priced, 1M window, low to max efforts. - Vertex global and Bedrock presets list it (global.anthropic.claude-fable-5-2 is on AWS's card). - Claude Desktop's fable tier now behaves as claude-fable-5-2 (2.1.321's latest_per_family); Desktop's own catalog v4371 still ends at 5.1. - Fast mode on Anthropic's API key: Fable 5.2 has it ($16/$80; 2.1.321's fast-mode opt-in set is fable-5-2 and mythos-5-2). Fable 5.1 never had it and stays off. A Claude subscription account still gets no fast mode in magpie, as before. - Claude Code's effort: 2.1.321 reads the top-level effortLevel only for models up to Fable 5.1 and Mythos 5.1, so 5.2 goes in modelSettings, as Opus 5.5 does (claudeReadsTop unchanged, test added). - Gateway: adaptive-only thinking, no sampling, thinking off never sent, xhigh kept: the version rules already cover 5.2; tests now name it. Run at this tree (mote): gofmt -l clean; go vet ./... (darwin), GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... ok; go test -count=1 ./internal/agent ./internal/gateway ./internal/provider -run 'Fable|Claude|Fast|Vertex|Bedrock|Effort|Thinking|Xhigh|XHigh|Desktop|Sampling|Adaptive' ok (84s, 178s, 36s). Not run before the push: the full go test ./... (mote had six suites queued on suite.lock at load 420); it runs after, and a red is filed. Not tried: a real Fable 5.2 request through magpie; fast mode on a real API key.
This commit is contained in:
+1
-1
@@ -1112,7 +1112,7 @@ so magpie gives each location the models it answered with on 2026-10-06
|
||||
|
||||
| Location | Models |
|
||||
| --- | --- |
|
||||
| `global` | `gemini-3.8-flash`, `gemini-3.7-flash`, `gemini-3.6-flash`, `gemini-3.5-flash`, `gemini-3.5-flash-lite`, `gemini-4-argon`, `gemini-3.1-pro-preview`, `gemini-3.1-pro-preview-customtools`, `gemini-3.1-flash-lite`, `gemini-3-flash-preview`, `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`, `deepseek-ai/deepseek-v4.1-flash-maas`, `zai-org/glm-5.2-maas`, `openai/gpt-oss-120b-maas`, `claude-opus-5-5`, `claude-sonnet-5-5`, `claude-haiku-5-5`, `claude-fable-5-1` |
|
||||
| `global` | `gemini-3.8-flash`, `gemini-3.7-flash`, `gemini-3.6-flash`, `gemini-3.5-flash`, `gemini-3.5-flash-lite`, `gemini-4-argon`, `gemini-3.1-pro-preview`, `gemini-3.1-pro-preview-customtools`, `gemini-3.1-flash-lite`, `gemini-3-flash-preview`, `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`, `deepseek-ai/deepseek-v4.1-flash-maas`, `zai-org/glm-5.2-maas`, `openai/gpt-oss-120b-maas`, `claude-opus-5-5`, `claude-sonnet-5-5`, `claude-haiku-5-5`, `claude-fable-5-2`, `claude-fable-5-1` |
|
||||
| `us`, `eu` | `gemini-3.8-flash`, `gemini-3.7-flash`, `gemini-3.6-flash`, `gemini-3.5-flash`, `gemini-3.5-flash-lite`, `gemini-3.1-flash-lite` |
|
||||
| A region | `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite` |
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@ recorded as a prediction failure (`noPrediction`).
|
||||
- A request translated to a Chat or Responses upstream that carries no `prompt_cache_key` of the client's (every Anthropic client's) gets one for its conversation when the provider is OpenAI's API with a key or one the user added by its address (`ownCacheKey`, `cacheKeyOf` in [`gateway.go`](../../internal/gateway/gateway.go)): a hash, in a UUID's shape, of the session the client names, else of its first user message, so every turn of it has the same key and nothing in it names the client or magpie. A relay can turn a request away without one ("prompt_cache_key is required", CyberCaius's AnyRouter). A vendor's preset, a signed-in account, a plugin, Bedrock and Vertex get none, nor does a provider whose extraBody names `prompt_cache_key` (the user's value is sent). An upstream whose 400 names the field is asked again without it and not sent it again; another 400 is not asked again for it, so an unrelated refusal is tried as often as before.
|
||||
- Claude Desktop's check that a gateway model answers (`{"max_tokens":1,"messages":[{"role":"user","content":"."}]}`, sent as it starts and by its settings' Test connection on the shortest id it is listed with haiku in it, else sonnet, else opus, else the first model listed; `desktopProbe` in [`desktop.go`](../../internal/gateway/desktop.go)) goes to the model the user chose in one of Desktop's own model menus that magpie still serves (`desktopChosen`: `__model_selector_state` in Claude-3p's `local-agent-mode-sessions/<account>/<org>/cowork_account_settings.json`, in the order Code, Cowork, Chat; cybercaius's DeepSeek in the Code tab, v0.1.2033), unless a session's turn was sent after that file was last written: then the model that turn was for (`desktopPicked`), while magpie serves it, the newer of the two being what the user is on now (before, the last session's model came first whenever any menu still held it, so the Code tab switched off DeepSeek with Cowork left on it kept the check on DeepSeek, cybercaius on Discord, v0.1.2212), else to Desktop's default model, the first one listed to it (`desktopDefault`; Desktop's own settings call the first listed model the default), never to the haiku it names, which is another provider's quota, nor, with no menu chosen, to the model the last session ran on (`desktopPicked`), which can be days old: v0.1.1821 sent it there, a relay's GPT model CyberCaius had left for his routing group, and the relay turned it away (Discord, v0.1.1838). It is asked for 16 tokens upstream (`desktopProbeTokens`): OpenAI's models refuse fewer, and a relay in front of one (AnyRouter's "bad response status code 400") passes on no floor for `tokenFloor` to ask again at. A relay that needs `prompt_cache_key` gets one (above). It is recorded with kind `connection_check` (`KindDesktopCheck`), which the Routing page tags "Connection check" with why its model is the id Desktop named and not the one chosen in the conversation: a list with no Claude-named id made the row read "requested deepseek-flash" while the menu's gpt-6.1-sol answered (cybercaius on Discord, v0.1.2212). `TestClaudeDesktopProbeToDefaultModel`, `TestClaudeDesktopProbeToChosenModel`. `TestClaudeDesktopProbeAsksNoClassifier` checks the kind.
|
||||
- Claude Desktop's `/v1/models` tags a model with `anthropic_family_tier` only when the user picked it for that tier (`DesktopTiers`, the Agents page's opus, sonnet, haiku and fable). Before, a Claude model magpie served was tagged with its own tier unpicked, so Desktop's Code tab told Claude Code to run its haiku calls (its small, fast model) on whichever provider served a `claude-haiku-…`: a chat on AgentRouter's gpt-6.1-sol sent them to Leee's `claude-haiku-5-5` (cybercaius on Discord). Untagged, Claude Code asks for its own id of the tier. A background call (no tools) or a subagent's turn asking for a Claude model by Claude's own id that is no catalog id (`claudeOwnID`) stays on the chat's provider (`desktopPicked`), even when another provider serves a model of that name: `servedBeside` gives that provider's model of that name, else its newest model of the tier, beside the chat's model first, else the call goes to the chat's model. The provider's Claude models stand in only when the chat itself is on one of them: a chat on Leee's DeepSeek had Claude Code's sonnet calls sent to Leee's `claude-sonnet-5-5`, which its key may not use (403, CyberCaius on Discord), so Claude Code's own calls in a chat on another vendor's model go to the chat's model, and a tier the user picked takes Claude Code's own id of it even where a provider lists a model by that name (`TestClaudeDesktopNonClaudeChatKeepsTierCalls`). A lead's turn and an id the user picked for a tier (a catalog id) go as asked. `TestClaudeDesktopBackgroundStaysOnChatProvider`.
|
||||
- While a model is picked for one of Claude Desktop's tiers, magpie's Desktop profile also lists Desktop's models in `inferenceModels` (`DesktopInferenceModels` in [`desktop_list.go`](../../internal/gateway/desktop_list.go)), so a pick that isn't a Claude model runs in the Code tab with the prompt of its tier's newest Claude model (`behavesAs`: `claude-opus-5-5`, `claude-sonnet-5-5`, `claude-haiku-5-5`, `claude-fable-5-1`, Desktop's catalog v3739), not Claude Code's generic one (moer2831 on Discord). Desktop 4.29 and later hand Claude Code `behavesAs` only from that list (z3t in its app.asar, 4.4212: `modelPicker.options` with each entry's `behavesAs`); the gateway's `behaves_as` row field feeds Desktop's own effort profile only. A non-empty list replaces `/v1/models` in Desktop's menus (pzn: a discovered row gives only its name and description, by id), so the list is every row `/v1/models` gives Desktop, by its id and in its order, each with what Desktop would have read off the row: `supports1m` for a window of 1M and up, `prefer1m` (and the row's `display_name` as `labelOverride`, where Desktop names the row by display_name) for a model listed by its `[1m]` id, and a pick's `anthropicFamilyTier` with `isFamilyDefault`. Desktop keys the list by name and reads one tier off an entry (FPn in its app.asar, 4.23118: the entry tagged with a tier names its `ANTHROPIC_DEFAULT_<TIER>_MODEL`), so a model picked for two tiers is tagged with the first (`desktopTierOf`) and listed once more, after the rows, for each later tier (`desktopSharedTiers`), by its id's form under a number of its own (`desktopTierAlias`: magpie-<number>.anthropic.<model>, mythos-magpie-<number> or anthropic/magpie-<number>), which `aliased` reads back to the model, so the gateway serves it as the pick (`desktopTierAsked`). Before, the later tier had no model: copilot/claude-sonnet-5.5 picked for sonnet and haiku gave Claude Code an empty `ANTHROPIC_DEFAULT_HAIKU_MODEL`, and its small tasks, WebFetch's page summaries among them, ran on the session's model. The rows stay first, so a new session still starts on the first row. A Claude model picked runs as itself where Claude Code knows it by the id it is listed by; a routing group led by one is listed by its mythos-magpie-<number> and runs as the group's model, as one listed by anthropic/magpie-<number> does (`desktopRunsAs`; `TestDesktopTierSharedPick`, `TestDesktopGroupPickRunsAsItsModel`). Nothing picked (or a pick of a model no longer listed): no list, and Desktop finds the models as before. Picks that can't be read are unknown, and what is written stays. Older builds take the entries' names and drop the rest (2.7032's entry is a zod object, which strips unknown keys). Desktop reads its profile only as it starts, so the tiers' menu says to restart it, and the Agents row's Restart shows (`AppBehind` reads the profile). `TestDesktopInferenceModels`.
|
||||
- While a model is picked for one of Claude Desktop's tiers, magpie's Desktop profile also lists Desktop's models in `inferenceModels` (`DesktopInferenceModels` in [`desktop_list.go`](../../internal/gateway/desktop_list.go)), so a pick that isn't a Claude model runs in the Code tab with the prompt of its tier's newest Claude model (`behavesAs`: `claude-opus-5-5`, `claude-sonnet-5-5`, `claude-haiku-5-5`, Desktop's catalog v3739; `claude-fable-5-2`, Claude Code 2.1.321's newest Fable, which Desktop's catalog v4371 doesn't list yet), not Claude Code's generic one (moer2831 on Discord). Desktop 4.29 and later hand Claude Code `behavesAs` only from that list (z3t in its app.asar, 4.4212: `modelPicker.options` with each entry's `behavesAs`); the gateway's `behaves_as` row field feeds Desktop's own effort profile only. A non-empty list replaces `/v1/models` in Desktop's menus (pzn: a discovered row gives only its name and description, by id), so the list is every row `/v1/models` gives Desktop, by its id and in its order, each with what Desktop would have read off the row: `supports1m` for a window of 1M and up, `prefer1m` (and the row's `display_name` as `labelOverride`, where Desktop names the row by display_name) for a model listed by its `[1m]` id, and a pick's `anthropicFamilyTier` with `isFamilyDefault`. Desktop keys the list by name and reads one tier off an entry (FPn in its app.asar, 4.23118: the entry tagged with a tier names its `ANTHROPIC_DEFAULT_<TIER>_MODEL`), so a model picked for two tiers is tagged with the first (`desktopTierOf`) and listed once more, after the rows, for each later tier (`desktopSharedTiers`), by its id's form under a number of its own (`desktopTierAlias`: magpie-<number>.anthropic.<model>, mythos-magpie-<number> or anthropic/magpie-<number>), which `aliased` reads back to the model, so the gateway serves it as the pick (`desktopTierAsked`). Before, the later tier had no model: copilot/claude-sonnet-5.5 picked for sonnet and haiku gave Claude Code an empty `ANTHROPIC_DEFAULT_HAIKU_MODEL`, and its small tasks, WebFetch's page summaries among them, ran on the session's model. The rows stay first, so a new session still starts on the first row. A Claude model picked runs as itself where Claude Code knows it by the id it is listed by; a routing group led by one is listed by its mythos-magpie-<number> and runs as the group's model, as one listed by anthropic/magpie-<number> does (`desktopRunsAs`; `TestDesktopTierSharedPick`, `TestDesktopGroupPickRunsAsItsModel`). Nothing picked (or a pick of a model no longer listed): no list, and Desktop finds the models as before. Picks that can't be read are unknown, and what is written stays. Older builds take the entries' names and drop the rest (2.7032's entry is a zod object, which strips unknown keys). Desktop reads its profile only as it starts, so the tiers' menu says to restart it, and the Agents row's Restart shows (`AppBehind` reads the profile). `TestDesktopInferenceModels`.
|
||||
- Antigravity answers a system instruction holding one of a few lines with a 429 "Resource has been exhausted" whatever quota is left, on every model (`agTurnedAway` in [`codeassist.go`](../../internal/gateway/codeassist.go)): Claude Code's billing line, the Claude Agent SDK's identity line, Codex's identity lines for its GPT-5 models (which a Codex thread begun on a GPT model keeps after a switch), and Hermes Agent's earlier default persona. An Antigravity account's system instruction goes with a zero-width space after each such line's first letter (`antigravityCloak`, in `codeAssistBody`), which Google lets through and the model reads the same; every other provider, Gemini CLI's sign-in on the same envelope included, is sent the prompt as written. `magpie provider set antigravity prompt=as-written` (`Provider.PromptAsWritten`) turns it off. The refusal is still told against the system prompt as the agent wrote it (`antigravityTurnedAway`): a 400 with the hint for that prompt, the account not rested, and a group skipping Antigravity for that prompt for 6 hours after a refusal (`antigravityForeseen`).
|
||||
- Claude Code's advisor (`/advisor`, `--advisor`) is Anthropic's server tool `advisor_20260301`, its `model` named as Claude Code names its own: on magpie, by magpie's id (the tier an alias like `opus` is on), which no vendor knows, so the request was turned away whole (JackChou on Discord). Relayed on Messages (`passthrough`), the advisor's model goes as the upstream's own name for it when it is the same provider's Claude model, or a Claude id naming no provider (`advisorTools` in [`advisor.go`](../../internal/gateway/advisor.go)); one it can't run there (another provider's, a group, not Claude's) is left out, as is every advisor when the request's own model isn't a Claude model (a vendor's Messages API knows no such tool), and the turn is answered without one. A translation drops it with every other server tool. Claude Code (2.1.300) also puts the advisor in the conversation: a `{role: "system"}` message whose text ends in its instructions ("# Advisor Tool … call advisor BEFORE substantive work") and a `tool_addition` naming it. Where the advisor is left out, that `tool_addition` goes too (and a message it leaves empty), and the instructions become Claude Code's own "The advisor tool is no longer available; disregard the earlier advisor instructions." (`withoutAdvisor` on Messages, `advisorGoneIn` in `parseAnthropic` for a translation): left there, the model called `advisor()` as one of the agent's tools and Claude Code answered "No such tool available: advisor" (JackChou on Discord). The Claude subscription's run declares only magpie's tools, so it never has one. `TestAdvisorModelAsTheUpstreamNamesIt`, `TestAdvisorLeftOutOnTranslation`.
|
||||
- Kiro is told where to cache the prompt (plugins#110: a Kiro subscription read 0 from its cache). Its API takes Bedrock's `cachePoint: {"type":"default"}` on a `userInputMessage`, an `assistantResponseMessage` or as a tool entry. The built-in (`buildKiro` in [`kiro.go`](../../internal/gateway/kiro.go)) marks the first message when there is a system prompt, which it folds into that message, and the current message, as `buildAnthropic` marks Anthropic's. A moved Kiro's plugin (opencode-kiro-auth 0.1.10, the mover's `min`) turns each `cache_control` in the Anthropic body it is handed into one, at most 4, the last kept.
|
||||
|
||||
@@ -217,9 +217,10 @@ func claudeEffortsFor(model string) []string {
|
||||
|
||||
// claudeTopEffort is the models the effortLevel at the top of the user's
|
||||
// settings.json applies to: Opus 5, Fable 5.1 and those before them. Opus
|
||||
// 5.5 and every Claude model after it (any Claude Code doesn't know) read
|
||||
// only modelSettings.<model>.effortLevel (2.1.251 on); another vendor's
|
||||
// reads the top one.
|
||||
// 5.5, Fable 5.2 and every Claude model after them (any Claude Code doesn't
|
||||
// know) read only modelSettings.<model>.effortLevel (2.1.251 on; 2.1.321's
|
||||
// list of models that read the top one ends at Fable 5.1 and Mythos 5.1);
|
||||
// another vendor's reads the top one.
|
||||
var claudeTopEffort = []string{
|
||||
"claude-opus-4", "claude-sonnet-4", "claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5",
|
||||
"claude-opus-4-6", "claude-sonnet-4-6", "claude-opus-4-7", "claude-opus-4-8",
|
||||
|
||||
@@ -119,6 +119,7 @@ func TestClaudeEffortPerModel(t *testing.T) {
|
||||
"claude-opus-5-5": "low medium high xhigh max",
|
||||
"claude-sonnet-5-5": "low medium high xhigh max",
|
||||
"claude-fable-5-1": "low medium high xhigh max",
|
||||
"claude-fable-5-2": "low medium high xhigh max",
|
||||
"claude-opus-5-6": "low medium high xhigh max",
|
||||
"deepseek/pro": "low medium high xhigh max",
|
||||
"": "low medium high xhigh max",
|
||||
|
||||
@@ -181,4 +181,9 @@ func TestClaudeLightHaiku55(t *testing.T) {
|
||||
if claudeReadsTop("claude-haiku-5-5[1m]") {
|
||||
t.Error("claude-haiku-5-5 should read only modelSettings' effort, as every Claude after Opus 5.5")
|
||||
}
|
||||
// Claude Code 2.1.321 reads the top effortLevel for Fable 5.1 and
|
||||
// none after it.
|
||||
if !claudeReadsTop("claude-fable-5-1") || claudeReadsTop("claude-fable-5-2[1m]") {
|
||||
t.Error("claude-fable-5-1 reads the top effortLevel, claude-fable-5-2 only modelSettings'")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,13 +29,17 @@ import (
|
||||
// drop the rest (2.7032's entry is a zod object, which strips unknown
|
||||
// keys).
|
||||
|
||||
// desktopBehavesAs is the newest Claude model of each tier in Claude
|
||||
// Desktop's own model catalog (v3739), which Claude Code 2.1.316 knows.
|
||||
// desktopBehavesAs is the newest Claude model of each tier as Claude Code
|
||||
// 2.1.321 knows them (its latest_per_family; Fable 5.2 has a prompt bundle
|
||||
// of its own there). The Desktop catalog that build carries (v4371,
|
||||
// 2026-11-09) still ends the fable tier at Fable 5.1, and a Claude Code
|
||||
// older than 2.1.321 doesn't know Fable 5.2, so on one the fable tier runs
|
||||
// with the generic prompt until it updates.
|
||||
var desktopBehavesAs = map[string]string{
|
||||
"opus": "claude-opus-5-5",
|
||||
"sonnet": "claude-sonnet-5-5",
|
||||
"haiku": "claude-haiku-5-5",
|
||||
"fable": "claude-fable-5-1",
|
||||
"fable": "claude-fable-5-2",
|
||||
}
|
||||
|
||||
// DesktopBehavesAs is the Claude model each picked tier's model runs as in
|
||||
|
||||
@@ -59,7 +59,7 @@ func (v *alwaysAdaptiveVendor) last() map[string]any {
|
||||
// reasoning_effort, goes as thinking.type=adaptive with the effort in
|
||||
// output_config, and agents told how to ask a model are told so.
|
||||
func TestFableAndMythosNeverGetABudget(t *testing.T) {
|
||||
for _, model := range []string{"claude-fable-5-1", "claude-fable-5", "claude-mythos-5-1", "claude-mythos-5", "anthropic.claude-fable-5-1"} {
|
||||
for _, model := range []string{"claude-fable-5-2", "global.anthropic.claude-fable-5-2", "claude-fable-5-1", "claude-fable-5", "claude-mythos-5-1", "claude-mythos-5", "anthropic.claude-fable-5-1"} {
|
||||
if !adaptiveOnly(model) {
|
||||
t.Errorf("adaptiveOnly(%q) = false", model)
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@ func TestThinkingOffAsTheModelTakesIt(t *testing.T) {
|
||||
{"Fable 5.1 is sent no thinking", "/v1/messages",
|
||||
`{"model":"claude-fable-5-1","max_tokens":256,"thinking":{"type":"disabled"},"messages":[]}`,
|
||||
"", "low", 256 + classifierRoom},
|
||||
{"Fable 5.2 is sent no thinking", "/v1/messages",
|
||||
`{"model":"claude-fable-5-2","max_tokens":256,"thinking":{"type":"disabled"},"messages":[]}`,
|
||||
"", "low", 256 + classifierRoom},
|
||||
{"Mythos 5.1 is sent no thinking", "/v1/messages",
|
||||
`{"model":"claude-mythos-5-1","max_tokens":4096,"thinking":{"type":"disabled"},"messages":[]}`,
|
||||
"", "low", 4096},
|
||||
@@ -262,7 +265,7 @@ func TestSamplingAsTheModelTakesIt(t *testing.T) {
|
||||
sampled := `{"model":"%s","max_tokens":64,"temperature":0,"top_p":0.5,"top_k":5,"stop_sequences":["</block>"],"messages":[{"role":"user","content":"a <b> & c"}]}`
|
||||
for _, m := range []string{"claude-haiku-5-5", "claude-haiku-5.5", "anthropic.claude-haiku-5-5-20261001-v1:0",
|
||||
"claude-sonnet-5-5", "claude-sonnet-5", "claude-sonnet-5-20260801", "claude-opus-5-5", "claude-opus-5",
|
||||
"claude-opus-4-8", "claude-opus-4-7", "claude-fable-5-1", "claude-fable-5", "claude-mythos-5-1"} {
|
||||
"claude-opus-4-8", "claude-opus-4-7", "claude-fable-5-2", "claude-fable-5-1", "claude-fable-5", "claude-mythos-5-1"} {
|
||||
got := samplingAsTaken([]byte(strings.ReplaceAll(sampled, "%s", m)), "/v1/messages")
|
||||
if hasSampling(got) {
|
||||
t.Errorf("%s: sampling still sent: %s", m, got)
|
||||
|
||||
@@ -17,7 +17,7 @@ func TestXhighStaysXhighWhereClaudeTakesIt(t *testing.T) {
|
||||
srv := httptest.NewServer(up)
|
||||
t.Cleanup(srv.Close)
|
||||
if err := provider.Save(provider.Provider{ID: "anth", Name: "Anth", Key: "k", Anthropic: srv.URL,
|
||||
Models: []string{"claude-opus-5-5", "claude-opus-4-7", "claude-sonnet-5", "claude-haiku-5-5", "claude-fable-5-1", "claude-opus-4-6", "claude-sonnet-4-6"}}); err != nil {
|
||||
Models: []string{"claude-opus-5-5", "claude-opus-4-7", "claude-sonnet-5", "claude-haiku-5-5", "claude-fable-5-2", "claude-fable-5-1", "claude-opus-4-6", "claude-sonnet-4-6"}}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, c := range []struct{ model, path, body, want string }{
|
||||
@@ -26,6 +26,7 @@ func TestXhighStaysXhighWhereClaudeTakesIt(t *testing.T) {
|
||||
{"claude-opus-4-7", "/v1/chat/completions", `"reasoning_effort":"xhigh"`, "xhigh"},
|
||||
{"claude-sonnet-5", "/v1/chat/completions", `"reasoning_effort":"xhigh"`, "xhigh"},
|
||||
{"claude-haiku-5-5", "/v1/chat/completions", `"reasoning_effort":"xhigh"`, "xhigh"},
|
||||
{"claude-fable-5-2", "/v1/chat/completions", `"reasoning_effort":"xhigh"`, "xhigh"},
|
||||
{"claude-fable-5-1", "/v1/chat/completions", `"reasoning_effort":"xhigh"`, "xhigh"},
|
||||
{"claude-opus-4-6", "/v1/chat/completions", `"reasoning_effort":"xhigh"`, "max"},
|
||||
{"claude-sonnet-4-6", "/v1/chat/completions", `"reasoning_effort":"xhigh"`, "max"},
|
||||
|
||||
@@ -169,3 +169,42 @@ func TestClaudePicksOfEveryModelTakeOnesListedSince(t *testing.T) {
|
||||
t.Fatalf("listed after a Save of the same picks: %v", p.PickedFrom)
|
||||
}
|
||||
}
|
||||
|
||||
// mdFable52 is models.dev's anthropic row for Claude Fable 5.2, as it
|
||||
// served it on 2026-11-10, the day after the launch.
|
||||
const mdFable52 = `"claude-fable-5-2":{"id":"claude-fable-5-2","name":"Claude Fable 5.2","description":"Claude model for demanding reasoning and long-horizon agentic work","family":"claude-fable","attachment":true,"reasoning":true,"reasoning_options":[{"type":"effort","values":["low","medium","high","xhigh","max"]}],"tool_call":true,"structured_output":true,"temperature":false,"knowledge":"2026-06","release_date":"2026-11-09","last_updated":"2026-11-09","modalities":{"input":["text","image","pdf"],"output":["text"]},"open_weights":false,"limit":{"context":1000000,"output":128000},"experimental":{"modes":{"fast":{"cost":{"input":16,"output":80,"cache_read":0.4,"cache_write":20},"provider":{"body":{"speed":"fast"}}}}},"cost":{"input":8,"output":40,"cache_read":0.2,"cache_write":10},"canonical_model_id":"anthropic/claude-fable-5-2"}`
|
||||
|
||||
// Claude Fable 5.2, once the catalog sync has models.dev's row, is on a
|
||||
// Claude account's list first (newest), at Anthropic's price, window and
|
||||
// efforts, and served beside picks that held every model listed before
|
||||
// it (thelegendof2414 on X: Fable 5.2 not in magpie's list).
|
||||
func TestClaudeAccountListsFable52(t *testing.T) {
|
||||
home := claudeHome(t)
|
||||
claudeSignIn(t, home, time.Now().Add(time.Hour))
|
||||
t.Cleanup(catalog.Reset)
|
||||
writeAnthropicCatalog(t, mdOpus55, mdHaiku55)
|
||||
if err := store(file{Providers: []Provider{{ID: "claude", Models: claudeAllPicked}}}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := claudeExposed(t); slices.Contains(got, "claude-fable-5-2") {
|
||||
t.Fatalf("listed before models.dev had it: %v", got)
|
||||
}
|
||||
|
||||
writeAnthropicCatalog(t, mdOpus55, mdHaiku55, mdFable52)
|
||||
p, _ := find(All(), "claude")
|
||||
av := p.Available()
|
||||
if len(av) == 0 || av[0].ID != "claude-fable-5-2" {
|
||||
t.Fatalf("Fable 5.2 not first: %v", modelIDs(av))
|
||||
}
|
||||
f := av[0]
|
||||
if f.Name != "Claude Fable 5.2" || f.Context != 1_000_000 || f.Output != 128_000 || !f.Reasoning ||
|
||||
!slices.Equal(f.Efforts, []string{"low", "medium", "high", "xhigh", "max"}) {
|
||||
t.Fatalf("Fable 5.2: %+v", f)
|
||||
}
|
||||
if f.Price == nil || f.Price.Input != 8 || f.Price.Output != 40 || f.Price.CacheRead != 0.2 || f.Price.CacheWrite != 10 {
|
||||
t.Fatalf("Fable 5.2's price: %+v", f.Price)
|
||||
}
|
||||
if got := claudeExposed(t); !slices.Contains(got, "claude-fable-5-2") {
|
||||
t.Fatalf("not served beside picks of every model listed before: %v", got)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,8 +173,10 @@ var (
|
||||
)
|
||||
|
||||
// claudeFastModels are the Claude models with fast mode (speed "fast",
|
||||
// beta fast-mode-2026-02-01).
|
||||
var claudeFastModels = []string{"claude-opus-4-8", "claude-opus-5", "claude-opus-5-5"}
|
||||
// beta fast-mode-2026-02-01). Fable 5.2 has it from its launch
|
||||
// (2026-11-09, $16/$80 per Mtok; Claude Code 2.1.321 offers it on Fable
|
||||
// 5.2 and Mythos 5.2); Fable 5.1 and before never had it.
|
||||
var claudeFastModels = []string{"claude-opus-4-8", "claude-opus-5", "claude-opus-5-5", "claude-fable-5-2"}
|
||||
|
||||
// ClaudeFast reports whether a Claude model has fast mode.
|
||||
func ClaudeFast(model string) bool {
|
||||
|
||||
@@ -16,7 +16,7 @@ func fastHome(t *testing.T) {
|
||||
t.Setenv("XDG_CACHE_HOME", t.TempDir())
|
||||
for _, p := range []Provider{
|
||||
{ID: "oa", Name: "OpenAI", Key: "k", Responses: "https://api.openai.com/v1", Models: []string{"gpt-6.1-sol", "text-embedding-3"}},
|
||||
{ID: "an", Name: "Anthropic", Key: "k", Anthropic: "https://api.anthropic.com", Models: []string{"claude-opus-5-5", "claude-opus-4-8-20260501", "claude-sonnet-5"}},
|
||||
{ID: "an", Name: "Anthropic", Key: "k", Anthropic: "https://api.anthropic.com", Models: []string{"claude-opus-5-5", "claude-opus-4-8-20260501", "claude-sonnet-5", "claude-fable-5-2", "claude-fable-5-1"}},
|
||||
{ID: "rl", Name: "Relay", Key: "k", Chat: "https://relay.example/v1", Anthropic: "https://relay.example", Models: []string{"gpt-6.1-sol", "claude-opus-5-5", "odd:fast"}},
|
||||
} {
|
||||
if err := Save(p); err != nil {
|
||||
@@ -45,6 +45,8 @@ func TestCanFast(t *testing.T) {
|
||||
{*an, "claude-opus-5-5", true},
|
||||
{*an, "claude-opus-4-8-20260501", true},
|
||||
{*an, "claude-sonnet-5", false},
|
||||
{*an, "claude-fable-5-2", true}, // fast mode from its launch
|
||||
{*an, "claude-fable-5-1", false},
|
||||
{*rl, "claude-opus-5-5", false}, // Claude's speed isn't asked of a relay
|
||||
} {
|
||||
if got := CanFast(c.p, c.model); got != c.want {
|
||||
|
||||
@@ -200,7 +200,7 @@ var presets = []PresetDef{
|
||||
"gemini-4-argon", "gemini-3.1-pro-preview", "gemini-3.1-pro-preview-customtools", "gemini-3.1-flash-lite", "gemini-3-flash-preview",
|
||||
"gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite",
|
||||
"deepseek-ai/deepseek-v4.1-flash-maas", "zai-org/glm-5.2-maas", "openai/gpt-oss-120b-maas",
|
||||
"claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5", "claude-fable-5-1"},
|
||||
"claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5", "claude-fable-5-2", "claude-fable-5-1"},
|
||||
HeaderHints: []string{"X-Vertex-AI-LLM-Request-Type", "X-Vertex-AI-LLM-Shared-Request-Type"}},
|
||||
{ID: "deepseek", Name: "DeepSeek", Icon: "deepseek-color", Kind: KindVendor, Catalog: "deepseek",
|
||||
Chat: "https://api.deepseek.com/v1", Responses: "https://api.deepseek.com/v1", Anthropic: "https://api.deepseek.com/anthropic",
|
||||
@@ -487,7 +487,7 @@ var presets = []PresetDef{
|
||||
"ap-northeast-1", "ap-southeast-1", "ap-southeast-2", "ap-south-1"),
|
||||
NoList: true,
|
||||
Models: []string{"global.anthropic.claude-opus-5-5", "global.anthropic.claude-sonnet-5-5", "global.anthropic.claude-sonnet-5", "global.anthropic.claude-opus-5",
|
||||
"global.anthropic.claude-fable-5-1", "global.anthropic.claude-opus-4-8", "global.anthropic.claude-opus-4-7",
|
||||
"global.anthropic.claude-fable-5-2", "global.anthropic.claude-fable-5-1", "global.anthropic.claude-opus-4-8", "global.anthropic.claude-opus-4-7",
|
||||
"global.anthropic.claude-haiku-4-5-20251001-v1:0",
|
||||
"global.openai.gpt-6-astra", "global.openai.gpt-6-sol", "global.openai.gpt-6-luna",
|
||||
"openai.gpt-oss-120b-1:0", "openai.gpt-oss-20b-1:0", "qwen.qwen3-coder-480b-a35b-v1:0", "deepseek.v3.2",
|
||||
|
||||
@@ -1681,7 +1681,7 @@ func TestVertexClaudeModels(t *testing.T) {
|
||||
t.Fatalf("Claude at %q, want %q", p.Base(Anthropic), base)
|
||||
}
|
||||
listed := modelIDs(p.Available())
|
||||
for _, m := range []string{"claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5", "claude-fable-5-1"} {
|
||||
for _, m := range []string{"claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5", "claude-fable-5-2", "claude-fable-5-1"} {
|
||||
if !slices.Contains(listed, m) {
|
||||
t.Errorf("%s not listed at global: %v", m, listed)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user