mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(greptile): pass explicit bedrock provider to _supports_factory
Bedrock Invoke transformation files (chat and messages) called _supports_factory(custom_llm_provider=None, ...) which relies on auto-detection. For short Bedrock model names (e.g. 'anthropic.claude-opus-4-6' without the version suffix) auto-detection fails and the lookup falls back through the exception path. Passing the known 'bedrock' provider explicitly makes the lookup deterministic for all Bedrock model variants, including cross-region inference profile IDs. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
bf23dc5775
commit
3c7ff62c7d
4 changed files with 4 additions and 4 deletions
|
|
@ -173,7 +173,7 @@ class AmazonAnthropicClaudeConfig(AmazonInvokeConfig, AnthropicConfig):
|
|||
if not (
|
||||
_supports_factory(
|
||||
model=model,
|
||||
custom_llm_provider=None,
|
||||
custom_llm_provider="bedrock",
|
||||
key="supports_output_config",
|
||||
)
|
||||
or AnthropicConfig._model_supports_effort_param(model)
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ class AmazonAnthropicClaudeMessagesConfig(
|
|||
if not (
|
||||
_supports_factory(
|
||||
model=model,
|
||||
custom_llm_provider=None,
|
||||
custom_llm_provider="bedrock",
|
||||
key="supports_output_config",
|
||||
)
|
||||
or AnthropicConfig._model_supports_effort_param(model)
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ def test_bedrock_chat_invoke_checks_output_config_support_with_bedrock_provider(
|
|||
|
||||
mock_supports_factory.assert_called_once_with(
|
||||
model="us.anthropic.claude-opus-4-7",
|
||||
custom_llm_provider=None,
|
||||
custom_llm_provider="bedrock",
|
||||
key="supports_output_config",
|
||||
)
|
||||
assert result["output_config"] == {"effort": "high"}
|
||||
|
|
|
|||
|
|
@ -694,7 +694,7 @@ def test_bedrock_messages_checks_output_config_support_with_bedrock_provider():
|
|||
|
||||
mock_supports_factory.assert_called_with(
|
||||
model="us.anthropic.claude-opus-4-7",
|
||||
custom_llm_provider=None,
|
||||
custom_llm_provider="bedrock",
|
||||
key="supports_output_config",
|
||||
)
|
||||
assert result["output_config"] == {"effort": "high"}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue