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

# Update provider model

Updates the active provider and model.

For `openai-compat`, include `providerOptions` with `baseURL` and `name` so the server can
construct the OpenAI-compatible provider. The `model` field remains required and is used as the
model ID when sending requests.


## OpenAPI

````yaml /api-reference/openapi.local.json PUT /config/model
openapi: 3.1.0
info:
  title: btca Local Server API
  version: 2.0.0
  description: Local HTTP API exposed by btca-server.
servers:
  - url: http://localhost:{port}
    variables:
      port:
        default: '8080'
security: []
paths:
  /config/model:
    put:
      summary: Update provider and model
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelInfo'
      responses:
        '200':
          description: Updated model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelInfo'
components:
  schemas:
    ModelInfo:
      type: object
      required:
        - provider
        - model
      properties:
        provider:
          type: string
        model:
          type: string
        providerOptions:
          type: object
          description: Per-provider options (e.g., baseURL and name for openai-compat)
          additionalProperties:
            type: object
            properties:
              baseURL:
                type: string
              name:
                type: string
            additionalProperties: false

````