Skip to content

Comments

[BUG] Made it easier to use the Snowflake integration#9443

Closed
SunnyWan59 wants to merge 3 commits intoBerriAI:mainfrom
SunnyWan59:snowflake_config
Closed

[BUG] Made it easier to use the Snowflake integration#9443
SunnyWan59 wants to merge 3 commits intoBerriAI:mainfrom
SunnyWan59:snowflake_config

Conversation

@SunnyWan59
Copy link
Contributor

@SunnyWan59 SunnyWan59 commented Mar 21, 2025

Made it easier to use the Snowflake integration.

  • allow the users to pass snowflake_account_id and snowflake_jwt as dynamic params via config.yaml
  • allow the user to pass an api_base and append the api/v2/cortex/inference:complete to their api base like openai does.

Example config.yaml:

model_list:
  - model_name: mistral-7b
    litellm_params:
        model: snowflake/mistral-7b
        snowflake_jwt: <JWT>
        snowflake_account_id: <ACCOUNT-ID>
        api_base: snowflakecomputing.com

Relevant issues

Address: #9231

Pre-Submission checklist

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on (make test-unit)[https://docs.litellm.ai/docs/extras/contributing_code]
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🧹 Refactoring
📖 Documentation
✅ Test

Screenshot 2025-03-21 at 5 17 28 PM

@vercel
Copy link

vercel bot commented Mar 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2025 8:04am

## API KEYS
## API Keys

Snowflake does have API keys. Instead, you access the Snowflake API with your JWT token and account identifier.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the snowflake jwt long lived, or does it need to be refreshed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's long lived, why can i not just call it SNOWFLAKE_API_KEY ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and pass it in as api_key: "my-special-key"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to be refreshed

@krrishdholakia
Copy link
Member

api_base should be "https://{account-id}.snowflakecomputing.com"

@SunnyWan59
Copy link
Contributor Author

api_base should be "https://{account-id}.snowflakecomputing.com"

do you mean for config of the python sdk

api_base = "snowflakecomputing.com"
)
```
and Litellm will add the `/api/v2/cortex/inference:complete/` and the `account-id` for you.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would we know the account id?

The api base should be https://{account-id}.snowflakecomputing.com

model: snowflake/mistral-7b
api_key: YOUR_API_KEY
api_base: https://YOUR-ACCOUNT-ID.snowflakecomputing.com/api/v2/cortex/inference:complete
snowflake_jwt: <JWT>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inconsistent param usage.

The example on sdk says api_base, that's what it should be here

@CLAassistant
Copy link

CLAassistant commented Apr 22, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Jul 23, 2025
@github-actions github-actions bot closed this Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants