Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

stefannae
Copy link

@stefannae stefannae commented Sep 11, 2025

This PR adds an example of how to use models besides Gemini from the Vertex AI Model Garden.

@DouweM DouweM self-assigned this Sep 15, 2025
@@ -108,6 +108,39 @@ agent = Agent(model)
...
```

#### Customizing Model

You can access models from the Model Garden, including but not limited to Gemini, available under your GCP project using one of the following `model_name` patterns: `{model_id}`, `publishers/{publisher}/models/{model_id}`, or `projects/{project}/locations/{location}/publishers/{publisher}/models/{model_id}`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can access models from the Model Garden, including but not limited to Gemini, available under your GCP project using one of the following `model_name` patterns: `{model_id}`, `publishers/{publisher}/models/{model_id}`, or `projects/{project}/locations/{location}/publishers/{publisher}/models/{model_id}`.
You can access models from the [Model Garden](https://cloud.google.com/model-garden?hl=en) that are available under your GCP project, including but not limited to Gemini, using one of the following `model_name` patterns: `{model_id}`, `publishers/{publisher}/models/{model_id}`, or `projects/{project}/locations/{location}/publishers/{publisher}/models/{model_id}`.

location=location,
project=project,
credentials=credentials
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a custom client needed in this case?

We should be able to use GoogleProvider(credentials=credentials, project=project, location=location, vertexai=True)

)
provider = GoogleProvider(client=client)
model = GoogleModel(
f'projects/{project}/locations/{location}/publishers/meta/models/llama-3.3-70b-instruct-maas',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would just publishers/meta/models/llama-3.3-70b-instruct-maas work as the project and location have already been configured?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vertex Model garden models
2 participants