> ## Documentation Index
> Fetch the complete documentation index at: https://allhandsai-chore-regenerate-agent-sdk-openapi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Switch Conversation Acp Model

> Switch the model of an ACP conversation.

For a conversation that has already started, issues a protocol-level
``session/set_model`` call to the ACP subprocess so the new model applies to
subsequent turns without losing context. For one created but not yet run,
the value is persisted and applied when the first session starts (returns
``200`` either way). Only valid for ACP conversations whose provider
supports model switching.



## OpenAPI

````yaml /openapi/agent-sdk.json post /api/conversations/{conversation_id}/switch_acp_model
openapi: 3.1.0
info:
  description: OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent
  title: OpenHands Agent Server
  version: 1.52.0
servers: []
security: []
paths:
  /api/conversations/{conversation_id}/switch_acp_model:
    post:
      tags:
        - Conversations
      summary: Switch Conversation Acp Model
      description: >-
        Switch the model of an ACP conversation.


        For a conversation that has already started, issues a protocol-level

        ``session/set_model`` call to the ACP subprocess so the new model
        applies to

        subsequent turns without losing context. For one created but not yet
        run,

        the value is persisted and applied when the first session starts
        (returns

        ``200`` either way). Only valid for ACP conversations whose provider

        supports model switching.
      operationId: >-
        switch_conversation_acp_model_api_conversations__conversation_id__switch_acp_model_post
      parameters:
        - in: path
          name: conversation_id
          required: true
          schema:
            format: uuid
            title: Conversation Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_switch_conversation_acp_model_api_conversations__conversation_id__switch_acp_model_post
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
          description: Successful Response
        '400':
          description: Agent is not ACP, or provider can't switch models
        '404':
          description: Conversation not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '504':
          description: ACP server did not answer the model switch in time
      security:
        - APIKeyHeader: []
components:
  schemas:
    Body_switch_conversation_acp_model_api_conversations__conversation_id__switch_acp_model_post:
      properties:
        model:
          title: Model
          type: string
      required:
        - model
      title: >-
        Body_switch_conversation_acp_model_api_conversations__conversation_id__switch_acp_model_post
      type: object
    Success:
      properties:
        success:
          default: true
          title: Success
          type: boolean
      title: Success
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-Session-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.