Switch to using Claude Sonnet 4 (Claude-4-sonnet) in the Amazon Q Developer CLI

CK CK 3788 
Created at  
648 0 0

In order to use Claude Sonnet 4 (Claude-4-sonnet), Amazon Q Developer CLI version v1.11.0 or newer is required. Make sure you're up to date.

 

How to Select Claude Sonnet 4

  1. 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.

     

  2. To switch models mid-chat, type:

    /model claude-4-sonnet
    

    The change will persist until the session ends.

     

  3. 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:

  1. Model passed in the command or chat session (using --model or /model)
  2. User-configured default model (q settings chat.defaultModel)
  3. 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

 

Summary Table

TaskCommand or Action
Start chat with Claude 4 for one sessionq chat --model claude-4-sonnet
Switch model mid-session/model claude-4-sonnet
Set Claude 4 as default for all chatsq settings chat.defaultModel claude-4-sonnet
Verify CLI versionq --version (Ensure it’s ≥ v1.11.0)
Diagnose common issuesq doctor, check network/auth, simplify prompts
Tags Amazon Q Amazon Q CLI Claude Sonnet 4 q chat Facebook X
Comments 0
Similar posts
  1. Amazon Q CLI for Debugging - What You Can Do
    450
  2. Vibe coding with Amazon Q in CLI combined with Claud AI Sonet 4
    474
  1. LLM Application Development with LangGraph: Features and Architectures for Stateful Multi-Actor LLM Applications
    364
  2. Microsoft AutoGen: Next-Generation Multi-Agent Framework
    318
  3. Beyond SDLC: Why the Entertainment Sector Needs an AI Development Life Cycle Now
    299
  4. Why AI-DLC is the New Paradigm for Development?
    343
  5. Autonomous Vehicle Machine Learning (AV ML): An Architectural Review
    422
  6. AI-based workflow innovation - it's not just an optimizing cost/process but also a matter of survival!
    394
  7. Cloud-Based AI Architecture Proposals for US Auto Finance Industry
    586
  8. Netflix's Recommendation System
    429
  9. Is PyTorch Dead? Deep Learning's Enduring Role Beyond LLMs & Essential Skills
    699
  10. Coding Revolution with Claude Code & MoAI ADK(Agent Development Kit)
    747
  11. Curiousity if OpenAI Engineers use Cursor.ai
    6761
  12. Building my own ChatGPT based on SageMaker and Milvus that is specialized to Shopping Mall
    281
  13. Your Blueprint for an LLM & Vector DB Insurance Product Q&A
    267
  14. The Core of Vector Databases: Embeddings and LLM Dependency
    267
  15. Original Purpose of Markdown File - why Engineers love it?
    772
  16. How do you create AI-based commit message with scope and action in Cursor AI?
    813
  17. Learn SLM if you have interent in the next after LLM
    4921
  18. VLM vs. LLM: How Vision-Language Models Are Revolutionizing Real-Time Media Processing
    50
  19. Why Reranking is Crucial for RAG and Agentic AI Systems?
    276
  20. Technical Hierarchy of AI Agents
    826
  21. MCP vs A2A
    606
  22. Vulnerabilities of MCP
    594
  23. The Revenge of the Junior Developer
    2,313
  24. A Complete Guide to LLM Dataset Formats: From Pre-Training to DPO in JSONL
    226
  25. Comparison of ChatGPT, Gemini, and Grok
    565
  26. MLOps Explained: Spark, Flink, and Reference Architecture Deep Dive
    247
  27. AI-based Image Creation based on Bing Image Creator
    991
  28. ChatGPT App (flowGPT) to create images with text
    1,042
  29. TikTok's Recommendation System - Monolith
    302
  30. Things to Know for AI-driven, Multimodal Content Personalization.
    206
Recently updated
  1. Google OAuth Token Expiration: Causes and Solutions
    31
  2. Why 100% SEO Guarantees Better User Engagement and How to Achieve It in Your Service
    57
  3. Why SPF and DKIM Are Essential for Linux Email Servers?
    51
  4. How do I create animated background for Google Meet?
    23,195
  5. MaxMind GeoLite2 vs. DB-IP Lite vs. ip-api.com: Choosing the Right Free IP Geolocation Solution
    273
  6. Meet Valkey: Why Redis Changed Its License, Why Valkey is Better, and How to Use It as a Drop-in Replacement
    104
  7. How Rogue Web Scrapers Are Stealing My Content and Destroying My Server
    170
  8. Array of arguments passed to script in PHP
    98
  9. Invalid Auction Storms in Ad Tech
    107
  10. Building MRC-Compliant Instrumentation in Ad Tech: Implementation Steps and Key Challenges
    208
  11. The Two Clocks of Ad Server Architecture
    78
  12. Frequency Cap Architecture Overview
    527
  13. Collecting Proof-of-Play from 100,000 Screens
    153
  14. Vector Search in Relational Databases (RDBs): Trends & Usage Environments
    303
  15. What is RedisVL?
    116
  16. Designing a Skill Registry Architecture: Minimize Token Usage and Maximize AI Performance
    247
  17. TPU & GPU Cluster Management Tools
    258
  18. The Concept of Scaffolding in AI Agents
    245
  19. Beyond Static Pipelines: Architecting LLM Multi-Agent Systems for Autonomous Workflow Orchestration
    598
  20. AI-DLC vs. AI-SDLC: Model-Centric vs. System-Centric AI Development
    268
  21. Fine-Tuning Open-Weight LLMs: Training, Licensing, and Deploying Custom Models with Ollama
    354
  22. Inside the Next-Generation Streaming Architecture: Ultra-Low Latency, SGAI, and AI Codecs
    207
  23. Machine Learning: Training vs. Ranking
    229
  24. The Continuous Learning Machine: Designing a Loop That Actually Turns
    228
  25. The Next-Gen Low-Latency Standards: LL-HLS & MoQ
    203
  26. Designing a Data Curation System Around a Vector Database
    230
  27. Extracting Context from Live Video: The Architecture Got Simpler When We Stopped Building Features
    263
  28. The New Ad Stack Behind Live Sports Streaming: Inside SGAI, EABN, and the Standards Race to Fix Live Monetization
    674
  29. Designing MLOps Architectures to Handle Seasonal Data Drift in EV Fleet Models
    201
  30. From 15 to 40+ FPS: Accelerating PyTorch Object Detection on Automotive ECUs
    233