From ef1c05c13b7495d7dae5f5fddf85c609de184d13 Mon Sep 17 00:00:00 2001 From: Rune Olsen Date: Tue, 16 Jun 2026 11:56:05 +0200 Subject: [PATCH] Add Claude Fable 5 pricing ($10/$50 per 1M tokens) Co-Authored-By: Claude Sonnet 4.6 --- .../xcshareddata/xcschemes/oAI.xcscheme | 79 ------------------- oAI/Providers/AnthropicProvider.swift | 10 +++ 2 files changed, 10 insertions(+), 79 deletions(-) delete mode 100644 oAI.xcodeproj/xcshareddata/xcschemes/oAI.xcscheme diff --git a/oAI.xcodeproj/xcshareddata/xcschemes/oAI.xcscheme b/oAI.xcodeproj/xcshareddata/xcschemes/oAI.xcscheme deleted file mode 100644 index 2336f58..0000000 --- a/oAI.xcodeproj/xcshareddata/xcschemes/oAI.xcscheme +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/oAI/Providers/AnthropicProvider.swift b/oAI/Providers/AnthropicProvider.swift index 8e17e8f..9ed37e4 100644 --- a/oAI/Providers/AnthropicProvider.swift +++ b/oAI/Providers/AnthropicProvider.swift @@ -77,6 +77,15 @@ class AnthropicProvider: AIProvider { /// falls back to prefix matching so newly-released model variants (e.g. "claude-sonnet-4-6-20260301") /// still inherit the correct pricing tier. private static let knownModels: [ModelInfo] = [ + // Claude Fable 5 + ModelInfo( + id: "claude-fable-5", + name: "Claude Fable 5", + description: "Anthropic's creative and storytelling model", + contextLength: 200_000, + pricing: .init(prompt: 10.0, completion: 50.0), + capabilities: .init(vision: true, tools: true, online: true) + ), // Claude 4.x series ModelInfo( id: "claude-opus-4-6", @@ -173,6 +182,7 @@ class AnthropicProvider: AIProvider { /// Pricing tiers used for fuzzy fallback matching on unknown model IDs. /// Keyed by model name prefix (longest match wins). private static let pricingFallback: [(prefix: String, prompt: Double, completion: Double)] = [ + ("claude-fable", 10.0, 50.0), ("claude-opus", 15.0, 75.0), ("claude-sonnet", 3.0, 15.0), ("claude-haiku", 0.80, 4.0),