feat(models): add Claude Fable 5.2 model mapping
What
Adds Claude Fable 5.2, which is now enabled on the GitLab Anthropic proxy:
| Model ID | Provider | Backend Model |
|---|---|---|
duo-chat-fable-5-2 |
Anthropic | claude-fable-5-2 |
Source: ai-assist models.yml (added in ai-assist 0ca91d07): gitlab_identifier: claude_fable_5_2, proxy_provider: anthropic, params.model: claude-fable-5-2, max_context_tokens: 1_000_000, max_tokens: 128_000.
No duo-workflow-* entry, which matches Fable 5 and 5.1.
Preserved thinking (block binding)
Fable 5.2 binds each signed thinking block to the exact conversation prefix it came from. If an earlier turn changes (compaction, trimming, switching models mid-session), the next request fails:
400 messages.1.content.0: Invalid `signature` in `thinking` block. The block is bound to a different conversation.
Remove the block, or set `thinking.block_binding.prefix_mismatch_behavior` to "drop_block".
That setting requires the `thinking-binding-controls-2026-08-01` value in the `anthropic-beta` header.ai-assist handles this in models.yml with thinking.block_binding.prefix_mismatch_behavior: drop_block plus the beta. This MR does the same in GitLabAnthropicLanguageModel, only for models in THINKING_BLOCK_BINDING_MODELS (currently claude-fable-5-2):
- Adaptive or unset thinking is sent as
thinking: { type: 'adaptive', display: 'summarized', block_binding: { prefix_mismatch_behavior: 'drop_block' } }. The binding is also needed when thinking is unset, because replayed history still contains signed blocks. Fable 5.2 always thinks, so temperature/top_p are dropped in that case too. anthropic-beta: thinking-binding-controls-2026-08-01is sent per request and merged with anyanthropic-betaalready set viaaiGatewayHeaders.- Explicit
enabled/disabledconfigs are passed through unchanged. Note: Fable 5.2 rejectsthinking.type.disabled. - Other models are unchanged. Their requests are identical to before.
Verification
Live probes against cloud.gitlab.com/ai/v1/proxy/anthropic:
| Scenario | Before | After |
|---|---|---|
| Single turn | ||
| Faithful multi-turn replay with thinking blocks | ||
| Edited earlier turn, no thinking config | ||
Edited earlier turn, adaptive high |
||
| Edited earlier turn, streaming |
Also confirmed: the proxy forwards the anthropic-beta header; block_binding without the beta returns 400 (Extra inputs are not permitted); Fable 5.1 accepts the binding but doesn't need it, so it stays out of the list.
npm run type-check✅ npm run lint✅ npm test✅ (29 files, 781 tests)
Tests
tests/model-mappings.test.ts: new mapping test; counts bumped (total 44 → 45, Anthropic 14 → 15,MODEL_ID_TO_ANTHROPIC_MODEL14 → 15,getValidModelsForProvider('anthropic')14 → 15).tests/gitlab-anthropic-language-model.test.ts: block binding for adaptive, unset,aiGatewayHeadersbeta merge,disabledpassthrough, other models untouched, and the streaming path.
Also
README.md: model mappings table updated.dist/rebuilt.
The models.dev entry and the opencode bump are not part of this MR. The opencode bump will follow once this is released.