Compare commits

..
Author SHA1 Message Date
wassname (Michael J Clark)andGitHub 47ba6304b3 Merge branch 'main' into fix/chat-transient-retries 2026-07-15 06:26:08 +08:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
8b505afe3d chore: 🐝 Update SDK - Generate (spec change merged) 0.11.33 (#454)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-14 22:11:55 +00:00
9408179f89 chore: update OpenAPI spec from monorepo (#453)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-14 22:06:27 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
a3d8d7084d chore: 🐝 Update SDK - Generate (spec change merged) 0.11.32 (#452)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-14 21:31:07 +00:00
f07b760c24 chore: update OpenAPI spec from monorepo (#451)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-14 21:25:00 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
06daeeb11f chore: 🐝 Update SDK - Generate (spec change merged) 0.11.31 (#450)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-14 21:08:12 +00:00
869165cefe chore: update OpenAPI spec from monorepo (#449)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-14 21:02:39 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
4d4ff3efdd chore: 🐝 Update SDK - Generate (spec change merged) 0.11.30 (#448)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-14 17:53:19 +00:00
a4f0294713 chore: update OpenAPI spec from monorepo (#447)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-14 17:47:53 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2a65de50d3 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.29 (#446)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-14 14:53:50 +00:00
44313b0aa3 chore: update OpenAPI spec from monorepo (#445)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-14 14:48:06 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
52ad7dde44 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.28 (#444)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-14 05:39:15 +00:00
7d438092bb chore: update OpenAPI spec from monorepo (#443)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-14 05:33:48 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
94d68f3b3c chore: 🐝 Update SDK - Generate (spec change merged) 0.11.27 (#442)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-13 20:47:04 +00:00
34860d82a2 chore: update OpenAPI spec from monorepo (#441)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-13 20:41:14 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
f24188c135 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.26 (#440)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-13 19:31:52 +00:00
8016b15284 chore: update OpenAPI spec from monorepo (#439)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-13 19:26:12 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
4d598caab2 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.25 (#438)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-13 19:22:44 +00:00
68b867f65c chore: update OpenAPI spec from monorepo (#437)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-13 19:17:05 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
7010ca5c2e chore: 🐝 Update SDK - Generate (spec change merged) 0.11.24 (#436)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-13 17:59:18 +00:00
cb1b9c5ac6 chore: update OpenAPI spec from monorepo (#435)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-13 17:53:31 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
30053d89b3 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.23 (#434)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-12 16:41:12 +00:00
0a85698350 chore: update OpenAPI spec from monorepo (#433)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-12 16:35:38 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
219a0b863e chore: 🐝 Update SDK - Generate (spec change merged) 0.11.22 (#432)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-11 03:23:16 +00:00
b78df646e1 chore: update OpenAPI spec from monorepo (#431)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-11 03:18:00 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
268945a4e9 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.21 (#430)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-10 23:06:04 +00:00
dcad3a2436 chore: update OpenAPI spec from monorepo (#429)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-10 23:00:15 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
02a24c5cae chore: 🐝 Update SDK - Generate (spec change merged) 0.11.20 (#428)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-10 20:19:22 +00:00
64ad023f72 chore: update OpenAPI spec from monorepo (#427)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-10 20:13:35 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
8d8b3557fd chore: 🐝 Update SDK - Generate (spec change merged) 0.11.19 (#426)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-10 15:45:53 +00:00
83c16a17c6 chore: update OpenAPI spec from monorepo (#425)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-10 15:40:13 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
d78ff13303 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.18 (#424)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-10 01:23:02 +00:00
0ade477fcc chore: update OpenAPI spec from monorepo (#423)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-10 01:17:33 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
4a9b45c2a0 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.17 (#422)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-09 21:39:01 +00:00
e62415b7ce chore: update OpenAPI spec from monorepo (#421)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-09 21:33:33 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
dfebb7ca0d chore: 🐝 Update SDK - Generate (spec change merged) 0.11.16 (#420)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-09 19:53:03 +00:00
52b53dd35a chore: update OpenAPI spec from monorepo (#419)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-09 19:47:13 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
3f1ab05c95 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.15 (#418)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-09 18:20:26 +00:00
a2e9c97855 chore: update OpenAPI spec from monorepo (#417)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-09 18:13:45 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
1281ae62da chore: 🐝 Update SDK - Generate (spec change merged) 0.11.14 (#416)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-09 17:32:51 +00:00
c382f8fbc0 chore: update OpenAPI spec from monorepo (#415)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-09 17:27:10 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
9b7ee68d76 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.13 (#414)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-09 17:15:52 +00:00
c9d39da708 chore: update OpenAPI spec from monorepo (#413)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-09 17:11:09 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
75678a07aa chore: 🐝 Update SDK - Generate (spec change merged) 0.11.12 (#412)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-09 10:18:20 +00:00
8ba375943d chore: update OpenAPI spec from monorepo (#411)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-09 10:07:32 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
164490028b chore: 🐝 Update SDK - Generate (spec change merged) 0.11.11 (#410)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-08 19:10:58 +00:00
1da6f0d903 chore: update OpenAPI spec from monorepo (#409)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-08 19:06:06 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
05e372cf53 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.10 (#408)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-08 09:35:25 +00:00
2ef07629e5 chore: update OpenAPI spec from monorepo (#407)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-08 09:29:44 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
00d71ec70e chore: 🐝 Update SDK - Generate (spec change merged) 0.11.9 (#406)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-08 07:05:03 +00:00
abaad35c7e chore: update OpenAPI spec from monorepo (#405)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-08 06:59:19 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
0caf5600ff chore: 🐝 Update SDK - Generate (spec change merged) 0.11.8 (#404)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-08 03:33:32 +00:00
21d6a47830 chore: update OpenAPI spec from monorepo (#403)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-08 03:27:39 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
d81cd563db chore: 🐝 Update SDK - Generate (spec change merged) 0.11.7 (#402)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-07 21:50:31 +00:00
2c673c0ca3 chore: update OpenAPI spec from monorepo (#401)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-07 21:45:13 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
d18d840c52 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.6 (#400)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-07 19:13:32 +00:00
9ac997d8b8 chore: update OpenAPI spec from monorepo (#399)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-07 19:07:39 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
738aed60ad chore: 🐝 Update SDK - Generate (spec change merged) 0.11.5 (#398)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-07 17:29:09 +00:00
6f0aa8516e chore: update OpenAPI spec from monorepo (#397)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-07 17:23:15 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
1e88de8988 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.4 (#396)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-07 14:35:05 +00:00
34403bd422 chore: update OpenAPI spec from monorepo (#395)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-07 14:29:07 +00:00
60589be74b chore: update OpenAPI spec from monorepo (#394)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-06 17:01:32 +00:00
404b1fe790 chore: update OpenAPI spec from monorepo (#393)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-06 15:21:05 +00:00
wassnameandClaudypoo 4e39d32cbb Add the retry overlay file and register it in workflow.yaml
Completes the prior commit: 408/429 join 5XX via x-speakeasy-retries overlay.
Verified offline with `speakeasy overlay apply`: statusCodes -> [5XX, 408, 429].

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
2026-07-05 09:16:26 +08:00
wassnameandClaudypoo 31e1fbac0c Retry 408/429 via x-speakeasy-retries overlay instead of editing generated code
Reverts the hand-edits to the generated utils/retries.py, its .genignore entry, and
the test. Adds an overlay so 408/429 join 5XX in the retry config, regenerating cleanly
per CONTRIBUTING (generated code is not edited directly). Verified with
`speakeasy overlay apply`: statusCodes -> [5XX, 408, 429].

The 400-with-transient-inner-error.code case is not portable to the SDK (status-only
retry config, hooks run outside the retry loop) and is handled client-side instead.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
2026-07-05 09:14:18 +08:00
wassname d159a17d88 Merge remote-tracking branch 'upstream/main' into fix/chat-transient-retries
# Conflicts:
#	.genignore
#	src/openrouter/utils/retries.py
2026-07-05 08:50:09 +08:00
wassnameandClaudypoo 12ce0d4304 Genignore utils/retries.py so speakeasy generate keeps the retry changes
The retry response classification (408/429/5XX + transient inner error.code
on 400s) has no overlay or hook surface in Speakeasy, so retries.py must be
hand-maintained. It is tracked in gen.lock, so without a genignore entry the
next `speakeasy generate` overwrites this PR's changes. pylintrc is already
genignored the same way as precedent.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
2026-07-05 08:32:17 +08:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
22803a327e chore: 🐝 Update SDK - Generate (spec change merged) 0.11.3 (#390)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-03 19:58:30 +00:00
d62640c385 chore: update OpenAPI spec from monorepo (#389)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-03 19:52:47 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
c2ae7dfde4 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.2 (#388)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-03 15:09:37 +00:00
f6c5471023 chore: update OpenAPI spec from monorepo (#387)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-03 15:03:57 +00:00
Matt AppersonandGitHub ebd01743bc docs: use flat navigation.pages for multi-repo sourceRef (#386) 2026-07-01 20:25:35 -04:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
28299a788d chore: 🐝 Update SDK - Generate (spec change merged) 0.11.1 (#385)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-01 16:17:40 +00:00
3e57a57bc0 chore: update OpenAPI spec from monorepo (#384)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-01 16:11:46 +00:00
Matt AppersonandGitHub 87f0aa3a9b docs: auto-generate API Reference nav from Speakeasy service pages (#383) 2026-07-01 10:59:43 -04:00
Matt AppersonandGitHub babeffc9aa docs: Mintlify MDX docs + docs.json; bump Speakeasy to 1.787.0 (#382) 2026-06-30 16:13:28 -04:00
ef31bc8283 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-30 15:03:08 +08:00
wassname bae00aae15 Retry transient OpenRouter errors 2026-06-30 14:56:07 +08:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
778e2e36fb chore: 🐝 Update SDK - Generate (spec change merged) 0.10.8 (#380)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-28 15:31:38 +00:00
14f262fa66 chore: update OpenAPI spec from monorepo (#379)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-28 15:25:57 +00:00
2230 changed files with 63548 additions and 18550 deletions
+3 -1
View File
@@ -1 +1,3 @@
pylintrc
pylintrc
docs/docs.json
docs/overview.mdx
+32
View File
@@ -0,0 +1,32 @@
name: Docs navigation
permissions:
contents: write
pull-requests: write
on:
workflow_dispatch:
pull_request:
paths:
- "docs/sdks/**"
- "scripts/gen-docs-nav.sh"
- ".github/workflows/docs-nav.yaml"
jobs:
gen-docs-nav:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
# jq is preinstalled on GitHub-hosted ubuntu runners.
- name: Regenerate docs navigation
run: scripts/gen-docs-nav.sh
- name: Auto-commit docs.json navigation
uses: int128/update-generated-files-action@v2
with:
commit-message: "Chore: regenerate docs navigation"
-1
View File
@@ -16,7 +16,6 @@ __pycache__/
# Speakeasy generation artifacts (generated in OSS repo, not here)
.speakeasy/*.lock
.speakeasy/*.openapi.yaml
/docs
# Environment
.env
.env.local
+7754 -7173
View File
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -16,6 +16,8 @@ generation:
requestResponseComponentNamesFeb2024: true
securityFeb2025: true
sharedErrorComponentsApr2025: true
sharedNestedComponentsJan2026: false
nameOverrideFeb2026: false
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true
@@ -25,14 +27,16 @@ generation:
schemas:
allOfMergeStrategy: shallowMerge
requestBodyFieldName: ""
versioningStrategy: automatic
persistentEdits: {}
tests:
generateTests: false
generateNewTests: true
skipResponseBodyAssertions: false
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 0.10.7
version: 0.11.33
additionalDependencies:
dev: {}
main: {}
@@ -46,6 +50,7 @@ python:
authors:
- OpenRouter
baseErrorName: OpenRouterError
bodyVariantOverloads: false
clientServerStatusCodesAsErrors: true
constFieldCasing: upper
defaultErrorName: OpenRouterDefaultError
@@ -53,12 +58,18 @@ python:
enableCustomCodeRegions: false
enumFormat: union
envVarPrefix: OPENROUTER
errorSchemaValidation: true
eventStreamClassNames:
async: EventStreamAsync
sync: EventStream
fixFlags:
asyncPaginationSep2025: true
conflictResistantModelImportsFeb2026: false
responseRequiredSep2024: true
flattenGlobalSecurity: true
flattenRequests: true
flatteningOrder: parameters-first
forwardCompatibleEnumsByDefault: false
forwardCompatibleUnionsByDefault: tagged-only
imports:
option: openapi
@@ -71,18 +82,25 @@ python:
inferSSEOverload: true
inferUnionDiscriminators: true
inputModelSuffix: input
inputTypedDictSuffix: TypedDict
legacyPyright: false
license: Apache-2.0
maxMethodParams: 999
methodArguments: infer-optional-args
methodTimeoutArgument: timeout-ms
methodTimeoutUnits: milliseconds
moduleName: ""
multipartArrayFormat: legacy
optionalDependencies: {}
outputModelSuffix: output
packageManager: uv
packageName: openrouter
preApplyUnionDiscriminators: false
pytestFilterWarnings: []
pytestTimeout: 0
rawResponseHelpers: false
responseFormat: flat
responseSchemaValidation: true
sseFlatResponse: true
templateVersion: v2
useAsyncHooks: false
+1863 -208
View File
File diff suppressed because it is too large Load Diff
+1781 -190
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,11 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Retry request-timeout and rate-limit responses
version: 0.0.0
actions:
- target: $["x-speakeasy-retries"].statusCodes
description: Also retry 408 (request timeout) and 429 (rate limit), not just 5XX
update:
- "408"
- "429"
+7 -8
View File
@@ -1,24 +1,23 @@
speakeasyVersion: 1.680.0
speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:c668cc885c117987e3c561af619ec3ad21dbb47bffdc491f06d93b8af0c122d3
sourceBlobDigest: sha256:da0dd6040f1f11463b596a1425a6ed5c6f86b5b5e3de2b761cb426f3dcc1660c
sourceRevisionDigest: sha256:1b18bfafe3a31635470908ce53c1bb12af21a82d371f6f979bb5e8463f52afb3
sourceBlobDigest: sha256:506597a9fce25fe757037a95da952e36f33dd702afa16c13d43c2df2d5da1ece
tags:
- latest
- speakeasy-sdk-regen-1782517441
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:c668cc885c117987e3c561af619ec3ad21dbb47bffdc491f06d93b8af0c122d3
sourceBlobDigest: sha256:da0dd6040f1f11463b596a1425a6ed5c6f86b5b5e3de2b761cb426f3dcc1660c
sourceRevisionDigest: sha256:1b18bfafe3a31635470908ce53c1bb12af21a82d371f6f979bb5e8463f52afb3
sourceBlobDigest: sha256:506597a9fce25fe757037a95da952e36f33dd702afa16c13d43c2df2d5da1ece
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:163ae66544ac5b5162821baae4129dd200441bac24bdacca44316db38a9b178f
codeSamplesRevisionDigest: sha256:7ae639df01271894474a52b709810943afd11f8d9acde069336e9a1f8588ec56
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.680.0
speakeasyVersion: 1.787.0
sources:
OpenRouter API:
inputs:
+2 -1
View File
@@ -1,5 +1,5 @@
workflowVersion: 1.0.0
speakeasyVersion: 1.680.0
speakeasyVersion: 1.787.0
sources:
OpenRouter API:
inputs:
@@ -11,6 +11,7 @@ sources:
- location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
- location: .speakeasy/overlays/retry-transient-status-codes.overlay.yaml
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
+4 -4
View File
@@ -55,7 +55,7 @@ It's also possible to write a standalone Python script without needing to set up
```python
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.9"
# requires-python = ">=3.10"
# dependencies = [
# "openrouter",
# ]
@@ -189,7 +189,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.byok.list()
res = open_router.byok.list(offset=0, limit=50)
while res is not None:
# Handle items
@@ -221,10 +221,10 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.files.upload(file={
res = open_router.stt.create_transcription_multipart(file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
}, model="openai/whisper-large-v3", language="en")
# Handle response
print(res)
+4 -4
View File
@@ -55,7 +55,7 @@ It's also possible to write a standalone Python script without needing to set up
```python
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.9"
# requires-python = ">=3.10"
# dependencies = [
# "openrouter",
# ]
@@ -189,7 +189,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.byok.list()
res = open_router.byok.list(offset=0, limit=50)
while res is not None:
# Handle items
@@ -221,10 +221,10 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.files.upload(file={
res = open_router.stt.create_transcription_multipart(file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
}, model="openai/whisper-large-v3", language="en")
# Handle response
print(res)
+341 -1
View File
@@ -98,4 +98,344 @@ Based on:
### Generated
- [python v0.10.7] .
### Releases
- [PyPI v0.10.7] https://pypi.org/project/openrouter/0.10.7 - .
- [PyPI v0.10.7] https://pypi.org/project/openrouter/0.10.7 - .
## 2026-06-28 15:27:21
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.8] .
### Releases
- [PyPI v0.10.8] https://pypi.org/project/openrouter/0.10.8 - .
## 2026-07-01 16:13:11
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.1] .
### Releases
- [PyPI v0.11.1] https://pypi.org/project/openrouter/0.11.1 - .
## 2026-07-03 15:05:16
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.2] .
### Releases
- [PyPI v0.11.2] https://pypi.org/project/openrouter/0.11.2 - .
## 2026-07-03 19:54:08
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.3] .
### Releases
- [PyPI v0.11.3] https://pypi.org/project/openrouter/0.11.3 - .
## 2026-07-07 14:30:37
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.4] .
### Releases
- [PyPI v0.11.4] https://pypi.org/project/openrouter/0.11.4 - .
## 2026-07-07 17:24:44
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.5] .
### Releases
- [PyPI v0.11.5] https://pypi.org/project/openrouter/0.11.5 - .
## 2026-07-07 19:09:09
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.6] .
### Releases
- [PyPI v0.11.6] https://pypi.org/project/openrouter/0.11.6 - .
## 2026-07-07 21:46:35
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.7] .
### Releases
- [PyPI v0.11.7] https://pypi.org/project/openrouter/0.11.7 - .
## 2026-07-08 03:29:04
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.8] .
### Releases
- [PyPI v0.11.8] https://pypi.org/project/openrouter/0.11.8 - .
## 2026-07-08 07:00:39
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.9] .
### Releases
- [PyPI v0.11.9] https://pypi.org/project/openrouter/0.11.9 - .
## 2026-07-08 09:31:18
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.10] .
### Releases
- [PyPI v0.11.10] https://pypi.org/project/openrouter/0.11.10 - .
## 2026-07-08 19:07:22
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.11] .
### Releases
- [PyPI v0.11.11] https://pypi.org/project/openrouter/0.11.11 - .
## 2026-07-09 10:13:53
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.12] .
### Releases
- [PyPI v0.11.12] https://pypi.org/project/openrouter/0.11.12 - .
## 2026-07-09 17:12:18
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.13] .
### Releases
- [PyPI v0.11.13] https://pypi.org/project/openrouter/0.11.13 - .
## 2026-07-09 17:28:34
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.14] .
### Releases
- [PyPI v0.11.14] https://pypi.org/project/openrouter/0.11.14 - .
## 2026-07-09 18:16:05
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.15] .
### Releases
- [PyPI v0.11.15] https://pypi.org/project/openrouter/0.11.15 - .
## 2026-07-09 19:48:43
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.16] .
### Releases
- [PyPI v0.11.16] https://pypi.org/project/openrouter/0.11.16 - .
## 2026-07-09 21:34:56
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.17] .
### Releases
- [PyPI v0.11.17] https://pypi.org/project/openrouter/0.11.17 - .
## 2026-07-10 01:18:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.18] .
### Releases
- [PyPI v0.11.18] https://pypi.org/project/openrouter/0.11.18 - .
## 2026-07-10 15:41:48
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.19] .
### Releases
- [PyPI v0.11.19] https://pypi.org/project/openrouter/0.11.19 - .
## 2026-07-10 20:14:59
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.20] .
### Releases
- [PyPI v0.11.20] https://pypi.org/project/openrouter/0.11.20 - .
## 2026-07-10 23:01:43
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.21] .
### Releases
- [PyPI v0.11.21] https://pypi.org/project/openrouter/0.11.21 - .
## 2026-07-11 03:19:26
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.22] .
### Releases
- [PyPI v0.11.22] https://pypi.org/project/openrouter/0.11.22 - .
## 2026-07-12 16:36:57
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.23] .
### Releases
- [PyPI v0.11.23] https://pypi.org/project/openrouter/0.11.23 - .
## 2026-07-13 17:54:57
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.24] .
### Releases
- [PyPI v0.11.24] https://pypi.org/project/openrouter/0.11.24 - .
## 2026-07-13 19:18:28
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.25] .
### Releases
- [PyPI v0.11.25] https://pypi.org/project/openrouter/0.11.25 - .
## 2026-07-13 19:27:34
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.26] .
### Releases
- [PyPI v0.11.26] https://pypi.org/project/openrouter/0.11.26 - .
## 2026-07-13 20:42:45
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.27] .
### Releases
- [PyPI v0.11.27] https://pypi.org/project/openrouter/0.11.27 - .
## 2026-07-14 05:35:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.28] .
### Releases
- [PyPI v0.11.28] https://pypi.org/project/openrouter/0.11.28 - .
## 2026-07-14 14:49:30
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.29] .
### Releases
- [PyPI v0.11.29] https://pypi.org/project/openrouter/0.11.29 - .
## 2026-07-14 17:49:24
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.30] .
### Releases
- [PyPI v0.11.30] https://pypi.org/project/openrouter/0.11.30 - .
## 2026-07-14 21:03:59
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.31] .
### Releases
- [PyPI v0.11.31] https://pypi.org/project/openrouter/0.11.31 - .
## 2026-07-14 21:26:36
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.32] .
### Releases
- [PyPI v0.11.32] https://pypi.org/project/openrouter/0.11.32 - .
## 2026-07-14 22:07:41
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.33] .
### Releases
- [PyPI v0.11.33] https://pypi.org/project/openrouter/0.11.33 - .
+14
View File
@@ -0,0 +1,14 @@
---
title: "AABenchmarkEntry"
---
Artificial Analysis benchmark index scores.
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| `agentic_index` | *Nullable[float]* | :heavy_check_mark: | Artificial Analysis Agentic Index score | 55.8 |
| `coding_index` | *Nullable[float]* | :heavy_check_mark: | Artificial Analysis Coding Index score | 63.2 |
| `intelligence_index` | *Nullable[float]* | :heavy_check_mark: | Artificial Analysis Intelligence Index score | 71.4 |
+24
View File
@@ -0,0 +1,24 @@
---
title: "Action"
---
## Supported Types
### `components.OutputWebSearchCallItemActionSearch`
```python
value: components.OutputWebSearchCallItemActionSearch = /* values here */
```
### `components.ActionOpenPage`
```python
value: components.ActionOpenPage = /* values here */
```
### `components.ActionFindInPage`
```python
value: components.ActionFindInPage = /* values here */
```
+21
View File
@@ -0,0 +1,21 @@
---
title: "ActionEnum"
---
## Example Usage
```python
from openrouter.components import ActionEnum
# Open enum: unrecognized values are captured as UnrecognizedStr
value: ActionEnum = "read"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"read"`
- `"write"`
- `"delete"`
+11
View File
@@ -0,0 +1,11 @@
---
title: "ActionFindInPage"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `pattern` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.TypeFindInPage](../components/typefindinpage.mdx) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
+10
View File
@@ -0,0 +1,10 @@
---
title: "ActionOpenPage"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `type` | [components.TypeOpenPage](../components/typeopenpage.mdx) | :heavy_check_mark: | N/A |
| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
+15
View File
@@ -0,0 +1,15 @@
---
title: "ActionTypeSearch"
---
## Example Usage
```python
from openrouter.components import ActionTypeSearch
value: ActionTypeSearch = "search"
```
## Values
- `"search"`
@@ -1,5 +1,6 @@
# ActivityItem
---
title: "ActivityItem"
---
## Fields
+9
View File
@@ -0,0 +1,9 @@
---
title: "ActivityResponse"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `data` | List[[components.ActivityItem](../components/activityitem.mdx)] | :heavy_check_mark: | List of activity items |
+15
View File
@@ -0,0 +1,15 @@
---
title: "AdditionalToolsItem"
---
Additional tools made available to the model at this point in the input
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `role` | [components.AdditionalToolsItemRole](../components/additionaltoolsitemrole.mdx) | :heavy_check_mark: | N/A |
| `tools` | List[[components.AdditionalToolsItemToolUnion](../components/additionaltoolsitemtoolunion.mdx)] | :heavy_check_mark: | N/A |
| `type` | [components.TypeAdditionalTools](../components/typeadditionaltools.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,26 @@
---
title: "AdditionalToolsItemRole"
---
## Example Usage
```python
from openrouter.components import AdditionalToolsItemRole
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AdditionalToolsItemRole = "unknown"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"unknown"`
- `"user"`
- `"assistant"`
- `"system"`
- `"critic"`
- `"discriminator"`
- `"developer"`
- `"tool"`
@@ -0,0 +1,10 @@
---
title: "AdditionalToolsItemTool"
---
## Fields
| Field | Type | Required | Description |
| -------------------------- | -------------------------- | -------------------------- | -------------------------- |
| `type` | *str* | :heavy_check_mark: | N/A |
| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A |
@@ -0,0 +1,16 @@
---
title: "AdditionalToolsItemToolFunction"
---
Function tool definition
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `name` | *str* | :heavy_check_mark: | N/A |
| `parameters` | Dict[str, *Nullable[Any]*] | :heavy_check_mark: | N/A |
| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `type` | [components.AdditionalToolsItemTypeFunction](../components/additionaltoolsitemtypefunction.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,168 @@
---
title: "AdditionalToolsItemToolUnion"
---
## Supported Types
### `components.AdditionalToolsItemToolFunction`
```python
value: components.AdditionalToolsItemToolFunction = /* values here */
```
### `components.PreviewWebSearchServerTool`
```python
value: components.PreviewWebSearchServerTool = /* values here */
```
### `components.Preview20250311WebSearchServerTool`
```python
value: components.Preview20250311WebSearchServerTool = /* values here */
```
### `components.LegacyWebSearchServerTool`
```python
value: components.LegacyWebSearchServerTool = /* values here */
```
### `components.WebSearchServerTool`
```python
value: components.WebSearchServerTool = /* values here */
```
### `components.FileSearchServerTool`
```python
value: components.FileSearchServerTool = /* values here */
```
### `components.ComputerUseServerTool`
```python
value: components.ComputerUseServerTool = /* values here */
```
### `components.CodeInterpreterServerTool`
```python
value: components.CodeInterpreterServerTool = /* values here */
```
### `components.McpServerTool`
```python
value: components.McpServerTool = /* values here */
```
### `components.ImageGenerationServerTool`
```python
value: components.ImageGenerationServerTool = /* values here */
```
### `components.CodexLocalShellTool`
```python
value: components.CodexLocalShellTool = /* values here */
```
### `components.ShellServerTool`
```python
value: components.ShellServerTool = /* values here */
```
### `components.ApplyPatchServerTool`
```python
value: components.ApplyPatchServerTool = /* values here */
```
### `components.CustomTool`
```python
value: components.CustomTool = /* values here */
```
### `components.AdvisorServerToolOpenRouter`
```python
value: components.AdvisorServerToolOpenRouter = /* values here */
```
### `components.SubagentServerToolOpenRouter`
```python
value: components.SubagentServerToolOpenRouter = /* values here */
```
### `components.DatetimeServerTool`
```python
value: components.DatetimeServerTool = /* values here */
```
### `components.FilesServerTool`
```python
value: components.FilesServerTool = /* values here */
```
### `components.FusionServerToolOpenRouter`
```python
value: components.FusionServerToolOpenRouter = /* values here */
```
### `components.ImageGenerationServerToolOpenRouter`
```python
value: components.ImageGenerationServerToolOpenRouter = /* values here */
```
### `components.SearchModelsServerToolOpenRouter`
```python
value: components.SearchModelsServerToolOpenRouter = /* values here */
```
### `components.WebFetchServerTool`
```python
value: components.WebFetchServerTool = /* values here */
```
### `components.WebSearchServerToolOpenRouter`
```python
value: components.WebSearchServerToolOpenRouter = /* values here */
```
### `components.ApplyPatchServerToolOpenRouter`
```python
value: components.ApplyPatchServerToolOpenRouter = /* values here */
```
### `components.BashServerTool`
```python
value: components.BashServerTool = /* values here */
```
### `components.ShellServerToolOpenRouter`
```python
value: components.ShellServerToolOpenRouter = /* values here */
```
### `components.AdditionalToolsItemTool`
```python
value: components.AdditionalToolsItemTool = /* values here */
```
@@ -0,0 +1,15 @@
---
title: "AdditionalToolsItemTypeFunction"
---
## Example Usage
```python
from openrouter.components import AdditionalToolsItemTypeFunction
value: AdditionalToolsItemTypeFunction = "function"
```
## Values
- `"function"`
+14
View File
@@ -0,0 +1,14 @@
---
title: "AdvisorNestedTool"
---
A tool made available to the advisor sub-agent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the advisor has no way to execute them. The advisor tool may not list itself.
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `parameters` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `type` | *str* | :heavy_check_mark: | N/A | |
| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \{<br/>"type": "openrouter:web_search"<br/>} |
+13
View File
@@ -0,0 +1,13 @@
---
title: "AdvisorReasoning"
---
Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `effort` | [Optional[components.AdvisorReasoningEffort]](../components/advisorreasoningeffort.mdx) | :heavy_minus_sign: | Reasoning effort level for the advisor call. |
| `max_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of reasoning tokens the advisor may use. |
@@ -0,0 +1,27 @@
---
title: "AdvisorReasoningEffort"
---
Reasoning effort level for the advisor call.
## Example Usage
```python
from openrouter.components import AdvisorReasoningEffort
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AdvisorReasoningEffort = "max"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"max"`
- `"xhigh"`
- `"high"`
- `"medium"`
- `"low"`
- `"minimal"`
- `"none"`
@@ -0,0 +1,21 @@
---
title: "AdvisorServerToolConfig"
---
Configuration for one openrouter:advisor server tool entry.
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `forward_transcript` | *Optional[bool]* | :heavy_minus_sign: | When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the advisor receives only the `prompt` the executor passes in the tool call. | false |
| `instructions` | *Optional[str]* | :heavy_minus_sign: | System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own. | You are a senior staff engineer. Give a focused, decisive plan. |
| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies. | 2048 |
| `max_tool_calls` | *Optional[int]* | :heavy_minus_sign: | Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools. | 5 |
| `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model. | ~anthropic/claude-opus-latest |
| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 164 chars. | reviewer |
| `reasoning` | [Optional[components.AdvisorReasoning]](../components/advisorreasoning.mdx) | :heavy_minus_sign: | Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking. | \{<br/>"effort": "high"<br/>} |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final tool result). When false or omitted, the advice arrives only as the final result. | false |
| `temperature` | *Optional[float]* | :heavy_minus_sign: | Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies. | 0.7 |
| `tools` | List[[components.AdvisorNestedTool](../components/advisornestedtool.mdx)] | :heavy_minus_sign: | Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the advisor tool itself. | |
@@ -0,0 +1,13 @@
---
title: "AdvisorServerToolOpenRouter"
---
OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `parameters` | [Optional[components.AdvisorServerToolConfig]](../components/advisorservertoolconfig.mdx) | :heavy_minus_sign: | Configuration for one openrouter:advisor server tool entry. | \{<br/>"model": "~anthropic/claude-opus-latest",<br/>"name": "reviewer"<br/>} |
| `type` | [components.AdvisorServerToolOpenRouterType](../components/advisorservertoolopenroutertype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AdvisorServerToolOpenRouterType"
---
## Example Usage
```python
from openrouter.components import AdvisorServerToolOpenRouterType
value: AdvisorServerToolOpenRouterType = "openrouter:advisor"
```
## Values
- `"openrouter:advisor"`
+10
View File
@@ -0,0 +1,10 @@
---
title: "Agent"
---
## Fields
| Field | Type | Required | Description |
| -------------------------- | -------------------------- | -------------------------- | -------------------------- |
| `agent_name` | *str* | :heavy_check_mark: | N/A |
| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A |
+18
View File
@@ -0,0 +1,18 @@
---
title: "AgentMessageItem"
---
A message routed between agents in a multi-agent session
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `agent` | [OptionalNullable[components.Agent]](../components/agent.mdx) | :heavy_minus_sign: | N/A | |
| `author` | *str* | :heavy_check_mark: | N/A | |
| `content` | List[[components.AgentMessageItemContentUnion](../components/agentmessageitemcontentunion.mdx)] | :heavy_check_mark: | N/A | |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `recipient` | *str* | :heavy_check_mark: | N/A | |
| `type` | [components.TypeAgentMessage](../components/typeagentmessage.mdx) | :heavy_check_mark: | N/A | |
| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \{<br/>"author": "/root/worker",<br/>"content": [<br/>\{<br/>"text": "Task complete.",<br/>"type": "input_text"<br/>}<br/>],<br/>"recipient": "/root",<br/>"type": "agent_message"<br/>} |
@@ -0,0 +1,14 @@
---
title: "AgentMessageItemContentInputImage"
---
Image input content item
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `detail` | [components.AgentMessageItemDetail](../components/agentmessageitemdetail.mdx) | :heavy_check_mark: | N/A |
| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `type` | [components.AgentMessageItemTypeInputImage](../components/agentmessageitemtypeinputimage.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,24 @@
---
title: "AgentMessageItemContentUnion"
---
## Supported Types
### `components.InputText`
```python
value: components.InputText = /* values here */
```
### `components.AgentMessageItemContentInputImage`
```python
value: components.AgentMessageItemContentInputImage = /* values here */
```
### `components.ContentEncryptedContent`
```python
value: components.ContentEncryptedContent = /* values here */
```
@@ -0,0 +1,22 @@
---
title: "AgentMessageItemDetail"
---
## Example Usage
```python
from openrouter.components import AgentMessageItemDetail
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AgentMessageItemDetail = "auto"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"auto"`
- `"high"`
- `"low"`
- `"original"`
@@ -0,0 +1,15 @@
---
title: "AgentMessageItemTypeInputImage"
---
## Example Usage
```python
from openrouter.components import AgentMessageItemTypeInputImage
value: AgentMessageItemTypeInputImage = "input_image"
```
## Values
- `"input_image"`
+10
View File
@@ -0,0 +1,10 @@
---
title: "AllowedTools"
---
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `read_only` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `tool_names` | List[*str*] | :heavy_minus_sign: | N/A |
+24
View File
@@ -0,0 +1,24 @@
---
title: "AllowedToolsUnion"
---
## Supported Types
### `List[str]`
```python
value: List[str] = /* values here */
```
### `components.AllowedTools`
```python
value: components.AllowedTools = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
+9
View File
@@ -0,0 +1,9 @@
---
title: "Always"
---
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `tool_names` | List[*str*] | :heavy_minus_sign: | N/A |
+18
View File
@@ -0,0 +1,18 @@
---
title: "AnnotationAddedEvent"
---
Event emitted when a text annotation is added to output
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `annotation` | [components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.mdx) | :heavy_check_mark: | N/A | \{<br/>"file_id": "file-abc123",<br/>"filename": "research_paper.pdf",<br/>"index": 0,<br/>"type": "file_citation"<br/>} |
| `annotation_index` | *int* | :heavy_check_mark: | N/A | |
| `content_index` | *int* | :heavy_check_mark: | N/A | |
| `item_id` | *str* | :heavy_check_mark: | N/A | |
| `output_index` | *int* | :heavy_check_mark: | N/A | |
| `sequence_number` | *int* | :heavy_check_mark: | N/A | |
| `type` | [components.AnnotationAddedEventType](../components/annotationaddedeventtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnnotationAddedEventType"
---
## Example Usage
```python
from openrouter.components import AnnotationAddedEventType
value: AnnotationAddedEventType = "response.output_text.annotation.added"
```
## Values
- `"response.output_text.annotation.added"`
@@ -0,0 +1,15 @@
---
title: "AnthropicAdvisorMessageUsageIteration"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `model` | *str* | :heavy_check_mark: | N/A | |
| `type` | [components.AnthropicAdvisorMessageUsageIterationType](../components/anthropicadvisormessageusageiterationtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicAdvisorMessageUsageIterationType"
---
## Example Usage
```python
from openrouter.components import AnthropicAdvisorMessageUsageIterationType
value: AnthropicAdvisorMessageUsageIterationType = "advisor_message"
```
## Values
- `"advisor_message"`
@@ -0,0 +1,21 @@
---
title: "AnthropicAllowedCallers"
---
## Example Usage
```python
from openrouter.components import AnthropicAllowedCallers
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AnthropicAllowedCallers = "direct"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"direct"`
- `"code_execution_20250825"`
- `"code_execution_20260120"`
@@ -0,0 +1,11 @@
---
title: "AnthropicBase64ImageSource"
---
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `data` | *str* | :heavy_check_mark: | N/A | |
| `media_type` | [components.AnthropicImageMimeType](../components/anthropicimagemimetype.mdx) | :heavy_check_mark: | N/A | image/jpeg |
| `type` | [components.AnthropicBase64ImageSourceType](../components/anthropicbase64imagesourcetype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicBase64ImageSourceType"
---
## Example Usage
```python
from openrouter.components import AnthropicBase64ImageSourceType
value: AnthropicBase64ImageSourceType = "base64"
```
## Values
- `"base64"`
@@ -0,0 +1,11 @@
---
title: "AnthropicBase64PdfSource"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `data` | *str* | :heavy_check_mark: | N/A |
| `media_type` | [components.AnthropicBase64PdfSourceMediaType](../components/anthropicbase64pdfsourcemediatype.mdx) | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicBase64PdfSourceType](../components/anthropicbase64pdfsourcetype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicBase64PdfSourceMediaType"
---
## Example Usage
```python
from openrouter.components import AnthropicBase64PdfSourceMediaType
value: AnthropicBase64PdfSourceMediaType = "application/pdf"
```
## Values
- `"application/pdf"`
@@ -0,0 +1,15 @@
---
title: "AnthropicBase64PdfSourceType"
---
## Example Usage
```python
from openrouter.components import AnthropicBase64PdfSourceType
value: AnthropicBase64PdfSourceType = "base64"
```
## Values
- `"base64"`
@@ -0,0 +1,13 @@
---
title: "AnthropicCacheControlDirective"
---
Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `ttl` | [Optional[components.AnthropicCacheControlTTL]](../components/anthropiccachecontrolttl.mdx) | :heavy_minus_sign: | N/A | 5m |
| `type` | [components.AnthropicCacheControlDirectiveType](../components/anthropiccachecontroldirectivetype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicCacheControlDirectiveType"
---
## Example Usage
```python
from openrouter.components import AnthropicCacheControlDirectiveType
value: AnthropicCacheControlDirectiveType = "ephemeral"
```
## Values
- `"ephemeral"`
@@ -0,0 +1,20 @@
---
title: "AnthropicCacheControlTTL"
---
## Example Usage
```python
from openrouter.components import AnthropicCacheControlTTL
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AnthropicCacheControlTTL = "5m"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"5m"`
- `"1h"`
@@ -0,0 +1,10 @@
---
title: "AnthropicCacheCreation"
---
## Fields
| Field | Type | Required | Description |
| --------------------------- | --------------------------- | --------------------------- | --------------------------- |
| `ephemeral_1h_input_tokens` | *int* | :heavy_check_mark: | N/A |
| `ephemeral_5m_input_tokens` | *int* | :heavy_check_mark: | N/A |
@@ -0,0 +1,14 @@
---
title: "AnthropicCitationCharLocationParam"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `document_index` | *int* | :heavy_check_mark: | N/A |
| `document_title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `end_char_index` | *int* | :heavy_check_mark: | N/A |
| `start_char_index` | *int* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationCharLocationParamType](../components/anthropiccitationcharlocationparamtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationCharLocationParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationCharLocationParamType
value: AnthropicCitationCharLocationParamType = "char_location"
```
## Values
- `"char_location"`
@@ -0,0 +1,14 @@
---
title: "AnthropicCitationContentBlockLocationParam"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `document_index` | *int* | :heavy_check_mark: | N/A |
| `document_title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `end_block_index` | *int* | :heavy_check_mark: | N/A |
| `start_block_index` | *int* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationContentBlockLocationParamType](../components/anthropiccitationcontentblocklocationparamtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationContentBlockLocationParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationContentBlockLocationParamType
value: AnthropicCitationContentBlockLocationParamType = "content_block_location"
```
## Values
- `"content_block_location"`
@@ -0,0 +1,14 @@
---
title: "AnthropicCitationPageLocationParam"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `document_index` | *int* | :heavy_check_mark: | N/A |
| `document_title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `end_page_number` | *int* | :heavy_check_mark: | N/A |
| `start_page_number` | *int* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationPageLocationParamType](../components/anthropiccitationpagelocationparamtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationPageLocationParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationPageLocationParamType
value: AnthropicCitationPageLocationParamType = "page_location"
```
## Values
- `"page_location"`
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationSearchResultLocationParam"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `end_block_index` | *int* | :heavy_check_mark: | N/A |
| `search_result_index` | *int* | :heavy_check_mark: | N/A |
| `source` | *str* | :heavy_check_mark: | N/A |
| `start_block_index` | *int* | :heavy_check_mark: | N/A |
| `title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationSearchResultLocationParamType](../components/anthropiccitationsearchresultlocationparamtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationSearchResultLocationParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationSearchResultLocationParamType
value: AnthropicCitationSearchResultLocationParamType = "search_result_location"
```
## Values
- `"search_result_location"`
@@ -0,0 +1,13 @@
---
title: "AnthropicCitationWebSearchResultLocationParam"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `encrypted_index` | *str* | :heavy_check_mark: | N/A |
| `title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationWebSearchResultLocationParamType](../components/anthropiccitationwebsearchresultlocationparamtype.mdx) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationWebSearchResultLocationParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationWebSearchResultLocationParamType
value: AnthropicCitationWebSearchResultLocationParamType = "web_search_result_location"
```
## Values
- `"web_search_result_location"`
@@ -0,0 +1,14 @@
---
title: "AnthropicCompactionUsageIteration"
---
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `type` | [components.AnthropicCompactionUsageIterationType](../components/anthropiccompactionusageiterationtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicCompactionUsageIterationType"
---
## Example Usage
```python
from openrouter.components import AnthropicCompactionUsageIterationType
value: AnthropicCompactionUsageIterationType = "compaction"
```
## Values
- `"compaction"`
@@ -0,0 +1,14 @@
---
title: "AnthropicDocumentBlockParam"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{<br/>"type": "ephemeral"<br/>} |
| `citations` | [OptionalNullable[components.AnthropicDocumentBlockParamCitations]](../components/anthropicdocumentblockparamcitations.mdx) | :heavy_minus_sign: | N/A | |
| `context` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `source` | [components.AnthropicDocumentBlockParamSourceUnion](../components/anthropicdocumentblockparamsourceunion.mdx) | :heavy_check_mark: | N/A | |
| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `type` | [components.TypeDocument](../components/typedocument.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,9 @@
---
title: "AnthropicDocumentBlockParamCitations"
---
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,18 @@
---
title: "AnthropicDocumentBlockParamContent1"
---
## Supported Types
### `components.AnthropicImageBlockParam`
```python
value: components.AnthropicImageBlockParam = /* values here */
```
### `components.AnthropicTextBlockParam`
```python
value: components.AnthropicTextBlockParam = /* values here */
```
@@ -0,0 +1,18 @@
---
title: "AnthropicDocumentBlockParamContent2"
---
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[components.AnthropicDocumentBlockParamContent1]`
```python
value: List[components.AnthropicDocumentBlockParamContent1] = /* values here */
```
@@ -0,0 +1,36 @@
---
title: "AnthropicDocumentBlockParamSourceUnion"
---
## Supported Types
### `components.AnthropicBase64PdfSource`
```python
value: components.AnthropicBase64PdfSource = /* values here */
```
### `components.AnthropicPlainTextSource`
```python
value: components.AnthropicPlainTextSource = /* values here */
```
### `components.SourceContent`
```python
value: components.SourceContent = /* values here */
```
### `components.AnthropicURLPdfSource`
```python
value: components.AnthropicURLPdfSource = /* values here */
```
### `components.AnthropicFileDocumentSource`
```python
value: components.AnthropicFileDocumentSource = /* values here */
```
@@ -0,0 +1,10 @@
---
title: "AnthropicFileDocumentSource"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `file_id` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicFileDocumentSourceType](../components/anthropicfiledocumentsourcetype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicFileDocumentSourceType"
---
## Example Usage
```python
from openrouter.components import AnthropicFileDocumentSourceType
value: AnthropicFileDocumentSourceType = "file"
```
## Values
- `"file"`
@@ -0,0 +1,11 @@
---
title: "AnthropicImageBlockParam"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{<br/>"type": "ephemeral"<br/>} |
| `source` | [components.AnthropicImageBlockParamSource](../components/anthropicimageblockparamsource.mdx) | :heavy_check_mark: | N/A | |
| `type` | [components.AnthropicImageBlockParamType](../components/anthropicimageblockparamtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,18 @@
---
title: "AnthropicImageBlockParamSource"
---
## Supported Types
### `components.AnthropicBase64ImageSource`
```python
value: components.AnthropicBase64ImageSource = /* values here */
```
### `components.AnthropicURLImageSource`
```python
value: components.AnthropicURLImageSource = /* values here */
```
@@ -0,0 +1,15 @@
---
title: "AnthropicImageBlockParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicImageBlockParamType
value: AnthropicImageBlockParamType = "image"
```
## Values
- `"image"`
@@ -0,0 +1,22 @@
---
title: "AnthropicImageMimeType"
---
## Example Usage
```python
from openrouter.components import AnthropicImageMimeType
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AnthropicImageMimeType = "image/jpeg"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"image/jpeg"`
- `"image/png"`
- `"image/gif"`
- `"image/webp"`
@@ -0,0 +1,10 @@
---
title: "AnthropicInputTokensClearAtLeast"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `type` | [components.AnthropicInputTokensClearAtLeastType](../components/anthropicinputtokensclearatleasttype.mdx) | :heavy_check_mark: | N/A |
| `value` | *int* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicInputTokensClearAtLeastType"
---
## Example Usage
```python
from openrouter.components import AnthropicInputTokensClearAtLeastType
value: AnthropicInputTokensClearAtLeastType = "input_tokens"
```
## Values
- `"input_tokens"`
@@ -0,0 +1,10 @@
---
title: "AnthropicInputTokensTrigger"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `type` | [components.AnthropicInputTokensTriggerType](../components/anthropicinputtokenstriggertype.mdx) | :heavy_check_mark: | N/A |
| `value` | *int* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicInputTokensTriggerType"
---
## Example Usage
```python
from openrouter.components import AnthropicInputTokensTriggerType
value: AnthropicInputTokensTriggerType = "input_tokens"
```
## Values
- `"input_tokens"`
@@ -0,0 +1,10 @@
---
title: "AnthropicIterationCacheCreation"
---
## Fields
| Field | Type | Required | Description |
| --------------------------- | --------------------------- | --------------------------- | --------------------------- |
| `ephemeral_1h_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A |
| `ephemeral_5m_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicMessageUsageIteration"
---
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A | |
| `type` | [components.AnthropicMessageUsageIterationType](../components/anthropicmessageusageiterationtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicMessageUsageIterationType"
---
## Example Usage
```python
from openrouter.components import AnthropicMessageUsageIterationType
value: AnthropicMessageUsageIterationType = "message"
```
## Values
- `"message"`
@@ -0,0 +1,11 @@
---
title: "AnthropicPlainTextSource"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `data` | *str* | :heavy_check_mark: | N/A |
| `media_type` | [components.AnthropicPlainTextSourceMediaType](../components/anthropicplaintextsourcemediatype.mdx) | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicPlainTextSourceType](../components/anthropicplaintextsourcetype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicPlainTextSourceMediaType"
---
## Example Usage
```python
from openrouter.components import AnthropicPlainTextSourceMediaType
value: AnthropicPlainTextSourceMediaType = "text/plain"
```
## Values
- `"text/plain"`
@@ -0,0 +1,15 @@
---
title: "AnthropicPlainTextSourceType"
---
## Example Usage
```python
from openrouter.components import AnthropicPlainTextSourceType
value: AnthropicPlainTextSourceType = "text"
```
## Values
- `"text"`
@@ -0,0 +1,14 @@
---
title: "AnthropicSearchResultBlockParam"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{<br/>"type": "ephemeral"<br/>} |
| `citations` | [Optional[components.AnthropicSearchResultBlockParamCitations]](../components/anthropicsearchresultblockparamcitations.mdx) | :heavy_minus_sign: | N/A | |
| `content` | List[[components.AnthropicTextBlockParam](../components/anthropictextblockparam.mdx)] | :heavy_check_mark: | N/A | |
| `source` | *str* | :heavy_check_mark: | N/A | |
| `title` | *str* | :heavy_check_mark: | N/A | |
| `type` | [components.AnthropicSearchResultBlockParamType](../components/anthropicsearchresultblockparamtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,9 @@
---
title: "AnthropicSearchResultBlockParamCitations"
---
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicSearchResultBlockParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicSearchResultBlockParamType
value: AnthropicSearchResultBlockParamType = "search_result"
```
## Values
- `"search_result"`
+20
View File
@@ -0,0 +1,20 @@
---
title: "AnthropicSpeed"
---
## Example Usage
```python
from openrouter.components import AnthropicSpeed
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AnthropicSpeed = "fast"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"fast"`
- `"standard"`
@@ -0,0 +1,12 @@
---
title: "AnthropicTextBlockParam"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{<br/>"type": "ephemeral"<br/>} |
| `citations` | List[[components.Citation](../components/citation.mdx)] | :heavy_minus_sign: | N/A | |
| `text` | *str* | :heavy_check_mark: | N/A | |
| `type` | [components.AnthropicTextBlockParamType](../components/anthropictextblockparamtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicTextBlockParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicTextBlockParamType
value: AnthropicTextBlockParamType = "text"
```
## Values
- `"text"`
@@ -0,0 +1,20 @@
---
title: "AnthropicThinkingDisplay"
---
## Example Usage
```python
from openrouter.components import AnthropicThinkingDisplay
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AnthropicThinkingDisplay = "summarized"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"summarized"`
- `"omitted"`
@@ -0,0 +1,10 @@
---
title: "AnthropicThinkingTurns"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `type` | [components.AnthropicThinkingTurnsType](../components/anthropicthinkingturnstype.mdx) | :heavy_check_mark: | N/A |
| `value` | *int* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicThinkingTurnsType"
---
## Example Usage
```python
from openrouter.components import AnthropicThinkingTurnsType
value: AnthropicThinkingTurnsType = "thinking_turns"
```
## Values
- `"thinking_turns"`
+10
View File
@@ -0,0 +1,10 @@
---
title: "AnthropicToolUsesKeep"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `type` | [components.AnthropicToolUsesKeepType](../components/anthropictooluseskeeptype.mdx) | :heavy_check_mark: | N/A |
| `value` | *int* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicToolUsesKeepType"
---
## Example Usage
```python
from openrouter.components import AnthropicToolUsesKeepType
value: AnthropicToolUsesKeepType = "tool_uses"
```
## Values
- `"tool_uses"`

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