From a427ab467593fa9011b7125917955250890a0178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 27 Mar 2026 18:07:28 +0100 Subject: [PATCH 1/2] refactor: remove deprecated register/unregister model endpoints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the deprecated POST /v1/models (register_model) and DELETE /v1/models/{model_id} (unregister_model) HTTP endpoints. The underlying methods remain for internal use by routing tables during startup. Also fix _filter_deprecated_schema() to filter at the operation level instead of the path level, so non-deprecated GET operations are not incorrectly included in the deprecated OpenAPI spec. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Sébastien Han --- scripts/openapi_generator/schema_filtering.py | 17 +++++++--- .../stainless_config/generate_config.py | 2 -- src/llama_stack_api/models/fastapi_routes.py | 34 +------------------ 3 files changed, 13 insertions(+), 40 deletions(-) diff --git a/scripts/openapi_generator/schema_filtering.py b/scripts/openapi_generator/schema_filtering.py index 4667d27a56..6b7b24d85e 100644 --- a/scripts/openapi_generator/schema_filtering.py +++ b/scripts/openapi_generator/schema_filtering.py @@ -239,19 +239,26 @@ def _filter_schema_by_version( def _filter_deprecated_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: """ - Filter OpenAPI schema to include only deprecated endpoints. - Includes all deprecated endpoints regardless of version (v1, v1alpha, v1beta). + Filter OpenAPI schema to include only deprecated operations. + Filters at the operation level, not the path level, so non-deprecated + operations on the same path (e.g. GET /v1/models) are excluded. """ filtered_schema = openapi_schema.copy() if "paths" not in filtered_schema: return filtered_schema - # Filter paths to only include deprecated ones filtered_paths = {} for path, path_item in filtered_schema["paths"].items(): - if _is_path_deprecated(path_item): - filtered_paths[path] = path_item + if not isinstance(path_item, dict): + continue + deprecated_ops = {} + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + op = path_item.get(method) + if isinstance(op, dict) and op.get("deprecated", False): + deprecated_ops[method] = op + if deprecated_ops: + filtered_paths[path] = deprecated_ops filtered_schema["paths"] = filtered_paths diff --git a/scripts/openapi_generator/stainless_config/generate_config.py b/scripts/openapi_generator/stainless_config/generate_config.py index ee1128fc1c..32e774c174 100644 --- a/scripts/openapi_generator/stainless_config/generate_config.py +++ b/scripts/openapi_generator/stainless_config/generate_config.py @@ -410,8 +410,6 @@ "methods": { "list": {"paginated": False, "endpoint": "get /v1/models"}, "retrieve": "get /v1/models/{model_id}", - "register": "post /v1/models", - "unregister": "delete /v1/models/{model_id}", }, "subresources": {"openai": {"methods": {"list": {"paginated": False, "endpoint": "get /v1/models"}}}}, }, diff --git a/src/llama_stack_api/models/fastapi_routes.py b/src/llama_stack_api/models/fastapi_routes.py index d70a884b78..46c5aef0ac 100644 --- a/src/llama_stack_api/models/fastapi_routes.py +++ b/src/llama_stack_api/models/fastapi_routes.py @@ -12,7 +12,7 @@ from typing import Annotated -from fastapi import APIRouter, Body, Depends +from fastapi import APIRouter, Depends from llama_stack_api.router_utils import create_path_dependency, standard_responses from llama_stack_api.version import LLAMA_STACK_API_V1 @@ -22,13 +22,10 @@ GetModelRequest, Model, OpenAIListModelsResponse, - RegisterModelRequest, - UnregisterModelRequest, ) # Path parameter dependencies for single-field models get_model_request = create_path_dependency(GetModelRequest) -unregister_model_request = create_path_dependency(UnregisterModelRequest) def create_router(impl: Models) -> APIRouter: @@ -72,33 +69,4 @@ async def get_model( ) -> Model: return await impl.get_model(request) - @router.post( - "/models", - response_model=Model, - summary="Register a model.", - description="Register a model.", - responses={ - 200: {"description": "The registered model object."}, - }, - deprecated=True, - ) - async def register_model( - request: Annotated[RegisterModelRequest, Body(...)], - ) -> Model: - return await impl.register_model(request) - - @router.delete( - "/models/{model_id:path}", - summary="Unregister a model.", - description="Unregister a model.", - responses={ - 200: {"description": "The model was successfully unregistered."}, - }, - deprecated=True, - ) - async def unregister_model( - request: Annotated[UnregisterModelRequest, Depends(unregister_model_request)], - ) -> None: - return await impl.unregister_model(request) - return router From ce73751ff5c3c229ff7eff466a1ec87149f6d944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 27 Mar 2026 18:18:24 +0100 Subject: [PATCH 2/2] chore: regenerate OpenAPI specs after removing deprecated model endpoints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note: the stainless spec gains 5 redundant nullable: true annotations on RegisterModelRequest fields. This is a pre-existing generator issue where _fix_schema_recursive adds nullable alongside anyOf with null. A follow-up PR will fix the generator to avoid redundant nullable. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Sébastien Han --- client-sdks/stainless/config.yml | 2 - client-sdks/stainless/openapi.yml | 74 +--- docs/static/deprecated-llama-stack-spec.yaml | 371 +----------------- .../static/experimental-llama-stack-spec.yaml | 11 +- docs/static/llama-stack-spec.yaml | 11 +- docs/static/stainless-llama-stack-spec.yaml | 74 +--- 6 files changed, 40 insertions(+), 503 deletions(-) diff --git a/client-sdks/stainless/config.yml b/client-sdks/stainless/config.yml index e9b33581be..70cfbeb1c8 100644 --- a/client-sdks/stainless/config.yml +++ b/client-sdks/stainless/config.yml @@ -327,8 +327,6 @@ resources: paginated: false endpoint: get /v1/models retrieve: get /v1/models/{model_id} - register: post /v1/models - unregister: delete /v1/models/{model_id} subresources: openai: methods: diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 495df0e0c5..75088a8df0 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -1027,38 +1027,6 @@ paths: summary: List models using the OpenAI API. description: List models using the OpenAI API. operationId: openai_list_models_v1_models_get - post: - responses: - '200': - description: The registered model object. - content: - application/json: - schema: - $ref: '#/components/schemas/Model' - '400': - description: Bad Request - $ref: '#/components/responses/BadRequest400' - '429': - description: Too Many Requests - $ref: '#/components/responses/TooManyRequests429' - '500': - description: Internal Server Error - $ref: '#/components/responses/InternalServerError500' - default: - description: Default Response - $ref: '#/components/responses/DefaultError' - tags: - - Models - summary: Register a model. - description: Register a model. - operationId: register_model_v1_models_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterModelRequest' - required: true - deprecated: true /v1/models/{model_id}: get: responses: @@ -1094,37 +1062,6 @@ paths: description: The ID of the model to get. title: Model Id description: The ID of the model to get. - delete: - responses: - '400': - $ref: '#/components/responses/BadRequest400' - description: Bad Request - '429': - $ref: '#/components/responses/TooManyRequests429' - description: Too Many Requests - '500': - $ref: '#/components/responses/InternalServerError500' - description: Internal Server Error - default: - $ref: '#/components/responses/DefaultError' - description: Default Response - '204': - description: The model was successfully unregistered. - tags: - - Models - summary: Unregister a model. - description: Unregister a model. - operationId: unregister_model_v1_models__model_id__delete - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: The ID of the model to unregister. - title: Model Id - description: The ID of the model to unregister. - deprecated: true /v1/moderations: post: responses: @@ -11012,43 +10949,48 @@ components: title: RerankResponse description: Response from a reranking request. RegisterModelRequest: + description: Request model for registering a model. properties: model_id: - type: string - title: Model Id description: The identifier of the model to register. + title: Model Id + type: string provider_model_id: anyOf: - type: string - type: 'null' description: The identifier of the model in the provider. + nullable: true provider_id: anyOf: - type: string - type: 'null' description: The identifier of the provider. + nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' description: Any additional metadata for this model. + nullable: true model_type: anyOf: - $ref: '#/components/schemas/ModelType' title: ModelType - type: 'null' description: The type of model to register. + nullable: true title: ModelType model_validation: anyOf: - type: boolean - type: 'null' description: Enable model availability check during registration. When false (default), validation is deferred to runtime and model is preserved during provider refresh. + nullable: true required: - model_id title: RegisterModelRequest - description: Request model for registering a model. ParamType: discriminator: mapping: diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index f1ae56a67c..54d93bb7d8 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -13,156 +13,7 @@ info: servers: - url: http://any-hosted-llama-stack.com paths: - /v1/models: - get: - responses: - '200': - description: A list of OpenAI model objects. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIListModelsResponse' - '400': - description: Bad Request - $ref: '#/components/responses/BadRequest400' - '429': - description: Too Many Requests - $ref: '#/components/responses/TooManyRequests429' - '500': - description: Internal Server Error - $ref: '#/components/responses/InternalServerError500' - default: - description: Default Response - $ref: '#/components/responses/DefaultError' - tags: - - Models - summary: List models using the OpenAI API. - description: List models using the OpenAI API. - operationId: openai_list_models_v1_models_get - post: - responses: - '200': - description: The registered model object. - content: - application/json: - schema: - $ref: '#/components/schemas/Model' - '400': - description: Bad Request - $ref: '#/components/responses/BadRequest400' - '429': - description: Too Many Requests - $ref: '#/components/responses/TooManyRequests429' - '500': - description: Internal Server Error - $ref: '#/components/responses/InternalServerError500' - default: - description: Default Response - $ref: '#/components/responses/DefaultError' - tags: - - Models - summary: Register a model. - description: Register a model. - operationId: register_model_v1_models_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterModelRequest' - required: true - deprecated: true - /v1/models/{model_id}: - get: - responses: - '200': - description: The model object. - content: - application/json: - schema: - $ref: '#/components/schemas/Model' - '400': - $ref: '#/components/responses/BadRequest400' - description: Bad Request - '429': - $ref: '#/components/responses/TooManyRequests429' - description: Too Many Requests - '500': - $ref: '#/components/responses/InternalServerError500' - description: Internal Server Error - default: - $ref: '#/components/responses/DefaultError' - description: Default Response - tags: - - Models - summary: Get a model by its identifier. - description: Get a model by its identifier. - operationId: get_model_v1_models__model_id__get - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: The ID of the model to get. - title: Model Id - description: The ID of the model to get. - delete: - responses: - '400': - $ref: '#/components/responses/BadRequest400' - description: Bad Request - '429': - $ref: '#/components/responses/TooManyRequests429' - description: Too Many Requests - '500': - $ref: '#/components/responses/InternalServerError500' - description: Internal Server Error - default: - $ref: '#/components/responses/DefaultError' - description: Default Response - '204': - description: The model was successfully unregistered. - tags: - - Models - summary: Unregister a model. - description: Unregister a model. - operationId: unregister_model_v1_models__model_id__delete - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: The ID of the model to unregister. - title: Model Id - description: The ID of the model to unregister. - deprecated: true /v1/scoring-functions: - get: - responses: - '200': - description: A ListScoringFunctionsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListScoringFunctionsResponse' - '400': - description: Bad Request - $ref: '#/components/responses/BadRequest400' - '429': - description: Too Many Requests - $ref: '#/components/responses/TooManyRequests429' - '500': - description: Internal Server Error - $ref: '#/components/responses/InternalServerError500' - default: - description: Default Response - $ref: '#/components/responses/DefaultError' - tags: - - Scoring Functions - summary: List all scoring functions. - description: List all scoring functions. - operationId: list_scoring_functions_v1_scoring_functions_get post: responses: '400': @@ -192,40 +43,6 @@ paths: required: true deprecated: true /v1/scoring-functions/{scoring_fn_id}: - get: - responses: - '200': - description: A ScoringFn. - content: - application/json: - schema: - $ref: '#/components/schemas/ScoringFn' - '400': - $ref: '#/components/responses/BadRequest400' - description: Bad Request - '429': - $ref: '#/components/responses/TooManyRequests429' - description: Too Many Requests - '500': - $ref: '#/components/responses/InternalServerError500' - description: Internal Server Error - default: - $ref: '#/components/responses/DefaultError' - description: Default Response - tags: - - Scoring Functions - summary: Get a scoring function by its ID. - description: Get a scoring function by its ID. - operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get - parameters: - - name: scoring_fn_id - in: path - required: true - schema: - type: string - description: The ID of the scoring function to get. - title: Scoring Fn Id - description: The ID of the scoring function to get. delete: responses: '400': @@ -258,31 +75,6 @@ paths: description: The ID of the scoring function to unregister. deprecated: true /v1/shields: - get: - responses: - '200': - description: A ListShieldsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListShieldsResponse' - '400': - description: Bad Request - $ref: '#/components/responses/BadRequest400' - '429': - description: Too Many Requests - $ref: '#/components/responses/TooManyRequests429' - '500': - description: Internal Server Error - $ref: '#/components/responses/InternalServerError500' - default: - description: Default Response - $ref: '#/components/responses/DefaultError' - tags: - - Shields - summary: List all shields. - description: List all shields. - operationId: list_shields_v1_shields_get post: responses: '200': @@ -316,40 +108,6 @@ paths: required: true deprecated: true /v1/shields/{identifier}: - get: - responses: - '200': - description: A Shield. - content: - application/json: - schema: - $ref: '#/components/schemas/Shield' - '400': - $ref: '#/components/responses/BadRequest400' - description: Bad Request - '429': - $ref: '#/components/responses/TooManyRequests429' - description: Too Many Requests - '500': - $ref: '#/components/responses/InternalServerError500' - description: Internal Server Error - default: - $ref: '#/components/responses/DefaultError' - description: Default Response - tags: - - Shields - summary: Get a shield by its identifier. - description: Get a shield by its identifier. - operationId: get_shield_v1_shields__identifier__get - parameters: - - name: identifier - in: path - required: true - schema: - type: string - description: The identifier of the shield to get. - title: Identifier - description: The identifier of the shield to get. delete: responses: '400': @@ -382,31 +140,6 @@ paths: description: The identifier of the shield to unregister. deprecated: true /v1beta/datasets: - get: - responses: - '200': - description: A list of dataset objects. - content: - application/json: - schema: - $ref: '#/components/schemas/ListDatasetsResponse' - '400': - description: Bad Request - $ref: '#/components/responses/BadRequest400' - '429': - description: Too Many Requests - $ref: '#/components/responses/TooManyRequests429' - '500': - description: Internal Server Error - $ref: '#/components/responses/InternalServerError500' - default: - description: Default Response - $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: List all datasets. - description: List all datasets. - operationId: list_datasets_v1beta_datasets_get post: responses: '200': @@ -440,40 +173,6 @@ paths: required: true deprecated: true /v1beta/datasets/{dataset_id}: - get: - responses: - '200': - description: The dataset object. - content: - application/json: - schema: - $ref: '#/components/schemas/Dataset' - '400': - $ref: '#/components/responses/BadRequest400' - description: Bad Request - '429': - $ref: '#/components/responses/TooManyRequests429' - description: Too Many Requests - '500': - $ref: '#/components/responses/InternalServerError500' - description: Internal Server Error - default: - $ref: '#/components/responses/DefaultError' - description: Default Response - tags: - - Datasets - summary: Get a dataset by its ID. - description: Get a dataset by its ID. - operationId: get_dataset_v1beta_datasets__dataset_id__get - parameters: - - name: dataset_id - in: path - required: true - schema: - type: string - description: The ID of the dataset to get. - title: Dataset Id - description: The ID of the dataset to get. delete: responses: '400': @@ -506,31 +205,6 @@ paths: description: The ID of the dataset to unregister. deprecated: true /v1alpha/eval/benchmarks: - get: - responses: - '200': - description: A ListBenchmarksResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListBenchmarksResponse' - '400': - description: Bad Request - $ref: '#/components/responses/BadRequest400' - '429': - description: Too Many Requests - $ref: '#/components/responses/TooManyRequests429' - '500': - description: Internal Server Error - $ref: '#/components/responses/InternalServerError500' - default: - description: Default Response - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: List all benchmarks. - description: List all benchmarks. - operationId: list_benchmarks_v1alpha_eval_benchmarks_get post: responses: '400': @@ -560,40 +234,6 @@ paths: required: true deprecated: true /v1alpha/eval/benchmarks/{benchmark_id}: - get: - responses: - '200': - description: A Benchmark. - content: - application/json: - schema: - $ref: '#/components/schemas/Benchmark' - '400': - $ref: '#/components/responses/BadRequest400' - description: Bad Request - '429': - $ref: '#/components/responses/TooManyRequests429' - description: Too Many Requests - '500': - $ref: '#/components/responses/InternalServerError500' - description: Internal Server Error - default: - $ref: '#/components/responses/DefaultError' - description: Default Response - tags: - - Benchmarks - summary: Get a benchmark by its ID. - description: Get a benchmark by its ID. - operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get - parameters: - - name: benchmark_id - in: path - required: true - schema: - type: string - description: The ID of the benchmark to get. - title: Benchmark Id - description: The ID of the benchmark to get. delete: responses: '400': @@ -7668,43 +7308,48 @@ components: title: RerankResponse description: Response from a reranking request. RegisterModelRequest: + description: Request model for registering a model. properties: model_id: - type: string - title: Model Id description: The identifier of the model to register. + title: Model Id + type: string provider_model_id: anyOf: - type: string - type: 'null' description: The identifier of the model in the provider. + nullable: true provider_id: anyOf: - type: string - type: 'null' description: The identifier of the provider. + nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' description: Any additional metadata for this model. + nullable: true model_type: anyOf: - $ref: '#/components/schemas/ModelType' title: ModelType - type: 'null' description: The type of model to register. + nullable: true title: ModelType model_validation: anyOf: - type: boolean - type: 'null' description: Enable model availability check during registration. When false (default), validation is deferred to runtime and model is preserved during provider refresh. + nullable: true required: - model_id title: RegisterModelRequest - description: Request model for registering a model. ParamType: discriminator: mapping: diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index 75594ef438..8529a64c29 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -7849,43 +7849,48 @@ components: title: RerankResponse description: Response from a reranking request. RegisterModelRequest: + description: Request model for registering a model. properties: model_id: - type: string - title: Model Id description: The identifier of the model to register. + title: Model Id + type: string provider_model_id: anyOf: - type: string - type: 'null' description: The identifier of the model in the provider. + nullable: true provider_id: anyOf: - type: string - type: 'null' description: The identifier of the provider. + nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' description: Any additional metadata for this model. + nullable: true model_type: anyOf: - $ref: '#/components/schemas/ModelType' title: ModelType - type: 'null' description: The type of model to register. + nullable: true title: ModelType model_validation: anyOf: - type: boolean - type: 'null' description: Enable model availability check during registration. When false (default), validation is deferred to runtime and model is preserved during provider refresh. + nullable: true required: - model_id title: RegisterModelRequest - description: Request model for registering a model. ParamType: discriminator: mapping: diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index a66d107695..05c7b64d6d 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -9897,43 +9897,48 @@ components: title: RerankResponse description: Response from a reranking request. RegisterModelRequest: + description: Request model for registering a model. properties: model_id: - type: string - title: Model Id description: The identifier of the model to register. + title: Model Id + type: string provider_model_id: anyOf: - type: string - type: 'null' description: The identifier of the model in the provider. + nullable: true provider_id: anyOf: - type: string - type: 'null' description: The identifier of the provider. + nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' description: Any additional metadata for this model. + nullable: true model_type: anyOf: - $ref: '#/components/schemas/ModelType' title: ModelType - type: 'null' description: The type of model to register. + nullable: true title: ModelType model_validation: anyOf: - type: boolean - type: 'null' description: Enable model availability check during registration. When false (default), validation is deferred to runtime and model is preserved during provider refresh. + nullable: true required: - model_id title: RegisterModelRequest - description: Request model for registering a model. ParamType: discriminator: mapping: diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index 495df0e0c5..75088a8df0 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -1027,38 +1027,6 @@ paths: summary: List models using the OpenAI API. description: List models using the OpenAI API. operationId: openai_list_models_v1_models_get - post: - responses: - '200': - description: The registered model object. - content: - application/json: - schema: - $ref: '#/components/schemas/Model' - '400': - description: Bad Request - $ref: '#/components/responses/BadRequest400' - '429': - description: Too Many Requests - $ref: '#/components/responses/TooManyRequests429' - '500': - description: Internal Server Error - $ref: '#/components/responses/InternalServerError500' - default: - description: Default Response - $ref: '#/components/responses/DefaultError' - tags: - - Models - summary: Register a model. - description: Register a model. - operationId: register_model_v1_models_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterModelRequest' - required: true - deprecated: true /v1/models/{model_id}: get: responses: @@ -1094,37 +1062,6 @@ paths: description: The ID of the model to get. title: Model Id description: The ID of the model to get. - delete: - responses: - '400': - $ref: '#/components/responses/BadRequest400' - description: Bad Request - '429': - $ref: '#/components/responses/TooManyRequests429' - description: Too Many Requests - '500': - $ref: '#/components/responses/InternalServerError500' - description: Internal Server Error - default: - $ref: '#/components/responses/DefaultError' - description: Default Response - '204': - description: The model was successfully unregistered. - tags: - - Models - summary: Unregister a model. - description: Unregister a model. - operationId: unregister_model_v1_models__model_id__delete - parameters: - - name: model_id - in: path - required: true - schema: - type: string - description: The ID of the model to unregister. - title: Model Id - description: The ID of the model to unregister. - deprecated: true /v1/moderations: post: responses: @@ -11012,43 +10949,48 @@ components: title: RerankResponse description: Response from a reranking request. RegisterModelRequest: + description: Request model for registering a model. properties: model_id: - type: string - title: Model Id description: The identifier of the model to register. + title: Model Id + type: string provider_model_id: anyOf: - type: string - type: 'null' description: The identifier of the model in the provider. + nullable: true provider_id: anyOf: - type: string - type: 'null' description: The identifier of the provider. + nullable: true metadata: anyOf: - additionalProperties: true type: object - type: 'null' description: Any additional metadata for this model. + nullable: true model_type: anyOf: - $ref: '#/components/schemas/ModelType' title: ModelType - type: 'null' description: The type of model to register. + nullable: true title: ModelType model_validation: anyOf: - type: boolean - type: 'null' description: Enable model availability check during registration. When false (default), validation is deferred to runtime and model is preserved during provider refresh. + nullable: true required: - model_id title: RegisterModelRequest - description: Request model for registering a model. ParamType: discriminator: mapping: