- Newest
- Most votes
- Most comments
Based on your description of alignment issues with Claude 4 Sonnet in the Amazon Q Developer CLI, there are a few things you can check and try:
First, ensure you're actually using Claude 4 Sonnet. The CLI defaults to Claude 3.7 Sonnet when no specific model is selected. You can verify your current model during an active chat session with the /model command, which will show which model you're currently using.
To explicitly use Claude 4 Sonnet, you can:
- During an active chat, use the
/modelcommand and selectclaude-4-sonnet - Start a new chat with
q chat --model claude-4-sonnet - Set it as your default model using
q settings chat.defaultModel claude-4-sonnet
Make sure you're using the latest version of Amazon Q Developer CLI (v1.11.0 or newer), as earlier versions may not properly support Claude 4 Sonnet.
For better code generation results, try these best practices:
- Provide more context in your prompts
- Include relevant import libraries to help the model understand the context
- Create code skeletons with comments to guide the model
- Be specific in your prompts rather than using general instructions
- Maintain clear and focused context in your scripts
If you're still experiencing issues, you might try experimenting with different prompting techniques or even temporarily switching to another model like Claude 3.7 Sonnet to compare performance.
Unfortunately, there isn't a specific "alignment check" feature during chat sessions, but providing feedback when you encounter issues can help improve the system over time.
Sources
Access Claude Sonnet 4 in Amazon Q Developer CLI | AWS DevOps & Developer Productivity Blog
Best practices for code generation with Amazon Q Developer - AWS Prescriptive Guidance
Troubleshooting code generation scenarios in Amazon Q Developer - AWS Prescriptive Guidance
Selecting a model for chat on the command line - Amazon Q Developer
I'm getting the same model using Kiro. Why am I being refused the SOTA models. I have a pro subscription. This is an issue that has persisted for over a month without a resolution.
Relevant content
- asked 8 months ago
- asked 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
