mirror of
https://github.com/usestrix/strix.git
synced 2026-10-22 05:23:43 +00:00
make_model_settings never set max_tokens. On Bedrock Converse an
adaptive-thinking Claude model (opus-4-6/4-8, sonnet-4-6, and future tiers)
maps reasoning_effort 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. Converse then applies a low internal default that "high" thinking
exhausts, truncating a long tool call mid-JSON (arguments cut one brace short).
That malformed assistant message poisons the next turn: litellm's
openai->bedrock converter does json.loads(arguments) and raises
APIConnectionError ("Unable to convert openai tool calls ... Expecting ','
delimiter"), killing the scan.
Fix: resolve_max_tokens(model_name, configured), threaded via STRIX_MAX_TOKENS
(default None) -> make_model_settings -> ModelSettings.max_tokens -> RunConfig.
Scoped deliberately:
- Gated on the CLAUDE FAMILY, not a version/tier list. The adaptive-thinking
bug spans opus-4-6/4-8 + sonnet-4-6 today and will grow, while opus-4-1 is
NOT adaptive -- tier is the wrong axis, "claude in name" is stable.
- Non-Claude models (gpt/ollama/gemini/...) are left untouched: configured
value passes through, None stays None (provider default). A local user on a
small-context model is never forced past its limit.
- The chosen ceiling is CLAMPED to the model's known max_output_tokens, so it
can never exceed what the provider accepts (older Claude tops out at
4096-8192). If a Claude model's ceiling is unknown (absent from litellm's
cost map) and the user set nothing, fall back to None rather than guess.
Verified end-to-end on Bedrock opus-4-8 (thinking high): a SQLi/cmd-inj/
weak-hash fixture that previously crashed on the 3rd/longest finding now
reports all 3.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_agent_factory_shell.py | ||
| test_agent_tool_registration.py | ||
| test_cli_target_list.py | ||
| test_config_loader.py | ||
| test_cost_tracking.py | ||
| test_docker_client_delete.py | ||
| test_execution.py | ||
| test_hooks.py | ||
| test_inputs.py | ||
| test_local_dir_staging.py | ||
| test_local_sources.py | ||
| test_model_retry.py | ||
| test_models.py | ||
| test_notes.py | ||
| test_optional_deps.py | ||
| test_provider_hints.py | ||
| test_proxy_client.py | ||
| test_proxy_renderer.py | ||
| test_report_writer.py | ||
| test_reporting_fields.py | ||
| test_runner_rate_limit.py | ||
| test_runner_root_prompt.py | ||
| test_sarif.py | ||
| test_sarif_stride.py | ||
| test_session_entries.py | ||
| test_skill_dir_extension.py | ||
| test_state_repo_context.py | ||