Gemini model defaulting to us-central1 location

I have deployed a model in model garden of vertex ai in asia-south1 location and im trying to connect to it using following code -

model=Gemini(id=“gemma-3-12b-it-1744120xxxxx”,location=“asia-south1”,vertexai=True,)

i have also set the location in the env variable
GOOGLE_CLOUD_LOCATION=“asia-south1”

still getting error -

Error: 404 Publisher Model projects/infra-playground-xxxx/locations/us-central1/publishers/google/models/gemma-3-12b-it-1744120xxxxx not found.

Hi @AmanGarg

thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon.
If it’s urgent, please let us know. We appreciate your patience!

its a little urgent, we need to make it live. Appreciate your concern.

Hi @AmanGarg , You can either set the env variables or pass it as parameters to the Gemini model as mentioned here.
From the code snippet you have shared, I can see you have not added the project_id.
Can you please add the project_id and try running the agent ?

hey @monalisha ,

first of all if you see the error message
Error: 404 Publisher Model projects/infra-playground-xxxx/locations/us-central1 /publishers/google/models/gemma-3-12b-it-1744120xxxxx not found.

it already has the project id infra-playground-xxxx

however i still explicitly mentioned it here

model=Gemini(id=“gemma-3-12b-it-1744120xxxxx”,location=“asia-south1”,vertexai=True,project_id=“infra-playground-xxxx”)

still error remains same

Hello @AmanGarg ! It looks like currently models hosted via model garden are not supported through the Google genai python package. Read more here.

I found a doc on how to interact with a custom hosted model on vertex ai here. It requires the use of aiplatform library from Google instead. Unfortunately our Model class uses the genai package to query Vertex AI which seems to only work with models hosted by Google directly.

Please let me know if you have any questions.