From 477eacedf93752ea47275ef3bfda00a55ced7bf3 Mon Sep 17 00:00:00 2001 From: UntidyPhishBass <153910578+UntidyPhishBass@users.noreply.github.com> Date: Sun, 6 Jul 2025 09:40:19 +0530 Subject: [PATCH 1/4] 1467 Fix --- src/agents-api/agents_api/clients/litellm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agents-api/agents_api/clients/litellm.py b/src/agents-api/agents_api/clients/litellm.py index c9bc89042..6cca7c910 100644 --- a/src/agents-api/agents_api/clients/litellm.py +++ b/src/agents-api/agents_api/clients/litellm.py @@ -137,7 +137,7 @@ async def aembedding( **settings, ) -> list[list[float]]: if not custom_api_key: - model = f"openai/{model}" # This is needed for litellm + model = f"openai/{model.removeprefix('openai/')}" # This is needed for litellm input = ( [inputs] From 7dc764a763e2a2f518b60a8ac160e96392855f13 Mon Sep 17 00:00:00 2001 From: UntidyPhishBass <153910578+UntidyPhishBass@users.noreply.github.com> Date: Sun, 6 Jul 2025 09:50:56 +0530 Subject: [PATCH 2/4] Update litellm.py --- src/agents-api/agents_api/clients/litellm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/agents-api/agents_api/clients/litellm.py b/src/agents-api/agents_api/clients/litellm.py index 6cca7c910..3d6dd1d3c 100644 --- a/src/agents-api/agents_api/clients/litellm.py +++ b/src/agents-api/agents_api/clients/litellm.py @@ -76,7 +76,8 @@ async def acompletion( ) custom_api_key = secret and secret.value - model = f"openai/{model}" # This is needed for litellm + model = f"openai/{model.removeprefix('openai/')}" + # This is needed for litellm supported_params: list[str] = ( get_supported_openai_params(model) or [] From e961a38959334f35a711ec921737d65bb44a1484 Mon Sep 17 00:00:00 2001 From: UntidyPhishBass <153910578+UntidyPhishBass@users.noreply.github.com> Date: Sun, 6 Jul 2025 09:58:32 +0530 Subject: [PATCH 3/4] Update litellm.py --- src/agents-api/agents_api/clients/litellm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agents-api/agents_api/clients/litellm.py b/src/agents-api/agents_api/clients/litellm.py index 3d6dd1d3c..8d048a04d 100644 --- a/src/agents-api/agents_api/clients/litellm.py +++ b/src/agents-api/agents_api/clients/litellm.py @@ -137,8 +137,8 @@ async def aembedding( custom_api_key: str | None = None, **settings, ) -> list[list[float]]: - if not custom_api_key: - model = f"openai/{model.removeprefix('openai/')}" # This is needed for litellm + + model = f"openai/{model.removeprefix('openai/')}" # This is needed for litellm input = ( [inputs] From 8bd93ae2c25e64c1e0a26e4a1ec2edcb6383b46b Mon Sep 17 00:00:00 2001 From: UntidyPhishBass <153910578+UntidyPhishBass@users.noreply.github.com> Date: Sun, 6 Jul 2025 10:05:53 +0530 Subject: [PATCH 4/4] Update litellm.py --- src/agents-api/agents_api/clients/litellm.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/agents-api/agents_api/clients/litellm.py b/src/agents-api/agents_api/clients/litellm.py index 8d048a04d..58b71e7c4 100644 --- a/src/agents-api/agents_api/clients/litellm.py +++ b/src/agents-api/agents_api/clients/litellm.py @@ -76,8 +76,7 @@ async def acompletion( ) custom_api_key = secret and secret.value - model = f"openai/{model.removeprefix('openai/')}" - # This is needed for litellm + model = f"openai/{model.removeprefix('openai/')}" # This is needed for litellm supported_params: list[str] = ( get_supported_openai_params(model) or [] @@ -138,8 +137,7 @@ async def aembedding( **settings, ) -> list[list[float]]: - model = f"openai/{model.removeprefix('openai/')}" # This is needed for litellm - + model = f"openai/{model.removeprefix('openai/')}" # This is needed for litellm input = ( [inputs] if isinstance(inputs, str)