Skip to content

feat(models): add Claude Fable 5#4921

Merged
waleedlatif1 merged 2 commits into
stagingfrom
add-model/claude-fable-5
Jun 9, 2026
Merged

feat(models): add Claude Fable 5#4921
waleedlatif1 merged 2 commits into
stagingfrom
add-model/claude-fable-5

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Add claude-fable-5 to the Anthropic provider in models.ts — Anthropic's new most-capable widely-released model (GA June 9, 2026)
  • Pricing: $10/M input, $1/M cached input, $50/M output; 1M context window; 128k max output — all verified against the official models overview, pricing, and launch docs
  • Effort/thinking levels low | medium | high | xhigh | max (default high), matching the Opus 4.8 adaptive-thinking profile
  • Patch supportsAdaptiveThinking() in anthropic/core.ts to recognize fable-5 — Fable 5 is adaptive-thinking-only and rejects budget_tokens extended thinking, so without this any selected thinking level would route to the wrong path (and xhigh/max would silently no-op)
  • Deliberately omitted nativeStructuredOutputs (not in Fable 5's launch feature list) and temperature (incompatible with always-on adaptive thinking), consistent with the Opus 4.8/4.7 entries

Type of Change

  • New feature

Testing

Tested manually — bun run lint passes; verified Fable 5 routes through the adaptive-thinking path for all five effort levels

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jun 9, 2026 5:24pm

Request Review

@cursor

cursor Bot commented Jun 9, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes Anthropic request shaping for a new flagship model; incorrect thinking routing would break calls or drop effort levels, but the diff is small and mirrors existing Opus 4.8 behavior.

Overview
Adds claude-fable-5 to the Anthropic model catalog with pricing ($10/$1 cached/$50 per M), 1M context, 128k max output, and adaptive-thinking effort levels low through max (default high). The entry intentionally omits nativeStructuredOutputs and temperature, aligned with Fable’s always-on adaptive thinking.

Updates supportsAdaptiveThinking() in anthropic/core.ts so fable-5 uses thinking.type: "adaptive" plus output_config.effort instead of extended budget_tokens thinking—avoiding API rejection and ensuring xhigh/max effort levels actually apply.

Reviewed by Cursor Bugbot for commit 3bfe234. Configure here.

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR registers claude-fable-5 as a new Anthropic model and wires it into the adaptive-thinking routing path in core.ts. The changes are additive and narrowly scoped, touching only the model registry and one routing predicate.

  • models.ts: Adds the claude-fable-5 entry at the top of the Anthropic model list with $10/$1/$50 per-million-token pricing, a 1 M-token context window, 128 k max output, and the five-level thinking ladder (low → max, default high). temperature and nativeStructuredOutputs are deliberately absent, matching the Opus 4.8/4.7 pattern for adaptive-only models.
  • core.ts: Adds normalizedModel.includes('fable-5') to supportsAdaptiveThinking() so Fable 5 is routed to { type: 'adaptive' } + output_config.effort rather than the budget_tokens path, and updates both the function's docblock and the buildThinkingConfig docblock to list Fable 5 alongside Opus 4.8/4.7.

Confidence Score: 5/5

Safe to merge — the change is additive, touches only the model registry and one routing predicate, and the adaptive-thinking path for Fable 5 is identical to the established Opus 4.8/4.7 path.

The new model entry is consistent with all existing adaptive-only entries, the substring match in supportsAdaptiveThinking follows the same convention used for every other model, and the deliberate omission of temperature and nativeStructuredOutputs is documented and correct. No existing routing logic is altered.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/providers/models.ts Adds claude-fable-5 model entry with correct pricing ($10/$1/$50 per M tokens), 1M context window, 128k max output, and adaptive-only thinking levels (low/medium/high/xhigh/max); intentionally omits temperature and nativeStructuredOutputs, consistent with other adaptive-only models.
apps/sim/providers/anthropic/core.ts Patches supportsAdaptiveThinking() with an includes('fable-5') check and updates both the function docblock and the buildThinkingConfig docblock to include Fable 5; routing logic is unchanged and correct.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Request with model: claude-fable-5] --> B{thinkingLevel set\nand ≠ 'none'?}
    B -- No --> C[Send payload without\nthinking config\nFable 5 defaults to adaptive]
    B -- Yes --> D[buildThinkingConfig]
    D --> E{supportsAdaptiveThinking?\nfable-5 ✓}
    E -- true --> F["thinking: { type: 'adaptive' }\noutput_config: { effort: level }"]
    E -- false --> G["thinking: { type: 'enabled', budget_tokens: N }"]
    F --> H[Anthropic API]
    G --> H
    C --> H
Loading

Reviews (2): Last reviewed commit: "docs(anthropic): note Fable 5 in buildTh..." | Re-trigger Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 3bfe234. Configure here.

@waleedlatif1 waleedlatif1 merged commit b12b0f1 into staging Jun 9, 2026
10 checks passed
@waleedlatif1 waleedlatif1 deleted the add-model/claude-fable-5 branch June 9, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant