diff --git a/CHANGELOG.md b/CHANGELOG.md index 671ba888..1bc4a70e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Bug fixes +* `ChatBedrock()`'s default model (previously `"us.anthropic.claude-sonnet-4-6"`) is now `"us.anthropic.claude-sonnet-5"`, which mantle's `api="messages"` endpoint actually serves. Separately, the cross-region inference prefix (e.g. `"us."`) is now stripped from the model id sent in requests to `api="messages"` and `api="responses"`, since mantle rejects it even though Converse requires it. Previously, a mantle-only model with a cross-region prefix (e.g. `model="us.openai.gpt-5.4"`) would 404. (#411) * `.to_solver()` no longer corrupts the system prompt or the prior turns it reads out of Inspect AI's message state. The system prompt was being set to the `repr()` of the `ChatMessageSystem` object rather than its text, and message content arriving in Inspect AI's `str` form (rather than as a list of `Content`) was iterated one character at a time. (#407) * `ChatGoogle()` no longer raises `ValueError: Unknown content type: ContentThinking` on the second and later turns when `reasoning` is enabled; thinking content is now replayed to the model as thought parts, and the `thought_signature` on thought parts is preserved (previously only tool-call parts kept it). (#403) * `ChatOllama()` now distinguishes a remote endpoint it can't reach from a genuinely missing local install, and validates a supplied `model` against `/api/tags` at construction time instead of only when `model` is omitted. (#393) diff --git a/chatlas/_provider_bedrock.py b/chatlas/_provider_bedrock.py index 12fdd603..ddba8dec 100644 --- a/chatlas/_provider_bedrock.py +++ b/chatlas/_provider_bedrock.py @@ -26,7 +26,7 @@ BedrockAPI = Literal["converse", "messages", "responses"] -DEFAULT_MODEL = "us.anthropic.claude-sonnet-4-6" +DEFAULT_MODEL = "us.anthropic.claude-sonnet-5" MANTLE_HOST = "https://bedrock-mantle.{region}.api.aws" @@ -98,7 +98,7 @@ def ChatBedrock( A system prompt to set the behavior of the assistant. model The model to use for the chat. Defaults to - `"us.anthropic.claude-sonnet-4-6"`. + `"us.anthropic.claude-sonnet-5"`. api Which Bedrock API to use. The default, `None`, picks the API from `model`. @@ -183,7 +183,9 @@ def ChatBedrock( ) return Chat( provider=BedrockResponsesProvider( - model=model, + # Converse needs the cross-region inference prefix, but mantle + # rejects it on the model id in the request. + model=bedrock_strip_region_prefix(model), aws_profile=aws_profile, aws_region=region, base_url=base_url, @@ -215,7 +217,9 @@ def ChatBedrock( return Chat( provider=BedrockMessagesProvider( - model=model, + # Converse needs the cross-region inference prefix, but mantle + # rejects it on the model id in the request. + model=bedrock_strip_region_prefix(model), aws_profile=aws_profile, aws_region=region, base_url=base_url, @@ -457,6 +461,19 @@ def bedrock_api_for_model(model: Optional[str]) -> BedrockAPI: return MODEL_APIS.get(CROSS_REGION_PREFIX.sub("", model), "converse") +def bedrock_strip_region_prefix(model: str) -> str: + """ + Strip a cross-region inference prefix (e.g. `"us."`) from `model`. + + Converse needs the prefix on the model id it's sent, since that's how it + picks the inference profile. Mantle's Anthropic and OpenAI-compatible + endpoints have no such concept and 404 if the prefix is included, so it + must be stripped from the model id used in requests to `"messages"` and + `"responses"`. + """ + return CROSS_REGION_PREFIX.sub("", model) + + def aws_endpoint_url(var: str, default: str) -> str: """An AWS service endpoint override env var, or `default` when unset.""" url = os.environ.get(var, "") diff --git a/chatlas/data/prices.json b/chatlas/data/prices.json index 3578b77b..e5cb4e40 100644 --- a/chatlas/data/prices.json +++ b/chatlas/data/prices.json @@ -1,7 +1,7 @@ { "schema_version": 1, "min_ellmer_version": "0.5.0", - "updated_at": "2026-08-24T06:42:01Z", + "updated_at": "2026-09-02T12:13:24Z", "data": [ { "provider": "AWS/Bedrock", @@ -61,6 +61,13 @@ "output": 17.5, "cached_input": 0.546875 }, + { + "provider": "AWS/Bedrock", + "model": "amazon.nova-2-sonic-v1:0", + "variant": "", + "input": 0.33, + "output": 2.75 + }, { "provider": "AWS/Bedrock", "model": "amazon.nova-lite-v1:0", @@ -82,6 +89,13 @@ "input": 0.8, "output": 3.2 }, + { + "provider": "AWS/Bedrock", + "model": "amazon.nova-sonic-v1:0", + "variant": "", + "input": 0.06, + "output": 0.24 + }, { "provider": "AWS/Bedrock", "model": "amazon.titan-embed-g1-text-02", @@ -219,6 +233,14 @@ "output": 50, "cached_input": 1 }, + { + "provider": "AWS/Bedrock", + "model": "anthropic.claude-fable-5-1", + "variant": "", + "input": 10, + "output": 50, + "cached_input": 0.25 + }, { "provider": "AWS/Bedrock", "model": "anthropic.claude-haiku-4-5-20251001-v1:0", @@ -1104,6 +1126,14 @@ "output": 55, "cached_input": 1.1 }, + { + "provider": "AWS/Bedrock", + "model": "eu.anthropic.claude-fable-5-1", + "variant": "", + "input": 11, + "output": 55, + "cached_input": 0.275 + }, { "provider": "AWS/Bedrock", "model": "eu.anthropic.claude-haiku-4-5-20251001-v1:0", @@ -1287,6 +1317,14 @@ "output": 50, "cached_input": 1 }, + { + "provider": "AWS/Bedrock", + "model": "global.anthropic.claude-fable-5-1", + "variant": "", + "input": 10, + "output": 50, + "cached_input": 0.25 + }, { "provider": "AWS/Bedrock", "model": "global.anthropic.claude-haiku-4-5-20251001-v1:0", @@ -1417,17 +1455,17 @@ "provider": "AWS/Bedrock", "model": "global.openai.gpt-5.6-sol", "variant": "", - "input": 5, - "output": 30, - "cached_input": 0.5 + "input": 4, + "output": 20, + "cached_input": 0.4 }, { "provider": "AWS/Bedrock", "model": "global.openai.gpt-5.6-sol", "variant": "above_272k_tokens", - "input": 10, - "output": 45, - "cached_input": 1 + "input": 8, + "output": 30, + "cached_input": 0.8 }, { "provider": "AWS/Bedrock", @@ -1862,6 +1900,14 @@ "output": 16.5, "cached_input": 0.275 }, + { + "provider": "AWS/Bedrock", + "model": "openai.gpt-5.4", + "variant": "above_272k_tokens", + "input": 5.5, + "output": 24.75, + "cached_input": 0.55 + }, { "provider": "AWS/Bedrock", "model": "openai.gpt-5.5", @@ -1870,6 +1916,22 @@ "output": 33, "cached_input": 0.55 }, + { + "provider": "AWS/Bedrock", + "model": "openai.gpt-5.5", + "variant": "above_272k_tokens", + "input": 11, + "output": 49.5, + "cached_input": 1.1 + }, + { + "provider": "AWS/Bedrock", + "model": "openai.gpt-5.6-cyber", + "variant": "", + "input": 13.75, + "output": 82.5, + "cached_input": 1.375 + }, { "provider": "AWS/Bedrock", "model": "openai.gpt-5.6-luna", @@ -2661,6 +2723,14 @@ "output": 55, "cached_input": 1.1 }, + { + "provider": "AWS/Bedrock", + "model": "us.anthropic.claude-fable-5-1", + "variant": "", + "input": 11, + "output": 55, + "cached_input": 0.275 + }, { "provider": "AWS/Bedrock", "model": "us.anthropic.claude-haiku-4-5-20251001-v1:0", @@ -2912,17 +2982,17 @@ "provider": "AWS/Bedrock", "model": "us.openai.gpt-5.6-sol", "variant": "", - "input": 5.5, - "output": 33, - "cached_input": 0.55 + "input": 4.4, + "output": 22, + "cached_input": 0.44 }, { "provider": "AWS/Bedrock", "model": "us.openai.gpt-5.6-sol", "variant": "above_272k_tokens", - "input": 11, - "output": 49.5, - "cached_input": 1.1 + "input": 8.8, + "output": 33, + "cached_input": 0.88 }, { "provider": "AWS/Bedrock", @@ -3082,6 +3152,14 @@ "output": 50, "cached_input": 1 }, + { + "provider": "Anthropic", + "model": "claude-fable-5-1", + "variant": "", + "input": 10, + "output": 50, + "cached_input": 0.25 + }, { "provider": "Anthropic", "model": "claude-haiku-4-5", @@ -3494,13 +3572,21 @@ "output": 49.5, "cached_input": 1.1 }, + { + "provider": "Azure/OpenAI", + "model": "eu/gpt-5.6", + "variant": "above_272k_tokens_priority", + "input": 22, + "output": 99, + "cached_input": 2.2 + }, { "provider": "Azure/OpenAI", "model": "eu/gpt-5.6", "variant": "priority", - "input": 13.75, - "output": 82.5, - "cached_input": 1.375 + "input": 11, + "output": 66, + "cached_input": 1.1 }, { "provider": "Azure/OpenAI", @@ -3518,13 +3604,21 @@ "output": 1.98, "cached_input": 0.044 }, + { + "provider": "Azure/OpenAI", + "model": "eu/gpt-5.6-luna", + "variant": "above_272k_tokens_priority", + "input": 0.88, + "output": 3.96, + "cached_input": 0.088 + }, { "provider": "Azure/OpenAI", "model": "eu/gpt-5.6-luna", "variant": "priority", - "input": 0.55, - "output": 3.3, - "cached_input": 0.055 + "input": 0.44, + "output": 2.64, + "cached_input": 0.044 }, { "provider": "Azure/OpenAI", @@ -3542,13 +3636,21 @@ "output": 49.5, "cached_input": 1.1 }, + { + "provider": "Azure/OpenAI", + "model": "eu/gpt-5.6-sol", + "variant": "above_272k_tokens_priority", + "input": 22, + "output": 99, + "cached_input": 2.2 + }, { "provider": "Azure/OpenAI", "model": "eu/gpt-5.6-sol", "variant": "priority", - "input": 13.75, - "output": 82.5, - "cached_input": 1.375 + "input": 11, + "output": 66, + "cached_input": 1.1 }, { "provider": "Azure/OpenAI", @@ -3566,13 +3668,21 @@ "output": 19.8, "cached_input": 0.44 }, + { + "provider": "Azure/OpenAI", + "model": "eu/gpt-5.6-terra", + "variant": "above_272k_tokens_priority", + "input": 8.8, + "output": 39.6, + "cached_input": 0.88 + }, { "provider": "Azure/OpenAI", "model": "eu/gpt-5.6-terra", "variant": "priority", - "input": 5.5, - "output": 33, - "cached_input": 0.55 + "input": 4.4, + "output": 26.4, + "cached_input": 0.44 }, { "provider": "Azure/OpenAI", @@ -5173,13 +5283,21 @@ "output": 49.5, "cached_input": 1.1 }, + { + "provider": "Azure/OpenAI", + "model": "us/gpt-5.6", + "variant": "above_272k_tokens_priority", + "input": 22, + "output": 99, + "cached_input": 2.2 + }, { "provider": "Azure/OpenAI", "model": "us/gpt-5.6", "variant": "priority", - "input": 13.75, - "output": 82.5, - "cached_input": 1.375 + "input": 11, + "output": 66, + "cached_input": 1.1 }, { "provider": "Azure/OpenAI", @@ -5197,13 +5315,21 @@ "output": 1.98, "cached_input": 0.044 }, + { + "provider": "Azure/OpenAI", + "model": "us/gpt-5.6-luna", + "variant": "above_272k_tokens_priority", + "input": 0.88, + "output": 3.96, + "cached_input": 0.088 + }, { "provider": "Azure/OpenAI", "model": "us/gpt-5.6-luna", "variant": "priority", - "input": 0.55, - "output": 3.3, - "cached_input": 0.055 + "input": 0.44, + "output": 2.64, + "cached_input": 0.044 }, { "provider": "Azure/OpenAI", @@ -5221,13 +5347,21 @@ "output": 49.5, "cached_input": 1.1 }, + { + "provider": "Azure/OpenAI", + "model": "us/gpt-5.6-sol", + "variant": "above_272k_tokens_priority", + "input": 22, + "output": 99, + "cached_input": 2.2 + }, { "provider": "Azure/OpenAI", "model": "us/gpt-5.6-sol", "variant": "priority", - "input": 13.75, - "output": 82.5, - "cached_input": 1.375 + "input": 11, + "output": 66, + "cached_input": 1.1 }, { "provider": "Azure/OpenAI", @@ -5245,13 +5379,21 @@ "output": 19.8, "cached_input": 0.44 }, + { + "provider": "Azure/OpenAI", + "model": "us/gpt-5.6-terra", + "variant": "above_272k_tokens_priority", + "input": 8.8, + "output": 39.6, + "cached_input": 0.88 + }, { "provider": "Azure/OpenAI", "model": "us/gpt-5.6-terra", "variant": "priority", - "input": 5.5, - "output": 33, - "cached_input": 0.55 + "input": 4.4, + "output": 26.4, + "cached_input": 0.44 }, { "provider": "Azure/OpenAI", @@ -5418,7 +5560,7 @@ "variant": "", "input": 0.1, "output": 0.4, - "cached_input": 0.025 + "cached_input": 0.01 }, { "provider": "Google/Gemini", @@ -5432,22 +5574,22 @@ "provider": "Google/Gemini", "model": "gemini-2.5-flash-native-audio-latest", "variant": "", - "input": 0.3, - "output": 2.5 + "input": 0.5, + "output": 2 }, { "provider": "Google/Gemini", "model": "gemini-2.5-flash-native-audio-preview-09-2025", "variant": "", - "input": 0.3, - "output": 2.5 + "input": 0.5, + "output": 2 }, { "provider": "Google/Gemini", "model": "gemini-2.5-flash-native-audio-preview-12-2025", "variant": "", - "input": 0.3, - "output": 2.5 + "input": 0.5, + "output": 2 }, { "provider": "Google/Gemini", @@ -5455,14 +5597,14 @@ "variant": "", "input": 0.3, "output": 2.5, - "cached_input": 0.075 + "cached_input": 0.03 }, { "provider": "Google/Gemini", "model": "gemini-2.5-flash-preview-tts", "variant": "", - "input": 0.3, - "output": 2.5 + "input": 0.5, + "output": 10 }, { "provider": "Google/Gemini", @@ -5498,18 +5640,10 @@ "provider": "Google/Gemini", "model": "gemini-2.5-pro-preview-tts", "variant": "", - "input": 1.25, - "output": 10, + "input": 1, + "output": 20, "cached_input": 0.125 }, - { - "provider": "Google/Gemini", - "model": "gemini-2.5-pro-preview-tts", - "variant": "above_200k_tokens", - "input": 2.5, - "output": 15, - "cached_input": 0.25 - }, { "provider": "Google/Gemini", "model": "gemini-3-flash-preview", @@ -5835,6 +5969,20 @@ "input": 3.5, "output": 21 }, + { + "provider": "Google/Gemini", + "model": "gemini-3.5-transcribe", + "variant": "", + "input": 2, + "output": 12 + }, + { + "provider": "Google/Gemini", + "model": "gemini-3.5-transcribe-live", + "variant": "", + "input": 3.5, + "output": 21 + }, { "provider": "Google/Gemini", "model": "gemini-3.6-flash", @@ -5960,10 +6108,17 @@ "provider": "Google/Gemini", "model": "gemini-live-2.5-flash-preview-native-audio-09-2025", "variant": "", - "input": 0.3, + "input": 0.5, "output": 2, "cached_input": 0.075 }, + { + "provider": "Google/Gemini", + "model": "gemini-omni-1.1-flash", + "variant": "", + "input": 1.5, + "output": 9 + }, { "provider": "Google/Gemini", "model": "gemini-omni-flash-preview", @@ -6017,6 +6172,20 @@ "input": 2, "output": 10 }, + { + "provider": "Google/Gemini", + "model": "nano-banana-pro-preview", + "variant": "", + "input": 2, + "output": 12 + }, + { + "provider": "Google/Gemini", + "model": "nano-banana-pro-preview", + "variant": "batches", + "input": 1, + "output": 6 + }, { "provider": "Google/Vertex", "model": "deep-research-pro-preview-12-2025", @@ -6107,7 +6276,7 @@ "variant": "", "input": 0.1, "output": 0.4, - "cached_input": 0.025 + "cached_input": 0.01 }, { "provider": "Google/Vertex", @@ -6123,7 +6292,7 @@ "variant": "", "input": 0.3, "output": 2.5, - "cached_input": 0.075 + "cached_input": 0.03 }, { "provider": "Google/Vertex", @@ -6145,18 +6314,10 @@ "provider": "Google/Vertex", "model": "gemini-2.5-pro-preview-tts", "variant": "", - "input": 1.25, - "output": 10, + "input": 1, + "output": 20, "cached_input": 0.125 }, - { - "provider": "Google/Vertex", - "model": "gemini-2.5-pro-preview-tts", - "variant": "above_200k_tokens", - "input": 2.5, - "output": 15, - "cached_input": 0.25 - }, { "provider": "Google/Vertex", "model": "gemini-3-flash-preview", @@ -6422,7 +6583,7 @@ "variant": "flex", "input": 0.15, "output": 1.25, - "cached_input": 0.02 + "cached_input": 0.015 }, { "provider": "Google/Vertex", @@ -6494,11 +6655,18 @@ "output": 6.75, "cached_input": 0.135 }, + { + "provider": "Google/Vertex", + "model": "gemini-live-2.5-flash-native-audio", + "variant": "", + "input": 0.5, + "output": 2 + }, { "provider": "Google/Vertex", "model": "gemini-live-2.5-flash-preview-native-audio-09-2025", "variant": "", - "input": 0.3, + "input": 0.5, "output": 2, "cached_input": 0.075 }, @@ -6656,7 +6824,7 @@ "variant": "flex", "input": 0.15, "output": 1.25, - "cached_input": 0.02 + "cached_input": 0.015 }, { "provider": "Google/Vertex", @@ -6768,6 +6936,13 @@ "input": 0.6, "output": 3 }, + { + "provider": "Groq", + "model": "qwen/qwen3.8-27b", + "variant": "", + "input": 0.8, + "output": 4 + }, { "provider": "Mistral", "model": "codestral-2405", @@ -6780,26 +6955,30 @@ "model": "codestral-2508", "variant": "", "input": 0.3, - "output": 0.9 + "output": 0.9, + "cached_input": 0.03 }, { "provider": "Mistral", "model": "codestral-embed", "variant": "", - "input": 0.15 + "input": 0.15, + "cached_input": 0.015 }, { "provider": "Mistral", "model": "codestral-embed-2505", "variant": "", - "input": 0.15 + "input": 0.15, + "cached_input": 0.015 }, { "provider": "Mistral", "model": "codestral-latest", "variant": "", "input": 0.3, - "output": 0.9 + "output": 0.9, + "cached_input": 0.03 }, { "provider": "Mistral", @@ -6923,38 +7102,94 @@ }, { "provider": "Mistral", - "model": "ministral-3-14b-2512", + "model": "ministral-14b-2512", "variant": "", "input": 0.2, "output": 0.2 }, + { + "provider": "Mistral", + "model": "ministral-14b-latest", + "variant": "", + "input": 0.2, + "output": 0.2 + }, + { + "provider": "Mistral", + "model": "ministral-3-14b-2512", + "variant": "", + "input": 0.2, + "output": 0.2, + "cached_input": 0.02 + }, { "provider": "Mistral", "model": "ministral-3-3b-2512", "variant": "", "input": 0.1, - "output": 0.1 + "output": 0.1, + "cached_input": 0.01 }, { "provider": "Mistral", "model": "ministral-3-8b-2512", "variant": "", "input": 0.15, - "output": 0.15 + "output": 0.15, + "cached_input": 0.015 + }, + { + "provider": "Mistral", + "model": "ministral-3b-2512", + "variant": "", + "input": 0.1, + "output": 0.1 + }, + { + "provider": "Mistral", + "model": "ministral-3b-latest", + "variant": "", + "input": 0.1, + "output": 0.1 }, { "provider": "Mistral", "model": "ministral-8b-2512", "variant": "", "input": 0.15, - "output": 0.15 + "output": 0.15, + "cached_input": 0.015 }, { "provider": "Mistral", "model": "ministral-8b-latest", "variant": "", "input": 0.15, - "output": 0.15 + "output": 0.15, + "cached_input": 0.015 + }, + { + "provider": "Mistral", + "model": "mistral-code-agent-latest", + "variant": "", + "input": 0.4, + "output": 2 + }, + { + "provider": "Mistral", + "model": "mistral-code-fim-latest", + "variant": "", + "input": 0.3, + "output": 0.9, + "cached_input": 0.03 + }, + { + "provider": "Mistral", + "model": "mistral-code-latest", + "variant": "", + "input": 0.3, + "output": 0.9, + "cached_input": 0.03 }, { "provider": "Mistral", @@ -6962,6 +7197,12 @@ "variant": "", "input": 0.1 }, + { + "provider": "Mistral", + "model": "mistral-embed-2312", + "variant": "", + "input": 0.1 + }, { "provider": "Mistral", "model": "mistral-large-2402", @@ -6988,21 +7229,24 @@ "model": "mistral-large-2512", "variant": "", "input": 0.5, - "output": 1.5 + "output": 1.5, + "cached_input": 0.05 }, { "provider": "Mistral", "model": "mistral-large-3", "variant": "", "input": 0.5, - "output": 1.5 + "output": 1.5, + "cached_input": 0.05 }, { "provider": "Mistral", "model": "mistral-large-latest", "variant": "", "input": 0.5, - "output": 1.5 + "output": 1.5, + "cached_input": 0.05 }, { "provider": "Mistral", @@ -7037,6 +7281,14 @@ "model": "mistral-medium-2604", "variant": "", "input": 1.5, + "output": 7.5, + "cached_input": 0.15 + }, + { + "provider": "Mistral", + "model": "mistral-medium-3", + "variant": "", + "input": 1.5, "output": 7.5 }, { @@ -7051,14 +7303,24 @@ "model": "mistral-medium-3-5", "variant": "", "input": 1.5, - "output": 7.5 + "output": 7.5, + "cached_input": 0.15 + }, + { + "provider": "Mistral", + "model": "mistral-medium-3.5", + "variant": "", + "input": 1.5, + "output": 7.5, + "cached_input": 0.15 }, { "provider": "Mistral", "model": "mistral-medium-latest", "variant": "", "input": 1.5, - "output": 7.5 + "output": 7.5, + "cached_input": 0.15 }, { "provider": "Mistral", @@ -7072,7 +7334,8 @@ "model": "mistral-small-2603", "variant": "", "input": 0.15, - "output": 0.6 + "output": 0.6, + "cached_input": 0.015 }, { "provider": "Mistral", @@ -7086,7 +7349,8 @@ "model": "mistral-small-latest", "variant": "", "input": 0.15, - "output": 0.6 + "output": 0.6, + "cached_input": 0.015 }, { "provider": "Mistral", @@ -7095,6 +7359,30 @@ "input": 0.25, "output": 0.25 }, + { + "provider": "Mistral", + "model": "mistral-vibe-cli-fast", + "variant": "", + "input": 0.15, + "output": 0.6, + "cached_input": 0.015 + }, + { + "provider": "Mistral", + "model": "mistral-vibe-cli-latest", + "variant": "", + "input": 1.5, + "output": 7.5, + "cached_input": 0.15 + }, + { + "provider": "Mistral", + "model": "mistral-vibe-cli-with-tools", + "variant": "", + "input": 1.5, + "output": 7.5, + "cached_input": 0.15 + }, { "provider": "Mistral", "model": "open-codestral-mamba", @@ -7158,6 +7446,20 @@ "input": 2, "output": 6 }, + { + "provider": "Mistral", + "model": "voxtral-small-2507", + "variant": "", + "input": 0.1, + "output": 0.4 + }, + { + "provider": "Mistral", + "model": "voxtral-small-latest", + "variant": "", + "input": 0.1, + "output": 0.4 + }, { "provider": "Mistral", "model": "zai-glm-5-2", diff --git a/chatlas/types/anthropic/_submit.py b/chatlas/types/anthropic/_submit.py index 5931a0c3..af13d8b7 100644 --- a/chatlas/types/anthropic/_submit.py +++ b/chatlas/types/anthropic/_submit.py @@ -46,6 +46,8 @@ class SubmitInputArgs(TypedDict, total=False): messages: Iterable[anthropic.types.message_param.MessageParam] model: Union[ Literal[ + "claude-fable-5-1", + "claude-mythos-5-1", "claude-sonnet-5", "claude-fable-5", "claude-mythos-5", diff --git a/tests/test_provider_bedrock_converse.py b/tests/test_provider_bedrock_converse.py index 4d5e0f71..f17435d6 100644 --- a/tests/test_provider_bedrock_converse.py +++ b/tests/test_provider_bedrock_converse.py @@ -1044,7 +1044,7 @@ def test_default_model_is_ellmers_claude_sonnet(self): chat = ChatBedrock(aws_region="us-east-1") - assert chat.provider.model == "us.anthropic.claude-sonnet-4-6" + assert chat.provider.model == "us.anthropic.claude-sonnet-5" assert isinstance(chat.provider, BedrockConverseProvider) def test_claude_routes_to_converse_not_mantle(self): diff --git a/tests/test_provider_bedrock_mantle.py b/tests/test_provider_bedrock_mantle.py index 63545ded..ac5c1d7f 100644 --- a/tests/test_provider_bedrock_mantle.py +++ b/tests/test_provider_bedrock_mantle.py @@ -120,6 +120,12 @@ def test_client_points_at_the_openai_v1_mantle_path(self): "https://bedrock-mantle.us-west-2.api.aws/openai/v1" ) + def test_cross_region_prefix_is_stripped_from_the_responses_model(self): + # Converse needs the prefix, but mantle 404s if it's included in the + # request's model id. + chat = ChatBedrock(model="us.openai.gpt-5.4", aws_region="us-east-1") + assert chat.provider.model == "openai.gpt-5.4" + def test_list_models_uses_the_v1_mantle_path(self): # Mantle serves model listings at /v1/models; /openai/v1/models 404s, # so list_models() must hit a different base URL than chat requests do. @@ -204,6 +210,23 @@ def test_client_points_at_the_anthropic_mantle_path(self): "https://bedrock-mantle.us-east-1.api.aws/anthropic" ) + def test_default_model_is_served_by_mantle(self): + # The default model carries a cross-region prefix (needed for + # Converse), but it must still resolve to a model mantle's Anthropic + # endpoint actually serves when `api="messages"` is requested + # explicitly without a model. + from chatlas._provider_bedrock import DEFAULT_MODEL + + chat = ChatBedrock(api="messages", aws_region="us-east-1") + assert chat.provider.model == "anthropic.claude-sonnet-5" + assert DEFAULT_MODEL == "us.anthropic.claude-sonnet-5" + + def test_cross_region_prefix_is_stripped_from_the_messages_model(self): + # Converse needs the prefix, but mantle 404s if it's included in the + # request's model id. + chat = ChatBedrock(model="us.anthropic.claude-mythos-5", aws_region="us-east-1") + assert chat.provider.model == "anthropic.claude-mythos-5" + def test_cache_auto_becomes_a_5m_ttl(self): chat = ChatBedrock( model="anthropic.claude-haiku-4-5", api="messages", aws_region="us-east-1"