diff --git a/docs/_static/llama-stack-spec.html b/docs/_static/llama-stack-spec.html
index 98270f7b8..ee467e58b 100644
--- a/docs/_static/llama-stack-spec.html
+++ b/docs/_static/llama-stack-spec.html
@@ -765,7 +765,7 @@
]
}
},
- "/v1/models/{model_id}": {
+ "/v1/models/{model_id:path}": {
"get": {
"responses": {
"200": {
diff --git a/docs/_static/llama-stack-spec.yaml b/docs/_static/llama-stack-spec.yaml
index a646d7e08..6137717e0 100644
--- a/docs/_static/llama-stack-spec.yaml
+++ b/docs/_static/llama-stack-spec.yaml
@@ -460,7 +460,7 @@ paths:
required: true
schema:
type: string
- /v1/models/{model_id}:
+ /v1/models/{model_id:path}:
get:
responses:
'200':
diff --git a/docs/openapi_generator/pyopenapi/operations.py b/docs/openapi_generator/pyopenapi/operations.py
index abeb16936..bf4d35c87 100644
--- a/docs/openapi_generator/pyopenapi/operations.py
+++ b/docs/openapi_generator/pyopenapi/operations.py
@@ -130,6 +130,8 @@ class _FormatParameterExtractor:
def _get_route_parameters(route: str) -> List[str]:
extractor = _FormatParameterExtractor()
+ # Replace all occurrences of ":path" with empty string
+ route = route.replace(":path", "")
route.format_map(extractor)
return extractor.keys
diff --git a/llama_stack/apis/models/models.py b/llama_stack/apis/models/models.py
index 3361c2836..7e6d9854f 100644
--- a/llama_stack/apis/models/models.py
+++ b/llama_stack/apis/models/models.py
@@ -62,7 +62,7 @@ class Models(Protocol):
@webmethod(route="/models", method="GET")
async def list_models(self) -> ListModelsResponse: ...
- @webmethod(route="/models/{model_id}", method="GET")
+ @webmethod(route="/models/{model_id:path}", method="GET")
async def get_model(
self,
model_id: str,
@@ -78,7 +78,7 @@ class Models(Protocol):
model_type: Optional[ModelType] = None,
) -> Model: ...
- @webmethod(route="/models/{model_id}", method="DELETE")
+ @webmethod(route="/models/{model_id:path}", method="DELETE")
async def unregister_model(
self,
model_id: str,