Summary
The gateway rejects an entity id that is empty, longer than 256 characters, or contains anything other than letters, digits, underscore and hyphen. The Pydantic argument models in models.py declare entity_id as a plain str with no constraint, so all of those are accepted locally and sent to the gateway.
Nothing is broken today, because the gateway validates. The cost is a round trip that could be avoided, and an error message that comes from the gateway instead of from the tool. An id containing a slash is worse than a plain rejection, because it changes the shape of the request path.
Proposed solution (optional)
Add one shared constrained string type for entity ids and use it in every argument model that takes one. Applying it to a single tool would leave the models inconsistent, so this should be done in one pass.
Additional context (optional)
The gateway rule is in validate_entity_id in ros2_medkit_gateway: not empty, at most 256 characters, alphanumeric plus underscore and hyphen.
Summary
The gateway rejects an entity id that is empty, longer than 256 characters, or contains anything other than letters, digits, underscore and hyphen. The Pydantic argument models in
models.pydeclareentity_idas a plainstrwith no constraint, so all of those are accepted locally and sent to the gateway.Nothing is broken today, because the gateway validates. The cost is a round trip that could be avoided, and an error message that comes from the gateway instead of from the tool. An id containing a slash is worse than a plain rejection, because it changes the shape of the request path.
Proposed solution (optional)
Add one shared constrained string type for entity ids and use it in every argument model that takes one. Applying it to a single tool would leave the models inconsistent, so this should be done in one pass.
Additional context (optional)
The gateway rule is in
validate_entity_idinros2_medkit_gateway: not empty, at most 256 characters, alphanumeric plus underscore and hyphen.