-
Notifications
You must be signed in to change notification settings - Fork 23
Project import generated by Copybara. #142
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
GitOrigin-RevId: d53d72d70eaca3ae2dd3020ae22343b520f1793a
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
| File | Keep |
|---|---|
src/index.ts |
Tool types, Claude messages, streaming helpers (~115 lines) |
src/lib/config.ts |
SDKHooks import and hooks?: SDKHooks option |
|
I'm resolving these conflicts, will put up a separate PR merging into this one |
- Preserve custom exports in src/index.ts (tool types, Claude message types, streaming helpers) - Preserve SDKHooks integration in src/lib/config.ts - Run speakeasy run --skip-versioning to reconcile generation tracking Resolves CI failure on PR #142 (dev→main sync)
## Summary Resolves `run-speakeasy` CI failure on PR #142 by preserving custom code during regeneration. ## Changes - Preserve custom exports in `src/index.ts` (~115 lines of tool types, Claude message types, streaming helpers) - Preserve `SDKHooks` integration in `src/lib/config.ts` - Run `speakeasy run --skip-versioning` to reconcile generation tracking ## After Merge Once this PR merges to `dev`, PR #142 (dev→main) CI should re-run and pass.
Auto-generated-by: update-generated-files-action; https://github.com/OpenRouterTeam/typescript-sdk/actions/runs/20869247580
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.
Pull request overview
This PR is an automated SDK update generated by Speakeasy, bumping the version from 0.3.12 to 0.3.13. It introduces new TypeScript models for handling latency and throughput preferences with percentile-based configuration options, adds a new output modality enum, and updates the OpenAPI specifications to include performance metrics for model endpoints.
Key changes:
- Adds support for percentile-based latency and throughput cutoffs for advanced routing preferences
- Introduces new
ResponsesOutputModalityenum for specifying output types (text/image) - Adds
PercentileStatsfor exposing latency and throughput metrics on model endpoints
Reviewed changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/models/responsesoutputmodality.ts | New enum defining output modalities (text, image) for API responses |
| src/models/preferredminthroughput.ts | New union type for minimum throughput preferences with percentile support |
| src/models/preferredmaxlatency.ts | New union type for maximum latency preferences with percentile support |
| src/models/percentilethroughputcutoffs.ts | Defines percentile-based throughput cutoff thresholds (p50, p75, p90, p99) |
| src/models/percentilestats.ts | Type for percentile-based statistics on endpoint performance metrics |
| src/models/percentilelatencycutoffs.ts | Defines percentile-based latency cutoff thresholds (p50, p75, p90, p99) |
| src/models/index.ts | Exports the 6 new model types |
| src/lib/config.ts | Updates SDK version to 0.3.13 and generation version to 2.787.2 |
| package.json | Bumps package version to 0.3.13 |
| jsr.json | Bumps JSR registry version to 0.3.13 |
| docs/models/*.md | Documentation files for all new model types |
| .speakeasy/*.yaml | Updated OpenAPI specifications with new schemas and endpoint metrics |
| .speakeasy/workflow.lock | Updated workflow lock file with new source digests |
| .speakeasy/gen.lock | Updated generation lock file with new checksums |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export type PreferredMinThroughput = number | PercentileThroughputCutoffs | any; | ||
|
|
||
| /** @internal */ | ||
| export type PreferredMinThroughput$Outbound = | ||
| | number | ||
| | PercentileThroughputCutoffs$Outbound | ||
| | any; | ||
|
|
||
| /** @internal */ | ||
| export const PreferredMinThroughput$outboundSchema: z.ZodType< | ||
| PreferredMinThroughput$Outbound, | ||
| PreferredMinThroughput | ||
| > = z.union([z.number(), PercentileThroughputCutoffs$outboundSchema, z.any()]); |
Copilot
AI
Jan 10, 2026
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.
The union type includes any which completely removes type safety. This allows any value to be passed, defeating the purpose of TypeScript's type system. The union should be number | PercentileThroughputCutoffs without the any type, or use unknown if truly any value must be accepted (though this is rarely appropriate for a public API).
| export type PreferredMinThroughput = number | PercentileThroughputCutoffs | any; | |
| /** @internal */ | |
| export type PreferredMinThroughput$Outbound = | |
| | number | |
| | PercentileThroughputCutoffs$Outbound | |
| | any; | |
| /** @internal */ | |
| export const PreferredMinThroughput$outboundSchema: z.ZodType< | |
| PreferredMinThroughput$Outbound, | |
| PreferredMinThroughput | |
| > = z.union([z.number(), PercentileThroughputCutoffs$outboundSchema, z.any()]); | |
| export type PreferredMinThroughput = number | PercentileThroughputCutoffs; | |
| /** @internal */ | |
| export type PreferredMinThroughput$Outbound = | |
| | number | |
| | PercentileThroughputCutoffs$Outbound; | |
| /** @internal */ | |
| export const PreferredMinThroughput$outboundSchema: z.ZodType< | |
| PreferredMinThroughput$Outbound, | |
| PreferredMinThroughput | |
| > = z.union([z.number(), PercentileThroughputCutoffs$outboundSchema]); |
| export type PreferredMaxLatency = number | PercentileLatencyCutoffs | any; | ||
|
|
||
| /** @internal */ | ||
| export type PreferredMaxLatency$Outbound = | ||
| | number | ||
| | PercentileLatencyCutoffs$Outbound | ||
| | any; | ||
|
|
||
| /** @internal */ | ||
| export const PreferredMaxLatency$outboundSchema: z.ZodType< | ||
| PreferredMaxLatency$Outbound, | ||
| PreferredMaxLatency | ||
| > = z.union([z.number(), PercentileLatencyCutoffs$outboundSchema, z.any()]); |
Copilot
AI
Jan 10, 2026
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.
The union type includes any which completely removes type safety. This allows any value to be passed, defeating the purpose of TypeScript's type system. The union should be number | PercentileLatencyCutoffs without the any type, or use unknown if truly any value must be accepted (though this is rarely appropriate for a public API).
| export type PreferredMaxLatency = number | PercentileLatencyCutoffs | any; | |
| /** @internal */ | |
| export type PreferredMaxLatency$Outbound = | |
| | number | |
| | PercentileLatencyCutoffs$Outbound | |
| | any; | |
| /** @internal */ | |
| export const PreferredMaxLatency$outboundSchema: z.ZodType< | |
| PreferredMaxLatency$Outbound, | |
| PreferredMaxLatency | |
| > = z.union([z.number(), PercentileLatencyCutoffs$outboundSchema, z.any()]); | |
| export type PreferredMaxLatency = number | PercentileLatencyCutoffs; | |
| /** @internal */ | |
| export type PreferredMaxLatency$Outbound = | |
| | number | |
| | PercentileLatencyCutoffs$Outbound; | |
| /** @internal */ | |
| export const PreferredMaxLatency$outboundSchema: z.ZodType< | |
| PreferredMaxLatency$Outbound, | |
| PreferredMaxLatency | |
| > = z.union([z.number(), PercentileLatencyCutoffs$outboundSchema]); |
| export type PreferredMinThroughput = number | PercentileThroughputCutoffs | any; | ||
|
|
||
| /** @internal */ | ||
| export type PreferredMinThroughput$Outbound = | ||
| | number | ||
| | PercentileThroughputCutoffs$Outbound | ||
| | any; | ||
|
|
||
| /** @internal */ | ||
| export const PreferredMinThroughput$outboundSchema: z.ZodType< | ||
| PreferredMinThroughput$Outbound, | ||
| PreferredMinThroughput | ||
| > = z.union([z.number(), PercentileThroughputCutoffs$outboundSchema, z.any()]); |
Copilot
AI
Jan 10, 2026
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.
The union type includes any which completely removes type safety. The outbound type should match the main type without including any, or if needed, use a more restrictive type.
| export type PreferredMinThroughput = number | PercentileThroughputCutoffs | any; | |
| /** @internal */ | |
| export type PreferredMinThroughput$Outbound = | |
| | number | |
| | PercentileThroughputCutoffs$Outbound | |
| | any; | |
| /** @internal */ | |
| export const PreferredMinThroughput$outboundSchema: z.ZodType< | |
| PreferredMinThroughput$Outbound, | |
| PreferredMinThroughput | |
| > = z.union([z.number(), PercentileThroughputCutoffs$outboundSchema, z.any()]); | |
| export type PreferredMinThroughput = number | PercentileThroughputCutoffs; | |
| /** @internal */ | |
| export type PreferredMinThroughput$Outbound = | |
| | number | |
| | PercentileThroughputCutoffs$Outbound; | |
| /** @internal */ | |
| export const PreferredMinThroughput$outboundSchema: z.ZodType< | |
| PreferredMinThroughput$Outbound, | |
| PreferredMinThroughput | |
| > = z.union([z.number(), PercentileThroughputCutoffs$outboundSchema]); |
| export type PreferredMaxLatency = number | PercentileLatencyCutoffs | any; | ||
|
|
||
| /** @internal */ | ||
| export type PreferredMaxLatency$Outbound = | ||
| | number | ||
| | PercentileLatencyCutoffs$Outbound | ||
| | any; | ||
|
|
||
| /** @internal */ | ||
| export const PreferredMaxLatency$outboundSchema: z.ZodType< | ||
| PreferredMaxLatency$Outbound, | ||
| PreferredMaxLatency | ||
| > = z.union([z.number(), PercentileLatencyCutoffs$outboundSchema, z.any()]); |
Copilot
AI
Jan 10, 2026
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.
The union type includes any which completely removes type safety. The outbound type should match the main type without including any, or if needed, use a more restrictive type.
| export type PreferredMaxLatency = number | PercentileLatencyCutoffs | any; | |
| /** @internal */ | |
| export type PreferredMaxLatency$Outbound = | |
| | number | |
| | PercentileLatencyCutoffs$Outbound | |
| | any; | |
| /** @internal */ | |
| export const PreferredMaxLatency$outboundSchema: z.ZodType< | |
| PreferredMaxLatency$Outbound, | |
| PreferredMaxLatency | |
| > = z.union([z.number(), PercentileLatencyCutoffs$outboundSchema, z.any()]); | |
| export type PreferredMaxLatency = number | PercentileLatencyCutoffs; | |
| /** @internal */ | |
| export type PreferredMaxLatency$Outbound = | |
| | number | |
| | PercentileLatencyCutoffs$Outbound; | |
| /** @internal */ | |
| export const PreferredMaxLatency$outboundSchema: z.ZodType< | |
| PreferredMaxLatency$Outbound, | |
| PreferredMaxLatency | |
| > = z.union([z.number(), PercentileLatencyCutoffs$outboundSchema]); |
| openapiDocVersion: "1.0.0", | ||
| sdkVersion: "0.3.12", | ||
| sdkVersion: "0.3.14", | ||
| genVersion: "2.788.4", |
Copilot
AI
Jan 10, 2026
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.
The generation version appears to have been downgraded from 2.788.4 to 2.787.2. While this might be intentional for compatibility or bug fix reasons, it's unusual to downgrade a generator version when bumping the SDK version. Please verify this is intentional and not an error.
GitOrigin-RevId: 0a4e2198ab076e9b8530bdf1cf481367b1fed971
GitOrigin-RevId: d53d72d70eaca3ae2dd3020ae22343b520f1793a