For the complete documentation index, see llms.txt. This page is also available as Markdown.

Snowflake Cortex inference

Run Kaiya on language models hosted in your own Snowflake account through Snowflake Cortex, so model execution stays inside Snowflake.

Kaiya runs on language models from providers such as OpenAI, Anthropic and Google. It can also run on models hosted in Snowflake, through Snowflake Cortex. Teams that keep their data in Snowflake can then keep model execution there too. Kaiya's model use draws on the Snowflake credits your organization has already committed, rather than a separate model bill.

Setting it up takes two steps in Tellius: add a Snowflake Cortex configuration in LLM Configuration, then choose it in LLM Assignments.

Before you start

You need a few things ready in Snowflake:

  • Your account identifier. This is the first part of your Snowflake URL. For example, it is myorganization in myorganization.snowflakecomputing.com.

  • A Snowflake user for Tellius. Snowflake recommends a dedicated user for these requests.

  • Access to Cortex for that user. Cortex requests run under the user's default role, and that role needs the SNOWFLAKE.CORTEX_USER database role or the narrower SNOWFLAKE.CORTEX_REST_API_USER role. Snowflake grants CORTEX_USER to every role by default, so check with your Snowflake administrator whether it has been removed.

  • A way to sign in. Either a token (a Snowflake programmatic access token or an OAuth access token), or an RSA key pair registered with the Snowflake user.

  • The model you want to use. Check that it is available to your Snowflake account and region. Snowflake marks some models as preview, and those are not meant for production use.

Add a Snowflake Cortex configuration

The Add Configuration dialog with Snowflake Cortex chosen and the Bearer Token authentication fields
  1. Go to Settings → Intelligence → Kaiya & AI → LLM Configuration and select Add Configuration.

  2. Under LLM Model, choose Snowflake Cortex. The form changes to show the fields Cortex needs.

  3. Enter a Reference Name. This is the name you pick the configuration by in LLM Assignments, so make it clear, for example the model name.

  4. Enter the Model Parameter: the request settings, written as JSON, including the Cortex model to use. Contact Tellius support for the exact keys.

  5. Enter your Snowflake Account identifier.

  6. Choose an Authentication Type and fill in the field it adds:

    • Bearer Token (PAT / OAuth): paste the token in Bearer Token. It can be a Snowflake programmatic access token, an OAuth access token or a JWT.

    • Key-Pair (RSA Private Key): enter the Snowflake User the key pair belongs to, and paste the private key in PEM format in RSA Private Key (PEM).

  7. Select Validate to send a test request with these details. Fix anything it reports.

  8. Select Save. To keep a partly filled configuration, select Save as Draft instead.

Validate and Save stay unavailable until the required fields are filled in. A Snowflake Cortex configuration has no Default Header field.

Use the configuration in Kaiya

  1. Go to Settings → Intelligence → Kaiya & AI → LLM Assignments.

  2. Under Unified Chat, choose your Snowflake Cortex configuration as the Primary Model, the Secondary Model, or both.

  3. Select Save.

The Secondary Model is optional. Kaiya switches to it on its own if the primary model fails with a rate limit or an authentication error. See LLM Assignments.

Cost and usage

Snowflake bills Cortex use to your Snowflake account in credits. To see the usage on the Snowflake side, use the CORTEX_REST_API_USAGE_HISTORY view in Snowflake's Account Usage schema.

In Tellius, Kaiya Cost shows the cost of Kaiya's model use from the rates set for each model. A model reached through Snowflake Cortex appears in its own row. If it has no rates yet, add them on the Model Pricing tab so its usage shows a cost. See Kaiya Cost.

Edit or remove the configuration

Your Snowflake Cortex configuration appears as a card on LLM Configuration, labelled Snowflake Cortex. Use the card's three-dot menu to Edit or Delete it. Before you delete it, choose another configuration in LLM Assignments for any slot that uses it. See LLM Configuration.

Best practices

  • Use a dedicated Snowflake user. It keeps Kaiya's Cortex use separate in Snowflake's usage history and easy to control.

  • Validate before you save. A wrong account identifier or an expired token shows up straight away.

  • Set a secondary model. If the primary model hits a rate limit, Kaiya carries on with the secondary one.

  • Add rates for your Cortex model. Kaiya Cost can only show a cost for models that have rates.

Was this helpful?