> ## 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](/reference/language/overview) / `model`

## Meaning and placement

### document

Default model · `&lt;provider&gt;/&lt;name&gt;` (e.g. ollama/qwen3.5:9b · anthropic/claude-sonnet-4-6 · mock/echo).

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

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

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/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](/reference/language/words/max_tokens) · [prompt](/reference/language/words/prompt) · [schema](/reference/language/words/schema) · [system](/reference/language/words/system) · [temperature](/reference/language/words/temperature) · [thinking](/reference/language/words/thinking) · [vision](/reference/language/words/vision)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/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:** [max\_tokens\_total](/reference/language/words/max_tokens_total) · [max\_turns](/reference/language/words/max_turns) · [prompt](/reference/language/words/prompt) · [schema](/reference/language/words/schema) · [skills](/reference/language/words/skills) · [system](/reference/language/words/system) · [temperature](/reference/language/words/temperature) · [tools](/reference/language/words/tools)

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

## In a source template

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

```yaml illustration theme={"system"}
# can resolve, and whatever rides on the line is dropped — so the teaching
# lives here, above it. Measured on 0.118.7: with no resolvable seat the
# stamp leaves `mock/echo`, the offline path this file guarantees.
model: mock/echo

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

### Templates containing this field

| Template                                    | Source                                                                                                                                            |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `templates/agent-loop.nika.yaml`            | [Line 38](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/agent-loop.nika.yaml#L38)            |
| `templates/chain.nika.yaml`                 | [Line 30](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/chain.nika.yaml#L30)                 |
| `templates/classify-and-route.nika.yaml`    | [Line 18](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/classify-and-route.nika.yaml#L18)    |
| `templates/corpus-qa.nika.yaml`             | [Line 19](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/corpus-qa.nika.yaml#L19)             |
| `templates/docker-report.nika.yaml`         | [Line 36](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/docker-report.nika.yaml#L36)         |
| `templates/document-to-fields.nika.yaml`    | [Line 19](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/document-to-fields.nika.yaml#L19)    |
| `templates/evaluate-and-optimize.nika.yaml` | [Line 31](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/evaluate-and-optimize.nika.yaml#L31) |
| `templates/fanout.nika.yaml`                | [Line 55](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/fanout.nika.yaml#L55)                |
| `templates/media-asset-pack.nika.yaml`      | [Line 33](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/media-asset-pack.nika.yaml#L33)      |
| `templates/website-brief.nika.yaml`         | [Line 35](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/website-brief.nika.yaml#L35)         |

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

## Contract and implementation

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

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

[How documentation stays connected](/reference/knowledge-system).
