Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
21020fb334 chore: 🐝 Update SDK - Generate (spec change merged) 0.10.6 (#376)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-26 18:23:57 +00:00
a243d78d32 chore: update OpenAPI spec from monorepo (#375)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-26 18:17:47 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
66512fa808 chore: 🐝 Update SDK - Generate (spec change merged) 0.10.5 (#374)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-26 14:41:46 +00:00
7efd03fb3b chore: update OpenAPI spec from monorepo (#373)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-26 14:35:36 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
e1b89f5aaf chore: 🐝 Update SDK - Generate (spec change merged) 0.10.4 (#372)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-26 12:10:48 +00:00
32dd522d5a chore: update OpenAPI spec from monorepo (#371)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-26 12:04:34 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
eeb0373033 chore: 🐝 Update SDK - Generate (spec change merged) 0.10.3 (#370)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-26 00:20:39 +00:00
facade7d00 chore: update OpenAPI spec from monorepo (#369)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-26 00:14:27 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
08e796401a chore: 🐝 Update SDK - Generate (spec change merged) 0.10.2 (#368)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-25 22:33:28 +00:00
f8e8ab669d chore: update OpenAPI spec from monorepo (#367)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-25 22:27:08 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
5e0b1a2b69 chore: 🐝 Update SDK - Generate 0.10.1 (#366)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-25 22:01:36 +00:00
Christine ChenandGitHub 667941aaa8 fix: chain Speakeasy auto-merge into Generate run (#364) 2026-06-25 17:53:58 -04:00
Christine ChenandGitHub 011fb81cc3 feat: add PR validation workflow (#365) 2026-06-25 17:53:42 -04:00
Christine Chen 5c06b57cea feat: add PR validation workflow
The Python SDK had no pull_request-triggered checks, so regen PRs
(speakeasy-sdk-regen-*) carried an empty status-check rollup and the
auto-merge flow would merge them with zero validation. The TypeScript
SDK validates every regen PR via pr-validation.yaml; Python had no
equivalent.

Add a single-file PR Validation workflow that builds the package and
runs the SDK's existing quality gates (mypy, pyright, pylint) via uv.
No tests exist in this repo yet, so no API-key secret is needed, which
also lets the workflow run on fork PRs. paths-ignore on
.speakeasy/in.openapi.yaml mirrors TS so pure spec-bump PRs don't
double-trigger.

This registers a `validate` check that the auto-merge wait_for_checks
step will gate on once both land.
2026-06-25 17:31:33 -04:00
Christine Chen 0680f01bf7 fix: proceed on checkless regen PRs in wait_for_checks
Speakeasy regen PRs are opened with the workflow GITHUB_TOKEN, which by
design does not trigger downstream on: pull_request runs, so they carry
zero status checks. main has no required checks either, so gh pr merge
--auto no-ops and the direct-merge fallback calls wait_for_checks.

The empty-rollup arm only `continue`d, so TOTAL stayed 0 until the 600s
timeout and the function exit 1'd — failing auto-merge on every regen PR.
Add a 60s grace window for checks to register, then treat a persistently
empty rollup as "no checks to wait for" and return 0 so the direct squash
merge proceeds. Matches the fix already shipped in go-sdk #318.
2026-06-25 16:20:53 -04:00
Christine Chen 186c1075ce fix: chain Speakeasy auto-merge into Generate run
The auto-merge workflow triggered on `pull_request: [labeled, opened]`.
When github-actions[bot] opened the regen PR, GitHub's recursion guard
refused to run a workflow triggered by another workflow's GITHUB_TOKEN,
so the run landed as action_required with zero jobs executed. Regen PRs
piled up unmerged and sdk_publish never fired (PyPI stuck at 0.10.0).

Port the TypeScript SDK's architecture: make auto-merge a workflow_call
reusable workflow chained inside the Generate run (generate ->
resolve-branch -> auto-merge). No separate pull_request-triggered run
exists, so there is nothing for GitHub to gate.

- auto-merge-speakeasy-pr.yaml: workflow_call inputs (run_started_at,
  branch_name) + App-token secrets; resolve PR via branch/timestamp;
  .author.is_bot check; wait_for_checks before direct merge; step
  summaries. Keeps the SHA-pinned create-github-app-token.
- sdk_generation.yaml / sdk_generation_for_spec_change.yaml: add
  concurrency group, resolve-branch + auto-merge jobs.
2026-06-25 16:08:16 -04:00
b161a5c288 chore: update OpenAPI spec from monorepo (#362)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-24 22:33:22 +00:00
4f018c91d7 chore: update OpenAPI spec from monorepo (#361)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-24 20:57:38 +00:00
63949d45e2 chore: update OpenAPI spec from monorepo (#360)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-24 17:13:41 +00:00
399c1d0e02 chore: update OpenAPI spec from monorepo (#359)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-24 02:53:25 +00:00
89717dca56 chore: update OpenAPI spec from monorepo (#356)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-24 01:01:29 +00:00
Christine ChenandGitHub c8bf74a516 fix: use GitHub App token for auto-merge workflow (#355) 2026-06-23 19:55:41 -04:00
Christine Chen 4e551e432f fix: pin create-github-app-token to immutable SHA
Pin actions/create-github-app-token to v3.2.0 commit SHA (bcd2ba49...) instead of mutable @v3 tag to prevent supply chain attacks where a compromised account could force-push malicious code to the tag. This eliminates the risk of secret leakage and malicious code execution in CI workflows.
2026-06-23 18:14:27 -04:00
Christine Chen 60add6da49 fix: use GitHub App token for auto-merge workflow
Generate GitHub App token using GH_DOCS_SYNC_APP_ID and GH_DOCS_SYNC_APP_PRIVATE_KEY secrets. Use the app token instead of GITHUB_TOKEN for both close-superseded and auto-merge steps to ensure downstream workflow triggers (sdk_publish.yaml) after merge. This aligns token usage with typescript-sdk and go-sdk implementations.
2026-06-23 17:59:16 -04:00
ddcadce542 chore: update OpenAPI spec from monorepo (#354)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-23 21:46:18 +00:00
5cefd3a108 chore: update OpenAPI spec from monorepo (#353)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-23 19:02:28 +00:00
713dd5c71a chore: update OpenAPI spec from monorepo (#351)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-23 14:08:18 +00:00
678d5aacc5 chore: update OpenAPI spec from monorepo (#350)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-22 22:11:11 +00:00
b3f4ab7452 chore: update OpenAPI spec from monorepo (#348)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-22 10:28:13 -07:00
Christine ChenandGitHub 7b4b9feaa5 fix: update auto-merge workflow triggers and bot username (#345) 2026-06-22 12:32:12 -04:00
Christine Chen add423f762 fix: add updated workflow with corrected bot username and event handling
- Add 'opened' trigger to catch PRs when bot immediately applies label
- Fix bot username to github-actions[bot] (verified via API and commit history)
- Restructure condition to handle both 'labeled' and 'opened' events
  * 'labeled': uses github.event.label.name
  * 'opened': uses github.event.pull_request.labels.*.name
  * Prevents 'opened' event from failing due to missing github.event.label
This enables the auto-merge workflow to work with Speakeasy SDK generation PRs.
2026-06-22 11:59:27 -04:00
Christine Chen c34ce15fa2 fix: update auto-merge workflow triggers and bot username
- Add 'opened' trigger to catch PRs when bot immediately applies label
- Fix bot username from github-actions[bot] to app/github-actions
This enables the auto-merge workflow to work with Speakeasy SDK generation PRs.
2026-06-22 11:20:24 -04:00
8e637041c4 chore: update OpenAPI spec from monorepo (#343)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-22 08:00:49 -07:00
146cec3c08 chore: update OpenAPI spec from monorepo (#341)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-19 09:03:24 -07:00
14a62e3451 chore: update OpenAPI spec from monorepo (#339)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-18 16:24:52 -07:00
7e29e408af chore: update OpenAPI spec from monorepo (#333)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-18 10:20:41 -07:00
Christine ChenandGitHub 30bc131b97 feat: auto-merge Speakeasy SDK generation PRs (#332) 2026-06-18 11:05:15 -04:00
Christine Chen 1b0118c365 fix: address review feedback on auto-merge workflow
Pipe gh pr list output through jq instead of passing --arg to gh --jq,
and add a repo-level concurrency group to prevent cross-PR merge races.
2026-06-17 16:54:40 -04:00
Christine Chen cda73e5ebf feat: auto-merge Speakeasy SDK generation PRs
Add a workflow that merges Speakeasy codegen PRs when the bot applies a
semver label, closing superseded regen PRs first. This unblocks
sdk_publish.yaml after mode:pr generation without manual intervention.
2026-06-17 16:28:01 -04:00
b0eda78d3f chore: update OpenAPI spec from monorepo (#330)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-17 12:53:02 -07:00
Christine ChenandGitHub bf682bdb62 fix: use PR mode for spec-change SDK generation (#329) 2026-06-17 15:07:36 -04:00
Christine Chen b322622117 fix: use PR mode for spec-change SDK generation
Switch sdk_generation_for_spec_change.yaml from direct to pr mode so
Speakeasy opens a PR instead of pushing to main. This avoids branch
protection failures and routes publishing through sdk_publish.yaml.
2026-06-17 10:37:08 -04:00
Matt AppersonandGitHub 415450e785 chore: 🐝 Update SDK - Generate 0.10.0 (#317) 2026-06-17 09:48:04 -04:00
speakeasy-github[bot]andspeakeasy-bot 1d488f0117 empty commit to trigger [run-tests] workflow 2026-06-17 01:01:27 +00:00
speakeasybot 4e789208b4 ## Python SDK Changes:
* `open_router.beta.responses.send()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response` **Changed** **Breaking** ⚠️
* `open_router.presets.create_presets_responses()`:  `request` **Changed** **Breaking** ⚠️
* `open_router.presets.create_presets_chat_completions()`:  `request` **Changed** **Breaking** ⚠️
* `open_router.chat.send()`:  `request` **Changed** **Breaking** ⚠️
* `open_router.workspaces.set_budget()`: **Added**
* `open_router.o_auth.create_auth_code()`: 
  *  `request.workspace_id` **Added**
  *  `error.status[403]` **Added**
* `open_router.files.download()`: **Added**
* `open_router.models.get()`: **Added**
* `open_router.workspaces.list_budgets()`: **Added**
* `open_router.workspaces.delete_budget()`: **Added**
* `open_router.datasets.get_benchmarks_artificial_analysis()`: **Added**
* `open_router.beta.analytics.query_analytics()`:  `response.data.warnings` **Added**
* `open_router.files.delete()`: **Added**
* `open_router.files.retrieve()`: **Added**
* `open_router.files.upload()`: **Added**
* `open_router.embeddings.list_models()`:  `response.data.[].benchmarks` **Added**
* `open_router.models.list()`: 
  *  `request` **Changed**
  *  `response.data.[].benchmarks` **Added**
* `open_router.models.list_for_user()`:  `response.data.[].benchmarks` **Added**
* `open_router.files.list()`: **Added**
* `open_router.presets.create_presets_messages()`:  `request` **Changed**
* `open_router.datasets.get_benchmarks_design_arena()`: **Added**
2026-06-17 01:01:09 +00:00
cdd4dc7302 chore: update OpenAPI spec from monorepo (#328)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-16 16:01:05 -07:00
Christine ChenandGitHub 60708e1e8b docs: remove beta labels from Python SDK README (#327) 2026-06-16 18:58:58 -04:00
Christine Chen 5a324f99ae docs: remove beta labels from Python SDK README
The Python SDK is no longer in beta. Drop the (Beta) title suffix and
remove the Maturity section disclaimer from README and README-PYPI.

SDK-464
2026-06-16 18:09:12 -04:00
d5778dfafb chore: update OpenAPI spec from monorepo (#326)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-16 14:36:02 -07:00
68c251830c chore: update OpenAPI spec from monorepo (#325)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-16 12:52:37 -07:00
2aa2d73d2d chore: update OpenAPI spec from monorepo (#324)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-16 10:37:39 -07:00
58bd390fbd chore: update OpenAPI spec from monorepo (#323)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-16 00:39:20 -07:00
2707901239 chore: update OpenAPI spec from monorepo (#322)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-15 14:21:32 -07:00
a5ed2de8a8 chore: update OpenAPI spec from monorepo (#321)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-15 10:29:12 -07:00
robert-j-yandGitHub 21893dda58 ci: regenerate SDK directly when merged spec changes land (#315) 2026-06-15 09:52:12 -07:00
758a2f3d49 chore: update OpenAPI spec from monorepo (#320)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-15 09:28:46 -07:00
0331f14f19 chore: update OpenAPI spec from monorepo (#319)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-15 06:48:08 -07:00
138b131a35 chore: update OpenAPI spec from monorepo (#318)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 22:08:18 -07:00
Christine ChenandGitHub 55c0d5c7fd docs: update outdated model counts in SDK documentation (#313) 2026-06-12 17:37:19 -04:00
e98a7a8260 chore: update OpenAPI spec from monorepo (#316)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 13:38:51 -07:00
Christine Chen 7e7787cb23 docs: update outdated model counts in SDK documentation
Refresh README and overview copy to reflect 400+ available models instead of 300+.
2026-06-12 15:47:18 -04:00
c4b508f045 chore: update OpenAPI spec from monorepo (#314)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 12:44:30 -07:00
52e7853d21 chore: update OpenAPI spec from monorepo (#312)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 10:46:58 -07:00
d43061f722 chore: update OpenAPI spec from monorepo (#311)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 10:09:55 -07:00
7b10fd47d8 chore: update OpenAPI spec from monorepo (#310)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 07:28:06 -07:00
95f2c87bfa chore: update OpenAPI spec from monorepo (#309)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 06:51:21 -07:00
c756fc51e0 chore: update OpenAPI spec from monorepo (#308)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-11 17:50:16 -07:00
386db75669 chore: update OpenAPI spec from monorepo (#307)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-11 13:27:05 -07:00
e3dc2e6f4c chore: update OpenAPI spec from monorepo (#306)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-11 12:10:20 -07:00
70c8757fc0 chore: update OpenAPI spec from monorepo (#305)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-11 11:10:32 -07:00
b794150ed9 chore: update OpenAPI spec from monorepo (#304)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-11 09:18:46 -07:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
0f116c9792 chore: 🐝 Update SDK - Generate 0.9.2 (#205)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-11 12:10:31 -04:00
0c735989c1 chore: update OpenAPI spec from monorepo (#303)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 22:01:22 -07:00
3b2f5b2316 chore: update OpenAPI spec from monorepo (#301)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 16:46:14 -07:00
3883438f02 chore: update OpenAPI spec from monorepo (#300)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 16:00:58 -07:00
1cd1e66e2d chore: update OpenAPI spec from monorepo (#299)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 11:13:43 -07:00
f29a61de7e chore: update OpenAPI spec from monorepo (#298)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 10:06:09 -07:00
1725abad89 chore: update OpenAPI spec from monorepo (#297)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 06:22:51 -07:00
8df520997d chore: update OpenAPI spec from monorepo (#296)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 19:48:29 -07:00
c4843278fd chore: update OpenAPI spec from monorepo (#295)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 17:13:15 -07:00
ccbd6d16f8 chore: update OpenAPI spec from monorepo (#294)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 16:50:55 -07:00
80646bd8a6 chore: update OpenAPI spec from monorepo (#293)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 15:54:33 -07:00
68fc6f0ee9 chore: update OpenAPI spec from monorepo (#292)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 12:37:51 -07:00
23ee599564 chore: update OpenAPI spec from monorepo (#291)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 11:13:04 -07:00
2203de96b4 chore: update OpenAPI spec from monorepo (#290)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-08 16:40:27 -04:00
b7d5098042 chore: update OpenAPI spec from monorepo (#289)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-08 12:07:59 -04:00
b9f588d84b chore: update OpenAPI spec from monorepo (#288)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-08 10:28:12 -04:00
5caa85a52c chore: update OpenAPI spec from monorepo (#287)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-05 10:37:07 -04:00
fc328cd45d chore: update OpenAPI spec from monorepo (#286)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-04 16:17:54 -04:00
234901509f chore: update OpenAPI spec from monorepo (#285)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-03 16:57:01 -04:00
771a5b1a52 chore: update OpenAPI spec from monorepo (#284)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-01 20:54:31 -07:00
93dd1b59fd chore: update OpenAPI spec from monorepo (#282)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-29 17:59:39 -07:00
698e7d6d7e chore: update OpenAPI spec from monorepo (#281)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-29 15:52:56 -07:00
fe4080dfda chore: update OpenAPI spec from monorepo (#280)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-28 14:04:37 -07:00
1090ab30b2 chore: update OpenAPI spec from monorepo (#279)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-28 10:52:41 -07:00
51a8873f33 chore: update OpenAPI spec from monorepo (#278)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-28 08:22:21 -07:00
a95178f8b3 chore: update OpenAPI spec from monorepo (#277)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-28 03:20:57 -07:00
63b73f57d4 chore: update OpenAPI spec from monorepo (#276)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-27 23:21:46 -07:00
6ceb25ca84 chore: update OpenAPI spec from monorepo (#275)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-26 20:08:49 -07:00
b5aca7806b chore: update OpenAPI spec from monorepo (#274)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-26 17:38:30 -07:00
4610ea4719 chore: update OpenAPI spec from monorepo (#273)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-26 14:05:37 -07:00
67bd50597a chore: update OpenAPI spec from monorepo (#272)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-26 06:46:07 -07:00
859e89d545 chore: update OpenAPI spec from monorepo (#271)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-24 04:32:12 -07:00
f94fcc1eb1 chore: update OpenAPI spec from monorepo (#270)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-22 18:00:36 -07:00
c361f61f5b chore: update OpenAPI spec from monorepo (#268)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-22 09:44:53 -07:00
f119275b26 chore: update OpenAPI spec from monorepo (#267)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-20 14:45:06 -07:00
460658428f chore: update OpenAPI spec from monorepo (#263)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-19 17:32:47 -07:00
5d441447a9 chore: update OpenAPI spec from monorepo (#262)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-19 14:12:00 -07:00
d549103228 chore: update OpenAPI spec from monorepo (#261)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-19 12:50:36 -07:00
Matt AppersonandGitHub 3e77e61a5c chore: bump speakeasy version to 1.763.2 (#260) 2026-05-19 15:18:43 -04:00
e0dddac466 chore: update OpenAPI spec from monorepo (#259)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-18 22:55:48 -07:00
32c6c506cf chore: update OpenAPI spec from monorepo (#258)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-18 17:30:34 -07:00
59a8775ed7 chore: update OpenAPI spec from monorepo (#257)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-18 15:36:40 -07:00
e7a06917b2 chore: update OpenAPI spec from monorepo (#256)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-16 20:34:21 -07:00
d8c617dfd2 chore: update OpenAPI spec from monorepo (#255)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-16 18:53:40 -07:00
752156a9ad chore: update OpenAPI spec from monorepo (#254)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-16 14:13:23 -07:00
688c063276 chore: update OpenAPI spec from monorepo (#253)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-16 11:20:24 -07:00
da19555f7f chore: update OpenAPI spec from monorepo (#252)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-15 16:01:52 -07:00
0ecf2ef253 chore: update OpenAPI spec from monorepo (#251)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-15 13:49:07 -07:00
a7fd661299 chore: update OpenAPI spec from monorepo (#250)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-15 11:26:30 -07:00
c5e2532cc4 chore: update OpenAPI spec from monorepo (#249)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-15 06:27:29 -07:00
0aa6eabffd chore: update OpenAPI spec from monorepo (#248)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-14 17:00:01 -07:00
205749ae6b chore: update OpenAPI spec from monorepo (#247)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-14 13:13:22 -07:00
bf8a2c6adc chore: update OpenAPI spec from monorepo (#246)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-14 07:02:37 -07:00
9312cabf22 chore: update OpenAPI spec from monorepo (#245)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 18:10:03 -07:00
ec85ab283b chore: update OpenAPI spec from monorepo (#244)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 14:58:31 -07:00
4c5911ffee chore: update OpenAPI spec from monorepo (#243)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 13:33:16 -07:00
882f4a0811 chore: update OpenAPI spec from monorepo (#242)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 09:29:14 -07:00
90f661ff73 chore: update OpenAPI spec from monorepo (#241)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 07:25:17 -07:00
bb74b7fabc chore: update OpenAPI spec from monorepo (#240)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 00:43:55 -07:00
a7bb403311 chore: update OpenAPI spec from monorepo (#239)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-12 23:54:21 -07:00
522b03abf3 chore: update OpenAPI spec from monorepo (#238)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-12 21:49:55 -07:00
be479e24fd chore: update OpenAPI spec from monorepo (#237)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-12 18:12:04 -07:00
a4197ac1db chore: update OpenAPI spec from monorepo (#236)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-11 19:37:39 -07:00
f587c3ce45 chore: update OpenAPI spec from monorepo (#235)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-11 16:37:12 -07:00
a4ae8297ce chore: update OpenAPI spec from monorepo (#234)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-09 00:28:51 -07:00
4664c73492 chore: update OpenAPI spec from monorepo (#233)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-08 15:25:45 -07:00
e150991aa7 chore: update OpenAPI spec from monorepo (#232)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-08 07:42:24 -07:00
5f18dd0131 chore: update OpenAPI spec from monorepo (#231)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-07 15:00:54 -07:00
5441e86fee chore: update OpenAPI spec from monorepo (#230)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-06 15:46:15 -07:00
bb505b71e5 chore: update OpenAPI spec from monorepo (#229)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-06 15:03:26 -07:00
45c3ace681 chore: update OpenAPI spec from monorepo (#228)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-06 12:18:59 -07:00
d208cc6cf8 chore: update OpenAPI spec from monorepo (#227)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-06 09:58:16 -07:00
fb31150e8f chore: update OpenAPI spec from monorepo (#226)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-06 03:37:55 -07:00
e0e80c538a chore: update OpenAPI spec from monorepo (#224)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-05 21:16:03 -07:00
7db74e51d1 chore: update OpenAPI spec from monorepo (#223)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-05 18:17:00 -07:00
27c12d4d59 chore: update OpenAPI spec from monorepo (#222)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-05 09:56:31 -07:00
cd24443470 chore: update OpenAPI spec from monorepo (#221)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-05 08:47:57 -07:00
2fc0ea8084 chore: update OpenAPI spec from monorepo (#220)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-04 15:06:32 -05:00
330cff1158 chore: update OpenAPI spec from monorepo (#219)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-04 14:33:14 -05:00
8ac9dede84 chore: update OpenAPI spec from monorepo (#218)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-02 12:45:50 -05:00
c10bbfe084 chore: update OpenAPI spec from monorepo (#216)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-30 12:23:07 -05:00
3d1fdef97a chore: update OpenAPI spec from monorepo (#215)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-30 04:07:15 -05:00
067cdc027a chore: update OpenAPI spec from monorepo (#214)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-27 20:53:22 -05:00
5bad276c29 chore: update OpenAPI spec from monorepo (#211)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-24 09:05:21 -05:00
f3699017d5 chore: update OpenAPI spec from monorepo (#193)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-23 10:06:30 -05:00
b202e599ae chore: update OpenAPI spec from monorepo (#190)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-23 00:06:20 -05:00
be9056bcbe chore: update OpenAPI spec from monorepo (#177)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-22 09:03:32 -05:00
cb23cec150 chore: update OpenAPI spec from monorepo (#164)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-21 14:55:33 -05:00
312ffce1c5 chore: update OpenAPI spec from monorepo (#151)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-20 13:33:39 -05:00
c5e87b6ab2 chore: update OpenAPI spec from monorepo (#150)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-20 07:44:12 -05:00
a23c20f60b chore: update OpenAPI spec from monorepo (#146)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-19 10:30:32 -05:00
e6703a5038 chore: update OpenAPI spec from monorepo (#143)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-18 23:28:56 -05:00
9ce403745a chore: update OpenAPI spec from monorepo (#141)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-18 20:28:30 -05:00
175b135377 chore: update OpenAPI spec from monorepo (#135)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-17 19:46:43 -05:00
0503928934 chore: update OpenAPI spec from monorepo (#132)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-16 15:19:12 -05:00
6006c3a84f chore: update OpenAPI spec from monorepo (#131)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-16 12:44:05 -05:00
c2a933ff6b chore: update OpenAPI spec from monorepo (#130)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-16 09:56:09 -05:00
a34a1456a1 chore: update OpenAPI spec from monorepo (#126)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-15 16:04:08 -05:00
a40c0019c1 chore: update OpenAPI spec from monorepo (#125)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-15 09:38:49 -05:00
5881e47375 chore: update OpenAPI spec from monorepo (#124)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-14 15:01:06 -05:00
6989ad4f40 chore: update OpenAPI spec from monorepo (#122)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-14 11:59:16 -05:00
Matt AppersonandGitHub b2386114cd fix: add overlay to remove nullable from pagination offset params (#121) 2026-04-14 12:48:15 -04:00
2bba049182 chore: update OpenAPI spec from monorepo (#119)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-14 09:43:17 -05:00
e8953c70bd chore: update OpenAPI spec from monorepo (#113)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-13 12:55:39 -05:00
29fdfcedc3 chore: update OpenAPI spec from monorepo (#112)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-13 11:15:35 -05:00
c0959955c1 chore: update OpenAPI spec from monorepo (#110)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-13 03:41:31 -05:00
a0a7edecfa chore: update OpenAPI spec from monorepo (#106)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-12 12:21:17 -05:00
4e84bb736b chore: update OpenAPI spec from monorepo (#98)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-10 21:16:40 -04:00
947e92e68d chore: update OpenAPI spec from monorepo (#99)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-10 21:16:13 -04:00
bdbd8becc2 chore: update OpenAPI spec from monorepo (#97)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-10 21:15:46 -04:00
6ef088e7c7 chore: update OpenAPI spec from monorepo (#100)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-10 21:15:45 -04:00
e4e5cc259a chore: update OpenAPI spec from monorepo (#101)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-10 21:14:47 -04:00
Matt AppersonandGitHub 06bea2ae0f chore: set forwardCompatibleUnionsByDefault to tagged-only (#76) 2026-04-08 10:46:15 -04:00
Matt AppersonandGitHub 6b1b7e6a9d fix: add overlay to convert boolean query params to boolean type (#75) 2026-04-08 09:22:13 -04:00
Matt AppersonandGitHub dd8e6bdac2 fix: add generic overlay to remove redundant allOf inline enums (#73) 2026-04-03 18:37:50 -04:00
Matt Apperson e6b0242969 chore: clean up removed docs and update generated SDK files
Remove obsolete component documentation and update speakeasy-generated
files to match the latest OpenAPI spec regeneration.
2026-04-02 10:21:41 -04:00
OpenRouter SDK Bot 5ab44f08f0 feat: regenerate SDK with updated OpenAPI spec
Speakeasy regeneration with latest schema changes including
type renames and new server tool models.
2026-03-27 15:18:14 -04:00
robert-j-yandGitHub e72a84e82d chore: sync from monorepo (#61) 2026-02-23 17:02:29 -06:00
OpenRouter Team c734c52d9c Commits included in this export:
- 56d382078cfce7fa597d1da2bce531af2d060b47
  - 9ef6db7e04c9401536763a321b05d00311cef31a
  - bf855082e30820d466f0f86a6d6e87de2ecfb06f
  - 335b1cbe361214e48b945b987b4e164457aa817b
  - 648485fdc7f9d8ae86fd857eccedcc5e41fb2e69
  - 80c49474a15a2bd549a5f26efad3858aa45b7c7b
  - 70e8ac317f9c4472db3decd024d1819650df4182
  - 9f2a6659ab6dbf111a0c29e4366328c3d2048826
  - a3a28b1fc6ec7d2941232a4ebde8c5f470497876
  - 4b5dc9193480b7c5c9ddb882ccf3ee2128ca0d51
  - bb413e979a46ef67c2f266743f7ebd798af42afb
  - b60e92d5dcec83f31986164f51c010d1728b2b17
  - 45687f423707f5838461585c568a024a19eb2f06
  - 3103d3ca68b6e42ccdb6136588ec2b6edc8dcab0
  - fd9f991606027cd86116317c71f8eb7b4e2aa3eb
  - 0f312019161edd76c1e5923d142c788d22f096d5
  - 5dbab2094bc744db4a90b3097520d897e5d0d634
  - 4c47d1af1735db18a1c1a7f463e801c7f71ad4e5

GitOrigin-RevId: 56d382078cfce7fa597d1da2bce531af2d060b47
2026-02-23 21:34:42 +00:00
Shashank GoyalandGitHub b2098ff28e chore: sync from monorepo (#49) 2026-02-05 20:45:13 -05:00
OpenRouter Team 1cad51abb6 Commits included in this export:
- 6ddaaa6989d725bbe966e45f7aed0c1bd72f9153
  - 4779741b6ba710b1299612b82e8544516bd9dd6a
  - 22083fcc8f58884d8212d6f3314b231c4ddd21cd
  - a925a620f97196d509e073a163caac053bd82316
  - 5c05d8829784601ffd151acef1a6978c266f913d
  - 6f4fff535fbf4274255c255ae23620b8e00e614f
  - ef358e96cb01e469b77d44683603a602b0813116
  - e6299b4ebfe5c2eed6c598771f0fd99f84555401
  - 24d3f0ee1c2aa19a62f7902836034080b9246813
  - 68922847c2969b773887310eb7aa9a814e199c5a
  - 729ee2338c39df22461526153e7f4ba868fd498e
  - e1074ff86fccf5e48406b7595298873106d3cc5a
  - 123bbdaf841d299162a82ee2573adfbb70a45b8f
  - ac457b8a8dad98fdf5ddcae8dd4711361cea3084
  - ea825199f4c59dd68fec01cf8d18a582963c9f25
  - 4d48e4f6bb936e785787314a965298da6b78fea0
  - 718729a573ee98893a4408d5a52ab4686661fe54
  - b867adcde6b64f3f2a11c4626254b39098e4b0b4
  - 21912c097b4066d109766c6b4492826595cd57c5
  - bc1ed85adc976a4634ca8a41b82e4fc2c39a864f
  - d145c89c941937a312ed1357590d2bfda9a3603d
  - 12f05b5dee397ead47cfcd545a7a2e3c7ff57524
  - dd28f75a19a015809797c7abf3f8758f7c37262e
  - c96e569781e07ab44172d9c69940ec17bafd81f4
  - c9d5a90e3c2b5077a2bdd49773f1a46d1a5a79c7
  - 58b08f87116ceab9076de2fdc0a4c74c919b44c4

GitOrigin-RevId: 6ddaaa6989d725bbe966e45f7aed0c1bd72f9153
2026-02-05 23:15:21 +00:00
robert-j-yandGitHub 0c791b04d1 chore: sync from monorepo (#36) 2026-01-21 17:28:27 -08:00
OpenRouter Team 5f2c0ee2ea Project import generated by Copybara.
GitOrigin-RevId: 2592bdc8b4b7c695a3d689390aedc9a42914acc8
2026-01-22 01:26:28 +00:00
robert-j-yandGitHub 5832c0495b chore: regenerate SDK with version 0.1.2 (#34) 2026-01-21 13:47:48 -08:00
Robert Yeakel f5dfc30997 chore: regenerate SDK with version 0.1.2 2026-01-21 13:45:46 -08:00
Shashank GoyalandGitHub a56ffbf5f3 Update speakeasy gen.yaml (#33) 2026-01-21 16:17:11 -05:00
Shashank Goyal cc2b002c5c Update speakeasy gen.yaml 2026-01-21 16:16:16 -05:00
Shashank Goyal 9774c726fd Bring project back to correct version number 2026-01-21 16:03:44 -05:00
Matt AppersonandGitHub 3a40848aab fix: update OpenAPI spec with router field (#32) 2026-01-13 20:40:08 -05:00
1256 changed files with 155548 additions and 35156 deletions
@@ -0,0 +1,225 @@
name: Auto-merge Speakeasy PR
# Called as a follow-up job after Speakeasy Generate (mode: pr). Merges the
# regen PR opened/updated in the same workflow run so sdk_publish.yaml can run.
# Prefer branch_name from Generate logs; fall back to run_started_at heuristics.
# Uses GH_DOCS_SYNC GitHub App token (not a PAT) so merges trigger downstream push.
on:
workflow_call:
inputs:
run_started_at:
description: ISO timestamp when the parent Generate workflow run started
required: true
type: string
branch_name:
description: Speakeasy regen branch from the parent Generate run (optional)
required: false
type: string
default: ""
secrets:
GH_DOCS_SYNC_APP_ID:
required: true
GH_DOCS_SYNC_APP_PRIVATE_KEY:
required: true
permissions:
contents: write
pull-requests: write
concurrency:
group: auto-merge-speakeasy
cancel-in-progress: false
jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: app-token
# actions/create-github-app-token@v3.2.0 (immutable SHA)
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1
with:
app-id: ${{ secrets.GH_DOCS_SYNC_APP_ID }}
private-key: ${{ secrets.GH_DOCS_SYNC_APP_PRIVATE_KEY }}
- name: Resolve Speakeasy regen PR
id: pr
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
set -euo pipefail
REPO="${{ github.repository }}"
RUN_STARTED="${{ inputs.run_started_at }}"
BRANCH="${{ inputs.branch_name }}"
PR_JSON=$(gh pr list \
--repo "$REPO" \
--state open \
--search "head:speakeasy-sdk-regen-" \
--limit 500 \
--json number,updatedAt,title,labels,author,headRefName)
PR_NUM=""
if [ -n "$BRANCH" ]; then
CANDIDATE=$(echo "$PR_JSON" | jq -r --arg branch "$BRANCH" \
'[.[] | select(.headRefName == $branch)] | .[0] // empty')
if [ -n "$CANDIDATE" ] && echo "$CANDIDATE" | jq -e '
(.headRefName | startswith("speakeasy-sdk-regen-"))
and (.title | contains("🐝 Update SDK"))
and ([.labels[].name] | any(. == "patch" or . == "minor" or . == "major"))
and (.author.is_bot == true)
' > /dev/null; then
PR_NUM=$(echo "$CANDIDATE" | jq -r '.number')
echo "Resolved Speakeasy regen PR #$PR_NUM from branch $BRANCH"
else
echo "::warning::branch_name=$BRANCH did not match a valid open regen PR — falling back to run_started_at"
fi
fi
if [ -z "$PR_NUM" ]; then
PR_NUM=$(echo "$PR_JSON" | jq -r --arg started "$RUN_STARTED" '
[.[]
| select(.headRefName | startswith("speakeasy-sdk-regen-"))
| select(.title | contains("🐝 Update SDK"))
| select([.labels[].name] | any(. == "patch" or . == "minor" or . == "major"))
| select(.author.is_bot == true)
| select(.updatedAt >= $started)
] | sort_by(.updatedAt) | last | .number // empty')
fi
if [ -z "$PR_NUM" ]; then
echo "No Speakeasy regen PR for this Generate run — skipping auto-merge"
echo "::notice title=auto-merge-skipped::No qualifying Speakeasy regen PR to merge"
{
echo "## Auto-merge skipped"
echo "No qualifying \`speakeasy-sdk-regen-*\` PR was found."
echo "- branch_name input: \`${BRANCH:-<empty>}\`"
echo "- run_started_at: \`$RUN_STARTED\`"
} >> "$GITHUB_STEP_SUMMARY"
echo "pr_num=" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "pr_num=$PR_NUM" >> "$GITHUB_OUTPUT"
echo "$PR_JSON" > /tmp/speakeasy_pr_json.json
- name: Close superseded Speakeasy PRs
if: steps.pr.outputs.pr_num != ''
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
set -euo pipefail
CURRENT_PR="${{ steps.pr.outputs.pr_num }}"
PR_JSON=$(cat /tmp/speakeasy_pr_json.json)
PRIOR_JSON=$(echo "$PR_JSON" | jq -r --arg current_pr "$CURRENT_PR" \
'[.[].number | select(tostring != $current_pr)] | .[]')
if [ -z "$PRIOR_JSON" ]; then
echo "No superseded Speakeasy PRs to close"
exit 0
fi
mapfile -t PRIOR <<< "$PRIOR_JSON"
echo "Closing ${#PRIOR[@]} superseded Speakeasy PR(s)"
for N in "${PRIOR[@]}"; do
gh pr close "$N" --repo "${{ github.repository }}" --delete-branch \
--comment "Superseded by newer Speakeasy SDK generation PR #${CURRENT_PR}" \
|| echo "::warning::Failed to close PR #$N (continuing)"
sleep 1
done
- name: Auto-merge Speakeasy PR
if: steps.pr.outputs.pr_num != ''
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
set -euo pipefail
PR_NUM="${{ steps.pr.outputs.pr_num }}"
REPO="${{ github.repository }}"
wait_for_checks() {
local pr=$1
local timeout=600
local interval=15
local elapsed=0
echo "Waiting for PR #$pr checks (timeout ${timeout}s)..."
while [ "$elapsed" -lt "$timeout" ]; do
TOTAL=$(gh pr view "$pr" --repo "$REPO" --json statusCheckRollup --jq \
'.statusCheckRollup | length')
PENDING=$(gh pr view "$pr" --repo "$REPO" --json statusCheckRollup --jq \
'[.statusCheckRollup[]? | select(.status != "COMPLETED")] | length')
FAILED=$(gh pr view "$pr" --repo "$REPO" --json statusCheckRollup --jq \
'[.statusCheckRollup[]? | select(.status == "COMPLETED") | select(.conclusion != "SUCCESS" and .conclusion != "SKIPPED" and .conclusion != "NEUTRAL")] | length')
if [ "$TOTAL" -eq 0 ]; then
# GITHUB_TOKEN-authored regen PRs get no pull_request checks at all,
# so TOTAL stays 0 forever. Wait a short grace window in case checks
# are merely slow to register, then proceed rather than time out.
if [ "$elapsed" -ge 60 ]; then
echo "No checks registered after ${elapsed}s — proceeding (checkless PR)"
return 0
fi
echo "Checks not yet registered — waiting ${interval}s..."
sleep "$interval"
elapsed=$((elapsed + interval))
continue
fi
if [ "$PENDING" -eq 0 ]; then
if [ "$FAILED" -gt 0 ]; then
echo "::error::PR #$pr has failing checks — refusing direct merge"
gh pr checks "$pr" --repo "$REPO" || true
exit 1
fi
echo "All checks completed"
return 0
fi
echo "Checks pending ($PENDING) — waiting ${interval}s..."
sleep "$interval"
elapsed=$((elapsed + interval))
done
echo "::error::Timed out waiting for PR #$pr checks"
exit 1
}
STATE=$(gh pr view "$PR_NUM" --repo "$REPO" --json state --jq .state)
if [ "$STATE" != "OPEN" ]; then
echo "PR #$PR_NUM is $STATE — skipping merge"
exit 0
fi
MERGE_METHOD=""
# Prefer GitHub auto-merge when required checks exist; otherwise
# squash-merge directly after checks pass (sdk-release-prs.yaml pattern).
AUTO_MERGE_NOOP_PATTERN='is in clean status|protected branch rules|Branch does not have required protected branch rules'
if gh pr merge "$PR_NUM" --repo "$REPO" --squash --auto --delete-branch 2> /tmp/gh-merge.err; then
MERGE_METHOD="auto-merge queued"
echo "Auto-merge enabled for Speakeasy PR #$PR_NUM"
elif grep -qiE "$AUTO_MERGE_NOOP_PATTERN" /tmp/gh-merge.err; then
echo "Auto-merge not applicable — waiting for checks, then merging PR #$PR_NUM directly"
cat /tmp/gh-merge.err >&2
wait_for_checks "$PR_NUM"
gh pr merge "$PR_NUM" --repo "$REPO" --squash --delete-branch
MERGE_METHOD="direct squash (checks passed)"
else
echo "::error::Failed to enable auto-merge on Speakeasy PR #$PR_NUM"
cat /tmp/gh-merge.err >&2
exit 1
fi
echo "::notice title=auto-merge-pr::Merged Speakeasy PR #$PR_NUM ($MERGE_METHOD)"
{
echo "## Auto-merge complete"
echo "- PR: #$PR_NUM"
echo "- Method: $MERGE_METHOD"
echo "- Token: GH_DOCS_SYNC GitHub App"
} >> "$GITHUB_STEP_SUMMARY"
+37
View File
@@ -0,0 +1,37 @@
name: PR Validation
on:
pull_request:
paths-ignore:
- .speakeasy/in.openapi.yaml
concurrency:
group: pr-validation-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Build SDK
run: uv build
- name: Type check (mypy)
run: uv run --group dev mypy src
- name: Type check (pyright)
run: uv run --group dev pyright src
- name: Lint (pylint)
run: uv run --group dev pylint src --rcfile pylintrc
+69
View File
@@ -21,6 +21,11 @@ permissions:
types: types:
- labeled - labeled
- unlabeled - unlabeled
concurrency:
group: speakeasy-generate
cancel-in-progress: false
jobs: jobs:
generate: generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
@@ -32,3 +37,67 @@ jobs:
github_access_token: ${{ secrets.GITHUB_TOKEN }} github_access_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }} pypi_token: ${{ secrets.PYPI_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
resolve-branch:
needs: generate
if: ${{ !cancelled() && needs.generate.result == 'success' }}
runs-on: ubuntu-latest
outputs:
branch_name: ${{ steps.branch.outputs.branch_name }}
run_started_at: ${{ steps.branch.outputs.run_started_at }}
steps:
- name: Extract branch from Generate logs
id: branch
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
REPO="${{ github.repository }}"
RUN_ID="${{ github.run_id }}"
RUN_STARTED="${{ github.run_started_at }}"
if [ -z "$RUN_STARTED" ]; then
RUN_STARTED=$(gh run view "$RUN_ID" --repo "$REPO" --json startedAt --jq '.startedAt')
echo "Resolved run_started_at from API: $RUN_STARTED"
fi
echo "run_started_at=$RUN_STARTED" >> "$GITHUB_OUTPUT"
# Full-run logs are unavailable while the workflow is in progress;
# fetch logs from the completed generate job instead.
JOB_ID=$(gh run view "$RUN_ID" --repo "$REPO" --json jobs --jq \
'[.jobs[] | select(.name == "generate / Generate Target")] | .[0].databaseId // empty')
BRANCH=""
if [ -z "$JOB_ID" ]; then
echo "::warning::Could not find generate job id — auto-merge will use run_started_at fallback"
else
MAX_ATTEMPTS=12
INTERVAL=10
for attempt in $(seq 1 "$MAX_ATTEMPTS"); do
BRANCH=$(gh run view "$RUN_ID" --repo "$REPO" --job "$JOB_ID" --log 2>/dev/null \
| grep -oE 'branch_name=speakeasy-sdk-regen-[0-9]+' | tail -1 | cut -d= -f2 || true)
if [ -n "$BRANCH" ]; then
echo "Extracted branch_name=$BRANCH (attempt $attempt)"
break
fi
if [ "$attempt" -lt "$MAX_ATTEMPTS" ]; then
echo "Job logs not ready — waiting ${INTERVAL}s (attempt $attempt/$MAX_ATTEMPTS)..."
sleep "$INTERVAL"
fi
done
if [ -z "$BRANCH" ]; then
echo "::warning::Could not extract branch_name from Generate logs after ${MAX_ATTEMPTS} attempts — auto-merge will use run_started_at fallback"
fi
fi
echo "branch_name=$BRANCH" >> "$GITHUB_OUTPUT"
auto-merge:
needs: [generate, resolve-branch]
if: ${{ !cancelled() && needs.generate.result == 'success' }}
uses: ./.github/workflows/auto-merge-speakeasy-pr.yaml
with:
run_started_at: ${{ needs.resolve-branch.outputs.run_started_at }}
branch_name: ${{ needs.resolve-branch.outputs.branch_name }}
secrets:
GH_DOCS_SYNC_APP_ID: ${{ secrets.GH_DOCS_SYNC_APP_ID }}
GH_DOCS_SYNC_APP_PRIVATE_KEY: ${{ secrets.GH_DOCS_SYNC_APP_PRIVATE_KEY }}
@@ -0,0 +1,104 @@
name: Generate (spec change merged)
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
id-token: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
set_version:
description: optionally set a specific SDK version
type: string
pull_request:
types: [closed]
branches:
- main
paths:
- .speakeasy/in.openapi.yaml
concurrency:
group: speakeasy-generate-spec-change
cancel-in-progress: false
jobs:
generate:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: pr
set_version: ${{ github.event.inputs.set_version }}
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
resolve-branch:
needs: generate
if: ${{ !cancelled() && needs.generate.result == 'success' }}
runs-on: ubuntu-latest
outputs:
branch_name: ${{ steps.branch.outputs.branch_name }}
run_started_at: ${{ steps.branch.outputs.run_started_at }}
steps:
- name: Extract branch from Generate logs
id: branch
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
REPO="${{ github.repository }}"
RUN_ID="${{ github.run_id }}"
RUN_STARTED="${{ github.run_started_at }}"
if [ -z "$RUN_STARTED" ]; then
RUN_STARTED=$(gh run view "$RUN_ID" --repo "$REPO" --json startedAt --jq '.startedAt')
echo "Resolved run_started_at from API: $RUN_STARTED"
fi
echo "run_started_at=$RUN_STARTED" >> "$GITHUB_OUTPUT"
# Full-run logs are unavailable while the workflow is in progress;
# fetch logs from the completed generate job instead.
JOB_ID=$(gh run view "$RUN_ID" --repo "$REPO" --json jobs --jq \
'[.jobs[] | select(.name == "generate / Generate Target")] | .[0].databaseId // empty')
BRANCH=""
if [ -z "$JOB_ID" ]; then
echo "::warning::Could not find generate job id — auto-merge will use run_started_at fallback"
else
MAX_ATTEMPTS=12
INTERVAL=10
for attempt in $(seq 1 "$MAX_ATTEMPTS"); do
BRANCH=$(gh run view "$RUN_ID" --repo "$REPO" --job "$JOB_ID" --log 2>/dev/null \
| grep -oE 'branch_name=speakeasy-sdk-regen-[0-9]+' | tail -1 | cut -d= -f2 || true)
if [ -n "$BRANCH" ]; then
echo "Extracted branch_name=$BRANCH (attempt $attempt)"
break
fi
if [ "$attempt" -lt "$MAX_ATTEMPTS" ]; then
echo "Job logs not ready — waiting ${INTERVAL}s (attempt $attempt/$MAX_ATTEMPTS)..."
sleep "$INTERVAL"
fi
done
if [ -z "$BRANCH" ]; then
echo "::warning::Could not extract branch_name from Generate logs after ${MAX_ATTEMPTS} attempts — auto-merge will use run_started_at fallback"
fi
fi
echo "branch_name=$BRANCH" >> "$GITHUB_OUTPUT"
auto-merge:
needs: [generate, resolve-branch]
if: ${{ !cancelled() && needs.generate.result == 'success' }}
uses: ./.github/workflows/auto-merge-speakeasy-pr.yaml
with:
run_started_at: ${{ needs.resolve-branch.outputs.run_started_at }}
branch_name: ${{ needs.resolve-branch.outputs.branch_name }}
secrets:
GH_DOCS_SYNC_APP_ID: ${{ secrets.GH_DOCS_SYNC_APP_ID }}
GH_DOCS_SYNC_APP_PRIVATE_KEY: ${{ secrets.GH_DOCS_SYNC_APP_PRIVATE_KEY }}
+14 -2
View File
@@ -1,13 +1,25 @@
.venv/
venv/ venv/
src/*.egg-info/ src/*.egg-info/
**/__pycache__/ **/__pycache__/
.pytest_cache/ .pytest_cache/
.python-version .python-version
.DS_Store
pyrightconfig.json pyrightconfig.json
**/.speakeasy/temp/ **/.speakeasy/temp/
**/.speakeasy/logs/ **/.speakeasy/logs/
.speakeasy/reports .speakeasy/reports
# Build artifacts
/dist
__pycache__/
*.py[cod]
*.egg-info/
*.egg
# Speakeasy generation artifacts (generated in OSS repo, not here)
.speakeasy/*.lock
.speakeasy/*.openapi.yaml
/docs
# Environment
.env .env
.env.local .env.local
.env.*.local
.DS_Store
.venv/
+10257 -852
View File
File diff suppressed because it is too large Load Diff
+5 -1
View File
@@ -25,13 +25,14 @@ generation:
schemas: schemas:
allOfMergeStrategy: shallowMerge allOfMergeStrategy: shallowMerge
requestBodyFieldName: "" requestBodyFieldName: ""
persistentEdits: {}
tests: tests:
generateTests: false generateTests: false
generateNewTests: true generateNewTests: true
skipResponseBodyAssertions: false skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true preApplyUnionDiscriminators: true
python: python:
version: 0.0.17 version: 0.10.6
additionalDependencies: additionalDependencies:
dev: {} dev: {}
main: {} main: {}
@@ -46,6 +47,7 @@ python:
- OpenRouter - OpenRouter
baseErrorName: OpenRouterError baseErrorName: OpenRouterError
clientServerStatusCodesAsErrors: true clientServerStatusCodesAsErrors: true
constFieldCasing: upper
defaultErrorName: OpenRouterDefaultError defaultErrorName: OpenRouterDefaultError
description: Official Python Client SDK for OpenRouter. description: Official Python Client SDK for OpenRouter.
enableCustomCodeRegions: false enableCustomCodeRegions: false
@@ -57,6 +59,7 @@ python:
flattenGlobalSecurity: true flattenGlobalSecurity: true
flattenRequests: true flattenRequests: true
flatteningOrder: parameters-first flatteningOrder: parameters-first
forwardCompatibleUnionsByDefault: tagged-only
imports: imports:
option: openapi option: openapi
paths: paths:
@@ -77,6 +80,7 @@ python:
outputModelSuffix: output outputModelSuffix: output
packageManager: uv packageManager: uv
packageName: openrouter packageName: openrouter
preApplyUnionDiscriminators: false
pytestFilterWarnings: [] pytestFilterWarnings: []
pytestTimeout: 0 pytestTimeout: 0
responseFormat: flat responseFormat: flat
+33403 -8064
View File
File diff suppressed because it is too large Load Diff
+33333 -8048
View File
File diff suppressed because it is too large Load Diff
+20 -3
View File
@@ -1,17 +1,18 @@
overlay: 1.0.0 overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535 x-speakeasy-jsonpath: rfc9535
info: info:
title: Add HTTP-Referer and X-Title as global parameters title: Add HTTP-Referer and X-OpenRouter-Title as global parameters
version: 0.0.0 version: 0.0.0
actions: actions:
# Add global parameters for app identification # Add global parameters for app identification
- target: $ - target: $
description: Add x-speakeasy-globals for HTTP-Referer and X-Title headers description: Add x-speakeasy-globals for HTTP-Referer, X-OpenRouter-Title, and X-OpenRouter-Categories headers
update: update:
x-speakeasy-globals: x-speakeasy-globals:
parameters: parameters:
- $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
# Add component parameters # Add component parameters
- target: $.components - target: $.components
@@ -27,9 +28,25 @@ actions:
The app identifier should be your app's URL and is used as the primary identifier for rankings. The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application. This is used to track API usage per application.
AppDisplayName: AppDisplayName:
name: X-Title name: X-OpenRouter-Title
in: header in: header
schema: schema:
type: string type: string
description: | description: |
The app display name allows you to customize how your app appears in OpenRouter's dashboard. The app display name allows you to customize how your app appears in OpenRouter's dashboard.
AppCategories:
name: X-OpenRouter-Categories
in: header
schema:
type: string
description: |
Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
# Add header parameters to all paths so Speakeasy matches them with globals
- target: $.paths[*]
description: Reference app identification headers on all paths so Speakeasy injects them via globals
update:
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
@@ -0,0 +1,11 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Simplify redundant allOf inline schemas
version: 0.0.0
actions:
- target: "$..allOf[?@.enum && !@['$ref']]"
description: >
Remove inline enum definitions that duplicate a $ref enum in the same
allOf. These are artifacts from zod-openapi .extend() serialization.
remove: true
@@ -0,0 +1,10 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Convert boolean query params from string to boolean
version: 0.0.0
actions:
- target: $..parameters[?@.schema["x-openrouter-type"] == "boolean"].schema
description: Convert x-openrouter-type boolean params from string to boolean
update:
type: boolean
@@ -0,0 +1,10 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Fix nullable pagination params
version: 0.0.0
actions:
- target: $..parameters[?@.name == "offset" && @.in == "query"].schema
description: Remove nullable from offset query params to fix mypy errors in pagination helpers
update:
nullable: false
+11 -13
View File
@@ -1,29 +1,24 @@
speakeasyVersion: 1.666.0 speakeasyVersion: 1.680.0
sources: sources:
-OAS:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
tags:
- latest
OpenRouter API: OpenRouter API:
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:92f6f1568ba089ae8e52bd55d859a97e446ae232c4c9ca9302ea64705313c7a0 sourceRevisionDigest: sha256:c71a8e6b169e2ba8a81840f6ebeeb268ee09a440fb16b891f74fe2a9b065b989
sourceBlobDigest: sha256:6bbf6ab7123261f7e0604f1c640e32b5fc8fb6bb503b1bc8b12d0d78ed19fefc sourceBlobDigest: sha256:9d925b089f27563fa71967c94b8307007161626a685b84f4c4ab046b78b33f01
tags: tags:
- latest - latest
- speakeasy-sdk-regen-1782497972
- 1.0.0 - 1.0.0
targets: targets:
open-router: open-router:
source: OpenRouter API source: OpenRouter API
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:92f6f1568ba089ae8e52bd55d859a97e446ae232c4c9ca9302ea64705313c7a0 sourceRevisionDigest: sha256:c71a8e6b169e2ba8a81840f6ebeeb268ee09a440fb16b891f74fe2a9b065b989
sourceBlobDigest: sha256:6bbf6ab7123261f7e0604f1c640e32b5fc8fb6bb503b1bc8b12d0d78ed19fefc sourceBlobDigest: sha256:9d925b089f27563fa71967c94b8307007161626a685b84f4c4ab046b78b33f01
codeSamplesNamespace: open-router-python-code-samples codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:8340c172a77ca9ffeeea6ca5dce0d69a084a3ba0a4e2e41d098759f546d80da4 codeSamplesRevisionDigest: sha256:ad463b22c9ef7c281c59200fc59405a2d57b37cb07a848f6fad47870777c8ec0
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: 1.666.0 speakeasyVersion: 1.680.0
sources: sources:
OpenRouter API: OpenRouter API:
inputs: inputs:
@@ -32,6 +27,9 @@ workflow:
- location: .speakeasy/overlays/open-enums.overlay.yaml - location: .speakeasy/overlays/open-enums.overlay.yaml
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml - location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
- location: .speakeasy/overlays/add-headers.overlay.yaml - location: .speakeasy/overlays/add-headers.overlay.yaml
- location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
output: .speakeasy/out.openapi.yaml output: .speakeasy/out.openapi.yaml
registry: registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
+4 -1
View File
@@ -1,5 +1,5 @@
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: 1.666.0 speakeasyVersion: 1.680.0
sources: sources:
OpenRouter API: OpenRouter API:
inputs: inputs:
@@ -8,6 +8,9 @@ sources:
- location: .speakeasy/overlays/open-enums.overlay.yaml - location: .speakeasy/overlays/open-enums.overlay.yaml
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml - location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
- location: .speakeasy/overlays/add-headers.overlay.yaml - location: .speakeasy/overlays/add-headers.overlay.yaml
- location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
output: .speakeasy/out.openapi.yaml output: .speakeasy/out.openapi.yaml
registry: registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
+1 -1
View File
@@ -1,6 +1,6 @@
# OpenRouter Python SDK # OpenRouter Python SDK
The OpenRouter Python SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API. The OpenRouter Python SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.
## Why use the OpenRouter SDK? ## Why use the OpenRouter SDK?
+71 -8
View File
@@ -1,6 +1,6 @@
# OpenRouter SDK (Beta) # OpenRouter SDK
The [OpenRouter SDK](https://openrouter.ai/docs/sdks/python) is a Python toolkit designed to help you build AI-powered features and solutions. Giving you easy access to over 300 models across providers in an easy and type-safe way. The [OpenRouter SDK](https://openrouter.ai/docs/sdks/python) is a Python toolkit designed to help you build AI-powered features and solutions. Giving you easy access to 400+ models across providers in an easy and type-safe way.
To learn more about how to use the OpenRouter SDK, check out our [API Reference](https://openrouter.ai/docs/sdks/python/reference) and [Documentation](https://openrouter.ai/docs/sdks/python). To learn more about how to use the OpenRouter SDK, check out our [API Reference](https://openrouter.ai/docs/sdks/python/reference) and [Documentation](https://openrouter.ai/docs/sdks/python).
@@ -169,6 +169,69 @@ asyncio.run(main())
<!-- No Custom HTTP Client [http-client] --> <!-- No Custom HTTP Client [http-client] -->
<!-- Start Pagination [pagination] -->
## Pagination
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
return value of `Next` is `None`, then there are no more pages to be fetched.
Here's an example of one such pagination call:
```python
from openrouter import OpenRouter
import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.byok.list()
while res is not None:
# Handle items
res = res.next()
```
<!-- End Pagination [pagination] -->
<!-- Start File uploads [file-upload] -->
## File uploads
Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
> [!TIP]
>
> For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
>
```python
from openrouter import OpenRouter
import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.files.upload(file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
# Handle response
print(res)
```
<!-- End File uploads [file-upload] -->
<!-- Start Resource Management [resource-management] --> <!-- Start Resource Management [resource-management] -->
## Resource Management ## Resource Management
@@ -182,6 +245,9 @@ import os
def main(): def main():
with OpenRouter( with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""), api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router: ) as open_router:
# Rest of application here... # Rest of application here...
@@ -191,6 +257,9 @@ def main():
async def amain(): async def amain():
async with OpenRouter( async with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""), api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router: ) as open_router:
# Rest of application here... # Rest of application here...
@@ -241,9 +310,3 @@ To run the test suite, you'll need to set up your environment with an OpenRouter
```bash ```bash
pytest pytest
``` ```
## Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.
+71 -8
View File
@@ -1,6 +1,6 @@
# OpenRouter SDK (Beta) # OpenRouter SDK
The [OpenRouter SDK](https://openrouter.ai/docs/sdks/python) is a Python toolkit designed to help you build AI-powered features and solutions. Giving you easy access to over 300 models across providers in an easy and type-safe way. The [OpenRouter SDK](https://openrouter.ai/docs/sdks/python) is a Python toolkit designed to help you build AI-powered features and solutions. Giving you easy access to 400+ models across providers in an easy and type-safe way.
To learn more about how to use the OpenRouter SDK, check out our [API Reference](https://openrouter.ai/docs/sdks/python/reference) and [Documentation](https://openrouter.ai/docs/sdks/python). To learn more about how to use the OpenRouter SDK, check out our [API Reference](https://openrouter.ai/docs/sdks/python/reference) and [Documentation](https://openrouter.ai/docs/sdks/python).
@@ -169,6 +169,69 @@ asyncio.run(main())
<!-- No Custom HTTP Client [http-client] --> <!-- No Custom HTTP Client [http-client] -->
<!-- Start Pagination [pagination] -->
## Pagination
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
return value of `Next` is `None`, then there are no more pages to be fetched.
Here's an example of one such pagination call:
```python
from openrouter import OpenRouter
import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.byok.list()
while res is not None:
# Handle items
res = res.next()
```
<!-- End Pagination [pagination] -->
<!-- Start File uploads [file-upload] -->
## File uploads
Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
> [!TIP]
>
> For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
>
```python
from openrouter import OpenRouter
import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.files.upload(file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
# Handle response
print(res)
```
<!-- End File uploads [file-upload] -->
<!-- Start Resource Management [resource-management] --> <!-- Start Resource Management [resource-management] -->
## Resource Management ## Resource Management
@@ -182,6 +245,9 @@ import os
def main(): def main():
with OpenRouter( with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""), api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router: ) as open_router:
# Rest of application here... # Rest of application here...
@@ -191,6 +257,9 @@ def main():
async def amain(): async def amain():
async with OpenRouter( async with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""), api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router: ) as open_router:
# Rest of application here... # Rest of application here...
@@ -241,9 +310,3 @@ To run the test suite, you'll need to set up your environment with an OpenRouter
```bash ```bash
pytest pytest
``` ```
## Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.
+80
View File
@@ -9,3 +9,83 @@ Based on:
- [python v0.0.16] . - [python v0.0.16] .
### Releases ### Releases
- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - . - [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - .
## 2026-06-11 00:55:55
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.9.2] .
### Releases
- [PyPI v0.9.2] https://pypi.org/project/openrouter/0.9.2 - .
## 2026-06-17 00:59:07
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.0] .
### Releases
- [PyPI v0.10.0] https://pypi.org/project/openrouter/0.10.0 - .
## 2026-06-25 21:56:51
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.1] .
### Releases
- [PyPI v0.10.1] https://pypi.org/project/openrouter/0.10.1 - .
## 2026-06-25 22:28:38
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.2] .
### Releases
- [PyPI v0.10.2] https://pypi.org/project/openrouter/0.10.2 - .
## 2026-06-26 00:15:50
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.3] .
### Releases
- [PyPI v0.10.3] https://pypi.org/project/openrouter/0.10.3 - .
## 2026-06-26 12:06:01
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.4] .
### Releases
- [PyPI v0.10.4] https://pypi.org/project/openrouter/0.10.4 - .
## 2026-06-26 14:36:56
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.5] .
### Releases
- [PyPI v0.10.5] https://pypi.org/project/openrouter/0.10.5 - .
## 2026-06-26 18:19:11
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.6] .
### Releases
- [PyPI v0.10.6] https://pypi.org/project/openrouter/0.10.6 - .
+12 -10
View File
@@ -6,15 +6,16 @@ import os
with OpenRouter( with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""), api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router: ) as open_router:
res = open_router.beta.responses.send(service_tier="auto", stream=False) res = open_router.analytics.get_user_activity()
with res as event_stream: # Handle response
for event in event_stream: print(res)
# handle event
print(event, flush=True)
``` ```
</br> </br>
@@ -30,15 +31,16 @@ import os
async def main(): async def main():
async with OpenRouter( async with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""), api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router: ) as open_router:
res = await open_router.beta.responses.send_async(service_tier="auto", stream=False) res = await open_router.analytics.get_user_activity_async()
async with res as event_stream: # Handle response
async for event in event_stream: print(res)
# handle event
print(event, flush=True)
asyncio.run(main()) asyncio.run(main())
``` ```
+6 -6
View File
@@ -5,14 +5,14 @@
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| `byok_usage_inference` | *float* | :heavy_check_mark: | BYOK inference cost in USD (external credits spent) | 0.012 |
| `completion_tokens` | *int* | :heavy_check_mark: | Total completion tokens generated | 125 |
| `date_` | *str* | :heavy_check_mark: | Date of the activity (YYYY-MM-DD format) | 2025-08-24 | | `date_` | *str* | :heavy_check_mark: | Date of the activity (YYYY-MM-DD format) | 2025-08-24 |
| `endpoint_id` | *str* | :heavy_check_mark: | Unique identifier for the endpoint | 550e8400-e29b-41d4-a716-446655440000 |
| `model` | *str* | :heavy_check_mark: | Model slug (e.g., "openai/gpt-4.1") | openai/gpt-4.1 | | `model` | *str* | :heavy_check_mark: | Model slug (e.g., "openai/gpt-4.1") | openai/gpt-4.1 |
| `model_permaslug` | *str* | :heavy_check_mark: | Model permaslug (e.g., "openai/gpt-4.1-2025-04-14") | openai/gpt-4.1-2025-04-14 | | `model_permaslug` | *str* | :heavy_check_mark: | Model permaslug (e.g., "openai/gpt-4.1-2025-04-14") | openai/gpt-4.1-2025-04-14 |
| `endpoint_id` | *str* | :heavy_check_mark: | Unique identifier for the endpoint | 550e8400-e29b-41d4-a716-446655440000 | | `prompt_tokens` | *int* | :heavy_check_mark: | Total prompt tokens used | 50 |
| `provider_name` | *str* | :heavy_check_mark: | Name of the provider serving this endpoint | OpenAI | | `provider_name` | *str* | :heavy_check_mark: | Name of the provider serving this endpoint | OpenAI |
| `reasoning_tokens` | *int* | :heavy_check_mark: | Total reasoning tokens used | 25 |
| `requests` | *int* | :heavy_check_mark: | Number of requests made | 5 |
| `usage` | *float* | :heavy_check_mark: | Total cost in USD (OpenRouter credits spent) | 0.015 | | `usage` | *float* | :heavy_check_mark: | Total cost in USD (OpenRouter credits spent) | 0.015 |
| `byok_usage_inference` | *float* | :heavy_check_mark: | BYOK inference cost in USD (external credits spent) | 0.012 |
| `requests` | *float* | :heavy_check_mark: | Number of requests made | 5 |
| `prompt_tokens` | *float* | :heavy_check_mark: | Total prompt tokens used | 50 |
| `completion_tokens` | *float* | :heavy_check_mark: | Total completion tokens generated | 125 |
| `reasoning_tokens` | *float* | :heavy_check_mark: | Total reasoning tokens used | 25 |
+3 -3
View File
@@ -7,8 +7,8 @@ Model architecture information
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `tokenizer` | [Nullable[components.Tokenizer]](../components/tokenizer.md) | :heavy_check_mark: | N/A | GPT |
| `instruct_type` | [Nullable[components.InstructType]](../components/instructtype.md) | :heavy_check_mark: | Instruction format type | |
| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text |
| `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | | | `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | |
| `instruct_type` | [Nullable[components.InstructType]](../components/instructtype.md) | :heavy_check_mark: | Instruction format type | chatml |
| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text |
| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | | | `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
| `tokenizer` | [Nullable[components.Tokenizer]](../components/tokenizer.md) | :heavy_check_mark: | N/A | GPT |
-13
View File
@@ -1,13 +0,0 @@
# AssistantMessage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `role` | *Literal["assistant"]* | :heavy_check_mark: | N/A |
| `content` | [OptionalNullable[components.AssistantMessageContent]](../components/assistantmessagecontent.md) | :heavy_minus_sign: | N/A |
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatMessageToolCall](../components/chatmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
@@ -1,17 +0,0 @@
# AssistantMessageContent
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[components.ChatMessageContentItem]`
```python
value: List[components.ChatMessageContentItem] = /* values here */
```
@@ -1,4 +1,6 @@
# Sort # By
The provider sorting strategy (price, throughput, latency)
## Values ## Values
@@ -8,3 +10,4 @@
| `PRICE` | price | | `PRICE` | price |
| `THROUGHPUT` | throughput | | `THROUGHPUT` | throughput |
| `LATENCY` | latency | | `LATENCY` | latency |
| `EXACTO` | exacto |
-10
View File
@@ -1,10 +0,0 @@
# ChainID
## Values
| Name | Value |
| --------------------------------------------- | --------------------------------------------- |
| `ONE` | 1 |
| `ONE_HUNDRED_AND_THIRTY_SEVEN` | 137 |
| `EIGHT_THOUSAND_FOUR_HUNDRED_AND_FIFTY_THREE` | 8453 |
@@ -1,12 +0,0 @@
# ChatCompletionFinishReason
## Values
| Name | Value |
| ---------------- | ---------------- |
| `TOOL_CALLS` | tool_calls |
| `STOP` | stop |
| `LENGTH` | length |
| `CONTENT_FILTER` | content_filter |
| `ERROR` | error |
-11
View File
@@ -1,11 +0,0 @@
# ChatErrorError
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `code` | [Nullable[components.Code]](../components/code.md) | :heavy_check_mark: | N/A |
| `message` | *str* | :heavy_check_mark: | N/A |
| `param` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-34
View File
@@ -1,34 +0,0 @@
# ChatGenerationParams
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider` | [OptionalNullable[components.ChatGenerationParamsProvider]](../components/chatgenerationparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. |
| `plugins` | List[[components.ChatGenerationParamsPluginUnion](../components/chatgenerationparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. |
| `route` | [OptionalNullable[components.Route]](../components/route.md) | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. |
| `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | N/A |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `reasoning` | [Optional[components.Reasoning]](../components/reasoning.md) | :heavy_minus_sign: | N/A |
| `response_format` | [Optional[components.ChatGenerationParamsResponseFormatUnion]](../components/chatgenerationparamsresponseformatunion.md) | :heavy_minus_sign: | N/A |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `stop` | [OptionalNullable[components.ChatGenerationParamsStop]](../components/chatgenerationparamsstop.md) | :heavy_minus_sign: | N/A |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatGenerationParamsDataCollection
## Values
| Name | Value |
| ------- | ------- |
| `DENY` | deny |
| `ALLOW` | allow |
@@ -1,9 +0,0 @@
# ChatGenerationParamsEngine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
@@ -1,14 +0,0 @@
# ChatGenerationParamsMaxPrice
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `prompt` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `completion` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `image` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `audio` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `request` | *Optional[Any]* | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatGenerationParamsPdf
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `engine` | [Optional[components.ChatGenerationParamsPdfEngine]](../components/chatgenerationparamspdfengine.md) | :heavy_minus_sign: | N/A |
@@ -1,10 +0,0 @@
# ChatGenerationParamsPdfEngine
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
@@ -1,10 +0,0 @@
# ChatGenerationParamsPluginFileParser
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `id` | *Literal["file-parser"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `pdf` | [Optional[components.Pdf]](../components/pdf.md) | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatGenerationParamsPluginModeration
## Fields
| Field | Type | Required | Description |
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
| `id` | *Literal["moderation"]* | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatGenerationParamsPluginResponseHealing
## Fields
| Field | Type | Required | Description |
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
| `id` | *Literal["response-healing"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
@@ -1,29 +0,0 @@
# ChatGenerationParamsPluginUnion
## Supported Types
### `components.ChatGenerationParamsPluginModeration`
```python
value: components.ChatGenerationParamsPluginModeration = /* values here */
```
### `components.ChatGenerationParamsPluginWeb`
```python
value: components.ChatGenerationParamsPluginWeb = /* values here */
```
### `components.ChatGenerationParamsPluginFileParser`
```python
value: components.ChatGenerationParamsPluginFileParser = /* values here */
```
### `components.ChatGenerationParamsPluginResponseHealing`
```python
value: components.ChatGenerationParamsPluginResponseHealing = /* values here */
```
@@ -1,12 +0,0 @@
# ChatGenerationParamsPluginWeb
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `id` | *Literal["web"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `engine` | [Optional[components.Engine]](../components/engine.md) | :heavy_minus_sign: | N/A |
@@ -1,22 +0,0 @@
# ChatGenerationParamsProvider
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. |
| `data_collection` | [OptionalNullable[components.ChatGenerationParamsDataCollection]](../components/chatgenerationparamsdatacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. |
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `order` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. |
| `only` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. |
| `ignore` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. |
| `quantizations` | List[[components.Quantizations](../components/quantizations.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. |
| `sort` | [OptionalNullable[components.ProviderSortUnion]](../components/providersortunion.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. |
| `max_price` | [Optional[components.ChatGenerationParamsMaxPrice]](../components/chatgenerationparamsmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. |
| `preferred_min_throughput` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `preferred_max_latency` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `min_throughput` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_latency` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatGenerationParamsResponseFormatJSONObject
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `type` | *Literal["json_object"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# ChatGenerationParamsResponseFormatPython
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `type` | *Literal["python"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# ChatGenerationParamsResponseFormatText
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
@@ -1,35 +0,0 @@
# ChatGenerationParamsResponseFormatUnion
## Supported Types
### `components.ChatGenerationParamsResponseFormatText`
```python
value: components.ChatGenerationParamsResponseFormatText = /* values here */
```
### `components.ChatGenerationParamsResponseFormatJSONObject`
```python
value: components.ChatGenerationParamsResponseFormatJSONObject = /* values here */
```
### `components.ResponseFormatJSONSchema`
```python
value: components.ResponseFormatJSONSchema = /* values here */
```
### `components.ResponseFormatTextGrammar`
```python
value: components.ResponseFormatTextGrammar = /* values here */
```
### `components.ChatGenerationParamsResponseFormatPython`
```python
value: components.ChatGenerationParamsResponseFormatPython = /* values here */
```
@@ -1,9 +0,0 @@
# ChatGenerationParamsRoute
## Values
| Name | Value |
| ---------- | ---------- |
| `FALLBACK` | fallback |
| `SORT` | sort |
@@ -1,12 +0,0 @@
# ChatGenerationTokenUsage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `completion_tokens` | *float* | :heavy_check_mark: | N/A |
| `prompt_tokens` | *float* | :heavy_check_mark: | N/A |
| `total_tokens` | *float* | :heavy_check_mark: | N/A |
| `completion_tokens_details` | [OptionalNullable[components.CompletionTokensDetails]](../components/completiontokensdetails.md) | :heavy_minus_sign: | N/A |
| `prompt_tokens_details` | [OptionalNullable[components.PromptTokensDetails]](../components/prompttokensdetails.md) | :heavy_minus_sign: | N/A |
-35
View File
@@ -1,35 +0,0 @@
# ChatMessageContentItem
## Supported Types
### `components.ChatMessageContentItemText`
```python
value: components.ChatMessageContentItemText = /* values here */
```
### `components.ChatMessageContentItemImage`
```python
value: components.ChatMessageContentItemImage = /* values here */
```
### `components.ChatMessageContentItemAudio`
```python
value: components.ChatMessageContentItemAudio = /* values here */
```
### `components.ChatMessageContentItemVideo`
```python
value: components.ChatMessageContentItemVideo = /* values here */
```
### `components.ChatMessageContentItemVideo`
```python
value: components.ChatMessageContentItemVideo = /* values here */
```
@@ -1,9 +0,0 @@
# ChatMessageContentItemAudio
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `type` | *Literal["input_audio"]* | :heavy_check_mark: | N/A |
| `input_audio` | [components.ChatMessageContentItemAudioInputAudio](../components/chatmessagecontentitemaudioinputaudio.md) | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemAudioInputAudio
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `data` | *str* | :heavy_check_mark: | N/A |
| `format_` | *str* | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemCacheControl
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `type` | *Literal["ephemeral"]* | :heavy_check_mark: | N/A |
| `ttl` | [Optional[components.TTL]](../components/ttl.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemImage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `type` | *Literal["image_url"]* | :heavy_check_mark: | N/A |
| `image_url` | [components.ImageURL](../components/imageurl.md) | :heavy_check_mark: | N/A |
@@ -1,10 +0,0 @@
# ChatMessageContentItemImageDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `LOW` | low |
| `HIGH` | high |
@@ -1,10 +0,0 @@
# ChatMessageContentItemText
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `cache_control` | [Optional[components.ChatMessageContentItemCacheControl]](../components/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | N/A |
@@ -1,17 +0,0 @@
# ChatMessageContentItemVideo
## Supported Types
### `components.ChatMessageContentItemVideoInputVideo`
```python
value: components.ChatMessageContentItemVideoInputVideo = /* values here */
```
### `components.ChatMessageContentItemVideoVideoURL`
```python
value: components.ChatMessageContentItemVideoVideoURL = /* values here */
```
@@ -1,9 +0,0 @@
# ChatMessageContentItemVideoInputVideo
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `type` | *Literal["input_video"]* | :heavy_check_mark: | N/A |
| `video_url` | [components.VideoURL1](../components/videourl1.md) | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemVideoVideoURL
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `type` | *Literal["video_url"]* | :heavy_check_mark: | N/A |
| `video_url` | [components.VideoURL2](../components/videourl2.md) | :heavy_check_mark: | N/A |
@@ -1,11 +0,0 @@
# ChatMessageTokenLogprob
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.TopLogprob](../components/toplogprob.md)] | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageTokenLogprobs
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `content` | List[[components.ChatMessageTokenLogprob](../components/chatmessagetokenlogprob.md)] | :heavy_check_mark: | N/A |
| `refusal` | List[[components.ChatMessageTokenLogprob](../components/chatmessagetokenlogprob.md)] | :heavy_check_mark: | N/A |
-10
View File
@@ -1,10 +0,0 @@
# ChatMessageToolCall
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | N/A |
| `type` | *Literal["function"]* | :heavy_check_mark: | N/A |
| `function` | [components.ChatMessageToolCallFunction](../components/chatmessagetoolcallfunction.md) | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageToolCallFunction
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `name` | *str* | :heavy_check_mark: | N/A |
| `arguments` | *str* | :heavy_check_mark: | N/A |
-14
View File
@@ -1,14 +0,0 @@
# ChatResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `id` | *str* | :heavy_check_mark: | N/A |
| `choices` | List[[components.ChatResponseChoice](../components/chatresponsechoice.md)] | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `object` | *Literal["chat.completion"]* | :heavy_check_mark: | N/A |
| `system_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `usage` | [Optional[components.ChatGenerationTokenUsage]](../components/chatgenerationtokenusage.md) | :heavy_minus_sign: | N/A |
-12
View File
@@ -1,12 +0,0 @@
# ChatResponseChoice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `finish_reason` | [Nullable[components.ChatCompletionFinishReason]](../components/chatcompletionfinishreason.md) | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `message` | [components.AssistantMessage](../components/assistantmessage.md) | :heavy_check_mark: | N/A |
| `reasoning_details` | List[[components.Schema3](../components/schema3.md)] | :heavy_minus_sign: | N/A |
| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | N/A |
-11
View File
@@ -1,11 +0,0 @@
# ChatStreamingChoice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `delta` | [components.ChatStreamingMessageChunk](../components/chatstreamingmessagechunk.md) | :heavy_check_mark: | N/A |
| `finish_reason` | [Nullable[components.ChatCompletionFinishReason]](../components/chatcompletionfinishreason.md) | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | N/A |
@@ -1,13 +0,0 @@
# ChatStreamingMessageChunk
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `role` | [Optional[components.ChatStreamingMessageChunkRole]](../components/chatstreamingmessagechunkrole.md) | :heavy_minus_sign: | N/A |
| `content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `reasoning_details` | List[[components.Schema3](../components/schema3.md)] | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatStreamingMessageChunkRole
## Values
| Name | Value |
| ----------- | ----------- |
| `ASSISTANT` | assistant |
@@ -1,11 +0,0 @@
# ChatStreamingMessageToolCall
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `index` | *float* | :heavy_check_mark: | N/A |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `type` | *Optional[Literal["function"]]* | :heavy_minus_sign: | N/A |
| `function` | [Optional[components.ChatStreamingMessageToolCallFunction]](../components/chatstreamingmessagetoolcallfunction.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatStreamingMessageToolCallFunction
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `arguments` | *Optional[str]* | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatStreamingResponseChunk
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `data` | [components.ChatStreamingResponseChunkData](../components/chatstreamingresponsechunkdata.md) | :heavy_check_mark: | N/A |
@@ -1,15 +0,0 @@
# ChatStreamingResponseChunkData
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | N/A |
| `choices` | List[[components.ChatStreamingChoice](../components/chatstreamingchoice.md)] | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `object` | *Literal["chat.completion.chunk"]* | :heavy_check_mark: | N/A |
| `system_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `error` | [Optional[components.ChatStreamingResponseChunkError]](../components/chatstreamingresponsechunkerror.md) | :heavy_minus_sign: | N/A |
| `usage` | [Optional[components.ChatGenerationTokenUsage]](../components/chatgenerationtokenusage.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatStreamingResponseChunkError
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `message` | *str* | :heavy_check_mark: | N/A |
| `code` | *float* | :heavy_check_mark: | N/A |
+5 -3
View File
@@ -1,8 +1,10 @@
# ChatStreamOptions # ChatStreamOptions
Streaming configuration options
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `include_usage` | *Optional[bool]* | :heavy_minus_sign: | N/A | | ~~`include_usage`~~ | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>Deprecated: This field has no effect. Full usage details are always included. | true |
+21 -13
View File
@@ -1,17 +1,25 @@
# Code # Code
## Supported Types ## Values
### `str`
```python
value: str = /* values here */
```
### `float`
```python
value: float = /* values here */
```
| Name | Value |
| -------------------------------- | -------------------------------- |
| `SERVER_ERROR` | server_error |
| `RATE_LIMIT_EXCEEDED` | rate_limit_exceeded |
| `INVALID_PROMPT` | invalid_prompt |
| `VECTOR_STORE_TIMEOUT` | vector_store_timeout |
| `INVALID_IMAGE` | invalid_image |
| `INVALID_IMAGE_FORMAT` | invalid_image_format |
| `INVALID_BASE64_IMAGE` | invalid_base64_image |
| `INVALID_IMAGE_URL` | invalid_image_url |
| `IMAGE_TOO_LARGE` | image_too_large |
| `IMAGE_TOO_SMALL` | image_too_small |
| `IMAGE_PARSE_ERROR` | image_parse_error |
| `IMAGE_CONTENT_POLICY_VIOLATION` | image_content_policy_violation |
| `INVALID_IMAGE_MODE` | invalid_image_mode |
| `IMAGE_FILE_TOO_LARGE` | image_file_too_large |
| `UNSUPPORTED_IMAGE_MEDIA_TYPE` | unsupported_image_media_type |
| `EMPTY_IMAGE_FILE` | empty_image_file |
| `FAILED_TO_DOWNLOAD_IMAGE` | failed_to_download_image |
| `IMAGE_FILE_NOT_FOUND` | image_file_not_found |
-25
View File
@@ -1,25 +0,0 @@
# CodeEnum
## Values
| Name | Value |
| -------------------------------- | -------------------------------- |
| `SERVER_ERROR` | server_error |
| `RATE_LIMIT_EXCEEDED` | rate_limit_exceeded |
| `INVALID_PROMPT` | invalid_prompt |
| `VECTOR_STORE_TIMEOUT` | vector_store_timeout |
| `INVALID_IMAGE` | invalid_image |
| `INVALID_IMAGE_FORMAT` | invalid_image_format |
| `INVALID_BASE64_IMAGE` | invalid_base64_image |
| `INVALID_IMAGE_URL` | invalid_image_url |
| `IMAGE_TOO_LARGE` | image_too_large |
| `IMAGE_TOO_SMALL` | image_too_small |
| `IMAGE_PARSE_ERROR` | image_parse_error |
| `IMAGE_CONTENT_POLICY_VIOLATION` | image_content_policy_violation |
| `INVALID_IMAGE_MODE` | invalid_image_mode |
| `IMAGE_FILE_TOO_LARGE` | image_file_too_large |
| `UNSUPPORTED_IMAGE_MEDIA_TYPE` | unsupported_image_media_type |
| `EMPTY_IMAGE_FILE` | empty_image_file |
| `FAILED_TO_DOWNLOAD_IMAGE` | failed_to_download_image |
| `IMAGE_FILE_NOT_FOUND` | image_file_not_found |
-13
View File
@@ -1,13 +0,0 @@
# CompletionChoice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `text` | *str* | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `logprobs` | [Nullable[components.CompletionLogprobs]](../components/completionlogprobs.md) | :heavy_check_mark: | N/A |
| `finish_reason` | [Nullable[components.CompletionFinishReason]](../components/completionfinishreason.md) | :heavy_check_mark: | N/A |
| `native_finish_reason` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-28
View File
@@ -1,28 +0,0 @@
# CompletionCreateParams
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
| `prompt` | [components.Prompt](../components/prompt.md) | :heavy_check_mark: | N/A |
| `best_of` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `echo` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
| `logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `stop` | [OptionalNullable[components.CompletionCreateParamsStop]](../components/completioncreateparamsstop.md) | :heavy_minus_sign: | N/A |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.StreamOptions]](../components/streamoptions.md) | :heavy_minus_sign: | N/A |
| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
| `response_format` | [OptionalNullable[components.CompletionCreateParamsResponseFormatUnion]](../components/completioncreateparamsresponseformatunion.md) | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatJSONObject
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `type` | *Literal["json_object"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatPython
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `type` | *Literal["python"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatText
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
@@ -1,35 +0,0 @@
# CompletionCreateParamsResponseFormatUnion
## Supported Types
### `components.CompletionCreateParamsResponseFormatText`
```python
value: components.CompletionCreateParamsResponseFormatText = /* values here */
```
### `components.CompletionCreateParamsResponseFormatJSONObject`
```python
value: components.CompletionCreateParamsResponseFormatJSONObject = /* values here */
```
### `components.ResponseFormatJSONSchema`
```python
value: components.ResponseFormatJSONSchema = /* values here */
```
### `components.ResponseFormatTextGrammar`
```python
value: components.ResponseFormatTextGrammar = /* values here */
```
### `components.CompletionCreateParamsResponseFormatPython`
```python
value: components.CompletionCreateParamsResponseFormatPython = /* values here */
```
@@ -1,17 +0,0 @@
# CompletionCreateParamsStop
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[str]`
```python
value: List[str] = /* values here */
```
-10
View File
@@ -1,10 +0,0 @@
# CompletionFinishReason
## Values
| Name | Value |
| ---------------- | ---------------- |
| `STOP` | stop |
| `LENGTH` | length |
| `CONTENT_FILTER` | content_filter |
-11
View File
@@ -1,11 +0,0 @@
# CompletionLogprobs
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `tokens` | List[*str*] | :heavy_check_mark: | N/A |
| `token_logprobs` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[Dict[str, *float*]] | :heavy_check_mark: | N/A |
| `text_offset` | List[*float*] | :heavy_check_mark: | N/A |
-15
View File
@@ -1,15 +0,0 @@
# CompletionResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `id` | *str* | :heavy_check_mark: | N/A |
| `object` | *Literal["text_completion"]* | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `provider` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `system_fingerprint` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `choices` | List[[components.CompletionChoice](../components/completionchoice.md)] | :heavy_check_mark: | N/A |
| `usage` | [Optional[components.CompletionUsage]](../components/completionusage.md) | :heavy_minus_sign: | N/A |
@@ -1,11 +0,0 @@
# CompletionTokensDetails
## Fields
| Field | Type | Required | Description |
| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
| `reasoning_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `audio_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `accepted_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `rejected_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
-10
View File
@@ -1,10 +0,0 @@
# CompletionUsage
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `prompt_tokens` | *float* | :heavy_check_mark: | N/A |
| `completion_tokens` | *float* | :heavy_check_mark: | N/A |
| `total_tokens` | *float* | :heavy_check_mark: | N/A |
+5 -3
View File
@@ -1,10 +1,12 @@
# CostDetails # CostDetails
Breakdown of upstream inference costs
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| `upstream_inference_completions_cost` | *float* | :heavy_check_mark: | N/A |
| `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `upstream_inference_input_cost` | *float* | :heavy_check_mark: | N/A | | `upstream_inference_prompt_cost` | *float* | :heavy_check_mark: | N/A |
| `upstream_inference_output_cost` | *float* | :heavy_check_mark: | N/A |
-12
View File
@@ -1,12 +0,0 @@
# CreateChargeRequest
Create a Coinbase charge for crypto payment
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| `amount` | *float* | :heavy_check_mark: | N/A |
| `sender` | *str* | :heavy_check_mark: | N/A |
| `chain_id` | [components.ChainID](../components/chainid.md) | :heavy_check_mark: | N/A |
-8
View File
@@ -1,8 +0,0 @@
# Debug
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `echo_upstream_body` | *Optional[bool]* | :heavy_minus_sign: | N/A |
+5 -2
View File
@@ -7,6 +7,9 @@ Default parameters for this model
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- | | ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
-13
View File
@@ -1,13 +0,0 @@
# Effort
## Values
| Name | Value |
| --------- | --------- |
| `XHIGH` | xhigh |
| `HIGH` | high |
| `MEDIUM` | medium |
| `LOW` | low |
| `MINIMAL` | minimal |
| `NONE` | none |
-9
View File
@@ -1,9 +0,0 @@
# Engine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
+2 -2
View File
@@ -5,7 +5,7 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| `type` | [components.FileCitationType](../components/filecitationtype.md) | :heavy_check_mark: | N/A |
| `file_id` | *str* | :heavy_check_mark: | N/A | | `file_id` | *str* | :heavy_check_mark: | N/A |
| `filename` | *str* | :heavy_check_mark: | N/A | | `filename` | *str* | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A | | `index` | *int* | :heavy_check_mark: | N/A |
| `type` | [components.FileCitationType](../components/filecitationtype.md) | :heavy_check_mark: | N/A |
+2 -2
View File
@@ -5,6 +5,6 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `type` | [components.FilePathType](../components/filepathtype.md) | :heavy_check_mark: | N/A |
| `file_id` | *str* | :heavy_check_mark: | N/A | | `file_id` | *str* | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A | | `index` | *int* | :heavy_check_mark: | N/A |
| `type` | [components.FilePathType](../components/filepathtype.md) | :heavy_check_mark: | N/A |
-8
View File
@@ -1,8 +0,0 @@
# IDFileParser
## Values
| Name | Value |
| ------------- | ------------- |
| `FILE_PARSER` | file-parser |
-8
View File
@@ -1,8 +0,0 @@
# IDModeration
## Values
| Name | Value |
| ------------ | ------------ |
| `MODERATION` | moderation |
-8
View File
@@ -1,8 +0,0 @@
# IDResponseHealing
## Values
| Name | Value |
| ------------------ | ------------------ |
| `RESPONSE_HEALING` | response-healing |
-8
View File
@@ -1,8 +0,0 @@
# IDWeb
## Values
| Name | Value |
| ----- | ----- |
| `WEB` | web |
-17
View File
@@ -1,17 +0,0 @@
# Ignore
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
-9
View File
@@ -1,9 +0,0 @@
# ImageURL
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `url` | *str* | :heavy_check_mark: | N/A |
| `detail` | [Optional[components.ChatMessageContentItemImageDetail]](../components/chatmessagecontentitemimagedetail.md) | :heavy_minus_sign: | N/A |
+1 -1
View File
@@ -5,4 +5,4 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ | | ------------------ | ------------------ | ------------------ | ------------------ |
| `cached_tokens` | *float* | :heavy_check_mark: | N/A | | `cached_tokens` | *int* | :heavy_check_mark: | N/A |

Some files were not shown because too many files have changed in this diff Show More