-
Notifications
You must be signed in to change notification settings - Fork 457
Integrate Canopy Wave as a provider for ZAI GLM-4.6 #5292
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
base: main
Are you sure you want to change the base?
Conversation
|
@cynthia-lixiny07 is attempting to deploy a commit to the Helicone Team on Vercel. A member of the Team first needs to authorize it. |
Greptile OverviewGreptile SummaryIntegrates Canopy Wave as a new provider for ZAI GLM-4.6 model with pricing, configuration, and comprehensive test coverage. Key Changes:
Issues Found:
Confidence Score: 1/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client
participant Gateway as AI Gateway
participant Registry as Model Registry
participant Provider as CanopyWaveProvider
participant API as Canopy Wave API
Client->>Gateway: POST /chat/completions<br/>model: glm-4.6/canopywave
Gateway->>Registry: Lookup model config
Registry->>Registry: Match "glm-4.6:canopywave"<br/>from endpoints.ts
Registry-->>Gateway: Return config<br/>(providerModelId: zai-org/glm-4.6)
Gateway->>Provider: buildUrl(endpoint, params)
Provider-->>Gateway: https://inference.canopywave.io/v1/chat/completions
Gateway->>Provider: authenticate(context)
Provider-->>Gateway: Authorization: Bearer <api-key>
Gateway->>Provider: buildRequestBody(endpoint, context)
Provider-->>Gateway: JSON with model: zai-org/glm-4.6
Gateway->>API: POST with transformed request
API-->>Gateway: Response
Gateway-->>Client: Return response with usage/cost
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10 files reviewed, 4 comments
| buildUrl(): string { | ||
| return `${this.baseUrl}v1/chat/completions`; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: buildUrl method signature doesn't match BaseProvider interface - missing required endpoint and requestParams parameters
| buildUrl(): string { | |
| return `${this.baseUrl}v1/chat/completions`; | |
| } | |
| buildUrl(endpoint: Endpoint, requestParams: RequestParams): string { | |
| return `${this.baseUrl}v1/chat/completions`; | |
| } |
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/cost/models/providers/canopywave.ts
Line: 10:12
Comment:
**syntax:** `buildUrl` method signature doesn't match `BaseProvider` interface - missing required `endpoint` and `requestParams` parameters
```suggestion
buildUrl(endpoint: Endpoint, requestParams: RequestParams): string {
return `${this.baseUrl}v1/chat/completions`;
}
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. (18a828d)
| @@ -0,0 +1,13 @@ | |||
| import { BaseProvider } from "./base"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: missing imports for Endpoint and RequestParams types that are required by the buildUrl method signature
| import { BaseProvider } from "./base"; | |
| import { BaseProvider } from "./base"; | |
| import type { Endpoint, RequestParams } from "../types"; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/cost/models/providers/canopywave.ts
Line: 1:1
Comment:
**syntax:** missing imports for `Endpoint` and `RequestParams` types that are required by the `buildUrl` method signature
```suggestion
import { BaseProvider } from "./base";
import type { Endpoint, RequestParams } from "../types";
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. (18a828d)
| supportedParameters: [ | ||
| "functions", | ||
| "structured_outputs", | ||
| "reasoning", | ||
| "tool_choice", | ||
| "tools", | ||
| "response_format", | ||
| "max_tokens", | ||
| "temperature", | ||
| "top_p", | ||
| "stop", | ||
| "frequency_penalty", | ||
| "presence_penalty", | ||
| "seed", | ||
| "top_k", | ||
| "min_p", | ||
| "repetition_penalty", | ||
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: check that logit_bias parameter (supported by Novita on line 37) should be included or excluded from Canopy Wave's supportedParameters list
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/cost/models/authors/zai/glm-4/endpoints.ts
Line: 58:75
Comment:
**style:** check that `logit_bias` parameter (supported by Novita on line 37) should be included or excluded from Canopy Wave's `supportedParameters` list
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. (39a1136)
| { | ||
| url: "https://inference.canopywave.io/v1/chat/completions", | ||
| response: "success", | ||
| model: "zai/glm-4.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: verify the correct model ID - Novita tests use zai-org/glm-4.6 (line 34-35) but Canopy Wave tests use zai/glm-4.6
Prompt To Fix With AI
This is a comment left during a code review.
Path: worker/test/ai-gateway/registry-zai.spec.ts
Line: 448:448
Comment:
**style:** verify the correct model ID - Novita tests use `zai-org/glm-4.6` (line 34-35) but Canopy Wave tests use `zai/glm-4.6`
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Canopy Wave's cluster, the model ID for ZAI GLM 4.6 is zai/glm-4.6.
yarn.lock
Outdated
| version "2.0.4" | ||
| resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7" | ||
| integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A== | ||
| integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A== No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this file from the PR
Ticket
Link to the ticket(s) this pull request addresses.
Component/Service
What part of Helicone does this affect?
Type of Change
Testing
Technical Considerations
Dependencies
Deployment Notes
Context
Why are you making this change?
Integrate Canopy Wave as a provider for ZAI GLM-4.6
Screenshots / Demos
Misc. Review Notes