GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(snowflake-cortex): add Snowflake Cortex provider by kameshsampath · Pull Request #1902 · anomalyco/models.dev

Conversation

@kameshsampath

@kameshsampath kameshsampath commented May 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kameshsampath
kameshsampath marked this pull request as draft May 29, 2026 14:11
@kameshsampath

kameshsampath commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

CC: @sfc-gh-kkeller

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced May 29, 2026
[FEATURE]: Add Snowflake Cortex provider anomalyco/opencode#29900
Closed
feat(core): add Snowflake Cortex provider anomalyco/opencode#29901
Merged
@kameshsampath
kameshsampath marked this pull request as ready for review May 29, 2026 15:52
@kameshsampath
kameshsampath marked this pull request as draft May 29, 2026 15:52
@kameshsampath
feat(snowflake-cortex): add Snowflake Cortex provider
f3466af
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
@kameshsampath
kameshsampath force-pushed the feat/provider/snowflake-cortex branch from 7012e98 to f3466af Compare May 30, 2026 03:34
@kameshsampath
kameshsampath marked this pull request as ready for review May 30, 2026 04:00
@rekram1-node
rekram1-node merged commit 2e58165 into anomalyco:dev May 30, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

kameshsampath added a commit to kameshsampath/opencode that referenced this pull request Jun 3, 2026
@kameshsampath @snowflake-coco
feat(core): add Snowflake Cortex provider
eeb987a
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Support for Snowflake Cortex

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@kameshsampath @rekram1-node
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.