Skip to content

fix: remove unsupported fields from requests to Bedrock#225

Open
pawbana wants to merge 1 commit intopb/messages-remove-paramswrapfrom
pb/bedrock-adaptive-thinking-fix
Open

fix: remove unsupported fields from requests to Bedrock#225
pawbana wants to merge 1 commit intopb/messages-remove-paramswrapfrom
pb/bedrock-adaptive-thinking-fix

Conversation

@pawbana
Copy link
Contributor

@pawbana pawbana commented Mar 19, 2026

This PR removes unsupported fields from requests to Bedrock.
Adaptive thinking field is replaced for models that don't support with type: enabled + budget_tokens: N combination.
budget_tokens value is calculated as a ratio of max_tokens.
Ratio depends on output_config.effort value, used the same ratio values as OpenRouter does: https://openrouter.ai/docs/guides/best-practices/reasoning-tokens#reasoning-effort-level

Fixes: #219

Copy link
Contributor Author

pawbana commented Mar 19, 2026

@pawbana pawbana force-pushed the pb/bedrock-adaptive-thinking-fix branch from 7d8c1ae to dcc3668 Compare March 20, 2026 11:15
@pawbana pawbana changed the title fix: remove adaptive thinking from Bedrock models that don't support it fix: remove unsupported fields from requests to Bedrock Mar 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.

1 participant