Skip to content

Session title generation fails for non-EU Amazon Bedrock regions #12280

@NachoFLizaur

Description

@NachoFLizaur

Description

Session title generation fails for Amazon Bedrock users when their region doesn't match the first cross-region model variant returned by models.dev.

getSmallModel() returns the first model matching a priority string. Due to models.dev JSON key ordering, eu.anthropic.claude-haiku-4-5-20251001-v1:0 is returned before global. or us. variants, causing the function to fail silently and not generating the title.

Plugins

None

OpenCode version

1.1.51

Steps to reproduce

  1. Configure Amazon Bedrock provider with region us-east-1
  2. Start a new session and send a message
  3. Session title stays as "New session - [timestamp]"
  4. Check logs at ~/.local/share/opencode/log/ for error: statusCode":400 with "message":"The provided model identifier is invalid."
    • The logs show the EU model (eu.anthropic.claude-haiku-4-5-20251001-v1:0) being sent to the US endpoint (bedrock-runtime.us-east-1.amazonaws.com).
  5. Change back to an eu region and the title generates correctly.

Screenshot and/or share link

No response

Operating System

macOS 15.7.3

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions