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

# Model

```bash theme={null}
telnyx-acp set model zai-org/GLM-5.3-Flash
```

```text {2,5,13,14,31} theme={null}
support-agent/
├── agent.json                                         ◀
├── instructions.md
└── .telnyx/                        written by deploy
    ├── index.ts                                       ◀
    ├── telnyx.toml
    ├── telnyx-env.d.ts
    └── package.json

@telnyx/acp/                      the package
├── managed/
│   ├── index.ts
│   ├── agent.ts                                       ◀
│   ├── model.ts                                       ◀
│   ├── memory.ts
│   ├── tools.ts
│   ├── mcp.ts
│   ├── voice.ts
│   ├── direct-turn.ts
│   └── filler.ts
├── channels/
│   ├── index.ts
│   ├── phone.ts
│   ├── email.ts
│   ├── web.ts
│   └── wire.ts
├── synth/
│   ├── index.ts
│   ├── code-entry.ts
│   └── vendor.ts
└── spec/
    ├── schema.ts
    ├── model.ts                                       ◀
    ├── phone.ts
    ├── project.ts
    └── io.ts
```

`model` is written by `create --model` and changed by `set model`. On a terminal, `set model` with no value opens the same searchable list as the wizard. At `deploy` it becomes `spec.model` in `.telnyx/index.ts`, and [`buildHarness()`](/docs/agent-sdk/inside/harness) in `managed/agent.ts` builds the language model from it:

```ts theme={null}
// managed/agent.ts, buildHarness()
const model = this.host.model
  ?? chatLanguageModel((this.host.completions ?? defaultCompletions)(this.env, this.spec), this.spec.model);
```

`model` becomes the harness spec's [`model`](/docs/agent-sdk/harness-sdk/create-harness#spec-model). It is an AI SDK v6 language model, which `chatLanguageModel` implements over the chat completions.

`chatLanguageModel` and `telnyxChatCompletions` are in `managed/model.ts`. The call goes to the Telnyx inference endpoint through the `TELNYX` binding of the instance's [`env`](/docs/agent-sdk/interface/env), as `ai.openai.chat.createCompletion`, and for a third-party model the key stored as a secret is added to the request as `api_key`. A host that supplies `model` replaces the language model outright; one that supplies `completions` keeps `spec.model` and changes the endpoint it is served from.
