litellm - ✅(Solved) Fix [Bug]: Snowflake Cortex API Base endpoint is wrong [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#27187Fetched 2026-05-06 06:15:36
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×2commented ×1cross-referenced ×1referenced ×1

Fix Action

Fixed

PR fix notes

PR #27263: fix(snowflake): update Cortex endpoint from inference:complete to v1/chat/completions

Description (problem / solution / changelog)

Summary

Snowflake updated their Cortex REST API. The old inference endpoint has been replaced by a new OpenAI-compatible path:

BeforeAfter
Endpoint/api/v2/cortex/inference:complete/api/v2/cortex/v1/chat/completions
Full default URLhttps://{account}.snowflakecomputing.com/api/v2/cortex/inference:completehttps://{account}.snowflakecomputing.com/api/v2/cortex/v1/chat/completions

The old URL caused a double-path bug when users provided an api_base that already included /cortex/v1: the _get_api_base normalizer appended /api/v2 (since it didn't end with that), producing an invalid URL like ...cortex/v1/api/v2/cortex/inference:complete.

Changes

  • litellm/llms/snowflake/chat/transformation.py: update get_complete_url() suffix
  • Corrected stale docstring (still referred to "DeepSeek")
  • tests/.../test_snowflake_chat_transformation.py: update endpoint assertion

Reference

Snowflake Cortex REST API docs: https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-rest-api

Fixes #27187

Changed files

  • litellm/llms/snowflake/chat/transformation.py (modified, +2/-2)
  • tests/test_litellm/llms/snowflake/chat/test_snowflake_chat_transformation.py (modified, +1/-1)

Code Example

curl -X POST \
  https://<account>.snowflakecomputing.com/api/v2/cortex/v1/api/v2/cortex/inference:complete \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Be****Fw' \
  -H 'X-Snowflake-Authorization-Token-Type: KE****WT' \
  -H 'Content-Type: application/json' \
  -d '{
  {
    "model": "jamba-1.5-mini",
    "messages": [
      {
        "role": "user",
        "content": "What's 1 + 1?"
      }
    ],
    "stream": false,
    "max_tokens": 1
  }
  }'
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

Hello. Base URLs of Snowflake provider are not up to date. Those are implemented right now:

Base URLshttps://{account-id}.snowflakecomputing.com/api/v2/cortex/inference:complete,https://{account-id}.snowflakecomputing.com/api/v2/cortex/inference:embed

And those are on Snowflake docs (https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-rest-api):

Open AI, All models (OpenAI, Claude, Llama, Mistral, DeepSeek, Snowflake) /api/v2/cortex/v1/chat/completions

Anthropic, Claude models only /api/v2/cortex/v1/messages

Steps to Reproduce

  1. Connect to /ui
  2. Select Snowflake as provider, Add a new model (e.g. snowflake/jamba-1.5-mini)
  3. Mode /chat/completion
  4. Snowflake API endpoint: https://<account>.snowflakecomputing.com**/api/v2/cortex/v1**
  5. Test connection

The result is a wrong endpoint: https://<account>.snowflakecomputing.com/api/v2/cortex/v1/api/v2/cortex/inference:complete

Relevant log output

curl -X POST \
  https://<account>.snowflakecomputing.com/api/v2/cortex/v1/api/v2/cortex/inference:complete \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Be****Fw' \
  -H 'X-Snowflake-Authorization-Token-Type: KE****WT' \
  -H 'Content-Type: application/json' \
  -d '{
  {
    "model": "jamba-1.5-mini",
    "messages": [
      {
        "role": "user",
        "content": "What's 1 + 1?"
      }
    ],
    "stream": false,
    "max_tokens": 1
  }
  }'

What part of LiteLLM is this about?

No response

What LiteLLM version are you on ?

v1.86.2

Twitter / LinkedIn details

No response

extent analysis

TL;DR

Update the Snowflake provider's base URLs to match the latest documentation, specifically using /api/v2/cortex/v1/chat/completions for Open AI models.

Guidance

  • Verify the correct endpoint by checking the Snowflake documentation for the specific model being used (e.g., Open AI, Anthropic).
  • Update the Snowflake provider configuration to use the correct base URL, such as https://{account-id}.snowflakecomputing.com/api/v2/cortex/v1/chat/completions.
  • Test the connection again after updating the configuration to ensure the correct endpoint is being used.
  • Review the LiteLLM version (currently v1.86.2) to see if an update is available that may include the corrected Snowflake provider configuration.

Example

No code snippet is provided as the issue is related to configuration rather than code.

Notes

The provided information implies that the issue is due to outdated base URLs in the Snowflake provider configuration. However, without access to the LiteLLM codebase or configuration files, the exact steps to update the configuration may vary.

Recommendation

Apply workaround: Update the Snowflake provider's base URLs to match the latest documentation. This is because the issue is likely due to outdated configuration, and updating the URLs should resolve the problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - ✅(Solved) Fix [Bug]: Snowflake Cortex API Base endpoint is wrong [1 pull requests, 1 comments, 2 participants]