Skip to content

feat: Add Snowflake Cortex LLM API #988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 24, 2025
Merged

Conversation

Ajay-Satish-01
Copy link
Contributor

@Ajay-Satish-01 Ajay-Satish-01 commented Mar 17, 2025

Title:

  • Brief Description of Changes

Description:

🔄 What Changed

  • Introduced the Snowflake Cortex LLM API integration into the existing codebase.
  • Added a new provider configuration for Cortex, including API endpoint definitions and request headers.
  • Modified global constants to include the new Cortex provider.
  • Updated handler utilities to accommodate the new Cortex configuration.

🔍 Impact of the Change

  • This change allows the application to interact with the Snowflake Cortex LLM API, enhancing its capabilities for language model processing.
  • It introduces new configurations that can be utilized in various parts of the application, potentially improving the overall functionality and user experience.

📁 Total Files Changed

  • 6 files were modified or added in this pull request.

🧪 Test Added

  • N/A

🔒 Security Vulnerabilities

  • No immediate security vulnerabilities detected, but ensure that API keys and sensitive information are handled securely.

@Ajay-Satish-01 Ajay-Satish-01 changed the title Add Snowflake Cortex LLM API feat: Add Snowflake Cortex LLM API Mar 17, 2025
Copy link
Collaborator

@narengogi narengogi left a comment

Choose a reason for hiding this comment

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

looks good to me, only 1 minor change required, checkout other suggested changes as well @Ajay-Satish-01

Signed-off-by: Ajay-Satish-01 <ajay.satishpriya@gmail.com>
Signed-off-by: Ajay-Satish-01 <ajay.satishpriya@gmail.com>

/** Cortex specific fields */
snowflakeAccount?: string;
snowflakeApiKey?: string;
Copy link
Collaborator

@narengogi narengogi Mar 20, 2025

Choose a reason for hiding this comment

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

please remove snowflakeApiKey and any references to it, the gateway standardizes using providerOptions.apiKey for the authorization header which is passed with x-portkey-api-key header

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed api key

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please also remove it from here?

const cortexConfig = {
    snowflakeAccount: requestHeaders[`x-${POWERED_BY}-snowflake-account`],
    snowflakeApiKey: requestHeaders[`x-${POWERED_BY}-snowflake-api-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.

Removed snowflakeApiKey from cortexConfig.

@VisargD
Copy link
Collaborator

VisargD commented Mar 22, 2025

Hey @Ajay-Satish-01 - LGTM. Please resolve the conflict and please also address the last remaining comment. Thanks!

@Ajay-Satish-01
Copy link
Contributor Author

Hey @Ajay-Satish-01 - LGTM. Please resolve the conflict and please also address the last remaining comment. Thanks!

Done. Please let me know if anything else is needed.

Copy link
Collaborator

@narengogi narengogi left a comment

Choose a reason for hiding this comment

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

🚀🚀🚀

@VisargD VisargD merged commit 9728edd into Portkey-AI:main Mar 24, 2025
1 check passed
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.

4 participants