Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions content/manuals/ai/compose/models-and-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,33 +83,6 @@ Common configuration options include:
> [!TIP]
> See more example in the [Common runtime configurations](#common-runtime-configurations) section.

### Alternative configuration with provider services

> [!IMPORTANT]
>
> This approach is deprecated. Use the [`models` top-level element](#basic-model-definition) instead.

You can also use the `provider` service type, which allows you to declare platform capabilities required by your application.
For AI models, you can use the `model` type to declare model dependencies.

To define a model provider:

```yaml
services:
chat:
image: my-chat-app
depends_on:
- ai_runner

ai_runner:
provider:
type: model
options:
model: ai/smollm2
context-size: 1024
runtime-flags: "--no-prefill-assistant"
```

## Service model binding

Services can reference models in two ways: short syntax and long syntax.
Expand Down Expand Up @@ -360,6 +333,33 @@ models:
- "0.9"
```

## Alternative configuration with provider services

> [!IMPORTANT]
>
> This approach is deprecated. Use the [`models` top-level element](#basic-model-definition) instead.

You can also use the `provider` service type, which allows you to declare platform capabilities required by your application.
For AI models, you can use the `model` type to declare model dependencies.

To define a model provider:

```yaml
services:
chat:
image: my-chat-app
depends_on:
- ai_runner

ai_runner:
provider:
type: model
options:
model: ai/smollm2
context-size: 1024
runtime-flags: "--no-prefill-assistant"
```

## Reference

- [`models` top-level element](/reference/compose-file/models.md)
Expand Down