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

# model

> Contract, placement, related fields and source examples for this Nika YAML field.

[Language reference](https://docs.nika.sh/reference/language/overview.md) / `model`

## Meaning and placement

### document

Default model · `<provider>/<name>` (e.g. ollama/qwen3.5:9b · anthropic/claude-sonnet-4-6 · mock/echo). Names WHICH model answers; how the run reaches it and the native effort it asks for are `run.access` and `run.reasoning` (spec/01-envelope.md §run).

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/properties/model` |
| type | `"string"` |

**In the same object:** [const](https://docs.nika.sh/reference/language/words/const.md) · [inputs](https://docs.nika.sh/reference/language/words/inputs.md) · [nika](https://docs.nika.sh/reference/language/words/nika.md) · [outputs](https://docs.nika.sh/reference/language/words/outputs.md) · [permits](https://docs.nika.sh/reference/language/words/permits.md) · [run](https://docs.nika.sh/reference/language/words/run.md) · [secrets](https://docs.nika.sh/reference/language/words/secrets.md) · [tasks](https://docs.nika.sh/reference/language/words/tasks.md)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/schemas/workflow.schema.json)

### infer

The schema declares this field at the location below.

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/$defs/infer/properties/model` |
| type | `"string"` |

**In the same object:** [max\_tokens](https://docs.nika.sh/reference/language/words/max_tokens.md) · [prompt](https://docs.nika.sh/reference/language/words/prompt.md) · [schema](https://docs.nika.sh/reference/language/words/schema.md) · [system](https://docs.nika.sh/reference/language/words/system.md) · [temperature](https://docs.nika.sh/reference/language/words/temperature.md) · [thinking](https://docs.nika.sh/reference/language/words/thinking.md) · [vision](https://docs.nika.sh/reference/language/words/vision.md)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/schemas/workflow.schema.json)

### agent

The schema declares this field at the location below.

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/$defs/agent/properties/model` |
| type | `"string"` |

**In the same object:** [images](https://docs.nika.sh/reference/language/words/images.md) · [max\_tokens\_total](https://docs.nika.sh/reference/language/words/max_tokens_total.md) · [max\_turns](https://docs.nika.sh/reference/language/words/max_turns.md) · [prompt](https://docs.nika.sh/reference/language/words/prompt.md) · [schema](https://docs.nika.sh/reference/language/words/schema.md) · [skills](https://docs.nika.sh/reference/language/words/skills.md) · [system](https://docs.nika.sh/reference/language/words/system.md) · [temperature](https://docs.nika.sh/reference/language/words/temperature.md) · [tools](https://docs.nika.sh/reference/language/words/tools.md)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/schemas/workflow.schema.json)

## In a source template

Excerpt from `templates/agent-loop.nika`, source lines 30–39. This is a fragment, not a runnable workflow.

```yaml illustration theme={"system"}
# not select a paid provider from ambient credentials. Choose a different
# model explicitly for a real run; `--model mock/echo` rehearses on the mock
# model: zero keys, no model call; a fetch step still reaches its host.
model: mock/echo

inputs:
  goal:
    type: string
    required: true
    # A `required:` input still carries a `default:` here so the skeleton
```

The pinned schema text says a `required` input is not satisfied by `default` (the caller must supply a value). The released 0.124.3 engine still applies `default:` when the key is omitted. That is a source-versus-implementation discrepancy ([nika-spec#348](https://github.com/supernovae-st/nika-spec/issues/348)), not one law. Prefer `required: false` plus `default:` for knobs, and required without `default:` for caller-owned values (`NIKA-1708` at run).

### Templates containing this field

| Template | Source |
| - | - |
| `templates/agent-loop.nika` | [Line 33](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/agent-loop.nika#L33) |
| `templates/bounded-batch.nika` | [Line 11](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/bounded-batch.nika#L11) |
| `templates/chain.nika` | [Line 30](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/chain.nika#L30) |
| `templates/classify-and-route.nika` | [Line 17](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/classify-and-route.nika#L17) |
| `templates/corpus-qa.nika` | [Line 18](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/corpus-qa.nika#L18) |
| `templates/docker-report.nika` | [Line 33](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/docker-report.nika#L33) |
| `templates/document-to-fields.nika` | [Line 18](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/document-to-fields.nika#L18) |
| `templates/evaluate-and-optimize.nika` | [Line 30](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/evaluate-and-optimize.nika#L30) |
| `templates/fanout.nika` | [Line 51](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/fanout.nika#L51) |
| `templates/media-asset-pack.nika` | [Line 31](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/media-asset-pack.nika#L31) |
| `templates/parallel-review.nika` | [Line 11](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/parallel-review.nika#L11) |
| `templates/project-public-fields.nika` | [Line 11](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/project-public-fields.nika#L11) |
| `templates/website-brief.nika` | [Line 32](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/website-brief.nika#L32) |

These are literal key occurrences in the source files, not an execution or conformance claim. [How to instantiate a template](https://docs.nika.sh/guides/templates.md).

## Contract and implementation

This page projects the named specification revision. Check [released engine status](https://docs.nika.sh/reference/status.md) and [the validation workflow](https://docs.nika.sh/guides/agent-authoring.md) before running a file. An optional field is not evidence that every engine supports every value.

Canonical identity: `language:word:model`. Spec revision: [`4e259e5b8012`](https://github.com/supernovae-st/nika-spec/tree/4e259e5b8012fcdf92f094142a52dfef24099b85).

[How documentation stays connected](https://docs.nika.sh/reference/knowledge-system.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.