Summary
Tool-calling scans against an adaptive-thinking Claude model on AWS Bedrock Converse (e.g. bedrock/global.anthropic.claude-opus-4-8, ...anthropic.claude-sonnet-4-6) can crash mid-scan, losing the run.
Symptom
litellm.APIConnectionError: Unable to convert openai tool calls ... to bedrock tool calls.
Received error=Expecting ',' delimiter: line 1 column NNNN
The tool-call arguments JSON is truncated one brace short. The malformed assistant message then poisons the next turn, when litellm's OpenAI→Bedrock converter runs json.loads(arguments).
Root cause
make_model_settings (strix/core/inputs.py) never sets max_tokens. For an adaptive-thinking Claude model, reasoning_effort maps to {"type": "adaptive"} with no fixed budget_tokens, so litellm's update_optional_params_with_thinking_tokens fallback (maxTokens = budget_tokens + DEFAULT_MAX_TOKENS) can't fire — and no maxTokens reaches Bedrock at all. Converse applies a low internal default that "high" thinking exhausts, guillotining a long create_vulnerability_report tool call.
Reproduction
Run any -m quick scan with STRIX_LLM=bedrock/global.anthropic.claude-opus-4-8 against a target that yields a few findings; the longest tool call is truncated and the run dies on the following turn.
Proposed fix
Set an explicit, Claude-family-gated, ceiling-clamped max_tokens. PR to follow.
Summary
Tool-calling scans against an adaptive-thinking Claude model on AWS Bedrock Converse (e.g.
bedrock/global.anthropic.claude-opus-4-8,...anthropic.claude-sonnet-4-6) can crash mid-scan, losing the run.Symptom
The tool-call
argumentsJSON is truncated one brace short. The malformed assistant message then poisons the next turn, when litellm's OpenAI→Bedrock converter runsjson.loads(arguments).Root cause
make_model_settings(strix/core/inputs.py) never setsmax_tokens. For an adaptive-thinking Claude model,reasoning_effortmaps to{"type": "adaptive"}with no fixedbudget_tokens, so litellm'supdate_optional_params_with_thinking_tokensfallback (maxTokens = budget_tokens + DEFAULT_MAX_TOKENS) can't fire — and nomaxTokensreaches Bedrock at all. Converse applies a low internal default that "high" thinking exhausts, guillotining a longcreate_vulnerability_reporttool call.Reproduction
Run any
-m quickscan withSTRIX_LLM=bedrock/global.anthropic.claude-opus-4-8against a target that yields a few findings; the longest tool call is truncated and the run dies on the following turn.Proposed fix
Set an explicit, Claude-family-gated, ceiling-clamped
max_tokens. PR to follow.