Skip to content

Conversation

@subtleGradient
Copy link
Contributor

GitOrigin-RevId: d53d72d70eaca3ae2dd3020ae22343b520f1793a

GitOrigin-RevId: d53d72d70eaca3ae2dd3020ae22343b520f1793a
Copilot AI review requested due to automatic review settings January 9, 2026 23:32
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@subtleGradient
Copy link
Contributor Author

run-speakeasy CI Failure - Resolution

The Speakeasy 3-way merge is failing because it's trying to merge old custom code snapshots against the fresh baseline.

Conflicting files:

  • src/index.ts
  • src/lib/config.ts
  • package.json

Fix (from SOP)

# 1. Clone and checkout dev
git clone https://github.com/OpenRouterTeam/typescript-sdk.git /tmp/ts-sdk-fix
cd /tmp/ts-sdk-fix
git checkout dev

# 2. Run Speakeasy to see conflicts
speakeasy run
# Will fail but show conflict markers

# 3. Resolve conflicts (preserve custom code)
# For src/index.ts: keep "Current" (~115 lines of custom exports)
# For src/lib/config.ts: keep "Current" (SDKHooks import)
# For package.json: take newer version numbers

# 4. Re-run Speakeasy to reconcile
speakeasy run --skip-versioning

# 5. Push fix directly to dev
git add -A
git commit -m "fix: resolve Speakeasy merge conflicts, preserve custom code"
git push origin dev

After pushing to dev, this PR's CI will re-run and should pass.

Custom code to preserve:

File Keep
src/index.ts Tool types, Claude messages, streaming helpers (~115 lines)
src/lib/config.ts SDKHooks import and hooks?: SDKHooks option

@subtleGradient
Copy link
Contributor Author

I'm resolving these conflicts, will put up a separate PR merging into this one

subtleGradient added a commit that referenced this pull request Jan 10, 2026
- 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.
Copilot AI review requested due to automatic review settings January 10, 2026 00:06
Copy link

Copilot AI left a 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 ResponsesOutputModality enum for specifying output types (text/image)
  • Adds PercentileStats for 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.

Comment on lines +16 to +28
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()]);
Copy link

Copilot AI Jan 10, 2026

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).

Suggested change
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]);

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +28
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()]);
Copy link

Copilot AI Jan 10, 2026

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).

Suggested change
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]);

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +28
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()]);
Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
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]);

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +28
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()]);
Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
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]);

Copilot uses AI. Check for mistakes.
openapiDocVersion: "1.0.0",
sdkVersion: "0.3.12",
sdkVersion: "0.3.14",
genVersion: "2.788.4",
Copy link

Copilot AI Jan 10, 2026

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.

Copilot uses AI. Check for mistakes.
GitOrigin-RevId: 0a4e2198ab076e9b8530bdf1cf481367b1fed971
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.

2 participants