googleapis / googleapis/python-genai
Normalize models/ prefix for Vertex AI to prevent 404
- Dominant language
- Python
- Stars
- 4k
- Forks
- 1k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 40
Description
The `t_model` function currently preserves the `models/` prefix when using Vertex AI, treating it as a valid resource path. However, this leads to 404 errors because Vertex AI expects model names without this prefix or in the full `publishers/google/models/` format.
The SDK might consider normalizing the `models/` prefix for Vertex AI by either stripping the prefix or raising an error. Users copying examples from Google AI docs/tutorials may inadvertently use the `models/` prefix.
(The documentation doesn't claim models/ is valid for Vertex AI. However, `t_model` accepts it without error and passes it through unchanged, which then causes a 404.)
Contributor guide
Assessment
This issue has not been assessed yet.