Thread

Y
Yanis3:35 PMOpen in Slack
Quick question, has anyone tried routing ADK agents through Archestra's LLM Proxy ? I am able to talk to the agent but images/files are not going through, it seems like they are dropped and the agent only receives text. Anyone has any experience with routing different clients through the LLM proxy ?
I am using LiteLLM in order to route through Archestra since ADK does not seem to provide a way to change the api_base. But I might be completely wrong in my approach, any help is appreciated.
from google.adk.agents import Agent
from google.adk.models.lite_llm import LiteLlm
ARCHESTRA_LLM_PROXY_ID = "bc0ecdc9-ff33-43a1-a703-73a1fd1c80fb"
ARCHESTRA_MODEL_ROUTER_URL = f"<http://localhost:3000/v1/model-router/{ARCHESTRA_LLM_PROXY_ID}>"

root_agent = Agent(
    name="test_agent",
    model=LiteLlm(
        model="gemini-2.5-flash",
        api_base=ARCHESTRA_MODEL_ROUTER_URL,
        api_key=os.getenv("ARCHESTRA_API_KEY"),
    ),
    description=(
        "Agent to talk to."
    ),
    instruction=(
        "You are a helpful agent who can have a discussion with the user."
    ),
)```
👀1

13 replies
J(
joey (archestra team)5:09 PMOpen in Slack
thanks for the detailed repro - I'm fairly certain this is a bug on our side, not your setup.
your ADK/litellm/archestra model-router approach seems correct to me
the issue is that our proxy's translator for Gemini (and currently Anthropic/Cohere too) only forwards text content and drops image_url/file parts when converting your OpenAI-format request into Gemini's native format. Text-only routing works, which is why chat is fine.
I'll push up a PR for this shortly, should be in latest main very soon!
J(
joey (archestra team)5:10 PMOpen in Slack
in your setup, are you running locally off of the latest main or running a release (docker run / helm chart)?
Y
Yanis5:16 PMOpen in Slack
I am running it locally
:thumbsup_all:1
J(
joey (archestra team)5:23 PMOpen in Slack
okay cool, let me test out a fix. thanks again for reporting this 🙏
Y
Yanis5:51 PMOpen in Slack
Thanks a bunch for the support
❤️1
J(
joey (archestra team)7:43 PMOpen in Slack
can you try again on latest main?
Y
Yanis7:58 PMOpen in Slack
Hey Joey, I will
:archestra-love:1
Y
Yanis9:10 PMOpen in Slack
@user I have tested both the image/file upload feature and the Gateway access grant, they both worth great ! Thanks for the amazing work.
Any plans on bringing these to a release ? tilt is great, but it's making my poor mac kneel, i'd love to play around with these features this weekend.
❤️1
Y
Yanis9:26 PMOpen in Slack
Also, when sending PDFs/files, LiteLLM was trying to use the OpenAI file API (wouldn't work because I did not specify an openai api key, and Archestra would have dropped it anyways.) To ensure that LiteLLM sends everything in base64, all I had to do was change the model from openai/gemini:gemini-2.5-flash to custom_openai/gemini:gemini-2.5-flash
J(
joey (archestra team)4:16 AMOpen in Slack
yeah local dev wise there is an upstream next.js dev server bug which is currently causing some performance issues (especially on apple silicon) 😅 (we’re monitoring next for an upstream patch :crossed_fingers:)
release wise, I will cut a release right now.
Thanks for the feedback about the model router, I’ll take a look and include a patch in the next release
Y
Yanis5:09 AMOpen in Slack
Thanks ! Just to clarify my last message, pdf/file sending works correctly, there's nothing to fix. However it would indeed be nice if it supported URLs for files too, not just base64.
J(
joey (archestra team)5:55 AMOpen in Slack
hmm was just checking provider docs - anthropic supports accepting file URLs, Gemini doesn't seem to 🤔 have you come across anything in gemini docs which says otherwise?
J(
joey (archestra team)6:04 AMOpen in Slack
I mean we could support file URLs for Gemini requests in the :archestra: proxy layer (re-fetch / re-encode the URL), but a bit out of scope for right now 🙂