Overview
Claude Code is Anthropic’s official command-line coding assistant. It is designed for local project work such as code generation, debugging, refactoring, tests, and documentation. With LaoZhang API configured, you can use Claude models directly from the terminal without moving project work into a web UI.Local CLI Agent
Runs inside your project directory and fits terminal-based workflows.
Claude Code Token Group
Select the Claude Code group when creating the token to avoid route mismatch.
Current Model Set
Use Sonnet 4.6 by default and switch to Opus 4.7 for harder tasks.
AWS Route Compatibility
Disables experimental beta fields to reduce Bedrock 400 validation errors.
This page only lists the recommended models for new Claude Code setups. Legacy Opus / Sonnet 4.5, 4.1, and 3.x models are no longer recommended for new configurations. Check the console for the actual selectable models.
Required: AWS Claude 400 Compatibility Setting
For the current terminal session, run this before starting Claude Code:~/.claude/settings.json:
Quick Setup
Install Claude Code
Create a Claude Code Token
Open the LaoZhang API Console, create a new token, select the Claude Code group, and copy the
sk-... key.Model Selection
For new projects, choose from the models below and avoid carrying over legacy Opus / Sonnet 4.5, 4.1, or 3.x model IDs from older configs.| Use Case | Recommended Model ID | Guidance |
|---|---|---|
| Default daily development | claude-sonnet-4-6 | Balanced quality, speed, and cost for most coding work |
| Everyday reasoning-heavy work | claude-sonnet-4-6-thinking | Good for code review, bug analysis, and implementation planning |
| Difficult agentic coding | claude-opus-4-7 | Best for large refactors, cross-module design, and long coding workflows |
| Deep analysis and multi-step planning | claude-opus-4-7-thinking | Use for high-risk migrations, architecture choices, and complex decomposition |
| Fast low-cost tasks | claude-haiku-4-5 | Good for short questions, simple scripts, docs polish, and quick responses |
Usage
Basic Command
Common Workflow
- Run
claudein the project directory - Describe the file, error, or goal
- Ask Claude Code for a plan first
- Let it edit files, run commands, or generate tests after confirmation
Good Fit
Code Generation and Refactoring
Generate functions, refactor modules, and adjust project structure.
Bug Fixing and Debugging
Analyze errors, locate causes, and add regression checks.
Tests and Scripts
Write tests, maintain scripts, and automate project commands.
Docs and Explanations
Produce README updates, API notes, and changelog entries.
Troubleshooting
400 ValidationException / Extra inputs are not permitted
400 ValidationException / Extra inputs are not permitted
If Claude Code returns one of the following errors, Claude Code may be sending experimental beta parameters that are not accepted by AWS Claude / Bedrock:The official Claude LLM gateway documentation notes that when using the Anthropic Messages format with Bedrock or Vertex, you may need to set To apply it only to the current terminal session, run:To make it permanent, add it to your shell profile:On Windows PowerShell, run:Reopen the terminal and restart Claude Code after changing the setting. This forces Claude Code to use a more standard request shape and avoids unsupported fields such as
400 ValidationExceptionExtra inputs are not permitted- Errors related to
cache_control.scope
- Update Claude Code to the latest version.
- Set
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1.
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1. Without it, some beta parameters or request fields may trigger gateway or Bedrock validation errors.Add this setting under env in ~/.claude/settings.json:cache_control, extended tool fields, and scope being rejected by Bedrock.If the error continues, check whether the model name is correct, whether you are sending a custom request body, and whether a non-standard SDK is involved. When contacting support, provide the error screenshot, Request ID, and model name.Unable to Connect to Anthropic Services
Unable to Connect to Anthropic Services
This is usually a Base URL, token, model name, or network configuration issue. First check that
~/.claude/settings.json contains these fields:ANTHROPIC_BASE_URLANTHROPIC_AUTH_TOKENANTHROPIC_MODEL
settings.json, then use echo to check whether the current terminal can read those variables. Do not share screenshots that expose the full token.Requires Claude Account Authorization
Requires Claude Account Authorization
Invalid API Key or Wrong Token Group
Invalid API Key or Wrong Token Group
Make sure you are using a LaoZhang API key and that the token was created under the Claude Code group. You can regenerate the token in the LaoZhang API Console and test again.
How to Update Claude Code
How to Update Claude Code
Run:Reopen the terminal after updating, then run
claude again.Best Practices
| Recommendation | Details |
|---|---|
| Use Sonnet 4.6 by default | Balanced cost and quality for most daily development |
| Switch to Opus 4.7 for hard work | Better fit for architecture changes, cross-file refactors, and long workflows |
| Ask for a plan before large edits | Review the plan before letting Claude Code modify files |
| Keep Git checks in the loop | Use git status, git diff, and project tests before accepting changes |
| Check pricing in the console | Claude Code is token-metered; current pricing is shown in the console |
Related Resources
Official Docs
Claude Code official documentation
API Console
Manage API keys
Model Info
View current Claude models
Cline Setup
VS Code AI agent setup