> Source: https://wexa.ai/docs/tools/list-models

# list-models

List the AI models this organization can run, and which one is the default. `default` names the model that will actually run for an agent that does not name its own — one answer, resolved the same way every call path in the platform resolves it. Returns two id families, both valid in an agent's `llm.model`: `registry` holds the AI Models registry entries (ids like `mdl_...`, the only ones create-agent and create-process-flow accept), and `available` holds the agent tools’s own list (the `system_model` sentinel plus `instance#provider#org#model` composites). `settable` lists the ids set-model accepts, which is the registry ids: the organization default lives in the registry. Set an agent's `llm.model` to override one agent, or set-model to change the organization default.

## What it is called on each surface

The wire name is `list-models` everywhere: it is what the Wexa MCP server advertises, the REST path is
`POST /v1/list-models`, and each SDK exposes it under its own language's naming convention.

| Surface | Name |
| --- | --- |
| Wexa MCP server | `list-models` |
| REST API | `POST /v1/list-models` |
| TypeScript SDK | `fabric.listModels()` |
| Python SDK | `fabric.list_models()` |

## Arguments

`list-models` takes no arguments. Everything it needs — which organization and project you are asking
about, and who you are — comes from the credential you authenticated with, so there is nothing left for the
call itself to carry. Send an empty object.

`project_id`, `projectID`, `organization_id` and `executed_by` are not arguments you pass: the
platform binds all four from the credential you authenticated with, and both SDKs refuse them
before the request leaves your process — see
[server-bound arguments](/docs/get-started/scope-and-server-bound-arguments).

## What it returns

The three surfaces wrap this differently, and code written against one will not read another
correctly — see [return shape](/docs/tools/overview#return-shape).

A real response, captured from a live call to `list-models`:

`registry`, `settable` came back populated and is shown as `…` here, because the real value runs to
thousands of characters. Read it from your own call rather than from this page.

**Result of list-models**

**REST API**

```json
{
  "lifecycle_id": "qlc_000171",
  "result": {
    "available": [
      {
        "label_name": "WEXA System Model",
        "model_name": "system_model"
      }
    ],
    "default": {
      "chosen": true,
      "model": "mdl_bx_anthropic-claude-haiku-4-5-20251001-v1_28ccc24bfca8",
      "source": "AI Models registry"
    },
    "registry": "\u2026",
    "selected": {
      "embedding_model_to_use": null,
      "fallback_model_to_use": "system_model",
      "has_chosen_default_model": true,
      "organization_id": "6a79a770b6c128ccc24bfca8",
      "resolved_default_model": "mdl_bx_anthropic-claude-haiku-4-5-20251001-v1_28ccc24bfca8"
    },
    "settable": "\u2026"
  }
}
```

**Wexa MCP server**

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000171\",\"result\":{\"available\":[{\"label_name\":\"WEXA System Model\",\"model_name\":\"system_model\"}],\"default\":{\"chosen\":true,\"model\":\"mdl_bx_anthropic-claude-haiku-4-5-20251001-v1_28ccc24bfca8\",\"source\":\"AI Models registry\"},\"registry\":\"\\u2026\",\"selected\":{\"embedding_model_to_use\":null,\"fallback_model_to_use\":\"system_model\",\"has_chosen_default_model\":true,\"organization_id\":\"6a79a770b6c128ccc24bfca8\",\"resolved_default_model\":\"mdl_bx_anthropic-claude-haiku-4-5-20251001-v1_28ccc24bfca8\"},\"settable\":\"\\u2026\"}}"
    }
  ],
  "isError": false
}
```

**TypeScript SDK**

```ts
// the object you get back IS the result — there is no `.result` to read
{
  available: [
    {
      label_name: 'WEXA System Model',
      model_name: 'system_model'
    }
  ],
  default: {
    chosen: true,
    model: 'mdl_bx_anthropic-claude-haiku-4-5-20251001-v1_28ccc24bfca8',
    source: 'AI Models registry'
  },
  registry: '…',
  selected: {
    embedding_model_to_use: null,
    fallback_model_to_use: 'system_model',
    has_chosen_default_model: true,
    organization_id: '6a79a770b6c128ccc24bfca8',
    resolved_default_model: 'mdl_bx_anthropic-claude-haiku-4-5-20251001-v1_28ccc24bfca8'
  },
  settable: '…'
}

// The TS SDK names these camelCase — lifecycleId, traceId — where Python uses
// lifecycle_id and trace_id. Both are non-enumerable: readable, but omitted by
// Object.keys() and JSON.stringify(). `result.lifecycleId` here is undefined.
result.lifecycleId // 'qlc_000171'
```

**Python SDK**

```python
# a dict subclass; `result` is already unwrapped
{
 "available": [
  {
   "label_name": "WEXA System Model",
   "model_name": "system_model"
  }
 ],
 "default": {
  "chosen": True,
  "model": "mdl_bx_anthropic-claude-haiku-4-5-20251001-v1_28ccc24bfca8",
  "source": "AI Models registry"
 },
 "registry": "\u2026",
 "selected": {
  "embedding_model_to_use": None,
  "fallback_model_to_use": "system_model",
  "has_chosen_default_model": True,
  "organization_id": "6a79a770b6c128ccc24bfca8",
  "resolved_default_model": "mdl_bx_anthropic-claude-haiku-4-5-20251001-v1_28ccc24bfca8"
 },
 "settable": "\u2026"
}

out.lifecycle_id  # 'qlc_000171' — an attribute, not a key
```

Keeping the `lifecycle_id` is what lets you ask later why a call was allowed, refused or held.

## Calling it

The same call on all four surfaces. Pick a tab once and every code block in the documentation follows it.

The ids in this example are real: they resolve against the project the documentation is written
against, so the call runs as written once you point it at your own deployment. Swap them for the
ids of your own objects.

**Call list-models**

**Wexa MCP server**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list-models",
    "arguments": {}
  }
}
```

**REST API**

```bash
curl -sS https://fabric.wexa.ai/v1/list-models \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

**TypeScript SDK**

```ts
import { Fabric } from '@wexa-fabric/sdk'

const fabric = new Fabric()
const { result } = await fabric.listModels({})
```

**Python SDK**

```python
from wexa import Fabric

fabric = Fabric()
out = fabric.list_models()
```

## Errors

Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its
HTTP status second. `list-models` checks the `fabric:orchestrate.read` grant, and reaches the seven classes every
tool reaches — listed under [the common set](/docs/tools/errors#the-common-set). These are the ones specific to it:

| Error | Status | Raised when |
| --- | --- | --- |
| `ConfigurationError` | 5xx | `list-models` is not available to you. Retrying will not help. |

## Governance

Every call to `list-models` runs through the same ten-stage lifecycle as every other Wexa tool: the
credential is resolved to a scope, the `fabric:orchestrate.read` grant is checked, quota is drawn down, the arguments are
validated, policy rules are evaluated, the call is executed, the result is shaped and redacted, and an audit
record is written. The `lifecycle_id` in the response is the handle to that record.

`list-models` only reads, so it is not marked consequential: it is audited lightly and is never held for
approval. It still consumes quota and is still refused by policy like anything else.

## See also

[The tool index](/docs/tools/overview), [errors](/docs/tools/errors),
and [which identifier goes where](/docs/tools/identifiers).
