Skip to content

fix(ai-gateway)/option to remove thinking section#5283

Open
jbaross wants to merge 1 commit into
mainfrom
fix/no-think-bedrock
Open

fix(ai-gateway)/option to remove thinking section#5283
jbaross wants to merge 1 commit into
mainfrom
fix/no-think-bedrock

Conversation

@jbaross
Copy link
Copy Markdown
Contributor

@jbaross jbaross commented May 19, 2026

Copilot AI review requested due to automatic review settings May 19, 2026 10:24
@jbaross jbaross requested a review from a team as a code owner May 19, 2026 10:24
@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 0700043
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6a0c3a73c55bee000884639c
😎 Deploy Preview https://deploy-preview-5283--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Claude Code + AI Gateway (AWS Bedrock) how-to to add a troubleshooting workaround for disabling Anthropic “thinking” to reduce token usage and avoid related errors.

Changes:

  • Added a new Disable thinking troubleshooting section.
  • Included an AI Proxy + Request Transformer Advanced configuration example that strips specific request body fields.

Comment on lines +320 to +351
If you encounter errors or want to reduce token usage, you can disable thinking using the [Request Transformer Advanced](/plugins/request-transformer-advanced/) plugin:

{% capture disable_claude_thinking %}
{% entity_examples %}
entities:
plugins:
- name: ai-proxy
config:
llm_format: anthropic
route_type: llm/v1/chat
max_request_body_size: 1048576
logging:
log_statistics: true
log_payloads: false
auth:
allow_override: false
aws_access_key_id: ${aws_access_key_id}
aws_secret_access_key: ${aws_secret_access_key}
model:
provider: bedrock
name: us.anthropic.claude-haiku-4-5-20251001-v1:0
options:
anthropic_version: bedrock-2023-05-31
bedrock:
aws_region: ${aws_region}
max_tokens: 8192
- name: request-transformer-advanced
config:
remove:
body:
- model
- thinking

If you encounter errors or want to reduce token usage, you can disable thinking using the [Request Transformer Advanced](/plugins/request-transformer-advanced/) plugin:

{% capture disable_claude_thinking %}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the capture block needed here?

@jbaross jbaross changed the title fix(ai-gateway)/initial remove thinking section fix(ai-gateway)/option to remove thinking section May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

disable thinking troubleshooting

3 participants