Skip to content

Integrate Canopy Wave as provider for DeepSeek-V3.1#5351

Open
cynthia-lixinyi wants to merge 6 commits intoHelicone:mainfrom
cynthia-lixinyi:canopywave-deepseek-v3.1
Open

Integrate Canopy Wave as provider for DeepSeek-V3.1#5351
cynthia-lixinyi wants to merge 6 commits intoHelicone:mainfrom
cynthia-lixinyi:canopywave-deepseek-v3.1

Conversation

@cynthia-lixinyi
Copy link
Contributor

Ticket

Link to the ticket(s) this pull request addresses.

Component/Service

What part of Helicone does this affect?

  • Web (Frontend)
  • Jawn (Backend)
  • Worker (Proxy)
  • Bifrost (Marketing)
  • AI Gateway
  • Packages
  • Infrastructure/Docker
  • Documentation

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Performance improvement
  • Refactoring

Testing

  • Added/updated unit tests
  • Added/updated integration tests
  • Tested locally
  • Verified in staging environment
  • E2E tests pass (if applicable)

Technical Considerations

  • Database migrations included (if needed)
  • API changes documented
  • Breaking changes noted
  • Performance impact assessed
  • Security implications reviewed

Dependencies

  • No external dependencies added
  • Dependencies added and documented
  • Environment variables added/modified

Deployment Notes

  • No special deployment steps required
  • Database migrations need to run
  • Environment variable changes required
  • Coordination with other teams needed

Context

Why are you making this change?

Screenshots / Demos

Before After

Misc. Review Notes

@vercel
Copy link

vercel bot commented Dec 5, 2025

@cynthia-lixiny07 is attempting to deploy a commit to the Helicone Team on Vercel.

A member of the Team first needs to authorize it.

@cynthia-lixinyi cynthia-lixinyi marked this pull request as ready for review December 5, 2025 00:13
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 5, 2025

Greptile Overview

Greptile Summary

Added Canopy Wave as a provider for DeepSeek-V3.1 (deepseek/deepseek-chat-v3.1), following the same pattern established in previous Canopy Wave integrations.

  • Configuration: Added deepseek-v3:canopywave endpoint with pricing at $0.27/$1.00 per 1M input/output tokens, 131K context length, and 65K max completion tokens
  • Model ID: Uses deepseek/deepseek-chat-v3.1 as the provider model ID, consistent with OpenRouter
  • Tests: Comprehensive test coverage including success, auto-selection, and error scenarios (500, 429, 401)
  • Snapshots: Updated correctly with canopywave appearing first in provider order due to alphabetical sorting when costs are identical

Confidence Score: 5/5

  • This PR is safe to merge with no issues found
  • The implementation follows established patterns from previous Canopy Wave integrations (Integrate Canopy Wave as a provider for moonshotai kimi-k2-thinking #5336 for Moonshot), includes comprehensive test coverage, correctly updates snapshots, and maintains consistency with provider configuration standards. All pricing, context lengths, and supported parameters are properly specified.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
packages/cost/models/authors/deepseek/deepseek-v3/endpoints.ts 5/5 Added Canopy Wave provider configuration for deepseek-v3 with correct pricing, context length, max tokens, and supported parameters matching the pattern of existing providers
packages/tests/cost/snapshots/registrySnapshots.test.ts.snap 5/5 Updated snapshots correctly showing deepseek-v3:canopywave configuration, provider count incremented, and canopywave listed first in provider order
worker/test/ai-gateway/registry-deepseek.spec.ts 5/5 Added comprehensive test coverage for Canopy Wave provider including success cases, auto-selection, and error scenarios (500, 429, 401)

Sequence Diagram

sequenceDiagram
    participant Client
    participant Gateway as AI Gateway
    participant Canopy as Canopy Wave
    participant DeepSeek as DeepSeek V3.1

    Client->>Gateway: POST /chat/completions<br/>model: deepseek-v3
    Gateway->>Gateway: Resolve provider<br/>(auto-select canopywave)
    Gateway->>Gateway: Transform to provider format<br/>model: deepseek/deepseek-chat-v3.1
    Gateway->>Canopy: POST https://inference.canopywave.io/v1/chat/completions<br/>Authorization: Bearer <token>
    Canopy->>DeepSeek: Forward request to DeepSeek V3.1
    DeepSeek->>Canopy: Return completion
    Canopy->>Gateway: Return response
    Gateway->>Client: Return completion
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (2)

  1. worker/test/ai-gateway/registry-deepseek.spec.ts, line 1848-1912 (link)

    logic: Three duplicate test descriptions ("should handle canopywave provider" appears 3 times on lines 1848, 1880, 1897) make tests unclear

  2. worker/test/ai-gateway/registry-deepseek.spec.ts, line 1864-1878 (link)

    logic: Test description says "auto-select" but model is explicitly set to deepseek-v3/canopywave - this doesn't test auto-selection behavior

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@cynthia-lixinyi cynthia-lixinyi marked this pull request as draft December 5, 2025 00:19
@cynthia-lixinyi cynthia-lixinyi marked this pull request as ready for review December 5, 2025 00:25
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@chitalian
Copy link
Contributor

@claude merge main into this and fix the tests

@claude
Copy link
Contributor

claude bot commented Dec 30, 2025

Claude encountered an error —— View job

Failed with exit code 128

I'll analyze this and get back to you.

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