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:
Claude 2026-05-20 19:26:47 +00:00
parent bf23dc5775
commit 3c7ff62c7d
No known key found for this signature in database
4 changed files with 4 additions and 4 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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"}

View file

@ -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"}