Problem
While trying to create a model-serving endpoint you encounter an error message.
`BadRequest: Cannot create 2+ served entities with the same name under the same endpoint config version. You will need to specify served entity names if the given or default names ((model_name)-(model_version)) collide.`
Cause
When the system validates the served model names (composed of catalog name and schema name), it first truncates them to the maximum length limit of 64 characters. Although two names may appear different, they end up treated as identical during validation.
For example, if a served model is created with the name "yourname123456789"
and another served model is attempted with the name "yourname123456789XYZ"
the system throws the error because the XYZ
in the second name is truncated.
Solution
Reduce the catalog name length to shorten the overall endpoint name.
Alternatively, pass `endpoint_name`
as a kwarg
to `agents.deploy`
.
agents.deploy(<your-model-name>, <your-model-version>, endpoint_name="<your-shorter-endpoint-name>")
For more information, refer to the Agent Framework API documentation and the Deploy an agent for generative AI application (AWS | Azure | GCP) documentation.