fix: align AnthropicProvider.complete with LLMProvider (response_format)

Update AnthropicProvider.complete to accept response_format and forward it to LiteLLMProvider.
Added unit test in test_litellm_provider.py to verify parameter forwarding.
This commit is contained in:
Aysun Itai
2026-01-24 11:59:53 +02:00
parent cdbcac68b8
commit e2f387965e
2 changed files with 27 additions and 0 deletions
+2
View File
@@ -67,6 +67,7 @@ class AnthropicProvider(LLMProvider):
system: str = "",
tools: list[Tool] | None = None,
max_tokens: int = 1024,
response_format: dict[str, Any] | None = None,
json_mode: bool = False,
) -> LLMResponse:
"""Generate a completion from Claude (via LiteLLM)."""
@@ -75,6 +76,7 @@ class AnthropicProvider(LLMProvider):
system=system,
tools=tools,
max_tokens=max_tokens,
response_format=response_format,
json_mode=json_mode,
)