You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compaction fails with Bedrock: toolConfig not included when conversation has tool history #10259
When using OpenCode with AWS Bedrock (via custom provider or Portkey gateway), compaction fails with:
bedrock error: The toolConfig field must be defined when using toolUse and toolResult content blocks.
Root Cause
When OpenCode performs compaction, it sends the conversation history (which contains tool_calls and tool role messages) but does not include the tools array in the request.
AWS Bedrock's Converse API requires toolConfig to be present whenever the message history contains toolUse or toolResult content blocks.
Reproduction
Configure OpenCode with a Bedrock-backed provider (direct or via Portkey/proxy)
Have a conversation that uses tools (file edits, bash commands, etc.)
Trigger compaction (manual or auto when context fills)
Both issues address the core problem of including the tools array when message history contains tool calls, which is exactly what Bedrock's toolConfig requirement mandates. Feel free to ignore if your specific Bedrock case differs from these.
Closing as duplicate of #8246. The fix is already available via the litellmProxy: true provider option added in PR #8658. This works for Bedrock via Portkey as well.
Activity
github-actions commentedon Jan 23, 2026
This issue might be a duplicate of existing issues. Please check:
Both issues address the core problem of including the tools array when message history contains tool calls, which is exactly what Bedrock's toolConfig requirement mandates. Feel free to ignore if your specific Bedrock case differs from these.
mladencucakSYN commentedon Jan 23, 2026
Closing as duplicate of #8246. The fix is already available via the
litellmProxy: trueprovider option added in PR #8658. This works for Bedrock via Portkey as well.feat(endpoints): operator-registered endpoints and clouds — the whole…