feat: add Snowflake Cortex provider with 23 models#1841
feat: add Snowflake Cortex provider with 23 models#1841sfc-gh-nashukla wants to merge 2 commits into
Conversation
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.
|
Team, I am wondering if you have any update to share with me? |
|
I think this was already added: |
|
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 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. |
Summary
Adds Snowflake Cortex as a new provider using the OpenAI-compatible REST API.
Provider configuration
@ai-sdk/openai-compatiblehttps://${SNOWFLAKE_ACCOUNT_URL}/api/v2/cortex/v1SNOWFLAKE_PAT(Programmatic Access Token)Models (23 total)
*= preview (status = "alpha")Implementation notes
[extends]fromanthropic/with Snowflake-specific[cost]and[limit]overridesoutput = 16_384tokens (Snowflake platform limit)experimental.modes.fastomitted for opus models (not supported by Snowflake Cortex)bun validatepasses cleanly