Skip to content

feat(snowflake-cortex): add Snowflake Cortex provider#1902

Draft
kameshsampath wants to merge 1 commit into
anomalyco:devfrom
kameshsampath:feat/provider/snowflake-cortex
Draft

feat(snowflake-cortex): add Snowflake Cortex provider#1902
kameshsampath wants to merge 1 commit into
anomalyco:devfrom
kameshsampath:feat/provider/snowflake-cortex

Conversation

@kameshsampath
Copy link
Copy Markdown

@kameshsampath kameshsampath commented May 29, 2026

Summary

Adds snowflake-cortex as a new provider, exposing Snowflake's Cortex REST API through the OpenAI Chat Completions-compatible endpoint.

Closes #1895

Provider

Field Value
npm @ai-sdk/openai-compatible
api https://${SNOWFLAKE_ACCOUNT}.snowflakecomputing.com/api/v2/cortex/v1
env SNOWFLAKE_ACCOUNT, SNOWFLAKE_CORTEX_PAT

Models (15)

Model Source
claude-opus-4-7, claude-sonnet-4-6, claude-sonnet-4-5, claude-haiku-4-5 extends anthropic/* + Snowflake output limits
deepseek-r1 extends deepseek/deepseek-reasoner
mistral-large2 extends mistral/mistral-large-2411
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/*
llama3.1-70b, snowflake-llama-3.3-70b Full definitions

Cost fields

All cost fields are intentionally omitted. Rates defined in the Snowflake Service Consumption Table.

Test plan

  • bun validate passes with no errors
  • All 15 models resolve correctly (verified via bun validate JSON output)
  • logo.svg follows project conventions (width="24", fill="currentColor", Snowflake snowflake mark)
  • Tested locally with opencode against live Snowflake account using SNOWFLAKE_ACCOUNT + SNOWFLAKE_CORTEX_PAT

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
@kameshsampath kameshsampath marked this pull request as draft May 29, 2026 14:11
@kameshsampath
Copy link
Copy Markdown
Author

CC: @sfc-gh-kkeller

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.

Support for Snowflake Cortex

1 participant