Skip to content

feat: add Snowflake Cortex support (similar to Bedrock/Vertex)#285

Open
mahendrarathore1742 wants to merge 1 commit intoanthropics:mainfrom
mahendrarathore1742:feat/snowflake-cortex-support
Open

feat: add Snowflake Cortex support (similar to Bedrock/Vertex)#285
mahendrarathore1742 wants to merge 1 commit intoanthropics:mainfrom
mahendrarathore1742:feat/snowflake-cortex-support

Conversation

@mahendrarathore1742
Copy link

Add a new snowflake package that enables using the Anthropic Go SDK with Snowflake's Cortex REST API, following the same middleware pattern used by the existing Bedrock and Vertex integrations.

The implementation includes:

  • snowflake.WithAccount() for configuring with a Snowflake account ID
  • snowflake.WithBaseURL() for custom endpoint configurations
  • Middleware that rewrites /v1/messages to /api/v2/cortex/inference:complete
  • Bearer token authentication (direct or via SNOWFLAKE_AUTH_TOKEN env var)
  • anthropic_version injection into request bodies
  • 12 unit tests covering URL rewriting, auth, streaming, and edge cases
  • Basic and streaming usage examples

Closes #274

Add a new snowflake package that enables using the Anthropic Go SDK
with Snowflake's Cortex REST API, following the same middleware
pattern used by the existing Bedrock and Vertex integrations.

The implementation includes:
- snowflake.WithAccount() for configuring with a Snowflake account ID
- snowflake.WithBaseURL() for custom endpoint configurations
- Middleware that rewrites /v1/messages to /api/v2/cortex/inference:complete
- Bearer token authentication (direct or via SNOWFLAKE_AUTH_TOKEN env var)
- anthropic_version injection into request bodies
- 12 unit tests covering URL rewriting, auth, streaming, and edge cases
- Basic and streaming usage examples

Closes anthropics#274
@mahendrarathore1742 mahendrarathore1742 requested a review from a team as a code owner March 5, 2026 13:29
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.

Feature request: Snowflake Cortex support (similar to Bedrock/Vertex)

1 participant