Configure default model settings¶
Snowflake account administrators can set a default model for all Cortex Code users by creating a settings agent — a schema-level object in CORTEX_CODE.CONFIG that Cortex Code reads at session startup to apply account-wide model settings.
This topic describes how to create the settings agent, configure the default model, and grant access to users.
Prerequisites¶
Before configuring default model settings, ensure the following:
- You have the ACCOUNTADMIN role. This is required to create and modify agent objects in the system-managed
CORTEX_CODEdatabase. - Cross-region inference is enabled on your account. See Enable cross-region inference.
- The
CORTEX_CODEdatabase andCONFIGschema are available in your account. These are created automatically by Snowflake.
Create the settings agent¶
The settings agent is an AGENT object in the CORTEX_CODE.CONFIG schema. Cortex Code reads this object at session startup and applies the configured settings. Currently, models.orchestration is the only supported setting key; other keys in the specification are ignored.
To create the default settings agent, run the following as ACCOUNTADMIN:
This creates a settings agent using auto, the recommended model setting. With auto, Snowflake selects a default model automatically. Currently this maps to a fixed default model; dynamic model selection is under active development.
To pin a specific model instead, replace auto with a model identifier:
Grant access to users¶
Grant USAGE on the settings agent to each role whose users should receive these settings:
Cortex Code applies the settings from the agent object to any user whose active role has USAGE on that agent.
To apply the settings to all users in the account, grant USAGE to the PUBLIC role, which is automatically granted to every user:
Update agent settings¶
To change the default model after the initial setup:
Note
Settings are applied at session startup. Exact behavior may vary across surfaces and is subject to change.
Available models¶
Set orchestration to a supported Cortex model identifier. Use auto (recommended) to let Snowflake select an appropriate model automatically.
For available model identifiers, context windows, and per-region availability, see Cross-region inference.
Enable cross-region inference¶
Cross-region inference is required for Cortex Code to function. It routes model requests to a region where the necessary model is available.
Cross-region inference is disabled by default. An ACCOUNTADMIN must enable it:
When orchestration is set to auto, Snowflake uses cross-region inference to automatically select an available model.