Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .genignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ docs/sdks/alpha
src/funcs/betaResponsesSend.ts
.npmignore
docs/docs.json
docs/overview.mdx
docs/overview.mdx
RUNTIMES.md
.devcontainer/devcontainer.json
src/lib/url.ts
4 changes: 0 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17623,10 +17623,6 @@ trackedFiles:
id: 0502afa7922e
last_write_checksum: sha1:80b21678a25508c8e2cbf027528c0ac2275f2e79
pristine_git_object: f67ffaebd308fc834d1dba874b556700f9cc9f63
src/lib/url.ts:
id: b0057e24ed76
last_write_checksum: sha1:70b18fda795b71861339376c441d5605ad6f6594
pristine_git_object: e4f870ddddfb3745e52ab6b53c168025243e28c3
src/models/aabenchmarkentry.ts:
id: fff97d475d2d
last_write_checksum: sha1:788cb35386c72b54bfe58755b76c0d0904fb5ddb
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ generation:
requestBodyFieldName: ""
versioningStrategy: automatic
persistentEdits:
enabled: "true"
enabled: never
tests:
generateTests: false
generateNewTests: true
Expand Down
10 changes: 6 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ grep -F " src/lib/env.ts:" .speakeasy/gen.lock

**Hand-Written Files** (safe to edit):
- `src/hooks/registration.ts` - Hook registration. Speakeasy generates it once and never overwrites it
- Other files you add under `src/hooks/` (for example `signal-hooks.ts`) - The generator leaves them alone
- Other files you add under `src/hooks/` (for example `signal-hooks.ts`, `base-url-env.ts`) - The generator leaves them alone
- `src/funcs/betaResponsesSend.ts` - Listed in `.genignore`
- `src/lib/url.ts` - Listed in `.genignore`. Hand-maintained so `pathToFunc` rejects `.` and `..` path segments (the generator does not); see the header comment in the file for when to hand it back to the generator
- `src/funcs/oAuthCreateAuthorizationUrl.ts`, `src/funcs/oAuthCreateSHA256CodeChallenge.ts` - OAuth PKCE helpers
- `src/models/claude-message.ts` - Types copied from the Anthropic SDK
- `scripts/` - Build and maintenance scripts (wired in through `additionalScripts` in `.speakeasy/gen.yaml`)
Expand Down Expand Up @@ -107,7 +108,7 @@ SDK generation does **not** happen in the monorepo. Instead:

1. **Edit code** in `sdks/typescript/` in the monorepo (any file, including generated ones with custom regions)
2. **PR check** automatically validates your changes can generate cleanly by dry-running against the OSS repo
3. **Release workflow** (`workflow_dispatch` on `sdk-auto-generate.yaml`) clones the OSS repo, copies your changes, runs `speakeasy run` there (where persistent edits work), pushes to the OSS repo, and copies generated `src/` back
3. **Release workflow** (`workflow_dispatch` on `sdk-auto-generate.yaml`) clones the OSS repo, copies your changes, runs `speakeasy run` there, pushes to the OSS repo, and copies generated `src/` back

To generate the OpenAPI spec locally (for linting, not SDK generation):
```bash
Expand All @@ -121,13 +122,14 @@ pnpm sdk:bootstrap

### Making Changes to Generated Code

Speakeasy's [persistent edits](https://www.speakeasy.com/docs/sdks/customize/code/custom-code/custom-code) is enabled in `.speakeasy/gen.yaml`, so a hand edit to a generated file is kept across regeneration via 3-way merge instead of being overwritten. Treat that as a last resort: if the generator later changes the same lines, generation fails with a merge conflict until someone resolves it by hand. Prefer, in order:
Speakeasy's [persistent edits](https://www.speakeasy.com/docs/sdks/customize/code/custom-code/custom-code) is turned off (`persistentEdits.enabled: never` in `.speakeasy/gen.yaml`). A hand edit to a generated file is **overwritten by the next regeneration**, with no warning. Do not hand-edit generated files. Instead, in order of preference:

1. **For type/schema changes**: Update the Hono/Zod routes in the monorepo (the OpenAPI spec is generated from them)
2. **For overlays**: Edit files in `.speakeasy/overlays/`
3. **For generation config**: Edit `.speakeasy/gen.yaml`
4. **For runtime behavior**: Add an SDK hook in `src/hooks/`
5. Changes are synced to the OSS repo during the release workflow
5. **For a file the generator should stop writing** (for example `RUNTIMES.md`): Add it to `.genignore`. The file is then hand-maintained and no longer picks up generator updates
6. Changes are synced to the OSS repo during the release workflow

## Architecture

Expand Down
1 change: 0 additions & 1 deletion examples/analyticsGetUserActivity.example.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 7ccac02a65ba
*/

import dotenv from "dotenv";
Expand Down
1 change: 0 additions & 1 deletion src/core.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: f431fdbcd144
*/

import { ClientSDK } from "./lib/sdks.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/alphaDecisionsCreate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: f8369846dfed
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/alphaExtractionsCreate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 317c66b4f586
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/analyticsGetAnalyticsMeta.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: f7372eee4934
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/analyticsGetUserActivity.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 6525bcc66ab5
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/analyticsQueryAnalytics.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 36a22bd7b94b
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/apiKeysCreate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 133e2c5f487c
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/apiKeysDelete.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: c151c399f75f
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/apiKeysGet.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 12a5c2abbddd
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/apiKeysGetCurrentKeyMetadata.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: d9449cb31931
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/apiKeysList.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 2afc8d8f1ce0
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/apiKeysUpdate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 05700884934b
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/batchCreateBatches.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 8796df347125
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/batchDelete.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: c86d26d514be
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/batchGetBatches.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: d4804b94cd90
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/batchList.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 8709844813ac
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/benchmarksGetBenchmarks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 1b5fbe93cea7
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/byokCreate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 100cd2d38078
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/byokDelete.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 74888a4f7e62
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/byokGet.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 0b6a02742a16
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/byokList.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 61b5aac5c0af
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/byokUpdate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: af96a7f06850
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/chatSend.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 8c3aa3c963bf
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/classificationsGetTaskClassifications.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 6f25b0c4e7a9
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/containersDownloadContainerFileContent.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 5c9b66d827d2
*/

import * as z from "zod/v4";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/containersGetContainerFile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 9450910db6e6
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/containersListContainerFiles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: a5b09a82f065
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/containersPromoteContainerFile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: b1e9dfab640d
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/creditsGetCredits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 88fdc1315137
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/datasetsGetAppRankings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 2ae09697d446
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/datasetsGetRankingsDaily.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: f0177699bfaf
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/datasetsGetSessionCost.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 3462402e5d7d
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/embeddingsGenerate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: f6455fcfe2c8
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/embeddingsListModels.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: dbe9751f8369
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/endpointsList.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: ea932ec09987
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/endpointsListZdrEndpoints.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 4efb7ea3e48f
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/externalUsersCreate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 07f9c7bbadb6
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/externalUsersDelete.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 7cb9d4e264b6
*/

import * as z from "zod/v4";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/externalUsersGet.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: d43a896844b7
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/externalUsersList.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 2aef95c9b70a
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/externalUsersUpdate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: ac683db4ab5f
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/filesDelete.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: f46eef07df95
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/filesDownload.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 9862679000aa
*/

import * as z from "zod/v4";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/filesList.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 115b762b69b6
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/filesRetrieve.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 694e62d773ec
*/

import { OpenRouterCore } from "../core.js";
Expand Down
1 change: 0 additions & 1 deletion src/funcs/filesUpload.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
* @generated-id: 9dba8b973eea
*/

import { OpenRouterCore } from "../core.js";
Expand Down
Loading
Loading