feat: add Snowflake Cortex provider with 23 models#1841
Open
sfc-gh-nashukla wants to merge 2 commits into
Open
feat: add Snowflake Cortex provider with 23 models#1841sfc-gh-nashukla wants to merge 2 commits into
sfc-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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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