Radius.AI/models@2025-08-01-preview
❗️ Preview Release: This documentation covers a preview of Radius which uses different Resource Types from the current release. Enable it by passing the --preview to the Radius CLI or settingRADIUS_PREVIEW=true.
Description
The Radius.AI/models Resource Type deploys an LLM inference model endpoint. To deploy a model, add a models resource to the application definition Bicep file. The platform-engineer recipe binds this developer-facing contract to a managed cloud model service without exposing any module details to the app.
resource model 'Radius.AI/models@2025-08-01-preview' = {
name: 'model'
properties: {
environment: environment
application: myApplication.id
model: 'gpt-5-mini'
}
}
To connect your container to the model, create a connection from the Container resource to the model as shown below.
resource frontend 'Radius.Compute/containers@2025-08-01-preview' = {
name: 'frontend'
properties: {
application: myApplication.id
environment: environment
containers: {
frontend: {
image: 'frontend:1.25'
}
}
connections: {
llm: {
source: model.id
}
}
}
}
The connection automatically injects environment variables into the
container for all properties from the model. The environment variables are
named CONNECTION_<CONNECTION-NAME>_<PROPERTY-NAME>. In this example the
connection name is llm so the environment variables will be:
- CONNECTION_LLM_MODEL
- CONNECTION_LLM_ENDPOINT
The apiKey secret is NOT injected via the connection — it is materialized
into a managed Radius.Security/secrets resource. Bind it into a container
env var with a secretKeyRef, using model.properties.secrets.name as the
secretName and key apiKey (see the secrets property).
Top-Level Properties
| Property | Type | Description |
|---|---|---|
application | string | (Optional) The Radius Application ID. myApplication.id for example. |
codeReference | string | Optional URI to the source code of this resource type. ex: https://github.com/radius-project/radius/blob/4fab87e8127adf1db6f43b7029d5235fbe82c5c9/cmd/controller/main.go#L27 |
connections | object | Map of connection name to connection data. |
endpoint | string | (Read Only) The base URL used to call the model inference endpoint. Mapped from the recipe module’s output. |
environment | string | (Required) The Radius Environment ID. Typically set by the rad CLI. Typically value should be environment. |
model | string | (Optional) The model deployment to provision. Defaults to gpt-5-mini if not provided. |
secrets | object | (Read-only) Recipe secrets. The reserved name sub-property references the managed Radius.Security/secrets resource Radius materializes from the recipe’s outputs.secrets; the other sub-properties declare secret keys whose values are written only into that managed secret (never onto this resource). Consumers bind a key into a container env var via secretKeyRef, using <resource>.properties.secrets.name as secretName. |
Object Properties
connections
| Property | Type | Description |
|---|---|---|
disableDefaultEnvVars | boolean | Disables the automatic injection of environment variables from the connected resource’s properties. |
source | string | Resource ID of the source resource for this connection. |
secrets
| Property | Type | Description |
|---|---|---|
apiKey | string | (Read Only) The API key used to call the model inference endpoint. Mapped from the recipe module’s primaryKey output; delivered via the managed secret. |
name | string | (Reserved) Name of the managed Radius.Security/secrets resource. Use as secretName in a container secretKeyRef. |
Feedback
Was this page helpful?
Glad to hear it! Please feel free to star our repo and join our Discord server to stay up to date with the project.
Sorry to hear that. If you would like to also contribute a suggestion visit and tell us how we can improve.