GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||
GeezerVison is showing github.com — feat(snowflake-cortex): add Snowflake Cortex provider by kameshsampath · Pull Request #1902 · anomalyco/models.dev Conversation
|
| Field | Value |
|---|---|
npm |
@ai-sdk/openai-compatible |
api |
https://${SNOWFLAKE_ACCOUNT}.snowflakecomputing.com/api/v2/cortex/v1 |
env |
SNOWFLAKE_ACCOUNT, SNOWFLAKE_CORTEX_PAT |
| 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 |
All cost fields are intentionally omitted. Rates defined in the Snowflake Service Consumption Table.
bun validate passes with no errorsbun validate JSON output)logo.svg follows project conventions (width="24", fill="currentColor", Snowflake snowflake mark)SNOWFLAKE_ACCOUNT + SNOWFLAKE_CORTEX_PAT
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CC: @sfc-gh-kkeller |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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 (11, all with tool_call support):
- Anthropic: claude-opus-4-7 (beta/preview), claude-sonnet-4-6,
claude-sonnet-4-5, claude-haiku-4-5
- OpenAI: openai-gpt-5.4 (beta), openai-gpt-5.2, openai-gpt-5.1,
openai-gpt-5 (beta), openai-gpt-5-mini (beta), openai-gpt-5-nano (beta),
openai-gpt-4.1
Models without tool_call support (deepseek-r1, llama3.1-70b,
snowflake-llama-3.3-70b, mistral-large2) are excluded per Snowflake docs:
"Tool calling is supported for OpenAI and Claude models only."
Preview/not-GA models are marked with status = "beta".
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.
Closes anomalyco#1895
7012e98 to
f3466af
Compare
There was an error while loading. Please reload this page.
Snowflake Cortex uses a per-account endpoint URL and has two API quirks that require explicit handling: it expects max_completion_tokens instead of max_tokens, and returns 400 "conversation complete" as a normal stop condition rather than a finish_reason. Changes: - custom() loader in provider.ts: resolves baseURL from SNOWFLAKE_ACCOUNT, PAT from SNOWFLAKE_CORTEX_PAT or opencode auth store, fetch interceptor rewrites max_tokens and handles conversation complete - SnowflakeCortexPlugin in packages/core: V2 plugin for the aisdk.sdk hook with the same fetch interceptor; registered before OpenAICompatiblePlugin - providers.ts: dedicated login flow that collects and stores both account identifier and PAT via opencode auth Companion models.dev PR: anomalyco/models.dev#1902 .... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-Authored-By: Cortex Code <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Support for Snowflake Cortex
There was an error while loading. Please reload this page.