feat: add Claude Opus 4.8 and Claude Fable 5 model support - #1527
feat: add Claude Opus 4.8 and Claude Fable 5 model support#1527Hansen1018 wants to merge 63 commits into
Conversation
Add two new Anthropic models released in 2026: - Claude Opus 4.8 (claude-opus-4-8) — released 2026-05-28, the immediate successor to Opus 4.7. Anthropic kept 4.7's pricing; the per-call estimate here (USD 0.18/call) follows the existing repo convention from PR NoFxAiOS#1510. - Claude Fable 5 (claude-fable-5) — released 2026-06-09, the first publicly available Mythos-class model (a tier above Opus). $10 input / $50 output per 1M tokens per anthropic.com; the per-call estimate (USD 0.36/call) is roughly 2× Opus 4.8's to mirror the 2× token price. Both share 1,000,000 context, 128,000 max output, and the standard Anthropic Messages API. Reference: https://www.anthropic.com/news/claude-fable-5 https://www.anthropic.com/news/claude-opus-4-8 Files changed (5, +25 / -5): - mcp/provider/claude.go `DefaultClaudeModel` bumps to `claude-fable-5` (the newer Mythos-class flagship). - api/handler_ai_model.go the `claude` row in `supportedModels` exposes `claude-fable-5` so the UI shows the same default the runtime picks up. - mcp/payment/claw402.go `claw402ModelEndpoints` adds `claude-opus-4-8` and `claude-fable-5` x402 paths; the legacy `claude-opus` alias is kept. - store/ai_charge.go `modelPrices` gains `claude-opus-4-8 = 0.18` and `claude-fable-5 = 0.36` with comments citing the anthropic.com pricing sheet. - web/src/components/trader/model-constants.ts Both tiers enter `CLAW402_MODELS` (Fable 5 with the dragon icon \u{1F409}) and `BLOCKRUN_MODELS`; `AI_PROVIDER_CONFIG`. `claude.defaultModel` -> `claude-fable-5`. Backward compatible — existing `claude-opus`, `claude-opus-4-6` entries and prices remain unchanged and selectable. Default model policy: this PR is the single place where the Anthropic default changes (to Fable 5). All `WithModel(...)` override callers continue to pick any model they want via the existing hook.
🤖 Advisory Check ResultsThese are advisory checks to help improve code quality. They won't block your PR from being merged. 📋 PR InformationTitle Format: ✅ Good - Follows Conventional Commits 🔧 Backend ChecksGo Formatting: Files needing formattingGo Vet: ✅ Good Fix locally: go fmt ./... # Format code
go vet ./... # Check for issues
go test ./... # Run tests⚛️ Frontend ChecksBuild & Type Check: ✅ Success Fix locally: cd web
npm run build # Test build (includes type checking)📖 ResourcesQuestions? Feel free to ask in the comments! 🙏 These checks are advisory and won't block your PR from being merged. This comment is automatically generated from pr-checks-run.yml. |
🤖 Advisory Check ResultsThese are advisory checks to help improve code quality. They won't block your PR from being merged. 📋 PR InformationTitle Format: ✅ Good - Follows Conventional Commits 🔧 Backend ChecksGo Formatting: Files needing formattingGo Vet: ✅ Good Fix locally: go fmt ./... # Format code
go vet ./... # Check for issues
go test ./... # Run tests⚛️ Frontend ChecksBuild & Type Check: ✅ Success Fix locally: cd web
npm run build # Test build (includes type checking)📖 ResourcesQuestions? Feel free to ask in the comments! 🙏 These checks are advisory and won't block your PR from being merged. This comment is automatically generated from pr-checks-run.yml. |
🤖 Advisory Check ResultsThese are advisory checks to help improve code quality. They won't block your PR from being merged. 📋 PR InformationTitle Format: ✅ Good - Follows Conventional Commits 🔧 Backend ChecksGo Formatting: Files needing formattingGo Vet: ✅ Good Fix locally: go fmt ./... # Format code
go vet ./... # Check for issues
go test ./... # Run tests⚛️ Frontend ChecksBuild & Type Check: ✅ Success Fix locally: cd web
npm run build # Test build (includes type checking)📖 ResourcesQuestions? Feel free to ask in the comments! 🙏 These checks are advisory and won't block your PR from being merged. This comment is automatically generated from pr-checks-run.yml. |
# Conflicts: # api/handler_ai_model.go # mcp/payment/claw402.go # store/ai_charge.go # web/src/components/trader/model-constants.ts
44da6af to
c079ab2
Compare
🤖 Advisory Check ResultsThese are advisory checks to help improve code quality. They won't block your PR from being merged. 📋 PR InformationTitle Format: ✅ Good - Follows Conventional Commits 🔧 Backend ChecksGo Formatting: Files needing formattingGo Vet: ✅ Good Fix locally: go fmt ./... # Format code
go vet ./... # Check for issues
go test ./... # Run tests⚛️ Frontend ChecksBuild & Type Check: ✅ Success Fix locally: cd web
npm run build # Test build (includes type checking)📖 ResourcesQuestions? Feel free to ask in the comments! 🙏 These checks are advisory and won't block your PR from being merged. This comment is automatically generated from pr-checks-run.yml. |
Summary
Add two new Anthropic models released in 2026: Claude Opus 4.8 (the Opus-4.x refresh) and Claude Fable 5 (Anthropic's first public Mythos-class model, above Opus). Both are reachable via the OpenAI-compatible provider layer, the claw402 x402 paths, and the front-end model selectors.
Models added
Claude Opus 4.8
claude-opus-4-8Claude Fable 5
claude-fable-5What changed
mcp/provider/claude.goDefaultClaudeModel→claude-fable-5api/handler_ai_model.goclauderow'sdefaultModel→claude-fable-5mcp/payment/claw402.goclaw402ModelEndpointsgainsclaude-opus-4-8andclaude-fable-5; legacyclaude-opusalias keptstore/ai_charge.gomodelPricesgainsclaude-opus-4-8 = 0.18andclaude-fable-5 = 0.36web/src/components/trader/model-constants.tsCLAW402_MODELS(Fable 5 with 🐉 icon) andBLOCKRUN_MODELS;AI_PROVIDER_CONFIG.claude.defaultModel→claude-fable-5Diff stat: 5 files changed, 24 insertions(+), 4 deletions(-).
Scope boundary (what did NOT change)
claude-opuslegacy alias andclaude-opus-4-6entry remain unchanged.Compatibility
claude-opus/claude-opus-4-6/ genericclaude(Anthropic-API) identifiers keep working and stay selectable.Default model policy
This PR is the single place where the Anthropic default changes (to Fable 5, Anthropic's currently-flag-ship public model). All
WithModel(...)override callers continue to pick any model they want via the existing hook; this PR is purely additive on the model-choice dimension.Testing
go build ./...passestsc --noEmitclean (excluding pre-existingStrategyStudioPage.tsxerrors that predate this work)