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

# Set preferred LLM config

> Set an LLM config as the preferred one for the workspace



## OpenAPI

````yaml /api-reference/openapi.json patch /api/agents/llm-configs/{id}/set-preferred
openapi: 3.0.0
info:
  title: Open Attack Surface Management
  description: Open-source platform for cybersecurity Attack Surface Management (ASM)
  version: '1.0'
  contact: {}
servers:
  - url: https://{baseUrl}/api/v1
    variables:
      baseUrl:
        default: localhost:3000
        description: API server hostname with port (e.g. localhost:3000, api.example.com)
security: []
tags: []
externalDocs:
  description: Authentication Docs
  url: auth/docs
paths:
  /api/agents/llm-configs/{id}/set-preferred:
    patch:
      tags:
        - Agents
      summary: Set preferred LLM config
      description: Set an LLM config as the preferred one for the workspace
      operationId: AgentsController_setPreferredLLMConfig
      parameters:
        - name: id
          required: true
          in: path
          description: LLM config ID
          schema:
            type: string
        - name: X-Workspace-Id
          in: header
          description: Workspace ID
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LLMConfigResponseDto'
                allOf:
                  - $ref: '#/components/schemas/AppResponseSerialization'
components:
  schemas:
    LLMConfigResponseDto:
      type: object
      properties:
        id:
          type: string
        provider:
          type: string
          enum:
            - openai
            - anthropic
            - gemini
            - openrouter
            - vercel
            - deepseek
            - kilo_code
            - opencode_go
            - custom
        name:
          type: string
        model:
          type: string
        apiUrl:
          type: string
        contextWindow:
          type: number
        isPreferred:
          type: boolean
        apiKeyMasked:
          type: string
          description: Masked API key (shows last 4 chars)
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - provider
        - model
        - isPreferred
        - apiKeyMasked
        - createdAt
        - updatedAt

````