> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lighton.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a managed ML model (instance admin)

> Update a managed model. Applied as a delete+recreate under the hood (LiteLLM's native update endpoint is unreliable). Reserved to Sys Admin / Admin roles.



## OpenAPI

````yaml /api-reference/openapi-v3-instance.yaml patch /api/v3/instance/ml-models/{uuid}
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v3-instance)
  description: >-
    LightOn gives you an API to search, parse, and ingest documents at scale.
    Build knowledge-retrieval pipelines without managing vector databases or OCR
    models.
servers:
  - url: https://paradigm.lighton.ai
security: []
tags:
  - name: Models
    description: Operations about AI models
  - name: Workspaces
    description: Operations about workspaces
  - name: Users
    description: Operations about users
  - name: User Groups
    description: Operations about user groups
  - name: Companies
    description: Operations about companies
paths:
  /api/v3/instance/ml-models/{uuid}:
    patch:
      tags:
        - Models
      summary: Update a managed ML model (instance admin)
      description: >-
        Update a managed model. Applied as a delete+recreate under the hood
        (LiteLLM's native update endpoint is unreliable). Reserved to Sys Admin
        / Admin roles.
      operationId: api_v3_instance_ml_models_partial_update
      parameters:
        - in: path
          name: uuid
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedMLModelUpdatePayload'
            examples:
              ManagedModel:
                value:
                  id: d612ede5-16b6-4d7b-b01b-5afb873b26bb
                  name: alfred-ft5
                  technical_name: alfred-ft5
                  litellm_model: hosted_vllm/alfred-ft5
                  model_type: Large Language Model
                  endpoint: http://models-gra11-afe6f177.lighton.ai:30424/v1/
                  max_model_len: 32768
                  deployment_type: Self-Hosted
                  enabled: true
                  is_default: false
                  is_parser: false
                  is_default_reranker: false
                  use_vllm_guided_choice: true
                  start_messages_template: null
                  health:
                    status: healthy
                    is_healthy: true
                    last_checked_at: '2026-08-12T09:31:44.512000Z'
                summary: Managed model
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedMLModelUpdatePayload'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedMLModelUpdatePayload'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MLModelAdminDetail'
              examples:
                ManagedModel:
                  value:
                    id: d612ede5-16b6-4d7b-b01b-5afb873b26bb
                    name: alfred-ft5
                    technical_name: alfred-ft5
                    litellm_model: hosted_vllm/alfred-ft5
                    model_type: Large Language Model
                    endpoint: http://models-gra11-afe6f177.lighton.ai:30424/v1/
                    max_model_len: 32768
                    deployment_type: Self-Hosted
                    enabled: true
                    is_default: false
                    is_parser: false
                    is_default_reranker: false
                    use_vllm_guided_choice: true
                    start_messages_template: null
                    health:
                      status: healthy
                      is_healthy: true
                      last_checked_at: '2026-08-12T09:31:44.512000Z'
                  summary: Managed model
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIV3ErrorResponse'
              examples:
                Forbidden:
                  value:
                    detail: Instance admin access required.
          description: >-
            Instance admin access required. Only Sys Admin and Admin roles can
            manage the shared model catalog.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIV3ErrorResponse'
              examples:
                NotFound:
                  value:
                    detail: ML model d612ede5-16b6-4d7b-b01b-5afb873b26bb not found.
                  summary: Not found
          description: Managed model not found.
        '503':
          description: >-
            API is under maintenance. Check `GET /api/v3/system/status` for
            active periods and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceMaintenance503'
      security:
        - bearerAuth: []
components:
  schemas:
    PatchedMLModelUpdatePayload:
      type: object
      properties:
        name:
          type:
            - string
            - 'null'
          description: Human-friendly display name.
        technical_name:
          type:
            - string
            - 'null'
          description: Unique technical identifier used for routing.
        litellm_model:
          type:
            - string
            - 'null'
          description: >-
            Underlying LiteLLM provider routing string (e.g.
            hosted_vllm/my-model). Distinct from technical_name — omit to keep
            the current value.
        model_type:
          type:
            - string
            - 'null'
          description: Model type (e.g. Large Language Model, Embedding Model).
        endpoint:
          type:
            - string
            - 'null'
          description: Model serving endpoint URL.
        max_model_len:
          type:
            - integer
            - 'null'
          description: Maximum context length in tokens.
        enabled:
          type:
            - boolean
            - 'null'
          description: Whether the model is active.
        default:
          type:
            - boolean
            - 'null'
          description: Whether this is the default generation model.
        parser:
          type:
            - boolean
            - 'null'
          description: Whether the model can be used as a parser.
        is_default_reranker:
          type:
            - boolean
            - 'null'
          description: Whether this is the default reranker.
        deployment_type:
          type:
            - string
            - 'null'
          description: Deployment type (Self-Hosted or External).
        use_vllm_guided_choice:
          type:
            - boolean
            - 'null'
          description: Use vLLM guided_choice for constrained decoding.
    MLModelAdminDetail:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique ID for this model.
        name:
          type: string
          description: Display name.
        technical_name:
          type: string
          description: Instance-wide unique technical name used for routing.
        litellm_model:
          type:
            - string
            - 'null'
          description: >-
            Underlying LiteLLM provider routing string (e.g.
            hosted_vllm/my-model).
        model_type:
          type: string
          description: Model type.
        endpoint:
          type:
            - string
            - 'null'
          description: Model serving endpoint URL.
        max_model_len:
          type:
            - integer
            - 'null'
          description: Maximum context length in tokens.
        deployment_type:
          type:
            - string
            - 'null'
          description: Deployment type (Self-Hosted or External).
        enabled:
          type: boolean
          description: Whether the model is active instance-wide.
        is_default:
          type: boolean
          description: Whether this is the platform default generation model.
        is_parser:
          type: boolean
          description: Whether the model can be used as a parser.
        is_default_reranker:
          type: boolean
          description: Whether this is the default reranker.
        use_vllm_guided_choice:
          type: boolean
          description: Use vLLM guided_choice for constrained decoding.
        start_messages_template:
          type:
            - string
            - 'null'
          description: Start messages template name.
        health:
          allOf:
            - $ref: '#/components/schemas/MLModelHealth'
          description: >-
            Health of the model as of the last periodic gateway healthcheck.
            Read from cache — reading this endpoint never triggers a check.
      required:
        - enabled
        - health
        - id
        - is_default
        - is_default_reranker
        - is_parser
        - model_type
        - name
        - technical_name
        - use_vllm_guided_choice
    APIV3ErrorResponse:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          description: >-
            Job/resource id when one already exists (useful for async error
            diagnosis); null otherwise.
        code:
          type: integer
          description: HTTP status code
        error:
          type: string
          description: Error code used by the UI as a translation key
        detail:
          type: string
          description: Human-readable error message for developers
        doc_url:
          type: string
          description: Link to the error-code documentation page
      required:
        - code
        - detail
        - doc_url
        - error
        - id
    ServiceMaintenance503:
      type: object
      description: >-
        Returned by the maintenance middleware when the requested endpoint is
        blocked.
      required:
        - detail
        - error
        - mode
      properties:
        detail:
          type: string
          example: System is under maintenance.
        error:
          type: string
          example: service_maintenance
        mode:
          type: string
          enum:
            - full_shutdown
            - warning_banner
          description: >-
            `full_shutdown` blocks all traffic; `warning_banner` also blocks and
            shows a dismissible toast.
        reason:
          type: string
          description: Operator-supplied maintenance reason, if any.
        started_at:
          type: string
          format: date-time
        endpoint_category_names:
          type: array
          items:
            type: string
          description: >-
            Non-empty only for category-scoped periods. Empty means all
            endpoints are affected.
    MLModelHealth:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/MLModelHealthStatusEnum'
          description: >-
            Health status of the model as of the last periodic healthcheck:
            'healthy', 'unhealthy', or 'unknown' when the model has never been
            checked. Never triggers a check.


            * `healthy` - healthy

            * `unhealthy` - unhealthy

            * `unknown` - unknown
        is_healthy:
          type: boolean
          description: >-
            Whether the model is considered usable for routing. Optimistic: true
            for a model that has never been checked. Read status to tell
            'healthy' apart from 'unknown'.
        last_checked_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp of the last health check, or null when the model has never
            been checked
      required:
        - is_healthy
        - last_checked_at
        - status
    MLModelHealthStatusEnum:
      enum:
        - healthy
        - unhealthy
        - unknown
      type: string
      description: |-
        * `healthy` - healthy
        * `unhealthy` - unhealthy
        * `unknown` - unknown
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````