What's wrong with this entry?
Anonymous. No account, no email.
Claude Code now supports a new environment variable CLAUDE_CODE_EXTRA_BODY that allows users to inject additional parameters into API requests.
Usage:
# Set custom API parameters as a JSON object
export CLAUDE_CODE_EXTRA_BODY='{"temperature": 0.8, "max_tokens": 4000}'
claude "Your prompt here"
This feature enables:
- Customization of API request parameters without modifying code
- Fine-tuning of Claude's response behavior (temperature, max tokens, etc.)
- Advanced users to experiment with API options
Error Handling:
- The value must be a valid JSON object (not an array or primitive)
- Invalid JSON will be logged to stderr and ignored
- Parsing errors are gracefully handled with descriptive error messages