Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/ruby_llm/aliases.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
"vertexai": "claude-haiku-4-5",
"azure": "claude-haiku-4-5-20251001"
},
"claude-haiku-5-5": {
"anthropic": "claude-haiku-5-5",
"bedrock": "us.anthropic.claude-haiku-5-5"
},
"claude-opus-4": {
"anthropic": "claude-opus-4-20250514",
"openrouter": "anthropic/claude-opus-4",
Expand Down
319 changes: 319 additions & 0 deletions lib/ruby_llm/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,85 @@
"knowledge": "2025-02-28"
}
},
{
"id": "claude-haiku-5-5",
"name": "Claude Haiku 5.5",
"provider": "anthropic",
"family": "claude-haiku",
"created_at": "2026-10-07 00:00:00 UTC",
"context_window": 1000000,
"max_output_tokens": 128000,
"knowledge_cutoff": null,
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
},
"capabilities": [
"function_calling",
"structured_output",
"reasoning",
"vision"
],
"pricing": {
"text_tokens": {
"standard": {
"input_per_million": 0.1,
"output_per_million": 0.5,
"cache_read_input_per_million": 0.01,
"cache_write_input_per_million": 0.125
}
}
},
"metadata": {
"source": "models.dev",
"provider_id": "anthropic",
"open_weights": false,
"attachment": true,
"temperature": false,
"last_updated": "2026-10-07",
"reasoning_options": [
{
"type": "effort",
"values": [
"low",
"medium",
"high",
"xhigh",
"max"
]
}
],
"cost": {
"input": 0.1,
"output": 0.5,
"cache_read": 0.01,
"cache_write": 0.125,
"tiers": [
{
"input": 0.5,
"output": 2.5,
"cache_read": 0.05,
"cache_write": 0.625,
"tier": {
"type": "context",
"size": 100000
}
}
]
},
"limit": {
"context": 1000000,
"output": 128000
},
"knowledge": "2026-06"
}
},
{
"id": "claude-opus-4-0",
"name": "Claude Opus 4 (latest)",
Expand Down Expand Up @@ -11490,6 +11569,85 @@
"knowledge": "2025-02-28"
}
},
{
"id": "anthropic.claude-haiku-5-5",
"name": "Claude Haiku 5.5",
"provider": "bedrock",
"family": "claude-haiku",
"created_at": "2026-10-07 00:00:00 UTC",
"context_window": 1000000,
"max_output_tokens": 128000,
"knowledge_cutoff": null,
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
},
"capabilities": [
"function_calling",
"structured_output",
"reasoning",
"vision"
Comment on lines +11591 to +11596

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The three Bedrock Haiku 5.5 entries (here, plus global. at ~14440 and us. at ~19912) leave out structured_output, even though the anthropic entry lists it.

The PR description says "Haiku 4.5's entries don't list" structured_output. That's not true on Bedrock: anthropic.claude-haiku-4-5-20251001-v1:0 (line 11532) and us.anthropic.claude-haiku-4-5-20251001-v1:0 (line 19827) both list it. Also, Providers::Bedrock::Models.supports_structured_output? (providers/bedrock/models.rb:111-121) returns true for claude-haiku-5-5, so a registry refresh would add the capability anyway. As written, model.structured_output? / supports?(:structured_output) returns false for every Bedrock Haiku 5.5 id. Any consumer that checks the capability before calling with_schema would wrongly skip structured output on Bedrock.

Fix: add "structured_output" to the capabilities array of all three Bedrock entries.

],
"pricing": {
"text_tokens": {
"standard": {
"input_per_million": 0.1,
"output_per_million": 0.5,
"cache_read_input_per_million": 0.01,
"cache_write_input_per_million": 0.125
}
}
},
"metadata": {
"source": "models.dev",
"provider_id": "amazon-bedrock",
"open_weights": false,
"attachment": true,
"temperature": false,
"last_updated": "2026-10-07",
"reasoning_options": [
{
"type": "effort",
"values": [
"low",
"medium",
"high",
"xhigh",
"max"
]
}
],
"cost": {
"input": 0.1,
"output": 0.5,
"cache_read": 0.01,
"cache_write": 0.125,
"tiers": [
{
"input": 0.5,
"output": 2.5,
"cache_read": 0.05,
"cache_write": 0.625,
"tier": {
"type": "context",
"size": 100000
}
}
]
},
"limit": {
"context": 1000000,
"output": 128000
},
"knowledge": "2026-06"
}
},
{
"id": "anthropic.claude-opus-4-1-20250805-v1:0",
"name": "Claude Opus 4.1",
Expand Down Expand Up @@ -14261,6 +14419,85 @@
"knowledge": "2025-02-28"
}
},
{
"id": "global.anthropic.claude-haiku-5-5",
"name": "Claude Haiku 5.5 (Global)",
"provider": "bedrock",
"family": "claude-haiku",
"created_at": "2026-10-07 00:00:00 UTC",
"context_window": 1000000,
"max_output_tokens": 128000,
"knowledge_cutoff": null,
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
},
"capabilities": [
"function_calling",
"structured_output",
"reasoning",
"vision"
],
"pricing": {
"text_tokens": {
"standard": {
"input_per_million": 0.1,
"output_per_million": 0.5,
"cache_read_input_per_million": 0.01,
"cache_write_input_per_million": 0.125
}
}
},
"metadata": {
"source": "models.dev",
"provider_id": "amazon-bedrock",
"open_weights": false,
"attachment": true,
"temperature": false,
"last_updated": "2026-10-07",
"reasoning_options": [
{
"type": "effort",
"values": [
"low",
"medium",
"high",
"xhigh",
"max"
]
}
],
"cost": {
"input": 0.1,
"output": 0.5,
"cache_read": 0.01,
"cache_write": 0.125,
"tiers": [
{
"input": 0.5,
"output": 2.5,
"cache_read": 0.05,
"cache_write": 0.625,
"tier": {
"type": "context",
"size": 100000
}
}
]
},
"limit": {
"context": 1000000,
"output": 128000
},
"knowledge": "2026-06"
}
},
{
"id": "global.anthropic.claude-opus-4-5-20251101-v1:0",
"name": "Claude Opus 4.5 (Global)",
Expand Down Expand Up @@ -19655,6 +19892,88 @@
"knowledge": "2025-02-28"
}
},
{
"id": "us.anthropic.claude-haiku-5-5",
"name": "Claude Haiku 5.5 (US)",
"provider": "bedrock",
"family": "claude-haiku",
"created_at": "2026-10-07 00:00:00 UTC",
"context_window": 1000000,
"max_output_tokens": 128000,
"knowledge_cutoff": null,
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
},
"capabilities": [
"function_calling",
"structured_output",
"reasoning",
"vision"
],
"pricing": {
"text_tokens": {
"standard": {
"input_per_million": 0.11,
"output_per_million": 0.55,
"cache_read_input_per_million": 0.011,
"cache_write_input_per_million": 0.1375
}
}
},
Comment on lines +19930 to +19935

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The new Bedrock entries have no metadata.inference_types, so a bare model id never gets mapped to its regional inference profile.

Models#resolve_bedrock_region_id (lib/ruby_llm/models.rb:502-514) finds the regional candidate (us.anthropic.claude-haiku-5-5), then calls normalize_inference_profile_id(model_id, candidate.metadata[:inference_types], region). That method returns the id unchanged unless inference_types includes INFERENCE_PROFILE (providers/bedrock/models.rb:58-63). Because these entries leave it out, RubyLLM.chat(model: 'anthropic.claude-haiku-5-5', provider: :bedrock) with bedrock_region = 'us-west-2' sends the bare foundation-model id to Converse. The existing us.anthropic.claude-haiku-4-5-20251001-v1:0 entry (line ~19845) sets "inference_types": ["INFERENCE_PROFILE"] so that the bare 4.5 id becomes us.. Recent Claude models on Bedrock only accept inference profiles, so the bare id is likely to fail with an on-demand-throughput error.

Fix: add "inference_types": ["INFERENCE_PROFILE"] to the us. and global. entries' metadata, and add a spec that find('anthropic.claude-haiku-5-5', :bedrock) resolves to us.anthropic.claude-haiku-5-5 under us-west-2.

"metadata": {
"inference_types": [
"INFERENCE_PROFILE"
],
"source": "models.dev",
"provider_id": "amazon-bedrock",
"open_weights": false,
"attachment": true,
"temperature": false,
"last_updated": "2026-10-07",
"reasoning_options": [
{
"type": "effort",
"values": [
"low",
"medium",
"high",
"xhigh",
"max"
]
}
],
"cost": {
"input": 0.11,
"output": 0.55,
"cache_read": 0.011,
"cache_write": 0.1375,
"tiers": [
{
"input": 0.55,
"output": 2.75,
"cache_read": 0.055,
"cache_write": 0.6875,
"tier": {
"type": "context",
"size": 100000
}
}
]
},
"limit": {
"context": 1000000,
"output": 128000
},
"knowledge": "2026-06"
}
},
{
"id": "us.anthropic.claude-opus-4-1-20250805-v1:0",
"name": "Claude Opus 4.1 (US)",
Expand Down
Loading
Loading