Skip to content

Update Snowflake Cortex models - #45

Merged
wch merged 2 commits into
mainfrom
snowflake-cortex-models
Aug 4, 2026
Merged

Update Snowflake Cortex models#45
wch merged 2 commits into
mainfrom
snowflake-cortex-models

Conversation

@wch

@wch wch commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

This PR updates the list of models available on Snowflake Cortex.

wch added 2 commits August 3, 2026 23:08
The static Cortex catalog listed four Claude and two OpenAI models, at token
limits that matched neither the endpoint nor the models. Refresh it against
the Cortex REST API docs -- the endpoint `SnowflakeClient` actually calls --
and move model membership, display names, and windows into one table that
capability inference reads too.

`SNOWFLAKE_CORTEX_CATALOG` and `getSnowflakeCortexModelCapabilities()` in
ai-config now own all of it; the bridge derives its `ModelInfo` list by
mapping over the catalog. Adding a model is one entry in one file, and a
catalog entry cannot disagree with a `models.custom` override of the same id
-- previously the same policy was written twice, in two packages, and the two
copies had drifted from the docs together.

Catalog (current generations only, and Claude/OpenAI only since Cortex
supports tool calling for nothing else): Opus 5, Opus 4.7, Sonnet 4.6, Opus
4.6, Haiku 4.5, GPT-5.4, GPT-5.2. Membership follows the REST availability
table, which serves a different set than the AI_COMPLETE SQL function does:
`claude-sonnet-5`, `claude-opus-4-8`, `openai-gpt-5.4-mini`, and
`openai-gpt-5.4-nano` appear only under AI_COMPLETE and would fail REST with
`400 unknown model`, while `openai-gpt-5.4` is REST-only.

Output stays capped at 16,384 tokens for every model. That is a property of
the REST endpoint, not of the models -- its rate-limit table lists 16,384 for
all of them and the docs' examples send `max_tokens: 16384` -- so the higher
AI_COMPLETE caps (up to 128k) must not be used here: `maxOutputTokens` flows
straight into the request, and exceeding the cap is a documented `400 max
tokens of <count> exceeded`.

Context windows are corrected upward, which is what was actually wrong
before: Opus 4.7/4.6 and Sonnet 4.6 were declared at 200k where Cortex serves
1M. The REST docs publish no per-model window, so these come from the AISQL
restrictions table -- a window is a property of the model, unlike the output
cap. Input and output share the window, so `maxInputTokens` is the window
minus the output cap.

https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-rest-api
Document that the 16,384-token REST cap is extrapolated conservatively to the two preview models whose rate-limit rows are not yet published. Add active bridge-level provider tests that validate catalog projection and credential gates without copying model literals.
@wch
wch merged commit 1c1e5f7 into main Aug 4, 2026
4 checks passed
@wch
wch deleted the snowflake-cortex-models branch August 4, 2026 15:23
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.

1 participant