feat(snowflake-cortex): add Snowflake Cortex provider#1902
Draft
kameshsampath wants to merge 1 commit into
Draft
feat(snowflake-cortex): add Snowflake Cortex provider#1902kameshsampath wants to merge 1 commit into
kameshsampath wants to merge 1 commit into
Conversation
Adds the snowflake-cortex provider which exposes Snowflake's Cortex
REST API (OpenAI Chat Completions-compatible endpoint) to opencode.
Provider details:
- npm: @ai-sdk/openai-compatible
- API: https://${SNOWFLAKE_ACCOUNT}.snowflakecomputing.com/api/v2/cortex/v1
- Auth: SNOWFLAKE_ACCOUNT + SNOWFLAKE_CORTEX_PAT (Programmatic Access Token)
Models (15):
- Anthropic: claude-opus-4-7, claude-sonnet-4-6, claude-sonnet-4-5,
claude-haiku-4-5 (extends anthropic/*, output capped to Snowflake limits)
- DeepSeek: deepseek-r1 (extends deepseek/deepseek-reasoner)
- Mistral: mistral-large2 (extends mistral/mistral-large-2411)
- OpenAI: openai-gpt-5.4, openai-gpt-5.2, openai-gpt-5.1, openai-gpt-5,
openai-gpt-5-mini, openai-gpt-5-nano, openai-gpt-4.1 (extends openai/*)
- Meta/Snowflake: llama3.1-70b, snowflake-llama-3.3-70b (full definitions)
Cost fields are intentionally omitted on all models. The Cortex REST API
is billed in USD (AI_INFERENCE service type) at rates defined in the
Snowflake Service Consumption Table, which differ from the underlying
provider list prices.
Closes anomalyco#1895
Author
|
CC: @sfc-gh-kkeller |
This was referenced May 29, 2026
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-cortexas a new provider, exposing Snowflake's Cortex REST API through the OpenAI Chat Completions-compatible endpoint.Closes #1895
Provider
npm@ai-sdk/openai-compatibleapihttps://${SNOWFLAKE_ACCOUNT}.snowflakecomputing.com/api/v2/cortex/v1envSNOWFLAKE_ACCOUNT,SNOWFLAKE_CORTEX_PATModels (15)
claude-opus-4-7,claude-sonnet-4-6,claude-sonnet-4-5,claude-haiku-4-5extends anthropic/*+ Snowflake output limitsdeepseek-r1extends deepseek/deepseek-reasonermistral-large2extends mistral/mistral-large-2411openai-gpt-5.4,openai-gpt-5.2,openai-gpt-5.1,openai-gpt-5,openai-gpt-5-mini,openai-gpt-5-nano,openai-gpt-4.1extends openai/*llama3.1-70b,snowflake-llama-3.3-70bCost fields
All cost fields are intentionally omitted. Rates defined in the Snowflake Service Consumption Table.
Test plan
bun validatepasses with no errorsbun validateJSON output)logo.svgfollows project conventions (width="24",fill="currentColor", Snowflake snowflake mark)SNOWFLAKE_ACCOUNT+SNOWFLAKE_CORTEX_PAT