Skip to content

feat: add Claude Opus 4.8 and Claude Fable 5 model support - #1527

Open
Hansen1018 wants to merge 63 commits into
NoFxAiOS:devfrom
Hansen1018:feat/add-claude-fable-5-and-opus-4-8
Open

feat: add Claude Opus 4.8 and Claude Fable 5 model support#1527
Hansen1018 wants to merge 63 commits into
NoFxAiOS:devfrom
Hansen1018:feat/add-claude-fable-5-and-opus-4-8

Conversation

@Hansen1018

Copy link
Copy Markdown
Contributor

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

  • API name: claude-opus-4-8
  • Released: 2026-05-28
  • Context: 1,000,000 tokens
  • Max output: 128,000 tokens
  • Pricing (same as 4.7): $5.00 / $25.00 per 1M input/output tokens per the anthropic.com news post; per-call estimate USD 0.18/call
  • Reference: https://www.anthropic.com/news/claude-opus-4-8

Claude Fable 5

  • API name: claude-fable-5
  • Released: 2026-06-09
  • Tier: First publicly available Mythos-class model (above Opus)
  • Context: 1,000,000 tokens
  • Max output: 128,000 tokens
  • Pricing: $10.00 / $50.00 per 1M input/output tokens (≈2× Opus 4.8 per the news post); per-call estimate USD 0.36/call
  • Reference: https://www.anthropic.com/news/claude-fable-5

What changed

File Change
mcp/provider/claude.go DefaultClaudeModelclaude-fable-5
api/handler_ai_model.go claude row's defaultModelclaude-fable-5
mcp/payment/claw402.go claw402ModelEndpoints gains claude-opus-4-8 and claude-fable-5; legacy claude-opus alias kept
store/ai_charge.go modelPrices gains claude-opus-4-8 = 0.18 and claude-fable-5 = 0.36
web/src/components/trader/model-constants.ts Both tiers in CLAW402_MODELS (Fable 5 with 🐉 icon) and BLOCKRUN_MODELS; AI_PROVIDER_CONFIG.claude.defaultModelclaude-fable-5

Diff stat: 5 files changed, 24 insertions(+), 4 deletions(-).

Scope boundary (what did NOT change)

  • The claude-opus legacy alias and claude-opus-4-6 entry remain unchanged.
  • Other Anthropic models: no change to Haiku / Sonnet lines (only Opus 4.8 + Fable 5 added here, matching what's currently available from the upstream Anthropic news posts).
  • Other providers (openai, google, xai, moonshot, etc.) are not touched.
  • AICharge table schema unchanged.

Compatibility

  • Backward compatible: legacy claude-opus / claude-opus-4-6 / generic claude (Anthropic-API) identifiers keep working and stay selectable.
  • Migration needed: no.
  • Config / env changes: no.

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 ./... passes
  • tsc --noEmit clean (excluding pre-existing StrategyStudioPage.tsx errors that predate this work)

Hansen1018 and others added 15 commits April 20, 2026 09:57
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.
@github-actions

Copy link
Copy Markdown

🤖 Advisory Check Results

These are advisory checks to help improve code quality. They won't block your PR from being merged.

📋 PR Information

Title Format: ✅ Good - Follows Conventional Commits
PR Size: 🟢 Small (28 lines: +24 -4)

🔧 Backend Checks

Go Formatting: ⚠️ Needs formatting

Files needing formatting
api/errors.go
api/handler_wallet.go
cmd/e2e_builder_fee/main.go
market/types.go
mcp/config.go
mcp/context_guard_test.go
mcp/options.go
mcp/payment/claw402.go
mcp/request.go
mcp/request_builder.go

Go Vet: ✅ Good
Tests: ✅ Passed

Fix locally:

go fmt ./...      # Format code
go vet ./...      # Check for issues
go test ./...     # Run tests

⚛️ Frontend Checks

Build & Type Check: ✅ Success

Fix locally:

cd web
npm run build  # Test build (includes type checking)

📖 Resources

Questions? 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.

@github-actions

Copy link
Copy Markdown

🤖 Advisory Check Results

These are advisory checks to help improve code quality. They won't block your PR from being merged.

📋 PR Information

Title Format: ✅ Good - Follows Conventional Commits
PR Size: 🟢 Small (28 lines: +24 -4)

🔧 Backend Checks

Go Formatting: ⚠️ Needs formatting

Files needing formatting
api/errors.go
api/handler_wallet.go
cmd/e2e_builder_fee/main.go
market/types.go
mcp/config.go
mcp/context_guard_test.go
mcp/options.go
mcp/payment/claw402.go
mcp/request.go
mcp/request_builder.go

Go Vet: ✅ Good
Tests: ✅ Passed

Fix locally:

go fmt ./...      # Format code
go vet ./...      # Check for issues
go test ./...     # Run tests

⚛️ Frontend Checks

Build & Type Check: ✅ Success

Fix locally:

cd web
npm run build  # Test build (includes type checking)

📖 Resources

Questions? 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.

@github-actions

Copy link
Copy Markdown

🤖 Advisory Check Results

These are advisory checks to help improve code quality. They won't block your PR from being merged.

📋 PR Information

Title Format: ✅ Good - Follows Conventional Commits
PR Size: 🟢 Small (28 lines: +24 -4)

🔧 Backend Checks

Go Formatting: ⚠️ Needs formatting

Files needing formatting
api/errors.go
api/handler_wallet.go
cmd/e2e_builder_fee/main.go
market/types.go
mcp/config.go
mcp/context_guard_test.go
mcp/options.go
mcp/payment/claw402.go
mcp/request.go
mcp/request_builder.go

Go Vet: ✅ Good
Tests: ✅ Passed

Fix locally:

go fmt ./...      # Format code
go vet ./...      # Check for issues
go test ./...     # Run tests

⚛️ Frontend Checks

Build & Type Check: ✅ Success

Fix locally:

cd web
npm run build  # Test build (includes type checking)

📖 Resources

Questions? 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.

Hansen1018 and others added 2 commits July 30, 2026 18:25
# Conflicts:
#	api/handler_ai_model.go
#	mcp/payment/claw402.go
#	store/ai_charge.go
#	web/src/components/trader/model-constants.ts
@Hansen1018
Hansen1018 force-pushed the feat/add-claude-fable-5-and-opus-4-8 branch from 44da6af to c079ab2 Compare July 30, 2026 12:04
@github-actions

Copy link
Copy Markdown

🤖 Advisory Check Results

These are advisory checks to help improve code quality. They won't block your PR from being merged.

📋 PR Information

Title Format: ✅ Good - Follows Conventional Commits
PR Size: 🟢 Small (4 lines: +2 -2)

🔧 Backend Checks

Go Formatting: ⚠️ Needs formatting

Files needing formatting
api/errors.go
api/handler_wallet.go
cmd/e2e_builder_fee/main.go
market/types.go
mcp/config.go
mcp/context_guard_test.go
mcp/options.go
mcp/request.go
mcp/request_builder.go
provider/hyperliquid/kline.go

Go Vet: ✅ Good
Tests: ✅ Passed

Fix locally:

go fmt ./...      # Format code
go vet ./...      # Check for issues
go test ./...     # Run tests

⚛️ Frontend Checks

Build & Type Check: ✅ Success

Fix locally:

cd web
npm run build  # Test build (includes type checking)

📖 Resources

Questions? 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.

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.

2 participants