---
question: Which ids set the default chat and embedding models?
kind: task
via_web: na
via_cli: na
via_python: na
via_api: na
via_config: available
ref_config: services.model_registry
next:
  - /capabilities/build/models/run-models-locally
  - /capabilities/build/agents/edit-prompt-and-model
---

# Choose the default model

The default chat model is the one an agent gets from `registry.get_default_chat_model()`, which is what `abi new agent` scaffolds. The default embedding model is the one `get_default_embedding_model()` returns. Both are canonical ids in `config.yaml`, read when the engine starts.

## Web UI

Not applicable. The defaults are `config.yaml` values; the Nexus **System** app (super admins) only shows them. One agent's model is [Edit prompt & model](/user-guide/build/agents/edit-prompt-and-model?via=web).

## CLI

Not applicable. No `abi` command sets the defaults: edit `config.yaml` as on the Config tab.

## Python

Not applicable. Code reads the defaults (`registry.default_chat_model_id`) but does not set them. One agent's model is [Edit prompt & model](/user-guide/build/agents/edit-prompt-and-model?via=python).

## REST API

Not applicable. No endpoint sets the engine's default models; one record's model is [Edit prompt & model](/user-guide/build/agents/edit-prompt-and-model?via=api).

## Config

### Set the ids

Put the canonical ids under `services.model_registry`. A new project has:

```yaml title="config.yaml"
services:
  model_registry:
    default_chat_model: "gemma-4-26b-a4b-it"
    default_embedding_model: "text-embedding-3-small"
```

Both come from the `naas_abi_marketplace.ai.openrouter` module. The project template lists other ids, once their module is enabled:

```text
gemma-4-31b-it      ai.openrouter   chat
claude-opus-4.8     ai.openrouter   chat
qwen-2.5-3b         ai.ollama       chat, local
nomic-embed-text    ai.ollama       embedding, local
```

### Keep the module enabled

The module that registers each id has to be enabled. The engine checks both ids once the modules have loaded, and stops with the list of registered ids when one is missing. See [Add a provider](/user-guide/build/models/add-a-provider?via=config).

### Check the agents that pin a model

An agent that names its own model ignores the default. The project template pins `naas_abi`'s agents to the default chat model, in that module's `config:`:

```yaml title="config.yaml"
  - module: naas_abi
    enabled: true
    config:
      abi_agent_model: "gemma-4-26b-a4b-it"
      ontology_engineer_model: "gemma-4-26b-a4b-it"
```

Change those with the default. Then restart the engine.

Local models are [Run models locally](/user-guide/build/models/run-models-locally).
