fix: always add provider prefix to litellm model string

This commit is contained in:
Agent Zero
2026-07-17 01:48:08 +02:00
parent da8d0ce818
commit 50650f5b17
@@ -274,8 +274,9 @@ async def build_litellm_params(
provider = await get_default_provider(db, tenant_id)
# Build litellm model string with provider prefix
# LiteLLM always needs a provider prefix, even for OpenAI-compatible APIs
litellm_model = model_id
if provider and provider.provider_type != "openai":
if provider:
litellm_model = f"{provider.provider_type}/{model_id}"
# Build messages with system prompt