fix(bedrock): drop env-var backing for neutralize flag to satisfy doc CI

The documentation_test_env_keys check requires every os.getenv() key to be
documented in litellm-docs (a separate repo), which would create a cross-repo
merge-order dependency. The flag does not need an env var: make it a plain
module attribute (litellm.bedrock_neutralize_orphaned_tool_blocks = True),
still overridable in Python or via proxy litellm_settings (which setattrs
litellm module attrs). Default unchanged (True).
This commit is contained in:
Kent 2026-06-26 13:21:33 +08:00
parent 989f5e06f5
commit 681e75bf30

View file

@ -242,10 +242,7 @@ telemetry = True
max_tokens: int = DEFAULT_MAX_TOKENS # OpenAI Defaults
drop_params = bool(os.getenv("LITELLM_DROP_PARAMS", False))
modify_params = bool(os.getenv("LITELLM_MODIFY_PARAMS", False))
bedrock_neutralize_orphaned_tool_blocks = (
os.getenv("LITELLM_BEDROCK_NEUTRALIZE_ORPHANED_TOOL_BLOCKS", "true").lower()
== "true"
)
bedrock_neutralize_orphaned_tool_blocks: bool = True
use_chat_completions_url_for_anthropic_messages: bool = bool(
os.getenv("LITELLM_USE_CHAT_COMPLETIONS_URL_FOR_ANTHROPIC_MESSAGES", False)
) # When True, routes OpenAI /v1/messages requests to chat/completions instead of the Responses API