Models

LLM gateway and per-task configuration.

10 actions. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.

models.list

GET

List models available via the gateway. Filter by provider (anthropic, openai, google, …) or a free-text search. Pass limit (+ optional offset) for a single server-side page — the response then includes total and hasMore; omit limit to get the whole catalog.

  • AI tool: models_list
  • API: GET /api/invoke/models.list

Input

Field Type Required Description
provider string
search string
limit integer
offset integer
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "provider": {
      "type": "string"
    },
    "search": {
      "type": "string"
    },
    "limit": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 1000
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

models.get_default

GET

Get the current default chat model id.

  • AI tool: models_get_default
  • API: GET /api/invoke/models.get_default

Input

No parameters.

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": {}
}

models.set_default

POST · mutating

Set the default chat model id.

  • AI tool: models_set_default
  • API: POST /api/invoke/models.set_default

Input

Field Type Required Description
modelId string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "modelId": {
      "type": "string"
    }
  },
  "required": [
    "modelId"
  ]
}

models.list_preferred

GET

List the curated shortlist of preferred model ids (for the in-chat model picker).

  • AI tool: models_list_preferred
  • API: GET /api/invoke/models.list_preferred

Input

No parameters.

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": {}
}

models.set_preferred

POST · mutating

Replace the preferred-models shortlist with the given ordered ids.

  • AI tool: models_set_preferred
  • API: POST /api/invoke/models.set_preferred

Input

Field Type Required Description
modelIds string[] yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "modelIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "modelIds"
  ]
}

models.toggle_preferred

POST · mutating

Add or remove a model from the preferred shortlist. If the model is already preferred it gets removed; otherwise appended.

  • AI tool: models_toggle_preferred
  • API: POST /api/invoke/models.toggle_preferred

Input

Field Type Required Description
modelId string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "modelId": {
      "type": "string"
    }
  },
  "required": [
    "modelId"
  ]
}

models.get_config

GET

Get full per-task model configuration (chat-agent, embeddings, image-gen, etc.).

  • AI tool: models_get_config
  • API: GET /api/invoke/models.get_config

Input

No parameters.

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": {}
}

models.set_task_model

POST · mutating

Set the model id for a given task (chat-agent, embeddings, image-gen, etc.).

  • AI tool: models_set_task_model
  • API: POST /api/invoke/models.set_task_model

Input

Field Type Required Description
task "chat-agent" | "embeddings" | "image-gen" | "video-gen" | "tts" | "music" | "fast-routing" | "vision" | "voice-derive" | "draft-generate" yes
modelId string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "task": {
      "type": "string",
      "enum": [
        "chat-agent",
        "embeddings",
        "image-gen",
        "video-gen",
        "tts",
        "music",
        "fast-routing",
        "vision",
        "voice-derive",
        "draft-generate"
      ]
    },
    "modelId": {
      "type": "string"
    }
  },
  "required": [
    "task",
    "modelId"
  ]
}

models.set_task_settings

PATCH · mutating

Update tuning parameters (temperature, maxTokens, topP, fallback, extras) for a task.

  • AI tool: models_set_task_settings
  • API: PATCH /api/invoke/models.set_task_settings

Input

Field Type Required Description
task "chat-agent" | "embeddings" | "image-gen" | "video-gen" | "tts" | "music" | "fast-routing" | "vision" | "voice-derive" | "draft-generate" yes
temperature number
maxTokens integer
topP number
fallback string[]
extras object
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "task": {
      "type": "string",
      "enum": [
        "chat-agent",
        "embeddings",
        "image-gen",
        "video-gen",
        "tts",
        "music",
        "fast-routing",
        "vision",
        "voice-derive",
        "draft-generate"
      ]
    },
    "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 2
    },
    "maxTokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "topP": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "fallback": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "extras": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "task"
  ]
}

models.recent_traces

GET

Recent LLM call traces for observability — model id, tokens, latency, status.

  • AI tool: models_recent_traces
  • API: GET /api/invoke/models.recent_traces

Input

Field Type Required Description
limit integer
offset integer
orderBy string
orderDir "asc" | "desc"
q string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "orderBy": {
      "type": "string"
    },
    "orderDir": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "q": {
      "type": "string"
    }
  }
}