Switch to using Claude Sonnet 4 (Claude-4-sonnet) in the Amazon Q Developer CLI
CK 3788 Created at
64800
In order to use Claude Sonnet 4 (Claude-4-sonnet), Amazon Q Developer CLI versionv1.11.0 or newer is required. Make sure you're up to date.
How to Select Claude Sonnet 4
For a single chat session, launch the CLI using:
q chat --model claude-4-sonnet
This session will use Claude 4 unless switched during the conversation.
To switch models mid-chat, type:
/model claude-4-sonnet
The change will persist until the session ends.
To make Claude 4 your default model for all new sessions:
q settings chat.defaultModel claude-4-sonnet
From then on, every q chat will automatically use Claude 4 unless explicitly changed.
Model Selection Priority
Amazon Q Developer CLI follows this order when choosing models:
Model passed in the command or chat session (using --model or /model)
User-configured default model (q settings chat.defaultModel)
System default (Claude 3.7 Sonnet)
So even if your default is set to Claude 4, you can override it for a specific session using the --model flag or /model command.
Troubleshooting & Tips
If you get "Model Unavailable" or “high load” messages when trying to use Claude 4, the issue likely lies on AWS’s end due to high demand or capacity constraints. Unfortunately, these availability issues have occurred frequently.
To diagnose client-side issues, you can try:
Running q doctor to check your setup
Verifying your authentication (q login)
Testing network connectivity (especially ports like 8443 used by Amazon Q)
Simplifying prompts or breaking them into smaller pieces to reduce load