Skip to content

feat: add Snowflake Cortex provider with 23 models#1841

Open
sfc-gh-nashukla wants to merge 2 commits into
anomalyco:devfrom
sfc-gh-nashukla:add-snowflake-provider
Open

feat: add Snowflake Cortex provider with 23 models#1841
sfc-gh-nashukla wants to merge 2 commits into
anomalyco:devfrom
sfc-gh-nashukla:add-snowflake-provider

Conversation

@sfc-gh-nashukla
Copy link
Copy Markdown

Summary

Adds Snowflake Cortex as a new provider using the OpenAI-compatible REST API.

Provider configuration

Models (23 total)

Family Models
Claude claude-sonnet-4-5, claude-sonnet-4-6, claude-4-sonnet, claude-opus-4-5, claude-opus-4-6, claude-opus-4-7*, claude-haiku-4-5
OpenAI via Snowflake openai-gpt-4.1, openai-gpt-5*, openai-gpt-5.1, openai-gpt-5.2, openai-gpt-5.4*, openai-gpt-5-mini*, openai-gpt-5-nano*
Meta Llama llama3.1-8b, llama3.1-70b, llama3.1-405b, llama4-maverick
Mistral mistral-7b, mistral-large, mistral-large2
DeepSeek deepseek-r1
Snowflake-native snowflake-llama-3.3-70b

* = preview (status = "alpha")

Implementation notes

  • Claude models use [extends] from anthropic/ with Snowflake-specific [cost] and [limit] overrides
  • All models capped at output = 16_384 tokens (Snowflake platform limit)
  • experimental.modes.fast omitted for opus models (not supported by Snowflake Cortex)
  • Pricing sourced from the Snowflake Service Consumption Table
  • bun validate passes cleanly

Adds Snowflake Cortex as a new provider using the OpenAI-compatible
REST API endpoint at /api/v2/cortex/v1.

Models included:
- Claude: sonnet-4-5, sonnet-4-6, 4-sonnet, opus-4-5, opus-4-6, opus-4-7, haiku-4-5
- OpenAI (via Snowflake): gpt-4.1, gpt-5, gpt-5.1, gpt-5.2, gpt-5.4, gpt-5-mini, gpt-5-nano
- Meta Llama: 3.1-8b, 3.1-70b, 3.1-405b, 4-maverick
- Mistral: 7b, large, large2
- DeepSeek: r1
- Snowflake: llama-3.3-70b (fine-tuned variant)

Claude models use [extends] from anthropic/ with Snowflake-specific
cost and limit overrides (output capped at 16,384 tokens). Preview
models tagged with status = "alpha". Pricing sourced from the
Snowflake Service Consumption Table.
Adds Snowflake Cortex Anthropic Messages API endpoint (/api/v2/cortex/v1/messages)
as a separate provider using @ai-sdk/anthropic.
Includes all 7 Claude models supported via the Messages API.
@sfc-gh-nashukla
Copy link
Copy Markdown
Author

Team, I am wondering if you have any update to share with me?

@rekram1-node
Copy link
Copy Markdown
Collaborator

@sfc-gh-nashukla
Copy link
Copy Markdown
Author

Thanks for getting this merged, @rekram1-node I had a related PR open (#1841) with a few additions worth considering as a follow-up:

Missing models — the merged PR has 15 models; the full Snowflake Cortex catalog has 23. Missing:

llama3.1-8b, llama3.1-405b, llama4-maverick
mistral-7b, mistral-large
claude-opus-4-5, claude-opus-4-6
snowflake-llama-3.3-70b (Snowflake's own model)
Pricing — all rates are publicly available in the Snowflake Service Consumption Table. Happy to add those if the project wants them.

Provider name — one thing worth flagging: Snowflake recently renamed this product to Cortex Inference (previously "Cortex REST API"). Worth considering whether snowflake-cortex-inference would be more future-proof as a provider name, but happy to follow whatever convention the project prefers.

Happy to submit a follow-up PR with the missing models + pricing if that's helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants