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

# Update Eval Definition



## OpenAPI

````yaml /openapi.json patch /v1/api-performance/evals/{eval_id}
openapi: 3.1.0
info:
  title: Lightsage Public API
  description: Public API for Lightsage CLI and external integrations.
  version: 1.0.0
servers:
  - url: https://api.lightsage.com
    description: Production
security: []
paths:
  /v1/api-performance/evals/{eval_id}:
    patch:
      tags:
        - API Performance
      summary: Update Eval Definition
      operationId: api_performance_evals_update
      parameters:
        - name: eval_id
          in: path
          required: true
          schema:
            type: string
            title: Eval Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicEvalDefinitionUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicEvalDefinition'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - LightsageApiKeyAuth: []
components:
  schemas:
    PublicEvalDefinitionUpdate:
      properties:
        custom_prompt:
          type: string
          title: Custom Prompt
        expected_behavior:
          type: string
          title: Expected Behavior
        starting_project_id:
          type: string
          title: Starting Project Id
          description: >-
            Starting project to clone before running the eval. Empty string
            clears it.
        docs_mode:
          type: string
          enum:
            - default
            - include
            - exclude
          title: Docs Mode
          description: 'Docs behavior for this eval: default, include, or exclude.'
        include_env_vars:
          type: boolean
          title: Include Env Vars
          description: Include configured environment variable names in the eval prompt.
        env_profile_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Env Profile Ids
          description: >-
            Environment profile IDs to use for this eval. Empty list clears the
            selection.
        model_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Model Ids
          description: >-
            Model IDs to use for this eval. Empty list uses the config-level
            models.
        compare_skills:
          type: boolean
          title: Compare Skills
        skills_mode:
          type: string
          enum:
            - none
            - all
            - selected
          title: Skills Mode
        skill_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Skill Ids
          description: Selected skill IDs. Used when skills_mode is selected.
        mcp_enabled:
          type: boolean
          title: Mcp Enabled
        run_context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Run Context
        enabled:
          type: boolean
          title: Enabled
      type: object
      title: PublicEvalDefinitionUpdate
    PublicEvalDefinition:
      properties:
        id:
          type: string
          title: Id
        operation_id:
          type: string
          title: Operation Id
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
        source:
          anyOf:
            - $ref: '#/components/schemas/PublicApiPerformanceSourceRef'
            - type: 'null'
        eval_type:
          type: string
          title: Eval Type
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
        custom_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Custom Prompt
        expected_behavior:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Behavior
        starting_project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Starting Project Id
        docs_mode:
          type: string
          enum:
            - default
            - include
            - exclude
          title: Docs Mode
          default: default
        include_env_vars:
          type: boolean
          title: Include Env Vars
          default: true
        env_profile_ids:
          items:
            type: string
          type: array
          title: Env Profile Ids
        model_ids:
          items:
            type: string
          type: array
          title: Model Ids
        compare_skills:
          type: boolean
          title: Compare Skills
          default: false
        skills_mode:
          type: string
          enum:
            - none
            - all
            - selected
          title: Skills Mode
          default: none
        skills_enabled:
          type: boolean
          title: Skills Enabled
          default: false
        skill_ids:
          items:
            type: string
          type: array
          title: Skill Ids
        mcp_enabled:
          type: boolean
          title: Mcp Enabled
          default: false
        run_context:
          additionalProperties: true
          type: object
          title: Run Context
        enabled:
          type: boolean
          title: Enabled
          default: true
      type: object
      required:
        - id
        - operation_id
        - eval_type
      title: PublicEvalDefinition
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicApiPerformanceSourceRef:
      properties:
        id:
          type: string
          title: Id
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
      type: object
      required:
        - id
      title: PublicApiPerformanceSourceRef
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    LightsageApiKeyAuth:
      type: apiKey
      in: header
      name: X-Lightsage-Api-Key

````