diff --git a/.devcontainer/README.md b/.devcontainer/README.md index c7d8d27..396929a 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -1,9 +1,4 @@ -
- -
-
- > **Remember to shutdown a GitHub Codespace when it is not in use!** # Dev Containers Quick Start diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5d6109f..677cd89 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,17 @@ lockVersion: 2.0.0 -id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d +id: c48cf606-fb42-4a45-9c23-8f0555307828 management: - docChecksum: 543e6f0dabe30debf212a997d70dc069 + docChecksum: 893ba77d8f0b95f17c64e730e742b555 docVersion: 1.0.0 speakeasyVersion: 1.680.0 generationVersion: 2.788.4 - releaseVersion: 0.8.0 - configChecksum: 1a622905d45caac25e8ee5fb2739d219 - repoURL: https://github.com/OpenRouterTeam/python-sdk.git - installationURL: https://github.com/OpenRouterTeam/python-sdk.git + releaseVersion: 0.8.1 + configChecksum: 279b27abe296fa6bfe551f52239bab5f published: true persistentEdits: - generation_id: 774c44d3-ac63-4e07-89cd-c9a481c35da3 - pristine_commit_hash: 73742f857dca51846a67a66cc19e0d8c012c9c38 - pristine_tree_hash: a9067817353e27e37c7b7772671e970eb3a738f9 + generation_id: 2c909214-6948-4db1-a5d8-a3102342af78 + pristine_commit_hash: 8ad096495e3922d56a78c6eaedba33335dbcbf61 + pristine_tree_hash: cba26443b885aefd901c33db387686b99ed1fd3a features: python: acceptHeaders: 3.0.0 @@ -50,8 +48,8 @@ features: trackedFiles: .devcontainer/README.md: id: b170c0f184ac - last_write_checksum: sha1:919a25ed5129d316f05a60131c164011763b7c54 - pristine_git_object: c7d8d278438e7906fedb39d99151372b3324ea66 + last_write_checksum: sha1:3c63dfd4dcea8df0d4add09e975a6887e6da4aab + pristine_git_object: 396929ab2e57cf09dd25ec83bd4496f733b95701 .devcontainer/devcontainer.json: id: b34062a34eb1 last_write_checksum: sha1:94309e8c8eab5ab063986bf625f513a59825e947 @@ -252,10 +250,6 @@ trackedFiles: id: 77f6aeeabc53 last_write_checksum: sha1:e43f4beb0ce9189215ea930bd35771775bb8cb2c pristine_git_object: 07ddac012a71fbe21ac4b5ec94a63054a9cc8bb4 - docs/components/chainid.md: - id: bed884f81fbb - last_write_checksum: sha1:2385b805aee407cd5dd2e9e0e302a51019fb7159 - pristine_git_object: 11579fed5ec6618add73efbf35c16fde43eb2f73 docs/components/chatassistantimages.md: id: f1f776b0c4ae last_write_checksum: sha1:05697e4bc0690cabd72965d01519102c149f6363 @@ -864,10 +858,6 @@ trackedFiles: id: 2e3d81b7a646 last_write_checksum: sha1:298cb44901e7c50563597aae9e0606cf83edbc2b pristine_git_object: ada009ced29fcaf5d19e81bc67276fe9718ccfaa - docs/components/createchargerequest.md: - id: abed35916f72 - last_write_checksum: sha1:a157ce1a0aa39b3efd07015508498c2e2ae90b12 - pristine_git_object: e789e8f139c280cd256caef05c1561b0f9cefc3c docs/components/customtool.md: id: ff0ec1b8ea8b last_write_checksum: sha1:090abd129254120c6ebdff2d303c36bddc62b712 @@ -1116,6 +1106,10 @@ trackedFiles: id: 88a512c5f9ce last_write_checksum: sha1:611201e2dbd2c8fe1c501b5365bc06367bc5370c pristine_git_object: 2f4629220306ced5674a9ef70dbcbce1f908b93a + docs/components/goneresponseerrordata.md: + id: e0a6af2f3930 + last_write_checksum: sha1:bb71aaa5536e5e1318be7ff336df76ef276acbe1 + pristine_git_object: 87ee01d49d24f644cd8143ecd5435621fea20831 docs/components/imagegencallcompletedevent.md: id: c26bc1b3854e last_write_checksum: sha1:3fbced46717f100511986724f16441ff0a081187 @@ -2580,6 +2574,10 @@ trackedFiles: id: 7decb227f487 last_write_checksum: sha1:283f0f2a777f118448acd3bed2b98a879a8175a7 pristine_git_object: 290d3a4196ed994d4c8637490aa1449fbe624724 + docs/errors/goneresponseerror.md: + id: 526d816ed2ec + last_write_checksum: sha1:cb1bd47cc04da0d4b407ca3d561e8661da59deef + pristine_git_object: a2742e040c20f55cde9b6083eb38db64e8a4d4cb docs/errors/internalserverresponseerror.md: id: 7e8ff7f684b2 last_write_checksum: sha1:7286bd98d0952f44d807965c284796fa8b271be4 @@ -2696,10 +2694,6 @@ trackedFiles: id: 6fa28513237c last_write_checksum: sha1:8880a7ac0b9223137e8debacabe38c594f6d0864 pristine_git_object: 76e85b285366d5731dd1cb6cfc182907406fe741 - docs/operations/calldata.md: - id: 950f75cd8fa0 - last_write_checksum: sha1:b74cd6e7ef1233a3877dac00f473cd7c76bb775b - pristine_git_object: de7a031a64014b4578f0252e7ec088d4b09a68ff docs/operations/category.md: id: 694f17d9e80d last_write_checksum: sha1:6437eb7bd8c0df1767aee6a6522c5a67fdfaddcd @@ -2740,26 +2734,14 @@ trackedFiles: id: 6c92952aa6b6 last_write_checksum: sha1:c456860d3c44db9bd993e3e4371025d50be959f8 pristine_git_object: acad71c0e6f4d79b6cc9a2e88e6b8a0f9af321a4 - docs/operations/createcoinbasechargedata.md: - id: eb6f66eb47b3 - last_write_checksum: sha1:bf75c37cdede3e9503cb76b52993f644037df322 - pristine_git_object: 9363cdf6948ab92053e313ae48f4aa1c66a7c980 docs/operations/createcoinbasechargeglobals.md: id: f991df871a9f last_write_checksum: sha1:75b0e35461d66b1eed488b9298219f71b85841b9 pristine_git_object: dcc7d37f19107efe84f79941648b2902585d6e2a docs/operations/createcoinbasechargerequest.md: id: a448dd5ceebb - last_write_checksum: sha1:4635ba463628d2e79523db64c810cca47e0cf078 - pristine_git_object: e6f030714c394386aa7f69d60532b01c3faa470a - docs/operations/createcoinbasechargeresponse.md: - id: 9fc6d8b1e3c2 - last_write_checksum: sha1:9e9f224237128b82d1dba1b1b8de785067a06d3e - pristine_git_object: d9d4bd99972294e02ce27d09b940b829246c6891 - docs/operations/createcoinbasechargesecurity.md: - id: e041c4c49e3d - last_write_checksum: sha1:0dd8c21a514db569ae6c073ac884fb44e66b5c31 - pristine_git_object: 7d58a21f28426d40a0ae7d755b18580916911d08 + last_write_checksum: sha1:78f9ba075a4cebcb45341f7b47715a0364ec96e6 + pristine_git_object: 9a425d353ef0972e8555b1a45bffd0b5eef61e3f docs/operations/createembeddingsdata.md: id: b2123807ad9d last_write_checksum: sha1:6c7ca4ed9b4552bbafd6978b034bd2117d216574 @@ -3196,10 +3178,6 @@ trackedFiles: id: 14450e1d6614 last_write_checksum: sha1:e432e29d3c7de8517cc16b59b958134ec561f09c pristine_git_object: 255d266cb4cee8057210f820e560bba25858b82c - docs/operations/metadata.md: - id: d37b5c1d5589 - last_write_checksum: sha1:25049602671a379c289e2ca39d3097063aa509de - pristine_git_object: 87bf7e340fe3f01fac63933324afd2f25dda553b docs/operations/object.md: id: baee3544844d last_write_checksum: sha1:2fba5ecf3f93c90460a972666d6acdfb597cafad @@ -3236,10 +3214,6 @@ trackedFiles: id: f89a67417d77 last_write_checksum: sha1:3235dd5b19271fd86c2c03d79178948b1611e6ca pristine_git_object: 4c840446aba01bd1283151184a07c582786ad9da - docs/operations/transferintent.md: - id: b95f9f6bcc0a - last_write_checksum: sha1:b7256dce12dc3cad6356e72f1a8ea5afe936e59f - pristine_git_object: f068e9ae1c42b359259b7441d9cc452353526d8f docs/operations/typeimageurl.md: id: 433d2dc21947 last_write_checksum: sha1:24b83d5212d95f5e5ee95d1b9e47059613126ea1 @@ -3308,26 +3282,22 @@ trackedFiles: id: f83f3fcb36f8 last_write_checksum: sha1:9c272d9908a57fdbd2b376e13c8fd226e7d4ce65 pristine_git_object: 0d9e7c83f5ae8bab7f5f5cfa6e48805c00f56f40 - docs/operations/web3data.md: - id: d972a6efe20c - last_write_checksum: sha1:1d72084d83e1628573f14eaf096ce2d52cfe33dc - pristine_git_object: 18e0a9cb3ebb9d9dca10b0782fc08006b3c9e6d2 docs/sdks/analytics/README.md: id: 4c84abb05030 - last_write_checksum: sha1:bb8b0d3488aab3d9587698636b124bcb369cf327 - pristine_git_object: f10b397f86b982441c1be23e81772b71a136904d + last_write_checksum: sha1:9b5a8b4b1d97befb1e2a21dfeb35dcff078c9627 + pristine_git_object: 91805c7e8e111b3047ed8e69c7e687b1addafeba docs/sdks/apikeys/README.md: id: e2bd25998427 - last_write_checksum: sha1:fc3b72b8aa77d20784989641717c5cb4df0fddcf - pristine_git_object: 7b325c0acd88da7c15dba00a4165ee858db26765 + last_write_checksum: sha1:0f630ab49e573a34e13a589550e5dc22f11f9337 + pristine_git_object: d072fdd1527e7c8a2bca61dbe46977222a96d135 docs/sdks/chat/README.md: id: 393193527c2c last_write_checksum: sha1:95c783c0a34a00f3d6e12406a683635fc0714115 pristine_git_object: c28f38d9890824ef84d5804b6916ab30005bfaed docs/sdks/credits/README.md: id: 81608135c0ff - last_write_checksum: sha1:61426e049087353ea55a2cb31fde922205e1c673 - pristine_git_object: 0d32728478dec69768c308ec202eb5d3d9a6a335 + last_write_checksum: sha1:c0cd734a1c3df6d92a010cf12a676506e8dfc280 + pristine_git_object: 59bb0abe2d0b68677672b8fe536ff2aba408d46f docs/sdks/embeddings/README.md: id: 15b5b04486c1 last_write_checksum: sha1:93409aad79adcad06e751cb1b48907c0b261c663 @@ -3366,16 +3336,12 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:7593c9eb167e36e170a72aade862f43ab08045c3 - pristine_git_object: 870fd0812919efc48010e6c7d9bbe46aa96c1416 - scripts/prepare_readme.py: - id: e0c5957a6035 - last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 - pristine_git_object: 03e9f9b59063c73d6f24995a77cdb971f3318d30 + last_write_checksum: sha1:77eb83db047dc7a0fee66142a4408efcab29f3f0 + pristine_git_object: 71d7080bdd4204fe1367f7fc5195a5573fcddd82 scripts/publish.sh: id: fe273b08f514 - last_write_checksum: sha1:b290b25b36dca3d5eb1a2e66a2e1bcf2e7326cf3 - pristine_git_object: c35748f360329c2bc370e9b189f49b1a360b2c48 + last_write_checksum: sha1:adc9b741c12ad1591ab4870eabe20f0d0a86cd1a + pristine_git_object: ef28dc10c60d7d6a4bac0c6a1e9caba36b471861 src/openrouter/__init__.py: id: 4514650f64eb last_write_checksum: sha1:da077c0bdfcef64a4a5aea91a17292f72fa2b088 @@ -3394,8 +3360,8 @@ trackedFiles: pristine_git_object: 07ace03229fd3267623c8f48665d2c3a67c3565d src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:d8476683ff9a78259ad25f2dfc9e546390b188eb - pristine_git_object: 8d9fa361d452ddb180ae67eb92b63cb83abbca85 + last_write_checksum: sha1:ab653d10128db3311e4804ef39828494efa4e115 + pristine_git_object: 1057ee959bfaf7c2d9e26d8b6ce54bb153071ee3 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:e395dc6b6403e7a37f8cb4be2d679cd151dc6780 @@ -3418,8 +3384,8 @@ trackedFiles: pristine_git_object: e7855d1f5531df21d376dc9448b1ceb2fe86fbe3 src/openrouter/components/__init__.py: id: 81754e97b3f4 - last_write_checksum: sha1:067a64296fd5042deb6a57d067706e428fd4fadd - pristine_git_object: c61c2a699275b5c80558014eb1b6868ac6b5836b + last_write_checksum: sha1:885c33350de6090e4476d00178f0087152a08b6a + pristine_git_object: f62b9c09ace5db9c90b06aae4533c94880faee3e src/openrouter/components/activityitem.py: id: 3bbe7d35f459 last_write_checksum: sha1:08483b6fe216e4bb2fd7205b1f6d7394af826f26 @@ -3644,10 +3610,6 @@ trackedFiles: id: a3965275d07f last_write_checksum: sha1:8aeacab427a9277db44ef731fd7a38a58752a64f pristine_git_object: 7d5b6f700b28296f6879a4a87d65a794f3e96cb3 - src/openrouter/components/createchargerequest.py: - id: 9d406657b75e - last_write_checksum: sha1:3f249e03468bb102ea8f9345828db7fab5a61612 - pristine_git_object: 7fab3acdda03fa7a251cc290ed6cb818a261810d src/openrouter/components/customtool.py: id: e83b0c530680 last_write_checksum: sha1:8c39362a8d105601a0a71d429580ac5a43ca94d9 @@ -3728,6 +3690,10 @@ trackedFiles: id: bf659aa04e7d last_write_checksum: sha1:0a12e07fb5148a167e32d96be37a98dcba3ebd36 pristine_git_object: 5173384b7c17ab8bde006291251f101037146945 + src/openrouter/components/goneresponseerrordata.py: + id: 41f97eceb29a + last_write_checksum: sha1:f2a9f26b6e724ddac1fd29963cdc01a5941e9fa9 + pristine_git_object: 78177b848271cd74e44d0fc956ff8d15be5871de src/openrouter/components/imagegencallcompletedevent.py: id: cbf654faeb3e last_write_checksum: sha1:c09c72377699dfcb9030c7353f7b9db1b955a268 @@ -4198,8 +4164,8 @@ trackedFiles: pristine_git_object: 4ffc90b3f040fe0f18cad97cfa5220c7e5d26018 src/openrouter/credits.py: id: cdc961937101 - last_write_checksum: sha1:79ad92c18672321880a482bf32261488d9e48f32 - pristine_git_object: 43b95ff543d311823595bcaa754fa833cc831a2e + last_write_checksum: sha1:96e0326da16cf82713a498c04485c879852c1472 + pristine_git_object: c06e2ae01f025b9b2993ee92a28352921de1a7c3 src/openrouter/embeddings.py: id: 0374ace39067 last_write_checksum: sha1:a491c4af1fe4bff2400012c19dc35f52a8eaca68 @@ -4210,8 +4176,8 @@ trackedFiles: pristine_git_object: 09823d301c103f8e65e9fb2b2153ce7a1d424bd2 src/openrouter/errors/__init__.py: id: 366154d0d60a - last_write_checksum: sha1:84e5bdd52a3e99fd8bbbd718fa4f075ae0df4f64 - pristine_git_object: dc5ef68c20dea9461abf913779f5f0e21defc829 + last_write_checksum: sha1:4765e4763f162d381bebb9b2ec284305fdf62707 + pristine_git_object: 1695b737f1d19a4c63197a3b13f3307fdca1cea9 src/openrouter/errors/badgatewayresponse_error.py: id: 818c3605ce23 last_write_checksum: sha1:d9d2599c2be63be36d3891bc94e34535edb3f05a @@ -4232,6 +4198,10 @@ trackedFiles: id: 4c1d3e6c95a4 last_write_checksum: sha1:930eb57082f282587d05c77b243990d4bc32fdec pristine_git_object: f9fd3e58e09630c176f4868c6a962c96c630eb8b + src/openrouter/errors/goneresponse_error.py: + id: 13e8901c2c57 + last_write_checksum: sha1:18df5a97e332bbca977222a4fdfd0c1509de32cc + pristine_git_object: 192dae529965ebc7ba7b5001b8bbc29b2b6a40b4 src/openrouter/errors/internalserverresponse_error.py: id: a5ab5c4a53a9 last_write_checksum: sha1:f91e21d4022b0ede924736ab9664e63d73e64b55 @@ -4322,8 +4292,8 @@ trackedFiles: pristine_git_object: b31df9fe79cf8e58d16e140e93e3ec2c358eb89e src/openrouter/operations/__init__.py: id: 9afcea1e7161 - last_write_checksum: sha1:f524d3b5a390b8b1dd392ff99fb69ba43b1b46d7 - pristine_git_object: f25347dbb31a15f83e8a12b8f3b05d87f8dd74ed + last_write_checksum: sha1:acdd42df97635d112197ac02a1d9c9b10d94d4ca + pristine_git_object: 154f41155799456d23702e5dfffb2efd547b5395 src/openrouter/operations/bulkassignkeystoguardrail.py: id: 6d8435d51d9d last_write_checksum: sha1:f900853fa8060a8a78674a3e386e7107f0233a44 @@ -4346,8 +4316,8 @@ trackedFiles: pristine_git_object: 610f4463df8df044f109675109397462d4821660 src/openrouter/operations/createcoinbasecharge.py: id: 7858e70dbf27 - last_write_checksum: sha1:9e729386e447df3122387b004bc75a4cb34665eb - pristine_git_object: dc83233e579abe8fc6b644d12c5fe12300af0e07 + last_write_checksum: sha1:d229f8ba547f2c124def12dda6892926e559f15e + pristine_git_object: 6e296e19bfdd8a1b84d9368b1d582c56a888a5a2 src/openrouter/operations/createembeddings.py: id: fe1160a960e9 last_write_checksum: sha1:d6e7e034971ff17128e1d6cc132fb85fa95cf685 @@ -4596,9 +4566,6 @@ examples: application/json: {"error": {"code": 529, "message": "Provider returned error"}} getUserActivity: speakeasy-default-get-user-activity: - parameters: - query: - date: "2025-08-24" responses: "200": application/json: {"data": [{"date": "2025-08-24", "model": "openai/gpt-4.1", "model_permaslug": "openai/gpt-4.1-2025-04-14", "endpoint_id": "550e8400-e29b-41d4-a716-446655440000", "provider_name": "OpenAI", "usage": 0.015, "byok_usage_inference": 0.012, "requests": 5, "prompt_tokens": 50, "completion_tokens": 125, "reasoning_tokens": 25}]} @@ -4610,6 +4577,39 @@ examples: application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + sendChatCompletionRequest: + speakeasy-default-send-chat-completion-request: + requestBody: + application/json: {"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}], "stream": false, "temperature": 0.7, "top_p": 1} + responses: + "200": + application/json: {"id": "chatcmpl-123", "choices": [{"finish_reason": "stop", "index": 0, "message": {"role": "assistant"}}], "created": 1677652288, "model": "openai/gpt-4", "object": "chat.completion", "system_fingerprint": "fp_44709d6fcb"} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "402": + application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "413": + application/json: {"error": {"code": 413, "message": "Request payload too large"}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + "503": + application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} + "524": + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} + "529": + application/json: {"error": {"code": 529, "message": "Provider returned error"}} getCredits: speakeasy-default-get-credits: responses: @@ -4623,26 +4623,16 @@ examples: application/json: {"error": {"code": 500, "message": "Internal Server Error"}} createCoinbaseCharge: speakeasy-default-create-coinbase-charge: - requestBody: - application/json: {"amount": 100, "sender": "0x1234567890123456789012345678901234567890", "chain_id": 1} responses: - "200": - application/json: {"data": {"id": "", "created_at": "1706396327532", "expires_at": "1739956049454", "web3_data": {"transfer_intent": {"call_data": {"deadline": "", "fee_amount": "", "id": "", "operator": "", "prefix": "", "recipient": "", "recipient_amount": "", "recipient_currency": "", "refund_destination": "", "signature": ""}, "metadata": {"chain_id": 3470.69, "contract_address": "", "sender": ""}}}}} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "410": + application/json: {"error": {"code": 410, "message": "The Coinbase APIs used by this endpoint have been deprecated, so the Coinbase Commerce credits API has been removed. Use the web credits purchase flow instead."}} createEmbeddings: speakeasy-default-create-embeddings: requestBody: application/json: {"input": "", "model": "Taurus"} responses: "200": - application/json: {"object": "list", "data": [], "model": "Land Cruiser"} + application/json: {"object": "list", "data": [], "model": "Model S"} text/event-stream: "" "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} @@ -4680,7 +4670,7 @@ examples: id: "" responses: "200": - application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto", "provider_responses": [], "user_agent": "", "http_referer": null}} + application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto", "provider_responses": [], "user_agent": "", "http_referer": ""}} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "402": @@ -4702,10 +4692,10 @@ examples: responses: "200": application/json: {"data": {"count": 150}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} getModels: speakeasy-default-get-models: responses: @@ -4722,10 +4712,10 @@ examples: application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} "404": application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} listEndpoints: speakeasy-default-list-endpoints: parameters: @@ -4743,22 +4733,7 @@ examples: speakeasy-default-list-endpoints-zdr: responses: "200": - application/json: {"data": [{"name": "OpenAI: GPT-4", "model_id": "openai/gpt-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}, "throughput_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}}]} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - getParameters: - speakeasy-default-get-parameters: - parameters: - path: - author: "" - slug: "" - responses: - "200": - application/json: {"data": {"model": "openai/gpt-4", "supported_parameters": ["temperature", "top_p", "max_tokens"]}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} + application/json: {"data": [{"name": "OpenAI: GPT-4", "model_id": "openai/gpt-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}}]} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} listProviders: @@ -4770,10 +4745,6 @@ examples: application/json: {"error": {"code": 500, "message": "Internal Server Error"}} list: speakeasy-default-list: - parameters: - query: - include_disabled: "false" - offset: "0" responses: "200": application/json: {"data": [{"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"}]} @@ -4859,78 +4830,6 @@ examples: application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - exchangeAuthCodeForAPIKey: - speakeasy-default-exchange-auth-code-for-API-key: - requestBody: - application/json: {"code": "auth_code_abc123def456"} - responses: - "200": - application/json: {"key": "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", "user_id": "user_2yOPcMpKoQhcd4bVgSMlELRaIah"} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "403": - application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - createAuthKeysCode: - speakeasy-default-create-auth-keys-code: - requestBody: - application/json: {"callback_url": "https://myapp.com/auth/callback"} - responses: - "200": - application/json: {"data": {"id": "auth_code_xyz789", "app_id": 12345, "created_at": "2025-08-24T10:30:00Z"}} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - "409": - application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} - sendChatCompletionRequest: - speakeasy-default-send-chat-completion-request: - requestBody: - application/json: {"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}], "stream": false, "temperature": 0.7, "top_p": 1} - responses: - "200": - application/json: {"id": "chatcmpl-123", "choices": [{"finish_reason": "stop", "index": 0, "message": {"role": "assistant"}}], "created": 1677652288, "model": "openai/gpt-4", "object": "chat.completion", "system_fingerprint": "fp_44709d6fcb"} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "402": - application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "408": - application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} - "413": - application/json: {"error": {"code": 413, "message": "Request payload too large"}} - "422": - application/json: {"error": {"code": 422, "message": "Invalid argument"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "502": - application/json: {"error": {"code": 502, "message": "Provider returned error"}} - "503": - application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} - "524": - application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} - "529": - application/json: {"error": {"code": 529, "message": "Provider returned error"}} - createCompletions: - speakeasy-default-create-completions: - requestBody: - application/json: {"prompt": [], "stream": false} - responses: - "200": - application/json: {"id": "", "object": "text_completion", "created": 7524.07, "model": "Aventador", "choices": [{"text": "", "index": 4622.44, "logprobs": {"tokens": [], "token_logprobs": [], "top_logprobs": [{"key": 6481.8, "key1": 6211.86, "key2": 4822.58}, {}, {"key": 6295.32, "key1": 8110.56, "key2": 5430.28}], "text_offset": [8533.93, 4728.06, 5798.08]}, "finish_reason": "length"}]} - "400": - application/json: {"error": {"code": "", "message": ""}} - "500": - application/json: {"error": {"code": "", "message": ""}} listGuardrails: speakeasy-default-list-guardrails: responses: @@ -5117,937 +5016,32 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + exchangeAuthCodeForAPIKey: + speakeasy-default-exchange-auth-code-for-API-key: + requestBody: + application/json: {"code": "auth_code_abc123def456"} + responses: + "200": + application/json: {"key": "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", "user_id": "user_2yOPcMpKoQhcd4bVgSMlELRaIah"} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createAuthKeysCode: + speakeasy-default-create-auth-keys-code: + requestBody: + application/json: {"callback_url": "https://myapp.com/auth/callback"} + responses: + "200": + application/json: {"data": {"id": "auth_code_xyz789", "app_id": 12345, "created_at": "2025-08-24T10:30:00Z"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -generatedFiles: - - .devcontainer/README.md - - .devcontainer/devcontainer.json - - .devcontainer/setup.sh - - .gitattributes - - .vscode/settings.json - - USAGE.md - - docs/components/activityitem.md - - docs/components/architecture.md - - docs/components/assistantmessage.md - - docs/components/assistantmessagecontent.md - - docs/components/assistantmessageimages.md - - docs/components/assistantmessageimagesimageurl.md - - docs/components/assistantmessagerole.md - - docs/components/badgatewayresponseerrordata.md - - docs/components/badrequestresponseerrordata.md - - docs/components/by.md - - docs/components/chainid.md - - docs/components/chatcompletionfinishreason.md - - docs/components/chatgenerationparams.md - - docs/components/chatgenerationparamsby.md - - docs/components/chatgenerationparamsidautorouter.md - - docs/components/chatgenerationparamsidfileparser.md - - docs/components/chatgenerationparamsidmoderation.md - - docs/components/chatgenerationparamsidresponsehealing.md - - docs/components/chatgenerationparamsidweb.md - - docs/components/chatgenerationparamsignore.md - - docs/components/chatgenerationparamsimageconfig.md - - docs/components/chatgenerationparamsmaxprice.md - - docs/components/chatgenerationparamsonly.md - - docs/components/chatgenerationparamsorder.md - - docs/components/chatgenerationparamspartition.md - - docs/components/chatgenerationparamspluginautorouter.md - - docs/components/chatgenerationparamspluginfileparser.md - - docs/components/chatgenerationparamspluginmoderation.md - - docs/components/chatgenerationparamspluginresponsehealing.md - - docs/components/chatgenerationparamspluginunion.md - - docs/components/chatgenerationparamspluginweb.md - - docs/components/chatgenerationparamsprovider.md - - docs/components/chatgenerationparamsprovidersort.md - - docs/components/chatgenerationparamsprovidersortconfig.md - - docs/components/chatgenerationparamsprovidersortconfigenum.md - - docs/components/chatgenerationparamsprovidersortconfigunion.md - - docs/components/chatgenerationparamssortenum.md - - docs/components/chatgenerationparamssortunion.md - - docs/components/chatgenerationparamstrace.md - - docs/components/chatgenerationtokenusage.md - - docs/components/chatmessagecontentitem.md - - docs/components/chatmessagecontentitem1.md - - docs/components/chatmessagecontentitemaudio.md - - docs/components/chatmessagecontentitemaudioinputaudio.md - - docs/components/chatmessagecontentitemaudiotype.md - - docs/components/chatmessagecontentitemcachecontrol.md - - docs/components/chatmessagecontentitemcachecontroltype.md - - docs/components/chatmessagecontentitemimage.md - - docs/components/chatmessagecontentitemimagedetail.md - - docs/components/chatmessagecontentitemimageimageurl.md - - docs/components/chatmessagecontentitemimagetype.md - - docs/components/chatmessagecontentitemtext.md - - docs/components/chatmessagecontentitemtexttype.md - - docs/components/chatmessagecontentitemvideo.md - - docs/components/chatmessagecontentitemvideolegacy.md - - docs/components/chatmessagecontentitemvideolegacytype.md - - docs/components/chatmessagecontentitemvideotype.md - - docs/components/chatmessagetokenlogprob.md - - docs/components/chatmessagetokenlogprobs.md - - docs/components/chatmessagetokenlogprobtoplogprob.md - - docs/components/chatmessagetoolcall.md - - docs/components/chatmessagetoolcallfunction.md - - docs/components/chatmessagetoolcalltype.md - - docs/components/chatresponse.md - - docs/components/chatresponsechoice.md - - docs/components/chatresponseobject.md - - docs/components/chatstreamingchoice.md - - docs/components/chatstreamingmessagechunk.md - - docs/components/chatstreamingmessagechunkrole.md - - docs/components/chatstreamingmessagetoolcall.md - - docs/components/chatstreamingmessagetoolcallfunction.md - - docs/components/chatstreamingmessagetoolcalltype.md - - docs/components/chatstreamingresponsechunk.md - - docs/components/chatstreamingresponsechunkobject.md - - docs/components/chatstreamoptions.md - - docs/components/code.md - - docs/components/completiontokensdetails.md - - docs/components/costdetails.md - - docs/components/createchargerequest.md - - docs/components/data.md - - docs/components/datacollection.md - - docs/components/debugoptions.md - - docs/components/defaultparameters.md - - docs/components/developermessage.md - - docs/components/developermessagecontent.md - - docs/components/developermessagerole.md - - docs/components/edgenetworktimeoutresponseerrordata.md - - docs/components/effort.md - - docs/components/endpointstatus.md - - docs/components/error.md - - docs/components/filecitation.md - - docs/components/filecitationtype.md - - docs/components/filepath.md - - docs/components/filepathtype.md - - docs/components/forbiddenresponseerrordata.md - - docs/components/imagegenerationstatus.md - - docs/components/inputmodality.md - - docs/components/inputtokensdetails.md - - docs/components/instructtype.md - - docs/components/internalserverresponseerrordata.md - - docs/components/jsonschemaconfig.md - - docs/components/listendpointsresponse.md - - docs/components/logprob.md - - docs/components/message.md - - docs/components/modality.md - - docs/components/model.md - - docs/components/modelarchitecture.md - - docs/components/modelarchitectureinstructtype.md - - docs/components/modelgroup.md - - docs/components/modelscountresponse.md - - docs/components/modelslistresponse.md - - docs/components/namedtoolchoice.md - - docs/components/namedtoolchoicefunction.md - - docs/components/namedtoolchoicetype.md - - docs/components/notfoundresponseerrordata.md - - docs/components/openairesponsesannotation.md - - docs/components/openairesponsesincludable.md - - docs/components/openairesponsesincompletedetails.md - - docs/components/openairesponsesinputcontent1.md - - docs/components/openairesponsesinputcontent2.md - - docs/components/openairesponsesinputcontent3.md - - docs/components/openairesponsesinputfunctioncall.md - - docs/components/openairesponsesinputfunctioncalloutput.md - - docs/components/openairesponsesinputmessage1.md - - docs/components/openairesponsesinputmessage2.md - - docs/components/openairesponsesinputroleassistant.md - - docs/components/openairesponsesinputroledeveloper1.md - - docs/components/openairesponsesinputroledeveloper2.md - - docs/components/openairesponsesinputrolesystem1.md - - docs/components/openairesponsesinputrolesystem2.md - - docs/components/openairesponsesinputroleunion1.md - - docs/components/openairesponsesinputroleunion2.md - - docs/components/openairesponsesinputroleuser1.md - - docs/components/openairesponsesinputroleuser2.md - - docs/components/openairesponsesinputtypefunctioncall.md - - docs/components/openairesponsesinputtypefunctioncalloutput.md - - docs/components/openairesponsesinputtypemessage1.md - - docs/components/openairesponsesinputtypemessage2.md - - docs/components/openairesponsesinputunion.md - - docs/components/openairesponsesinputunion1.md - - docs/components/openairesponsesprompt.md - - docs/components/openairesponsesreasoningconfig.md - - docs/components/openairesponsesreasoningeffort.md - - docs/components/openairesponsesrefusalcontent.md - - docs/components/openairesponsesrefusalcontenttype.md - - docs/components/openairesponsesresponsestatus.md - - docs/components/openairesponsesservicetier.md - - docs/components/openairesponsestoolchoice.md - - docs/components/openairesponsestoolchoiceauto.md - - docs/components/openairesponsestoolchoicefunction.md - - docs/components/openairesponsestoolchoicenone.md - - docs/components/openairesponsestoolchoicerequired.md - - docs/components/openairesponsestoolchoicetypefunction.md - - docs/components/openairesponsestoolchoicetypewebsearchpreview.md - - docs/components/openairesponsestoolchoicetypewebsearchpreview20250311.md - - docs/components/openairesponsestoolchoiceunion.md - - docs/components/openairesponsestruncation.md - - docs/components/openresponseseasyinputmessage.md - - docs/components/openresponseseasyinputmessagecontentinputimage.md - - docs/components/openresponseseasyinputmessagecontenttype.md - - docs/components/openresponseseasyinputmessagecontentunion1.md - - docs/components/openresponseseasyinputmessagecontentunion2.md - - docs/components/openresponseseasyinputmessagedetail.md - - docs/components/openresponseseasyinputmessageroleassistant.md - - docs/components/openresponseseasyinputmessageroledeveloper.md - - docs/components/openresponseseasyinputmessagerolesystem.md - - docs/components/openresponseseasyinputmessageroleunion.md - - docs/components/openresponseseasyinputmessageroleuser.md - - docs/components/openresponseseasyinputmessagetypemessage.md - - docs/components/openresponseserrorevent.md - - docs/components/openresponseserroreventtype.md - - docs/components/openresponsesfunctioncalloutput.md - - docs/components/openresponsesfunctioncalloutputtype.md - - docs/components/openresponsesfunctiontoolcall.md - - docs/components/openresponsesfunctiontoolcalltype.md - - docs/components/openresponsesimagegencallcompleted.md - - docs/components/openresponsesimagegencallcompletedtype.md - - docs/components/openresponsesimagegencallgenerating.md - - docs/components/openresponsesimagegencallgeneratingtype.md - - docs/components/openresponsesimagegencallinprogress.md - - docs/components/openresponsesimagegencallinprogresstype.md - - docs/components/openresponsesimagegencallpartialimage.md - - docs/components/openresponsesimagegencallpartialimagetype.md - - docs/components/openresponsesinput.md - - docs/components/openresponsesinput1.md - - docs/components/openresponsesinputmessageitem.md - - docs/components/openresponsesinputmessageitemcontentinputimage.md - - docs/components/openresponsesinputmessageitemcontenttype.md - - docs/components/openresponsesinputmessageitemcontentunion.md - - docs/components/openresponsesinputmessageitemdetail.md - - docs/components/openresponsesinputmessageitemroledeveloper.md - - docs/components/openresponsesinputmessageitemrolesystem.md - - docs/components/openresponsesinputmessageitemroleunion.md - - docs/components/openresponsesinputmessageitemroleuser.md - - docs/components/openresponsesinputmessageitemtypemessage.md - - docs/components/openresponseslogprobs.md - - docs/components/openresponsesnonstreamingresponse.md - - docs/components/openresponsesnonstreamingresponseobject.md - - docs/components/openresponsesnonstreamingresponsetoolfunction.md - - docs/components/openresponsesnonstreamingresponsetoolunion.md - - docs/components/openresponsesnonstreamingresponsetype.md - - docs/components/openresponsesreasoning.md - - docs/components/openresponsesreasoningconfig.md - - docs/components/openresponsesreasoningdeltaevent.md - - docs/components/openresponsesreasoningdeltaeventtype.md - - docs/components/openresponsesreasoningdoneevent.md - - docs/components/openresponsesreasoningdoneeventtype.md - - docs/components/openresponsesreasoningformat.md - - docs/components/openresponsesreasoningstatuscompleted.md - - docs/components/openresponsesreasoningstatusincomplete.md - - docs/components/openresponsesreasoningstatusinprogress.md - - docs/components/openresponsesreasoningstatusunion.md - - docs/components/openresponsesreasoningsummarypartaddedevent.md - - docs/components/openresponsesreasoningsummarypartaddedeventtype.md - - docs/components/openresponsesreasoningsummarytextdeltaevent.md - - docs/components/openresponsesreasoningsummarytextdeltaeventtype.md - - docs/components/openresponsesreasoningsummarytextdoneevent.md - - docs/components/openresponsesreasoningsummarytextdoneeventtype.md - - docs/components/openresponsesreasoningtype.md - - docs/components/openresponsesrequest.md - - docs/components/openresponsesrequestidautorouter.md - - docs/components/openresponsesrequestidfileparser.md - - docs/components/openresponsesrequestidmoderation.md - - docs/components/openresponsesrequestidresponsehealing.md - - docs/components/openresponsesrequestidweb.md - - docs/components/openresponsesrequestignore.md - - docs/components/openresponsesrequestimageconfig.md - - docs/components/openresponsesrequestmaxprice.md - - docs/components/openresponsesrequestonly.md - - docs/components/openresponsesrequestorder.md - - docs/components/openresponsesrequestpluginautorouter.md - - docs/components/openresponsesrequestpluginfileparser.md - - docs/components/openresponsesrequestpluginmoderation.md - - docs/components/openresponsesrequestpluginresponsehealing.md - - docs/components/openresponsesrequestpluginunion.md - - docs/components/openresponsesrequestpluginweb.md - - docs/components/openresponsesrequestprovider.md - - docs/components/openresponsesrequestsort.md - - docs/components/openresponsesrequesttoolfunction.md - - docs/components/openresponsesrequesttoolunion.md - - docs/components/openresponsesrequesttrace.md - - docs/components/openresponsesrequesttype.md - - docs/components/openresponsesresponsetext.md - - docs/components/openresponsesresponsetextverbosity.md - - docs/components/openresponsesstreamevent.md - - docs/components/openresponsesstreameventresponsecompleted.md - - docs/components/openresponsesstreameventresponsecontentpartadded.md - - docs/components/openresponsesstreameventresponsecontentpartdone.md - - docs/components/openresponsesstreameventresponsecreated.md - - docs/components/openresponsesstreameventresponsefailed.md - - docs/components/openresponsesstreameventresponsefunctioncallargumentsdelta.md - - docs/components/openresponsesstreameventresponsefunctioncallargumentsdone.md - - docs/components/openresponsesstreameventresponseincomplete.md - - docs/components/openresponsesstreameventresponseinprogress.md - - docs/components/openresponsesstreameventresponseoutputitemadded.md - - docs/components/openresponsesstreameventresponseoutputitemdone.md - - docs/components/openresponsesstreameventresponseoutputtextannotationadded.md - - docs/components/openresponsesstreameventresponseoutputtextdelta.md - - docs/components/openresponsesstreameventresponseoutputtextdone.md - - docs/components/openresponsesstreameventresponsereasoningsummarypartdone.md - - docs/components/openresponsesstreameventresponserefusaldelta.md - - docs/components/openresponsesstreameventresponserefusaldone.md - - docs/components/openresponsestoplogprobs.md - - docs/components/openresponsesusage.md - - docs/components/openresponseswebsearch20250826tool.md - - docs/components/openresponseswebsearch20250826toolfilters.md - - docs/components/openresponseswebsearch20250826tooltype.md - - docs/components/openresponseswebsearchpreview20250311tool.md - - docs/components/openresponseswebsearchpreview20250311tooltype.md - - docs/components/openresponseswebsearchpreviewtool.md - - docs/components/openresponseswebsearchpreviewtooltype.md - - docs/components/openresponseswebsearchtool.md - - docs/components/openresponseswebsearchtoolfilters.md - - docs/components/openresponseswebsearchtooltype.md - - docs/components/outputitemimagegenerationcall.md - - docs/components/outputitemimagegenerationcalltype.md - - docs/components/outputmessage.md - - docs/components/outputmessagecontent.md - - docs/components/outputmessagerole.md - - docs/components/outputmessagestatuscompleted.md - - docs/components/outputmessagestatusincomplete.md - - docs/components/outputmessagestatusinprogress.md - - docs/components/outputmessagestatusunion.md - - docs/components/outputmessagetype.md - - docs/components/outputmodality.md - - docs/components/outputtokensdetails.md - - docs/components/parameter.md - - docs/components/part1.md - - docs/components/part2.md - - docs/components/partition.md - - docs/components/payloadtoolargeresponseerrordata.md - - docs/components/paymentrequiredresponseerrordata.md - - docs/components/pdfparserengine.md - - docs/components/pdfparseroptions.md - - docs/components/percentilelatencycutoffs.md - - docs/components/percentilestats.md - - docs/components/percentilethroughputcutoffs.md - - docs/components/perrequestlimits.md - - docs/components/preferredmaxlatency.md - - docs/components/preferredminthroughput.md - - docs/components/pricing.md - - docs/components/prompttokensdetails.md - - docs/components/providername.md - - docs/components/provideroverloadedresponseerrordata.md - - docs/components/providerpreferences.md - - docs/components/providerpreferencesby.md - - docs/components/providerpreferencesignore.md - - docs/components/providerpreferencesmaxprice.md - - docs/components/providerpreferencesonly.md - - docs/components/providerpreferencesorder.md - - docs/components/providerpreferencespartition.md - - docs/components/providerpreferencesprovidersort.md - - docs/components/providerpreferencesprovidersortconfig.md - - docs/components/providerpreferencesprovidersortconfigenum.md - - docs/components/providerpreferencesprovidersortconfigunion.md - - docs/components/providerpreferencessortenum.md - - docs/components/providerpreferencessortunion.md - - docs/components/providersort.md - - docs/components/providersortconfig.md - - docs/components/publicendpoint.md - - docs/components/publicendpointquantization.md - - docs/components/publicpricing.md - - docs/components/quantization.md - - docs/components/reason.md - - docs/components/reasoning.md - - docs/components/reasoningdetailencrypted.md - - docs/components/reasoningdetailencryptedformat.md - - docs/components/reasoningdetailencryptedtype.md - - docs/components/reasoningdetailsummary.md - - docs/components/reasoningdetailsummaryformat.md - - docs/components/reasoningdetailsummarytype.md - - docs/components/reasoningdetailtext.md - - docs/components/reasoningdetailtextformat.md - - docs/components/reasoningdetailtexttype.md - - docs/components/reasoningdetailunion.md - - docs/components/reasoningsummarytext.md - - docs/components/reasoningsummarytexttype.md - - docs/components/reasoningsummaryverbosity.md - - docs/components/reasoningtextcontent.md - - docs/components/reasoningtextcontenttype.md - - docs/components/requesttimeoutresponseerrordata.md - - docs/components/responseformat.md - - docs/components/responseformatjsonobject.md - - docs/components/responseformatjsonobjecttype.md - - docs/components/responseformatjsonschema.md - - docs/components/responseformatjsonschematype.md - - docs/components/responseformattext.md - - docs/components/responseformattextconfig.md - - docs/components/responseformattextgrammar.md - - docs/components/responseformattextgrammartype.md - - docs/components/responseformattextpython.md - - docs/components/responseformattextpythontype.md - - docs/components/responseformattexttype.md - - docs/components/responseinputaudio.md - - docs/components/responseinputaudioformat.md - - docs/components/responseinputaudioinputaudio.md - - docs/components/responseinputaudiotype.md - - docs/components/responseinputfile.md - - docs/components/responseinputfiletype.md - - docs/components/responseinputimage.md - - docs/components/responseinputimagedetail.md - - docs/components/responseinputimagetype.md - - docs/components/responseinputtext.md - - docs/components/responseinputtexttype.md - - docs/components/responseinputvideo.md - - docs/components/responseinputvideotype.md - - docs/components/responseoutputtext.md - - docs/components/responseoutputtexttoplogprob.md - - docs/components/responseoutputtexttype.md - - docs/components/responseserrorfield.md - - docs/components/responsesformattext.md - - docs/components/responsesformattextjsonschemaconfig.md - - docs/components/responsesformattextjsonschemaconfigtype.md - - docs/components/responsesformattexttype.md - - docs/components/responsesimagegenerationcall.md - - docs/components/responsesimagegenerationcalltype.md - - docs/components/responsesoutputitem.md - - docs/components/responsesoutputitemfilesearchcall.md - - docs/components/responsesoutputitemfilesearchcalltype.md - - docs/components/responsesoutputitemfunctioncall.md - - docs/components/responsesoutputitemfunctioncallstatuscompleted.md - - docs/components/responsesoutputitemfunctioncallstatusincomplete.md - - docs/components/responsesoutputitemfunctioncallstatusinprogress.md - - docs/components/responsesoutputitemfunctioncallstatusunion.md - - docs/components/responsesoutputitemfunctioncalltype.md - - docs/components/responsesoutputitemreasoning.md - - docs/components/responsesoutputitemreasoningformat.md - - docs/components/responsesoutputitemreasoningstatuscompleted.md - - docs/components/responsesoutputitemreasoningstatusincomplete.md - - docs/components/responsesoutputitemreasoningstatusinprogress.md - - docs/components/responsesoutputitemreasoningstatusunion.md - - docs/components/responsesoutputitemreasoningtype.md - - docs/components/responsesoutputmessage.md - - docs/components/responsesoutputmessagecontent.md - - docs/components/responsesoutputmessagerole.md - - docs/components/responsesoutputmessagestatuscompleted.md - - docs/components/responsesoutputmessagestatusincomplete.md - - docs/components/responsesoutputmessagestatusinprogress.md - - docs/components/responsesoutputmessagestatusunion.md - - docs/components/responsesoutputmessagetype.md - - docs/components/responsesoutputmodality.md - - docs/components/responsessearchcontextsize.md - - docs/components/responseswebsearchcalloutput.md - - docs/components/responseswebsearchcalloutputtype.md - - docs/components/responseswebsearchuserlocation.md - - docs/components/responseswebsearchuserlocationtype.md - - docs/components/responsetextconfig.md - - docs/components/responsetextconfigverbosity.md - - docs/components/security.md - - docs/components/servicetier.md - - docs/components/serviceunavailableresponseerrordata.md - - docs/components/stop.md - - docs/components/systemmessage.md - - docs/components/systemmessagecontent.md - - docs/components/systemmessagerole.md - - docs/components/tokenizer.md - - docs/components/toolcallstatus.md - - docs/components/toolchoiceoption.md - - docs/components/toolchoiceoptionauto.md - - docs/components/toolchoiceoptionnone.md - - docs/components/toolchoiceoptionrequired.md - - docs/components/tooldefinitionjson.md - - docs/components/tooldefinitionjsonfunction.md - - docs/components/tooldefinitionjsontype.md - - docs/components/toolresponsemessage.md - - docs/components/toolresponsemessagecontent.md - - docs/components/toolresponsemessagerole.md - - docs/components/toomanyrequestsresponseerrordata.md - - docs/components/topproviderinfo.md - - docs/components/truncation.md - - docs/components/ttl.md - - docs/components/type.md - - docs/components/typeresponsecompleted.md - - docs/components/typeresponsecontentpartadded.md - - docs/components/typeresponsecontentpartdone.md - - docs/components/typeresponsecreated.md - - docs/components/typeresponsefailed.md - - docs/components/typeresponsefunctioncallargumentsdelta.md - - docs/components/typeresponsefunctioncallargumentsdone.md - - docs/components/typeresponseincomplete.md - - docs/components/typeresponseinprogress.md - - docs/components/typeresponseoutputitemadded.md - - docs/components/typeresponseoutputitemdone.md - - docs/components/typeresponseoutputtextannotationadded.md - - docs/components/typeresponseoutputtextdelta.md - - docs/components/typeresponseoutputtextdone.md - - docs/components/typeresponsereasoningsummarypartdone.md - - docs/components/typeresponserefusaldelta.md - - docs/components/typeresponserefusaldone.md - - docs/components/unauthorizedresponseerrordata.md - - docs/components/unprocessableentityresponseerrordata.md - - docs/components/urlcitation.md - - docs/components/urlcitationtype.md - - docs/components/usermessage.md - - docs/components/usermessagecontent.md - - docs/components/usermessagerole.md - - docs/components/variables.md - - docs/components/videoinput.md - - docs/components/websearchengine.md - - docs/components/websearchpreviewtooluserlocation.md - - docs/components/websearchpreviewtooluserlocationtype.md - - docs/components/websearchstatus.md - - docs/errors/badgatewayresponseerror.md - - docs/errors/badrequestresponseerror.md - - docs/errors/edgenetworktimeoutresponseerror.md - - docs/errors/forbiddenresponseerror.md - - docs/errors/internalserverresponseerror.md - - docs/errors/notfoundresponseerror.md - - docs/errors/payloadtoolargeresponseerror.md - - docs/errors/paymentrequiredresponseerror.md - - docs/errors/provideroverloadedresponseerror.md - - docs/errors/requesttimeoutresponseerror.md - - docs/errors/serviceunavailableresponseerror.md - - docs/errors/toomanyrequestsresponseerror.md - - docs/errors/unauthorizedresponseerror.md - - docs/errors/unprocessableentityresponseerror.md - - docs/models/internal/globals.md - - docs/models/utils/retryconfig.md - - docs/operations/apitype.md - - docs/operations/bulkassignkeystoguardrailglobals.md - - docs/operations/bulkassignkeystoguardrailrequest.md - - docs/operations/bulkassignkeystoguardrailrequestbody.md - - docs/operations/bulkassignkeystoguardrailresponse.md - - docs/operations/bulkassignmemberstoguardrailglobals.md - - docs/operations/bulkassignmemberstoguardrailrequest.md - - docs/operations/bulkassignmemberstoguardrailrequestbody.md - - docs/operations/bulkassignmemberstoguardrailresponse.md - - docs/operations/bulkunassignkeysfromguardrailglobals.md - - docs/operations/bulkunassignkeysfromguardrailrequest.md - - docs/operations/bulkunassignkeysfromguardrailrequestbody.md - - docs/operations/bulkunassignkeysfromguardrailresponse.md - - docs/operations/bulkunassignmembersfromguardrailglobals.md - - docs/operations/bulkunassignmembersfromguardrailrequest.md - - docs/operations/bulkunassignmembersfromguardrailrequestbody.md - - docs/operations/bulkunassignmembersfromguardrailresponse.md - - docs/operations/calldata.md - - docs/operations/category.md - - docs/operations/content.md - - docs/operations/contentimageurl.md - - docs/operations/contenttext.md - - docs/operations/createauthkeyscodecodechallengemethod.md - - docs/operations/createauthkeyscodedata.md - - docs/operations/createauthkeyscodeglobals.md - - docs/operations/createauthkeyscoderequest.md - - docs/operations/createauthkeyscoderequestbody.md - - docs/operations/createauthkeyscoderesponse.md - - docs/operations/createcoinbasechargedata.md - - docs/operations/createcoinbasechargeglobals.md - - docs/operations/createcoinbasechargerequest.md - - docs/operations/createcoinbasechargeresponse.md - - docs/operations/createcoinbasechargesecurity.md - - docs/operations/createembeddingsdata.md - - docs/operations/createembeddingsglobals.md - - docs/operations/createembeddingsrequest.md - - docs/operations/createembeddingsrequestbody.md - - docs/operations/createembeddingsresponse.md - - docs/operations/createembeddingsresponsebody.md - - docs/operations/createguardraildata.md - - docs/operations/createguardrailglobals.md - - docs/operations/createguardrailrequest.md - - docs/operations/createguardrailrequestbody.md - - docs/operations/createguardrailresetintervalrequest.md - - docs/operations/createguardrailresetintervalresponse.md - - docs/operations/createguardrailresponse.md - - docs/operations/createkeysdata.md - - docs/operations/createkeysglobals.md - - docs/operations/createkeyslimitreset.md - - docs/operations/createkeysrequest.md - - docs/operations/createkeysrequestbody.md - - docs/operations/createkeysresponse.md - - docs/operations/createresponsesglobals.md - - docs/operations/createresponsesrequest.md - - docs/operations/createresponsesresponse.md - - docs/operations/createresponsesresponsebody.md - - docs/operations/deleteguardrailglobals.md - - docs/operations/deleteguardrailrequest.md - - docs/operations/deleteguardrailresponse.md - - docs/operations/deletekeysglobals.md - - docs/operations/deletekeysrequest.md - - docs/operations/deletekeysresponse.md - - docs/operations/embedding.md - - docs/operations/encodingformat.md - - docs/operations/exchangeauthcodeforapikeycodechallengemethod.md - - docs/operations/exchangeauthcodeforapikeyglobals.md - - docs/operations/exchangeauthcodeforapikeyrequest.md - - docs/operations/exchangeauthcodeforapikeyrequestbody.md - - docs/operations/exchangeauthcodeforapikeyresponse.md - - docs/operations/getcreditsdata.md - - docs/operations/getcreditsglobals.md - - docs/operations/getcreditsrequest.md - - docs/operations/getcreditsresponse.md - - docs/operations/getcurrentkeydata.md - - docs/operations/getcurrentkeyglobals.md - - docs/operations/getcurrentkeyrequest.md - - docs/operations/getcurrentkeyresponse.md - - docs/operations/getgenerationdata.md - - docs/operations/getgenerationglobals.md - - docs/operations/getgenerationrequest.md - - docs/operations/getgenerationresponse.md - - docs/operations/getguardraildata.md - - docs/operations/getguardrailglobals.md - - docs/operations/getguardrailrequest.md - - docs/operations/getguardrailresetinterval.md - - docs/operations/getguardrailresponse.md - - docs/operations/getkeydata.md - - docs/operations/getkeyglobals.md - - docs/operations/getkeyrequest.md - - docs/operations/getkeyresponse.md - - docs/operations/getmodelsglobals.md - - docs/operations/getmodelsrequest.md - - docs/operations/getuseractivityglobals.md - - docs/operations/getuseractivityrequest.md - - docs/operations/getuseractivityresponse.md - - docs/operations/imageurl.md - - docs/operations/input.md - - docs/operations/inputunion.md - - docs/operations/listdata.md - - docs/operations/listembeddingsmodelsglobals.md - - docs/operations/listembeddingsmodelsrequest.md - - docs/operations/listendpointsglobals.md - - docs/operations/listendpointsrequest.md - - docs/operations/listendpointsresponse.md - - docs/operations/listendpointszdrglobals.md - - docs/operations/listendpointszdrrequest.md - - docs/operations/listendpointszdrresponse.md - - docs/operations/listglobals.md - - docs/operations/listguardrailkeyassignmentsdata.md - - docs/operations/listguardrailkeyassignmentsglobals.md - - docs/operations/listguardrailkeyassignmentsrequest.md - - docs/operations/listguardrailkeyassignmentsresponse.md - - docs/operations/listguardrailmemberassignmentsdata.md - - docs/operations/listguardrailmemberassignmentsglobals.md - - docs/operations/listguardrailmemberassignmentsrequest.md - - docs/operations/listguardrailmemberassignmentsresponse.md - - docs/operations/listguardrailsdata.md - - docs/operations/listguardrailsglobals.md - - docs/operations/listguardrailsrequest.md - - docs/operations/listguardrailsresetinterval.md - - docs/operations/listguardrailsresponse.md - - docs/operations/listkeyassignmentsdata.md - - docs/operations/listkeyassignmentsglobals.md - - docs/operations/listkeyassignmentsrequest.md - - docs/operations/listkeyassignmentsresponse.md - - docs/operations/listmemberassignmentsdata.md - - docs/operations/listmemberassignmentsglobals.md - - docs/operations/listmemberassignmentsrequest.md - - docs/operations/listmemberassignmentsresponse.md - - docs/operations/listmodelscountglobals.md - - docs/operations/listmodelscountrequest.md - - docs/operations/listmodelsuserglobals.md - - docs/operations/listmodelsuserrequest.md - - docs/operations/listmodelsusersecurity.md - - docs/operations/listprovidersdata.md - - docs/operations/listprovidersglobals.md - - docs/operations/listprovidersrequest.md - - docs/operations/listprovidersresponse.md - - docs/operations/listrequest.md - - docs/operations/listresponse.md - - docs/operations/metadata.md - - docs/operations/object.md - - docs/operations/objectembedding.md - - docs/operations/providername.md - - docs/operations/providerresponse.md - - docs/operations/ratelimit.md - - docs/operations/sendchatcompletionrequestglobals.md - - docs/operations/sendchatcompletionrequestrequest.md - - docs/operations/sendchatcompletionrequestresponse.md - - docs/operations/sendchatcompletionrequestresponsebody.md - - docs/operations/transferintent.md - - docs/operations/typeimageurl.md - - docs/operations/typetext.md - - docs/operations/updateguardraildata.md - - docs/operations/updateguardrailglobals.md - - docs/operations/updateguardrailrequest.md - - docs/operations/updateguardrailrequestbody.md - - docs/operations/updateguardrailresetintervalrequest.md - - docs/operations/updateguardrailresetintervalresponse.md - - docs/operations/updateguardrailresponse.md - - docs/operations/updatekeysdata.md - - docs/operations/updatekeysglobals.md - - docs/operations/updatekeyslimitreset.md - - docs/operations/updatekeysrequest.md - - docs/operations/updatekeysrequestbody.md - - docs/operations/updatekeysresponse.md - - docs/operations/usage.md - - docs/operations/usagelimittype.md - - docs/operations/web3data.md - - docs/sdks/analytics/README.md - - docs/sdks/apikeys/README.md - - docs/sdks/chat/README.md - - docs/sdks/credits/README.md - - docs/sdks/embeddings/README.md - - docs/sdks/endpoints/README.md - - docs/sdks/generations/README.md - - docs/sdks/guardrails/README.md - - docs/sdks/models/README.md - - docs/sdks/oauth/README.md - - docs/sdks/providers/README.md - - docs/sdks/responses/README.md - - py.typed - - pyproject.toml - - scripts/prepare_readme.py - - scripts/publish.sh - - src/openrouter/__init__.py - - src/openrouter/_hooks/__init__.py - - src/openrouter/_hooks/sdkhooks.py - - src/openrouter/_hooks/types.py - - src/openrouter/_version.py - - src/openrouter/analytics.py - - src/openrouter/api_keys.py - - src/openrouter/basesdk.py - - src/openrouter/beta.py - - src/openrouter/chat.py - - src/openrouter/components/__init__.py - - src/openrouter/components/activityitem.py - - src/openrouter/components/assistantmessage.py - - src/openrouter/components/assistantmessageimages.py - - src/openrouter/components/badgatewayresponseerrordata.py - - src/openrouter/components/badrequestresponseerrordata.py - - src/openrouter/components/chatcompletionfinishreason.py - - src/openrouter/components/chatgenerationparams.py - - src/openrouter/components/chatgenerationtokenusage.py - - src/openrouter/components/chatmessagecontentitem.py - - src/openrouter/components/chatmessagecontentitemaudio.py - - src/openrouter/components/chatmessagecontentitemcachecontrol.py - - src/openrouter/components/chatmessagecontentitemimage.py - - src/openrouter/components/chatmessagecontentitemtext.py - - src/openrouter/components/chatmessagecontentitemvideo.py - - src/openrouter/components/chatmessagecontentitemvideolegacy.py - - src/openrouter/components/chatmessagetokenlogprob.py - - src/openrouter/components/chatmessagetokenlogprobs.py - - src/openrouter/components/chatmessagetoolcall.py - - src/openrouter/components/chatresponse.py - - src/openrouter/components/chatresponsechoice.py - - src/openrouter/components/chatstreamingchoice.py - - src/openrouter/components/chatstreamingmessagechunk.py - - src/openrouter/components/chatstreamingmessagetoolcall.py - - src/openrouter/components/chatstreamingresponsechunk.py - - src/openrouter/components/chatstreamoptions.py - - src/openrouter/components/createchargerequest.py - - src/openrouter/components/datacollection.py - - src/openrouter/components/debugoptions.py - - src/openrouter/components/defaultparameters.py - - src/openrouter/components/developermessage.py - - src/openrouter/components/edgenetworktimeoutresponseerrordata.py - - src/openrouter/components/endpointstatus.py - - src/openrouter/components/filecitation.py - - src/openrouter/components/filepath.py - - src/openrouter/components/forbiddenresponseerrordata.py - - src/openrouter/components/imagegenerationstatus.py - - src/openrouter/components/inputmodality.py - - src/openrouter/components/instructtype.py - - src/openrouter/components/internalserverresponseerrordata.py - - src/openrouter/components/jsonschemaconfig.py - - src/openrouter/components/listendpointsresponse.py - - src/openrouter/components/message.py - - src/openrouter/components/model.py - - src/openrouter/components/modelarchitecture.py - - src/openrouter/components/modelgroup.py - - src/openrouter/components/modelscountresponse.py - - src/openrouter/components/modelslistresponse.py - - src/openrouter/components/namedtoolchoice.py - - src/openrouter/components/notfoundresponseerrordata.py - - src/openrouter/components/openairesponsesannotation.py - - src/openrouter/components/openairesponsesincludable.py - - src/openrouter/components/openairesponsesincompletedetails.py - - src/openrouter/components/openairesponsesinput_union.py - - src/openrouter/components/openairesponsesprompt.py - - src/openrouter/components/openairesponsesreasoningconfig.py - - src/openrouter/components/openairesponsesreasoningeffort.py - - src/openrouter/components/openairesponsesrefusalcontent.py - - src/openrouter/components/openairesponsesresponsestatus.py - - src/openrouter/components/openairesponsesservicetier.py - - src/openrouter/components/openairesponsestoolchoice_union.py - - src/openrouter/components/openairesponsestruncation.py - - src/openrouter/components/openresponseseasyinputmessage.py - - src/openrouter/components/openresponseserrorevent.py - - src/openrouter/components/openresponsesfunctioncalloutput.py - - src/openrouter/components/openresponsesfunctiontoolcall.py - - src/openrouter/components/openresponsesimagegencallcompleted.py - - src/openrouter/components/openresponsesimagegencallgenerating.py - - src/openrouter/components/openresponsesimagegencallinprogress.py - - src/openrouter/components/openresponsesimagegencallpartialimage.py - - src/openrouter/components/openresponsesinput.py - - src/openrouter/components/openresponsesinputmessageitem.py - - src/openrouter/components/openresponseslogprobs.py - - src/openrouter/components/openresponsesnonstreamingresponse.py - - src/openrouter/components/openresponsesreasoning.py - - src/openrouter/components/openresponsesreasoningconfig.py - - src/openrouter/components/openresponsesreasoningdeltaevent.py - - src/openrouter/components/openresponsesreasoningdoneevent.py - - src/openrouter/components/openresponsesreasoningsummarypartaddedevent.py - - src/openrouter/components/openresponsesreasoningsummarytextdeltaevent.py - - src/openrouter/components/openresponsesreasoningsummarytextdoneevent.py - - src/openrouter/components/openresponsesrequest.py - - src/openrouter/components/openresponsesresponsetext.py - - src/openrouter/components/openresponsesstreamevent.py - - src/openrouter/components/openresponsestoplogprobs.py - - src/openrouter/components/openresponsesusage.py - - src/openrouter/components/openresponseswebsearch20250826tool.py - - src/openrouter/components/openresponseswebsearchpreview20250311tool.py - - src/openrouter/components/openresponseswebsearchpreviewtool.py - - src/openrouter/components/openresponseswebsearchtool.py - - src/openrouter/components/outputitemimagegenerationcall.py - - src/openrouter/components/outputmessage.py - - src/openrouter/components/outputmodality.py - - src/openrouter/components/parameter.py - - src/openrouter/components/payloadtoolargeresponseerrordata.py - - src/openrouter/components/paymentrequiredresponseerrordata.py - - src/openrouter/components/pdfparserengine.py - - src/openrouter/components/pdfparseroptions.py - - src/openrouter/components/percentilelatencycutoffs.py - - src/openrouter/components/percentilestats.py - - src/openrouter/components/percentilethroughputcutoffs.py - - src/openrouter/components/perrequestlimits.py - - src/openrouter/components/preferredmaxlatency.py - - src/openrouter/components/preferredminthroughput.py - - src/openrouter/components/providername.py - - src/openrouter/components/provideroverloadedresponseerrordata.py - - src/openrouter/components/providerpreferences.py - - src/openrouter/components/providersort.py - - src/openrouter/components/providersortconfig.py - - src/openrouter/components/publicendpoint.py - - src/openrouter/components/publicpricing.py - - src/openrouter/components/quantization.py - - src/openrouter/components/reasoningdetailencrypted.py - - src/openrouter/components/reasoningdetailsummary.py - - src/openrouter/components/reasoningdetailtext.py - - src/openrouter/components/reasoningdetailunion.py - - src/openrouter/components/reasoningsummarytext.py - - src/openrouter/components/reasoningsummaryverbosity.py - - src/openrouter/components/reasoningtextcontent.py - - src/openrouter/components/requesttimeoutresponseerrordata.py - - src/openrouter/components/responseformatjsonobject.py - - src/openrouter/components/responseformatjsonschema.py - - src/openrouter/components/responseformattext.py - - src/openrouter/components/responseformattextconfig.py - - src/openrouter/components/responseformattextgrammar.py - - src/openrouter/components/responseformattextpython.py - - src/openrouter/components/responseinputaudio.py - - src/openrouter/components/responseinputfile.py - - src/openrouter/components/responseinputimage.py - - src/openrouter/components/responseinputtext.py - - src/openrouter/components/responseinputvideo.py - - src/openrouter/components/responseoutputtext.py - - src/openrouter/components/responseserrorfield.py - - src/openrouter/components/responsesformattext.py - - src/openrouter/components/responsesformattextjsonschemaconfig.py - - src/openrouter/components/responsesimagegenerationcall.py - - src/openrouter/components/responsesoutputitem.py - - src/openrouter/components/responsesoutputitemfilesearchcall.py - - src/openrouter/components/responsesoutputitemfunctioncall.py - - src/openrouter/components/responsesoutputitemreasoning.py - - src/openrouter/components/responsesoutputmessage.py - - src/openrouter/components/responsesoutputmodality.py - - src/openrouter/components/responsessearchcontextsize.py - - src/openrouter/components/responseswebsearchcalloutput.py - - src/openrouter/components/responseswebsearchuserlocation.py - - src/openrouter/components/responsetextconfig.py - - src/openrouter/components/security.py - - src/openrouter/components/serviceunavailableresponseerrordata.py - - src/openrouter/components/systemmessage.py - - src/openrouter/components/toolcallstatus.py - - src/openrouter/components/toolchoiceoption.py - - src/openrouter/components/tooldefinitionjson.py - - src/openrouter/components/toolresponsemessage.py - - src/openrouter/components/toomanyrequestsresponseerrordata.py - - src/openrouter/components/topproviderinfo.py - - src/openrouter/components/unauthorizedresponseerrordata.py - - src/openrouter/components/unprocessableentityresponseerrordata.py - - src/openrouter/components/urlcitation.py - - src/openrouter/components/usermessage.py - - src/openrouter/components/videoinput.py - - src/openrouter/components/websearchengine.py - - src/openrouter/components/websearchpreviewtooluserlocation.py - - src/openrouter/components/websearchstatus.py - - src/openrouter/credits.py - - src/openrouter/embeddings.py - - src/openrouter/endpoints.py - - src/openrouter/errors/__init__.py - - src/openrouter/errors/badgatewayresponse_error.py - - src/openrouter/errors/badrequestresponse_error.py - - src/openrouter/errors/edgenetworktimeoutresponse_error.py - - src/openrouter/errors/forbiddenresponse_error.py - - src/openrouter/errors/internalserverresponse_error.py - - src/openrouter/errors/no_response_error.py - - src/openrouter/errors/notfoundresponse_error.py - - src/openrouter/errors/openrouterdefaulterror.py - - src/openrouter/errors/openroutererror.py - - src/openrouter/errors/payloadtoolargeresponse_error.py - - src/openrouter/errors/paymentrequiredresponse_error.py - - src/openrouter/errors/provideroverloadedresponse_error.py - - src/openrouter/errors/requesttimeoutresponse_error.py - - src/openrouter/errors/responsevalidationerror.py - - src/openrouter/errors/serviceunavailableresponse_error.py - - src/openrouter/errors/toomanyrequestsresponse_error.py - - src/openrouter/errors/unauthorizedresponse_error.py - - src/openrouter/errors/unprocessableentityresponse_error.py - - src/openrouter/generations.py - - src/openrouter/guardrails.py - - src/openrouter/httpclient.py - - src/openrouter/models/__init__.py - - src/openrouter/models/internal/__init__.py - - src/openrouter/models/internal/globals.py - - src/openrouter/models_.py - - src/openrouter/oauth.py - - src/openrouter/operations/__init__.py - - src/openrouter/operations/bulkassignkeystoguardrail.py - - src/openrouter/operations/bulkassignmemberstoguardrail.py - - src/openrouter/operations/bulkunassignkeysfromguardrail.py - - src/openrouter/operations/bulkunassignmembersfromguardrail.py - - src/openrouter/operations/createauthkeyscode.py - - src/openrouter/operations/createcoinbasecharge.py - - src/openrouter/operations/createembeddings.py - - src/openrouter/operations/createguardrail.py - - src/openrouter/operations/createkeys.py - - src/openrouter/operations/createresponses.py - - src/openrouter/operations/deleteguardrail.py - - src/openrouter/operations/deletekeys.py - - src/openrouter/operations/exchangeauthcodeforapikey.py - - src/openrouter/operations/getcredits.py - - src/openrouter/operations/getcurrentkey.py - - src/openrouter/operations/getgeneration.py - - src/openrouter/operations/getguardrail.py - - src/openrouter/operations/getkey.py - - src/openrouter/operations/getmodels.py - - src/openrouter/operations/getuseractivity.py - - src/openrouter/operations/list.py - - src/openrouter/operations/listembeddingsmodels.py - - src/openrouter/operations/listendpoints.py - - src/openrouter/operations/listendpointszdr.py - - src/openrouter/operations/listguardrailkeyassignments.py - - src/openrouter/operations/listguardrailmemberassignments.py - - src/openrouter/operations/listguardrails.py - - src/openrouter/operations/listkeyassignments.py - - src/openrouter/operations/listmemberassignments.py - - src/openrouter/operations/listmodelscount.py - - src/openrouter/operations/listmodelsuser.py - - src/openrouter/operations/listproviders.py - - src/openrouter/operations/sendchatcompletionrequest.py - - src/openrouter/operations/updateguardrail.py - - src/openrouter/operations/updatekeys.py - - src/openrouter/providers.py - - src/openrouter/py.typed - - src/openrouter/responses.py - - src/openrouter/sdk.py - - src/openrouter/sdkconfiguration.py - - src/openrouter/types/__init__.py - - src/openrouter/types/basemodel.py - - src/openrouter/utils/__init__.py - - src/openrouter/utils/annotations.py - - src/openrouter/utils/datetimes.py - - src/openrouter/utils/enums.py - - src/openrouter/utils/eventstreaming.py - - src/openrouter/utils/forms.py - - src/openrouter/utils/headers.py - - src/openrouter/utils/logger.py - - src/openrouter/utils/metadata.py - - src/openrouter/utils/queryparams.py - - src/openrouter/utils/requestbodies.py - - src/openrouter/utils/retries.py - - src/openrouter/utils/security.py - - src/openrouter/utils/serializers.py - - src/openrouter/utils/unmarshal_json_response.py - - src/openrouter/utils/url.py - - src/openrouter/utils/values.py diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 232d0e4..30b65e5 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: skipResponseBodyAssertions: false preApplyUnionDiscriminators: true python: - version: 0.8.0 + version: 0.8.1 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 8cb8137..17044b7 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -3826,6 +3826,40 @@ components: error: code: 408 message: Operation timed out. Please try again later. + GoneResponseErrorData: + type: object + properties: + code: + type: integer + message: + type: string + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + required: + - code + - message + description: Error data for GoneResponse + example: + code: 410 + message: The Coinbase APIs used by this endpoint have been deprecated, so the Coinbase Commerce credits API has been removed. Use the web credits purchase flow instead. + GoneResponse: + type: object + properties: + error: + $ref: '#/components/schemas/GoneResponseErrorData' + user_id: + type: string + nullable: true + required: + - error + description: Gone - Endpoint has been permanently removed or deprecated + example: + error: + code: 410 + message: The Coinbase APIs used by this endpoint have been deprecated, so the Coinbase Commerce credits API has been removed. Use the web credits purchase flow instead. PayloadTooLargeResponseErrorData: type: object properties: @@ -13332,28 +13366,6 @@ components: model: openai/gpt-4 temperature: 0.7 max_tokens: 150 - CreateChargeRequest: - type: object - properties: - amount: - type: number - sender: - type: string - chain_id: - type: integer - enum: - - 1 - - 137 - - 8453 - required: - - amount - - sender - - chain_id - description: Create a Coinbase charge for crypto payment - example: - amount: 100 - sender: '0x1234567890123456789012345678901234567890' - chain_id: 1 ProviderPreferences: type: object properties: @@ -14880,126 +14892,21 @@ paths: $ref: '#/components/schemas/InternalServerResponse' /credits/coinbase: post: - security: - - bearer: [] + security: [] x-speakeasy-name-override: createCoinbaseCharge + deprecated: true tags: - Credits - summary: Create a Coinbase charge for crypto payment + summary: Deprecated Coinbase Commerce charge endpoint operationId: createCoinbaseCharge - description: Create a Coinbase charge for crypto payment - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateChargeRequest' - required: true + description: Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead. responses: - '200': - description: Returns the calldata to fulfill the transaction + '410': + description: Gone - Coinbase Commerce charge creation has been removed content: application/json: schema: - type: object - properties: - data: - type: object - properties: - id: - type: string - created_at: - type: string - expires_at: - type: string - web3_data: - type: object - properties: - transfer_intent: - type: object - properties: - call_data: - type: object - properties: - deadline: - type: string - fee_amount: - type: string - id: - type: string - operator: - type: string - prefix: - type: string - recipient: - type: string - recipient_amount: - type: string - recipient_currency: - type: string - refund_destination: - type: string - signature: - type: string - required: - - deadline - - fee_amount - - id - - operator - - prefix - - recipient - - recipient_amount - - recipient_currency - - refund_destination - - signature - metadata: - type: object - properties: - chain_id: - type: number - contract_address: - type: string - sender: - type: string - required: - - chain_id - - contract_address - - sender - required: - - call_data - - metadata - required: - - transfer_intent - required: - - id - - created_at - - expires_at - - web3_data - required: - - data - '400': - description: Bad Request - Invalid credit amount or request body - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestResponse' - '401': - description: Unauthorized - Authentication required or invalid credentials - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '429': - description: Too Many Requests - Rate limit exceeded - content: - application/json: - schema: - $ref: '#/components/schemas/TooManyRequestsResponse' - '500': - description: Internal Server Error - Unexpected server error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' + $ref: '#/components/schemas/GoneResponse' /embeddings: post: x-speakeasy-name-override: generate diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 7af13f0..71cbd75 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -3847,6 +3847,40 @@ components: error: code: 408 message: Operation timed out. Please try again later. + GoneResponseErrorData: + type: object + properties: + code: + type: integer + message: + type: string + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + required: + - code + - message + description: Error data for GoneResponse + example: + code: 410 + message: The Coinbase APIs used by this endpoint have been deprecated, so the Coinbase Commerce credits API has been removed. Use the web credits purchase flow instead. + GoneResponse: + type: object + properties: + error: + $ref: '#/components/schemas/GoneResponseErrorData' + user_id: + type: string + nullable: true + required: + - error + description: Gone - Endpoint has been permanently removed or deprecated + example: + error: + code: 410 + message: The Coinbase APIs used by this endpoint have been deprecated, so the Coinbase Commerce credits API has been removed. Use the web credits purchase flow instead. PayloadTooLargeResponseErrorData: type: object properties: @@ -13347,29 +13381,6 @@ components: model: openai/gpt-4 temperature: 0.7 max_tokens: 150 - CreateChargeRequest: - type: object - properties: - amount: - type: number - sender: - type: string - chain_id: - type: integer - enum: - - 1 - - 137 - - 8453 - x-speakeasy-unknown-values: allow - required: - - amount - - sender - - chain_id - description: Create a Coinbase charge for crypto payment - example: - amount: 100 - sender: '0x1234567890123456789012345678901234567890' - chain_id: 1 ProviderPreferences: type: object properties: @@ -14929,126 +14940,21 @@ paths: - $ref: "#/components/parameters/AppCategories" /credits/coinbase: post: - security: - - bearer: [] + security: [] x-speakeasy-name-override: createCoinbaseCharge + deprecated: true tags: - Credits - summary: Create a Coinbase charge for crypto payment + summary: Deprecated Coinbase Commerce charge endpoint operationId: createCoinbaseCharge - description: Create a Coinbase charge for crypto payment - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateChargeRequest' - required: true + description: Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead. responses: - '200': - description: Returns the calldata to fulfill the transaction + '410': + description: Gone - Coinbase Commerce charge creation has been removed content: application/json: schema: - type: object - properties: - data: - type: object - properties: - id: - type: string - created_at: - type: string - expires_at: - type: string - web3_data: - type: object - properties: - transfer_intent: - type: object - properties: - call_data: - type: object - properties: - deadline: - type: string - fee_amount: - type: string - id: - type: string - operator: - type: string - prefix: - type: string - recipient: - type: string - recipient_amount: - type: string - recipient_currency: - type: string - refund_destination: - type: string - signature: - type: string - required: - - deadline - - fee_amount - - id - - operator - - prefix - - recipient - - recipient_amount - - recipient_currency - - refund_destination - - signature - metadata: - type: object - properties: - chain_id: - type: number - contract_address: - type: string - sender: - type: string - required: - - chain_id - - contract_address - - sender - required: - - call_data - - metadata - required: - - transfer_intent - required: - - id - - created_at - - expires_at - - web3_data - required: - - data - '400': - description: Bad Request - Invalid credit amount or request body - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestResponse' - '401': - description: Unauthorized - Authentication required or invalid credentials - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '429': - description: Too Many Requests - Rate limit exceeded - content: - application/json: - schema: - $ref: '#/components/schemas/TooManyRequestsResponse' - '500': - description: Internal Server Error - Unexpected server error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' + $ref: '#/components/schemas/GoneResponse' parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index e4d3fc9..36cac57 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,15 +1,9 @@ speakeasyVersion: 1.680.0 sources: - -OAS: - sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3 - sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e - tags: - - latest OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:c6e52cd6931f7230cd3c226f7482b02dc0dfd682cd14540deb6f721fc0fe9d83 - sourceBlobDigest: sha256:01ccba21dd9b8695a4071a9f75c329c4c57fdc2c8dfc0ee189ddb2e5ea1dfecb + sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa + sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a tags: - latest - 1.0.0 @@ -17,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:c6e52cd6931f7230cd3c226f7482b02dc0dfd682cd14540deb6f721fc0fe9d83 - sourceBlobDigest: sha256:01ccba21dd9b8695a4071a9f75c329c4c57fdc2c8dfc0ee189ddb2e5ea1dfecb + sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa + sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:1a98221b7ae69cb68277c44cbbaac0c80b5260821b687848445bbc6dddc26894 + codeSamplesRevisionDigest: sha256:c368e0601d6b667625dd99ffcd53e69e3dc98a4b518a45444add6457dde83b22 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.680.0 diff --git a/docs/components/assistantmessage.md b/docs/components/assistantmessage.md deleted file mode 100644 index 49cee5c..0000000 --- a/docs/components/assistantmessage.md +++ /dev/null @@ -1,17 +0,0 @@ -# AssistantMessage - -Assistant message for requests and responses - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `role` | [components.AssistantMessageRole](../components/assistantmessagerole.md) | :heavy_check_mark: | N/A | | -| `content` | [OptionalNullable[components.AssistantMessageContent]](../components/assistantmessagecontent.md) | :heavy_minus_sign: | Assistant message content | | -| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for the assistant | | -| `tool_calls` | List[[components.ChatMessageToolCall](../components/chatmessagetoolcall.md)] | :heavy_minus_sign: | Tool calls made by the assistant | | -| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | Refusal message if content was refused | | -| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | Reasoning output | | -| `reasoning_details` | List[[components.ReasoningDetailUnion](../components/reasoningdetailunion.md)] | :heavy_minus_sign: | Reasoning details for extended thinking models | | -| `images` | List[[components.AssistantMessageImages](../components/assistantmessageimages.md)] | :heavy_minus_sign: | Generated images from image generation models | [
{
"image_url": {
"url": "data:image/png;base64,iVBORw0KGgo..."
}
}
] | \ No newline at end of file diff --git a/docs/components/assistantmessagecontent.md b/docs/components/assistantmessagecontent.md deleted file mode 100644 index 643e44e..0000000 --- a/docs/components/assistantmessagecontent.md +++ /dev/null @@ -1,25 +0,0 @@ -# AssistantMessageContent - -Assistant message content - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `List[components.ChatMessageContentItem]` - -```python -value: List[components.ChatMessageContentItem] = /* values here */ -``` - -### `Any` - -```python -value: Any = /* values here */ -``` - diff --git a/docs/components/assistantmessageimages.md b/docs/components/assistantmessageimages.md deleted file mode 100644 index aae33ff..0000000 --- a/docs/components/assistantmessageimages.md +++ /dev/null @@ -1,8 +0,0 @@ -# AssistantMessageImages - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `image_url` | [components.AssistantMessageImagesImageURL](../components/assistantmessageimagesimageurl.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/assistantmessageimagesimageurl.md b/docs/components/assistantmessageimagesimageurl.md deleted file mode 100644 index 7826122..0000000 --- a/docs/components/assistantmessageimagesimageurl.md +++ /dev/null @@ -1,8 +0,0 @@ -# AssistantMessageImagesImageURL - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `url` | *str* | :heavy_check_mark: | URL or base64-encoded data of the generated image | \ No newline at end of file diff --git a/docs/components/assistantmessagerole.md b/docs/components/assistantmessagerole.md deleted file mode 100644 index 658229e..0000000 --- a/docs/components/assistantmessagerole.md +++ /dev/null @@ -1,8 +0,0 @@ -# AssistantMessageRole - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `ASSISTANT` | assistant | \ No newline at end of file diff --git a/docs/components/chainid.md b/docs/components/chainid.md deleted file mode 100644 index 11579fe..0000000 --- a/docs/components/chainid.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChainID - - -## Values - -| Name | Value | -| --------------------------------------------- | --------------------------------------------- | -| `ONE` | 1 | -| `ONE_HUNDRED_AND_THIRTY_SEVEN` | 137 | -| `EIGHT_THOUSAND_FOUR_HUNDRED_AND_FIFTY_THREE` | 8453 | \ No newline at end of file diff --git a/docs/components/chatcompletionfinishreason.md b/docs/components/chatcompletionfinishreason.md deleted file mode 100644 index cb9e72c..0000000 --- a/docs/components/chatcompletionfinishreason.md +++ /dev/null @@ -1,12 +0,0 @@ -# ChatCompletionFinishReason - - -## Values - -| Name | Value | -| ---------------- | ---------------- | -| `TOOL_CALLS` | tool_calls | -| `STOP` | stop | -| `LENGTH` | length | -| `CONTENT_FILTER` | content_filter | -| `ERROR` | error | \ No newline at end of file diff --git a/docs/components/chatgenerationparams.md b/docs/components/chatgenerationparams.md deleted file mode 100644 index 871f7ac..0000000 --- a/docs/components/chatgenerationparams.md +++ /dev/null @@ -1,39 +0,0 @@ -# ChatGenerationParams - -Chat completion request parameters - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `provider` | [OptionalNullable[components.ChatGenerationParamsProvider]](../components/chatgenerationparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | | -| `plugins` | List[[components.ChatGenerationParamsPluginUnion](../components/chatgenerationparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | | -| `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | user-123 | -| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | | -| `trace` | [Optional[components.ChatGenerationParamsTrace]](../components/chatgenerationparamstrace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | | -| `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | List of messages for the conversation | [
{
"role": "user",
"content": "Hello!"
}
] | -| `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | openai/gpt-4 | -| `models` | List[*str*] | :heavy_minus_sign: | Models to use for completion | [
"openai/gpt-4",
"openai/gpt-4o"
] | -| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | 0 | -| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | Token logit bias adjustments | {
"50256": -100
} | -| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | Return log probabilities | false | -| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | 5 | -| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens in completion | 100 | -| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens) | 100 | -| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | {
"user_id": "user-123",
"session_id": "session-456"
} | -| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | 0 | -| `reasoning` | [Optional[components.Reasoning]](../components/reasoning.md) | :heavy_minus_sign: | Configuration options for reasoning models | {
"effort": "medium",
"summary": "concise"
} | -| `response_format` | [Optional[components.ResponseFormat]](../components/responseformat.md) | :heavy_minus_sign: | Response format configuration | {
"type": "json_object"
} | -| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | Random seed for deterministic outputs | 42 | -| `stop` | [OptionalNullable[components.Stop]](../components/stop.md) | :heavy_minus_sign: | Stop sequences (up to 4) | [
""
] | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | Enable streaming response | false | -| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../components/chatstreamoptions.md) | :heavy_minus_sign: | Streaming configuration options | {
"include_usage": true
} | -| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | 0.7 | -| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `tool_choice` | [Optional[components.ToolChoiceOption]](../components/toolchoiceoption.md) | :heavy_minus_sign: | Tool choice configuration | auto | -| `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | Available tools for function calling | [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather"
}
}
] | -| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | 1 | -| `debug` | [Optional[components.DebugOptions]](../components/debugoptions.md) | :heavy_minus_sign: | Debug options for inspecting request transformations (streaming only) | {
"echo_upstream_body": true
} | -| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9"
} | -| `modalities` | List[[components.Modality](../components/modality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsby.md b/docs/components/chatgenerationparamsby.md deleted file mode 100644 index 6952f17..0000000 --- a/docs/components/chatgenerationparamsby.md +++ /dev/null @@ -1,12 +0,0 @@ -# ChatGenerationParamsBy - -The provider sorting strategy (price, throughput, latency) - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `PRICE` | price | -| `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsengine.md b/docs/components/chatgenerationparamsengine.md deleted file mode 100644 index 48498f7..0000000 --- a/docs/components/chatgenerationparamsengine.md +++ /dev/null @@ -1,9 +0,0 @@ -# ChatGenerationParamsEngine - - -## Values - -| Name | Value | -| -------- | -------- | -| `NATIVE` | native | -| `EXA` | exa | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsidautorouter.md b/docs/components/chatgenerationparamsidautorouter.md deleted file mode 100644 index d5616f3..0000000 --- a/docs/components/chatgenerationparamsidautorouter.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatGenerationParamsIDAutoRouter - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `AUTO_ROUTER` | auto-router | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsidfileparser.md b/docs/components/chatgenerationparamsidfileparser.md deleted file mode 100644 index 432efba..0000000 --- a/docs/components/chatgenerationparamsidfileparser.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatGenerationParamsIDFileParser - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `FILE_PARSER` | file-parser | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsidmoderation.md b/docs/components/chatgenerationparamsidmoderation.md deleted file mode 100644 index 60e32d9..0000000 --- a/docs/components/chatgenerationparamsidmoderation.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatGenerationParamsIDModeration - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `MODERATION` | moderation | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsidresponsehealing.md b/docs/components/chatgenerationparamsidresponsehealing.md deleted file mode 100644 index 090054c..0000000 --- a/docs/components/chatgenerationparamsidresponsehealing.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatGenerationParamsIDResponseHealing - - -## Values - -| Name | Value | -| ------------------ | ------------------ | -| `RESPONSE_HEALING` | response-healing | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsidweb.md b/docs/components/chatgenerationparamsidweb.md deleted file mode 100644 index 3781247..0000000 --- a/docs/components/chatgenerationparamsidweb.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatGenerationParamsIDWeb - - -## Values - -| Name | Value | -| ----- | ----- | -| `WEB` | web | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsignore.md b/docs/components/chatgenerationparamsignore.md deleted file mode 100644 index 9bc172c..0000000 --- a/docs/components/chatgenerationparamsignore.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChatGenerationParamsIgnore - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/chatgenerationparamsimageconfig.md b/docs/components/chatgenerationparamsimageconfig.md deleted file mode 100644 index 2e011da..0000000 --- a/docs/components/chatgenerationparamsimageconfig.md +++ /dev/null @@ -1,23 +0,0 @@ -# ChatGenerationParamsImageConfig - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `float` - -```python -value: float = /* values here */ -``` - -### `List[Nullable[Any]]` - -```python -value: List[Nullable[Any]] = /* values here */ -``` - diff --git a/docs/components/chatgenerationparamsmaxprice.md b/docs/components/chatgenerationparamsmaxprice.md deleted file mode 100644 index ee97c1d..0000000 --- a/docs/components/chatgenerationparamsmaxprice.md +++ /dev/null @@ -1,14 +0,0 @@ -# ChatGenerationParamsMaxPrice - -The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `prompt` | *Optional[str]* | :heavy_minus_sign: | Price per million prompt tokens | 1000 | -| `completion` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsonly.md b/docs/components/chatgenerationparamsonly.md deleted file mode 100644 index f83c12d..0000000 --- a/docs/components/chatgenerationparamsonly.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChatGenerationParamsOnly - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/chatgenerationparamsorder.md b/docs/components/chatgenerationparamsorder.md deleted file mode 100644 index c6c1a91..0000000 --- a/docs/components/chatgenerationparamsorder.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChatGenerationParamsOrder - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/chatgenerationparamspartition.md b/docs/components/chatgenerationparamspartition.md deleted file mode 100644 index 3897f82..0000000 --- a/docs/components/chatgenerationparamspartition.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChatGenerationParamsPartition - -Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. - - -## Values - -| Name | Value | -| ------- | ------- | -| `MODEL` | model | -| `NONE` | none | \ No newline at end of file diff --git a/docs/components/chatgenerationparamspdf.md b/docs/components/chatgenerationparamspdf.md deleted file mode 100644 index c043ef9..0000000 --- a/docs/components/chatgenerationparamspdf.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatGenerationParamsPdf - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `engine` | [Optional[components.ChatGenerationParamsPdfEngine]](../components/chatgenerationparamspdfengine.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/chatgenerationparamspdfengine.md b/docs/components/chatgenerationparamspdfengine.md deleted file mode 100644 index 1aff3d9..0000000 --- a/docs/components/chatgenerationparamspdfengine.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChatGenerationParamsPdfEngine - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `MISTRAL_OCR` | mistral-ocr | -| `PDF_TEXT` | pdf-text | -| `NATIVE` | native | \ No newline at end of file diff --git a/docs/components/chatgenerationparamspluginautorouter.md b/docs/components/chatgenerationparamspluginautorouter.md deleted file mode 100644 index d9f2cf0..0000000 --- a/docs/components/chatgenerationparamspluginautorouter.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChatGenerationParamsPluginAutoRouter - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | [components.ChatGenerationParamsIDAutoRouter](../components/chatgenerationparamsidautorouter.md) | :heavy_check_mark: | N/A | | -| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the auto-router plugin for this request. Defaults to true. | | -| `allowed_models` | List[*str*] | :heavy_minus_sign: | List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list. | [
"anthropic/*",
"openai/gpt-4o",
"google/*"
] | \ No newline at end of file diff --git a/docs/components/chatgenerationparamspluginfileparser.md b/docs/components/chatgenerationparamspluginfileparser.md deleted file mode 100644 index 41555fc..0000000 --- a/docs/components/chatgenerationparamspluginfileparser.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChatGenerationParamsPluginFileParser - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `id` | [components.ChatGenerationParamsIDFileParser](../components/chatgenerationparamsidfileparser.md) | :heavy_check_mark: | N/A | -| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the file-parser plugin for this request. Defaults to true. | -| `pdf` | [Optional[components.PDFParserOptions]](../components/pdfparseroptions.md) | :heavy_minus_sign: | Options for PDF parsing. | \ No newline at end of file diff --git a/docs/components/chatgenerationparamspluginmoderation.md b/docs/components/chatgenerationparamspluginmoderation.md deleted file mode 100644 index 0d697d9..0000000 --- a/docs/components/chatgenerationparamspluginmoderation.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatGenerationParamsPluginModeration - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `id` | [components.ChatGenerationParamsIDModeration](../components/chatgenerationparamsidmoderation.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/chatgenerationparamspluginresponsehealing.md b/docs/components/chatgenerationparamspluginresponsehealing.md deleted file mode 100644 index 2d3f32c..0000000 --- a/docs/components/chatgenerationparamspluginresponsehealing.md +++ /dev/null @@ -1,9 +0,0 @@ -# ChatGenerationParamsPluginResponseHealing - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `id` | [components.ChatGenerationParamsIDResponseHealing](../components/chatgenerationparamsidresponsehealing.md) | :heavy_check_mark: | N/A | -| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the response-healing plugin for this request. Defaults to true. | \ No newline at end of file diff --git a/docs/components/chatgenerationparamspluginunion.md b/docs/components/chatgenerationparamspluginunion.md deleted file mode 100644 index 5457d76..0000000 --- a/docs/components/chatgenerationparamspluginunion.md +++ /dev/null @@ -1,35 +0,0 @@ -# ChatGenerationParamsPluginUnion - - -## Supported Types - -### `components.ChatGenerationParamsPluginAutoRouter` - -```python -value: components.ChatGenerationParamsPluginAutoRouter = /* values here */ -``` - -### `components.ChatGenerationParamsPluginModeration` - -```python -value: components.ChatGenerationParamsPluginModeration = /* values here */ -``` - -### `components.ChatGenerationParamsPluginWeb` - -```python -value: components.ChatGenerationParamsPluginWeb = /* values here */ -``` - -### `components.ChatGenerationParamsPluginFileParser` - -```python -value: components.ChatGenerationParamsPluginFileParser = /* values here */ -``` - -### `components.ChatGenerationParamsPluginResponseHealing` - -```python -value: components.ChatGenerationParamsPluginResponseHealing = /* values here */ -``` - diff --git a/docs/components/chatgenerationparamspluginweb.md b/docs/components/chatgenerationparamspluginweb.md deleted file mode 100644 index e8c97d0..0000000 --- a/docs/components/chatgenerationparamspluginweb.md +++ /dev/null @@ -1,12 +0,0 @@ -# ChatGenerationParamsPluginWeb - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `id` | [components.ChatGenerationParamsIDWeb](../components/chatgenerationparamsidweb.md) | :heavy_check_mark: | N/A | -| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. | -| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A | -| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `engine` | [Optional[components.WebSearchEngine]](../components/websearchengine.md) | :heavy_minus_sign: | The search engine to use for web search. | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsprovider.md b/docs/components/chatgenerationparamsprovider.md deleted file mode 100644 index bbb47db..0000000 --- a/docs/components/chatgenerationparamsprovider.md +++ /dev/null @@ -1,22 +0,0 @@ -# ChatGenerationParamsProvider - -When multiple model providers are available, optionally indicate your routing preference. - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
| | -| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | | -| `data_collection` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it

- deny: use only providers which do not collect user data. | allow | -| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true | -| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true | -| `order` | List[[components.ChatGenerationParamsOrder](../components/chatgenerationparamsorder.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | | -| `only` | List[[components.ChatGenerationParamsOnly](../components/chatgenerationparamsonly.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | | -| `ignore` | List[[components.ChatGenerationParamsIgnore](../components/chatgenerationparamsignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | | -| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | | -| `sort` | [OptionalNullable[components.ChatGenerationParamsSortUnion]](../components/chatgenerationparamssortunion.md) | :heavy_minus_sign: | N/A | price | -| `max_price` | [Optional[components.ChatGenerationParamsMaxPrice]](../components/chatgenerationparamsmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | | -| `preferred_min_throughput` | [OptionalNullable[components.PreferredMinThroughput]](../components/preferredminthroughput.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 100 | -| `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsprovidersort.md b/docs/components/chatgenerationparamsprovidersort.md deleted file mode 100644 index dad38c3..0000000 --- a/docs/components/chatgenerationparamsprovidersort.md +++ /dev/null @@ -1,12 +0,0 @@ -# ChatGenerationParamsProviderSort - -The provider sorting strategy (price, throughput, latency) - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `PRICE` | price | -| `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsprovidersortconfig.md b/docs/components/chatgenerationparamsprovidersortconfig.md deleted file mode 100644 index e49cfd1..0000000 --- a/docs/components/chatgenerationparamsprovidersortconfig.md +++ /dev/null @@ -1,9 +0,0 @@ -# ChatGenerationParamsProviderSortConfig - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `by` | [OptionalNullable[components.ChatGenerationParamsBy]](../components/chatgenerationparamsby.md) | :heavy_minus_sign: | The provider sorting strategy (price, throughput, latency) | price | -| `partition` | [OptionalNullable[components.ChatGenerationParamsPartition]](../components/chatgenerationparamspartition.md) | :heavy_minus_sign: | Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. | model | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsprovidersortconfigenum.md b/docs/components/chatgenerationparamsprovidersortconfigenum.md deleted file mode 100644 index 8117c95..0000000 --- a/docs/components/chatgenerationparamsprovidersortconfigenum.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChatGenerationParamsProviderSortConfigEnum - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `PRICE` | price | -| `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file diff --git a/docs/components/chatgenerationparamsprovidersortconfigunion.md b/docs/components/chatgenerationparamsprovidersortconfigunion.md deleted file mode 100644 index 1fc42c9..0000000 --- a/docs/components/chatgenerationparamsprovidersortconfigunion.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChatGenerationParamsProviderSortConfigUnion - - -## Supported Types - -### `components.ChatGenerationParamsProviderSortConfig` - -```python -value: components.ChatGenerationParamsProviderSortConfig = /* values here */ -``` - -### `components.ChatGenerationParamsProviderSortConfigEnum` - -```python -value: components.ChatGenerationParamsProviderSortConfigEnum = /* values here */ -``` - diff --git a/docs/components/chatgenerationparamsroute.md b/docs/components/chatgenerationparamsroute.md deleted file mode 100644 index bc698c5..0000000 --- a/docs/components/chatgenerationparamsroute.md +++ /dev/null @@ -1,9 +0,0 @@ -# ChatGenerationParamsRoute - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `FALLBACK` | fallback | -| `SORT` | sort | \ No newline at end of file diff --git a/docs/components/chatgenerationparamssortenum.md b/docs/components/chatgenerationparamssortenum.md deleted file mode 100644 index eac8dc3..0000000 --- a/docs/components/chatgenerationparamssortenum.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChatGenerationParamsSortEnum - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `PRICE` | price | -| `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file diff --git a/docs/components/chatgenerationparamssortunion.md b/docs/components/chatgenerationparamssortunion.md deleted file mode 100644 index 7c35fb7..0000000 --- a/docs/components/chatgenerationparamssortunion.md +++ /dev/null @@ -1,25 +0,0 @@ -# ChatGenerationParamsSortUnion - -The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - - -## Supported Types - -### `components.ChatGenerationParamsProviderSort` - -```python -value: components.ChatGenerationParamsProviderSort = /* values here */ -``` - -### `components.ChatGenerationParamsProviderSortConfigUnion` - -```python -value: components.ChatGenerationParamsProviderSortConfigUnion = /* values here */ -``` - -### `components.ChatGenerationParamsSortEnum` - -```python -value: components.ChatGenerationParamsSortEnum = /* values here */ -``` - diff --git a/docs/components/chatgenerationparamstrace.md b/docs/components/chatgenerationparamstrace.md deleted file mode 100644 index b49a15a..0000000 --- a/docs/components/chatgenerationparamstrace.md +++ /dev/null @@ -1,15 +0,0 @@ -# ChatGenerationParamsTrace - -Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -| `trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `trace_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `span_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `generation_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `parent_span_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/chatgenerationtokenusage.md b/docs/components/chatgenerationtokenusage.md deleted file mode 100644 index 6b42d1f..0000000 --- a/docs/components/chatgenerationtokenusage.md +++ /dev/null @@ -1,14 +0,0 @@ -# ChatGenerationTokenUsage - -Token usage statistics - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `completion_tokens` | *float* | :heavy_check_mark: | Number of tokens in the completion | -| `prompt_tokens` | *float* | :heavy_check_mark: | Number of tokens in the prompt | -| `total_tokens` | *float* | :heavy_check_mark: | Total number of tokens | -| `completion_tokens_details` | [OptionalNullable[components.CompletionTokensDetails]](../components/completiontokensdetails.md) | :heavy_minus_sign: | Detailed completion token usage | -| `prompt_tokens_details` | [OptionalNullable[components.PromptTokensDetails]](../components/prompttokensdetails.md) | :heavy_minus_sign: | Detailed prompt token usage | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitem.md b/docs/components/chatmessagecontentitem.md deleted file mode 100644 index 197da42..0000000 --- a/docs/components/chatmessagecontentitem.md +++ /dev/null @@ -1,31 +0,0 @@ -# ChatMessageContentItem - -Content part for chat completion messages - - -## Supported Types - -### `components.ChatMessageContentItemText` - -```python -value: components.ChatMessageContentItemText = /* values here */ -``` - -### `components.ChatMessageContentItemImage` - -```python -value: components.ChatMessageContentItemImage = /* values here */ -``` - -### `components.ChatMessageContentItemAudio` - -```python -value: components.ChatMessageContentItemAudio = /* values here */ -``` - -### `components.ChatMessageContentItem1` - -```python -value: components.ChatMessageContentItem1 = /* values here */ -``` - diff --git a/docs/components/chatmessagecontentitem1.md b/docs/components/chatmessagecontentitem1.md deleted file mode 100644 index 782be76..0000000 --- a/docs/components/chatmessagecontentitem1.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChatMessageContentItem1 - - -## Supported Types - -### `components.ChatMessageContentItemVideoLegacy` - -```python -value: components.ChatMessageContentItemVideoLegacy = /* values here */ -``` - -### `components.ChatMessageContentItemVideo` - -```python -value: components.ChatMessageContentItemVideo = /* values here */ -``` - diff --git a/docs/components/chatmessagecontentitemaudio.md b/docs/components/chatmessagecontentitemaudio.md deleted file mode 100644 index 4fcc232..0000000 --- a/docs/components/chatmessagecontentitemaudio.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChatMessageContentItemAudio - -Audio input content part. Supported audio formats vary by provider. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `type` | [components.ChatMessageContentItemAudioType](../components/chatmessagecontentitemaudiotype.md) | :heavy_check_mark: | N/A | -| `input_audio` | [components.ChatMessageContentItemAudioInputAudio](../components/chatmessagecontentitemaudioinputaudio.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemaudioinputaudio.md b/docs/components/chatmessagecontentitemaudioinputaudio.md deleted file mode 100644 index 7658571..0000000 --- a/docs/components/chatmessagecontentitemaudioinputaudio.md +++ /dev/null @@ -1,9 +0,0 @@ -# ChatMessageContentItemAudioInputAudio - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `data` | *str* | :heavy_check_mark: | Base64 encoded audio data | -| `format_` | *str* | :heavy_check_mark: | Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider. | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemaudiotype.md b/docs/components/chatmessagecontentitemaudiotype.md deleted file mode 100644 index 29dc6ff..0000000 --- a/docs/components/chatmessagecontentitemaudiotype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatMessageContentItemAudioType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `INPUT_AUDIO` | input_audio | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemcachecontrol.md b/docs/components/chatmessagecontentitemcachecontrol.md deleted file mode 100644 index df820de..0000000 --- a/docs/components/chatmessagecontentitemcachecontrol.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChatMessageContentItemCacheControl - -Cache control for the content part - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `type` | [components.ChatMessageContentItemCacheControlType](../components/chatmessagecontentitemcachecontroltype.md) | :heavy_check_mark: | N/A | -| `ttl` | [Optional[components.TTL]](../components/ttl.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemcachecontroltype.md b/docs/components/chatmessagecontentitemcachecontroltype.md deleted file mode 100644 index 6e9faa2..0000000 --- a/docs/components/chatmessagecontentitemcachecontroltype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatMessageContentItemCacheControlType - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `EPHEMERAL` | ephemeral | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemimage.md b/docs/components/chatmessagecontentitemimage.md deleted file mode 100644 index 023ea52..0000000 --- a/docs/components/chatmessagecontentitemimage.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChatMessageContentItemImage - -Image content part for vision models - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `type` | [components.ChatMessageContentItemImageType](../components/chatmessagecontentitemimagetype.md) | :heavy_check_mark: | N/A | -| `image_url` | [components.ChatMessageContentItemImageImageURL](../components/chatmessagecontentitemimageimageurl.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemimagedetail.md b/docs/components/chatmessagecontentitemimagedetail.md deleted file mode 100644 index 5862abf..0000000 --- a/docs/components/chatmessagecontentitemimagedetail.md +++ /dev/null @@ -1,12 +0,0 @@ -# ChatMessageContentItemImageDetail - -Image detail level for vision models - - -## Values - -| Name | Value | -| ------ | ------ | -| `AUTO` | auto | -| `LOW` | low | -| `HIGH` | high | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemimageimageurl.md b/docs/components/chatmessagecontentitemimageimageurl.md deleted file mode 100644 index 1d0609e..0000000 --- a/docs/components/chatmessagecontentitemimageimageurl.md +++ /dev/null @@ -1,9 +0,0 @@ -# ChatMessageContentItemImageImageURL - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `url` | *str* | :heavy_check_mark: | URL of the image (data: URLs supported) | -| `detail` | [Optional[components.ChatMessageContentItemImageDetail]](../components/chatmessagecontentitemimagedetail.md) | :heavy_minus_sign: | Image detail level for vision models | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemimagetype.md b/docs/components/chatmessagecontentitemimagetype.md deleted file mode 100644 index 23b614b..0000000 --- a/docs/components/chatmessagecontentitemimagetype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatMessageContentItemImageType - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `IMAGE_URL` | image_url | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemtext.md b/docs/components/chatmessagecontentitemtext.md deleted file mode 100644 index 832ff2a..0000000 --- a/docs/components/chatmessagecontentitemtext.md +++ /dev/null @@ -1,12 +0,0 @@ -# ChatMessageContentItemText - -Text content part - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `type` | [components.ChatMessageContentItemTextType](../components/chatmessagecontentitemtexttype.md) | :heavy_check_mark: | N/A | | -| `text` | *str* | :heavy_check_mark: | N/A | | -| `cache_control` | [Optional[components.ChatMessageContentItemCacheControl]](../components/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | Cache control for the content part | {
"type": "ephemeral",
"ttl": "5m"
} | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemtexttype.md b/docs/components/chatmessagecontentitemtexttype.md deleted file mode 100644 index da0a6dd..0000000 --- a/docs/components/chatmessagecontentitemtexttype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatMessageContentItemTextType - - -## Values - -| Name | Value | -| ------ | ------ | -| `TEXT` | text | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemvideo.md b/docs/components/chatmessagecontentitemvideo.md deleted file mode 100644 index ae376af..0000000 --- a/docs/components/chatmessagecontentitemvideo.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChatMessageContentItemVideo - -Video input content part - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `type` | [components.ChatMessageContentItemVideoType](../components/chatmessagecontentitemvideotype.md) | :heavy_check_mark: | N/A | -| `video_url` | [components.VideoInput](../components/videoinput.md) | :heavy_check_mark: | Video input object | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemvideolegacy.md b/docs/components/chatmessagecontentitemvideolegacy.md deleted file mode 100644 index 07dcec1..0000000 --- a/docs/components/chatmessagecontentitemvideolegacy.md +++ /dev/null @@ -1,13 +0,0 @@ -# ~~ChatMessageContentItemVideoLegacy~~ - -Video input content part (legacy format - deprecated) - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `type` | [components.ChatMessageContentItemVideoLegacyType](../components/chatmessagecontentitemvideolegacytype.md) | :heavy_check_mark: | N/A | -| `video_url` | [components.VideoInput](../components/videoinput.md) | :heavy_check_mark: | Video input object | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemvideolegacytype.md b/docs/components/chatmessagecontentitemvideolegacytype.md deleted file mode 100644 index 1bfffd5..0000000 --- a/docs/components/chatmessagecontentitemvideolegacytype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatMessageContentItemVideoLegacyType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `INPUT_VIDEO` | input_video | \ No newline at end of file diff --git a/docs/components/chatmessagecontentitemvideotype.md b/docs/components/chatmessagecontentitemvideotype.md deleted file mode 100644 index c660342..0000000 --- a/docs/components/chatmessagecontentitemvideotype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatMessageContentItemVideoType - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `VIDEO_URL` | video_url | \ No newline at end of file diff --git a/docs/components/chatmessagetokenlogprob.md b/docs/components/chatmessagetokenlogprob.md deleted file mode 100644 index f797c6a..0000000 --- a/docs/components/chatmessagetokenlogprob.md +++ /dev/null @@ -1,13 +0,0 @@ -# ChatMessageTokenLogprob - -Token log probability information - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `token` | *str* | :heavy_check_mark: | The token | -| `logprob` | *float* | :heavy_check_mark: | Log probability of the token | -| `bytes_` | List[*float*] | :heavy_check_mark: | UTF-8 bytes of the token | -| `top_logprobs` | List[[components.ChatMessageTokenLogprobTopLogprob](../components/chatmessagetokenlogprobtoplogprob.md)] | :heavy_check_mark: | Top alternative tokens with probabilities | \ No newline at end of file diff --git a/docs/components/chatmessagetokenlogprobs.md b/docs/components/chatmessagetokenlogprobs.md deleted file mode 100644 index 0b8961f..0000000 --- a/docs/components/chatmessagetokenlogprobs.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChatMessageTokenLogprobs - -Log probabilities for the completion - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `content` | List[[components.ChatMessageTokenLogprob](../components/chatmessagetokenlogprob.md)] | :heavy_check_mark: | Log probabilities for content tokens | -| `refusal` | List[[components.ChatMessageTokenLogprob](../components/chatmessagetokenlogprob.md)] | :heavy_check_mark: | Log probabilities for refusal tokens | \ No newline at end of file diff --git a/docs/components/chatmessagetokenlogprobtoplogprob.md b/docs/components/chatmessagetokenlogprobtoplogprob.md deleted file mode 100644 index 72e54d4..0000000 --- a/docs/components/chatmessagetokenlogprobtoplogprob.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChatMessageTokenLogprobTopLogprob - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `token` | *str* | :heavy_check_mark: | N/A | -| `logprob` | *float* | :heavy_check_mark: | N/A | -| `bytes_` | List[*float*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/chatmessagetoolcall.md b/docs/components/chatmessagetoolcall.md deleted file mode 100644 index 19fcf54..0000000 --- a/docs/components/chatmessagetoolcall.md +++ /dev/null @@ -1,12 +0,0 @@ -# ChatMessageToolCall - -Tool call made by the assistant - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Tool call identifier | -| `type` | [components.ChatMessageToolCallType](../components/chatmessagetoolcalltype.md) | :heavy_check_mark: | N/A | -| `function` | [components.ChatMessageToolCallFunction](../components/chatmessagetoolcallfunction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/chatmessagetoolcallfunction.md b/docs/components/chatmessagetoolcallfunction.md deleted file mode 100644 index ef31674..0000000 --- a/docs/components/chatmessagetoolcallfunction.md +++ /dev/null @@ -1,9 +0,0 @@ -# ChatMessageToolCallFunction - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `name` | *str* | :heavy_check_mark: | Function name to call | -| `arguments` | *str* | :heavy_check_mark: | Function arguments as JSON string | \ No newline at end of file diff --git a/docs/components/chatmessagetoolcalltype.md b/docs/components/chatmessagetoolcalltype.md deleted file mode 100644 index 881125e..0000000 --- a/docs/components/chatmessagetoolcalltype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatMessageToolCallType - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `FUNCTION` | function | \ No newline at end of file diff --git a/docs/components/chatresponse.md b/docs/components/chatresponse.md deleted file mode 100644 index 50e5966..0000000 --- a/docs/components/chatresponse.md +++ /dev/null @@ -1,16 +0,0 @@ -# ChatResponse - -Chat completion response - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Unique completion identifier | chatcmpl-123 | -| `choices` | List[[components.ChatResponseChoice](../components/chatresponsechoice.md)] | :heavy_check_mark: | List of completion choices | | -| `created` | *float* | :heavy_check_mark: | Unix timestamp of creation | 1677652288 | -| `model` | *str* | :heavy_check_mark: | Model used for completion | openai/gpt-4 | -| `object` | [components.ChatResponseObject](../components/chatresponseobject.md) | :heavy_check_mark: | N/A | | -| `system_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | System fingerprint | fp_44709d6fcb | -| `usage` | [Optional[components.ChatGenerationTokenUsage]](../components/chatgenerationtokenusage.md) | :heavy_minus_sign: | Token usage statistics | {
"completion_tokens": 15,
"prompt_tokens": 10,
"total_tokens": 25,
"completion_tokens_details": {
"reasoning_tokens": 5
},
"prompt_tokens_details": {
"cached_tokens": 2
}
} | \ No newline at end of file diff --git a/docs/components/chatresponsechoice.md b/docs/components/chatresponsechoice.md deleted file mode 100644 index c9801f2..0000000 --- a/docs/components/chatresponsechoice.md +++ /dev/null @@ -1,13 +0,0 @@ -# ChatResponseChoice - -Chat completion choice - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `finish_reason` | *Nullable[Any]* | :heavy_check_mark: | N/A | | -| `index` | *float* | :heavy_check_mark: | Choice index | 0 | -| `message` | [components.AssistantMessage](../components/assistantmessage.md) | :heavy_check_mark: | Assistant message for requests and responses | {
"role": "user",
"content": "What is the capital of France?"
} | -| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | Log probabilities for the completion | {
"content": [
{
"token": " Hello",
"logprob": -0.612345,
"bytes": null,
"top_logprobs": []
}
],
"refusal": null
} | \ No newline at end of file diff --git a/docs/components/chatresponseobject.md b/docs/components/chatresponseobject.md deleted file mode 100644 index f2d6e96..0000000 --- a/docs/components/chatresponseobject.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatResponseObject - - -## Values - -| Name | Value | -| ----------------- | ----------------- | -| `CHAT_COMPLETION` | chat.completion | \ No newline at end of file diff --git a/docs/components/chatstreamingchoice.md b/docs/components/chatstreamingchoice.md deleted file mode 100644 index eacfbcc..0000000 --- a/docs/components/chatstreamingchoice.md +++ /dev/null @@ -1,13 +0,0 @@ -# ChatStreamingChoice - -Streaming completion choice chunk - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `delta` | [components.ChatStreamingMessageChunk](../components/chatstreamingmessagechunk.md) | :heavy_check_mark: | Delta changes in streaming response | {
"role": "assistant",
"content": "Hello"
} | -| `finish_reason` | *Nullable[Any]* | :heavy_check_mark: | N/A | | -| `index` | *float* | :heavy_check_mark: | Choice index | 0 | -| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | Log probabilities for the completion | {
"content": [
{
"token": " Hello",
"logprob": -0.612345,
"bytes": null,
"top_logprobs": []
}
],
"refusal": null
} | \ No newline at end of file diff --git a/docs/components/chatstreamingmessagechunk.md b/docs/components/chatstreamingmessagechunk.md deleted file mode 100644 index a91123f..0000000 --- a/docs/components/chatstreamingmessagechunk.md +++ /dev/null @@ -1,15 +0,0 @@ -# ChatStreamingMessageChunk - -Delta changes in streaming response - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `role` | [Optional[components.ChatStreamingMessageChunkRole]](../components/chatstreamingmessagechunkrole.md) | :heavy_minus_sign: | The role of the message author | assistant | -| `content` | *OptionalNullable[str]* | :heavy_minus_sign: | Message content delta | Hello | -| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | Reasoning content delta | I need to | -| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | Refusal message delta | | -| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | Tool calls delta | | -| `reasoning_details` | List[[components.ReasoningDetailUnion](../components/reasoningdetailunion.md)] | :heavy_minus_sign: | Reasoning details for extended thinking models | | \ No newline at end of file diff --git a/docs/components/chatstreamingmessagechunkrole.md b/docs/components/chatstreamingmessagechunkrole.md deleted file mode 100644 index 20f57d9..0000000 --- a/docs/components/chatstreamingmessagechunkrole.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChatStreamingMessageChunkRole - -The role of the message author - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `ASSISTANT` | assistant | \ No newline at end of file diff --git a/docs/components/chatstreamingmessagetoolcall.md b/docs/components/chatstreamingmessagetoolcall.md deleted file mode 100644 index 4add468..0000000 --- a/docs/components/chatstreamingmessagetoolcall.md +++ /dev/null @@ -1,13 +0,0 @@ -# ChatStreamingMessageToolCall - -Tool call delta for streaming responses - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `index` | *float* | :heavy_check_mark: | Tool call index in the array | 0 | -| `id` | *Optional[str]* | :heavy_minus_sign: | Tool call identifier | call_abc123 | -| `type` | [Optional[components.ChatStreamingMessageToolCallType]](../components/chatstreamingmessagetoolcalltype.md) | :heavy_minus_sign: | Tool call type | function | -| `function` | [Optional[components.ChatStreamingMessageToolCallFunction]](../components/chatstreamingmessagetoolcallfunction.md) | :heavy_minus_sign: | Function call details | | \ No newline at end of file diff --git a/docs/components/chatstreamingmessagetoolcallfunction.md b/docs/components/chatstreamingmessagetoolcallfunction.md deleted file mode 100644 index 3b47ecb..0000000 --- a/docs/components/chatstreamingmessagetoolcallfunction.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChatStreamingMessageToolCallFunction - -Function call details - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `name` | *Optional[str]* | :heavy_minus_sign: | Function name | get_weather | -| `arguments` | *Optional[str]* | :heavy_minus_sign: | Function arguments as JSON string | {"location": | \ No newline at end of file diff --git a/docs/components/chatstreamingmessagetoolcalltype.md b/docs/components/chatstreamingmessagetoolcalltype.md deleted file mode 100644 index 0a33b59..0000000 --- a/docs/components/chatstreamingmessagetoolcalltype.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChatStreamingMessageToolCallType - -Tool call type - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `FUNCTION` | function | \ No newline at end of file diff --git a/docs/components/chatstreamingresponsechunk.md b/docs/components/chatstreamingresponsechunk.md deleted file mode 100644 index 1d7647e..0000000 --- a/docs/components/chatstreamingresponsechunk.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChatStreamingResponseChunk - -Streaming chat completion chunk - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Unique chunk identifier | chatcmpl-123 | -| `choices` | List[[components.ChatStreamingChoice](../components/chatstreamingchoice.md)] | :heavy_check_mark: | List of streaming chunk choices | | -| `created` | *float* | :heavy_check_mark: | Unix timestamp of creation | 1677652288 | -| `model` | *str* | :heavy_check_mark: | Model used for completion | openai/gpt-4 | -| `object` | [components.ChatStreamingResponseChunkObject](../components/chatstreamingresponsechunkobject.md) | :heavy_check_mark: | N/A | | -| `system_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | System fingerprint | fp_44709d6fcb | -| `error` | [Optional[components.Error]](../components/error.md) | :heavy_minus_sign: | Error information | {
"message": "Rate limit exceeded",
"code": 429
} | -| `usage` | [Optional[components.ChatGenerationTokenUsage]](../components/chatgenerationtokenusage.md) | :heavy_minus_sign: | Token usage statistics | {
"completion_tokens": 15,
"prompt_tokens": 10,
"total_tokens": 25,
"completion_tokens_details": {
"reasoning_tokens": 5
},
"prompt_tokens_details": {
"cached_tokens": 2
}
} | \ No newline at end of file diff --git a/docs/components/chatstreamingresponsechunkobject.md b/docs/components/chatstreamingresponsechunkobject.md deleted file mode 100644 index b596f86..0000000 --- a/docs/components/chatstreamingresponsechunkobject.md +++ /dev/null @@ -1,8 +0,0 @@ -# ChatStreamingResponseChunkObject - - -## Values - -| Name | Value | -| ----------------------- | ----------------------- | -| `CHAT_COMPLETION_CHUNK` | chat.completion.chunk | \ No newline at end of file diff --git a/docs/components/createchargerequest.md b/docs/components/createchargerequest.md deleted file mode 100644 index e789e8f..0000000 --- a/docs/components/createchargerequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateChargeRequest - -Create a Coinbase charge for crypto payment - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `amount` | *float* | :heavy_check_mark: | N/A | -| `sender` | *str* | :heavy_check_mark: | N/A | -| `chain_id` | [components.ChainID](../components/chainid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/debugoptions.md b/docs/components/debugoptions.md deleted file mode 100644 index f3da9a6..0000000 --- a/docs/components/debugoptions.md +++ /dev/null @@ -1,10 +0,0 @@ -# DebugOptions - -Debug options for inspecting request transformations (streaming only) - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `echo_upstream_body` | *Optional[bool]* | :heavy_minus_sign: | If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode. | true | \ No newline at end of file diff --git a/docs/components/developermessage.md b/docs/components/developermessage.md deleted file mode 100644 index 3a2ca63..0000000 --- a/docs/components/developermessage.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeveloperMessage - -Developer message - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `role` | [components.DeveloperMessageRole](../components/developermessagerole.md) | :heavy_check_mark: | N/A | | -| `content` | [components.DeveloperMessageContent](../components/developermessagecontent.md) | :heavy_check_mark: | Developer message content | This is a message from the developer. | -| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for the developer message | Developer | \ No newline at end of file diff --git a/docs/components/developermessagecontent.md b/docs/components/developermessagecontent.md deleted file mode 100644 index 6cb0103..0000000 --- a/docs/components/developermessagecontent.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeveloperMessageContent - -Developer message content - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `List[components.ChatMessageContentItemText]` - -```python -value: List[components.ChatMessageContentItemText] = /* values here */ -``` - diff --git a/docs/components/developermessagerole.md b/docs/components/developermessagerole.md deleted file mode 100644 index 01bf651..0000000 --- a/docs/components/developermessagerole.md +++ /dev/null @@ -1,8 +0,0 @@ -# DeveloperMessageRole - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `DEVELOPER` | developer | \ No newline at end of file diff --git a/docs/components/ignore.md b/docs/components/ignore.md deleted file mode 100644 index 5f78708..0000000 --- a/docs/components/ignore.md +++ /dev/null @@ -1,17 +0,0 @@ -# Ignore - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/jsonschemaconfig.md b/docs/components/jsonschemaconfig.md deleted file mode 100644 index 4e1a91a..0000000 --- a/docs/components/jsonschemaconfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# JSONSchemaConfig - -JSON Schema configuration object - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `name` | *str* | :heavy_check_mark: | Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) | math_response | -| `description` | *Optional[str]* | :heavy_minus_sign: | Schema description for the model | A mathematical response | -| `schema_` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | JSON Schema object | {
"type": "object",
"properties": {
"answer": {
"type": "number"
}
},
"required": [
"answer"
]
} | -| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | Enable strict schema adherence | false | \ No newline at end of file diff --git a/docs/components/logprob.md b/docs/components/logprob.md deleted file mode 100644 index 3952f4f..0000000 --- a/docs/components/logprob.md +++ /dev/null @@ -1,11 +0,0 @@ -# Logprob - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `token` | *str* | :heavy_check_mark: | N/A | -| `bytes_` | List[*float*] | :heavy_check_mark: | N/A | -| `logprob` | *float* | :heavy_check_mark: | N/A | -| `top_logprobs` | List[[components.ResponseOutputTextTopLogprob](../components/responseoutputtexttoplogprob.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/message.md b/docs/components/message.md deleted file mode 100644 index a75476e..0000000 --- a/docs/components/message.md +++ /dev/null @@ -1,37 +0,0 @@ -# Message - -Chat completion message with role-based discrimination - - -## Supported Types - -### `components.SystemMessage` - -```python -value: components.SystemMessage = /* values here */ -``` - -### `components.UserMessage` - -```python -value: components.UserMessage = /* values here */ -``` - -### `components.DeveloperMessage` - -```python -value: components.DeveloperMessage = /* values here */ -``` - -### `components.AssistantMessage` - -```python -value: components.AssistantMessage = /* values here */ -``` - -### `components.ToolResponseMessage` - -```python -value: components.ToolResponseMessage = /* values here */ -``` - diff --git a/docs/components/namedtoolchoice.md b/docs/components/namedtoolchoice.md deleted file mode 100644 index bfd165e..0000000 --- a/docs/components/namedtoolchoice.md +++ /dev/null @@ -1,11 +0,0 @@ -# NamedToolChoice - -Named tool choice for specific function - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `type` | [components.NamedToolChoiceType](../components/namedtoolchoicetype.md) | :heavy_check_mark: | N/A | -| `function` | [components.NamedToolChoiceFunction](../components/namedtoolchoicefunction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/namedtoolchoicefunction.md b/docs/components/namedtoolchoicefunction.md deleted file mode 100644 index 1415454..0000000 --- a/docs/components/namedtoolchoicefunction.md +++ /dev/null @@ -1,8 +0,0 @@ -# NamedToolChoiceFunction - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | -| `name` | *str* | :heavy_check_mark: | Function name to call | get_weather | \ No newline at end of file diff --git a/docs/components/namedtoolchoicetype.md b/docs/components/namedtoolchoicetype.md deleted file mode 100644 index 487c9b4..0000000 --- a/docs/components/namedtoolchoicetype.md +++ /dev/null @@ -1,8 +0,0 @@ -# NamedToolChoiceType - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `FUNCTION` | function | \ No newline at end of file diff --git a/docs/components/only.md b/docs/components/only.md deleted file mode 100644 index a62341b..0000000 --- a/docs/components/only.md +++ /dev/null @@ -1,17 +0,0 @@ -# Only - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/openairesponsesincludable.md b/docs/components/openairesponsesincludable.md deleted file mode 100644 index d3abf01..0000000 --- a/docs/components/openairesponsesincludable.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenAIResponsesIncludable - - -## Values - -| Name | Value | -| --------------------------------------- | --------------------------------------- | -| `FILE_SEARCH_CALL_RESULTS` | file_search_call.results | -| `MESSAGE_INPUT_IMAGE_IMAGE_URL` | message.input_image.image_url | -| `COMPUTER_CALL_OUTPUT_OUTPUT_IMAGE_URL` | computer_call_output.output.image_url | -| `REASONING_ENCRYPTED_CONTENT` | reasoning.encrypted_content | -| `CODE_INTERPRETER_CALL_OUTPUTS` | code_interpreter_call.outputs | \ No newline at end of file diff --git a/docs/components/openairesponsesincompletedetails.md b/docs/components/openairesponsesincompletedetails.md deleted file mode 100644 index e20d535..0000000 --- a/docs/components/openairesponsesincompletedetails.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesIncompleteDetails - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `reason` | [Optional[components.Reason]](../components/reason.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openairesponsesinputcontent1.md b/docs/components/openairesponsesinputcontent1.md deleted file mode 100644 index 90d20cd..0000000 --- a/docs/components/openairesponsesinputcontent1.md +++ /dev/null @@ -1,29 +0,0 @@ -# OpenAIResponsesInputContent1 - - -## Supported Types - -### `components.ResponseInputText` - -```python -value: components.ResponseInputText = /* values here */ -``` - -### `components.ResponseInputImage` - -```python -value: components.ResponseInputImage = /* values here */ -``` - -### `components.ResponseInputFile` - -```python -value: components.ResponseInputFile = /* values here */ -``` - -### `components.ResponseInputAudio` - -```python -value: components.ResponseInputAudio = /* values here */ -``` - diff --git a/docs/components/openairesponsesinputcontent2.md b/docs/components/openairesponsesinputcontent2.md deleted file mode 100644 index 9c2ba94..0000000 --- a/docs/components/openairesponsesinputcontent2.md +++ /dev/null @@ -1,17 +0,0 @@ -# OpenAIResponsesInputContent2 - - -## Supported Types - -### `List[components.OpenAIResponsesInputContent1]` - -```python -value: List[components.OpenAIResponsesInputContent1] = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/openairesponsesinputcontent3.md b/docs/components/openairesponsesinputcontent3.md deleted file mode 100644 index 19236dd..0000000 --- a/docs/components/openairesponsesinputcontent3.md +++ /dev/null @@ -1,29 +0,0 @@ -# OpenAIResponsesInputContent3 - - -## Supported Types - -### `components.ResponseInputText` - -```python -value: components.ResponseInputText = /* values here */ -``` - -### `components.ResponseInputImage` - -```python -value: components.ResponseInputImage = /* values here */ -``` - -### `components.ResponseInputFile` - -```python -value: components.ResponseInputFile = /* values here */ -``` - -### `components.ResponseInputAudio` - -```python -value: components.ResponseInputAudio = /* values here */ -``` - diff --git a/docs/components/openairesponsesinputfunctioncall.md b/docs/components/openairesponsesinputfunctioncall.md deleted file mode 100644 index 9b571b1..0000000 --- a/docs/components/openairesponsesinputfunctioncall.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenAIResponsesInputFunctionCall - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenAIResponsesInputTypeFunctionCall](../components/openairesponsesinputtypefunctioncall.md) | :heavy_check_mark: | N/A | | -| `call_id` | *str* | :heavy_check_mark: | N/A | | -| `name` | *str* | :heavy_check_mark: | N/A | | -| `arguments` | *str* | :heavy_check_mark: | N/A | | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `status` | [OptionalNullable[components.ToolCallStatus]](../components/toolcallstatus.md) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file diff --git a/docs/components/openairesponsesinputfunctioncalloutput.md b/docs/components/openairesponsesinputfunctioncalloutput.md deleted file mode 100644 index dde5cba..0000000 --- a/docs/components/openairesponsesinputfunctioncalloutput.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenAIResponsesInputFunctionCallOutput - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenAIResponsesInputTypeFunctionCallOutput](../components/openairesponsesinputtypefunctioncalloutput.md) | :heavy_check_mark: | N/A | | -| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `call_id` | *str* | :heavy_check_mark: | N/A | | -| `output` | *str* | :heavy_check_mark: | N/A | | -| `status` | [OptionalNullable[components.ToolCallStatus]](../components/toolcallstatus.md) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file diff --git a/docs/components/openairesponsesinputmessage1.md b/docs/components/openairesponsesinputmessage1.md deleted file mode 100644 index 3bbf8a8..0000000 --- a/docs/components/openairesponsesinputmessage1.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenAIResponsesInputMessage1 - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `type` | [Optional[components.OpenAIResponsesInputTypeMessage1]](../components/openairesponsesinputtypemessage1.md) | :heavy_minus_sign: | N/A | -| `role` | [components.OpenAIResponsesInputRoleUnion1](../components/openairesponsesinputroleunion1.md) | :heavy_check_mark: | N/A | -| `content` | [components.OpenAIResponsesInputContent2](../components/openairesponsesinputcontent2.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openairesponsesinputmessage2.md b/docs/components/openairesponsesinputmessage2.md deleted file mode 100644 index d1e0783..0000000 --- a/docs/components/openairesponsesinputmessage2.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenAIResponsesInputMessage2 - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `type` | [Optional[components.OpenAIResponsesInputTypeMessage2]](../components/openairesponsesinputtypemessage2.md) | :heavy_minus_sign: | N/A | -| `role` | [components.OpenAIResponsesInputRoleUnion2](../components/openairesponsesinputroleunion2.md) | :heavy_check_mark: | N/A | -| `content` | List[[components.OpenAIResponsesInputContent3](../components/openairesponsesinputcontent3.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openairesponsesinputroleassistant.md b/docs/components/openairesponsesinputroleassistant.md deleted file mode 100644 index 11b1a65..0000000 --- a/docs/components/openairesponsesinputroleassistant.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputRoleAssistant - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `ASSISTANT` | assistant | \ No newline at end of file diff --git a/docs/components/openairesponsesinputroledeveloper1.md b/docs/components/openairesponsesinputroledeveloper1.md deleted file mode 100644 index 96b7d42..0000000 --- a/docs/components/openairesponsesinputroledeveloper1.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputRoleDeveloper1 - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `DEVELOPER` | developer | \ No newline at end of file diff --git a/docs/components/openairesponsesinputroledeveloper2.md b/docs/components/openairesponsesinputroledeveloper2.md deleted file mode 100644 index bc3bdeb..0000000 --- a/docs/components/openairesponsesinputroledeveloper2.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputRoleDeveloper2 - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `DEVELOPER` | developer | \ No newline at end of file diff --git a/docs/components/openairesponsesinputrolesystem1.md b/docs/components/openairesponsesinputrolesystem1.md deleted file mode 100644 index be6e117..0000000 --- a/docs/components/openairesponsesinputrolesystem1.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputRoleSystem1 - - -## Values - -| Name | Value | -| -------- | -------- | -| `SYSTEM` | system | \ No newline at end of file diff --git a/docs/components/openairesponsesinputrolesystem2.md b/docs/components/openairesponsesinputrolesystem2.md deleted file mode 100644 index 4781f31..0000000 --- a/docs/components/openairesponsesinputrolesystem2.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputRoleSystem2 - - -## Values - -| Name | Value | -| -------- | -------- | -| `SYSTEM` | system | \ No newline at end of file diff --git a/docs/components/openairesponsesinputroleunion1.md b/docs/components/openairesponsesinputroleunion1.md deleted file mode 100644 index 4dc7abd..0000000 --- a/docs/components/openairesponsesinputroleunion1.md +++ /dev/null @@ -1,29 +0,0 @@ -# OpenAIResponsesInputRoleUnion1 - - -## Supported Types - -### `components.OpenAIResponsesInputRoleUser1` - -```python -value: components.OpenAIResponsesInputRoleUser1 = /* values here */ -``` - -### `components.OpenAIResponsesInputRoleSystem1` - -```python -value: components.OpenAIResponsesInputRoleSystem1 = /* values here */ -``` - -### `components.OpenAIResponsesInputRoleAssistant` - -```python -value: components.OpenAIResponsesInputRoleAssistant = /* values here */ -``` - -### `components.OpenAIResponsesInputRoleDeveloper1` - -```python -value: components.OpenAIResponsesInputRoleDeveloper1 = /* values here */ -``` - diff --git a/docs/components/openairesponsesinputroleunion2.md b/docs/components/openairesponsesinputroleunion2.md deleted file mode 100644 index 1e8af93..0000000 --- a/docs/components/openairesponsesinputroleunion2.md +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAIResponsesInputRoleUnion2 - - -## Supported Types - -### `components.OpenAIResponsesInputRoleUser2` - -```python -value: components.OpenAIResponsesInputRoleUser2 = /* values here */ -``` - -### `components.OpenAIResponsesInputRoleSystem2` - -```python -value: components.OpenAIResponsesInputRoleSystem2 = /* values here */ -``` - -### `components.OpenAIResponsesInputRoleDeveloper2` - -```python -value: components.OpenAIResponsesInputRoleDeveloper2 = /* values here */ -``` - diff --git a/docs/components/openairesponsesinputroleuser1.md b/docs/components/openairesponsesinputroleuser1.md deleted file mode 100644 index 13fbb4c..0000000 --- a/docs/components/openairesponsesinputroleuser1.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputRoleUser1 - - -## Values - -| Name | Value | -| ------ | ------ | -| `USER` | user | \ No newline at end of file diff --git a/docs/components/openairesponsesinputroleuser2.md b/docs/components/openairesponsesinputroleuser2.md deleted file mode 100644 index 8aa3c81..0000000 --- a/docs/components/openairesponsesinputroleuser2.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputRoleUser2 - - -## Values - -| Name | Value | -| ------ | ------ | -| `USER` | user | \ No newline at end of file diff --git a/docs/components/openairesponsesinputtypefunctioncall.md b/docs/components/openairesponsesinputtypefunctioncall.md deleted file mode 100644 index 575822c..0000000 --- a/docs/components/openairesponsesinputtypefunctioncall.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputTypeFunctionCall - - -## Values - -| Name | Value | -| --------------- | --------------- | -| `FUNCTION_CALL` | function_call | \ No newline at end of file diff --git a/docs/components/openairesponsesinputtypefunctioncalloutput.md b/docs/components/openairesponsesinputtypefunctioncalloutput.md deleted file mode 100644 index 1b85dff..0000000 --- a/docs/components/openairesponsesinputtypefunctioncalloutput.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputTypeFunctionCallOutput - - -## Values - -| Name | Value | -| ---------------------- | ---------------------- | -| `FUNCTION_CALL_OUTPUT` | function_call_output | \ No newline at end of file diff --git a/docs/components/openairesponsesinputtypemessage1.md b/docs/components/openairesponsesinputtypemessage1.md deleted file mode 100644 index 347cece..0000000 --- a/docs/components/openairesponsesinputtypemessage1.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputTypeMessage1 - - -## Values - -| Name | Value | -| --------- | --------- | -| `MESSAGE` | message | \ No newline at end of file diff --git a/docs/components/openairesponsesinputtypemessage2.md b/docs/components/openairesponsesinputtypemessage2.md deleted file mode 100644 index b90c11f..0000000 --- a/docs/components/openairesponsesinputtypemessage2.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenAIResponsesInputTypeMessage2 - - -## Values - -| Name | Value | -| --------- | --------- | -| `MESSAGE` | message | \ No newline at end of file diff --git a/docs/components/openairesponsesinputunion.md b/docs/components/openairesponsesinputunion.md deleted file mode 100644 index adecdc9..0000000 --- a/docs/components/openairesponsesinputunion.md +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAIResponsesInputUnion - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `List[components.OpenAIResponsesInputUnion1]` - -```python -value: List[components.OpenAIResponsesInputUnion1] = /* values here */ -``` - -### `Any` - -```python -value: Any = /* values here */ -``` - diff --git a/docs/components/openairesponsesinputunion1.md b/docs/components/openairesponsesinputunion1.md deleted file mode 100644 index 2c9603f..0000000 --- a/docs/components/openairesponsesinputunion1.md +++ /dev/null @@ -1,41 +0,0 @@ -# OpenAIResponsesInputUnion1 - - -## Supported Types - -### `components.OpenAIResponsesInputMessage1` - -```python -value: components.OpenAIResponsesInputMessage1 = /* values here */ -``` - -### `components.OpenAIResponsesInputMessage2` - -```python -value: components.OpenAIResponsesInputMessage2 = /* values here */ -``` - -### `components.OpenAIResponsesInputFunctionCallOutput` - -```python -value: components.OpenAIResponsesInputFunctionCallOutput = /* values here */ -``` - -### `components.OpenAIResponsesInputFunctionCall` - -```python -value: components.OpenAIResponsesInputFunctionCall = /* values here */ -``` - -### `components.OutputItemImageGenerationCall` - -```python -value: components.OutputItemImageGenerationCall = /* values here */ -``` - -### `components.OutputMessage` - -```python -value: components.OutputMessage = /* values here */ -``` - diff --git a/docs/components/openairesponsesprompt.md b/docs/components/openairesponsesprompt.md deleted file mode 100644 index 1398955..0000000 --- a/docs/components/openairesponsesprompt.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenAIResponsesPrompt - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `variables` | Dict[str, [components.Variables](../components/variables.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openairesponsesreasoningconfig.md b/docs/components/openairesponsesreasoningconfig.md deleted file mode 100644 index 6df062f..0000000 --- a/docs/components/openairesponsesreasoningconfig.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenAIResponsesReasoningConfig - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `effort` | [OptionalNullable[components.OpenAIResponsesReasoningEffort]](../components/openairesponsesreasoningeffort.md) | :heavy_minus_sign: | N/A | | -| `summary` | [OptionalNullable[components.ReasoningSummaryVerbosity]](../components/reasoningsummaryverbosity.md) | :heavy_minus_sign: | N/A | auto | \ No newline at end of file diff --git a/docs/components/openairesponsesreasoningeffort.md b/docs/components/openairesponsesreasoningeffort.md deleted file mode 100644 index dce6c3e..0000000 --- a/docs/components/openairesponsesreasoningeffort.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenAIResponsesReasoningEffort - - -## Values - -| Name | Value | -| --------- | --------- | -| `XHIGH` | xhigh | -| `HIGH` | high | -| `MEDIUM` | medium | -| `LOW` | low | -| `MINIMAL` | minimal | -| `NONE` | none | \ No newline at end of file diff --git a/docs/components/openairesponsesservicetier.md b/docs/components/openairesponsesservicetier.md deleted file mode 100644 index 2ce2fd8..0000000 --- a/docs/components/openairesponsesservicetier.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenAIResponsesServiceTier - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `AUTO` | auto | -| `DEFAULT` | default | -| `FLEX` | flex | -| `PRIORITY` | priority | -| `SCALE` | scale | \ No newline at end of file diff --git a/docs/components/openresponseseasyinputmessage.md b/docs/components/openresponseseasyinputmessage.md deleted file mode 100644 index 155dd0b..0000000 --- a/docs/components/openresponseseasyinputmessage.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenResponsesEasyInputMessage - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `type` | [Optional[components.OpenResponsesEasyInputMessageTypeMessage]](../components/openresponseseasyinputmessagetypemessage.md) | :heavy_minus_sign: | N/A | -| `role` | [components.OpenResponsesEasyInputMessageRoleUnion](../components/openresponseseasyinputmessageroleunion.md) | :heavy_check_mark: | N/A | -| `content` | [components.OpenResponsesEasyInputMessageContentUnion2](../components/openresponseseasyinputmessagecontentunion2.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponseseasyinputmessagecontentinputimage.md b/docs/components/openresponseseasyinputmessagecontentinputimage.md deleted file mode 100644 index 22c7936..0000000 --- a/docs/components/openresponseseasyinputmessagecontentinputimage.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesEasyInputMessageContentInputImage - -Image input content item - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesEasyInputMessageContentType](../components/openresponseseasyinputmessagecontenttype.md) | :heavy_check_mark: | N/A | -| `detail` | [components.OpenResponsesEasyInputMessageDetail](../components/openresponseseasyinputmessagedetail.md) | :heavy_check_mark: | N/A | -| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openresponseseasyinputmessagecontenttype.md b/docs/components/openresponseseasyinputmessagecontenttype.md deleted file mode 100644 index d399457..0000000 --- a/docs/components/openresponseseasyinputmessagecontenttype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesEasyInputMessageContentType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `INPUT_IMAGE` | input_image | \ No newline at end of file diff --git a/docs/components/openresponseseasyinputmessagecontentunion1.md b/docs/components/openresponseseasyinputmessagecontentunion1.md deleted file mode 100644 index e61d51e..0000000 --- a/docs/components/openresponseseasyinputmessagecontentunion1.md +++ /dev/null @@ -1,35 +0,0 @@ -# OpenResponsesEasyInputMessageContentUnion1 - - -## Supported Types - -### `components.ResponseInputText` - -```python -value: components.ResponseInputText = /* values here */ -``` - -### `components.OpenResponsesEasyInputMessageContentInputImage` - -```python -value: components.OpenResponsesEasyInputMessageContentInputImage = /* values here */ -``` - -### `components.ResponseInputFile` - -```python -value: components.ResponseInputFile = /* values here */ -``` - -### `components.ResponseInputAudio` - -```python -value: components.ResponseInputAudio = /* values here */ -``` - -### `components.ResponseInputVideo` - -```python -value: components.ResponseInputVideo = /* values here */ -``` - diff --git a/docs/components/openresponseseasyinputmessagecontentunion2.md b/docs/components/openresponseseasyinputmessagecontentunion2.md deleted file mode 100644 index 7bad765..0000000 --- a/docs/components/openresponseseasyinputmessagecontentunion2.md +++ /dev/null @@ -1,17 +0,0 @@ -# OpenResponsesEasyInputMessageContentUnion2 - - -## Supported Types - -### `List[components.OpenResponsesEasyInputMessageContentUnion1]` - -```python -value: List[components.OpenResponsesEasyInputMessageContentUnion1] = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/openresponseseasyinputmessagedetail.md b/docs/components/openresponseseasyinputmessagedetail.md deleted file mode 100644 index a58cdb0..0000000 --- a/docs/components/openresponseseasyinputmessagedetail.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenResponsesEasyInputMessageDetail - - -## Values - -| Name | Value | -| ------ | ------ | -| `AUTO` | auto | -| `HIGH` | high | -| `LOW` | low | \ No newline at end of file diff --git a/docs/components/openresponseseasyinputmessageroleassistant.md b/docs/components/openresponseseasyinputmessageroleassistant.md deleted file mode 100644 index 680dd73..0000000 --- a/docs/components/openresponseseasyinputmessageroleassistant.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesEasyInputMessageRoleAssistant - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `ASSISTANT` | assistant | \ No newline at end of file diff --git a/docs/components/openresponseseasyinputmessageroledeveloper.md b/docs/components/openresponseseasyinputmessageroledeveloper.md deleted file mode 100644 index 5bd1d42..0000000 --- a/docs/components/openresponseseasyinputmessageroledeveloper.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesEasyInputMessageRoleDeveloper - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `DEVELOPER` | developer | \ No newline at end of file diff --git a/docs/components/openresponseseasyinputmessagerolesystem.md b/docs/components/openresponseseasyinputmessagerolesystem.md deleted file mode 100644 index 9f66fe1..0000000 --- a/docs/components/openresponseseasyinputmessagerolesystem.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesEasyInputMessageRoleSystem - - -## Values - -| Name | Value | -| -------- | -------- | -| `SYSTEM` | system | \ No newline at end of file diff --git a/docs/components/openresponseseasyinputmessageroleunion.md b/docs/components/openresponseseasyinputmessageroleunion.md deleted file mode 100644 index 5214d0b..0000000 --- a/docs/components/openresponseseasyinputmessageroleunion.md +++ /dev/null @@ -1,29 +0,0 @@ -# OpenResponsesEasyInputMessageRoleUnion - - -## Supported Types - -### `components.OpenResponsesEasyInputMessageRoleUser` - -```python -value: components.OpenResponsesEasyInputMessageRoleUser = /* values here */ -``` - -### `components.OpenResponsesEasyInputMessageRoleSystem` - -```python -value: components.OpenResponsesEasyInputMessageRoleSystem = /* values here */ -``` - -### `components.OpenResponsesEasyInputMessageRoleAssistant` - -```python -value: components.OpenResponsesEasyInputMessageRoleAssistant = /* values here */ -``` - -### `components.OpenResponsesEasyInputMessageRoleDeveloper` - -```python -value: components.OpenResponsesEasyInputMessageRoleDeveloper = /* values here */ -``` - diff --git a/docs/components/openresponseseasyinputmessageroleuser.md b/docs/components/openresponseseasyinputmessageroleuser.md deleted file mode 100644 index b704af0..0000000 --- a/docs/components/openresponseseasyinputmessageroleuser.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesEasyInputMessageRoleUser - - -## Values - -| Name | Value | -| ------ | ------ | -| `USER` | user | \ No newline at end of file diff --git a/docs/components/openresponseseasyinputmessagetypemessage.md b/docs/components/openresponseseasyinputmessagetypemessage.md deleted file mode 100644 index ca8ca3d..0000000 --- a/docs/components/openresponseseasyinputmessagetypemessage.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesEasyInputMessageTypeMessage - - -## Values - -| Name | Value | -| --------- | --------- | -| `MESSAGE` | message | \ No newline at end of file diff --git a/docs/components/openresponseserrorevent.md b/docs/components/openresponseserrorevent.md deleted file mode 100644 index bb360eb..0000000 --- a/docs/components/openresponseserrorevent.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenResponsesErrorEvent - -Event emitted when an error occurs during streaming - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesErrorEventType](../components/openresponseserroreventtype.md) | :heavy_check_mark: | N/A | -| `code` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `message` | *str* | :heavy_check_mark: | N/A | -| `param` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponseserroreventtype.md b/docs/components/openresponseserroreventtype.md deleted file mode 100644 index 32e832c..0000000 --- a/docs/components/openresponseserroreventtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesErrorEventType - - -## Values - -| Name | Value | -| ------- | ------- | -| `ERROR` | error | \ No newline at end of file diff --git a/docs/components/openresponsesfunctioncalloutput.md b/docs/components/openresponsesfunctioncalloutput.md deleted file mode 100644 index adf40a2..0000000 --- a/docs/components/openresponsesfunctioncalloutput.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenResponsesFunctionCallOutput - -The output from a function call execution - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `type` | [components.OpenResponsesFunctionCallOutputType](../components/openresponsesfunctioncalloutputtype.md) | :heavy_check_mark: | N/A | | -| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `call_id` | *str* | :heavy_check_mark: | N/A | | -| `output` | *str* | :heavy_check_mark: | N/A | | -| `status` | [OptionalNullable[components.ToolCallStatus]](../components/toolcallstatus.md) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file diff --git a/docs/components/openresponsesfunctioncalloutputtype.md b/docs/components/openresponsesfunctioncalloutputtype.md deleted file mode 100644 index 41370cf..0000000 --- a/docs/components/openresponsesfunctioncalloutputtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesFunctionCallOutputType - - -## Values - -| Name | Value | -| ---------------------- | ---------------------- | -| `FUNCTION_CALL_OUTPUT` | function_call_output | \ No newline at end of file diff --git a/docs/components/openresponsesfunctiontoolcall.md b/docs/components/openresponsesfunctiontoolcall.md deleted file mode 100644 index 7d2b5af..0000000 --- a/docs/components/openresponsesfunctiontoolcall.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesFunctionToolCall - -A function call initiated by the model - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesFunctionToolCallType](../components/openresponsesfunctiontoolcalltype.md) | :heavy_check_mark: | N/A | | -| `call_id` | *str* | :heavy_check_mark: | N/A | | -| `name` | *str* | :heavy_check_mark: | N/A | | -| `arguments` | *str* | :heavy_check_mark: | N/A | | -| `id` | *str* | :heavy_check_mark: | N/A | | -| `status` | [OptionalNullable[components.ToolCallStatus]](../components/toolcallstatus.md) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file diff --git a/docs/components/openresponsesfunctiontoolcalltype.md b/docs/components/openresponsesfunctiontoolcalltype.md deleted file mode 100644 index e7b6246..0000000 --- a/docs/components/openresponsesfunctiontoolcalltype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesFunctionToolCallType - - -## Values - -| Name | Value | -| --------------- | --------------- | -| `FUNCTION_CALL` | function_call | \ No newline at end of file diff --git a/docs/components/openresponsesimagegencallcompleted.md b/docs/components/openresponsesimagegencallcompleted.md deleted file mode 100644 index 980e2a7..0000000 --- a/docs/components/openresponsesimagegencallcompleted.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenResponsesImageGenCallCompleted - -Image generation call completed - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `type` | [components.OpenResponsesImageGenCallCompletedType](../components/openresponsesimagegencallcompletedtype.md) | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesimagegencallcompletedtype.md b/docs/components/openresponsesimagegencallcompletedtype.md deleted file mode 100644 index a7316e0..0000000 --- a/docs/components/openresponsesimagegencallcompletedtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesImageGenCallCompletedType - - -## Values - -| Name | Value | -| ------------------------------------------ | ------------------------------------------ | -| `RESPONSE_IMAGE_GENERATION_CALL_COMPLETED` | response.image_generation_call.completed | \ No newline at end of file diff --git a/docs/components/openresponsesimagegencallgenerating.md b/docs/components/openresponsesimagegencallgenerating.md deleted file mode 100644 index cdd0be0..0000000 --- a/docs/components/openresponsesimagegencallgenerating.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenResponsesImageGenCallGenerating - -Image generation call is generating - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesImageGenCallGeneratingType](../components/openresponsesimagegencallgeneratingtype.md) | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesimagegencallgeneratingtype.md b/docs/components/openresponsesimagegencallgeneratingtype.md deleted file mode 100644 index 68c6984..0000000 --- a/docs/components/openresponsesimagegencallgeneratingtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesImageGenCallGeneratingType - - -## Values - -| Name | Value | -| ------------------------------------------- | ------------------------------------------- | -| `RESPONSE_IMAGE_GENERATION_CALL_GENERATING` | response.image_generation_call.generating | \ No newline at end of file diff --git a/docs/components/openresponsesimagegencallinprogress.md b/docs/components/openresponsesimagegencallinprogress.md deleted file mode 100644 index 2d9acad..0000000 --- a/docs/components/openresponsesimagegencallinprogress.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenResponsesImageGenCallInProgress - -Image generation call in progress - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesImageGenCallInProgressType](../components/openresponsesimagegencallinprogresstype.md) | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesimagegencallinprogresstype.md b/docs/components/openresponsesimagegencallinprogresstype.md deleted file mode 100644 index f681053..0000000 --- a/docs/components/openresponsesimagegencallinprogresstype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesImageGenCallInProgressType - - -## Values - -| Name | Value | -| -------------------------------------------- | -------------------------------------------- | -| `RESPONSE_IMAGE_GENERATION_CALL_IN_PROGRESS` | response.image_generation_call.in_progress | \ No newline at end of file diff --git a/docs/components/openresponsesimagegencallpartialimage.md b/docs/components/openresponsesimagegencallpartialimage.md deleted file mode 100644 index ce1a61c..0000000 --- a/docs/components/openresponsesimagegencallpartialimage.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesImageGenCallPartialImage - -Image generation call with partial image - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `type` | [components.OpenResponsesImageGenCallPartialImageType](../components/openresponsesimagegencallpartialimagetype.md) | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | -| `partial_image_b64` | *str* | :heavy_check_mark: | N/A | -| `partial_image_index` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesimagegencallpartialimagetype.md b/docs/components/openresponsesimagegencallpartialimagetype.md deleted file mode 100644 index b2cc016..0000000 --- a/docs/components/openresponsesimagegencallpartialimagetype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesImageGenCallPartialImageType - - -## Values - -| Name | Value | -| ---------------------------------------------- | ---------------------------------------------- | -| `RESPONSE_IMAGE_GENERATION_CALL_PARTIAL_IMAGE` | response.image_generation_call.partial_image | \ No newline at end of file diff --git a/docs/components/openresponsesinput.md b/docs/components/openresponsesinput.md deleted file mode 100644 index ac87902..0000000 --- a/docs/components/openresponsesinput.md +++ /dev/null @@ -1,19 +0,0 @@ -# OpenResponsesInput - -Input for a response request - can be a string or array of items - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `List[components.OpenResponsesInput1]` - -```python -value: List[components.OpenResponsesInput1] = /* values here */ -``` - diff --git a/docs/components/openresponsesinput1.md b/docs/components/openresponsesinput1.md deleted file mode 100644 index 8144878..0000000 --- a/docs/components/openresponsesinput1.md +++ /dev/null @@ -1,71 +0,0 @@ -# OpenResponsesInput1 - - -## Supported Types - -### `components.OpenResponsesReasoning` - -```python -value: components.OpenResponsesReasoning = /* values here */ -``` - -### `components.OpenResponsesEasyInputMessage` - -```python -value: components.OpenResponsesEasyInputMessage = /* values here */ -``` - -### `components.OpenResponsesInputMessageItem` - -```python -value: components.OpenResponsesInputMessageItem = /* values here */ -``` - -### `components.OpenResponsesFunctionToolCall` - -```python -value: components.OpenResponsesFunctionToolCall = /* values here */ -``` - -### `components.OpenResponsesFunctionCallOutput` - -```python -value: components.OpenResponsesFunctionCallOutput = /* values here */ -``` - -### `components.ResponsesOutputMessage` - -```python -value: components.ResponsesOutputMessage = /* values here */ -``` - -### `components.ResponsesOutputItemReasoning` - -```python -value: components.ResponsesOutputItemReasoning = /* values here */ -``` - -### `components.ResponsesOutputItemFunctionCall` - -```python -value: components.ResponsesOutputItemFunctionCall = /* values here */ -``` - -### `components.ResponsesWebSearchCallOutput` - -```python -value: components.ResponsesWebSearchCallOutput = /* values here */ -``` - -### `components.ResponsesOutputItemFileSearchCall` - -```python -value: components.ResponsesOutputItemFileSearchCall = /* values here */ -``` - -### `components.ResponsesImageGenerationCall` - -```python -value: components.ResponsesImageGenerationCall = /* values here */ -``` - diff --git a/docs/components/openresponsesinputmessageitem.md b/docs/components/openresponsesinputmessageitem.md deleted file mode 100644 index 827c798..0000000 --- a/docs/components/openresponsesinputmessageitem.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenResponsesInputMessageItem - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `type` | [Optional[components.OpenResponsesInputMessageItemTypeMessage]](../components/openresponsesinputmessageitemtypemessage.md) | :heavy_minus_sign: | N/A | -| `role` | [components.OpenResponsesInputMessageItemRoleUnion](../components/openresponsesinputmessageitemroleunion.md) | :heavy_check_mark: | N/A | -| `content` | List[[components.OpenResponsesInputMessageItemContentUnion](../components/openresponsesinputmessageitemcontentunion.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesinputmessageitemcontentinputimage.md b/docs/components/openresponsesinputmessageitemcontentinputimage.md deleted file mode 100644 index 910566f..0000000 --- a/docs/components/openresponsesinputmessageitemcontentinputimage.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesInputMessageItemContentInputImage - -Image input content item - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesInputMessageItemContentType](../components/openresponsesinputmessageitemcontenttype.md) | :heavy_check_mark: | N/A | -| `detail` | [components.OpenResponsesInputMessageItemDetail](../components/openresponsesinputmessageitemdetail.md) | :heavy_check_mark: | N/A | -| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesinputmessageitemcontenttype.md b/docs/components/openresponsesinputmessageitemcontenttype.md deleted file mode 100644 index 85418f2..0000000 --- a/docs/components/openresponsesinputmessageitemcontenttype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesInputMessageItemContentType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `INPUT_IMAGE` | input_image | \ No newline at end of file diff --git a/docs/components/openresponsesinputmessageitemcontentunion.md b/docs/components/openresponsesinputmessageitemcontentunion.md deleted file mode 100644 index f35796a..0000000 --- a/docs/components/openresponsesinputmessageitemcontentunion.md +++ /dev/null @@ -1,35 +0,0 @@ -# OpenResponsesInputMessageItemContentUnion - - -## Supported Types - -### `components.ResponseInputText` - -```python -value: components.ResponseInputText = /* values here */ -``` - -### `components.OpenResponsesInputMessageItemContentInputImage` - -```python -value: components.OpenResponsesInputMessageItemContentInputImage = /* values here */ -``` - -### `components.ResponseInputFile` - -```python -value: components.ResponseInputFile = /* values here */ -``` - -### `components.ResponseInputAudio` - -```python -value: components.ResponseInputAudio = /* values here */ -``` - -### `components.ResponseInputVideo` - -```python -value: components.ResponseInputVideo = /* values here */ -``` - diff --git a/docs/components/openresponsesinputmessageitemdetail.md b/docs/components/openresponsesinputmessageitemdetail.md deleted file mode 100644 index 5eff8d0..0000000 --- a/docs/components/openresponsesinputmessageitemdetail.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenResponsesInputMessageItemDetail - - -## Values - -| Name | Value | -| ------ | ------ | -| `AUTO` | auto | -| `HIGH` | high | -| `LOW` | low | \ No newline at end of file diff --git a/docs/components/openresponsesinputmessageitemroledeveloper.md b/docs/components/openresponsesinputmessageitemroledeveloper.md deleted file mode 100644 index 13450f7..0000000 --- a/docs/components/openresponsesinputmessageitemroledeveloper.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesInputMessageItemRoleDeveloper - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `DEVELOPER` | developer | \ No newline at end of file diff --git a/docs/components/openresponsesinputmessageitemrolesystem.md b/docs/components/openresponsesinputmessageitemrolesystem.md deleted file mode 100644 index e42d972..0000000 --- a/docs/components/openresponsesinputmessageitemrolesystem.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesInputMessageItemRoleSystem - - -## Values - -| Name | Value | -| -------- | -------- | -| `SYSTEM` | system | \ No newline at end of file diff --git a/docs/components/openresponsesinputmessageitemroleunion.md b/docs/components/openresponsesinputmessageitemroleunion.md deleted file mode 100644 index 0e0f375..0000000 --- a/docs/components/openresponsesinputmessageitemroleunion.md +++ /dev/null @@ -1,23 +0,0 @@ -# OpenResponsesInputMessageItemRoleUnion - - -## Supported Types - -### `components.OpenResponsesInputMessageItemRoleUser` - -```python -value: components.OpenResponsesInputMessageItemRoleUser = /* values here */ -``` - -### `components.OpenResponsesInputMessageItemRoleSystem` - -```python -value: components.OpenResponsesInputMessageItemRoleSystem = /* values here */ -``` - -### `components.OpenResponsesInputMessageItemRoleDeveloper` - -```python -value: components.OpenResponsesInputMessageItemRoleDeveloper = /* values here */ -``` - diff --git a/docs/components/openresponsesinputmessageitemroleuser.md b/docs/components/openresponsesinputmessageitemroleuser.md deleted file mode 100644 index 5e8163c..0000000 --- a/docs/components/openresponsesinputmessageitemroleuser.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesInputMessageItemRoleUser - - -## Values - -| Name | Value | -| ------ | ------ | -| `USER` | user | \ No newline at end of file diff --git a/docs/components/openresponsesinputmessageitemtypemessage.md b/docs/components/openresponsesinputmessageitemtypemessage.md deleted file mode 100644 index eae3581..0000000 --- a/docs/components/openresponsesinputmessageitemtypemessage.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesInputMessageItemTypeMessage - - -## Values - -| Name | Value | -| --------- | --------- | -| `MESSAGE` | message | \ No newline at end of file diff --git a/docs/components/openresponseslogprobs.md b/docs/components/openresponseslogprobs.md deleted file mode 100644 index 205bcac..0000000 --- a/docs/components/openresponseslogprobs.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesLogProbs - -Log probability information for a token - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `logprob` | *float* | :heavy_check_mark: | N/A | -| `token` | *str* | :heavy_check_mark: | N/A | -| `top_logprobs` | List[[components.OpenResponsesTopLogprobs](../components/openresponsestoplogprobs.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesnonstreamingresponse.md b/docs/components/openresponsesnonstreamingresponse.md deleted file mode 100644 index 2d79d72..0000000 --- a/docs/components/openresponsesnonstreamingresponse.md +++ /dev/null @@ -1,43 +0,0 @@ -# OpenResponsesNonStreamingResponse - -Complete non-streaming response from the Responses API - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | | -| `object` | [components.OpenResponsesNonStreamingResponseObject](../components/openresponsesnonstreamingresponseobject.md) | :heavy_check_mark: | N/A | | -| `created_at` | *float* | :heavy_check_mark: | N/A | | -| `model` | *str* | :heavy_check_mark: | N/A | | -| `status` | [components.OpenAIResponsesResponseStatus](../components/openairesponsesresponsestatus.md) | :heavy_check_mark: | N/A | | -| `completed_at` | *Nullable[float]* | :heavy_check_mark: | N/A | | -| `output` | List[[components.ResponsesOutputItem](../components/responsesoutputitem.md)] | :heavy_check_mark: | N/A | | -| `user` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `output_text` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `error` | [Nullable[components.ResponsesErrorField]](../components/responseserrorfield.md) | :heavy_check_mark: | Error information returned from the API | {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please try again later."
} | -| `incomplete_details` | [Nullable[components.OpenAIResponsesIncompleteDetails]](../components/openairesponsesincompletedetails.md) | :heavy_check_mark: | N/A | | -| `usage` | [OptionalNullable[components.OpenResponsesUsage]](../components/openresponsesusage.md) | :heavy_minus_sign: | Token usage information for the response | {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
},
"cost": 0.0012,
"cost_details": {
"upstream_inference_cost": null,
"upstream_inference_input_cost": 0.0008,
"upstream_inference_output_cost": 0.0004
}
} | -| `max_tool_calls` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_logprobs` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `temperature` | *Nullable[float]* | :heavy_check_mark: | N/A | | -| `top_p` | *Nullable[float]* | :heavy_check_mark: | N/A | | -| `presence_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | | -| `frequency_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | | -| `instructions` | [Nullable[components.OpenAIResponsesInputUnion]](../components/openairesponsesinputunion.md) | :heavy_check_mark: | N/A | | -| `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {
"user_id": "123",
"session_id": "abc-def-ghi"
} | -| `tools` | List[[components.OpenResponsesNonStreamingResponseToolUnion](../components/openresponsesnonstreamingresponsetoolunion.md)] | :heavy_check_mark: | N/A | | -| `tool_choice` | [components.OpenAIResponsesToolChoiceUnion](../components/openairesponsestoolchoiceunion.md) | :heavy_check_mark: | N/A | | -| `parallel_tool_calls` | *bool* | :heavy_check_mark: | N/A | | -| `prompt` | [OptionalNullable[components.OpenAIResponsesPrompt]](../components/openairesponsesprompt.md) | :heavy_minus_sign: | N/A | | -| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `reasoning` | [OptionalNullable[components.OpenAIResponsesReasoningConfig]](../components/openairesponsesreasoningconfig.md) | :heavy_minus_sign: | N/A | | -| `service_tier` | [OptionalNullable[components.OpenAIResponsesServiceTier]](../components/openairesponsesservicetier.md) | :heavy_minus_sign: | N/A | | -| `store` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../components/openairesponsestruncation.md) | :heavy_minus_sign: | N/A | | -| `text` | [Optional[components.ResponseTextConfig]](../components/responsetextconfig.md) | :heavy_minus_sign: | Text output configuration including format and verbosity | {
"format": {
"type": "text"
},
"verbosity": "medium"
} | \ No newline at end of file diff --git a/docs/components/openresponsesnonstreamingresponseobject.md b/docs/components/openresponsesnonstreamingresponseobject.md deleted file mode 100644 index 243bd54..0000000 --- a/docs/components/openresponsesnonstreamingresponseobject.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesNonStreamingResponseObject - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `RESPONSE` | response | \ No newline at end of file diff --git a/docs/components/openresponsesnonstreamingresponsetoolfunction.md b/docs/components/openresponsesnonstreamingresponsetoolfunction.md deleted file mode 100644 index 7ffb943..0000000 --- a/docs/components/openresponsesnonstreamingresponsetoolfunction.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenResponsesNonStreamingResponseToolFunction - -Function tool definition - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesNonStreamingResponseType](../components/openresponsesnonstreamingresponsetype.md) | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `parameters` | Dict[str, *Nullable[Any]*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesnonstreamingresponsetoolunion.md b/docs/components/openresponsesnonstreamingresponsetoolunion.md deleted file mode 100644 index cac4b7d..0000000 --- a/docs/components/openresponsesnonstreamingresponsetoolunion.md +++ /dev/null @@ -1,35 +0,0 @@ -# OpenResponsesNonStreamingResponseToolUnion - - -## Supported Types - -### `components.OpenResponsesNonStreamingResponseToolFunction` - -```python -value: components.OpenResponsesNonStreamingResponseToolFunction = /* values here */ -``` - -### `components.OpenResponsesWebSearchPreviewTool` - -```python -value: components.OpenResponsesWebSearchPreviewTool = /* values here */ -``` - -### `components.OpenResponsesWebSearchPreview20250311Tool` - -```python -value: components.OpenResponsesWebSearchPreview20250311Tool = /* values here */ -``` - -### `components.OpenResponsesWebSearchTool` - -```python -value: components.OpenResponsesWebSearchTool = /* values here */ -``` - -### `components.OpenResponsesWebSearch20250826Tool` - -```python -value: components.OpenResponsesWebSearch20250826Tool = /* values here */ -``` - diff --git a/docs/components/openresponsesnonstreamingresponsetype.md b/docs/components/openresponsesnonstreamingresponsetype.md deleted file mode 100644 index 5c2d918..0000000 --- a/docs/components/openresponsesnonstreamingresponsetype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesNonStreamingResponseType - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `FUNCTION` | function | \ No newline at end of file diff --git a/docs/components/openresponsesreasoning.md b/docs/components/openresponsesreasoning.md deleted file mode 100644 index 5495d1b..0000000 --- a/docs/components/openresponsesreasoning.md +++ /dev/null @@ -1,17 +0,0 @@ -# OpenResponsesReasoning - -Reasoning output item with signature and format extensions - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `type` | [components.OpenResponsesReasoningType](../components/openresponsesreasoningtype.md) | :heavy_check_mark: | N/A | -| `id` | *str* | :heavy_check_mark: | N/A | -| `content` | List[[components.ReasoningTextContent](../components/reasoningtextcontent.md)] | :heavy_minus_sign: | N/A | -| `summary` | List[[components.ReasoningSummaryText](../components/reasoningsummarytext.md)] | :heavy_check_mark: | N/A | -| `encrypted_content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `status` | [Optional[components.OpenResponsesReasoningStatusUnion]](../components/openresponsesreasoningstatusunion.md) | :heavy_minus_sign: | N/A | -| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `format_` | [OptionalNullable[components.OpenResponsesReasoningFormat]](../components/openresponsesreasoningformat.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningconfig.md b/docs/components/openresponsesreasoningconfig.md deleted file mode 100644 index d7a8e8a..0000000 --- a/docs/components/openresponsesreasoningconfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenResponsesReasoningConfig - -Configuration for reasoning mode in the response - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `effort` | [OptionalNullable[components.OpenAIResponsesReasoningEffort]](../components/openairesponsesreasoningeffort.md) | :heavy_minus_sign: | N/A | | -| `summary` | [OptionalNullable[components.ReasoningSummaryVerbosity]](../components/reasoningsummaryverbosity.md) | :heavy_minus_sign: | N/A | auto | -| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `enabled` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningdeltaevent.md b/docs/components/openresponsesreasoningdeltaevent.md deleted file mode 100644 index ef02f21..0000000 --- a/docs/components/openresponsesreasoningdeltaevent.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesReasoningDeltaEvent - -Event emitted when reasoning text delta is streamed - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesReasoningDeltaEventType](../components/openresponsesreasoningdeltaeventtype.md) | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `content_index` | *float* | :heavy_check_mark: | N/A | -| `delta` | *str* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningdeltaeventtype.md b/docs/components/openresponsesreasoningdeltaeventtype.md deleted file mode 100644 index 9edb675..0000000 --- a/docs/components/openresponsesreasoningdeltaeventtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesReasoningDeltaEventType - - -## Values - -| Name | Value | -| ------------------------------- | ------------------------------- | -| `RESPONSE_REASONING_TEXT_DELTA` | response.reasoning_text.delta | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningdoneevent.md b/docs/components/openresponsesreasoningdoneevent.md deleted file mode 100644 index 107ae0c..0000000 --- a/docs/components/openresponsesreasoningdoneevent.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesReasoningDoneEvent - -Event emitted when reasoning text streaming is complete - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `type` | [components.OpenResponsesReasoningDoneEventType](../components/openresponsesreasoningdoneeventtype.md) | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `content_index` | *float* | :heavy_check_mark: | N/A | -| `text` | *str* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningdoneeventtype.md b/docs/components/openresponsesreasoningdoneeventtype.md deleted file mode 100644 index acd40e2..0000000 --- a/docs/components/openresponsesreasoningdoneeventtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesReasoningDoneEventType - - -## Values - -| Name | Value | -| ------------------------------ | ------------------------------ | -| `RESPONSE_REASONING_TEXT_DONE` | response.reasoning_text.done | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningformat.md b/docs/components/openresponsesreasoningformat.md deleted file mode 100644 index dbf0b1a..0000000 --- a/docs/components/openresponsesreasoningformat.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenResponsesReasoningFormat - - -## Values - -| Name | Value | -| --------------------------- | --------------------------- | -| `UNKNOWN` | unknown | -| `OPENAI_RESPONSES_V1` | openai-responses-v1 | -| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 | -| `XAI_RESPONSES_V1` | xai-responses-v1 | -| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 | -| `GOOGLE_GEMINI_V1` | google-gemini-v1 | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningstatuscompleted.md b/docs/components/openresponsesreasoningstatuscompleted.md deleted file mode 100644 index f484dd1..0000000 --- a/docs/components/openresponsesreasoningstatuscompleted.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesReasoningStatusCompleted - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `COMPLETED` | completed | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningstatusincomplete.md b/docs/components/openresponsesreasoningstatusincomplete.md deleted file mode 100644 index c075e66..0000000 --- a/docs/components/openresponsesreasoningstatusincomplete.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesReasoningStatusIncomplete - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `INCOMPLETE` | incomplete | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningstatusinprogress.md b/docs/components/openresponsesreasoningstatusinprogress.md deleted file mode 100644 index be49f96..0000000 --- a/docs/components/openresponsesreasoningstatusinprogress.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesReasoningStatusInProgress - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `IN_PROGRESS` | in_progress | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningstatusunion.md b/docs/components/openresponsesreasoningstatusunion.md deleted file mode 100644 index 7f60b8c..0000000 --- a/docs/components/openresponsesreasoningstatusunion.md +++ /dev/null @@ -1,23 +0,0 @@ -# OpenResponsesReasoningStatusUnion - - -## Supported Types - -### `components.OpenResponsesReasoningStatusCompleted` - -```python -value: components.OpenResponsesReasoningStatusCompleted = /* values here */ -``` - -### `components.OpenResponsesReasoningStatusIncomplete` - -```python -value: components.OpenResponsesReasoningStatusIncomplete = /* values here */ -``` - -### `components.OpenResponsesReasoningStatusInProgress` - -```python -value: components.OpenResponsesReasoningStatusInProgress = /* values here */ -``` - diff --git a/docs/components/openresponsesreasoningsummarypartaddedevent.md b/docs/components/openresponsesreasoningsummarypartaddedevent.md deleted file mode 100644 index b93704b..0000000 --- a/docs/components/openresponsesreasoningsummarypartaddedevent.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesReasoningSummaryPartAddedEvent - -Event emitted when a reasoning summary part is added - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `type` | [components.OpenResponsesReasoningSummaryPartAddedEventType](../components/openresponsesreasoningsummarypartaddedeventtype.md) | :heavy_check_mark: | N/A | | -| `output_index` | *float* | :heavy_check_mark: | N/A | | -| `item_id` | *str* | :heavy_check_mark: | N/A | | -| `summary_index` | *float* | :heavy_check_mark: | N/A | | -| `part` | [components.ReasoningSummaryText](../components/reasoningsummarytext.md) | :heavy_check_mark: | N/A | {
"type": "summary_text",
"text": "Analyzed the problem using first principles"
} | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningsummarypartaddedeventtype.md b/docs/components/openresponsesreasoningsummarypartaddedeventtype.md deleted file mode 100644 index 30a9e35..0000000 --- a/docs/components/openresponsesreasoningsummarypartaddedeventtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesReasoningSummaryPartAddedEventType - - -## Values - -| Name | Value | -| --------------------------------------- | --------------------------------------- | -| `RESPONSE_REASONING_SUMMARY_PART_ADDED` | response.reasoning_summary_part.added | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningsummarytextdeltaevent.md b/docs/components/openresponsesreasoningsummarytextdeltaevent.md deleted file mode 100644 index 902860d..0000000 --- a/docs/components/openresponsesreasoningsummarytextdeltaevent.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesReasoningSummaryTextDeltaEvent - -Event emitted when reasoning summary text delta is streamed - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `type` | [components.OpenResponsesReasoningSummaryTextDeltaEventType](../components/openresponsesreasoningsummarytextdeltaeventtype.md) | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `summary_index` | *float* | :heavy_check_mark: | N/A | -| `delta` | *str* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningsummarytextdeltaeventtype.md b/docs/components/openresponsesreasoningsummarytextdeltaeventtype.md deleted file mode 100644 index 1c60ce2..0000000 --- a/docs/components/openresponsesreasoningsummarytextdeltaeventtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesReasoningSummaryTextDeltaEventType - - -## Values - -| Name | Value | -| --------------------------------------- | --------------------------------------- | -| `RESPONSE_REASONING_SUMMARY_TEXT_DELTA` | response.reasoning_summary_text.delta | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningsummarytextdoneevent.md b/docs/components/openresponsesreasoningsummarytextdoneevent.md deleted file mode 100644 index 9a64440..0000000 --- a/docs/components/openresponsesreasoningsummarytextdoneevent.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesReasoningSummaryTextDoneEvent - -Event emitted when reasoning summary text streaming is complete - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesReasoningSummaryTextDoneEventType](../components/openresponsesreasoningsummarytextdoneeventtype.md) | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `summary_index` | *float* | :heavy_check_mark: | N/A | -| `text` | *str* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningsummarytextdoneeventtype.md b/docs/components/openresponsesreasoningsummarytextdoneeventtype.md deleted file mode 100644 index c2c83e3..0000000 --- a/docs/components/openresponsesreasoningsummarytextdoneeventtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesReasoningSummaryTextDoneEventType - - -## Values - -| Name | Value | -| -------------------------------------- | -------------------------------------- | -| `RESPONSE_REASONING_SUMMARY_TEXT_DONE` | response.reasoning_summary_text.done | \ No newline at end of file diff --git a/docs/components/openresponsesreasoningtype.md b/docs/components/openresponsesreasoningtype.md deleted file mode 100644 index 7536398..0000000 --- a/docs/components/openresponsesreasoningtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesReasoningType - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `REASONING` | reasoning | \ No newline at end of file diff --git a/docs/components/openresponsesrequest.md b/docs/components/openresponsesrequest.md deleted file mode 100644 index 23cf648..0000000 --- a/docs/components/openresponsesrequest.md +++ /dev/null @@ -1,44 +0,0 @@ -# OpenResponsesRequest - -Request schema for Responses endpoint - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `input` | [Optional[components.OpenResponsesInput]](../components/openresponsesinput.md) | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [
{
"role": "user",
"content": "What is the weather today?"
}
] | -| `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {
"user_id": "123",
"session_id": "abc-def-ghi"
} | -| `tools` | List[[components.OpenResponsesRequestToolUnion](../components/openresponsesrequesttoolunion.md)] | :heavy_minus_sign: | N/A | | -| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../components/openairesponsestoolchoiceunion.md) | :heavy_minus_sign: | N/A | | -| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `model` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `models` | List[*str*] | :heavy_minus_sign: | N/A | | -| `text` | [Optional[components.OpenResponsesResponseText]](../components/openresponsesresponsetext.md) | :heavy_minus_sign: | Text output configuration including format and verbosity | {
"format": {
"type": "text"
},
"verbosity": "medium"
} | -| `reasoning` | [OptionalNullable[components.OpenResponsesReasoningConfig]](../components/openresponsesreasoningconfig.md) | :heavy_minus_sign: | Configuration for reasoning mode in the response | {
"summary": "auto",
"enabled": true
} | -| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `max_tool_calls` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `image_config` | Dict[str, [components.OpenResponsesRequestImageConfig](../components/openresponsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9"
} | -| `modalities` | List[[components.ResponsesOutputModality](../components/responsesoutputmodality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] | -| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `prompt` | [OptionalNullable[components.OpenAIResponsesPrompt]](../components/openairesponsesprompt.md) | :heavy_minus_sign: | N/A | | -| `include` | List[[components.OpenAIResponsesIncludable](../components/openairesponsesincludable.md)] | :heavy_minus_sign: | N/A | | -| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `store` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | | -| `service_tier` | [Optional[components.ServiceTier]](../components/servicetier.md) | :heavy_minus_sign: | N/A | | -| `truncation` | [OptionalNullable[components.Truncation]](../components/truncation.md) | :heavy_minus_sign: | N/A | auto | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `provider` | [OptionalNullable[components.OpenResponsesRequestProvider]](../components/openresponsesrequestprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | | -| `plugins` | List[[components.OpenResponsesRequestPluginUnion](../components/openresponsesrequestpluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | | -| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | | -| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | | -| `trace` | [Optional[components.OpenResponsesRequestTrace]](../components/openresponsesrequesttrace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | | \ No newline at end of file diff --git a/docs/components/openresponsesrequestengine.md b/docs/components/openresponsesrequestengine.md deleted file mode 100644 index 76a29d2..0000000 --- a/docs/components/openresponsesrequestengine.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenResponsesRequestEngine - - -## Values - -| Name | Value | -| -------- | -------- | -| `NATIVE` | native | -| `EXA` | exa | \ No newline at end of file diff --git a/docs/components/openresponsesrequestidautorouter.md b/docs/components/openresponsesrequestidautorouter.md deleted file mode 100644 index e4dd743..0000000 --- a/docs/components/openresponsesrequestidautorouter.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesRequestIDAutoRouter - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `AUTO_ROUTER` | auto-router | \ No newline at end of file diff --git a/docs/components/openresponsesrequestidfileparser.md b/docs/components/openresponsesrequestidfileparser.md deleted file mode 100644 index f08492c..0000000 --- a/docs/components/openresponsesrequestidfileparser.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesRequestIDFileParser - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `FILE_PARSER` | file-parser | \ No newline at end of file diff --git a/docs/components/openresponsesrequestidmoderation.md b/docs/components/openresponsesrequestidmoderation.md deleted file mode 100644 index acaf610..0000000 --- a/docs/components/openresponsesrequestidmoderation.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesRequestIDModeration - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `MODERATION` | moderation | \ No newline at end of file diff --git a/docs/components/openresponsesrequestidresponsehealing.md b/docs/components/openresponsesrequestidresponsehealing.md deleted file mode 100644 index a0c2ca9..0000000 --- a/docs/components/openresponsesrequestidresponsehealing.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesRequestIDResponseHealing - - -## Values - -| Name | Value | -| ------------------ | ------------------ | -| `RESPONSE_HEALING` | response-healing | \ No newline at end of file diff --git a/docs/components/openresponsesrequestidweb.md b/docs/components/openresponsesrequestidweb.md deleted file mode 100644 index 121966e..0000000 --- a/docs/components/openresponsesrequestidweb.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesRequestIDWeb - - -## Values - -| Name | Value | -| ----- | ----- | -| `WEB` | web | \ No newline at end of file diff --git a/docs/components/openresponsesrequestignore.md b/docs/components/openresponsesrequestignore.md deleted file mode 100644 index 4528330..0000000 --- a/docs/components/openresponsesrequestignore.md +++ /dev/null @@ -1,17 +0,0 @@ -# OpenResponsesRequestIgnore - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/openresponsesrequestimageconfig.md b/docs/components/openresponsesrequestimageconfig.md deleted file mode 100644 index 0bfb1b7..0000000 --- a/docs/components/openresponsesrequestimageconfig.md +++ /dev/null @@ -1,17 +0,0 @@ -# OpenResponsesRequestImageConfig - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `float` - -```python -value: float = /* values here */ -``` - diff --git a/docs/components/openresponsesrequestmaxprice.md b/docs/components/openresponsesrequestmaxprice.md deleted file mode 100644 index 0b5bbdc..0000000 --- a/docs/components/openresponsesrequestmaxprice.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenResponsesRequestMaxPrice - -The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `prompt` | *Optional[str]* | :heavy_minus_sign: | Price per million prompt tokens | 1000 | -| `completion` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | -| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | \ No newline at end of file diff --git a/docs/components/openresponsesrequestonly.md b/docs/components/openresponsesrequestonly.md deleted file mode 100644 index d1ee630..0000000 --- a/docs/components/openresponsesrequestonly.md +++ /dev/null @@ -1,17 +0,0 @@ -# OpenResponsesRequestOnly - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/openresponsesrequestorder.md b/docs/components/openresponsesrequestorder.md deleted file mode 100644 index 50da1f9..0000000 --- a/docs/components/openresponsesrequestorder.md +++ /dev/null @@ -1,17 +0,0 @@ -# OpenResponsesRequestOrder - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/openresponsesrequestpdf.md b/docs/components/openresponsesrequestpdf.md deleted file mode 100644 index 8915572..0000000 --- a/docs/components/openresponsesrequestpdf.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesRequestPdf - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `engine` | [Optional[components.OpenResponsesRequestPdfEngine]](../components/openresponsesrequestpdfengine.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesrequestpdfengine.md b/docs/components/openresponsesrequestpdfengine.md deleted file mode 100644 index d4f6a7c..0000000 --- a/docs/components/openresponsesrequestpdfengine.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenResponsesRequestPdfEngine - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `MISTRAL_OCR` | mistral-ocr | -| `PDF_TEXT` | pdf-text | -| `NATIVE` | native | \ No newline at end of file diff --git a/docs/components/openresponsesrequestpluginautorouter.md b/docs/components/openresponsesrequestpluginautorouter.md deleted file mode 100644 index 3a7ad4a..0000000 --- a/docs/components/openresponsesrequestpluginautorouter.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenResponsesRequestPluginAutoRouter - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | [components.OpenResponsesRequestIDAutoRouter](../components/openresponsesrequestidautorouter.md) | :heavy_check_mark: | N/A | | -| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the auto-router plugin for this request. Defaults to true. | | -| `allowed_models` | List[*str*] | :heavy_minus_sign: | List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list. | [
"anthropic/*",
"openai/gpt-4o",
"google/*"
] | \ No newline at end of file diff --git a/docs/components/openresponsesrequestpluginfileparser.md b/docs/components/openresponsesrequestpluginfileparser.md deleted file mode 100644 index 7f978df..0000000 --- a/docs/components/openresponsesrequestpluginfileparser.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenResponsesRequestPluginFileParser - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `id` | [components.OpenResponsesRequestIDFileParser](../components/openresponsesrequestidfileparser.md) | :heavy_check_mark: | N/A | -| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the file-parser plugin for this request. Defaults to true. | -| `pdf` | [Optional[components.PDFParserOptions]](../components/pdfparseroptions.md) | :heavy_minus_sign: | Options for PDF parsing. | \ No newline at end of file diff --git a/docs/components/openresponsesrequestpluginmoderation.md b/docs/components/openresponsesrequestpluginmoderation.md deleted file mode 100644 index d29983c..0000000 --- a/docs/components/openresponsesrequestpluginmoderation.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesRequestPluginModeration - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `id` | [components.OpenResponsesRequestIDModeration](../components/openresponsesrequestidmoderation.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesrequestpluginresponsehealing.md b/docs/components/openresponsesrequestpluginresponsehealing.md deleted file mode 100644 index 5113dc8..0000000 --- a/docs/components/openresponsesrequestpluginresponsehealing.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenResponsesRequestPluginResponseHealing - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `id` | [components.OpenResponsesRequestIDResponseHealing](../components/openresponsesrequestidresponsehealing.md) | :heavy_check_mark: | N/A | -| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the response-healing plugin for this request. Defaults to true. | \ No newline at end of file diff --git a/docs/components/openresponsesrequestpluginunion.md b/docs/components/openresponsesrequestpluginunion.md deleted file mode 100644 index e164b2e..0000000 --- a/docs/components/openresponsesrequestpluginunion.md +++ /dev/null @@ -1,35 +0,0 @@ -# OpenResponsesRequestPluginUnion - - -## Supported Types - -### `components.OpenResponsesRequestPluginAutoRouter` - -```python -value: components.OpenResponsesRequestPluginAutoRouter = /* values here */ -``` - -### `components.OpenResponsesRequestPluginModeration` - -```python -value: components.OpenResponsesRequestPluginModeration = /* values here */ -``` - -### `components.OpenResponsesRequestPluginWeb` - -```python -value: components.OpenResponsesRequestPluginWeb = /* values here */ -``` - -### `components.OpenResponsesRequestPluginFileParser` - -```python -value: components.OpenResponsesRequestPluginFileParser = /* values here */ -``` - -### `components.OpenResponsesRequestPluginResponseHealing` - -```python -value: components.OpenResponsesRequestPluginResponseHealing = /* values here */ -``` - diff --git a/docs/components/openresponsesrequestpluginweb.md b/docs/components/openresponsesrequestpluginweb.md deleted file mode 100644 index d308049..0000000 --- a/docs/components/openresponsesrequestpluginweb.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesRequestPluginWeb - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `id` | [components.OpenResponsesRequestIDWeb](../components/openresponsesrequestidweb.md) | :heavy_check_mark: | N/A | -| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. | -| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A | -| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `engine` | [Optional[components.WebSearchEngine]](../components/websearchengine.md) | :heavy_minus_sign: | The search engine to use for web search. | \ No newline at end of file diff --git a/docs/components/openresponsesrequestprovider.md b/docs/components/openresponsesrequestprovider.md deleted file mode 100644 index 5fde781..0000000 --- a/docs/components/openresponsesrequestprovider.md +++ /dev/null @@ -1,22 +0,0 @@ -# OpenResponsesRequestProvider - -When multiple model providers are available, optionally indicate your routing preference. - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
| | -| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | | -| `data_collection` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it

- deny: use only providers which do not collect user data. | allow | -| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true | -| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true | -| `order` | List[[components.OpenResponsesRequestOrder](../components/openresponsesrequestorder.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | | -| `only` | List[[components.OpenResponsesRequestOnly](../components/openresponsesrequestonly.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | | -| `ignore` | List[[components.OpenResponsesRequestIgnore](../components/openresponsesrequestignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | | -| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | | -| `sort` | [OptionalNullable[components.OpenResponsesRequestSort]](../components/openresponsesrequestsort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price | -| `max_price` | [Optional[components.OpenResponsesRequestMaxPrice]](../components/openresponsesrequestmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | | -| `preferred_min_throughput` | [OptionalNullable[components.PreferredMinThroughput]](../components/preferredminthroughput.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 100 | -| `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 | \ No newline at end of file diff --git a/docs/components/openresponsesrequestroute.md b/docs/components/openresponsesrequestroute.md deleted file mode 100644 index 9f33f3f..0000000 --- a/docs/components/openresponsesrequestroute.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenResponsesRequestRoute - -Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria. - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `FALLBACK` | fallback | -| `SORT` | sort | \ No newline at end of file diff --git a/docs/components/openresponsesrequestsort.md b/docs/components/openresponsesrequestsort.md deleted file mode 100644 index 3fd9dc7..0000000 --- a/docs/components/openresponsesrequestsort.md +++ /dev/null @@ -1,25 +0,0 @@ -# OpenResponsesRequestSort - -The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - - -## Supported Types - -### `components.ProviderSort` - -```python -value: components.ProviderSort = /* values here */ -``` - -### `components.ProviderSortConfig` - -```python -value: components.ProviderSortConfig = /* values here */ -``` - -### `Any` - -```python -value: Any = /* values here */ -``` - diff --git a/docs/components/openresponsesrequesttoolfunction.md b/docs/components/openresponsesrequesttoolfunction.md deleted file mode 100644 index cb13756..0000000 --- a/docs/components/openresponsesrequesttoolfunction.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenResponsesRequestToolFunction - -Function tool definition - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesRequestType](../components/openresponsesrequesttype.md) | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `parameters` | Dict[str, *Nullable[Any]*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesrequesttoolunion.md b/docs/components/openresponsesrequesttoolunion.md deleted file mode 100644 index d05f4d7..0000000 --- a/docs/components/openresponsesrequesttoolunion.md +++ /dev/null @@ -1,35 +0,0 @@ -# OpenResponsesRequestToolUnion - - -## Supported Types - -### `components.OpenResponsesRequestToolFunction` - -```python -value: components.OpenResponsesRequestToolFunction = /* values here */ -``` - -### `components.OpenResponsesWebSearchPreviewTool` - -```python -value: components.OpenResponsesWebSearchPreviewTool = /* values here */ -``` - -### `components.OpenResponsesWebSearchPreview20250311Tool` - -```python -value: components.OpenResponsesWebSearchPreview20250311Tool = /* values here */ -``` - -### `components.OpenResponsesWebSearchTool` - -```python -value: components.OpenResponsesWebSearchTool = /* values here */ -``` - -### `components.OpenResponsesWebSearch20250826Tool` - -```python -value: components.OpenResponsesWebSearch20250826Tool = /* values here */ -``` - diff --git a/docs/components/openresponsesrequesttrace.md b/docs/components/openresponsesrequesttrace.md deleted file mode 100644 index 150b916..0000000 --- a/docs/components/openresponsesrequesttrace.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesRequestTrace - -Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -| `trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `trace_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `span_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `generation_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `parent_span_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesrequesttype.md b/docs/components/openresponsesrequesttype.md deleted file mode 100644 index 629615d..0000000 --- a/docs/components/openresponsesrequesttype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesRequestType - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `FUNCTION` | function | \ No newline at end of file diff --git a/docs/components/openresponsesresponsetext.md b/docs/components/openresponsesresponsetext.md deleted file mode 100644 index 8199698..0000000 --- a/docs/components/openresponsesresponsetext.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenResponsesResponseText - -Text output configuration including format and verbosity - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `format_` | [Optional[components.ResponseFormatTextConfig]](../components/responseformattextconfig.md) | :heavy_minus_sign: | Text response format configuration | {
"type": "text"
} | -| `verbosity` | [OptionalNullable[components.OpenResponsesResponseTextVerbosity]](../components/openresponsesresponsetextverbosity.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesresponsetextverbosity.md b/docs/components/openresponsesresponsetextverbosity.md deleted file mode 100644 index d7622e2..0000000 --- a/docs/components/openresponsesresponsetextverbosity.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenResponsesResponseTextVerbosity - - -## Values - -| Name | Value | -| -------- | -------- | -| `HIGH` | high | -| `LOW` | low | -| `MEDIUM` | medium | \ No newline at end of file diff --git a/docs/components/openresponsesstreamevent.md b/docs/components/openresponsesstreamevent.md deleted file mode 100644 index bc0a98a..0000000 --- a/docs/components/openresponsesstreamevent.md +++ /dev/null @@ -1,169 +0,0 @@ -# OpenResponsesStreamEvent - -Union of all possible event types emitted during response streaming - - -## Supported Types - -### `components.OpenResponsesStreamEventResponseCreated` - -```python -value: components.OpenResponsesStreamEventResponseCreated = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseInProgress` - -```python -value: components.OpenResponsesStreamEventResponseInProgress = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseCompleted` - -```python -value: components.OpenResponsesStreamEventResponseCompleted = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseIncomplete` - -```python -value: components.OpenResponsesStreamEventResponseIncomplete = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseFailed` - -```python -value: components.OpenResponsesStreamEventResponseFailed = /* values here */ -``` - -### `components.OpenResponsesErrorEvent` - -```python -value: components.OpenResponsesErrorEvent = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseOutputItemAdded` - -```python -value: components.OpenResponsesStreamEventResponseOutputItemAdded = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseOutputItemDone` - -```python -value: components.OpenResponsesStreamEventResponseOutputItemDone = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseContentPartAdded` - -```python -value: components.OpenResponsesStreamEventResponseContentPartAdded = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseContentPartDone` - -```python -value: components.OpenResponsesStreamEventResponseContentPartDone = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseOutputTextDelta` - -```python -value: components.OpenResponsesStreamEventResponseOutputTextDelta = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseOutputTextDone` - -```python -value: components.OpenResponsesStreamEventResponseOutputTextDone = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseRefusalDelta` - -```python -value: components.OpenResponsesStreamEventResponseRefusalDelta = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseRefusalDone` - -```python -value: components.OpenResponsesStreamEventResponseRefusalDone = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseOutputTextAnnotationAdded` - -```python -value: components.OpenResponsesStreamEventResponseOutputTextAnnotationAdded = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseFunctionCallArgumentsDelta` - -```python -value: components.OpenResponsesStreamEventResponseFunctionCallArgumentsDelta = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseFunctionCallArgumentsDone` - -```python -value: components.OpenResponsesStreamEventResponseFunctionCallArgumentsDone = /* values here */ -``` - -### `components.OpenResponsesReasoningDeltaEvent` - -```python -value: components.OpenResponsesReasoningDeltaEvent = /* values here */ -``` - -### `components.OpenResponsesReasoningDoneEvent` - -```python -value: components.OpenResponsesReasoningDoneEvent = /* values here */ -``` - -### `components.OpenResponsesReasoningSummaryPartAddedEvent` - -```python -value: components.OpenResponsesReasoningSummaryPartAddedEvent = /* values here */ -``` - -### `components.OpenResponsesStreamEventResponseReasoningSummaryPartDone` - -```python -value: components.OpenResponsesStreamEventResponseReasoningSummaryPartDone = /* values here */ -``` - -### `components.OpenResponsesReasoningSummaryTextDeltaEvent` - -```python -value: components.OpenResponsesReasoningSummaryTextDeltaEvent = /* values here */ -``` - -### `components.OpenResponsesReasoningSummaryTextDoneEvent` - -```python -value: components.OpenResponsesReasoningSummaryTextDoneEvent = /* values here */ -``` - -### `components.OpenResponsesImageGenCallInProgress` - -```python -value: components.OpenResponsesImageGenCallInProgress = /* values here */ -``` - -### `components.OpenResponsesImageGenCallGenerating` - -```python -value: components.OpenResponsesImageGenCallGenerating = /* values here */ -``` - -### `components.OpenResponsesImageGenCallPartialImage` - -```python -value: components.OpenResponsesImageGenCallPartialImage = /* values here */ -``` - -### `components.OpenResponsesImageGenCallCompleted` - -```python -value: components.OpenResponsesImageGenCallCompleted = /* values here */ -``` - diff --git a/docs/components/openresponsesstreameventresponsecompleted.md b/docs/components/openresponsesstreameventresponsecompleted.md deleted file mode 100644 index e676145..0000000 --- a/docs/components/openresponsesstreameventresponsecompleted.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesStreamEventResponseCompleted - -Event emitted when a response has completed successfully - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseCompleted](../components/typeresponsecompleted.md) | :heavy_check_mark: | N/A | | -| `response` | [components.OpenResponsesNonStreamingResponse](../components/openresponsesnonstreamingresponse.md) | :heavy_check_mark: | Complete non-streaming response from the Responses API | {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg-abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null,
"metadata": null,
"instructions": null
} | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponsecontentpartadded.md b/docs/components/openresponsesstreameventresponsecontentpartadded.md deleted file mode 100644 index 0b56c6d..0000000 --- a/docs/components/openresponsesstreameventresponsecontentpartadded.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesStreamEventResponseContentPartAdded - -Event emitted when a new content part is added to an output item - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseContentPartAdded](../components/typeresponsecontentpartadded.md) | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `content_index` | *float* | :heavy_check_mark: | N/A | -| `part` | [components.Part1](../components/part1.md) | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponsecontentpartdone.md b/docs/components/openresponsesstreameventresponsecontentpartdone.md deleted file mode 100644 index 5c6bc60..0000000 --- a/docs/components/openresponsesstreameventresponsecontentpartdone.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesStreamEventResponseContentPartDone - -Event emitted when a content part is complete - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseContentPartDone](../components/typeresponsecontentpartdone.md) | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `content_index` | *float* | :heavy_check_mark: | N/A | -| `part` | [components.Part2](../components/part2.md) | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponsecreated.md b/docs/components/openresponsesstreameventresponsecreated.md deleted file mode 100644 index 1a07bc7..0000000 --- a/docs/components/openresponsesstreameventresponsecreated.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesStreamEventResponseCreated - -Event emitted when a response is created - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseCreated](../components/typeresponsecreated.md) | :heavy_check_mark: | N/A | | -| `response` | [components.OpenResponsesNonStreamingResponse](../components/openresponsesnonstreamingresponse.md) | :heavy_check_mark: | Complete non-streaming response from the Responses API | {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg-abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null,
"metadata": null,
"instructions": null
} | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponsefailed.md b/docs/components/openresponsesstreameventresponsefailed.md deleted file mode 100644 index e273174..0000000 --- a/docs/components/openresponsesstreameventresponsefailed.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesStreamEventResponseFailed - -Event emitted when a response has failed - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseFailed](../components/typeresponsefailed.md) | :heavy_check_mark: | N/A | | -| `response` | [components.OpenResponsesNonStreamingResponse](../components/openresponsesnonstreamingresponse.md) | :heavy_check_mark: | Complete non-streaming response from the Responses API | {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg-abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null,
"metadata": null,
"instructions": null
} | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponsefunctioncallargumentsdelta.md b/docs/components/openresponsesstreameventresponsefunctioncallargumentsdelta.md deleted file mode 100644 index 601709a..0000000 --- a/docs/components/openresponsesstreameventresponsefunctioncallargumentsdelta.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenResponsesStreamEventResponseFunctionCallArgumentsDelta - -Event emitted when function call arguments are being streamed - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `type` | [components.TypeResponseFunctionCallArgumentsDelta](../components/typeresponsefunctioncallargumentsdelta.md) | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `delta` | *str* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponsefunctioncallargumentsdone.md b/docs/components/openresponsesstreameventresponsefunctioncallargumentsdone.md deleted file mode 100644 index 2515ace..0000000 --- a/docs/components/openresponsesstreameventresponsefunctioncallargumentsdone.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesStreamEventResponseFunctionCallArgumentsDone - -Event emitted when function call arguments streaming is complete - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseFunctionCallArgumentsDone](../components/typeresponsefunctioncallargumentsdone.md) | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `arguments` | *str* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponseincomplete.md b/docs/components/openresponsesstreameventresponseincomplete.md deleted file mode 100644 index f93968d..0000000 --- a/docs/components/openresponsesstreameventresponseincomplete.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesStreamEventResponseIncomplete - -Event emitted when a response is incomplete - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseIncomplete](../components/typeresponseincomplete.md) | :heavy_check_mark: | N/A | | -| `response` | [components.OpenResponsesNonStreamingResponse](../components/openresponsesnonstreamingresponse.md) | :heavy_check_mark: | Complete non-streaming response from the Responses API | {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg-abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null,
"metadata": null,
"instructions": null
} | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponseinprogress.md b/docs/components/openresponsesstreameventresponseinprogress.md deleted file mode 100644 index 372d5a2..0000000 --- a/docs/components/openresponsesstreameventresponseinprogress.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesStreamEventResponseInProgress - -Event emitted when a response is in progress - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseInProgress](../components/typeresponseinprogress.md) | :heavy_check_mark: | N/A | | -| `response` | [components.OpenResponsesNonStreamingResponse](../components/openresponsesnonstreamingresponse.md) | :heavy_check_mark: | Complete non-streaming response from the Responses API | {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg-abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null,
"metadata": null,
"instructions": null
} | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponseoutputitemadded.md b/docs/components/openresponsesstreameventresponseoutputitemadded.md deleted file mode 100644 index c9b357b..0000000 --- a/docs/components/openresponsesstreameventresponseoutputitemadded.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenResponsesStreamEventResponseOutputItemAdded - -Event emitted when a new output item is added to the response - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseOutputItemAdded](../components/typeresponseoutputitemadded.md) | :heavy_check_mark: | N/A | | -| `output_index` | *float* | :heavy_check_mark: | N/A | | -| `item` | [components.ResponsesOutputItem](../components/responsesoutputitem.md) | :heavy_check_mark: | An output item from the response | {
"id": "msg-abc123",
"role": "assistant",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?"
}
]
} | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponseoutputitemdone.md b/docs/components/openresponsesstreameventresponseoutputitemdone.md deleted file mode 100644 index 4355cc9..0000000 --- a/docs/components/openresponsesstreameventresponseoutputitemdone.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenResponsesStreamEventResponseOutputItemDone - -Event emitted when an output item is complete - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseOutputItemDone](../components/typeresponseoutputitemdone.md) | :heavy_check_mark: | N/A | | -| `output_index` | *float* | :heavy_check_mark: | N/A | | -| `item` | [components.ResponsesOutputItem](../components/responsesoutputitem.md) | :heavy_check_mark: | An output item from the response | {
"id": "msg-abc123",
"role": "assistant",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?"
}
]
} | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponseoutputtextannotationadded.md b/docs/components/openresponsesstreameventresponseoutputtextannotationadded.md deleted file mode 100644 index 7723df5..0000000 --- a/docs/components/openresponsesstreameventresponseoutputtextannotationadded.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesStreamEventResponseOutputTextAnnotationAdded - -Event emitted when a text annotation is added to output - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseOutputTextAnnotationAdded](../components/typeresponseoutputtextannotationadded.md) | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `content_index` | *float* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | -| `annotation_index` | *float* | :heavy_check_mark: | N/A | -| `annotation` | [components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponseoutputtextdelta.md b/docs/components/openresponsesstreameventresponseoutputtextdelta.md deleted file mode 100644 index c2567ea..0000000 --- a/docs/components/openresponsesstreameventresponseoutputtextdelta.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesStreamEventResponseOutputTextDelta - -Event emitted when a text delta is streamed - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseOutputTextDelta](../components/typeresponseoutputtextdelta.md) | :heavy_check_mark: | N/A | -| `logprobs` | List[[components.OpenResponsesLogProbs](../components/openresponseslogprobs.md)] | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `content_index` | *float* | :heavy_check_mark: | N/A | -| `delta` | *str* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponseoutputtextdone.md b/docs/components/openresponsesstreameventresponseoutputtextdone.md deleted file mode 100644 index eefdc29..0000000 --- a/docs/components/openresponsesstreameventresponseoutputtextdone.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesStreamEventResponseOutputTextDone - -Event emitted when text streaming is complete - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `type` | [components.TypeResponseOutputTextDone](../components/typeresponseoutputtextdone.md) | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `content_index` | *float* | :heavy_check_mark: | N/A | -| `text` | *str* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | -| `logprobs` | List[[components.OpenResponsesLogProbs](../components/openresponseslogprobs.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponsereasoningsummarypartdone.md b/docs/components/openresponsesstreameventresponsereasoningsummarypartdone.md deleted file mode 100644 index abfe881..0000000 --- a/docs/components/openresponsesstreameventresponsereasoningsummarypartdone.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesStreamEventResponseReasoningSummaryPartDone - -Event emitted when a reasoning summary part is complete - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseReasoningSummaryPartDone](../components/typeresponsereasoningsummarypartdone.md) | :heavy_check_mark: | N/A | | -| `output_index` | *float* | :heavy_check_mark: | N/A | | -| `item_id` | *str* | :heavy_check_mark: | N/A | | -| `summary_index` | *float* | :heavy_check_mark: | N/A | | -| `part` | [components.ReasoningSummaryText](../components/reasoningsummarytext.md) | :heavy_check_mark: | N/A | {
"type": "summary_text",
"text": "Analyzed the problem using first principles"
} | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponserefusaldelta.md b/docs/components/openresponsesstreameventresponserefusaldelta.md deleted file mode 100644 index c645c4e..0000000 --- a/docs/components/openresponsesstreameventresponserefusaldelta.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesStreamEventResponseRefusalDelta - -Event emitted when a refusal delta is streamed - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `type` | [components.TypeResponseRefusalDelta](../components/typeresponserefusaldelta.md) | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `content_index` | *float* | :heavy_check_mark: | N/A | -| `delta` | *str* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesstreameventresponserefusaldone.md b/docs/components/openresponsesstreameventresponserefusaldone.md deleted file mode 100644 index 4ac3b11..0000000 --- a/docs/components/openresponsesstreameventresponserefusaldone.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesStreamEventResponseRefusalDone - -Event emitted when refusal streaming is complete - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `type` | [components.TypeResponseRefusalDone](../components/typeresponserefusaldone.md) | :heavy_check_mark: | N/A | -| `output_index` | *float* | :heavy_check_mark: | N/A | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `content_index` | *float* | :heavy_check_mark: | N/A | -| `refusal` | *str* | :heavy_check_mark: | N/A | -| `sequence_number` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsestoplogprobs.md b/docs/components/openresponsestoplogprobs.md deleted file mode 100644 index aa7d39b..0000000 --- a/docs/components/openresponsestoplogprobs.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenResponsesTopLogprobs - -Alternative token with its log probability - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `token` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `logprob` | *Optional[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openresponsesusage.md b/docs/components/openresponsesusage.md deleted file mode 100644 index bab0ec3..0000000 --- a/docs/components/openresponsesusage.md +++ /dev/null @@ -1,17 +0,0 @@ -# OpenResponsesUsage - -Token usage information for the response - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `input_tokens` | *float* | :heavy_check_mark: | N/A | -| `input_tokens_details` | [components.InputTokensDetails](../components/inputtokensdetails.md) | :heavy_check_mark: | N/A | -| `output_tokens` | *float* | :heavy_check_mark: | N/A | -| `output_tokens_details` | [components.OutputTokensDetails](../components/outputtokensdetails.md) | :heavy_check_mark: | N/A | -| `total_tokens` | *float* | :heavy_check_mark: | N/A | -| `cost` | *OptionalNullable[float]* | :heavy_minus_sign: | Cost of the completion | -| `is_byok` | *Optional[bool]* | :heavy_minus_sign: | Whether a request was made using a Bring Your Own Key configuration | -| `cost_details` | [Optional[components.CostDetails]](../components/costdetails.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openresponseswebsearch20250826tool.md b/docs/components/openresponseswebsearch20250826tool.md deleted file mode 100644 index 8ba9326..0000000 --- a/docs/components/openresponseswebsearch20250826tool.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenResponsesWebSearch20250826Tool - -Web search tool configuration (2025-08-26 version) - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `type` | [components.OpenResponsesWebSearch20250826ToolType](../components/openresponseswebsearch20250826tooltype.md) | :heavy_check_mark: | N/A | | -| `filters` | [OptionalNullable[components.OpenResponsesWebSearch20250826ToolFilters]](../components/openresponseswebsearch20250826toolfilters.md) | :heavy_minus_sign: | N/A | | -| `search_context_size` | [Optional[components.ResponsesSearchContextSize]](../components/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | -| `user_location` | [OptionalNullable[components.ResponsesWebSearchUserLocation]](../components/responseswebsearchuserlocation.md) | :heavy_minus_sign: | User location information for web search | {
"type": "approximate",
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles"
} | \ No newline at end of file diff --git a/docs/components/openresponseswebsearch20250826toolfilters.md b/docs/components/openresponseswebsearch20250826toolfilters.md deleted file mode 100644 index 58c6a3b..0000000 --- a/docs/components/openresponseswebsearch20250826toolfilters.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesWebSearch20250826ToolFilters - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `allowed_domains` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openresponseswebsearch20250826tooltype.md b/docs/components/openresponseswebsearch20250826tooltype.md deleted file mode 100644 index e454c71..0000000 --- a/docs/components/openresponseswebsearch20250826tooltype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesWebSearch20250826ToolType - - -## Values - -| Name | Value | -| ----------------------- | ----------------------- | -| `WEB_SEARCH_2025_08_26` | web_search_2025_08_26 | \ No newline at end of file diff --git a/docs/components/openresponseswebsearchpreview20250311tool.md b/docs/components/openresponseswebsearchpreview20250311tool.md deleted file mode 100644 index 1b63f77..0000000 --- a/docs/components/openresponseswebsearchpreview20250311tool.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesWebSearchPreview20250311Tool - -Web search preview tool configuration (2025-03-11 version) - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesWebSearchPreview20250311ToolType](../components/openresponseswebsearchpreview20250311tooltype.md) | :heavy_check_mark: | N/A | | -| `search_context_size` | [Optional[components.ResponsesSearchContextSize]](../components/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | -| `user_location` | [OptionalNullable[components.WebSearchPreviewToolUserLocation]](../components/websearchpreviewtooluserlocation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponseswebsearchpreview20250311tooltype.md b/docs/components/openresponseswebsearchpreview20250311tooltype.md deleted file mode 100644 index 25fec31..0000000 --- a/docs/components/openresponseswebsearchpreview20250311tooltype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesWebSearchPreview20250311ToolType - - -## Values - -| Name | Value | -| ------------------------------- | ------------------------------- | -| `WEB_SEARCH_PREVIEW_2025_03_11` | web_search_preview_2025_03_11 | \ No newline at end of file diff --git a/docs/components/openresponseswebsearchpreviewtool.md b/docs/components/openresponseswebsearchpreviewtool.md deleted file mode 100644 index 67b7a4f..0000000 --- a/docs/components/openresponseswebsearchpreviewtool.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenResponsesWebSearchPreviewTool - -Web search preview tool configuration - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `type` | [components.OpenResponsesWebSearchPreviewToolType](../components/openresponseswebsearchpreviewtooltype.md) | :heavy_check_mark: | N/A | | -| `search_context_size` | [Optional[components.ResponsesSearchContextSize]](../components/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | -| `user_location` | [OptionalNullable[components.WebSearchPreviewToolUserLocation]](../components/websearchpreviewtooluserlocation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/components/openresponseswebsearchpreviewtooltype.md b/docs/components/openresponseswebsearchpreviewtooltype.md deleted file mode 100644 index e4df867..0000000 --- a/docs/components/openresponseswebsearchpreviewtooltype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesWebSearchPreviewToolType - - -## Values - -| Name | Value | -| -------------------- | -------------------- | -| `WEB_SEARCH_PREVIEW` | web_search_preview | \ No newline at end of file diff --git a/docs/components/openresponseswebsearchtool.md b/docs/components/openresponseswebsearchtool.md deleted file mode 100644 index 94eeb60..0000000 --- a/docs/components/openresponseswebsearchtool.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenResponsesWebSearchTool - -Web search tool configuration - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.OpenResponsesWebSearchToolType](../components/openresponseswebsearchtooltype.md) | :heavy_check_mark: | N/A | | -| `filters` | [OptionalNullable[components.OpenResponsesWebSearchToolFilters]](../components/openresponseswebsearchtoolfilters.md) | :heavy_minus_sign: | N/A | | -| `search_context_size` | [Optional[components.ResponsesSearchContextSize]](../components/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | -| `user_location` | [OptionalNullable[components.ResponsesWebSearchUserLocation]](../components/responseswebsearchuserlocation.md) | :heavy_minus_sign: | User location information for web search | {
"type": "approximate",
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles"
} | \ No newline at end of file diff --git a/docs/components/openresponseswebsearchtoolfilters.md b/docs/components/openresponseswebsearchtoolfilters.md deleted file mode 100644 index 2528409..0000000 --- a/docs/components/openresponseswebsearchtoolfilters.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesWebSearchToolFilters - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `allowed_domains` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/openresponseswebsearchtooltype.md b/docs/components/openresponseswebsearchtooltype.md deleted file mode 100644 index d107d41..0000000 --- a/docs/components/openresponseswebsearchtooltype.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenResponsesWebSearchToolType - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `WEB_SEARCH` | web_search | \ No newline at end of file diff --git a/docs/components/order.md b/docs/components/order.md deleted file mode 100644 index b0e21fa..0000000 --- a/docs/components/order.md +++ /dev/null @@ -1,17 +0,0 @@ -# Order - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/components/part1.md b/docs/components/part1.md deleted file mode 100644 index 263bf74..0000000 --- a/docs/components/part1.md +++ /dev/null @@ -1,23 +0,0 @@ -# Part1 - - -## Supported Types - -### `components.ResponseOutputText` - -```python -value: components.ResponseOutputText = /* values here */ -``` - -### `components.ReasoningTextContent` - -```python -value: components.ReasoningTextContent = /* values here */ -``` - -### `components.OpenAIResponsesRefusalContent` - -```python -value: components.OpenAIResponsesRefusalContent = /* values here */ -``` - diff --git a/docs/components/part2.md b/docs/components/part2.md deleted file mode 100644 index 37c9d6f..0000000 --- a/docs/components/part2.md +++ /dev/null @@ -1,23 +0,0 @@ -# Part2 - - -## Supported Types - -### `components.ResponseOutputText` - -```python -value: components.ResponseOutputText = /* values here */ -``` - -### `components.ReasoningTextContent` - -```python -value: components.ReasoningTextContent = /* values here */ -``` - -### `components.OpenAIResponsesRefusalContent` - -```python -value: components.OpenAIResponsesRefusalContent = /* values here */ -``` - diff --git a/docs/components/reasoningsummaryverbosity.md b/docs/components/reasoningsummaryverbosity.md deleted file mode 100644 index cc36f39..0000000 --- a/docs/components/reasoningsummaryverbosity.md +++ /dev/null @@ -1,10 +0,0 @@ -# ReasoningSummaryVerbosity - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `AUTO` | auto | -| `CONCISE` | concise | -| `DETAILED` | detailed | \ No newline at end of file diff --git a/docs/components/responseformatjsonobject.md b/docs/components/responseformatjsonobject.md deleted file mode 100644 index 38d532d..0000000 --- a/docs/components/responseformatjsonobject.md +++ /dev/null @@ -1,10 +0,0 @@ -# ResponseFormatJSONObject - -JSON object response format - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `type` | [components.ResponseFormatJSONObjectType](../components/responseformatjsonobjecttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/responseformatjsonobjecttype.md b/docs/components/responseformatjsonobjecttype.md deleted file mode 100644 index c2c2c01..0000000 --- a/docs/components/responseformatjsonobjecttype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponseFormatJSONObjectType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `JSON_OBJECT` | json_object | \ No newline at end of file diff --git a/docs/components/responseformatjsonschema.md b/docs/components/responseformatjsonschema.md deleted file mode 100644 index 86dfc60..0000000 --- a/docs/components/responseformatjsonschema.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResponseFormatJSONSchema - -JSON Schema response format for structured outputs - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.ResponseFormatJSONSchemaType](../components/responseformatjsonschematype.md) | :heavy_check_mark: | N/A | | -| `json_schema` | [components.JSONSchemaConfig](../components/jsonschemaconfig.md) | :heavy_check_mark: | JSON Schema configuration object | {
"name": "math_response",
"description": "A mathematical response",
"schema": {
"type": "object",
"properties": {
"answer": {
"type": "number"
}
},
"required": [
"answer"
]
},
"strict": true
} | \ No newline at end of file diff --git a/docs/components/responseformatjsonschematype.md b/docs/components/responseformatjsonschematype.md deleted file mode 100644 index 2dc6447..0000000 --- a/docs/components/responseformatjsonschematype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponseFormatJSONSchemaType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `JSON_SCHEMA` | json_schema | \ No newline at end of file diff --git a/docs/components/responseformattext.md b/docs/components/responseformattext.md deleted file mode 100644 index 13f9ffe..0000000 --- a/docs/components/responseformattext.md +++ /dev/null @@ -1,10 +0,0 @@ -# ResponseFormatText - -Default text response format - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | [components.ResponseFormatTextType](../components/responseformattexttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/responseformattextconfig.md b/docs/components/responseformattextconfig.md deleted file mode 100644 index 9225e2d..0000000 --- a/docs/components/responseformattextconfig.md +++ /dev/null @@ -1,25 +0,0 @@ -# ResponseFormatTextConfig - -Text response format configuration - - -## Supported Types - -### `components.ResponsesFormatText` - -```python -value: components.ResponsesFormatText = /* values here */ -``` - -### `components.ResponseFormatJSONObject` - -```python -value: components.ResponseFormatJSONObject = /* values here */ -``` - -### `components.ResponsesFormatTextJSONSchemaConfig` - -```python -value: components.ResponsesFormatTextJSONSchemaConfig = /* values here */ -``` - diff --git a/docs/components/responseformattextgrammar.md b/docs/components/responseformattextgrammar.md deleted file mode 100644 index 3f293df..0000000 --- a/docs/components/responseformattextgrammar.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResponseFormatTextGrammar - -Custom grammar response format - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `type` | [components.ResponseFormatTextGrammarType](../components/responseformattextgrammartype.md) | :heavy_check_mark: | N/A | | -| `grammar` | *str* | :heavy_check_mark: | Custom grammar for text generation | root ::= "yes" \| "no" | \ No newline at end of file diff --git a/docs/components/responseformattextgrammartype.md b/docs/components/responseformattextgrammartype.md deleted file mode 100644 index 241e36f..0000000 --- a/docs/components/responseformattextgrammartype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponseFormatTextGrammarType - - -## Values - -| Name | Value | -| --------- | --------- | -| `GRAMMAR` | grammar | \ No newline at end of file diff --git a/docs/components/responseformattextpython.md b/docs/components/responseformattextpython.md deleted file mode 100644 index bf4fdee..0000000 --- a/docs/components/responseformattextpython.md +++ /dev/null @@ -1,10 +0,0 @@ -# ResponseFormatTextPython - -Python code response format - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `type` | [components.ResponseFormatTextPythonType](../components/responseformattextpythontype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/responseformattextpythontype.md b/docs/components/responseformattextpythontype.md deleted file mode 100644 index d353701..0000000 --- a/docs/components/responseformattextpythontype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponseFormatTextPythonType - - -## Values - -| Name | Value | -| -------- | -------- | -| `PYTHON` | python | \ No newline at end of file diff --git a/docs/components/responseformattexttype.md b/docs/components/responseformattexttype.md deleted file mode 100644 index 819a36d..0000000 --- a/docs/components/responseformattexttype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponseFormatTextType - - -## Values - -| Name | Value | -| ------ | ------ | -| `TEXT` | text | \ No newline at end of file diff --git a/docs/components/responseinputaudio.md b/docs/components/responseinputaudio.md deleted file mode 100644 index 5a74b81..0000000 --- a/docs/components/responseinputaudio.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResponseInputAudio - -Audio input content item - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `type` | [components.ResponseInputAudioType](../components/responseinputaudiotype.md) | :heavy_check_mark: | N/A | -| `input_audio` | [components.ResponseInputAudioInputAudio](../components/responseinputaudioinputaudio.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/responseinputaudioformat.md b/docs/components/responseinputaudioformat.md deleted file mode 100644 index 524d473..0000000 --- a/docs/components/responseinputaudioformat.md +++ /dev/null @@ -1,9 +0,0 @@ -# ResponseInputAudioFormat - - -## Values - -| Name | Value | -| ----- | ----- | -| `MP3` | mp3 | -| `WAV` | wav | \ No newline at end of file diff --git a/docs/components/responseinputaudioinputaudio.md b/docs/components/responseinputaudioinputaudio.md deleted file mode 100644 index cb7396f..0000000 --- a/docs/components/responseinputaudioinputaudio.md +++ /dev/null @@ -1,9 +0,0 @@ -# ResponseInputAudioInputAudio - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `data` | *str* | :heavy_check_mark: | N/A | -| `format_` | [components.ResponseInputAudioFormat](../components/responseinputaudioformat.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/responseinputaudiotype.md b/docs/components/responseinputaudiotype.md deleted file mode 100644 index 77245e2..0000000 --- a/docs/components/responseinputaudiotype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponseInputAudioType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `INPUT_AUDIO` | input_audio | \ No newline at end of file diff --git a/docs/components/responseinputfile.md b/docs/components/responseinputfile.md deleted file mode 100644 index e8b0308..0000000 --- a/docs/components/responseinputfile.md +++ /dev/null @@ -1,14 +0,0 @@ -# ResponseInputFile - -File input content item - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `type` | [components.ResponseInputFileType](../components/responseinputfiletype.md) | :heavy_check_mark: | N/A | -| `file_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `file_data` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `filename` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `file_url` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/responseinputfiletype.md b/docs/components/responseinputfiletype.md deleted file mode 100644 index 4528713..0000000 --- a/docs/components/responseinputfiletype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponseInputFileType - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `INPUT_FILE` | input_file | \ No newline at end of file diff --git a/docs/components/responseinputimage.md b/docs/components/responseinputimage.md deleted file mode 100644 index 5c7dcaf..0000000 --- a/docs/components/responseinputimage.md +++ /dev/null @@ -1,12 +0,0 @@ -# ResponseInputImage - -Image input content item - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `type` | [components.ResponseInputImageType](../components/responseinputimagetype.md) | :heavy_check_mark: | N/A | -| `detail` | [components.ResponseInputImageDetail](../components/responseinputimagedetail.md) | :heavy_check_mark: | N/A | -| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/responseinputimagedetail.md b/docs/components/responseinputimagedetail.md deleted file mode 100644 index 0e31c6e..0000000 --- a/docs/components/responseinputimagedetail.md +++ /dev/null @@ -1,10 +0,0 @@ -# ResponseInputImageDetail - - -## Values - -| Name | Value | -| ------ | ------ | -| `AUTO` | auto | -| `HIGH` | high | -| `LOW` | low | \ No newline at end of file diff --git a/docs/components/responseinputimagetype.md b/docs/components/responseinputimagetype.md deleted file mode 100644 index 1754be9..0000000 --- a/docs/components/responseinputimagetype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponseInputImageType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `INPUT_IMAGE` | input_image | \ No newline at end of file diff --git a/docs/components/responseinputtext.md b/docs/components/responseinputtext.md deleted file mode 100644 index 9c974a9..0000000 --- a/docs/components/responseinputtext.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResponseInputText - -Text input content item - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `type` | [components.ResponseInputTextType](../components/responseinputtexttype.md) | :heavy_check_mark: | N/A | -| `text` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/responseinputtexttype.md b/docs/components/responseinputtexttype.md deleted file mode 100644 index 896f063..0000000 --- a/docs/components/responseinputtexttype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponseInputTextType - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `INPUT_TEXT` | input_text | \ No newline at end of file diff --git a/docs/components/responseinputvideo.md b/docs/components/responseinputvideo.md deleted file mode 100644 index 0d38556..0000000 --- a/docs/components/responseinputvideo.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResponseInputVideo - -Video input content item - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | [components.ResponseInputVideoType](../components/responseinputvideotype.md) | :heavy_check_mark: | N/A | -| `video_url` | *str* | :heavy_check_mark: | A base64 data URL or remote URL that resolves to a video file | \ No newline at end of file diff --git a/docs/components/responseinputvideotype.md b/docs/components/responseinputvideotype.md deleted file mode 100644 index b5cb758..0000000 --- a/docs/components/responseinputvideotype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponseInputVideoType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `INPUT_VIDEO` | input_video | \ No newline at end of file diff --git a/docs/components/responsesformattext.md b/docs/components/responsesformattext.md deleted file mode 100644 index 1d9a7d5..0000000 --- a/docs/components/responsesformattext.md +++ /dev/null @@ -1,10 +0,0 @@ -# ResponsesFormatText - -Plain text response format - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `type` | [components.ResponsesFormatTextType](../components/responsesformattexttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/responsesformattextjsonschemaconfig.md b/docs/components/responsesformattextjsonschemaconfig.md deleted file mode 100644 index e72a368..0000000 --- a/docs/components/responsesformattextjsonschemaconfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# ResponsesFormatTextJSONSchemaConfig - -JSON schema constrained response format - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `type` | [components.ResponsesFormatTextJSONSchemaConfigType](../components/responsesformattextjsonschemaconfigtype.md) | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `description` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `schema_` | Dict[str, *Nullable[Any]*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/responsesformattextjsonschemaconfigtype.md b/docs/components/responsesformattextjsonschemaconfigtype.md deleted file mode 100644 index 60eb553..0000000 --- a/docs/components/responsesformattextjsonschemaconfigtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesFormatTextJSONSchemaConfigType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `JSON_SCHEMA` | json_schema | \ No newline at end of file diff --git a/docs/components/responsesformattexttype.md b/docs/components/responsesformattexttype.md deleted file mode 100644 index 2e8fd48..0000000 --- a/docs/components/responsesformattexttype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesFormatTextType - - -## Values - -| Name | Value | -| ------ | ------ | -| `TEXT` | text | \ No newline at end of file diff --git a/docs/components/responsesimagegenerationcall.md b/docs/components/responsesimagegenerationcall.md deleted file mode 100644 index ab0af1e..0000000 --- a/docs/components/responsesimagegenerationcall.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResponsesImageGenerationCall - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `type` | [components.ResponsesImageGenerationCallType](../components/responsesimagegenerationcalltype.md) | :heavy_check_mark: | N/A | | -| `id` | *str* | :heavy_check_mark: | N/A | | -| `result` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `status` | [components.ImageGenerationStatus](../components/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed | \ No newline at end of file diff --git a/docs/components/responsesimagegenerationcalltype.md b/docs/components/responsesimagegenerationcalltype.md deleted file mode 100644 index 6eb99c3..0000000 --- a/docs/components/responsesimagegenerationcalltype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesImageGenerationCallType - - -## Values - -| Name | Value | -| ----------------------- | ----------------------- | -| `IMAGE_GENERATION_CALL` | image_generation_call | \ No newline at end of file diff --git a/docs/components/responsesoutputitem.md b/docs/components/responsesoutputitem.md deleted file mode 100644 index 01b3528..0000000 --- a/docs/components/responsesoutputitem.md +++ /dev/null @@ -1,43 +0,0 @@ -# ResponsesOutputItem - -An output item from the response - - -## Supported Types - -### `components.ResponsesOutputMessage` - -```python -value: components.ResponsesOutputMessage = /* values here */ -``` - -### `components.ResponsesOutputItemReasoning` - -```python -value: components.ResponsesOutputItemReasoning = /* values here */ -``` - -### `components.ResponsesOutputItemFunctionCall` - -```python -value: components.ResponsesOutputItemFunctionCall = /* values here */ -``` - -### `components.ResponsesWebSearchCallOutput` - -```python -value: components.ResponsesWebSearchCallOutput = /* values here */ -``` - -### `components.ResponsesOutputItemFileSearchCall` - -```python -value: components.ResponsesOutputItemFileSearchCall = /* values here */ -``` - -### `components.ResponsesImageGenerationCall` - -```python -value: components.ResponsesImageGenerationCall = /* values here */ -``` - diff --git a/docs/components/responsesoutputitemfilesearchcall.md b/docs/components/responsesoutputitemfilesearchcall.md deleted file mode 100644 index b173fb7..0000000 --- a/docs/components/responsesoutputitemfilesearchcall.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResponsesOutputItemFileSearchCall - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `type` | [components.ResponsesOutputItemFileSearchCallType](../components/responsesoutputitemfilesearchcalltype.md) | :heavy_check_mark: | N/A | | -| `id` | *str* | :heavy_check_mark: | N/A | | -| `queries` | List[*str*] | :heavy_check_mark: | N/A | | -| `status` | [components.WebSearchStatus](../components/websearchstatus.md) | :heavy_check_mark: | N/A | completed | \ No newline at end of file diff --git a/docs/components/responsesoutputitemfilesearchcalltype.md b/docs/components/responsesoutputitemfilesearchcalltype.md deleted file mode 100644 index 2b4d6ea..0000000 --- a/docs/components/responsesoutputitemfilesearchcalltype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputItemFileSearchCallType - - -## Values - -| Name | Value | -| ------------------ | ------------------ | -| `FILE_SEARCH_CALL` | file_search_call | \ No newline at end of file diff --git a/docs/components/responsesoutputitemfunctioncall.md b/docs/components/responsesoutputitemfunctioncall.md deleted file mode 100644 index 5a605c4..0000000 --- a/docs/components/responsesoutputitemfunctioncall.md +++ /dev/null @@ -1,13 +0,0 @@ -# ResponsesOutputItemFunctionCall - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `type` | [components.ResponsesOutputItemFunctionCallType](../components/responsesoutputitemfunctioncalltype.md) | :heavy_check_mark: | N/A | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `arguments` | *str* | :heavy_check_mark: | N/A | -| `call_id` | *str* | :heavy_check_mark: | N/A | -| `status` | [Optional[components.ResponsesOutputItemFunctionCallStatusUnion]](../components/responsesoutputitemfunctioncallstatusunion.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/responsesoutputitemfunctioncallstatuscompleted.md b/docs/components/responsesoutputitemfunctioncallstatuscompleted.md deleted file mode 100644 index f8d1ae0..0000000 --- a/docs/components/responsesoutputitemfunctioncallstatuscompleted.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputItemFunctionCallStatusCompleted - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `COMPLETED` | completed | \ No newline at end of file diff --git a/docs/components/responsesoutputitemfunctioncallstatusincomplete.md b/docs/components/responsesoutputitemfunctioncallstatusincomplete.md deleted file mode 100644 index 63df291..0000000 --- a/docs/components/responsesoutputitemfunctioncallstatusincomplete.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputItemFunctionCallStatusIncomplete - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `INCOMPLETE` | incomplete | \ No newline at end of file diff --git a/docs/components/responsesoutputitemfunctioncallstatusinprogress.md b/docs/components/responsesoutputitemfunctioncallstatusinprogress.md deleted file mode 100644 index 74e3945..0000000 --- a/docs/components/responsesoutputitemfunctioncallstatusinprogress.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputItemFunctionCallStatusInProgress - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `IN_PROGRESS` | in_progress | \ No newline at end of file diff --git a/docs/components/responsesoutputitemfunctioncallstatusunion.md b/docs/components/responsesoutputitemfunctioncallstatusunion.md deleted file mode 100644 index 2fb5ba3..0000000 --- a/docs/components/responsesoutputitemfunctioncallstatusunion.md +++ /dev/null @@ -1,23 +0,0 @@ -# ResponsesOutputItemFunctionCallStatusUnion - - -## Supported Types - -### `components.ResponsesOutputItemFunctionCallStatusCompleted` - -```python -value: components.ResponsesOutputItemFunctionCallStatusCompleted = /* values here */ -``` - -### `components.ResponsesOutputItemFunctionCallStatusIncomplete` - -```python -value: components.ResponsesOutputItemFunctionCallStatusIncomplete = /* values here */ -``` - -### `components.ResponsesOutputItemFunctionCallStatusInProgress` - -```python -value: components.ResponsesOutputItemFunctionCallStatusInProgress = /* values here */ -``` - diff --git a/docs/components/responsesoutputitemfunctioncalltype.md b/docs/components/responsesoutputitemfunctioncalltype.md deleted file mode 100644 index d1e5d65..0000000 --- a/docs/components/responsesoutputitemfunctioncalltype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputItemFunctionCallType - - -## Values - -| Name | Value | -| --------------- | --------------- | -| `FUNCTION_CALL` | function_call | \ No newline at end of file diff --git a/docs/components/responsesoutputitemreasoning.md b/docs/components/responsesoutputitemreasoning.md deleted file mode 100644 index 093a7cb..0000000 --- a/docs/components/responsesoutputitemreasoning.md +++ /dev/null @@ -1,17 +0,0 @@ -# ResponsesOutputItemReasoning - -An output item containing reasoning - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `type` | [components.ResponsesOutputItemReasoningType](../components/responsesoutputitemreasoningtype.md) | :heavy_check_mark: | N/A | | -| `id` | *str* | :heavy_check_mark: | N/A | | -| `content` | List[[components.ReasoningTextContent](../components/reasoningtextcontent.md)] | :heavy_minus_sign: | N/A | | -| `summary` | List[[components.ReasoningSummaryText](../components/reasoningsummarytext.md)] | :heavy_check_mark: | N/A | | -| `encrypted_content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `status` | [Optional[components.ResponsesOutputItemReasoningStatusUnion]](../components/responsesoutputitemreasoningstatusunion.md) | :heavy_minus_sign: | N/A | | -| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | A signature for the reasoning content, used for verification | EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... | -| `format_` | [OptionalNullable[components.ResponsesOutputItemReasoningFormat]](../components/responsesoutputitemreasoningformat.md) | :heavy_minus_sign: | The format of the reasoning content | anthropic-claude-v1 | \ No newline at end of file diff --git a/docs/components/responsesoutputitemreasoningformat.md b/docs/components/responsesoutputitemreasoningformat.md deleted file mode 100644 index d3ea6ee..0000000 --- a/docs/components/responsesoutputitemreasoningformat.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResponsesOutputItemReasoningFormat - -The format of the reasoning content - - -## Values - -| Name | Value | -| --------------------------- | --------------------------- | -| `UNKNOWN` | unknown | -| `OPENAI_RESPONSES_V1` | openai-responses-v1 | -| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 | -| `XAI_RESPONSES_V1` | xai-responses-v1 | -| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 | -| `GOOGLE_GEMINI_V1` | google-gemini-v1 | \ No newline at end of file diff --git a/docs/components/responsesoutputitemreasoningstatuscompleted.md b/docs/components/responsesoutputitemreasoningstatuscompleted.md deleted file mode 100644 index 592e740..0000000 --- a/docs/components/responsesoutputitemreasoningstatuscompleted.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputItemReasoningStatusCompleted - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `COMPLETED` | completed | \ No newline at end of file diff --git a/docs/components/responsesoutputitemreasoningstatusincomplete.md b/docs/components/responsesoutputitemreasoningstatusincomplete.md deleted file mode 100644 index 55081b2..0000000 --- a/docs/components/responsesoutputitemreasoningstatusincomplete.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputItemReasoningStatusIncomplete - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `INCOMPLETE` | incomplete | \ No newline at end of file diff --git a/docs/components/responsesoutputitemreasoningstatusinprogress.md b/docs/components/responsesoutputitemreasoningstatusinprogress.md deleted file mode 100644 index 05ca983..0000000 --- a/docs/components/responsesoutputitemreasoningstatusinprogress.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputItemReasoningStatusInProgress - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `IN_PROGRESS` | in_progress | \ No newline at end of file diff --git a/docs/components/responsesoutputitemreasoningstatusunion.md b/docs/components/responsesoutputitemreasoningstatusunion.md deleted file mode 100644 index 399d174..0000000 --- a/docs/components/responsesoutputitemreasoningstatusunion.md +++ /dev/null @@ -1,23 +0,0 @@ -# ResponsesOutputItemReasoningStatusUnion - - -## Supported Types - -### `components.ResponsesOutputItemReasoningStatusCompleted` - -```python -value: components.ResponsesOutputItemReasoningStatusCompleted = /* values here */ -``` - -### `components.ResponsesOutputItemReasoningStatusIncomplete` - -```python -value: components.ResponsesOutputItemReasoningStatusIncomplete = /* values here */ -``` - -### `components.ResponsesOutputItemReasoningStatusInProgress` - -```python -value: components.ResponsesOutputItemReasoningStatusInProgress = /* values here */ -``` - diff --git a/docs/components/responsesoutputitemreasoningtype.md b/docs/components/responsesoutputitemreasoningtype.md deleted file mode 100644 index 1b223b6..0000000 --- a/docs/components/responsesoutputitemreasoningtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputItemReasoningType - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `REASONING` | reasoning | \ No newline at end of file diff --git a/docs/components/responsesoutputmessage.md b/docs/components/responsesoutputmessage.md deleted file mode 100644 index 84766c4..0000000 --- a/docs/components/responsesoutputmessage.md +++ /dev/null @@ -1,14 +0,0 @@ -# ResponsesOutputMessage - -An output message item - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `id` | *str* | :heavy_check_mark: | N/A | -| `role` | [components.ResponsesOutputMessageRole](../components/responsesoutputmessagerole.md) | :heavy_check_mark: | N/A | -| `type` | [components.ResponsesOutputMessageType](../components/responsesoutputmessagetype.md) | :heavy_check_mark: | N/A | -| `status` | [Optional[components.ResponsesOutputMessageStatusUnion]](../components/responsesoutputmessagestatusunion.md) | :heavy_minus_sign: | N/A | -| `content` | List[[components.ResponsesOutputMessageContent](../components/responsesoutputmessagecontent.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/responsesoutputmessagecontent.md b/docs/components/responsesoutputmessagecontent.md deleted file mode 100644 index 4986f39..0000000 --- a/docs/components/responsesoutputmessagecontent.md +++ /dev/null @@ -1,17 +0,0 @@ -# ResponsesOutputMessageContent - - -## Supported Types - -### `components.ResponseOutputText` - -```python -value: components.ResponseOutputText = /* values here */ -``` - -### `components.OpenAIResponsesRefusalContent` - -```python -value: components.OpenAIResponsesRefusalContent = /* values here */ -``` - diff --git a/docs/components/responsesoutputmessagerole.md b/docs/components/responsesoutputmessagerole.md deleted file mode 100644 index 3eb534f..0000000 --- a/docs/components/responsesoutputmessagerole.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputMessageRole - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `ASSISTANT` | assistant | \ No newline at end of file diff --git a/docs/components/responsesoutputmessagestatuscompleted.md b/docs/components/responsesoutputmessagestatuscompleted.md deleted file mode 100644 index 250c917..0000000 --- a/docs/components/responsesoutputmessagestatuscompleted.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputMessageStatusCompleted - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `COMPLETED` | completed | \ No newline at end of file diff --git a/docs/components/responsesoutputmessagestatusincomplete.md b/docs/components/responsesoutputmessagestatusincomplete.md deleted file mode 100644 index bae111f..0000000 --- a/docs/components/responsesoutputmessagestatusincomplete.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputMessageStatusIncomplete - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `INCOMPLETE` | incomplete | \ No newline at end of file diff --git a/docs/components/responsesoutputmessagestatusinprogress.md b/docs/components/responsesoutputmessagestatusinprogress.md deleted file mode 100644 index 03fbb24..0000000 --- a/docs/components/responsesoutputmessagestatusinprogress.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputMessageStatusInProgress - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `IN_PROGRESS` | in_progress | \ No newline at end of file diff --git a/docs/components/responsesoutputmessagestatusunion.md b/docs/components/responsesoutputmessagestatusunion.md deleted file mode 100644 index dfc1594..0000000 --- a/docs/components/responsesoutputmessagestatusunion.md +++ /dev/null @@ -1,23 +0,0 @@ -# ResponsesOutputMessageStatusUnion - - -## Supported Types - -### `components.ResponsesOutputMessageStatusCompleted` - -```python -value: components.ResponsesOutputMessageStatusCompleted = /* values here */ -``` - -### `components.ResponsesOutputMessageStatusIncomplete` - -```python -value: components.ResponsesOutputMessageStatusIncomplete = /* values here */ -``` - -### `components.ResponsesOutputMessageStatusInProgress` - -```python -value: components.ResponsesOutputMessageStatusInProgress = /* values here */ -``` - diff --git a/docs/components/responsesoutputmessagetype.md b/docs/components/responsesoutputmessagetype.md deleted file mode 100644 index 8648193..0000000 --- a/docs/components/responsesoutputmessagetype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesOutputMessageType - - -## Values - -| Name | Value | -| --------- | --------- | -| `MESSAGE` | message | \ No newline at end of file diff --git a/docs/components/responsesoutputmodality.md b/docs/components/responsesoutputmodality.md deleted file mode 100644 index f94f6c1..0000000 --- a/docs/components/responsesoutputmodality.md +++ /dev/null @@ -1,9 +0,0 @@ -# ResponsesOutputModality - - -## Values - -| Name | Value | -| ------- | ------- | -| `TEXT` | text | -| `IMAGE` | image | \ No newline at end of file diff --git a/docs/components/responsessearchcontextsize.md b/docs/components/responsessearchcontextsize.md deleted file mode 100644 index 4f0bc02..0000000 --- a/docs/components/responsessearchcontextsize.md +++ /dev/null @@ -1,12 +0,0 @@ -# ResponsesSearchContextSize - -Size of the search context for web search tools - - -## Values - -| Name | Value | -| -------- | -------- | -| `LOW` | low | -| `MEDIUM` | medium | -| `HIGH` | high | \ No newline at end of file diff --git a/docs/components/responseswebsearchcalloutput.md b/docs/components/responseswebsearchcalloutput.md deleted file mode 100644 index 3514d2f..0000000 --- a/docs/components/responseswebsearchcalloutput.md +++ /dev/null @@ -1,10 +0,0 @@ -# ResponsesWebSearchCallOutput - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `type` | [components.ResponsesWebSearchCallOutputType](../components/responseswebsearchcalloutputtype.md) | :heavy_check_mark: | N/A | | -| `id` | *str* | :heavy_check_mark: | N/A | | -| `status` | [components.WebSearchStatus](../components/websearchstatus.md) | :heavy_check_mark: | N/A | completed | \ No newline at end of file diff --git a/docs/components/responseswebsearchcalloutputtype.md b/docs/components/responseswebsearchcalloutputtype.md deleted file mode 100644 index faaec22..0000000 --- a/docs/components/responseswebsearchcalloutputtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesWebSearchCallOutputType - - -## Values - -| Name | Value | -| ----------------- | ----------------- | -| `WEB_SEARCH_CALL` | web_search_call | \ No newline at end of file diff --git a/docs/components/responseswebsearchuserlocation.md b/docs/components/responseswebsearchuserlocation.md deleted file mode 100644 index 144eecc..0000000 --- a/docs/components/responseswebsearchuserlocation.md +++ /dev/null @@ -1,14 +0,0 @@ -# ResponsesWebSearchUserLocation - -User location information for web search - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `type` | [Optional[components.ResponsesWebSearchUserLocationType]](../components/responseswebsearchuserlocationtype.md) | :heavy_minus_sign: | N/A | -| `city` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `region` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `timezone` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/responseswebsearchuserlocationtype.md b/docs/components/responseswebsearchuserlocationtype.md deleted file mode 100644 index cb35c6a..0000000 --- a/docs/components/responseswebsearchuserlocationtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResponsesWebSearchUserLocationType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `APPROXIMATE` | approximate | \ No newline at end of file diff --git a/docs/components/responsetextconfig.md b/docs/components/responsetextconfig.md deleted file mode 100644 index f91172c..0000000 --- a/docs/components/responsetextconfig.md +++ /dev/null @@ -1,11 +0,0 @@ -# ResponseTextConfig - -Text output configuration including format and verbosity - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `format_` | [Optional[components.ResponseFormatTextConfig]](../components/responseformattextconfig.md) | :heavy_minus_sign: | Text response format configuration | {
"type": "text"
} | -| `verbosity` | [OptionalNullable[components.ResponseTextConfigVerbosity]](../components/responsetextconfigverbosity.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/components/responsetextconfigverbosity.md b/docs/components/responsetextconfigverbosity.md deleted file mode 100644 index 073cb07..0000000 --- a/docs/components/responsetextconfigverbosity.md +++ /dev/null @@ -1,10 +0,0 @@ -# ResponseTextConfigVerbosity - - -## Values - -| Name | Value | -| -------- | -------- | -| `HIGH` | high | -| `LOW` | low | -| `MEDIUM` | medium | \ No newline at end of file diff --git a/docs/components/servicetier.md b/docs/components/servicetier.md deleted file mode 100644 index bfc6187..0000000 --- a/docs/components/servicetier.md +++ /dev/null @@ -1,8 +0,0 @@ -# ServiceTier - - -## Values - -| Name | Value | -| ------ | ------ | -| `AUTO` | auto | \ No newline at end of file diff --git a/docs/components/sort.md b/docs/components/sort.md deleted file mode 100644 index e07f07c..0000000 --- a/docs/components/sort.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sort - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `PRICE` | price | -| `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file diff --git a/docs/components/systemmessage.md b/docs/components/systemmessage.md deleted file mode 100644 index db3080c..0000000 --- a/docs/components/systemmessage.md +++ /dev/null @@ -1,12 +0,0 @@ -# SystemMessage - -System message for setting behavior - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `role` | [components.SystemMessageRole](../components/systemmessagerole.md) | :heavy_check_mark: | N/A | | -| `content` | [components.SystemMessageContent](../components/systemmessagecontent.md) | :heavy_check_mark: | System message content | You are a helpful assistant. | -| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for the system message | Assistant Config | \ No newline at end of file diff --git a/docs/components/systemmessagecontent.md b/docs/components/systemmessagecontent.md deleted file mode 100644 index 17b52f1..0000000 --- a/docs/components/systemmessagecontent.md +++ /dev/null @@ -1,19 +0,0 @@ -# SystemMessageContent - -System message content - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `List[components.ChatMessageContentItemText]` - -```python -value: List[components.ChatMessageContentItemText] = /* values here */ -``` - diff --git a/docs/components/systemmessagerole.md b/docs/components/systemmessagerole.md deleted file mode 100644 index 232f12a..0000000 --- a/docs/components/systemmessagerole.md +++ /dev/null @@ -1,8 +0,0 @@ -# SystemMessageRole - - -## Values - -| Name | Value | -| -------- | -------- | -| `SYSTEM` | system | \ No newline at end of file diff --git a/docs/components/toolcallstatus.md b/docs/components/toolcallstatus.md deleted file mode 100644 index e3aadb1..0000000 --- a/docs/components/toolcallstatus.md +++ /dev/null @@ -1,10 +0,0 @@ -# ToolCallStatus - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `IN_PROGRESS` | in_progress | -| `COMPLETED` | completed | -| `INCOMPLETE` | incomplete | \ No newline at end of file diff --git a/docs/components/toolchoiceoption.md b/docs/components/toolchoiceoption.md deleted file mode 100644 index 1637d27..0000000 --- a/docs/components/toolchoiceoption.md +++ /dev/null @@ -1,31 +0,0 @@ -# ToolChoiceOption - -Tool choice configuration - - -## Supported Types - -### `components.ToolChoiceOptionNone` - -```python -value: components.ToolChoiceOptionNone = /* values here */ -``` - -### `components.ToolChoiceOptionAuto` - -```python -value: components.ToolChoiceOptionAuto = /* values here */ -``` - -### `components.ToolChoiceOptionRequired` - -```python -value: components.ToolChoiceOptionRequired = /* values here */ -``` - -### `components.NamedToolChoice` - -```python -value: components.NamedToolChoice = /* values here */ -``` - diff --git a/docs/components/toolchoiceoptionauto.md b/docs/components/toolchoiceoptionauto.md deleted file mode 100644 index 01373bb..0000000 --- a/docs/components/toolchoiceoptionauto.md +++ /dev/null @@ -1,8 +0,0 @@ -# ToolChoiceOptionAuto - - -## Values - -| Name | Value | -| ------ | ------ | -| `AUTO` | auto | \ No newline at end of file diff --git a/docs/components/toolchoiceoptionnone.md b/docs/components/toolchoiceoptionnone.md deleted file mode 100644 index 719ec28..0000000 --- a/docs/components/toolchoiceoptionnone.md +++ /dev/null @@ -1,8 +0,0 @@ -# ToolChoiceOptionNone - - -## Values - -| Name | Value | -| ------ | ------ | -| `NONE` | none | \ No newline at end of file diff --git a/docs/components/toolchoiceoptionrequired.md b/docs/components/toolchoiceoptionrequired.md deleted file mode 100644 index af43202..0000000 --- a/docs/components/toolchoiceoptionrequired.md +++ /dev/null @@ -1,8 +0,0 @@ -# ToolChoiceOptionRequired - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `REQUIRED` | required | \ No newline at end of file diff --git a/docs/components/tooldefinitionjson.md b/docs/components/tooldefinitionjson.md deleted file mode 100644 index 2a327b7..0000000 --- a/docs/components/tooldefinitionjson.md +++ /dev/null @@ -1,12 +0,0 @@ -# ToolDefinitionJSON - -Tool definition for function calling - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.ToolDefinitionJSONType](../components/tooldefinitionjsontype.md) | :heavy_check_mark: | N/A | | -| `function` | [components.ToolDefinitionJSONFunction](../components/tooldefinitionjsonfunction.md) | :heavy_check_mark: | Function definition for tool calling | {
"name": "get_weather",
"description": "Get the current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City name"
}
},
"required": [
"location"
]
}
} | -| `cache_control` | [Optional[components.ChatMessageContentItemCacheControl]](../components/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | Cache control for the content part | {
"type": "ephemeral",
"ttl": "5m"
} | \ No newline at end of file diff --git a/docs/components/tooldefinitionjsonfunction.md b/docs/components/tooldefinitionjsonfunction.md deleted file mode 100644 index d2863a1..0000000 --- a/docs/components/tooldefinitionjsonfunction.md +++ /dev/null @@ -1,13 +0,0 @@ -# ToolDefinitionJSONFunction - -Function definition for tool calling - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) | get_weather | -| `description` | *Optional[str]* | :heavy_minus_sign: | Function description for the model | Get the current weather for a location | -| `parameters` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | Function parameters as JSON Schema object | {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City name"
}
},
"required": [
"location"
]
} | -| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | Enable strict schema adherence | false | \ No newline at end of file diff --git a/docs/components/tooldefinitionjsontype.md b/docs/components/tooldefinitionjsontype.md deleted file mode 100644 index ffa142d..0000000 --- a/docs/components/tooldefinitionjsontype.md +++ /dev/null @@ -1,8 +0,0 @@ -# ToolDefinitionJSONType - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `FUNCTION` | function | \ No newline at end of file diff --git a/docs/components/toolresponsemessage.md b/docs/components/toolresponsemessage.md deleted file mode 100644 index dcfa91b..0000000 --- a/docs/components/toolresponsemessage.md +++ /dev/null @@ -1,12 +0,0 @@ -# ToolResponseMessage - -Tool response message - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `role` | [components.ToolResponseMessageRole](../components/toolresponsemessagerole.md) | :heavy_check_mark: | N/A | | -| `content` | [components.ToolResponseMessageContent](../components/toolresponsemessagecontent.md) | :heavy_check_mark: | Tool response content | The weather in San Francisco is 72°F and sunny. | -| `tool_call_id` | *str* | :heavy_check_mark: | ID of the assistant message tool call this message responds to | call_abc123 | \ No newline at end of file diff --git a/docs/components/toolresponsemessagecontent.md b/docs/components/toolresponsemessagecontent.md deleted file mode 100644 index 98f6770..0000000 --- a/docs/components/toolresponsemessagecontent.md +++ /dev/null @@ -1,19 +0,0 @@ -# ToolResponseMessageContent - -Tool response content - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `List[components.ChatMessageContentItem]` - -```python -value: List[components.ChatMessageContentItem] = /* values here */ -``` - diff --git a/docs/components/toolresponsemessagerole.md b/docs/components/toolresponsemessagerole.md deleted file mode 100644 index f919504..0000000 --- a/docs/components/toolresponsemessagerole.md +++ /dev/null @@ -1,8 +0,0 @@ -# ToolResponseMessageRole - - -## Values - -| Name | Value | -| ------ | ------ | -| `TOOL` | tool | \ No newline at end of file diff --git a/docs/components/truncation.md b/docs/components/truncation.md deleted file mode 100644 index 5a04bd9..0000000 --- a/docs/components/truncation.md +++ /dev/null @@ -1,9 +0,0 @@ -# Truncation - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `AUTO` | auto | -| `DISABLED` | disabled | \ No newline at end of file diff --git a/docs/components/ttl.md b/docs/components/ttl.md deleted file mode 100644 index 0cbc7f3..0000000 --- a/docs/components/ttl.md +++ /dev/null @@ -1,9 +0,0 @@ -# TTL - - -## Values - -| Name | Value | -| ------- | ------- | -| `FIVEM` | 5m | -| `ONEH` | 1h | \ No newline at end of file diff --git a/docs/components/typeresponsecontentpartadded.md b/docs/components/typeresponsecontentpartadded.md deleted file mode 100644 index c31cd18..0000000 --- a/docs/components/typeresponsecontentpartadded.md +++ /dev/null @@ -1,8 +0,0 @@ -# TypeResponseContentPartAdded - - -## Values - -| Name | Value | -| ----------------------------- | ----------------------------- | -| `RESPONSE_CONTENT_PART_ADDED` | response.content_part.added | \ No newline at end of file diff --git a/docs/components/typeresponsecontentpartdone.md b/docs/components/typeresponsecontentpartdone.md deleted file mode 100644 index 0f98a39..0000000 --- a/docs/components/typeresponsecontentpartdone.md +++ /dev/null @@ -1,8 +0,0 @@ -# TypeResponseContentPartDone - - -## Values - -| Name | Value | -| ---------------------------- | ---------------------------- | -| `RESPONSE_CONTENT_PART_DONE` | response.content_part.done | \ No newline at end of file diff --git a/docs/components/typeresponsefunctioncallargumentsdelta.md b/docs/components/typeresponsefunctioncallargumentsdelta.md deleted file mode 100644 index c9708cc..0000000 --- a/docs/components/typeresponsefunctioncallargumentsdelta.md +++ /dev/null @@ -1,8 +0,0 @@ -# TypeResponseFunctionCallArgumentsDelta - - -## Values - -| Name | Value | -| ---------------------------------------- | ---------------------------------------- | -| `RESPONSE_FUNCTION_CALL_ARGUMENTS_DELTA` | response.function_call_arguments.delta | \ No newline at end of file diff --git a/docs/components/typeresponsefunctioncallargumentsdone.md b/docs/components/typeresponsefunctioncallargumentsdone.md deleted file mode 100644 index efb0b73..0000000 --- a/docs/components/typeresponsefunctioncallargumentsdone.md +++ /dev/null @@ -1,8 +0,0 @@ -# TypeResponseFunctionCallArgumentsDone - - -## Values - -| Name | Value | -| --------------------------------------- | --------------------------------------- | -| `RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE` | response.function_call_arguments.done | \ No newline at end of file diff --git a/docs/components/typeresponseoutputtextannotationadded.md b/docs/components/typeresponseoutputtextannotationadded.md deleted file mode 100644 index d2319a5..0000000 --- a/docs/components/typeresponseoutputtextannotationadded.md +++ /dev/null @@ -1,8 +0,0 @@ -# TypeResponseOutputTextAnnotationAdded - - -## Values - -| Name | Value | -| --------------------------------------- | --------------------------------------- | -| `RESPONSE_OUTPUT_TEXT_ANNOTATION_ADDED` | response.output_text.annotation.added | \ No newline at end of file diff --git a/docs/components/typeresponseoutputtextdelta.md b/docs/components/typeresponseoutputtextdelta.md deleted file mode 100644 index e6381fd..0000000 --- a/docs/components/typeresponseoutputtextdelta.md +++ /dev/null @@ -1,8 +0,0 @@ -# TypeResponseOutputTextDelta - - -## Values - -| Name | Value | -| ---------------------------- | ---------------------------- | -| `RESPONSE_OUTPUT_TEXT_DELTA` | response.output_text.delta | \ No newline at end of file diff --git a/docs/components/typeresponseoutputtextdone.md b/docs/components/typeresponseoutputtextdone.md deleted file mode 100644 index 2ccc4b5..0000000 --- a/docs/components/typeresponseoutputtextdone.md +++ /dev/null @@ -1,8 +0,0 @@ -# TypeResponseOutputTextDone - - -## Values - -| Name | Value | -| --------------------------- | --------------------------- | -| `RESPONSE_OUTPUT_TEXT_DONE` | response.output_text.done | \ No newline at end of file diff --git a/docs/components/typeresponsereasoningsummarypartdone.md b/docs/components/typeresponsereasoningsummarypartdone.md deleted file mode 100644 index 8951706..0000000 --- a/docs/components/typeresponsereasoningsummarypartdone.md +++ /dev/null @@ -1,8 +0,0 @@ -# TypeResponseReasoningSummaryPartDone - - -## Values - -| Name | Value | -| -------------------------------------- | -------------------------------------- | -| `RESPONSE_REASONING_SUMMARY_PART_DONE` | response.reasoning_summary_part.done | \ No newline at end of file diff --git a/docs/components/typeresponserefusaldelta.md b/docs/components/typeresponserefusaldelta.md deleted file mode 100644 index 9e5dadc..0000000 --- a/docs/components/typeresponserefusaldelta.md +++ /dev/null @@ -1,8 +0,0 @@ -# TypeResponseRefusalDelta - - -## Values - -| Name | Value | -| ------------------------ | ------------------------ | -| `RESPONSE_REFUSAL_DELTA` | response.refusal.delta | \ No newline at end of file diff --git a/docs/components/typeresponserefusaldone.md b/docs/components/typeresponserefusaldone.md deleted file mode 100644 index 0124586..0000000 --- a/docs/components/typeresponserefusaldone.md +++ /dev/null @@ -1,8 +0,0 @@ -# TypeResponseRefusalDone - - -## Values - -| Name | Value | -| ----------------------- | ----------------------- | -| `RESPONSE_REFUSAL_DONE` | response.refusal.done | \ No newline at end of file diff --git a/docs/components/usermessage.md b/docs/components/usermessage.md deleted file mode 100644 index 40e7787..0000000 --- a/docs/components/usermessage.md +++ /dev/null @@ -1,12 +0,0 @@ -# UserMessage - -User message - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `role` | [components.UserMessageRole](../components/usermessagerole.md) | :heavy_check_mark: | N/A | | -| `content` | [components.UserMessageContent](../components/usermessagecontent.md) | :heavy_check_mark: | User message content | What is the capital of France? | -| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for the user | User | \ No newline at end of file diff --git a/docs/components/usermessagecontent.md b/docs/components/usermessagecontent.md deleted file mode 100644 index e3483ff..0000000 --- a/docs/components/usermessagecontent.md +++ /dev/null @@ -1,19 +0,0 @@ -# UserMessageContent - -User message content - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `List[components.ChatMessageContentItem]` - -```python -value: List[components.ChatMessageContentItem] = /* values here */ -``` - diff --git a/docs/components/usermessagerole.md b/docs/components/usermessagerole.md deleted file mode 100644 index 171124e..0000000 --- a/docs/components/usermessagerole.md +++ /dev/null @@ -1,8 +0,0 @@ -# UserMessageRole - - -## Values - -| Name | Value | -| ------ | ------ | -| `USER` | user | \ No newline at end of file diff --git a/docs/components/videoinput.md b/docs/components/videoinput.md deleted file mode 100644 index aefea98..0000000 --- a/docs/components/videoinput.md +++ /dev/null @@ -1,10 +0,0 @@ -# VideoInput - -Video input object - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `url` | *str* | :heavy_check_mark: | URL of the video (data: URLs supported) | \ No newline at end of file diff --git a/docs/components/websearchpreviewtooluserlocation.md b/docs/components/websearchpreviewtooluserlocation.md deleted file mode 100644 index e2768b0..0000000 --- a/docs/components/websearchpreviewtooluserlocation.md +++ /dev/null @@ -1,12 +0,0 @@ -# WebSearchPreviewToolUserLocation - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `type` | [components.WebSearchPreviewToolUserLocationType](../components/websearchpreviewtooluserlocationtype.md) | :heavy_check_mark: | N/A | -| `city` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `region` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `timezone` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/websearchpreviewtooluserlocationtype.md b/docs/components/websearchpreviewtooluserlocationtype.md deleted file mode 100644 index 505e5ea..0000000 --- a/docs/components/websearchpreviewtooluserlocationtype.md +++ /dev/null @@ -1,8 +0,0 @@ -# WebSearchPreviewToolUserLocationType - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `APPROXIMATE` | approximate | \ No newline at end of file diff --git a/docs/operations/calldata.md b/docs/operations/calldata.md deleted file mode 100644 index de7a031..0000000 --- a/docs/operations/calldata.md +++ /dev/null @@ -1,17 +0,0 @@ -# CallData - - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `deadline` | *str* | :heavy_check_mark: | N/A | -| `fee_amount` | *str* | :heavy_check_mark: | N/A | -| `id` | *str* | :heavy_check_mark: | N/A | -| `operator` | *str* | :heavy_check_mark: | N/A | -| `prefix` | *str* | :heavy_check_mark: | N/A | -| `recipient` | *str* | :heavy_check_mark: | N/A | -| `recipient_amount` | *str* | :heavy_check_mark: | N/A | -| `recipient_currency` | *str* | :heavy_check_mark: | N/A | -| `refund_destination` | *str* | :heavy_check_mark: | N/A | -| `signature` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/operations/createcoinbasechargedata.md b/docs/operations/createcoinbasechargedata.md deleted file mode 100644 index 9363cdf..0000000 --- a/docs/operations/createcoinbasechargedata.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateCoinbaseChargeData - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `id` | *str* | :heavy_check_mark: | N/A | -| `created_at` | *str* | :heavy_check_mark: | N/A | -| `expires_at` | *str* | :heavy_check_mark: | N/A | -| `web3_data` | [operations.Web3Data](../operations/web3data.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/operations/createcoinbasechargerequest.md b/docs/operations/createcoinbasechargerequest.md index e6f0307..9a425d3 100644 --- a/docs/operations/createcoinbasechargerequest.md +++ b/docs/operations/createcoinbasechargerequest.md @@ -3,9 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `create_charge_request` | [components.CreateChargeRequest](../components/createchargerequest.md) | :heavy_check_mark: | N/A | {
"amount": 100,
"sender": "0x1234567890123456789012345678901234567890",
"chain_id": 1
} | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/createcoinbasechargeresponse.md b/docs/operations/createcoinbasechargeresponse.md deleted file mode 100644 index d9d4bd9..0000000 --- a/docs/operations/createcoinbasechargeresponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateCoinbaseChargeResponse - -Returns the calldata to fulfill the transaction - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `data` | [operations.CreateCoinbaseChargeData](../operations/createcoinbasechargedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/operations/createcoinbasechargesecurity.md b/docs/operations/createcoinbasechargesecurity.md deleted file mode 100644 index 7d58a21..0000000 --- a/docs/operations/createcoinbasechargesecurity.md +++ /dev/null @@ -1,8 +0,0 @@ -# CreateCoinbaseChargeSecurity - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `bearer` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/operations/createembeddingsprovider.md b/docs/operations/createembeddingsprovider.md deleted file mode 100644 index 3b76724..0000000 --- a/docs/operations/createembeddingsprovider.md +++ /dev/null @@ -1,20 +0,0 @@ -# CreateEmbeddingsProvider - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
| | -| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | | -| `data_collection` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it

- deny: use only providers which do not collect user data. | allow | -| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true | -| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true | -| `order` | List[[operations.Order](../operations/order.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | | -| `only` | List[[operations.Only](../operations/only.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | | -| `ignore` | List[[operations.Ignore](../operations/ignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | | -| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | | -| `sort` | [OptionalNullable[components.ProviderSort]](../components/providersort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price | -| `max_price` | [Optional[operations.MaxPrice]](../operations/maxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | | -| `min_throughput` | *OptionalNullable[float]* | :heavy_minus_sign: | The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used. | 100 | -| `max_latency` | *OptionalNullable[float]* | :heavy_minus_sign: | The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used. | 5 | \ No newline at end of file diff --git a/docs/operations/getparametersprovider.md b/docs/operations/getparametersprovider.md deleted file mode 100644 index 4f7d2d8..0000000 --- a/docs/operations/getparametersprovider.md +++ /dev/null @@ -1,76 +0,0 @@ -# GetParametersProvider - - -## Values - -| Name | Value | -| ------------------- | ------------------- | -| `AI21` | AI21 | -| `AION_LABS` | AionLabs | -| `ALIBABA` | Alibaba | -| `AMAZON_BEDROCK` | Amazon Bedrock | -| `AMAZON_NOVA` | Amazon Nova | -| `ANTHROPIC` | Anthropic | -| `ARCEE_AI` | Arcee AI | -| `ATLAS_CLOUD` | AtlasCloud | -| `AVIAN` | Avian | -| `AZURE` | Azure | -| `BASE_TEN` | BaseTen | -| `BYTE_PLUS` | BytePlus | -| `BLACK_FOREST_LABS` | Black Forest Labs | -| `CEREBRAS` | Cerebras | -| `CHUTES` | Chutes | -| `CIRRASCALE` | Cirrascale | -| `CLARIFAI` | Clarifai | -| `CLOUDFLARE` | Cloudflare | -| `COHERE` | Cohere | -| `CRUSOE` | Crusoe | -| `DEEP_INFRA` | DeepInfra | -| `DEEP_SEEK` | DeepSeek | -| `FEATHERLESS` | Featherless | -| `FIREWORKS` | Fireworks | -| `FRIENDLI` | Friendli | -| `GMI_CLOUD` | GMICloud | -| `GO_POMELO` | GoPomelo | -| `GOOGLE` | Google | -| `GOOGLE_AI_STUDIO` | Google AI Studio | -| `GROQ` | Groq | -| `HYPERBOLIC` | Hyperbolic | -| `INCEPTION` | Inception | -| `INFERENCE_NET` | InferenceNet | -| `INFERMATIC` | Infermatic | -| `INFLECTION` | Inflection | -| `LIQUID` | Liquid | -| `MARA` | Mara | -| `MANCER_2` | Mancer 2 | -| `MINIMAX` | Minimax | -| `MODEL_RUN` | ModelRun | -| `MISTRAL` | Mistral | -| `MODULAR` | Modular | -| `MOONSHOT_AI` | Moonshot AI | -| `MORPH` | Morph | -| `N_COMPASS` | NCompass | -| `NEBIUS` | Nebius | -| `NEXT_BIT` | NextBit | -| `NOVITA` | Novita | -| `NVIDIA` | Nvidia | -| `OPEN_AI` | OpenAI | -| `OPEN_INFERENCE` | OpenInference | -| `PARASAIL` | Parasail | -| `PERPLEXITY` | Perplexity | -| `PHALA` | Phala | -| `RELACE` | Relace | -| `SAMBA_NOVA` | SambaNova | -| `SILICON_FLOW` | SiliconFlow | -| `SOURCEFUL` | Sourceful | -| `STEALTH` | Stealth | -| `STREAM_LAKE` | StreamLake | -| `SWITCHPOINT` | Switchpoint | -| `TARGON` | Targon | -| `TOGETHER` | Together | -| `VENICE` | Venice | -| `WAND_B` | WandB | -| `XIAOMI` | Xiaomi | -| `X_AI` | xAI | -| `Z_AI` | Z.AI | -| `FAKE_PROVIDER` | FakeProvider | \ No newline at end of file diff --git a/docs/operations/ignore.md b/docs/operations/ignore.md deleted file mode 100644 index 5f78708..0000000 --- a/docs/operations/ignore.md +++ /dev/null @@ -1,17 +0,0 @@ -# Ignore - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/operations/maxprice.md b/docs/operations/maxprice.md deleted file mode 100644 index 41bb1be..0000000 --- a/docs/operations/maxprice.md +++ /dev/null @@ -1,14 +0,0 @@ -# MaxPrice - -The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `prompt` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 | -| `completion` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 | -| `image` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 | -| `audio` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 | -| `request` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 | \ No newline at end of file diff --git a/docs/operations/metadata.md b/docs/operations/metadata.md deleted file mode 100644 index 87bf7e3..0000000 --- a/docs/operations/metadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# Metadata - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `chain_id` | *float* | :heavy_check_mark: | N/A | -| `contract_address` | *str* | :heavy_check_mark: | N/A | -| `sender` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/operations/only.md b/docs/operations/only.md deleted file mode 100644 index a62341b..0000000 --- a/docs/operations/only.md +++ /dev/null @@ -1,17 +0,0 @@ -# Only - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/operations/order.md b/docs/operations/order.md deleted file mode 100644 index b0e21fa..0000000 --- a/docs/operations/order.md +++ /dev/null @@ -1,17 +0,0 @@ -# Order - - -## Supported Types - -### `components.ProviderName` - -```python -value: components.ProviderName = /* values here */ -``` - -### `str` - -```python -value: str = /* values here */ -``` - diff --git a/docs/operations/transferintent.md b/docs/operations/transferintent.md deleted file mode 100644 index f068e9a..0000000 --- a/docs/operations/transferintent.md +++ /dev/null @@ -1,9 +0,0 @@ -# TransferIntent - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `call_data` | [operations.CallData](../operations/calldata.md) | :heavy_check_mark: | N/A | -| `metadata` | [operations.Metadata](../operations/metadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/operations/web3data.md b/docs/operations/web3data.md deleted file mode 100644 index 18e0a9c..0000000 --- a/docs/operations/web3data.md +++ /dev/null @@ -1,8 +0,0 @@ -# Web3Data - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `transfer_intent` | [operations.TransferIntent](../operations/transferintent.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index f10b397..91805c7 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -27,7 +27,7 @@ with OpenRouter( api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: - res = open_router.analytics.get_user_activity(date_="2025-08-24") + res = open_router.analytics.get_user_activity() # Handle response print(res) diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md index 7b325c0..d072fdd 100644 --- a/docs/sdks/apikeys/README.md +++ b/docs/sdks/apikeys/README.md @@ -32,7 +32,7 @@ with OpenRouter( api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: - res = open_router.api_keys.list(include_disabled="false", offset="0") + res = open_router.api_keys.list() # Handle response print(res) diff --git a/docs/sdks/credits/README.md b/docs/sdks/credits/README.md index 0d32728..59bb0ab 100644 --- a/docs/sdks/credits/README.md +++ b/docs/sdks/credits/README.md @@ -7,7 +7,7 @@ Credit management endpoints ### Available Operations * [get_credits](#get_credits) - Get remaining credits -* [create_coinbase_charge](#create_coinbase_charge) - Create a Coinbase charge for crypto payment +* [~~create_coinbase_charge~~](#create_coinbase_charge) - Deprecated Coinbase Commerce charge endpoint :warning: **Deprecated** ## get_credits @@ -57,16 +57,17 @@ with OpenRouter( | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | -## create_coinbase_charge +## ~~create_coinbase_charge~~ -Create a Coinbase charge for crypto payment +Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. ### Example Usage ```python -from openrouter import OpenRouter, operations -import os +from openrouter import OpenRouter with OpenRouter( @@ -75,12 +76,9 @@ with OpenRouter( x_open_router_categories="", ) as open_router: - res = open_router.credits.create_coinbase_charge(security=operations.CreateCoinbaseChargeSecurity( - bearer=os.getenv("OPENROUTER_BEARER", ""), - ), amount=100, sender="0x1234567890123456789012345678901234567890", chain_id=1) + open_router.credits.create_coinbase_charge() - # Handle response - print(res) + # Use the SDK ... ``` @@ -88,25 +86,14 @@ with OpenRouter( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `security` | [operations.CreateCoinbaseChargeSecurity](../../operations/createcoinbasechargesecurity.md) | :heavy_check_mark: | N/A | -| `amount` | *float* | :heavy_check_mark: | N/A | -| `sender` | *str* | :heavy_check_mark: | N/A | -| `chain_id` | [components.ChainID](../../components/chainid.md) | :heavy_check_mark: | N/A | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -### Response - -**[operations.CreateCoinbaseChargeResponse](../../operations/createcoinbasechargeresponse.md)** - ### Errors -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.BadRequestResponseError | 400 | application/json | -| errors.UnauthorizedResponseError | 401 | application/json | -| errors.TooManyRequestsResponseError | 429 | application/json | -| errors.InternalServerResponseError | 500 | application/json | -| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| errors.GoneResponseError | 410 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 870fd08..71d7080 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,16 +1,15 @@ [project] name = "openrouter" -version = "0.8.0" +version = "0.8.1" description = "Official Python Client SDK for OpenRouter." authors = [{ name = "OpenRouter" },] -readme = "README-PYPI.md" +readme = "README.md" requires-python = ">=3.9.2" dependencies = [ "httpcore >=1.0.9", "httpx >=0.28.1", "pydantic >=2.11.2", ] -urls.repository = "https://github.com/OpenRouterTeam/python-sdk.git" license = { text = "Apache-2.0" } [dependency-groups] diff --git a/scripts/publish.sh b/scripts/publish.sh index c35748f..ef28dc1 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,6 +1,4 @@ #!/usr/bin/env bash -uv run python scripts/prepare_readme.py - uv build uv publish --token $PYPI_TOKEN diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py index 8d9fa36..1057ee9 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "0.8.0" +__version__: str = "0.8.1" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.788.4" -__user_agent__: str = "speakeasy-sdk/python 0.8.0 2.788.4 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 0.8.1 2.788.4 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py index c61c2a6..f62b9c0 100644 --- a/src/openrouter/components/__init__.py +++ b/src/openrouter/components/__init__.py @@ -392,11 +392,6 @@ if TYPE_CHECKING: ContentPartDoneEventTypedDict, ) from .contextcompressionengine import ContextCompressionEngine - from .createchargerequest import ( - ChainID, - CreateChargeRequest, - CreateChargeRequestTypedDict, - ) from .customtool import ( CustomTool, CustomToolTypedDict, @@ -516,6 +511,10 @@ if TYPE_CHECKING: OutputInputImageTypedDict, OutputType, ) + from .goneresponseerrordata import ( + GoneResponseErrorData, + GoneResponseErrorDataTypedDict, + ) from .imagegencallcompletedevent import ( ImageGenCallCompletedEvent, ImageGenCallCompletedEventType, @@ -1268,7 +1267,6 @@ __all__ = [ "By", "CacheControl", "CacheControlTypedDict", - "ChainID", "ChatAssistantImages", "ChatAssistantImagesImageURL", "ChatAssistantImagesImageURLTypedDict", @@ -1510,8 +1508,6 @@ __all__ = [ "ContextCompressionEngine", "CostDetails", "CostDetailsTypedDict", - "CreateChargeRequest", - "CreateChargeRequestTypedDict", "CustomTool", "CustomToolTypedDict", "Data", @@ -1608,6 +1604,8 @@ __all__ = [ "FunctionCallOutputItemOutputUnion2TypedDict", "FunctionCallOutputItemTypeFunctionCallOutput", "FunctionCallOutputItemTypedDict", + "GoneResponseErrorData", + "GoneResponseErrorDataTypedDict", "ImageGenCallCompletedEvent", "ImageGenCallCompletedEventType", "ImageGenCallCompletedEventTypedDict", @@ -2464,9 +2462,6 @@ _dynamic_imports: dict[str, str] = { "ContentPartDoneEventType": ".contentpartdoneevent", "ContentPartDoneEventTypedDict": ".contentpartdoneevent", "ContextCompressionEngine": ".contextcompressionengine", - "ChainID": ".createchargerequest", - "CreateChargeRequest": ".createchargerequest", - "CreateChargeRequestTypedDict": ".createchargerequest", "CustomTool": ".customtool", "CustomToolTypedDict": ".customtool", "Format": ".customtool", @@ -2568,6 +2563,8 @@ _dynamic_imports: dict[str, str] = { "OutputInputImage": ".functioncalloutputitem", "OutputInputImageTypedDict": ".functioncalloutputitem", "OutputType": ".functioncalloutputitem", + "GoneResponseErrorData": ".goneresponseerrordata", + "GoneResponseErrorDataTypedDict": ".goneresponseerrordata", "ImageGenCallCompletedEvent": ".imagegencallcompletedevent", "ImageGenCallCompletedEventType": ".imagegencallcompletedevent", "ImageGenCallCompletedEventTypedDict": ".imagegencallcompletedevent", diff --git a/src/openrouter/components/assistantmessage.py b/src/openrouter/components/assistantmessage.py deleted file mode 100644 index 7666beb..0000000 --- a/src/openrouter/components/assistantmessage.py +++ /dev/null @@ -1,134 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .assistantmessageimages import ( - AssistantMessageImages, - AssistantMessageImagesTypedDict, -) -from .chatcompletionaudiooutput import ( - ChatCompletionAudioOutput, - ChatCompletionAudioOutputTypedDict, -) -from .chatmessagecontentitem import ( - ChatMessageContentItem, - ChatMessageContentItemTypedDict, -) -from .chatmessagetoolcall import ChatMessageToolCall, ChatMessageToolCallTypedDict -from .reasoningdetailunion import ReasoningDetailUnion, ReasoningDetailUnionTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Any, List, Literal, Optional, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict - - -AssistantMessageRole = Literal["assistant",] - - -AssistantMessageContentTypedDict = TypeAliasType( - "AssistantMessageContentTypedDict", - Union[str, List[ChatMessageContentItemTypedDict], Any], -) -r"""Assistant message content""" - - -AssistantMessageContent = TypeAliasType( - "AssistantMessageContent", Union[str, List[ChatMessageContentItem], Any] -) -r"""Assistant message content""" - - -class AssistantMessageTypedDict(TypedDict): - r"""Assistant message for requests and responses""" - - role: AssistantMessageRole - content: NotRequired[Nullable[AssistantMessageContentTypedDict]] - r"""Assistant message content""" - name: NotRequired[str] - r"""Optional name for the assistant""" - tool_calls: NotRequired[List[ChatMessageToolCallTypedDict]] - r"""Tool calls made by the assistant""" - refusal: NotRequired[Nullable[str]] - r"""Refusal message if content was refused""" - reasoning: NotRequired[Nullable[str]] - r"""Reasoning output""" - reasoning_details: NotRequired[List[ReasoningDetailUnionTypedDict]] - r"""Reasoning details for extended thinking models""" - images: NotRequired[List[AssistantMessageImagesTypedDict]] - r"""Generated images from image generation models""" - audio: NotRequired[ChatCompletionAudioOutputTypedDict] - r"""Audio output data or reference""" - - -class AssistantMessage(BaseModel): - r"""Assistant message for requests and responses""" - - role: AssistantMessageRole - - content: OptionalNullable[AssistantMessageContent] = UNSET - r"""Assistant message content""" - - name: Optional[str] = None - r"""Optional name for the assistant""" - - tool_calls: Optional[List[ChatMessageToolCall]] = None - r"""Tool calls made by the assistant""" - - refusal: OptionalNullable[str] = UNSET - r"""Refusal message if content was refused""" - - reasoning: OptionalNullable[str] = UNSET - r"""Reasoning output""" - - reasoning_details: Optional[List[ReasoningDetailUnion]] = None - r"""Reasoning details for extended thinking models""" - - images: Optional[List[AssistantMessageImages]] = None - r"""Generated images from image generation models""" - - audio: Optional[ChatCompletionAudioOutput] = None - r"""Audio output data or reference""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "content", - "name", - "tool_calls", - "refusal", - "reasoning", - "reasoning_details", - "images", - "audio", - ] - nullable_fields = ["content", "refusal", "reasoning"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/assistantmessageimages.py b/src/openrouter/components/assistantmessageimages.py deleted file mode 100644 index 2f2fdfe..0000000 --- a/src/openrouter/components/assistantmessageimages.py +++ /dev/null @@ -1,23 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing_extensions import TypedDict - - -class AssistantMessageImagesImageURLTypedDict(TypedDict): - url: str - r"""URL or base64-encoded data of the generated image""" - - -class AssistantMessageImagesImageURL(BaseModel): - url: str - r"""URL or base64-encoded data of the generated image""" - - -class AssistantMessageImagesTypedDict(TypedDict): - image_url: AssistantMessageImagesImageURLTypedDict - - -class AssistantMessageImages(BaseModel): - image_url: AssistantMessageImagesImageURL diff --git a/src/openrouter/components/chatcompletionaudiooutput.py b/src/openrouter/components/chatcompletionaudiooutput.py deleted file mode 100644 index b270993..0000000 --- a/src/openrouter/components/chatcompletionaudiooutput.py +++ /dev/null @@ -1,35 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Optional -from typing_extensions import NotRequired, TypedDict - - -class ChatCompletionAudioOutputTypedDict(TypedDict): - r"""Audio output data or reference""" - - id: NotRequired[str] - r"""Audio output identifier""" - expires_at: NotRequired[float] - r"""Audio expiration timestamp""" - data: NotRequired[str] - r"""Base64 encoded audio data""" - transcript: NotRequired[str] - r"""Audio transcript""" - - -class ChatCompletionAudioOutput(BaseModel): - r"""Audio output data or reference""" - - id: Optional[str] = None - r"""Audio output identifier""" - - expires_at: Optional[float] = None - r"""Audio expiration timestamp""" - - data: Optional[str] = None - r"""Base64 encoded audio data""" - - transcript: Optional[str] = None - r"""Audio transcript""" diff --git a/src/openrouter/components/chatcompletionfinishreason.py b/src/openrouter/components/chatcompletionfinishreason.py deleted file mode 100644 index 686462c..0000000 --- a/src/openrouter/components/chatcompletionfinishreason.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import UnrecognizedStr -from typing import Literal, Union - - -ChatCompletionFinishReason = Union[ - Literal[ - "tool_calls", - "stop", - "length", - "content_filter", - "error", - ], - UnrecognizedStr, -] diff --git a/src/openrouter/components/chatgenerationparams.py b/src/openrouter/components/chatgenerationparams.py deleted file mode 100644 index bf98e44..0000000 --- a/src/openrouter/components/chatgenerationparams.py +++ /dev/null @@ -1,960 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict -from .datacollection import DataCollection -from .debugoptions import DebugOptions, DebugOptionsTypedDict -from .message import Message, MessageTypedDict -from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict -from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict -from .preferredminthroughput import ( - PreferredMinThroughput, - PreferredMinThroughputTypedDict, -) -from .providername import ProviderName -from .quantization import Quantization -from .responseformatjsonobject import ( - ResponseFormatJSONObject, - ResponseFormatJSONObjectTypedDict, -) -from .responseformatjsonschema import ( - ResponseFormatJSONSchema, - ResponseFormatJSONSchemaTypedDict, -) -from .responseformattext import ResponseFormatText, ResponseFormatTextTypedDict -from .responseformattextgrammar import ( - ResponseFormatTextGrammar, - ResponseFormatTextGrammarTypedDict, -) -from .responseformattextpython import ( - ResponseFormatTextPython, - ResponseFormatTextPythonTypedDict, -) -from .toolchoiceoption import ToolChoiceOption, ToolChoiceOptionTypedDict -from .tooldefinitionjson import ToolDefinitionJSON, ToolDefinitionJSONTypedDict -from .websearchengine import WebSearchEngine -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import get_discriminator, validate_open_enum -import pydantic -from pydantic import ConfigDict, Discriminator, Tag, model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Any, Dict, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -ChatGenerationParamsOrderTypedDict = TypeAliasType( - "ChatGenerationParamsOrderTypedDict", Union[ProviderName, str] -) - - -ChatGenerationParamsOrder = TypeAliasType( - "ChatGenerationParamsOrder", - Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], -) - - -ChatGenerationParamsOnlyTypedDict = TypeAliasType( - "ChatGenerationParamsOnlyTypedDict", Union[ProviderName, str] -) - - -ChatGenerationParamsOnly = TypeAliasType( - "ChatGenerationParamsOnly", - Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], -) - - -ChatGenerationParamsIgnoreTypedDict = TypeAliasType( - "ChatGenerationParamsIgnoreTypedDict", Union[ProviderName, str] -) - - -ChatGenerationParamsIgnore = TypeAliasType( - "ChatGenerationParamsIgnore", - Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], -) - - -ChatGenerationParamsSortEnum = Union[ - Literal[ - "price", - "throughput", - "latency", - "exacto", - ], - UnrecognizedStr, -] - - -ChatGenerationParamsProviderSortConfigEnum = Literal[ - "price", - "throughput", - "latency", - "exacto", -] - - -ChatGenerationParamsBy = Union[ - Literal[ - "price", - "throughput", - "latency", - "exacto", - ], - UnrecognizedStr, -] -r"""The provider sorting strategy (price, throughput, latency)""" - - -ChatGenerationParamsPartition = Union[ - Literal[ - "model", - "none", - ], - UnrecognizedStr, -] -r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model.""" - - -class ChatGenerationParamsProviderSortConfigTypedDict(TypedDict): - by: NotRequired[Nullable[ChatGenerationParamsBy]] - r"""The provider sorting strategy (price, throughput, latency)""" - partition: NotRequired[Nullable[ChatGenerationParamsPartition]] - r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model.""" - - -class ChatGenerationParamsProviderSortConfig(BaseModel): - by: Annotated[ - OptionalNullable[ChatGenerationParamsBy], - PlainValidator(validate_open_enum(False)), - ] = UNSET - r"""The provider sorting strategy (price, throughput, latency)""" - - partition: Annotated[ - OptionalNullable[ChatGenerationParamsPartition], - PlainValidator(validate_open_enum(False)), - ] = UNSET - r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["by", "partition"] - nullable_fields = ["by", "partition"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -ChatGenerationParamsProviderSortConfigUnionTypedDict = TypeAliasType( - "ChatGenerationParamsProviderSortConfigUnionTypedDict", - Union[ - ChatGenerationParamsProviderSortConfigTypedDict, - ChatGenerationParamsProviderSortConfigEnum, - ], -) - - -ChatGenerationParamsProviderSortConfigUnion = TypeAliasType( - "ChatGenerationParamsProviderSortConfigUnion", - Union[ - ChatGenerationParamsProviderSortConfig, - ChatGenerationParamsProviderSortConfigEnum, - ], -) - - -ChatGenerationParamsProviderSort = Union[ - Literal[ - "price", - "throughput", - "latency", - "exacto", - ], - UnrecognizedStr, -] -r"""The provider sorting strategy (price, throughput, latency)""" - - -ChatGenerationParamsSortUnionTypedDict = TypeAliasType( - "ChatGenerationParamsSortUnionTypedDict", - Union[ - ChatGenerationParamsProviderSort, - ChatGenerationParamsProviderSortConfigUnionTypedDict, - ChatGenerationParamsSortEnum, - ], -) -r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" - - -ChatGenerationParamsSortUnion = TypeAliasType( - "ChatGenerationParamsSortUnion", - Union[ - Annotated[ - ChatGenerationParamsProviderSort, PlainValidator(validate_open_enum(False)) - ], - ChatGenerationParamsProviderSortConfigUnion, - Annotated[ - ChatGenerationParamsSortEnum, PlainValidator(validate_open_enum(False)) - ], - ], -) -r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" - - -class ChatGenerationParamsMaxPriceTypedDict(TypedDict): - r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" - - prompt: NotRequired[str] - r"""Price per million prompt tokens""" - completion: NotRequired[str] - image: NotRequired[str] - audio: NotRequired[str] - request: NotRequired[str] - - -class ChatGenerationParamsMaxPrice(BaseModel): - r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" - - prompt: Optional[str] = None - r"""Price per million prompt tokens""" - - completion: Optional[str] = None - - image: Optional[str] = None - - audio: Optional[str] = None - - request: Optional[str] = None - - -class ChatGenerationParamsProviderTypedDict(TypedDict): - r"""When multiple model providers are available, optionally indicate your routing preference.""" - - allow_fallbacks: NotRequired[Nullable[bool]] - r"""Whether to allow backup providers to serve requests - - true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider. - - false: use only the primary/custom provider, and return the upstream error if it's unavailable. - - """ - require_parameters: NotRequired[Nullable[bool]] - r"""Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.""" - data_collection: NotRequired[Nullable[DataCollection]] - r"""Data collection setting. If no available model provider meets the requirement, your request will return an error. - - allow: (default) allow providers which store user data non-transiently and may train on it - - - deny: use only providers which do not collect user data. - """ - zdr: NotRequired[Nullable[bool]] - r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.""" - enforce_distillable_text: NotRequired[Nullable[bool]] - r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.""" - order: NotRequired[Nullable[List[ChatGenerationParamsOrderTypedDict]]] - r"""An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.""" - only: NotRequired[Nullable[List[ChatGenerationParamsOnlyTypedDict]]] - r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.""" - ignore: NotRequired[Nullable[List[ChatGenerationParamsIgnoreTypedDict]]] - r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.""" - quantizations: NotRequired[Nullable[List[Quantization]]] - r"""A list of quantization levels to filter the provider by.""" - sort: NotRequired[Nullable[ChatGenerationParamsSortUnionTypedDict]] - max_price: NotRequired[ChatGenerationParamsMaxPriceTypedDict] - r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" - preferred_min_throughput: NotRequired[Nullable[PreferredMinThroughputTypedDict]] - r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.""" - preferred_max_latency: NotRequired[Nullable[PreferredMaxLatencyTypedDict]] - r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.""" - - -class ChatGenerationParamsProvider(BaseModel): - r"""When multiple model providers are available, optionally indicate your routing preference.""" - - allow_fallbacks: OptionalNullable[bool] = UNSET - r"""Whether to allow backup providers to serve requests - - true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider. - - false: use only the primary/custom provider, and return the upstream error if it's unavailable. - - """ - - require_parameters: OptionalNullable[bool] = UNSET - r"""Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.""" - - data_collection: Annotated[ - OptionalNullable[DataCollection], PlainValidator(validate_open_enum(False)) - ] = UNSET - r"""Data collection setting. If no available model provider meets the requirement, your request will return an error. - - allow: (default) allow providers which store user data non-transiently and may train on it - - - deny: use only providers which do not collect user data. - """ - - zdr: OptionalNullable[bool] = UNSET - r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.""" - - enforce_distillable_text: OptionalNullable[bool] = UNSET - r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.""" - - order: OptionalNullable[List[ChatGenerationParamsOrder]] = UNSET - r"""An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.""" - - only: OptionalNullable[List[ChatGenerationParamsOnly]] = UNSET - r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.""" - - ignore: OptionalNullable[List[ChatGenerationParamsIgnore]] = UNSET - r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.""" - - quantizations: OptionalNullable[ - List[Annotated[Quantization, PlainValidator(validate_open_enum(False))]] - ] = UNSET - r"""A list of quantization levels to filter the provider by.""" - - sort: OptionalNullable[ChatGenerationParamsSortUnion] = UNSET - - max_price: Optional[ChatGenerationParamsMaxPrice] = None - r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" - - preferred_min_throughput: OptionalNullable[PreferredMinThroughput] = UNSET - r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.""" - - preferred_max_latency: OptionalNullable[PreferredMaxLatency] = UNSET - r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "allow_fallbacks", - "require_parameters", - "data_collection", - "zdr", - "enforce_distillable_text", - "order", - "only", - "ignore", - "quantizations", - "sort", - "max_price", - "preferred_min_throughput", - "preferred_max_latency", - ] - nullable_fields = [ - "allow_fallbacks", - "require_parameters", - "data_collection", - "zdr", - "enforce_distillable_text", - "order", - "only", - "ignore", - "quantizations", - "sort", - "preferred_min_throughput", - "preferred_max_latency", - ] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -ChatGenerationParamsIDResponseHealing = Literal["response-healing",] - - -class ChatGenerationParamsPluginResponseHealingTypedDict(TypedDict): - id: ChatGenerationParamsIDResponseHealing - enabled: NotRequired[bool] - r"""Set to false to disable the response-healing plugin for this request. Defaults to true.""" - - -class ChatGenerationParamsPluginResponseHealing(BaseModel): - id: ChatGenerationParamsIDResponseHealing - - enabled: Optional[bool] = None - r"""Set to false to disable the response-healing plugin for this request. Defaults to true.""" - - -ChatGenerationParamsIDFileParser = Literal["file-parser",] - - -class ChatGenerationParamsPluginFileParserTypedDict(TypedDict): - id: ChatGenerationParamsIDFileParser - enabled: NotRequired[bool] - r"""Set to false to disable the file-parser plugin for this request. Defaults to true.""" - pdf: NotRequired[PDFParserOptionsTypedDict] - r"""Options for PDF parsing.""" - - -class ChatGenerationParamsPluginFileParser(BaseModel): - id: ChatGenerationParamsIDFileParser - - enabled: Optional[bool] = None - r"""Set to false to disable the file-parser plugin for this request. Defaults to true.""" - - pdf: Optional[PDFParserOptions] = None - r"""Options for PDF parsing.""" - - -ChatGenerationParamsIDWeb = Literal["web",] - - -class ChatGenerationParamsPluginWebTypedDict(TypedDict): - id: ChatGenerationParamsIDWeb - enabled: NotRequired[bool] - r"""Set to false to disable the web-search plugin for this request. Defaults to true.""" - max_results: NotRequired[float] - search_prompt: NotRequired[str] - engine: NotRequired[WebSearchEngine] - r"""The search engine to use for web search.""" - include_domains: NotRequired[List[str]] - r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" - exclude_domains: NotRequired[List[str]] - r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" - - -class ChatGenerationParamsPluginWeb(BaseModel): - id: ChatGenerationParamsIDWeb - - enabled: Optional[bool] = None - r"""Set to false to disable the web-search plugin for this request. Defaults to true.""" - - max_results: Optional[float] = None - - search_prompt: Optional[str] = None - - engine: Annotated[ - Optional[WebSearchEngine], PlainValidator(validate_open_enum(False)) - ] = None - r"""The search engine to use for web search.""" - - include_domains: Optional[List[str]] = None - r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" - - exclude_domains: Optional[List[str]] = None - r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" - - -ChatGenerationParamsIDModeration = Literal["moderation",] - - -class ChatGenerationParamsPluginModerationTypedDict(TypedDict): - id: ChatGenerationParamsIDModeration - - -class ChatGenerationParamsPluginModeration(BaseModel): - id: ChatGenerationParamsIDModeration - - -ChatGenerationParamsIDAutoRouter = Literal["auto-router",] - - -class ChatGenerationParamsPluginAutoRouterTypedDict(TypedDict): - id: ChatGenerationParamsIDAutoRouter - enabled: NotRequired[bool] - r"""Set to false to disable the auto-router plugin for this request. Defaults to true.""" - allowed_models: NotRequired[List[str]] - r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list.""" - - -class ChatGenerationParamsPluginAutoRouter(BaseModel): - id: ChatGenerationParamsIDAutoRouter - - enabled: Optional[bool] = None - r"""Set to false to disable the auto-router plugin for this request. Defaults to true.""" - - allowed_models: Optional[List[str]] = None - r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list.""" - - -ChatGenerationParamsPluginUnionTypedDict = TypeAliasType( - "ChatGenerationParamsPluginUnionTypedDict", - Union[ - ChatGenerationParamsPluginModerationTypedDict, - ChatGenerationParamsPluginResponseHealingTypedDict, - ChatGenerationParamsPluginAutoRouterTypedDict, - ChatGenerationParamsPluginFileParserTypedDict, - ChatGenerationParamsPluginWebTypedDict, - ], -) - - -ChatGenerationParamsPluginUnion = Annotated[ - Union[ - Annotated[ChatGenerationParamsPluginAutoRouter, Tag("auto-router")], - Annotated[ChatGenerationParamsPluginModeration, Tag("moderation")], - Annotated[ChatGenerationParamsPluginWeb, Tag("web")], - Annotated[ChatGenerationParamsPluginFileParser, Tag("file-parser")], - Annotated[ChatGenerationParamsPluginResponseHealing, Tag("response-healing")], - ], - Discriminator(lambda m: get_discriminator(m, "id", "id")), -] - - -class ChatGenerationParamsTraceTypedDict(TypedDict): - r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" - - trace_id: NotRequired[str] - trace_name: NotRequired[str] - span_name: NotRequired[str] - generation_name: NotRequired[str] - parent_span_id: NotRequired[str] - - -class ChatGenerationParamsTrace(BaseModel): - r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" - - model_config = ConfigDict( - populate_by_name=True, arbitrary_types_allowed=True, extra="allow" - ) - __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) - - trace_id: Optional[str] = None - - trace_name: Optional[str] = None - - span_name: Optional[str] = None - - generation_name: Optional[str] = None - - parent_span_id: Optional[str] = None - - @property - def additional_properties(self): - return self.__pydantic_extra__ - - @additional_properties.setter - def additional_properties(self, value): - self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] - - -Effort = Union[ - Literal[ - "xhigh", - "high", - "medium", - "low", - "minimal", - "none", - ], - UnrecognizedStr, -] -r"""Constrains effort on reasoning for reasoning models""" - - -class ReasoningTypedDict(TypedDict): - r"""Configuration options for reasoning models""" - - effort: NotRequired[Nullable[Effort]] - r"""Constrains effort on reasoning for reasoning models""" - summary: NotRequired[Nullable[Any]] - - -class Reasoning(BaseModel): - r"""Configuration options for reasoning models""" - - effort: Annotated[ - OptionalNullable[Effort], PlainValidator(validate_open_enum(False)) - ] = UNSET - r"""Constrains effort on reasoning for reasoning models""" - - summary: OptionalNullable[Any] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["effort", "summary"] - nullable_fields = ["effort", "summary"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -ResponseFormatTypedDict = TypeAliasType( - "ResponseFormatTypedDict", - Union[ - ResponseFormatTextTypedDict, - ResponseFormatJSONObjectTypedDict, - ResponseFormatTextPythonTypedDict, - ResponseFormatJSONSchemaTypedDict, - ResponseFormatTextGrammarTypedDict, - ], -) -r"""Response format configuration""" - - -ResponseFormat = Annotated[ - Union[ - Annotated[ResponseFormatText, Tag("text")], - Annotated[ResponseFormatJSONObject, Tag("json_object")], - Annotated[ResponseFormatJSONSchema, Tag("json_schema")], - Annotated[ResponseFormatTextGrammar, Tag("grammar")], - Annotated[ResponseFormatTextPython, Tag("python")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] -r"""Response format configuration""" - - -StopTypedDict = TypeAliasType("StopTypedDict", Union[str, List[str], Any]) -r"""Stop sequences (up to 4)""" - - -Stop = TypeAliasType("Stop", Union[str, List[str], Any]) -r"""Stop sequences (up to 4)""" - - -ChatGenerationParamsImageConfigTypedDict = TypeAliasType( - "ChatGenerationParamsImageConfigTypedDict", Union[str, float, List[Nullable[Any]]] -) - - -ChatGenerationParamsImageConfig = TypeAliasType( - "ChatGenerationParamsImageConfig", Union[str, float, List[Nullable[Any]]] -) - - -Modality = Union[ - Literal[ - "text", - "image", - "audio", - ], - UnrecognizedStr, -] - - -ChatGenerationParamsType = Literal["ephemeral",] - - -ChatGenerationParamsTTL = Union[ - Literal[ - "5m", - "1h", - ], - UnrecognizedStr, -] - - -class CacheControlTypedDict(TypedDict): - r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" - - type: ChatGenerationParamsType - ttl: NotRequired[ChatGenerationParamsTTL] - - -class CacheControl(BaseModel): - r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" - - type: ChatGenerationParamsType - - ttl: Annotated[ - Optional[ChatGenerationParamsTTL], PlainValidator(validate_open_enum(False)) - ] = None - - -class ChatGenerationParamsTypedDict(TypedDict): - r"""Chat completion request parameters""" - - messages: List[MessageTypedDict] - r"""List of messages for the conversation""" - provider: NotRequired[Nullable[ChatGenerationParamsProviderTypedDict]] - r"""When multiple model providers are available, optionally indicate your routing preference.""" - plugins: NotRequired[List[ChatGenerationParamsPluginUnionTypedDict]] - r"""Plugins you want to enable for this request, including their settings.""" - user: NotRequired[str] - r"""Unique user identifier""" - session_id: NotRequired[str] - r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.""" - trace: NotRequired[ChatGenerationParamsTraceTypedDict] - r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" - model: NotRequired[str] - r"""Model to use for completion""" - models: NotRequired[List[str]] - r"""Models to use for completion""" - frequency_penalty: NotRequired[Nullable[float]] - r"""Frequency penalty (-2.0 to 2.0)""" - logit_bias: NotRequired[Nullable[Dict[str, float]]] - r"""Token logit bias adjustments""" - logprobs: NotRequired[Nullable[bool]] - r"""Return log probabilities""" - top_logprobs: NotRequired[Nullable[float]] - r"""Number of top log probabilities to return (0-20)""" - max_completion_tokens: NotRequired[Nullable[float]] - r"""Maximum tokens in completion""" - max_tokens: NotRequired[Nullable[float]] - r"""Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.""" - metadata: NotRequired[Dict[str, str]] - r"""Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)""" - presence_penalty: NotRequired[Nullable[float]] - r"""Presence penalty (-2.0 to 2.0)""" - reasoning: NotRequired[ReasoningTypedDict] - r"""Configuration options for reasoning models""" - response_format: NotRequired[ResponseFormatTypedDict] - r"""Response format configuration""" - seed: NotRequired[Nullable[int]] - r"""Random seed for deterministic outputs""" - stop: NotRequired[Nullable[StopTypedDict]] - r"""Stop sequences (up to 4)""" - stream: NotRequired[bool] - r"""Enable streaming response""" - stream_options: NotRequired[Nullable[ChatStreamOptionsTypedDict]] - r"""Streaming configuration options""" - temperature: NotRequired[Nullable[float]] - r"""Sampling temperature (0-2)""" - parallel_tool_calls: NotRequired[Nullable[bool]] - tool_choice: NotRequired[ToolChoiceOptionTypedDict] - r"""Tool choice configuration""" - tools: NotRequired[List[ToolDefinitionJSONTypedDict]] - r"""Available tools for function calling""" - top_p: NotRequired[Nullable[float]] - r"""Nucleus sampling parameter (0-1)""" - debug: NotRequired[DebugOptionsTypedDict] - r"""Debug options for inspecting request transformations (streaming only)""" - image_config: NotRequired[Dict[str, ChatGenerationParamsImageConfigTypedDict]] - r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.""" - modalities: NotRequired[List[Modality]] - r"""Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".""" - cache_control: NotRequired[CacheControlTypedDict] - r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" - - -class ChatGenerationParams(BaseModel): - r"""Chat completion request parameters""" - - messages: List[Message] - r"""List of messages for the conversation""" - - provider: OptionalNullable[ChatGenerationParamsProvider] = UNSET - r"""When multiple model providers are available, optionally indicate your routing preference.""" - - plugins: Optional[List[ChatGenerationParamsPluginUnion]] = None - r"""Plugins you want to enable for this request, including their settings.""" - - user: Optional[str] = None - r"""Unique user identifier""" - - session_id: Optional[str] = None - r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.""" - - trace: Optional[ChatGenerationParamsTrace] = None - r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" - - model: Optional[str] = None - r"""Model to use for completion""" - - models: Optional[List[str]] = None - r"""Models to use for completion""" - - frequency_penalty: OptionalNullable[float] = UNSET - r"""Frequency penalty (-2.0 to 2.0)""" - - logit_bias: OptionalNullable[Dict[str, float]] = UNSET - r"""Token logit bias adjustments""" - - logprobs: OptionalNullable[bool] = UNSET - r"""Return log probabilities""" - - top_logprobs: OptionalNullable[float] = UNSET - r"""Number of top log probabilities to return (0-20)""" - - max_completion_tokens: OptionalNullable[float] = UNSET - r"""Maximum tokens in completion""" - - max_tokens: OptionalNullable[float] = UNSET - r"""Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.""" - - metadata: Optional[Dict[str, str]] = None - r"""Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)""" - - presence_penalty: OptionalNullable[float] = UNSET - r"""Presence penalty (-2.0 to 2.0)""" - - reasoning: Optional[Reasoning] = None - r"""Configuration options for reasoning models""" - - response_format: Optional[ResponseFormat] = None - r"""Response format configuration""" - - seed: OptionalNullable[int] = UNSET - r"""Random seed for deterministic outputs""" - - stop: OptionalNullable[Stop] = UNSET - r"""Stop sequences (up to 4)""" - - stream: Optional[bool] = False - r"""Enable streaming response""" - - stream_options: OptionalNullable[ChatStreamOptions] = UNSET - r"""Streaming configuration options""" - - temperature: OptionalNullable[float] = 1 - r"""Sampling temperature (0-2)""" - - parallel_tool_calls: OptionalNullable[bool] = UNSET - - tool_choice: Optional[ToolChoiceOption] = None - r"""Tool choice configuration""" - - tools: Optional[List[ToolDefinitionJSON]] = None - r"""Available tools for function calling""" - - top_p: OptionalNullable[float] = 1 - r"""Nucleus sampling parameter (0-1)""" - - debug: Optional[DebugOptions] = None - r"""Debug options for inspecting request transformations (streaming only)""" - - image_config: Optional[Dict[str, ChatGenerationParamsImageConfig]] = None - r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.""" - - modalities: Optional[ - List[Annotated[Modality, PlainValidator(validate_open_enum(False))]] - ] = None - r"""Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".""" - - cache_control: Optional[CacheControl] = None - r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "provider", - "plugins", - "user", - "session_id", - "trace", - "model", - "models", - "frequency_penalty", - "logit_bias", - "logprobs", - "top_logprobs", - "max_completion_tokens", - "max_tokens", - "metadata", - "presence_penalty", - "reasoning", - "response_format", - "seed", - "stop", - "stream", - "stream_options", - "temperature", - "parallel_tool_calls", - "tool_choice", - "tools", - "top_p", - "debug", - "image_config", - "modalities", - "cache_control", - ] - nullable_fields = [ - "provider", - "frequency_penalty", - "logit_bias", - "logprobs", - "top_logprobs", - "max_completion_tokens", - "max_tokens", - "presence_penalty", - "seed", - "stop", - "stream_options", - "temperature", - "parallel_tool_calls", - "top_p", - ] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/chatgenerationtokenusage.py b/src/openrouter/components/chatgenerationtokenusage.py deleted file mode 100644 index 66bf2dd..0000000 --- a/src/openrouter/components/chatgenerationtokenusage.py +++ /dev/null @@ -1,175 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict - - -class CompletionTokensDetailsTypedDict(TypedDict): - r"""Detailed completion token usage""" - - reasoning_tokens: NotRequired[Nullable[float]] - r"""Tokens used for reasoning""" - audio_tokens: NotRequired[Nullable[float]] - r"""Tokens used for audio output""" - accepted_prediction_tokens: NotRequired[Nullable[float]] - r"""Accepted prediction tokens""" - rejected_prediction_tokens: NotRequired[Nullable[float]] - r"""Rejected prediction tokens""" - - -class CompletionTokensDetails(BaseModel): - r"""Detailed completion token usage""" - - reasoning_tokens: OptionalNullable[float] = UNSET - r"""Tokens used for reasoning""" - - audio_tokens: OptionalNullable[float] = UNSET - r"""Tokens used for audio output""" - - accepted_prediction_tokens: OptionalNullable[float] = UNSET - r"""Accepted prediction tokens""" - - rejected_prediction_tokens: OptionalNullable[float] = UNSET - r"""Rejected prediction tokens""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "reasoning_tokens", - "audio_tokens", - "accepted_prediction_tokens", - "rejected_prediction_tokens", - ] - nullable_fields = [ - "reasoning_tokens", - "audio_tokens", - "accepted_prediction_tokens", - "rejected_prediction_tokens", - ] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -class PromptTokensDetailsTypedDict(TypedDict): - r"""Detailed prompt token usage""" - - cached_tokens: NotRequired[float] - r"""Cached prompt tokens""" - cache_write_tokens: NotRequired[float] - r"""Tokens written to cache. Only returned for models with explicit caching and cache write pricing.""" - audio_tokens: NotRequired[float] - r"""Audio input tokens""" - video_tokens: NotRequired[float] - r"""Video input tokens""" - - -class PromptTokensDetails(BaseModel): - r"""Detailed prompt token usage""" - - cached_tokens: Optional[float] = None - r"""Cached prompt tokens""" - - cache_write_tokens: Optional[float] = None - r"""Tokens written to cache. Only returned for models with explicit caching and cache write pricing.""" - - audio_tokens: Optional[float] = None - r"""Audio input tokens""" - - video_tokens: Optional[float] = None - r"""Video input tokens""" - - -class ChatGenerationTokenUsageTypedDict(TypedDict): - r"""Token usage statistics""" - - completion_tokens: float - r"""Number of tokens in the completion""" - prompt_tokens: float - r"""Number of tokens in the prompt""" - total_tokens: float - r"""Total number of tokens""" - completion_tokens_details: NotRequired[Nullable[CompletionTokensDetailsTypedDict]] - r"""Detailed completion token usage""" - prompt_tokens_details: NotRequired[Nullable[PromptTokensDetailsTypedDict]] - r"""Detailed prompt token usage""" - - -class ChatGenerationTokenUsage(BaseModel): - r"""Token usage statistics""" - - completion_tokens: float - r"""Number of tokens in the completion""" - - prompt_tokens: float - r"""Number of tokens in the prompt""" - - total_tokens: float - r"""Total number of tokens""" - - completion_tokens_details: OptionalNullable[CompletionTokensDetails] = UNSET - r"""Detailed completion token usage""" - - prompt_tokens_details: OptionalNullable[PromptTokensDetails] = UNSET - r"""Detailed prompt token usage""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["completion_tokens_details", "prompt_tokens_details"] - nullable_fields = ["completion_tokens_details", "prompt_tokens_details"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/chatmessagecontentitem.py b/src/openrouter/components/chatmessagecontentitem.py deleted file mode 100644 index 8ebc9b7..0000000 --- a/src/openrouter/components/chatmessagecontentitem.py +++ /dev/null @@ -1,74 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatmessagecontentitemaudio import ( - ChatMessageContentItemAudio, - ChatMessageContentItemAudioTypedDict, -) -from .chatmessagecontentitemfile import ( - ChatMessageContentItemFile, - ChatMessageContentItemFileTypedDict, -) -from .chatmessagecontentitemimage import ( - ChatMessageContentItemImage, - ChatMessageContentItemImageTypedDict, -) -from .chatmessagecontentitemtext import ( - ChatMessageContentItemText, - ChatMessageContentItemTextTypedDict, -) -from .chatmessagecontentitemvideo import ( - ChatMessageContentItemVideo, - ChatMessageContentItemVideoTypedDict, -) -from .chatmessagecontentitemvideolegacy import ( - ChatMessageContentItemVideoLegacy, - ChatMessageContentItemVideoLegacyTypedDict, -) -from openrouter.utils import get_discriminator -from pydantic import Discriminator, Tag -from typing import Union -from typing_extensions import Annotated, TypeAliasType - - -ChatMessageContentItem1TypedDict = TypeAliasType( - "ChatMessageContentItem1TypedDict", - Union[ - ChatMessageContentItemVideoLegacyTypedDict, ChatMessageContentItemVideoTypedDict - ], -) - - -ChatMessageContentItem1 = Annotated[ - Union[ - Annotated[ChatMessageContentItemVideoLegacy, Tag("input_video")], - Annotated[ChatMessageContentItemVideo, Tag("video_url")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -ChatMessageContentItemTypedDict = TypeAliasType( - "ChatMessageContentItemTypedDict", - Union[ - ChatMessageContentItemImageTypedDict, - ChatMessageContentItemAudioTypedDict, - ChatMessageContentItemFileTypedDict, - ChatMessageContentItemTextTypedDict, - ChatMessageContentItem1TypedDict, - ], -) -r"""Content part for chat completion messages""" - - -ChatMessageContentItem = TypeAliasType( - "ChatMessageContentItem", - Union[ - ChatMessageContentItemImage, - ChatMessageContentItemAudio, - ChatMessageContentItemFile, - ChatMessageContentItemText, - ChatMessageContentItem1, - ], -) -r"""Content part for chat completion messages""" diff --git a/src/openrouter/components/chatmessagecontentitemaudio.py b/src/openrouter/components/chatmessagecontentitemaudio.py deleted file mode 100644 index 5838eae..0000000 --- a/src/openrouter/components/chatmessagecontentitemaudio.py +++ /dev/null @@ -1,40 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -import pydantic -from typing import Literal -from typing_extensions import Annotated, TypedDict - - -ChatMessageContentItemAudioType = Literal["input_audio",] - - -class ChatMessageContentItemAudioInputAudioTypedDict(TypedDict): - data: str - r"""Base64 encoded audio data""" - format_: str - r"""Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider.""" - - -class ChatMessageContentItemAudioInputAudio(BaseModel): - data: str - r"""Base64 encoded audio data""" - - format_: Annotated[str, pydantic.Field(alias="format")] - r"""Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider.""" - - -class ChatMessageContentItemAudioTypedDict(TypedDict): - r"""Audio input content part. Supported audio formats vary by provider.""" - - type: ChatMessageContentItemAudioType - input_audio: ChatMessageContentItemAudioInputAudioTypedDict - - -class ChatMessageContentItemAudio(BaseModel): - r"""Audio input content part. Supported audio formats vary by provider.""" - - type: ChatMessageContentItemAudioType - - input_audio: ChatMessageContentItemAudioInputAudio diff --git a/src/openrouter/components/chatmessagecontentitemcachecontrol.py b/src/openrouter/components/chatmessagecontentitemcachecontrol.py deleted file mode 100644 index af4b966..0000000 --- a/src/openrouter/components/chatmessagecontentitemcachecontrol.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel, UnrecognizedStr -from openrouter.utils import validate_open_enum -from pydantic.functional_validators import PlainValidator -from typing import Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypedDict - - -ChatMessageContentItemCacheControlType = Literal["ephemeral",] - - -ChatMessageContentItemCacheControlTTL = Union[ - Literal[ - "5m", - "1h", - ], - UnrecognizedStr, -] - - -class ChatMessageContentItemCacheControlTypedDict(TypedDict): - r"""Cache control for the content part""" - - type: ChatMessageContentItemCacheControlType - ttl: NotRequired[ChatMessageContentItemCacheControlTTL] - - -class ChatMessageContentItemCacheControl(BaseModel): - r"""Cache control for the content part""" - - type: ChatMessageContentItemCacheControlType - - ttl: Annotated[ - Optional[ChatMessageContentItemCacheControlTTL], - PlainValidator(validate_open_enum(False)), - ] = None diff --git a/src/openrouter/components/chatmessagecontentitemfile.py b/src/openrouter/components/chatmessagecontentitemfile.py deleted file mode 100644 index 0256bb3..0000000 --- a/src/openrouter/components/chatmessagecontentitemfile.py +++ /dev/null @@ -1,44 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -ChatMessageContentItemFileType = Literal["file",] - - -class FileTypedDict(TypedDict): - file_data: NotRequired[str] - r"""File content as base64 data URL or URL""" - file_id: NotRequired[str] - r"""File ID for previously uploaded files""" - filename: NotRequired[str] - r"""Original filename""" - - -class File(BaseModel): - file_data: Optional[str] = None - r"""File content as base64 data URL or URL""" - - file_id: Optional[str] = None - r"""File ID for previously uploaded files""" - - filename: Optional[str] = None - r"""Original filename""" - - -class ChatMessageContentItemFileTypedDict(TypedDict): - r"""File content part for document processing""" - - type: ChatMessageContentItemFileType - file: FileTypedDict - - -class ChatMessageContentItemFile(BaseModel): - r"""File content part for document processing""" - - type: ChatMessageContentItemFileType - - file: File diff --git a/src/openrouter/components/chatmessagecontentitemimage.py b/src/openrouter/components/chatmessagecontentitemimage.py deleted file mode 100644 index e6e476b..0000000 --- a/src/openrouter/components/chatmessagecontentitemimage.py +++ /dev/null @@ -1,55 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel, UnrecognizedStr -from openrouter.utils import validate_open_enum -from pydantic.functional_validators import PlainValidator -from typing import Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypedDict - - -ChatMessageContentItemImageType = Literal["image_url",] - - -ChatMessageContentItemImageDetail = Union[ - Literal[ - "auto", - "low", - "high", - ], - UnrecognizedStr, -] -r"""Image detail level for vision models""" - - -class ChatMessageContentItemImageImageURLTypedDict(TypedDict): - url: str - r"""URL of the image (data: URLs supported)""" - detail: NotRequired[ChatMessageContentItemImageDetail] - r"""Image detail level for vision models""" - - -class ChatMessageContentItemImageImageURL(BaseModel): - url: str - r"""URL of the image (data: URLs supported)""" - - detail: Annotated[ - Optional[ChatMessageContentItemImageDetail], - PlainValidator(validate_open_enum(False)), - ] = None - r"""Image detail level for vision models""" - - -class ChatMessageContentItemImageTypedDict(TypedDict): - r"""Image content part for vision models""" - - type: ChatMessageContentItemImageType - image_url: ChatMessageContentItemImageImageURLTypedDict - - -class ChatMessageContentItemImage(BaseModel): - r"""Image content part for vision models""" - - type: ChatMessageContentItemImageType - - image_url: ChatMessageContentItemImageImageURL diff --git a/src/openrouter/components/chatmessagecontentitemtext.py b/src/openrouter/components/chatmessagecontentitemtext.py deleted file mode 100644 index 4586c8e..0000000 --- a/src/openrouter/components/chatmessagecontentitemtext.py +++ /dev/null @@ -1,33 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatmessagecontentitemcachecontrol import ( - ChatMessageContentItemCacheControl, - ChatMessageContentItemCacheControlTypedDict, -) -from openrouter.types import BaseModel -from typing import Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -ChatMessageContentItemTextType = Literal["text",] - - -class ChatMessageContentItemTextTypedDict(TypedDict): - r"""Text content part""" - - type: ChatMessageContentItemTextType - text: str - cache_control: NotRequired[ChatMessageContentItemCacheControlTypedDict] - r"""Cache control for the content part""" - - -class ChatMessageContentItemText(BaseModel): - r"""Text content part""" - - type: ChatMessageContentItemTextType - - text: str - - cache_control: Optional[ChatMessageContentItemCacheControl] = None - r"""Cache control for the content part""" diff --git a/src/openrouter/components/chatmessagecontentitemvideo.py b/src/openrouter/components/chatmessagecontentitemvideo.py deleted file mode 100644 index 2b2712e..0000000 --- a/src/openrouter/components/chatmessagecontentitemvideo.py +++ /dev/null @@ -1,27 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .videoinput import VideoInput, VideoInputTypedDict -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -ChatMessageContentItemVideoType = Literal["video_url",] - - -class ChatMessageContentItemVideoTypedDict(TypedDict): - r"""Video input content part""" - - type: ChatMessageContentItemVideoType - video_url: VideoInputTypedDict - r"""Video input object""" - - -class ChatMessageContentItemVideo(BaseModel): - r"""Video input content part""" - - type: ChatMessageContentItemVideoType - - video_url: VideoInput - r"""Video input object""" diff --git a/src/openrouter/components/chatmessagecontentitemvideolegacy.py b/src/openrouter/components/chatmessagecontentitemvideolegacy.py deleted file mode 100644 index dc2d250..0000000 --- a/src/openrouter/components/chatmessagecontentitemvideolegacy.py +++ /dev/null @@ -1,33 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .videoinput import VideoInput, VideoInputTypedDict -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict, deprecated - - -ChatMessageContentItemVideoLegacyType = Literal["input_video",] - - -@deprecated( - "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." -) -class ChatMessageContentItemVideoLegacyTypedDict(TypedDict): - r"""Video input content part (legacy format - deprecated)""" - - type: ChatMessageContentItemVideoLegacyType - video_url: VideoInputTypedDict - r"""Video input object""" - - -@deprecated( - "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." -) -class ChatMessageContentItemVideoLegacy(BaseModel): - r"""Video input content part (legacy format - deprecated)""" - - type: ChatMessageContentItemVideoLegacyType - - video_url: VideoInput - r"""Video input object""" diff --git a/src/openrouter/components/chatmessagetokenlogprob.py b/src/openrouter/components/chatmessagetokenlogprob.py deleted file mode 100644 index 34c12d5..0000000 --- a/src/openrouter/components/chatmessagetokenlogprob.py +++ /dev/null @@ -1,111 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL -import pydantic -from pydantic import model_serializer -from typing import List -from typing_extensions import Annotated, TypedDict - - -class ChatMessageTokenLogprobTopLogprobTypedDict(TypedDict): - token: str - logprob: float - bytes_: Nullable[List[float]] - - -class ChatMessageTokenLogprobTopLogprob(BaseModel): - token: str - - logprob: float - - bytes_: Annotated[Nullable[List[float]], pydantic.Field(alias="bytes")] - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["bytes"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -class ChatMessageTokenLogprobTypedDict(TypedDict): - r"""Token log probability information""" - - token: str - r"""The token""" - logprob: float - r"""Log probability of the token""" - bytes_: Nullable[List[float]] - r"""UTF-8 bytes of the token""" - top_logprobs: List[ChatMessageTokenLogprobTopLogprobTypedDict] - r"""Top alternative tokens with probabilities""" - - -class ChatMessageTokenLogprob(BaseModel): - r"""Token log probability information""" - - token: str - r"""The token""" - - logprob: float - r"""Log probability of the token""" - - bytes_: Annotated[Nullable[List[float]], pydantic.Field(alias="bytes")] - r"""UTF-8 bytes of the token""" - - top_logprobs: List[ChatMessageTokenLogprobTopLogprob] - r"""Top alternative tokens with probabilities""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["bytes"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/chatmessagetokenlogprobs.py b/src/openrouter/components/chatmessagetokenlogprobs.py deleted file mode 100644 index d73e5e1..0000000 --- a/src/openrouter/components/chatmessagetokenlogprobs.py +++ /dev/null @@ -1,66 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatmessagetokenlogprob import ( - ChatMessageTokenLogprob, - ChatMessageTokenLogprobTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import List -from typing_extensions import NotRequired, TypedDict - - -class ChatMessageTokenLogprobsTypedDict(TypedDict): - r"""Log probabilities for the completion""" - - content: Nullable[List[ChatMessageTokenLogprobTypedDict]] - r"""Log probabilities for content tokens""" - refusal: NotRequired[Nullable[List[ChatMessageTokenLogprobTypedDict]]] - r"""Log probabilities for refusal tokens""" - - -class ChatMessageTokenLogprobs(BaseModel): - r"""Log probabilities for the completion""" - - content: Nullable[List[ChatMessageTokenLogprob]] - r"""Log probabilities for content tokens""" - - refusal: OptionalNullable[List[ChatMessageTokenLogprob]] = UNSET - r"""Log probabilities for refusal tokens""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["refusal"] - nullable_fields = ["content", "refusal"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/chatmessagetoolcall.py b/src/openrouter/components/chatmessagetoolcall.py deleted file mode 100644 index dcf5c8f..0000000 --- a/src/openrouter/components/chatmessagetoolcall.py +++ /dev/null @@ -1,44 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -ChatMessageToolCallType = Literal["function",] - - -class ChatMessageToolCallFunctionTypedDict(TypedDict): - name: str - r"""Function name to call""" - arguments: str - r"""Function arguments as JSON string""" - - -class ChatMessageToolCallFunction(BaseModel): - name: str - r"""Function name to call""" - - arguments: str - r"""Function arguments as JSON string""" - - -class ChatMessageToolCallTypedDict(TypedDict): - r"""Tool call made by the assistant""" - - id: str - r"""Tool call identifier""" - type: ChatMessageToolCallType - function: ChatMessageToolCallFunctionTypedDict - - -class ChatMessageToolCall(BaseModel): - r"""Tool call made by the assistant""" - - id: str - r"""Tool call identifier""" - - type: ChatMessageToolCallType - - function: ChatMessageToolCallFunction diff --git a/src/openrouter/components/chatresponse.py b/src/openrouter/components/chatresponse.py deleted file mode 100644 index b9f1c19..0000000 --- a/src/openrouter/components/chatresponse.py +++ /dev/null @@ -1,87 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatgenerationtokenusage import ( - ChatGenerationTokenUsage, - ChatGenerationTokenUsageTypedDict, -) -from .chatresponsechoice import ChatResponseChoice, ChatResponseChoiceTypedDict -from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL -from pydantic import model_serializer -from typing import List, Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -ChatResponseObject = Literal["chat.completion",] - - -class ChatResponseTypedDict(TypedDict): - r"""Chat completion response""" - - id: str - r"""Unique completion identifier""" - choices: List[ChatResponseChoiceTypedDict] - r"""List of completion choices""" - created: float - r"""Unix timestamp of creation""" - model: str - r"""Model used for completion""" - object: ChatResponseObject - system_fingerprint: Nullable[str] - r"""System fingerprint""" - usage: NotRequired[ChatGenerationTokenUsageTypedDict] - r"""Token usage statistics""" - - -class ChatResponse(BaseModel): - r"""Chat completion response""" - - id: str - r"""Unique completion identifier""" - - choices: List[ChatResponseChoice] - r"""List of completion choices""" - - created: float - r"""Unix timestamp of creation""" - - model: str - r"""Model used for completion""" - - object: ChatResponseObject - - system_fingerprint: Nullable[str] - r"""System fingerprint""" - - usage: Optional[ChatGenerationTokenUsage] = None - r"""Token usage statistics""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["usage"] - nullable_fields = ["system_fingerprint"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/chatresponsechoice.py b/src/openrouter/components/chatresponsechoice.py deleted file mode 100644 index df2c37e..0000000 --- a/src/openrouter/components/chatresponsechoice.py +++ /dev/null @@ -1,75 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from .chatmessagetokenlogprobs import ( - ChatMessageTokenLogprobs, - ChatMessageTokenLogprobsTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Any -from typing_extensions import NotRequired, TypedDict - - -class ChatResponseChoiceTypedDict(TypedDict): - r"""Chat completion choice""" - - finish_reason: Nullable[Any] - index: float - r"""Choice index""" - message: AssistantMessageTypedDict - r"""Assistant message for requests and responses""" - logprobs: NotRequired[Nullable[ChatMessageTokenLogprobsTypedDict]] - r"""Log probabilities for the completion""" - - -class ChatResponseChoice(BaseModel): - r"""Chat completion choice""" - - finish_reason: Nullable[Any] - - index: float - r"""Choice index""" - - message: AssistantMessage - r"""Assistant message for requests and responses""" - - logprobs: OptionalNullable[ChatMessageTokenLogprobs] = UNSET - r"""Log probabilities for the completion""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["logprobs"] - nullable_fields = ["finish_reason", "logprobs"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/chatstreamingchoice.py b/src/openrouter/components/chatstreamingchoice.py deleted file mode 100644 index 4eb5dc6..0000000 --- a/src/openrouter/components/chatstreamingchoice.py +++ /dev/null @@ -1,78 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatmessagetokenlogprobs import ( - ChatMessageTokenLogprobs, - ChatMessageTokenLogprobsTypedDict, -) -from .chatstreamingmessagechunk import ( - ChatStreamingMessageChunk, - ChatStreamingMessageChunkTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Any -from typing_extensions import NotRequired, TypedDict - - -class ChatStreamingChoiceTypedDict(TypedDict): - r"""Streaming completion choice chunk""" - - delta: ChatStreamingMessageChunkTypedDict - r"""Delta changes in streaming response""" - finish_reason: Nullable[Any] - index: float - r"""Choice index""" - logprobs: NotRequired[Nullable[ChatMessageTokenLogprobsTypedDict]] - r"""Log probabilities for the completion""" - - -class ChatStreamingChoice(BaseModel): - r"""Streaming completion choice chunk""" - - delta: ChatStreamingMessageChunk - r"""Delta changes in streaming response""" - - finish_reason: Nullable[Any] - - index: float - r"""Choice index""" - - logprobs: OptionalNullable[ChatMessageTokenLogprobs] = UNSET - r"""Log probabilities for the completion""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["logprobs"] - nullable_fields = ["finish_reason", "logprobs"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/chatstreamingmessagechunk.py b/src/openrouter/components/chatstreamingmessagechunk.py deleted file mode 100644 index 016a6df..0000000 --- a/src/openrouter/components/chatstreamingmessagechunk.py +++ /dev/null @@ -1,106 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatcompletionaudiooutput import ( - ChatCompletionAudioOutput, - ChatCompletionAudioOutputTypedDict, -) -from .chatstreamingmessagetoolcall import ( - ChatStreamingMessageToolCall, - ChatStreamingMessageToolCallTypedDict, -) -from .reasoningdetailunion import ReasoningDetailUnion, ReasoningDetailUnionTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import List, Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -ChatStreamingMessageChunkRole = Literal["assistant",] -r"""The role of the message author""" - - -class ChatStreamingMessageChunkTypedDict(TypedDict): - r"""Delta changes in streaming response""" - - role: NotRequired[ChatStreamingMessageChunkRole] - r"""The role of the message author""" - content: NotRequired[Nullable[str]] - r"""Message content delta""" - reasoning: NotRequired[Nullable[str]] - r"""Reasoning content delta""" - refusal: NotRequired[Nullable[str]] - r"""Refusal message delta""" - tool_calls: NotRequired[List[ChatStreamingMessageToolCallTypedDict]] - r"""Tool calls delta""" - reasoning_details: NotRequired[List[ReasoningDetailUnionTypedDict]] - r"""Reasoning details for extended thinking models""" - audio: NotRequired[ChatCompletionAudioOutputTypedDict] - - -class ChatStreamingMessageChunk(BaseModel): - r"""Delta changes in streaming response""" - - role: Optional[ChatStreamingMessageChunkRole] = None - r"""The role of the message author""" - - content: OptionalNullable[str] = UNSET - r"""Message content delta""" - - reasoning: OptionalNullable[str] = UNSET - r"""Reasoning content delta""" - - refusal: OptionalNullable[str] = UNSET - r"""Refusal message delta""" - - tool_calls: Optional[List[ChatStreamingMessageToolCall]] = None - r"""Tool calls delta""" - - reasoning_details: Optional[List[ReasoningDetailUnion]] = None - r"""Reasoning details for extended thinking models""" - - audio: Optional[ChatCompletionAudioOutput] = None - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "role", - "content", - "reasoning", - "refusal", - "tool_calls", - "reasoning_details", - "audio", - ] - nullable_fields = ["content", "reasoning", "refusal"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/chatstreamingmessagetoolcall.py b/src/openrouter/components/chatstreamingmessagetoolcall.py deleted file mode 100644 index 9639eab..0000000 --- a/src/openrouter/components/chatstreamingmessagetoolcall.py +++ /dev/null @@ -1,58 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -ChatStreamingMessageToolCallType = Literal["function",] -r"""Tool call type""" - - -class ChatStreamingMessageToolCallFunctionTypedDict(TypedDict): - r"""Function call details""" - - name: NotRequired[str] - r"""Function name""" - arguments: NotRequired[str] - r"""Function arguments as JSON string""" - - -class ChatStreamingMessageToolCallFunction(BaseModel): - r"""Function call details""" - - name: Optional[str] = None - r"""Function name""" - - arguments: Optional[str] = None - r"""Function arguments as JSON string""" - - -class ChatStreamingMessageToolCallTypedDict(TypedDict): - r"""Tool call delta for streaming responses""" - - index: float - r"""Tool call index in the array""" - id: NotRequired[str] - r"""Tool call identifier""" - type: NotRequired[ChatStreamingMessageToolCallType] - r"""Tool call type""" - function: NotRequired[ChatStreamingMessageToolCallFunctionTypedDict] - r"""Function call details""" - - -class ChatStreamingMessageToolCall(BaseModel): - r"""Tool call delta for streaming responses""" - - index: float - r"""Tool call index in the array""" - - id: Optional[str] = None - r"""Tool call identifier""" - - type: Optional[ChatStreamingMessageToolCallType] = None - r"""Tool call type""" - - function: Optional[ChatStreamingMessageToolCallFunction] = None - r"""Function call details""" diff --git a/src/openrouter/components/chatstreamingresponsechunk.py b/src/openrouter/components/chatstreamingresponsechunk.py deleted file mode 100644 index 2d7c347..0000000 --- a/src/openrouter/components/chatstreamingresponsechunk.py +++ /dev/null @@ -1,80 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatgenerationtokenusage import ( - ChatGenerationTokenUsage, - ChatGenerationTokenUsageTypedDict, -) -from .chatstreamingchoice import ChatStreamingChoice, ChatStreamingChoiceTypedDict -from openrouter.types import BaseModel -from typing import List, Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -ChatStreamingResponseChunkObject = Literal["chat.completion.chunk",] - - -class ErrorTypedDict(TypedDict): - r"""Error information""" - - message: str - r"""Error message""" - code: float - r"""Error code""" - - -class Error(BaseModel): - r"""Error information""" - - message: str - r"""Error message""" - - code: float - r"""Error code""" - - -class ChatStreamingResponseChunkTypedDict(TypedDict): - r"""Streaming chat completion chunk""" - - id: str - r"""Unique chunk identifier""" - choices: List[ChatStreamingChoiceTypedDict] - r"""List of streaming chunk choices""" - created: float - r"""Unix timestamp of creation""" - model: str - r"""Model used for completion""" - object: ChatStreamingResponseChunkObject - system_fingerprint: NotRequired[str] - r"""System fingerprint""" - error: NotRequired[ErrorTypedDict] - r"""Error information""" - usage: NotRequired[ChatGenerationTokenUsageTypedDict] - r"""Token usage statistics""" - - -class ChatStreamingResponseChunk(BaseModel): - r"""Streaming chat completion chunk""" - - id: str - r"""Unique chunk identifier""" - - choices: List[ChatStreamingChoice] - r"""List of streaming chunk choices""" - - created: float - r"""Unix timestamp of creation""" - - model: str - r"""Model used for completion""" - - object: ChatStreamingResponseChunkObject - - system_fingerprint: Optional[str] = None - r"""System fingerprint""" - - error: Optional[Error] = None - r"""Error information""" - - usage: Optional[ChatGenerationTokenUsage] = None - r"""Token usage statistics""" diff --git a/src/openrouter/components/createchargerequest.py b/src/openrouter/components/createchargerequest.py deleted file mode 100644 index 7fab3ac..0000000 --- a/src/openrouter/components/createchargerequest.py +++ /dev/null @@ -1,36 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel, UnrecognizedInt -from openrouter.utils import validate_open_enum -from pydantic.functional_validators import PlainValidator -from typing import Literal, Union -from typing_extensions import Annotated, TypedDict - - -ChainID = Union[ - Literal[ - 1, - 137, - 8453, - ], - UnrecognizedInt, -] - - -class CreateChargeRequestTypedDict(TypedDict): - r"""Create a Coinbase charge for crypto payment""" - - amount: float - sender: str - chain_id: ChainID - - -class CreateChargeRequest(BaseModel): - r"""Create a Coinbase charge for crypto payment""" - - amount: float - - sender: str - - chain_id: Annotated[ChainID, PlainValidator(validate_open_enum(True))] diff --git a/src/openrouter/components/debugoptions.py b/src/openrouter/components/debugoptions.py deleted file mode 100644 index a2a990e..0000000 --- a/src/openrouter/components/debugoptions.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Optional -from typing_extensions import NotRequired, TypedDict - - -class DebugOptionsTypedDict(TypedDict): - r"""Debug options for inspecting request transformations (streaming only)""" - - echo_upstream_body: NotRequired[bool] - r"""If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode.""" - - -class DebugOptions(BaseModel): - r"""Debug options for inspecting request transformations (streaming only)""" - - echo_upstream_body: Optional[bool] = None - r"""If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode.""" diff --git a/src/openrouter/components/developermessage.py b/src/openrouter/components/developermessage.py deleted file mode 100644 index b179df4..0000000 --- a/src/openrouter/components/developermessage.py +++ /dev/null @@ -1,48 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatmessagecontentitemtext import ( - ChatMessageContentItemText, - ChatMessageContentItemTextTypedDict, -) -from openrouter.types import BaseModel -from typing import List, Literal, Optional, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict - - -DeveloperMessageRole = Literal["developer",] - - -DeveloperMessageContentTypedDict = TypeAliasType( - "DeveloperMessageContentTypedDict", - Union[str, List[ChatMessageContentItemTextTypedDict]], -) -r"""Developer message content""" - - -DeveloperMessageContent = TypeAliasType( - "DeveloperMessageContent", Union[str, List[ChatMessageContentItemText]] -) -r"""Developer message content""" - - -class DeveloperMessageTypedDict(TypedDict): - r"""Developer message""" - - role: DeveloperMessageRole - content: DeveloperMessageContentTypedDict - r"""Developer message content""" - name: NotRequired[str] - r"""Optional name for the developer message""" - - -class DeveloperMessage(BaseModel): - r"""Developer message""" - - role: DeveloperMessageRole - - content: DeveloperMessageContent - r"""Developer message content""" - - name: Optional[str] = None - r"""Optional name for the developer message""" diff --git a/src/openrouter/components/responseinputfile.py b/src/openrouter/components/goneresponseerrordata.py similarity index 62% rename from src/openrouter/components/responseinputfile.py rename to src/openrouter/components/goneresponseerrordata.py index 54d94bd..78177b8 100644 --- a/src/openrouter/components/responseinputfile.py +++ b/src/openrouter/components/goneresponseerrordata.py @@ -9,40 +9,31 @@ from openrouter.types import ( UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import Literal, Optional +from typing import Any, Dict from typing_extensions import NotRequired, TypedDict -ResponseInputFileType = Literal["input_file",] +class GoneResponseErrorDataTypedDict(TypedDict): + r"""Error data for GoneResponse""" + + code: int + message: str + metadata: NotRequired[Nullable[Dict[str, Nullable[Any]]]] -class ResponseInputFileTypedDict(TypedDict): - r"""File input content item""" +class GoneResponseErrorData(BaseModel): + r"""Error data for GoneResponse""" - type: ResponseInputFileType - file_id: NotRequired[Nullable[str]] - file_data: NotRequired[str] - filename: NotRequired[str] - file_url: NotRequired[str] + code: int + message: str -class ResponseInputFile(BaseModel): - r"""File input content item""" - - type: ResponseInputFileType - - file_id: OptionalNullable[str] = UNSET - - file_data: Optional[str] = None - - filename: Optional[str] = None - - file_url: Optional[str] = None + metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["file_id", "file_data", "filename", "file_url"] - nullable_fields = ["file_id"] + optional_fields = ["metadata"] + nullable_fields = ["metadata"] null_default_fields = [] serialized = handler(self) diff --git a/src/openrouter/components/jsonschemaconfig.py b/src/openrouter/components/jsonschemaconfig.py deleted file mode 100644 index a5daa6d..0000000 --- a/src/openrouter/components/jsonschemaconfig.py +++ /dev/null @@ -1,75 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -import pydantic -from pydantic import model_serializer -from typing import Any, Dict, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class JSONSchemaConfigTypedDict(TypedDict): - r"""JSON Schema configuration object""" - - name: str - r"""Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)""" - description: NotRequired[str] - r"""Schema description for the model""" - schema_: NotRequired[Dict[str, Nullable[Any]]] - r"""JSON Schema object""" - strict: NotRequired[Nullable[bool]] - r"""Enable strict schema adherence""" - - -class JSONSchemaConfig(BaseModel): - r"""JSON Schema configuration object""" - - name: str - r"""Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)""" - - description: Optional[str] = None - r"""Schema description for the model""" - - schema_: Annotated[ - Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="schema") - ] = None - r"""JSON Schema object""" - - strict: OptionalNullable[bool] = UNSET - r"""Enable strict schema adherence""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["description", "schema", "strict"] - nullable_fields = ["strict"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/message.py b/src/openrouter/components/message.py deleted file mode 100644 index 3aa2cf8..0000000 --- a/src/openrouter/components/message.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from .developermessage import DeveloperMessage, DeveloperMessageTypedDict -from .systemmessage import SystemMessage, SystemMessageTypedDict -from .toolresponsemessage import ToolResponseMessage, ToolResponseMessageTypedDict -from .usermessage import UserMessage, UserMessageTypedDict -from openrouter.utils import get_discriminator -from pydantic import Discriminator, Tag -from typing import Union -from typing_extensions import Annotated, TypeAliasType - - -MessageTypedDict = TypeAliasType( - "MessageTypedDict", - Union[ - SystemMessageTypedDict, - UserMessageTypedDict, - DeveloperMessageTypedDict, - ToolResponseMessageTypedDict, - AssistantMessageTypedDict, - ], -) -r"""Chat completion message with role-based discrimination""" - - -Message = Annotated[ - Union[ - Annotated[SystemMessage, Tag("system")], - Annotated[UserMessage, Tag("user")], - Annotated[DeveloperMessage, Tag("developer")], - Annotated[AssistantMessage, Tag("assistant")], - Annotated[ToolResponseMessage, Tag("tool")], - ], - Discriminator(lambda m: get_discriminator(m, "role", "role")), -] -r"""Chat completion message with role-based discrimination""" diff --git a/src/openrouter/components/namedtoolchoice.py b/src/openrouter/components/namedtoolchoice.py deleted file mode 100644 index fda1275..0000000 --- a/src/openrouter/components/namedtoolchoice.py +++ /dev/null @@ -1,34 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -NamedToolChoiceType = Literal["function",] - - -class NamedToolChoiceFunctionTypedDict(TypedDict): - name: str - r"""Function name to call""" - - -class NamedToolChoiceFunction(BaseModel): - name: str - r"""Function name to call""" - - -class NamedToolChoiceTypedDict(TypedDict): - r"""Named tool choice for specific function""" - - type: NamedToolChoiceType - function: NamedToolChoiceFunctionTypedDict - - -class NamedToolChoice(BaseModel): - r"""Named tool choice for specific function""" - - type: NamedToolChoiceType - - function: NamedToolChoiceFunction diff --git a/src/openrouter/components/openairesponsesincludable.py b/src/openrouter/components/openairesponsesincludable.py deleted file mode 100644 index 49903b8..0000000 --- a/src/openrouter/components/openairesponsesincludable.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import UnrecognizedStr -from typing import Literal, Union - - -OpenAIResponsesIncludable = Union[ - Literal[ - "file_search_call.results", - "message.input_image.image_url", - "computer_call_output.output.image_url", - "reasoning.encrypted_content", - "code_interpreter_call.outputs", - ], - UnrecognizedStr, -] diff --git a/src/openrouter/components/openairesponsesincompletedetails.py b/src/openrouter/components/openairesponsesincompletedetails.py deleted file mode 100644 index 3a87455..0000000 --- a/src/openrouter/components/openairesponsesincompletedetails.py +++ /dev/null @@ -1,27 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel, UnrecognizedStr -from openrouter.utils import validate_open_enum -from pydantic.functional_validators import PlainValidator -from typing import Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypedDict - - -Reason = Union[ - Literal[ - "max_output_tokens", - "content_filter", - ], - UnrecognizedStr, -] - - -class OpenAIResponsesIncompleteDetailsTypedDict(TypedDict): - reason: NotRequired[Reason] - - -class OpenAIResponsesIncompleteDetails(BaseModel): - reason: Annotated[Optional[Reason], PlainValidator(validate_open_enum(False))] = ( - None - ) diff --git a/src/openrouter/components/openairesponsesinput_union.py b/src/openrouter/components/openairesponsesinput_union.py deleted file mode 100644 index 0e0b1fa..0000000 --- a/src/openrouter/components/openairesponsesinput_union.py +++ /dev/null @@ -1,416 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .outputitemimagegenerationcall import ( - OutputItemImageGenerationCall, - OutputItemImageGenerationCallTypedDict, -) -from .outputmessage import OutputMessage, OutputMessageTypedDict -from .responseinputaudio import ResponseInputAudio, ResponseInputAudioTypedDict -from .responseinputfile import ResponseInputFile, ResponseInputFileTypedDict -from .responseinputimage import ResponseInputImage, ResponseInputImageTypedDict -from .responseinputtext import ResponseInputText, ResponseInputTextTypedDict -from .toolcallstatus import ToolCallStatus -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import get_discriminator, validate_open_enum -from pydantic import Discriminator, Tag, model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Any, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -OpenAIResponsesInputTypeFunctionCall = Literal["function_call",] - - -class OpenAIResponsesInputFunctionCallTypedDict(TypedDict): - type: OpenAIResponsesInputTypeFunctionCall - call_id: str - name: str - arguments: str - id: NotRequired[str] - status: NotRequired[Nullable[ToolCallStatus]] - - -class OpenAIResponsesInputFunctionCall(BaseModel): - type: OpenAIResponsesInputTypeFunctionCall - - call_id: str - - name: str - - arguments: str - - id: Optional[str] = None - - status: Annotated[ - OptionalNullable[ToolCallStatus], PlainValidator(validate_open_enum(False)) - ] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["id", "status"] - nullable_fields = ["status"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenAIResponsesInputTypeFunctionCallOutput = Literal["function_call_output",] - - -OpenAIResponsesInputOutput1TypedDict = TypeAliasType( - "OpenAIResponsesInputOutput1TypedDict", - Union[ - ResponseInputTextTypedDict, - ResponseInputImageTypedDict, - ResponseInputFileTypedDict, - ], -) - - -OpenAIResponsesInputOutput1 = Annotated[ - Union[ - Annotated[ResponseInputText, Tag("input_text")], - Annotated[ResponseInputImage, Tag("input_image")], - Annotated[ResponseInputFile, Tag("input_file")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -OpenAIResponsesInputOutput2TypedDict = TypeAliasType( - "OpenAIResponsesInputOutput2TypedDict", - Union[str, List[OpenAIResponsesInputOutput1TypedDict]], -) - - -OpenAIResponsesInputOutput2 = TypeAliasType( - "OpenAIResponsesInputOutput2", Union[str, List[OpenAIResponsesInputOutput1]] -) - - -class OpenAIResponsesInputFunctionCallOutputTypedDict(TypedDict): - type: OpenAIResponsesInputTypeFunctionCallOutput - call_id: str - output: OpenAIResponsesInputOutput2TypedDict - id: NotRequired[Nullable[str]] - status: NotRequired[Nullable[ToolCallStatus]] - - -class OpenAIResponsesInputFunctionCallOutput(BaseModel): - type: OpenAIResponsesInputTypeFunctionCallOutput - - call_id: str - - output: OpenAIResponsesInputOutput2 - - id: OptionalNullable[str] = UNSET - - status: Annotated[ - OptionalNullable[ToolCallStatus], PlainValidator(validate_open_enum(False)) - ] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["id", "status"] - nullable_fields = ["id", "status"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenAIResponsesInputTypeMessage2 = Literal["message",] - - -OpenAIResponsesInputRoleDeveloper2 = Literal["developer",] - - -OpenAIResponsesInputRoleSystem2 = Literal["system",] - - -OpenAIResponsesInputRoleUser2 = Literal["user",] - - -OpenAIResponsesInputRoleUnion2TypedDict = TypeAliasType( - "OpenAIResponsesInputRoleUnion2TypedDict", - Union[ - OpenAIResponsesInputRoleUser2, - OpenAIResponsesInputRoleSystem2, - OpenAIResponsesInputRoleDeveloper2, - ], -) - - -OpenAIResponsesInputRoleUnion2 = TypeAliasType( - "OpenAIResponsesInputRoleUnion2", - Union[ - OpenAIResponsesInputRoleUser2, - OpenAIResponsesInputRoleSystem2, - OpenAIResponsesInputRoleDeveloper2, - ], -) - - -OpenAIResponsesInputContent3TypedDict = TypeAliasType( - "OpenAIResponsesInputContent3TypedDict", - Union[ - ResponseInputTextTypedDict, - ResponseInputAudioTypedDict, - ResponseInputImageTypedDict, - ResponseInputFileTypedDict, - ], -) - - -OpenAIResponsesInputContent3 = Annotated[ - Union[ - Annotated[ResponseInputText, Tag("input_text")], - Annotated[ResponseInputImage, Tag("input_image")], - Annotated[ResponseInputFile, Tag("input_file")], - Annotated[ResponseInputAudio, Tag("input_audio")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -class OpenAIResponsesInputMessage2TypedDict(TypedDict): - id: str - role: OpenAIResponsesInputRoleUnion2TypedDict - content: List[OpenAIResponsesInputContent3TypedDict] - type: NotRequired[OpenAIResponsesInputTypeMessage2] - - -class OpenAIResponsesInputMessage2(BaseModel): - id: str - - role: OpenAIResponsesInputRoleUnion2 - - content: List[OpenAIResponsesInputContent3] - - type: Optional[OpenAIResponsesInputTypeMessage2] = None - - -OpenAIResponsesInputTypeMessage1 = Literal["message",] - - -OpenAIResponsesInputRoleDeveloper1 = Literal["developer",] - - -OpenAIResponsesInputRoleAssistant = Literal["assistant",] - - -OpenAIResponsesInputRoleSystem1 = Literal["system",] - - -OpenAIResponsesInputRoleUser1 = Literal["user",] - - -OpenAIResponsesInputRoleUnion1TypedDict = TypeAliasType( - "OpenAIResponsesInputRoleUnion1TypedDict", - Union[ - OpenAIResponsesInputRoleUser1, - OpenAIResponsesInputRoleSystem1, - OpenAIResponsesInputRoleAssistant, - OpenAIResponsesInputRoleDeveloper1, - ], -) - - -OpenAIResponsesInputRoleUnion1 = TypeAliasType( - "OpenAIResponsesInputRoleUnion1", - Union[ - OpenAIResponsesInputRoleUser1, - OpenAIResponsesInputRoleSystem1, - OpenAIResponsesInputRoleAssistant, - OpenAIResponsesInputRoleDeveloper1, - ], -) - - -OpenAIResponsesInputContent1TypedDict = TypeAliasType( - "OpenAIResponsesInputContent1TypedDict", - Union[ - ResponseInputTextTypedDict, - ResponseInputAudioTypedDict, - ResponseInputImageTypedDict, - ResponseInputFileTypedDict, - ], -) - - -OpenAIResponsesInputContent1 = Annotated[ - Union[ - Annotated[ResponseInputText, Tag("input_text")], - Annotated[ResponseInputImage, Tag("input_image")], - Annotated[ResponseInputFile, Tag("input_file")], - Annotated[ResponseInputAudio, Tag("input_audio")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -OpenAIResponsesInputContent2TypedDict = TypeAliasType( - "OpenAIResponsesInputContent2TypedDict", - Union[List[OpenAIResponsesInputContent1TypedDict], str], -) - - -OpenAIResponsesInputContent2 = TypeAliasType( - "OpenAIResponsesInputContent2", Union[List[OpenAIResponsesInputContent1], str] -) - - -OpenAIResponsesInputPhaseFinalAnswer = Literal["final_answer",] - - -OpenAIResponsesInputPhaseCommentary = Literal["commentary",] - - -OpenAIResponsesInputPhaseUnionTypedDict = TypeAliasType( - "OpenAIResponsesInputPhaseUnionTypedDict", - Union[ - OpenAIResponsesInputPhaseCommentary, OpenAIResponsesInputPhaseFinalAnswer, Any - ], -) - - -OpenAIResponsesInputPhaseUnion = TypeAliasType( - "OpenAIResponsesInputPhaseUnion", - Union[ - OpenAIResponsesInputPhaseCommentary, OpenAIResponsesInputPhaseFinalAnswer, Any - ], -) - - -class OpenAIResponsesInputMessage1TypedDict(TypedDict): - role: OpenAIResponsesInputRoleUnion1TypedDict - content: OpenAIResponsesInputContent2TypedDict - type: NotRequired[OpenAIResponsesInputTypeMessage1] - phase: NotRequired[Nullable[OpenAIResponsesInputPhaseUnionTypedDict]] - - -class OpenAIResponsesInputMessage1(BaseModel): - role: OpenAIResponsesInputRoleUnion1 - - content: OpenAIResponsesInputContent2 - - type: Optional[OpenAIResponsesInputTypeMessage1] = None - - phase: OptionalNullable[OpenAIResponsesInputPhaseUnion] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["type", "phase"] - nullable_fields = ["phase"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenAIResponsesInputUnion1TypedDict = TypeAliasType( - "OpenAIResponsesInputUnion1TypedDict", - Union[ - OpenAIResponsesInputMessage1TypedDict, - OpenAIResponsesInputMessage2TypedDict, - OutputItemImageGenerationCallTypedDict, - OpenAIResponsesInputFunctionCallOutputTypedDict, - OpenAIResponsesInputFunctionCallTypedDict, - OutputMessageTypedDict, - ], -) - - -OpenAIResponsesInputUnion1 = TypeAliasType( - "OpenAIResponsesInputUnion1", - Union[ - OpenAIResponsesInputMessage1, - OpenAIResponsesInputMessage2, - OutputItemImageGenerationCall, - OpenAIResponsesInputFunctionCallOutput, - OpenAIResponsesInputFunctionCall, - OutputMessage, - ], -) - - -OpenAIResponsesInputUnionTypedDict = TypeAliasType( - "OpenAIResponsesInputUnionTypedDict", - Union[str, List[OpenAIResponsesInputUnion1TypedDict], Any], -) - - -OpenAIResponsesInputUnion = TypeAliasType( - "OpenAIResponsesInputUnion", Union[str, List[OpenAIResponsesInputUnion1], Any] -) diff --git a/src/openrouter/components/openairesponsesprompt.py b/src/openrouter/components/openairesponsesprompt.py deleted file mode 100644 index f938d7a..0000000 --- a/src/openrouter/components/openairesponsesprompt.py +++ /dev/null @@ -1,73 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responseinputfile import ResponseInputFile, ResponseInputFileTypedDict -from .responseinputimage import ResponseInputImage, ResponseInputImageTypedDict -from .responseinputtext import ResponseInputText, ResponseInputTextTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Dict, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict - - -VariablesTypedDict = TypeAliasType( - "VariablesTypedDict", - Union[ - ResponseInputTextTypedDict, - ResponseInputImageTypedDict, - ResponseInputFileTypedDict, - str, - ], -) - - -Variables = TypeAliasType( - "Variables", Union[ResponseInputText, ResponseInputImage, ResponseInputFile, str] -) - - -class OpenAIResponsesPromptTypedDict(TypedDict): - id: str - variables: NotRequired[Nullable[Dict[str, VariablesTypedDict]]] - - -class OpenAIResponsesPrompt(BaseModel): - id: str - - variables: OptionalNullable[Dict[str, Variables]] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["variables"] - nullable_fields = ["variables"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openairesponsesreasoningconfig.py b/src/openrouter/components/openairesponsesreasoningconfig.py deleted file mode 100644 index 77f39da..0000000 --- a/src/openrouter/components/openairesponsesreasoningconfig.py +++ /dev/null @@ -1,63 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .openairesponsesreasoningeffort import OpenAIResponsesReasoningEffort -from .reasoningsummaryverbosity import ReasoningSummaryVerbosity -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing_extensions import Annotated, NotRequired, TypedDict - - -class OpenAIResponsesReasoningConfigTypedDict(TypedDict): - effort: NotRequired[Nullable[OpenAIResponsesReasoningEffort]] - summary: NotRequired[Nullable[ReasoningSummaryVerbosity]] - - -class OpenAIResponsesReasoningConfig(BaseModel): - effort: Annotated[ - OptionalNullable[OpenAIResponsesReasoningEffort], - PlainValidator(validate_open_enum(False)), - ] = UNSET - - summary: Annotated[ - OptionalNullable[ReasoningSummaryVerbosity], - PlainValidator(validate_open_enum(False)), - ] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["effort", "summary"] - nullable_fields = ["effort", "summary"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openairesponsesreasoningeffort.py b/src/openrouter/components/openairesponsesreasoningeffort.py deleted file mode 100644 index 5f1b145..0000000 --- a/src/openrouter/components/openairesponsesreasoningeffort.py +++ /dev/null @@ -1,18 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import UnrecognizedStr -from typing import Literal, Union - - -OpenAIResponsesReasoningEffort = Union[ - Literal[ - "xhigh", - "high", - "medium", - "low", - "minimal", - "none", - ], - UnrecognizedStr, -] diff --git a/src/openrouter/components/openairesponsesservicetier.py b/src/openrouter/components/openairesponsesservicetier.py deleted file mode 100644 index 8c682e8..0000000 --- a/src/openrouter/components/openairesponsesservicetier.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import UnrecognizedStr -from typing import Literal, Union - - -OpenAIResponsesServiceTier = Union[ - Literal[ - "auto", - "default", - "flex", - "priority", - "scale", - ], - UnrecognizedStr, -] diff --git a/src/openrouter/components/openresponsesapplypatchtool.py b/src/openrouter/components/openresponsesapplypatchtool.py deleted file mode 100644 index 583e811..0000000 --- a/src/openrouter/components/openresponsesapplypatchtool.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesApplyPatchToolType = Literal["apply_patch",] - - -class OpenResponsesApplyPatchToolTypedDict(TypedDict): - r"""Apply patch tool configuration""" - - type: OpenResponsesApplyPatchToolType - - -class OpenResponsesApplyPatchTool(BaseModel): - r"""Apply patch tool configuration""" - - type: OpenResponsesApplyPatchToolType diff --git a/src/openrouter/components/openresponsescodeinterpretertool.py b/src/openrouter/components/openresponsescodeinterpretertool.py deleted file mode 100644 index 9b2ae39..0000000 --- a/src/openrouter/components/openresponsescodeinterpretertool.py +++ /dev/null @@ -1,102 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -TypeCodeInterpreter = Literal["code_interpreter",] - - -ContainerType = Literal["auto",] - - -MemoryLimit = Union[ - Literal[ - "1g", - "4g", - "16g", - "64g", - ], - UnrecognizedStr, -] - - -class ContainerAutoTypedDict(TypedDict): - type: ContainerType - file_ids: NotRequired[List[str]] - memory_limit: NotRequired[Nullable[MemoryLimit]] - - -class ContainerAuto(BaseModel): - type: ContainerType - - file_ids: Optional[List[str]] = None - - memory_limit: Annotated[ - OptionalNullable[MemoryLimit], PlainValidator(validate_open_enum(False)) - ] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["file_ids", "memory_limit"] - nullable_fields = ["memory_limit"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -ContainerTypedDict = TypeAliasType( - "ContainerTypedDict", Union[ContainerAutoTypedDict, str] -) - - -Container = TypeAliasType("Container", Union[ContainerAuto, str]) - - -class OpenResponsesCodeInterpreterToolTypedDict(TypedDict): - r"""Code interpreter tool configuration""" - - type: TypeCodeInterpreter - container: ContainerTypedDict - - -class OpenResponsesCodeInterpreterTool(BaseModel): - r"""Code interpreter tool configuration""" - - type: TypeCodeInterpreter - - container: Container diff --git a/src/openrouter/components/openresponsescomputertool.py b/src/openrouter/components/openresponsescomputertool.py deleted file mode 100644 index 2d42678..0000000 --- a/src/openrouter/components/openresponsescomputertool.py +++ /dev/null @@ -1,44 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel, UnrecognizedStr -from openrouter.utils import validate_open_enum -from pydantic.functional_validators import PlainValidator -from typing import Literal, Union -from typing_extensions import Annotated, TypedDict - - -OpenResponsesComputerToolType = Literal["computer_use_preview",] - - -Environment = Union[ - Literal[ - "windows", - "mac", - "linux", - "ubuntu", - "browser", - ], - UnrecognizedStr, -] - - -class OpenResponsesComputerToolTypedDict(TypedDict): - r"""Computer use preview tool configuration""" - - type: OpenResponsesComputerToolType - display_height: float - display_width: float - environment: Environment - - -class OpenResponsesComputerTool(BaseModel): - r"""Computer use preview tool configuration""" - - type: OpenResponsesComputerToolType - - display_height: float - - display_width: float - - environment: Annotated[Environment, PlainValidator(validate_open_enum(False))] diff --git a/src/openrouter/components/openresponsescustomtool.py b/src/openrouter/components/openresponsescustomtool.py deleted file mode 100644 index 51a788d..0000000 --- a/src/openrouter/components/openresponsescustomtool.py +++ /dev/null @@ -1,82 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel, UnrecognizedStr -from openrouter.utils import get_discriminator, validate_open_enum -import pydantic -from pydantic import Discriminator, Tag -from pydantic.functional_validators import PlainValidator -from typing import Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -TypeCustom = Literal["custom",] - - -FormatTypeGrammar = Literal["grammar",] - - -Syntax = Union[ - Literal[ - "lark", - "regex", - ], - UnrecognizedStr, -] - - -class FormatGrammarTypedDict(TypedDict): - type: FormatTypeGrammar - definition: str - syntax: Syntax - - -class FormatGrammar(BaseModel): - type: FormatTypeGrammar - - definition: str - - syntax: Annotated[Syntax, PlainValidator(validate_open_enum(False))] - - -FormatTypeText = Literal["text",] - - -class FormatTextTypedDict(TypedDict): - type: FormatTypeText - - -class FormatText(BaseModel): - type: FormatTypeText - - -FormatTypedDict = TypeAliasType( - "FormatTypedDict", Union[FormatTextTypedDict, FormatGrammarTypedDict] -) - - -Format = Annotated[ - Union[Annotated[FormatText, Tag("text")], Annotated[FormatGrammar, Tag("grammar")]], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -class OpenResponsesCustomToolTypedDict(TypedDict): - r"""Custom tool configuration""" - - type: TypeCustom - name: str - description: NotRequired[str] - format_: NotRequired[FormatTypedDict] - - -class OpenResponsesCustomTool(BaseModel): - r"""Custom tool configuration""" - - type: TypeCustom - - name: str - - description: Optional[str] = None - - format_: Annotated[Optional[Format], pydantic.Field(alias="format")] = None diff --git a/src/openrouter/components/openresponseseasyinputmessage.py b/src/openrouter/components/openresponseseasyinputmessage.py deleted file mode 100644 index 67d2fbd..0000000 --- a/src/openrouter/components/openresponseseasyinputmessage.py +++ /dev/null @@ -1,233 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responseinputaudio import ResponseInputAudio, ResponseInputAudioTypedDict -from .responseinputfile import ResponseInputFile, ResponseInputFileTypedDict -from .responseinputtext import ResponseInputText, ResponseInputTextTypedDict -from .responseinputvideo import ResponseInputVideo, ResponseInputVideoTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import get_discriminator, validate_open_enum -from pydantic import Discriminator, Tag, model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Any, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -OpenResponsesEasyInputMessageTypeMessage = Literal["message",] - - -OpenResponsesEasyInputMessageRoleDeveloper = Literal["developer",] - - -OpenResponsesEasyInputMessageRoleAssistant = Literal["assistant",] - - -OpenResponsesEasyInputMessageRoleSystem = Literal["system",] - - -OpenResponsesEasyInputMessageRoleUser = Literal["user",] - - -OpenResponsesEasyInputMessageRoleUnionTypedDict = TypeAliasType( - "OpenResponsesEasyInputMessageRoleUnionTypedDict", - Union[ - OpenResponsesEasyInputMessageRoleUser, - OpenResponsesEasyInputMessageRoleSystem, - OpenResponsesEasyInputMessageRoleAssistant, - OpenResponsesEasyInputMessageRoleDeveloper, - ], -) - - -OpenResponsesEasyInputMessageRoleUnion = TypeAliasType( - "OpenResponsesEasyInputMessageRoleUnion", - Union[ - OpenResponsesEasyInputMessageRoleUser, - OpenResponsesEasyInputMessageRoleSystem, - OpenResponsesEasyInputMessageRoleAssistant, - OpenResponsesEasyInputMessageRoleDeveloper, - ], -) - - -OpenResponsesEasyInputMessageContentType = Literal["input_image",] - - -OpenResponsesEasyInputMessageDetail = Union[ - Literal[ - "auto", - "high", - "low", - ], - UnrecognizedStr, -] - - -class OpenResponsesEasyInputMessageContentInputImageTypedDict(TypedDict): - r"""Image input content item""" - - type: OpenResponsesEasyInputMessageContentType - detail: OpenResponsesEasyInputMessageDetail - image_url: NotRequired[Nullable[str]] - - -class OpenResponsesEasyInputMessageContentInputImage(BaseModel): - r"""Image input content item""" - - type: OpenResponsesEasyInputMessageContentType - - detail: Annotated[ - OpenResponsesEasyInputMessageDetail, PlainValidator(validate_open_enum(False)) - ] - - image_url: OptionalNullable[str] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["image_url"] - nullable_fields = ["image_url"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenResponsesEasyInputMessageContentUnion1TypedDict = TypeAliasType( - "OpenResponsesEasyInputMessageContentUnion1TypedDict", - Union[ - ResponseInputTextTypedDict, - ResponseInputAudioTypedDict, - ResponseInputVideoTypedDict, - OpenResponsesEasyInputMessageContentInputImageTypedDict, - ResponseInputFileTypedDict, - ], -) - - -OpenResponsesEasyInputMessageContentUnion1 = Annotated[ - Union[ - Annotated[ResponseInputText, Tag("input_text")], - Annotated[OpenResponsesEasyInputMessageContentInputImage, Tag("input_image")], - Annotated[ResponseInputFile, Tag("input_file")], - Annotated[ResponseInputAudio, Tag("input_audio")], - Annotated[ResponseInputVideo, Tag("input_video")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -OpenResponsesEasyInputMessageContentUnion2TypedDict = TypeAliasType( - "OpenResponsesEasyInputMessageContentUnion2TypedDict", - Union[List[OpenResponsesEasyInputMessageContentUnion1TypedDict], str, Any], -) - - -OpenResponsesEasyInputMessageContentUnion2 = TypeAliasType( - "OpenResponsesEasyInputMessageContentUnion2", - Union[List[OpenResponsesEasyInputMessageContentUnion1], str, Any], -) - - -OpenResponsesEasyInputMessagePhaseFinalAnswer = Literal["final_answer",] - - -OpenResponsesEasyInputMessagePhaseCommentary = Literal["commentary",] - - -OpenResponsesEasyInputMessagePhaseUnionTypedDict = TypeAliasType( - "OpenResponsesEasyInputMessagePhaseUnionTypedDict", - Union[ - OpenResponsesEasyInputMessagePhaseCommentary, - OpenResponsesEasyInputMessagePhaseFinalAnswer, - Any, - ], -) -r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - -OpenResponsesEasyInputMessagePhaseUnion = TypeAliasType( - "OpenResponsesEasyInputMessagePhaseUnion", - Union[ - OpenResponsesEasyInputMessagePhaseCommentary, - OpenResponsesEasyInputMessagePhaseFinalAnswer, - Any, - ], -) -r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - -class OpenResponsesEasyInputMessageTypedDict(TypedDict): - role: OpenResponsesEasyInputMessageRoleUnionTypedDict - type: NotRequired[OpenResponsesEasyInputMessageTypeMessage] - content: NotRequired[Nullable[OpenResponsesEasyInputMessageContentUnion2TypedDict]] - phase: NotRequired[Nullable[OpenResponsesEasyInputMessagePhaseUnionTypedDict]] - r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - -class OpenResponsesEasyInputMessage(BaseModel): - role: OpenResponsesEasyInputMessageRoleUnion - - type: Optional[OpenResponsesEasyInputMessageTypeMessage] = None - - content: OptionalNullable[OpenResponsesEasyInputMessageContentUnion2] = UNSET - - phase: OptionalNullable[OpenResponsesEasyInputMessagePhaseUnion] = UNSET - r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["type", "content", "phase"] - nullable_fields = ["content", "phase"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponseserrorevent.py b/src/openrouter/components/openresponseserrorevent.py deleted file mode 100644 index f392bb7..0000000 --- a/src/openrouter/components/openresponseserrorevent.py +++ /dev/null @@ -1,64 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL -from pydantic import model_serializer -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesErrorEventType = Literal["error",] - - -class OpenResponsesErrorEventTypedDict(TypedDict): - r"""Event emitted when an error occurs during streaming""" - - type: OpenResponsesErrorEventType - code: Nullable[str] - message: str - param: Nullable[str] - sequence_number: float - - -class OpenResponsesErrorEvent(BaseModel): - r"""Event emitted when an error occurs during streaming""" - - type: OpenResponsesErrorEventType - - code: Nullable[str] - - message: str - - param: Nullable[str] - - sequence_number: float - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["code", "param"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesfilesearchtool.py b/src/openrouter/components/openresponsesfilesearchtool.py deleted file mode 100644 index 1da6491..0000000 --- a/src/openrouter/components/openresponsesfilesearchtool.py +++ /dev/null @@ -1,148 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .compoundfilter import CompoundFilter, CompoundFilterTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Any, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -TypeFileSearch = Literal["file_search",] - - -FiltersType = Union[ - Literal[ - "eq", - "ne", - "gt", - "gte", - "lt", - "lte", - ], - UnrecognizedStr, -] - - -Value1TypedDict = TypeAliasType("Value1TypedDict", Union[str, float]) - - -Value1 = TypeAliasType("Value1", Union[str, float]) - - -Value2TypedDict = TypeAliasType( - "Value2TypedDict", Union[str, float, bool, List[Value1TypedDict]] -) - - -Value2 = TypeAliasType("Value2", Union[str, float, bool, List[Value1]]) - - -class OpenResponsesFileSearchToolFiltersTypedDict(TypedDict): - key: str - type: FiltersType - value: Value2TypedDict - - -class OpenResponsesFileSearchToolFilters(BaseModel): - key: str - - type: Annotated[FiltersType, PlainValidator(validate_open_enum(False))] - - value: Value2 - - -FiltersTypedDict = TypeAliasType( - "FiltersTypedDict", - Union[CompoundFilterTypedDict, OpenResponsesFileSearchToolFiltersTypedDict, Any], -) - - -Filters = TypeAliasType( - "Filters", Union[CompoundFilter, OpenResponsesFileSearchToolFilters, Any] -) - - -Ranker = Union[ - Literal[ - "auto", - "default-2024-11-15", - ], - UnrecognizedStr, -] - - -class RankingOptionsTypedDict(TypedDict): - ranker: NotRequired[Ranker] - score_threshold: NotRequired[float] - - -class RankingOptions(BaseModel): - ranker: Annotated[Optional[Ranker], PlainValidator(validate_open_enum(False))] = ( - None - ) - - score_threshold: Optional[float] = None - - -class OpenResponsesFileSearchToolTypedDict(TypedDict): - r"""File search tool configuration""" - - type: TypeFileSearch - vector_store_ids: List[str] - filters: NotRequired[Nullable[FiltersTypedDict]] - max_num_results: NotRequired[int] - ranking_options: NotRequired[RankingOptionsTypedDict] - - -class OpenResponsesFileSearchTool(BaseModel): - r"""File search tool configuration""" - - type: TypeFileSearch - - vector_store_ids: List[str] - - filters: OptionalNullable[Filters] = UNSET - - max_num_results: Optional[int] = None - - ranking_options: Optional[RankingOptions] = None - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["filters", "max_num_results", "ranking_options"] - nullable_fields = ["filters"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesfunctioncalloutput.py b/src/openrouter/components/openresponsesfunctioncalloutput.py deleted file mode 100644 index 4d010c4..0000000 --- a/src/openrouter/components/openresponsesfunctioncalloutput.py +++ /dev/null @@ -1,173 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responseinputfile import ResponseInputFile, ResponseInputFileTypedDict -from .responseinputtext import ResponseInputText, ResponseInputTextTypedDict -from .toolcallstatus import ToolCallStatus -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import get_discriminator, validate_open_enum -from pydantic import Discriminator, Tag, model_serializer -from pydantic.functional_validators import PlainValidator -from typing import List, Literal, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -OpenResponsesFunctionCallOutputTypeFunctionCallOutput = Literal["function_call_output",] - - -OutputType = Literal["input_image",] - - -OpenResponsesFunctionCallOutputDetail = Union[ - Literal[ - "auto", - "high", - "low", - ], - UnrecognizedStr, -] - - -class OutputInputImageTypedDict(TypedDict): - r"""Image input content item""" - - type: OutputType - detail: OpenResponsesFunctionCallOutputDetail - image_url: NotRequired[Nullable[str]] - - -class OutputInputImage(BaseModel): - r"""Image input content item""" - - type: OutputType - - detail: Annotated[ - OpenResponsesFunctionCallOutputDetail, PlainValidator(validate_open_enum(False)) - ] - - image_url: OptionalNullable[str] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["image_url"] - nullable_fields = ["image_url"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenResponsesFunctionCallOutputOutputUnion1TypedDict = TypeAliasType( - "OpenResponsesFunctionCallOutputOutputUnion1TypedDict", - Union[ - ResponseInputTextTypedDict, - OutputInputImageTypedDict, - ResponseInputFileTypedDict, - ], -) - - -OpenResponsesFunctionCallOutputOutputUnion1 = Annotated[ - Union[ - Annotated[ResponseInputText, Tag("input_text")], - Annotated[OutputInputImage, Tag("input_image")], - Annotated[ResponseInputFile, Tag("input_file")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -OpenResponsesFunctionCallOutputOutputUnion2TypedDict = TypeAliasType( - "OpenResponsesFunctionCallOutputOutputUnion2TypedDict", - Union[str, List[OpenResponsesFunctionCallOutputOutputUnion1TypedDict]], -) - - -OpenResponsesFunctionCallOutputOutputUnion2 = TypeAliasType( - "OpenResponsesFunctionCallOutputOutputUnion2", - Union[str, List[OpenResponsesFunctionCallOutputOutputUnion1]], -) - - -class OpenResponsesFunctionCallOutputTypedDict(TypedDict): - r"""The output from a function call execution""" - - type: OpenResponsesFunctionCallOutputTypeFunctionCallOutput - call_id: str - output: OpenResponsesFunctionCallOutputOutputUnion2TypedDict - id: NotRequired[Nullable[str]] - status: NotRequired[Nullable[ToolCallStatus]] - - -class OpenResponsesFunctionCallOutput(BaseModel): - r"""The output from a function call execution""" - - type: OpenResponsesFunctionCallOutputTypeFunctionCallOutput - - call_id: str - - output: OpenResponsesFunctionCallOutputOutputUnion2 - - id: OptionalNullable[str] = UNSET - - status: Annotated[ - OptionalNullable[ToolCallStatus], PlainValidator(validate_open_enum(False)) - ] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["id", "status"] - nullable_fields = ["id", "status"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesfunctionshelltool.py b/src/openrouter/components/openresponsesfunctionshelltool.py deleted file mode 100644 index 518e551..0000000 --- a/src/openrouter/components/openresponsesfunctionshelltool.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesFunctionShellToolType = Literal["shell",] - - -class OpenResponsesFunctionShellToolTypedDict(TypedDict): - r"""Shell tool configuration""" - - type: OpenResponsesFunctionShellToolType - - -class OpenResponsesFunctionShellTool(BaseModel): - r"""Shell tool configuration""" - - type: OpenResponsesFunctionShellToolType diff --git a/src/openrouter/components/openresponsesfunctiontoolcall.py b/src/openrouter/components/openresponsesfunctiontoolcall.py deleted file mode 100644 index f61957c..0000000 --- a/src/openrouter/components/openresponsesfunctiontoolcall.py +++ /dev/null @@ -1,78 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .toolcallstatus import ToolCallStatus -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Literal -from typing_extensions import Annotated, NotRequired, TypedDict - - -OpenResponsesFunctionToolCallType = Literal["function_call",] - - -class OpenResponsesFunctionToolCallTypedDict(TypedDict): - r"""A function call initiated by the model""" - - type: OpenResponsesFunctionToolCallType - call_id: str - name: str - arguments: str - id: str - status: NotRequired[Nullable[ToolCallStatus]] - - -class OpenResponsesFunctionToolCall(BaseModel): - r"""A function call initiated by the model""" - - type: OpenResponsesFunctionToolCallType - - call_id: str - - name: str - - arguments: str - - id: str - - status: Annotated[ - OptionalNullable[ToolCallStatus], PlainValidator(validate_open_enum(False)) - ] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["status"] - nullable_fields = ["status"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesimagegencallcompleted.py b/src/openrouter/components/openresponsesimagegencallcompleted.py deleted file mode 100644 index bff9ec1..0000000 --- a/src/openrouter/components/openresponsesimagegencallcompleted.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesImageGenCallCompletedType = Literal[ - "response.image_generation_call.completed", -] - - -class OpenResponsesImageGenCallCompletedTypedDict(TypedDict): - r"""Image generation call completed""" - - type: OpenResponsesImageGenCallCompletedType - item_id: str - output_index: float - sequence_number: float - - -class OpenResponsesImageGenCallCompleted(BaseModel): - r"""Image generation call completed""" - - type: OpenResponsesImageGenCallCompletedType - - item_id: str - - output_index: float - - sequence_number: float diff --git a/src/openrouter/components/openresponsesimagegencallgenerating.py b/src/openrouter/components/openresponsesimagegencallgenerating.py deleted file mode 100644 index 86b5791..0000000 --- a/src/openrouter/components/openresponsesimagegencallgenerating.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesImageGenCallGeneratingType = Literal[ - "response.image_generation_call.generating", -] - - -class OpenResponsesImageGenCallGeneratingTypedDict(TypedDict): - r"""Image generation call is generating""" - - type: OpenResponsesImageGenCallGeneratingType - item_id: str - output_index: float - sequence_number: float - - -class OpenResponsesImageGenCallGenerating(BaseModel): - r"""Image generation call is generating""" - - type: OpenResponsesImageGenCallGeneratingType - - item_id: str - - output_index: float - - sequence_number: float diff --git a/src/openrouter/components/openresponsesimagegencallinprogress.py b/src/openrouter/components/openresponsesimagegencallinprogress.py deleted file mode 100644 index 08e78ac..0000000 --- a/src/openrouter/components/openresponsesimagegencallinprogress.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesImageGenCallInProgressType = Literal[ - "response.image_generation_call.in_progress", -] - - -class OpenResponsesImageGenCallInProgressTypedDict(TypedDict): - r"""Image generation call in progress""" - - type: OpenResponsesImageGenCallInProgressType - item_id: str - output_index: float - sequence_number: float - - -class OpenResponsesImageGenCallInProgress(BaseModel): - r"""Image generation call in progress""" - - type: OpenResponsesImageGenCallInProgressType - - item_id: str - - output_index: float - - sequence_number: float diff --git a/src/openrouter/components/openresponsesimagegencallpartialimage.py b/src/openrouter/components/openresponsesimagegencallpartialimage.py deleted file mode 100644 index 712ecac..0000000 --- a/src/openrouter/components/openresponsesimagegencallpartialimage.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesImageGenCallPartialImageType = Literal[ - "response.image_generation_call.partial_image", -] - - -class OpenResponsesImageGenCallPartialImageTypedDict(TypedDict): - r"""Image generation call with partial image""" - - type: OpenResponsesImageGenCallPartialImageType - item_id: str - output_index: float - sequence_number: float - partial_image_b64: str - partial_image_index: float - - -class OpenResponsesImageGenCallPartialImage(BaseModel): - r"""Image generation call with partial image""" - - type: OpenResponsesImageGenCallPartialImageType - - item_id: str - - output_index: float - - sequence_number: float - - partial_image_b64: str - - partial_image_index: float diff --git a/src/openrouter/components/openresponsesimagegenerationtool.py b/src/openrouter/components/openresponsesimagegenerationtool.py deleted file mode 100644 index f2e695c..0000000 --- a/src/openrouter/components/openresponsesimagegenerationtool.py +++ /dev/null @@ -1,194 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypedDict - - -OpenResponsesImageGenerationToolType = Literal["image_generation",] - - -Background = Union[ - Literal[ - "transparent", - "opaque", - "auto", - ], - UnrecognizedStr, -] - - -InputFidelity = Union[ - Literal[ - "high", - "low", - ], - UnrecognizedStr, -] - - -class InputImageMaskTypedDict(TypedDict): - image_url: NotRequired[str] - file_id: NotRequired[str] - - -class InputImageMask(BaseModel): - image_url: Optional[str] = None - - file_id: Optional[str] = None - - -ModelEnum = Union[ - Literal[ - "gpt-image-1", - "gpt-image-1-mini", - ], - UnrecognizedStr, -] - - -Moderation = Union[ - Literal[ - "auto", - "low", - ], - UnrecognizedStr, -] - - -OutputFormat = Union[ - Literal[ - "png", - "webp", - "jpeg", - ], - UnrecognizedStr, -] - - -Quality = Union[ - Literal[ - "low", - "medium", - "high", - "auto", - ], - UnrecognizedStr, -] - - -Size = Union[ - Literal[ - "1024x1024", - "1024x1536", - "1536x1024", - "auto", - ], - UnrecognizedStr, -] - - -class OpenResponsesImageGenerationToolTypedDict(TypedDict): - r"""Image generation tool configuration""" - - type: OpenResponsesImageGenerationToolType - background: NotRequired[Background] - input_fidelity: NotRequired[Nullable[InputFidelity]] - input_image_mask: NotRequired[InputImageMaskTypedDict] - model: NotRequired[ModelEnum] - moderation: NotRequired[Moderation] - output_compression: NotRequired[float] - output_format: NotRequired[OutputFormat] - partial_images: NotRequired[float] - quality: NotRequired[Quality] - size: NotRequired[Size] - - -class OpenResponsesImageGenerationTool(BaseModel): - r"""Image generation tool configuration""" - - type: OpenResponsesImageGenerationToolType - - background: Annotated[ - Optional[Background], PlainValidator(validate_open_enum(False)) - ] = None - - input_fidelity: Annotated[ - OptionalNullable[InputFidelity], PlainValidator(validate_open_enum(False)) - ] = UNSET - - input_image_mask: Optional[InputImageMask] = None - - model: Annotated[Optional[ModelEnum], PlainValidator(validate_open_enum(False))] = ( - None - ) - - moderation: Annotated[ - Optional[Moderation], PlainValidator(validate_open_enum(False)) - ] = None - - output_compression: Optional[float] = None - - output_format: Annotated[ - Optional[OutputFormat], PlainValidator(validate_open_enum(False)) - ] = None - - partial_images: Optional[float] = None - - quality: Annotated[Optional[Quality], PlainValidator(validate_open_enum(False))] = ( - None - ) - - size: Annotated[Optional[Size], PlainValidator(validate_open_enum(False))] = None - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "background", - "input_fidelity", - "input_image_mask", - "model", - "moderation", - "output_compression", - "output_format", - "partial_images", - "quality", - "size", - ] - nullable_fields = ["input_fidelity"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesinput.py b/src/openrouter/components/openresponsesinput.py deleted file mode 100644 index e40fe56..0000000 --- a/src/openrouter/components/openresponsesinput.py +++ /dev/null @@ -1,97 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .openresponseseasyinputmessage import ( - OpenResponsesEasyInputMessage, - OpenResponsesEasyInputMessageTypedDict, -) -from .openresponsesfunctioncalloutput import ( - OpenResponsesFunctionCallOutput, - OpenResponsesFunctionCallOutputTypedDict, -) -from .openresponsesfunctiontoolcall import ( - OpenResponsesFunctionToolCall, - OpenResponsesFunctionToolCallTypedDict, -) -from .openresponsesinputmessageitem import ( - OpenResponsesInputMessageItem, - OpenResponsesInputMessageItemTypedDict, -) -from .openresponsesreasoning import ( - OpenResponsesReasoning, - OpenResponsesReasoningTypedDict, -) -from .responsesimagegenerationcall import ( - ResponsesImageGenerationCall, - ResponsesImageGenerationCallTypedDict, -) -from .responsesoutputitemfilesearchcall import ( - ResponsesOutputItemFileSearchCall, - ResponsesOutputItemFileSearchCallTypedDict, -) -from .responsesoutputitemfunctioncall import ( - ResponsesOutputItemFunctionCall, - ResponsesOutputItemFunctionCallTypedDict, -) -from .responsesoutputitemreasoning import ( - ResponsesOutputItemReasoning, - ResponsesOutputItemReasoningTypedDict, -) -from .responsesoutputmessage import ( - ResponsesOutputMessage, - ResponsesOutputMessageTypedDict, -) -from .responseswebsearchcalloutput import ( - ResponsesWebSearchCallOutput, - ResponsesWebSearchCallOutputTypedDict, -) -from typing import List, Union -from typing_extensions import TypeAliasType - - -OpenResponsesInput1TypedDict = TypeAliasType( - "OpenResponsesInput1TypedDict", - Union[ - OpenResponsesEasyInputMessageTypedDict, - ResponsesWebSearchCallOutputTypedDict, - OpenResponsesInputMessageItemTypedDict, - ResponsesOutputItemFileSearchCallTypedDict, - ResponsesImageGenerationCallTypedDict, - OpenResponsesFunctionCallOutputTypedDict, - ResponsesOutputMessageTypedDict, - OpenResponsesFunctionToolCallTypedDict, - ResponsesOutputItemFunctionCallTypedDict, - OpenResponsesReasoningTypedDict, - ResponsesOutputItemReasoningTypedDict, - ], -) - - -OpenResponsesInput1 = TypeAliasType( - "OpenResponsesInput1", - Union[ - OpenResponsesEasyInputMessage, - ResponsesWebSearchCallOutput, - OpenResponsesInputMessageItem, - ResponsesOutputItemFileSearchCall, - ResponsesImageGenerationCall, - OpenResponsesFunctionCallOutput, - ResponsesOutputMessage, - OpenResponsesFunctionToolCall, - ResponsesOutputItemFunctionCall, - OpenResponsesReasoning, - ResponsesOutputItemReasoning, - ], -) - - -OpenResponsesInputTypedDict = TypeAliasType( - "OpenResponsesInputTypedDict", Union[str, List[OpenResponsesInput1TypedDict]] -) -r"""Input for a response request - can be a string or array of items""" - - -OpenResponsesInput = TypeAliasType( - "OpenResponsesInput", Union[str, List[OpenResponsesInput1]] -) -r"""Input for a response request - can be a string or array of items""" diff --git a/src/openrouter/components/openresponsesinput_union.py b/src/openrouter/components/openresponsesinput_union.py deleted file mode 100644 index 7c90c1e..0000000 --- a/src/openrouter/components/openresponsesinput_union.py +++ /dev/null @@ -1,380 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .openairesponsesrefusalcontent import ( - OpenAIResponsesRefusalContent, - OpenAIResponsesRefusalContentTypedDict, -) -from .openresponseseasyinputmessage import ( - OpenResponsesEasyInputMessage, - OpenResponsesEasyInputMessageTypedDict, -) -from .openresponsesfunctioncalloutput import ( - OpenResponsesFunctionCallOutput, - OpenResponsesFunctionCallOutputTypedDict, -) -from .openresponsesfunctiontoolcall import ( - OpenResponsesFunctionToolCall, - OpenResponsesFunctionToolCallTypedDict, -) -from .openresponsesinputmessageitem import ( - OpenResponsesInputMessageItem, - OpenResponsesInputMessageItemTypedDict, -) -from .openresponsesreasoning import ( - OpenResponsesReasoning, - OpenResponsesReasoningTypedDict, -) -from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict -from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict -from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict -from .responsesimagegenerationcall import ( - ResponsesImageGenerationCall, - ResponsesImageGenerationCallTypedDict, -) -from .responsesoutputitemfilesearchcall import ( - ResponsesOutputItemFileSearchCall, - ResponsesOutputItemFileSearchCallTypedDict, -) -from .responsesoutputitemfunctioncall import ( - ResponsesOutputItemFunctionCall, - ResponsesOutputItemFunctionCallTypedDict, -) -from .responseswebsearchcalloutput import ( - ResponsesWebSearchCallOutput, - ResponsesWebSearchCallOutputTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import get_discriminator, validate_open_enum -import pydantic -from pydantic import Discriminator, Tag, model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Any, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -OpenResponsesInputTypeReasoning = Literal["reasoning",] - - -OpenResponsesInputStatusInProgress2 = Literal["in_progress",] - - -OpenResponsesInputStatusIncomplete2 = Literal["incomplete",] - - -OpenResponsesInputStatusCompleted2 = Literal["completed",] - - -OpenResponsesInputStatusUnion2TypedDict = TypeAliasType( - "OpenResponsesInputStatusUnion2TypedDict", - Union[ - OpenResponsesInputStatusCompleted2, - OpenResponsesInputStatusIncomplete2, - OpenResponsesInputStatusInProgress2, - ], -) - - -OpenResponsesInputStatusUnion2 = TypeAliasType( - "OpenResponsesInputStatusUnion2", - Union[ - OpenResponsesInputStatusCompleted2, - OpenResponsesInputStatusIncomplete2, - OpenResponsesInputStatusInProgress2, - ], -) - - -OpenResponsesInputFormat = Union[ - Literal[ - "unknown", - "openai-responses-v1", - "azure-openai-responses-v1", - "xai-responses-v1", - "anthropic-claude-v1", - "google-gemini-v1", - ], - UnrecognizedStr, -] -r"""The format of the reasoning content""" - - -class OpenResponsesInputReasoningTypedDict(TypedDict): - r"""An output item containing reasoning""" - - type: OpenResponsesInputTypeReasoning - id: str - summary: Nullable[List[ReasoningSummaryTextTypedDict]] - content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]] - encrypted_content: NotRequired[Nullable[str]] - status: NotRequired[OpenResponsesInputStatusUnion2TypedDict] - signature: NotRequired[Nullable[str]] - r"""A signature for the reasoning content, used for verification""" - format_: NotRequired[Nullable[OpenResponsesInputFormat]] - r"""The format of the reasoning content""" - - -class OpenResponsesInputReasoning(BaseModel): - r"""An output item containing reasoning""" - - type: OpenResponsesInputTypeReasoning - - id: str - - summary: Nullable[List[ReasoningSummaryText]] - - content: OptionalNullable[List[ReasoningTextContent]] = UNSET - - encrypted_content: OptionalNullable[str] = UNSET - - status: Optional[OpenResponsesInputStatusUnion2] = None - - signature: OptionalNullable[str] = UNSET - r"""A signature for the reasoning content, used for verification""" - - format_: Annotated[ - Annotated[ - OptionalNullable[OpenResponsesInputFormat], - PlainValidator(validate_open_enum(False)), - ], - pydantic.Field(alias="format"), - ] = UNSET - r"""The format of the reasoning content""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "content", - "encrypted_content", - "status", - "signature", - "format", - ] - nullable_fields = [ - "content", - "summary", - "encrypted_content", - "signature", - "format", - ] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenResponsesInputRole = Literal["assistant",] - - -OpenResponsesInputTypeMessage = Literal["message",] - - -OpenResponsesInputStatusInProgress1 = Literal["in_progress",] - - -OpenResponsesInputStatusIncomplete1 = Literal["incomplete",] - - -OpenResponsesInputStatusCompleted1 = Literal["completed",] - - -OpenResponsesInputStatusUnion1TypedDict = TypeAliasType( - "OpenResponsesInputStatusUnion1TypedDict", - Union[ - OpenResponsesInputStatusCompleted1, - OpenResponsesInputStatusIncomplete1, - OpenResponsesInputStatusInProgress1, - ], -) - - -OpenResponsesInputStatusUnion1 = TypeAliasType( - "OpenResponsesInputStatusUnion1", - Union[ - OpenResponsesInputStatusCompleted1, - OpenResponsesInputStatusIncomplete1, - OpenResponsesInputStatusInProgress1, - ], -) - - -OpenResponsesInputContent1TypedDict = TypeAliasType( - "OpenResponsesInputContent1TypedDict", - Union[OpenAIResponsesRefusalContentTypedDict, ResponseOutputTextTypedDict], -) - - -OpenResponsesInputContent1 = Annotated[ - Union[ - Annotated[ResponseOutputText, Tag("output_text")], - Annotated[OpenAIResponsesRefusalContent, Tag("refusal")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -OpenResponsesInputContent2TypedDict = TypeAliasType( - "OpenResponsesInputContent2TypedDict", - Union[List[OpenResponsesInputContent1TypedDict], str, Any], -) - - -OpenResponsesInputContent2 = TypeAliasType( - "OpenResponsesInputContent2", Union[List[OpenResponsesInputContent1], str, Any] -) - - -OpenResponsesInputPhaseFinalAnswer = Literal["final_answer",] - - -OpenResponsesInputPhaseCommentary = Literal["commentary",] - - -OpenResponsesInputPhaseUnionTypedDict = TypeAliasType( - "OpenResponsesInputPhaseUnionTypedDict", - Union[OpenResponsesInputPhaseCommentary, OpenResponsesInputPhaseFinalAnswer, Any], -) -r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - -OpenResponsesInputPhaseUnion = TypeAliasType( - "OpenResponsesInputPhaseUnion", - Union[OpenResponsesInputPhaseCommentary, OpenResponsesInputPhaseFinalAnswer, Any], -) -r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - -class OpenResponsesInputMessageTypedDict(TypedDict): - r"""An output message item""" - - id: str - role: OpenResponsesInputRole - type: OpenResponsesInputTypeMessage - content: Nullable[OpenResponsesInputContent2TypedDict] - status: NotRequired[OpenResponsesInputStatusUnion1TypedDict] - phase: NotRequired[Nullable[OpenResponsesInputPhaseUnionTypedDict]] - r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - -class OpenResponsesInputMessage(BaseModel): - r"""An output message item""" - - id: str - - role: OpenResponsesInputRole - - type: OpenResponsesInputTypeMessage - - content: Nullable[OpenResponsesInputContent2] - - status: Optional[OpenResponsesInputStatusUnion1] = None - - phase: OptionalNullable[OpenResponsesInputPhaseUnion] = UNSET - r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["status", "phase"] - nullable_fields = ["content", "phase"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenResponsesInputUnion1TypedDict = TypeAliasType( - "OpenResponsesInputUnion1TypedDict", - Union[ - OpenResponsesEasyInputMessageTypedDict, - OpenResponsesInputMessageItemTypedDict, - ResponsesWebSearchCallOutputTypedDict, - ResponsesOutputItemFileSearchCallTypedDict, - ResponsesImageGenerationCallTypedDict, - OpenResponsesFunctionCallOutputTypedDict, - OpenResponsesFunctionToolCallTypedDict, - OpenResponsesInputMessageTypedDict, - ResponsesOutputItemFunctionCallTypedDict, - OpenResponsesReasoningTypedDict, - OpenResponsesInputReasoningTypedDict, - ], -) - - -OpenResponsesInputUnion1 = TypeAliasType( - "OpenResponsesInputUnion1", - Union[ - OpenResponsesEasyInputMessage, - OpenResponsesInputMessageItem, - ResponsesWebSearchCallOutput, - ResponsesOutputItemFileSearchCall, - ResponsesImageGenerationCall, - OpenResponsesFunctionCallOutput, - OpenResponsesFunctionToolCall, - OpenResponsesInputMessage, - ResponsesOutputItemFunctionCall, - OpenResponsesReasoning, - OpenResponsesInputReasoning, - ], -) - - -OpenResponsesInputUnionTypedDict = TypeAliasType( - "OpenResponsesInputUnionTypedDict", - Union[str, List[OpenResponsesInputUnion1TypedDict]], -) -r"""Input for a response request - can be a string or array of items""" - - -OpenResponsesInputUnion = TypeAliasType( - "OpenResponsesInputUnion", Union[str, List[OpenResponsesInputUnion1]] -) -r"""Input for a response request - can be a string or array of items""" diff --git a/src/openrouter/components/openresponsesinputmessageitem.py b/src/openrouter/components/openresponsesinputmessageitem.py deleted file mode 100644 index 0ef39f6..0000000 --- a/src/openrouter/components/openresponsesinputmessageitem.py +++ /dev/null @@ -1,188 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responseinputaudio import ResponseInputAudio, ResponseInputAudioTypedDict -from .responseinputfile import ResponseInputFile, ResponseInputFileTypedDict -from .responseinputtext import ResponseInputText, ResponseInputTextTypedDict -from .responseinputvideo import ResponseInputVideo, ResponseInputVideoTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import get_discriminator, validate_open_enum -from pydantic import Discriminator, Tag, model_serializer -from pydantic.functional_validators import PlainValidator -from typing import List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -OpenResponsesInputMessageItemTypeMessage = Literal["message",] - - -OpenResponsesInputMessageItemRoleDeveloper = Literal["developer",] - - -OpenResponsesInputMessageItemRoleSystem = Literal["system",] - - -OpenResponsesInputMessageItemRoleUser = Literal["user",] - - -OpenResponsesInputMessageItemRoleUnionTypedDict = TypeAliasType( - "OpenResponsesInputMessageItemRoleUnionTypedDict", - Union[ - OpenResponsesInputMessageItemRoleUser, - OpenResponsesInputMessageItemRoleSystem, - OpenResponsesInputMessageItemRoleDeveloper, - ], -) - - -OpenResponsesInputMessageItemRoleUnion = TypeAliasType( - "OpenResponsesInputMessageItemRoleUnion", - Union[ - OpenResponsesInputMessageItemRoleUser, - OpenResponsesInputMessageItemRoleSystem, - OpenResponsesInputMessageItemRoleDeveloper, - ], -) - - -OpenResponsesInputMessageItemContentType = Literal["input_image",] - - -OpenResponsesInputMessageItemDetail = Union[ - Literal[ - "auto", - "high", - "low", - ], - UnrecognizedStr, -] - - -class OpenResponsesInputMessageItemContentInputImageTypedDict(TypedDict): - r"""Image input content item""" - - type: OpenResponsesInputMessageItemContentType - detail: OpenResponsesInputMessageItemDetail - image_url: NotRequired[Nullable[str]] - - -class OpenResponsesInputMessageItemContentInputImage(BaseModel): - r"""Image input content item""" - - type: OpenResponsesInputMessageItemContentType - - detail: Annotated[ - OpenResponsesInputMessageItemDetail, PlainValidator(validate_open_enum(False)) - ] - - image_url: OptionalNullable[str] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["image_url"] - nullable_fields = ["image_url"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenResponsesInputMessageItemContentUnionTypedDict = TypeAliasType( - "OpenResponsesInputMessageItemContentUnionTypedDict", - Union[ - ResponseInputTextTypedDict, - ResponseInputAudioTypedDict, - ResponseInputVideoTypedDict, - OpenResponsesInputMessageItemContentInputImageTypedDict, - ResponseInputFileTypedDict, - ], -) - - -OpenResponsesInputMessageItemContentUnion = Annotated[ - Union[ - Annotated[ResponseInputText, Tag("input_text")], - Annotated[OpenResponsesInputMessageItemContentInputImage, Tag("input_image")], - Annotated[ResponseInputFile, Tag("input_file")], - Annotated[ResponseInputAudio, Tag("input_audio")], - Annotated[ResponseInputVideo, Tag("input_video")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -class OpenResponsesInputMessageItemTypedDict(TypedDict): - role: OpenResponsesInputMessageItemRoleUnionTypedDict - id: NotRequired[str] - type: NotRequired[OpenResponsesInputMessageItemTypeMessage] - content: NotRequired[ - Nullable[List[OpenResponsesInputMessageItemContentUnionTypedDict]] - ] - - -class OpenResponsesInputMessageItem(BaseModel): - role: OpenResponsesInputMessageItemRoleUnion - - id: Optional[str] = None - - type: Optional[OpenResponsesInputMessageItemTypeMessage] = None - - content: OptionalNullable[List[OpenResponsesInputMessageItemContentUnion]] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["id", "type", "content"] - nullable_fields = ["content"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponseslocalshelltool.py b/src/openrouter/components/openresponseslocalshelltool.py deleted file mode 100644 index 50b0013..0000000 --- a/src/openrouter/components/openresponseslocalshelltool.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesLocalShellToolType = Literal["local_shell",] - - -class OpenResponsesLocalShellToolTypedDict(TypedDict): - r"""Local shell tool configuration""" - - type: OpenResponsesLocalShellToolType - - -class OpenResponsesLocalShellTool(BaseModel): - r"""Local shell tool configuration""" - - type: OpenResponsesLocalShellToolType diff --git a/src/openrouter/components/openresponseslogprobs.py b/src/openrouter/components/openresponseslogprobs.py deleted file mode 100644 index 78b6a1c..0000000 --- a/src/openrouter/components/openresponseslogprobs.py +++ /dev/null @@ -1,28 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .openresponsestoplogprobs import ( - OpenResponsesTopLogprobs, - OpenResponsesTopLogprobsTypedDict, -) -from openrouter.types import BaseModel -from typing import List, Optional -from typing_extensions import NotRequired, TypedDict - - -class OpenResponsesLogProbsTypedDict(TypedDict): - r"""Log probability information for a token""" - - logprob: float - token: str - top_logprobs: NotRequired[List[OpenResponsesTopLogprobsTypedDict]] - - -class OpenResponsesLogProbs(BaseModel): - r"""Log probability information for a token""" - - logprob: float - - token: str - - top_logprobs: Optional[List[OpenResponsesTopLogprobs]] = None diff --git a/src/openrouter/components/openresponsesmcptool.py b/src/openrouter/components/openresponsesmcptool.py deleted file mode 100644 index 5f15a1c..0000000 --- a/src/openrouter/components/openresponsesmcptool.py +++ /dev/null @@ -1,154 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Any, Dict, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypedDict - - -OpenResponsesMcpToolType = Literal["mcp",] - - -class AllowedToolsTypedDict(TypedDict): - tool_names: NotRequired[List[str]] - read_only: NotRequired[bool] - - -class AllowedTools(BaseModel): - tool_names: Optional[List[str]] = None - - read_only: Optional[bool] = None - - -ConnectorID = Union[ - Literal[ - "connector_dropbox", - "connector_gmail", - "connector_googlecalendar", - "connector_googledrive", - "connector_microsoftteams", - "connector_outlookcalendar", - "connector_outlookemail", - "connector_sharepoint", - ], - UnrecognizedStr, -] - - -RequireApprovalNever = Literal["never",] - - -RequireApprovalAlways = Literal["always",] - - -class NeverTypedDict(TypedDict): - tool_names: NotRequired[List[str]] - - -class Never(BaseModel): - tool_names: Optional[List[str]] = None - - -class AlwaysTypedDict(TypedDict): - tool_names: NotRequired[List[str]] - - -class Always(BaseModel): - tool_names: Optional[List[str]] = None - - -class RequireApprovalTypedDict(TypedDict): - never: NotRequired[NeverTypedDict] - always: NotRequired[AlwaysTypedDict] - - -class RequireApproval(BaseModel): - never: Optional[Never] = None - - always: Optional[Always] = None - - -class OpenResponsesMcpToolTypedDict(TypedDict): - r"""MCP (Model Context Protocol) tool configuration""" - - type: OpenResponsesMcpToolType - server_label: str - allowed_tools: NotRequired[Nullable[Any]] - authorization: NotRequired[str] - connector_id: NotRequired[ConnectorID] - headers: NotRequired[Nullable[Dict[str, str]]] - require_approval: NotRequired[Nullable[Any]] - server_description: NotRequired[str] - server_url: NotRequired[str] - - -class OpenResponsesMcpTool(BaseModel): - r"""MCP (Model Context Protocol) tool configuration""" - - type: OpenResponsesMcpToolType - - server_label: str - - allowed_tools: OptionalNullable[Any] = UNSET - - authorization: Optional[str] = None - - connector_id: Annotated[ - Optional[ConnectorID], PlainValidator(validate_open_enum(False)) - ] = None - - headers: OptionalNullable[Dict[str, str]] = UNSET - - require_approval: OptionalNullable[Any] = UNSET - - server_description: Optional[str] = None - - server_url: Optional[str] = None - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "allowed_tools", - "authorization", - "connector_id", - "headers", - "require_approval", - "server_description", - "server_url", - ] - nullable_fields = ["allowed_tools", "headers", "require_approval"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesnonstreamingresponse.py b/src/openrouter/components/openresponsesnonstreamingresponse.py deleted file mode 100644 index d5c805f..0000000 --- a/src/openrouter/components/openresponsesnonstreamingresponse.py +++ /dev/null @@ -1,389 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .openairesponsesincompletedetails import ( - OpenAIResponsesIncompleteDetails, - OpenAIResponsesIncompleteDetailsTypedDict, -) -from .openairesponsesinput_union import ( - OpenAIResponsesInputUnion, - OpenAIResponsesInputUnionTypedDict, -) -from .openairesponsesprompt import OpenAIResponsesPrompt, OpenAIResponsesPromptTypedDict -from .openairesponsesreasoningconfig import ( - OpenAIResponsesReasoningConfig, - OpenAIResponsesReasoningConfigTypedDict, -) -from .openairesponsesresponsestatus import OpenAIResponsesResponseStatus -from .openairesponsesservicetier import OpenAIResponsesServiceTier -from .openairesponsestoolchoice_union import ( - OpenAIResponsesToolChoiceUnion, - OpenAIResponsesToolChoiceUnionTypedDict, -) -from .openairesponsestruncation import OpenAIResponsesTruncation -from .openresponsesapplypatchtool import ( - OpenResponsesApplyPatchTool, - OpenResponsesApplyPatchToolTypedDict, -) -from .openresponsescodeinterpretertool import ( - OpenResponsesCodeInterpreterTool, - OpenResponsesCodeInterpreterToolTypedDict, -) -from .openresponsescomputertool import ( - OpenResponsesComputerTool, - OpenResponsesComputerToolTypedDict, -) -from .openresponsescustomtool import ( - OpenResponsesCustomTool, - OpenResponsesCustomToolTypedDict, -) -from .openresponsesfilesearchtool import ( - OpenResponsesFileSearchTool, - OpenResponsesFileSearchToolTypedDict, -) -from .openresponsesfunctionshelltool import ( - OpenResponsesFunctionShellTool, - OpenResponsesFunctionShellToolTypedDict, -) -from .openresponsesimagegenerationtool import ( - OpenResponsesImageGenerationTool, - OpenResponsesImageGenerationToolTypedDict, -) -from .openresponseslocalshelltool import ( - OpenResponsesLocalShellTool, - OpenResponsesLocalShellToolTypedDict, -) -from .openresponsesmcptool import OpenResponsesMcpTool, OpenResponsesMcpToolTypedDict -from .openresponsesusage import OpenResponsesUsage, OpenResponsesUsageTypedDict -from .openresponseswebsearch20250826tool import ( - OpenResponsesWebSearch20250826Tool, - OpenResponsesWebSearch20250826ToolTypedDict, -) -from .openresponseswebsearchpreview20250311tool import ( - OpenResponsesWebSearchPreview20250311Tool, - OpenResponsesWebSearchPreview20250311ToolTypedDict, -) -from .openresponseswebsearchpreviewtool import ( - OpenResponsesWebSearchPreviewTool, - OpenResponsesWebSearchPreviewToolTypedDict, -) -from .openresponseswebsearchtool import ( - OpenResponsesWebSearchTool, - OpenResponsesWebSearchToolTypedDict, -) -from .responseserrorfield import ResponsesErrorField, ResponsesErrorFieldTypedDict -from .responsesoutputitem import ResponsesOutputItem, ResponsesOutputItemTypedDict -from .responsetextconfig import ResponseTextConfig, ResponseTextConfigTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import get_discriminator, validate_open_enum -from pydantic import Discriminator, Tag, model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Any, Dict, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -OpenResponsesNonStreamingResponseObject = Literal["response",] - - -OpenResponsesNonStreamingResponseType = Literal["function",] - - -class OpenResponsesNonStreamingResponseToolFunctionTypedDict(TypedDict): - r"""Function tool definition""" - - type: OpenResponsesNonStreamingResponseType - name: str - parameters: Nullable[Dict[str, Nullable[Any]]] - description: NotRequired[Nullable[str]] - strict: NotRequired[Nullable[bool]] - - -class OpenResponsesNonStreamingResponseToolFunction(BaseModel): - r"""Function tool definition""" - - type: OpenResponsesNonStreamingResponseType - - name: str - - parameters: Nullable[Dict[str, Nullable[Any]]] - - description: OptionalNullable[str] = UNSET - - strict: OptionalNullable[bool] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["description", "strict"] - nullable_fields = ["description", "strict", "parameters"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenResponsesNonStreamingResponseToolUnionTypedDict = TypeAliasType( - "OpenResponsesNonStreamingResponseToolUnionTypedDict", - Union[ - OpenResponsesApplyPatchToolTypedDict, - OpenResponsesFunctionShellToolTypedDict, - OpenResponsesLocalShellToolTypedDict, - OpenResponsesCodeInterpreterToolTypedDict, - OpenResponsesWebSearchPreviewToolTypedDict, - OpenResponsesWebSearchPreview20250311ToolTypedDict, - OpenResponsesComputerToolTypedDict, - OpenResponsesWebSearch20250826ToolTypedDict, - OpenResponsesWebSearchToolTypedDict, - OpenResponsesCustomToolTypedDict, - OpenResponsesNonStreamingResponseToolFunctionTypedDict, - OpenResponsesFileSearchToolTypedDict, - OpenResponsesMcpToolTypedDict, - OpenResponsesImageGenerationToolTypedDict, - ], -) - - -OpenResponsesNonStreamingResponseToolUnion = Annotated[ - Union[ - Annotated[OpenResponsesNonStreamingResponseToolFunction, Tag("function")], - Annotated[OpenResponsesWebSearchPreviewTool, Tag("web_search_preview")], - Annotated[ - OpenResponsesWebSearchPreview20250311Tool, - Tag("web_search_preview_2025_03_11"), - ], - Annotated[OpenResponsesWebSearchTool, Tag("web_search")], - Annotated[OpenResponsesWebSearch20250826Tool, Tag("web_search_2025_08_26")], - Annotated[OpenResponsesFileSearchTool, Tag("file_search")], - Annotated[OpenResponsesComputerTool, Tag("computer_use_preview")], - Annotated[OpenResponsesCodeInterpreterTool, Tag("code_interpreter")], - Annotated[OpenResponsesMcpTool, Tag("mcp")], - Annotated[OpenResponsesImageGenerationTool, Tag("image_generation")], - Annotated[OpenResponsesLocalShellTool, Tag("local_shell")], - Annotated[OpenResponsesFunctionShellTool, Tag("shell")], - Annotated[OpenResponsesApplyPatchTool, Tag("apply_patch")], - Annotated[OpenResponsesCustomTool, Tag("custom")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -class OpenResponsesNonStreamingResponseTypedDict(TypedDict): - r"""Complete non-streaming response from the Responses API""" - - id: str - object: OpenResponsesNonStreamingResponseObject - created_at: float - model: str - status: OpenAIResponsesResponseStatus - completed_at: Nullable[float] - output: List[ResponsesOutputItemTypedDict] - error: Nullable[ResponsesErrorFieldTypedDict] - r"""Error information returned from the API""" - incomplete_details: Nullable[OpenAIResponsesIncompleteDetailsTypedDict] - temperature: Nullable[float] - top_p: Nullable[float] - presence_penalty: Nullable[float] - frequency_penalty: Nullable[float] - instructions: Nullable[OpenAIResponsesInputUnionTypedDict] - metadata: Nullable[Dict[str, str]] - r"""Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.""" - tools: List[OpenResponsesNonStreamingResponseToolUnionTypedDict] - tool_choice: OpenAIResponsesToolChoiceUnionTypedDict - parallel_tool_calls: bool - user: NotRequired[Nullable[str]] - output_text: NotRequired[str] - prompt_cache_key: NotRequired[Nullable[str]] - safety_identifier: NotRequired[Nullable[str]] - usage: NotRequired[Nullable[OpenResponsesUsageTypedDict]] - r"""Token usage information for the response""" - max_tool_calls: NotRequired[Nullable[float]] - top_logprobs: NotRequired[float] - max_output_tokens: NotRequired[Nullable[float]] - prompt: NotRequired[Nullable[OpenAIResponsesPromptTypedDict]] - background: NotRequired[Nullable[bool]] - previous_response_id: NotRequired[Nullable[str]] - reasoning: NotRequired[Nullable[OpenAIResponsesReasoningConfigTypedDict]] - service_tier: NotRequired[Nullable[OpenAIResponsesServiceTier]] - store: NotRequired[bool] - truncation: NotRequired[Nullable[OpenAIResponsesTruncation]] - text: NotRequired[ResponseTextConfigTypedDict] - r"""Text output configuration including format and verbosity""" - - -class OpenResponsesNonStreamingResponse(BaseModel): - r"""Complete non-streaming response from the Responses API""" - - id: str - - object: OpenResponsesNonStreamingResponseObject - - created_at: float - - model: str - - status: Annotated[ - OpenAIResponsesResponseStatus, PlainValidator(validate_open_enum(False)) - ] - - completed_at: Nullable[float] - - output: List[ResponsesOutputItem] - - error: Nullable[ResponsesErrorField] - r"""Error information returned from the API""" - - incomplete_details: Nullable[OpenAIResponsesIncompleteDetails] - - temperature: Nullable[float] - - top_p: Nullable[float] - - presence_penalty: Nullable[float] - - frequency_penalty: Nullable[float] - - instructions: Nullable[OpenAIResponsesInputUnion] - - metadata: Nullable[Dict[str, str]] - r"""Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.""" - - tools: List[OpenResponsesNonStreamingResponseToolUnion] - - tool_choice: OpenAIResponsesToolChoiceUnion - - parallel_tool_calls: bool - - user: OptionalNullable[str] = UNSET - - output_text: Optional[str] = None - - prompt_cache_key: OptionalNullable[str] = UNSET - - safety_identifier: OptionalNullable[str] = UNSET - - usage: OptionalNullable[OpenResponsesUsage] = UNSET - r"""Token usage information for the response""" - - max_tool_calls: OptionalNullable[float] = UNSET - - top_logprobs: Optional[float] = None - - max_output_tokens: OptionalNullable[float] = UNSET - - prompt: OptionalNullable[OpenAIResponsesPrompt] = UNSET - - background: OptionalNullable[bool] = UNSET - - previous_response_id: OptionalNullable[str] = UNSET - - reasoning: OptionalNullable[OpenAIResponsesReasoningConfig] = UNSET - - service_tier: Annotated[ - OptionalNullable[OpenAIResponsesServiceTier], - PlainValidator(validate_open_enum(False)), - ] = UNSET - - store: Optional[bool] = None - - truncation: Annotated[ - OptionalNullable[OpenAIResponsesTruncation], - PlainValidator(validate_open_enum(False)), - ] = UNSET - - text: Optional[ResponseTextConfig] = None - r"""Text output configuration including format and verbosity""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "user", - "output_text", - "prompt_cache_key", - "safety_identifier", - "usage", - "max_tool_calls", - "top_logprobs", - "max_output_tokens", - "prompt", - "background", - "previous_response_id", - "reasoning", - "service_tier", - "store", - "truncation", - "text", - ] - nullable_fields = [ - "completed_at", - "user", - "prompt_cache_key", - "safety_identifier", - "error", - "incomplete_details", - "usage", - "max_tool_calls", - "max_output_tokens", - "temperature", - "top_p", - "presence_penalty", - "frequency_penalty", - "instructions", - "metadata", - "prompt", - "background", - "previous_response_id", - "reasoning", - "service_tier", - "truncation", - ] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesreasoning.py b/src/openrouter/components/openresponsesreasoning.py deleted file mode 100644 index eea81d6..0000000 --- a/src/openrouter/components/openresponsesreasoning.py +++ /dev/null @@ -1,139 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict -from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import validate_open_enum -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -OpenResponsesReasoningType = Literal["reasoning",] - - -OpenResponsesReasoningStatusInProgress = Literal["in_progress",] - - -OpenResponsesReasoningStatusIncomplete = Literal["incomplete",] - - -OpenResponsesReasoningStatusCompleted = Literal["completed",] - - -OpenResponsesReasoningStatusUnionTypedDict = TypeAliasType( - "OpenResponsesReasoningStatusUnionTypedDict", - Union[ - OpenResponsesReasoningStatusCompleted, - OpenResponsesReasoningStatusIncomplete, - OpenResponsesReasoningStatusInProgress, - ], -) - - -OpenResponsesReasoningStatusUnion = TypeAliasType( - "OpenResponsesReasoningStatusUnion", - Union[ - OpenResponsesReasoningStatusCompleted, - OpenResponsesReasoningStatusIncomplete, - OpenResponsesReasoningStatusInProgress, - ], -) - - -OpenResponsesReasoningFormat = Union[ - Literal[ - "unknown", - "openai-responses-v1", - "azure-openai-responses-v1", - "xai-responses-v1", - "anthropic-claude-v1", - "google-gemini-v1", - ], - UnrecognizedStr, -] - - -class OpenResponsesReasoningTypedDict(TypedDict): - r"""Reasoning output item with signature and format extensions""" - - type: OpenResponsesReasoningType - id: str - summary: List[ReasoningSummaryTextTypedDict] - content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]] - encrypted_content: NotRequired[Nullable[str]] - status: NotRequired[OpenResponsesReasoningStatusUnionTypedDict] - signature: NotRequired[Nullable[str]] - format_: NotRequired[Nullable[OpenResponsesReasoningFormat]] - - -class OpenResponsesReasoning(BaseModel): - r"""Reasoning output item with signature and format extensions""" - - type: OpenResponsesReasoningType - - id: str - - summary: List[ReasoningSummaryText] - - content: OptionalNullable[List[ReasoningTextContent]] = UNSET - - encrypted_content: OptionalNullable[str] = UNSET - - status: Optional[OpenResponsesReasoningStatusUnion] = None - - signature: OptionalNullable[str] = UNSET - - format_: Annotated[ - Annotated[ - OptionalNullable[OpenResponsesReasoningFormat], - PlainValidator(validate_open_enum(False)), - ], - pydantic.Field(alias="format"), - ] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "content", - "encrypted_content", - "status", - "signature", - "format", - ] - nullable_fields = ["content", "encrypted_content", "signature", "format"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesreasoningconfig.py b/src/openrouter/components/openresponsesreasoningconfig.py deleted file mode 100644 index 0d6e861..0000000 --- a/src/openrouter/components/openresponsesreasoningconfig.py +++ /dev/null @@ -1,73 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .openairesponsesreasoningeffort import OpenAIResponsesReasoningEffort -from .reasoningsummaryverbosity import ReasoningSummaryVerbosity -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing_extensions import Annotated, NotRequired, TypedDict - - -class OpenResponsesReasoningConfigTypedDict(TypedDict): - r"""Configuration for reasoning mode in the response""" - - effort: NotRequired[Nullable[OpenAIResponsesReasoningEffort]] - summary: NotRequired[Nullable[ReasoningSummaryVerbosity]] - max_tokens: NotRequired[Nullable[float]] - enabled: NotRequired[Nullable[bool]] - - -class OpenResponsesReasoningConfig(BaseModel): - r"""Configuration for reasoning mode in the response""" - - effort: Annotated[ - OptionalNullable[OpenAIResponsesReasoningEffort], - PlainValidator(validate_open_enum(False)), - ] = UNSET - - summary: Annotated[ - OptionalNullable[ReasoningSummaryVerbosity], - PlainValidator(validate_open_enum(False)), - ] = UNSET - - max_tokens: OptionalNullable[float] = UNSET - - enabled: OptionalNullable[bool] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["effort", "summary", "max_tokens", "enabled"] - nullable_fields = ["effort", "summary", "max_tokens", "enabled"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesreasoningdeltaevent.py b/src/openrouter/components/openresponsesreasoningdeltaevent.py deleted file mode 100644 index b9b6ea4..0000000 --- a/src/openrouter/components/openresponsesreasoningdeltaevent.py +++ /dev/null @@ -1,36 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesReasoningDeltaEventType = Literal["response.reasoning_text.delta",] - - -class OpenResponsesReasoningDeltaEventTypedDict(TypedDict): - r"""Event emitted when reasoning text delta is streamed""" - - type: OpenResponsesReasoningDeltaEventType - output_index: float - item_id: str - content_index: float - delta: str - sequence_number: float - - -class OpenResponsesReasoningDeltaEvent(BaseModel): - r"""Event emitted when reasoning text delta is streamed""" - - type: OpenResponsesReasoningDeltaEventType - - output_index: float - - item_id: str - - content_index: float - - delta: str - - sequence_number: float diff --git a/src/openrouter/components/openresponsesreasoningdoneevent.py b/src/openrouter/components/openresponsesreasoningdoneevent.py deleted file mode 100644 index 4614314..0000000 --- a/src/openrouter/components/openresponsesreasoningdoneevent.py +++ /dev/null @@ -1,36 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesReasoningDoneEventType = Literal["response.reasoning_text.done",] - - -class OpenResponsesReasoningDoneEventTypedDict(TypedDict): - r"""Event emitted when reasoning text streaming is complete""" - - type: OpenResponsesReasoningDoneEventType - output_index: float - item_id: str - content_index: float - text: str - sequence_number: float - - -class OpenResponsesReasoningDoneEvent(BaseModel): - r"""Event emitted when reasoning text streaming is complete""" - - type: OpenResponsesReasoningDoneEventType - - output_index: float - - item_id: str - - content_index: float - - text: str - - sequence_number: float diff --git a/src/openrouter/components/openresponsesreasoningsummarypartaddedevent.py b/src/openrouter/components/openresponsesreasoningsummarypartaddedevent.py deleted file mode 100644 index 11425bb..0000000 --- a/src/openrouter/components/openresponsesreasoningsummarypartaddedevent.py +++ /dev/null @@ -1,39 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesReasoningSummaryPartAddedEventType = Literal[ - "response.reasoning_summary_part.added", -] - - -class OpenResponsesReasoningSummaryPartAddedEventTypedDict(TypedDict): - r"""Event emitted when a reasoning summary part is added""" - - type: OpenResponsesReasoningSummaryPartAddedEventType - output_index: float - item_id: str - summary_index: float - part: ReasoningSummaryTextTypedDict - sequence_number: float - - -class OpenResponsesReasoningSummaryPartAddedEvent(BaseModel): - r"""Event emitted when a reasoning summary part is added""" - - type: OpenResponsesReasoningSummaryPartAddedEventType - - output_index: float - - item_id: str - - summary_index: float - - part: ReasoningSummaryText - - sequence_number: float diff --git a/src/openrouter/components/openresponsesreasoningsummarytextdeltaevent.py b/src/openrouter/components/openresponsesreasoningsummarytextdeltaevent.py deleted file mode 100644 index dc51eda..0000000 --- a/src/openrouter/components/openresponsesreasoningsummarytextdeltaevent.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesReasoningSummaryTextDeltaEventType = Literal[ - "response.reasoning_summary_text.delta", -] - - -class OpenResponsesReasoningSummaryTextDeltaEventTypedDict(TypedDict): - r"""Event emitted when reasoning summary text delta is streamed""" - - type: OpenResponsesReasoningSummaryTextDeltaEventType - item_id: str - output_index: float - summary_index: float - delta: str - sequence_number: float - - -class OpenResponsesReasoningSummaryTextDeltaEvent(BaseModel): - r"""Event emitted when reasoning summary text delta is streamed""" - - type: OpenResponsesReasoningSummaryTextDeltaEventType - - item_id: str - - output_index: float - - summary_index: float - - delta: str - - sequence_number: float diff --git a/src/openrouter/components/openresponsesreasoningsummarytextdoneevent.py b/src/openrouter/components/openresponsesreasoningsummarytextdoneevent.py deleted file mode 100644 index f2f5302..0000000 --- a/src/openrouter/components/openresponsesreasoningsummarytextdoneevent.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -OpenResponsesReasoningSummaryTextDoneEventType = Literal[ - "response.reasoning_summary_text.done", -] - - -class OpenResponsesReasoningSummaryTextDoneEventTypedDict(TypedDict): - r"""Event emitted when reasoning summary text streaming is complete""" - - type: OpenResponsesReasoningSummaryTextDoneEventType - item_id: str - output_index: float - summary_index: float - text: str - sequence_number: float - - -class OpenResponsesReasoningSummaryTextDoneEvent(BaseModel): - r"""Event emitted when reasoning summary text streaming is complete""" - - type: OpenResponsesReasoningSummaryTextDoneEventType - - item_id: str - - output_index: float - - summary_index: float - - text: str - - sequence_number: float diff --git a/src/openrouter/components/openresponsesrequest.py b/src/openrouter/components/openresponsesrequest.py deleted file mode 100644 index 706d725..0000000 --- a/src/openrouter/components/openresponsesrequest.py +++ /dev/null @@ -1,857 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .datacollection import DataCollection -from .openairesponsesincludable import OpenAIResponsesIncludable -from .openairesponsesprompt import OpenAIResponsesPrompt, OpenAIResponsesPromptTypedDict -from .openairesponsestoolchoice_union import ( - OpenAIResponsesToolChoiceUnion, - OpenAIResponsesToolChoiceUnionTypedDict, -) -from .openresponsesapplypatchtool import ( - OpenResponsesApplyPatchTool, - OpenResponsesApplyPatchToolTypedDict, -) -from .openresponsescodeinterpretertool import ( - OpenResponsesCodeInterpreterTool, - OpenResponsesCodeInterpreterToolTypedDict, -) -from .openresponsescomputertool import ( - OpenResponsesComputerTool, - OpenResponsesComputerToolTypedDict, -) -from .openresponsescustomtool import ( - OpenResponsesCustomTool, - OpenResponsesCustomToolTypedDict, -) -from .openresponsesfilesearchtool import ( - OpenResponsesFileSearchTool, - OpenResponsesFileSearchToolTypedDict, -) -from .openresponsesfunctionshelltool import ( - OpenResponsesFunctionShellTool, - OpenResponsesFunctionShellToolTypedDict, -) -from .openresponsesimagegenerationtool import ( - OpenResponsesImageGenerationTool, - OpenResponsesImageGenerationToolTypedDict, -) -from .openresponsesinput_union import ( - OpenResponsesInputUnion, - OpenResponsesInputUnionTypedDict, -) -from .openresponseslocalshelltool import ( - OpenResponsesLocalShellTool, - OpenResponsesLocalShellToolTypedDict, -) -from .openresponsesmcptool import OpenResponsesMcpTool, OpenResponsesMcpToolTypedDict -from .openresponsesreasoningconfig import ( - OpenResponsesReasoningConfig, - OpenResponsesReasoningConfigTypedDict, -) -from .openresponsesresponsetext import ( - OpenResponsesResponseText, - OpenResponsesResponseTextTypedDict, -) -from .openresponseswebsearch20250826tool import ( - OpenResponsesWebSearch20250826Tool, - OpenResponsesWebSearch20250826ToolTypedDict, -) -from .openresponseswebsearchpreview20250311tool import ( - OpenResponsesWebSearchPreview20250311Tool, - OpenResponsesWebSearchPreview20250311ToolTypedDict, -) -from .openresponseswebsearchpreviewtool import ( - OpenResponsesWebSearchPreviewTool, - OpenResponsesWebSearchPreviewToolTypedDict, -) -from .openresponseswebsearchtool import ( - OpenResponsesWebSearchTool, - OpenResponsesWebSearchToolTypedDict, -) -from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict -from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict -from .preferredminthroughput import ( - PreferredMinThroughput, - PreferredMinThroughputTypedDict, -) -from .providername import ProviderName -from .providersort import ProviderSort -from .providersortconfig import ProviderSortConfig, ProviderSortConfigTypedDict -from .quantization import Quantization -from .responsesoutputmodality import ResponsesOutputModality -from .websearchengine import WebSearchEngine -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import get_discriminator, validate_const, validate_open_enum -import pydantic -from pydantic import ConfigDict, Discriminator, Tag, model_serializer -from pydantic.functional_validators import AfterValidator, PlainValidator -from typing import Any, Dict, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -OpenResponsesRequestType = Literal["function",] - - -class OpenResponsesRequestToolFunctionTypedDict(TypedDict): - r"""Function tool definition""" - - type: OpenResponsesRequestType - name: str - parameters: Nullable[Dict[str, Nullable[Any]]] - description: NotRequired[Nullable[str]] - strict: NotRequired[Nullable[bool]] - - -class OpenResponsesRequestToolFunction(BaseModel): - r"""Function tool definition""" - - type: OpenResponsesRequestType - - name: str - - parameters: Nullable[Dict[str, Nullable[Any]]] - - description: OptionalNullable[str] = UNSET - - strict: OptionalNullable[bool] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["description", "strict"] - nullable_fields = ["description", "strict", "parameters"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenResponsesRequestToolUnionTypedDict = TypeAliasType( - "OpenResponsesRequestToolUnionTypedDict", - Union[ - OpenResponsesApplyPatchToolTypedDict, - OpenResponsesFunctionShellToolTypedDict, - OpenResponsesLocalShellToolTypedDict, - OpenResponsesCodeInterpreterToolTypedDict, - OpenResponsesWebSearchPreviewToolTypedDict, - OpenResponsesWebSearchPreview20250311ToolTypedDict, - OpenResponsesComputerToolTypedDict, - OpenResponsesWebSearch20250826ToolTypedDict, - OpenResponsesWebSearchToolTypedDict, - OpenResponsesCustomToolTypedDict, - OpenResponsesRequestToolFunctionTypedDict, - OpenResponsesFileSearchToolTypedDict, - OpenResponsesMcpToolTypedDict, - OpenResponsesImageGenerationToolTypedDict, - ], -) - - -OpenResponsesRequestToolUnion = Annotated[ - Union[ - Annotated[OpenResponsesRequestToolFunction, Tag("function")], - Annotated[OpenResponsesWebSearchPreviewTool, Tag("web_search_preview")], - Annotated[ - OpenResponsesWebSearchPreview20250311Tool, - Tag("web_search_preview_2025_03_11"), - ], - Annotated[OpenResponsesWebSearchTool, Tag("web_search")], - Annotated[OpenResponsesWebSearch20250826Tool, Tag("web_search_2025_08_26")], - Annotated[OpenResponsesFileSearchTool, Tag("file_search")], - Annotated[OpenResponsesComputerTool, Tag("computer_use_preview")], - Annotated[OpenResponsesCodeInterpreterTool, Tag("code_interpreter")], - Annotated[OpenResponsesMcpTool, Tag("mcp")], - Annotated[OpenResponsesImageGenerationTool, Tag("image_generation")], - Annotated[OpenResponsesLocalShellTool, Tag("local_shell")], - Annotated[OpenResponsesFunctionShellTool, Tag("shell")], - Annotated[OpenResponsesApplyPatchTool, Tag("apply_patch")], - Annotated[OpenResponsesCustomTool, Tag("custom")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -OpenResponsesRequestImageConfigTypedDict = TypeAliasType( - "OpenResponsesRequestImageConfigTypedDict", Union[str, float] -) - - -OpenResponsesRequestImageConfig = TypeAliasType( - "OpenResponsesRequestImageConfig", Union[str, float] -) - - -ServiceTier = Literal["auto",] - - -Truncation = Union[ - Literal[ - "auto", - "disabled", - ], - UnrecognizedStr, -] - - -OpenResponsesRequestOrderTypedDict = TypeAliasType( - "OpenResponsesRequestOrderTypedDict", Union[ProviderName, str] -) - - -OpenResponsesRequestOrder = TypeAliasType( - "OpenResponsesRequestOrder", - Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], -) - - -OpenResponsesRequestOnlyTypedDict = TypeAliasType( - "OpenResponsesRequestOnlyTypedDict", Union[ProviderName, str] -) - - -OpenResponsesRequestOnly = TypeAliasType( - "OpenResponsesRequestOnly", - Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], -) - - -OpenResponsesRequestIgnoreTypedDict = TypeAliasType( - "OpenResponsesRequestIgnoreTypedDict", Union[ProviderName, str] -) - - -OpenResponsesRequestIgnore = TypeAliasType( - "OpenResponsesRequestIgnore", - Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], -) - - -OpenResponsesRequestSortTypedDict = TypeAliasType( - "OpenResponsesRequestSortTypedDict", - Union[ProviderSortConfigTypedDict, ProviderSort, Any], -) -r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" - - -OpenResponsesRequestSort = TypeAliasType( - "OpenResponsesRequestSort", - Union[ - ProviderSortConfig, - Annotated[ProviderSort, PlainValidator(validate_open_enum(False))], - Any, - ], -) -r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" - - -class OpenResponsesRequestMaxPriceTypedDict(TypedDict): - r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" - - prompt: NotRequired[str] - r"""Price per million prompt tokens""" - completion: NotRequired[str] - image: NotRequired[str] - audio: NotRequired[str] - request: NotRequired[str] - - -class OpenResponsesRequestMaxPrice(BaseModel): - r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" - - prompt: Optional[str] = None - r"""Price per million prompt tokens""" - - completion: Optional[str] = None - - image: Optional[str] = None - - audio: Optional[str] = None - - request: Optional[str] = None - - -class OpenResponsesRequestProviderTypedDict(TypedDict): - r"""When multiple model providers are available, optionally indicate your routing preference.""" - - allow_fallbacks: NotRequired[Nullable[bool]] - r"""Whether to allow backup providers to serve requests - - true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider. - - false: use only the primary/custom provider, and return the upstream error if it's unavailable. - - """ - require_parameters: NotRequired[Nullable[bool]] - r"""Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.""" - data_collection: NotRequired[Nullable[DataCollection]] - r"""Data collection setting. If no available model provider meets the requirement, your request will return an error. - - allow: (default) allow providers which store user data non-transiently and may train on it - - - deny: use only providers which do not collect user data. - """ - zdr: NotRequired[Nullable[bool]] - r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.""" - enforce_distillable_text: NotRequired[Nullable[bool]] - r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.""" - order: NotRequired[Nullable[List[OpenResponsesRequestOrderTypedDict]]] - r"""An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.""" - only: NotRequired[Nullable[List[OpenResponsesRequestOnlyTypedDict]]] - r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.""" - ignore: NotRequired[Nullable[List[OpenResponsesRequestIgnoreTypedDict]]] - r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.""" - quantizations: NotRequired[Nullable[List[Quantization]]] - r"""A list of quantization levels to filter the provider by.""" - sort: NotRequired[Nullable[OpenResponsesRequestSortTypedDict]] - r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" - max_price: NotRequired[OpenResponsesRequestMaxPriceTypedDict] - r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" - preferred_min_throughput: NotRequired[Nullable[PreferredMinThroughputTypedDict]] - r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.""" - preferred_max_latency: NotRequired[Nullable[PreferredMaxLatencyTypedDict]] - r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.""" - - -class OpenResponsesRequestProvider(BaseModel): - r"""When multiple model providers are available, optionally indicate your routing preference.""" - - allow_fallbacks: OptionalNullable[bool] = UNSET - r"""Whether to allow backup providers to serve requests - - true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider. - - false: use only the primary/custom provider, and return the upstream error if it's unavailable. - - """ - - require_parameters: OptionalNullable[bool] = UNSET - r"""Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.""" - - data_collection: Annotated[ - OptionalNullable[DataCollection], PlainValidator(validate_open_enum(False)) - ] = UNSET - r"""Data collection setting. If no available model provider meets the requirement, your request will return an error. - - allow: (default) allow providers which store user data non-transiently and may train on it - - - deny: use only providers which do not collect user data. - """ - - zdr: OptionalNullable[bool] = UNSET - r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.""" - - enforce_distillable_text: OptionalNullable[bool] = UNSET - r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.""" - - order: OptionalNullable[List[OpenResponsesRequestOrder]] = UNSET - r"""An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.""" - - only: OptionalNullable[List[OpenResponsesRequestOnly]] = UNSET - r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.""" - - ignore: OptionalNullable[List[OpenResponsesRequestIgnore]] = UNSET - r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.""" - - quantizations: OptionalNullable[ - List[Annotated[Quantization, PlainValidator(validate_open_enum(False))]] - ] = UNSET - r"""A list of quantization levels to filter the provider by.""" - - sort: OptionalNullable[OpenResponsesRequestSort] = UNSET - r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" - - max_price: Optional[OpenResponsesRequestMaxPrice] = None - r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" - - preferred_min_throughput: OptionalNullable[PreferredMinThroughput] = UNSET - r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.""" - - preferred_max_latency: OptionalNullable[PreferredMaxLatency] = UNSET - r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "allow_fallbacks", - "require_parameters", - "data_collection", - "zdr", - "enforce_distillable_text", - "order", - "only", - "ignore", - "quantizations", - "sort", - "max_price", - "preferred_min_throughput", - "preferred_max_latency", - ] - nullable_fields = [ - "allow_fallbacks", - "require_parameters", - "data_collection", - "zdr", - "enforce_distillable_text", - "order", - "only", - "ignore", - "quantizations", - "sort", - "preferred_min_throughput", - "preferred_max_latency", - ] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -OpenResponsesRequestIDResponseHealing = Literal["response-healing",] - - -class OpenResponsesRequestPluginResponseHealingTypedDict(TypedDict): - id: OpenResponsesRequestIDResponseHealing - enabled: NotRequired[bool] - r"""Set to false to disable the response-healing plugin for this request. Defaults to true.""" - - -class OpenResponsesRequestPluginResponseHealing(BaseModel): - id: OpenResponsesRequestIDResponseHealing - - enabled: Optional[bool] = None - r"""Set to false to disable the response-healing plugin for this request. Defaults to true.""" - - -OpenResponsesRequestIDFileParser = Literal["file-parser",] - - -class OpenResponsesRequestPluginFileParserTypedDict(TypedDict): - id: OpenResponsesRequestIDFileParser - enabled: NotRequired[bool] - r"""Set to false to disable the file-parser plugin for this request. Defaults to true.""" - pdf: NotRequired[PDFParserOptionsTypedDict] - r"""Options for PDF parsing.""" - - -class OpenResponsesRequestPluginFileParser(BaseModel): - id: OpenResponsesRequestIDFileParser - - enabled: Optional[bool] = None - r"""Set to false to disable the file-parser plugin for this request. Defaults to true.""" - - pdf: Optional[PDFParserOptions] = None - r"""Options for PDF parsing.""" - - -OpenResponsesRequestIDWeb = Literal["web",] - - -class OpenResponsesRequestPluginWebTypedDict(TypedDict): - id: OpenResponsesRequestIDWeb - enabled: NotRequired[bool] - r"""Set to false to disable the web-search plugin for this request. Defaults to true.""" - max_results: NotRequired[float] - search_prompt: NotRequired[str] - engine: NotRequired[WebSearchEngine] - r"""The search engine to use for web search.""" - include_domains: NotRequired[List[str]] - r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" - exclude_domains: NotRequired[List[str]] - r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" - - -class OpenResponsesRequestPluginWeb(BaseModel): - id: OpenResponsesRequestIDWeb - - enabled: Optional[bool] = None - r"""Set to false to disable the web-search plugin for this request. Defaults to true.""" - - max_results: Optional[float] = None - - search_prompt: Optional[str] = None - - engine: Annotated[ - Optional[WebSearchEngine], PlainValidator(validate_open_enum(False)) - ] = None - r"""The search engine to use for web search.""" - - include_domains: Optional[List[str]] = None - r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" - - exclude_domains: Optional[List[str]] = None - r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" - - -OpenResponsesRequestIDModeration = Literal["moderation",] - - -class OpenResponsesRequestPluginModerationTypedDict(TypedDict): - id: OpenResponsesRequestIDModeration - - -class OpenResponsesRequestPluginModeration(BaseModel): - id: OpenResponsesRequestIDModeration - - -OpenResponsesRequestIDAutoRouter = Literal["auto-router",] - - -class OpenResponsesRequestPluginAutoRouterTypedDict(TypedDict): - id: OpenResponsesRequestIDAutoRouter - enabled: NotRequired[bool] - r"""Set to false to disable the auto-router plugin for this request. Defaults to true.""" - allowed_models: NotRequired[List[str]] - r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list.""" - - -class OpenResponsesRequestPluginAutoRouter(BaseModel): - id: OpenResponsesRequestIDAutoRouter - - enabled: Optional[bool] = None - r"""Set to false to disable the auto-router plugin for this request. Defaults to true.""" - - allowed_models: Optional[List[str]] = None - r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list.""" - - -OpenResponsesRequestPluginUnionTypedDict = TypeAliasType( - "OpenResponsesRequestPluginUnionTypedDict", - Union[ - OpenResponsesRequestPluginModerationTypedDict, - OpenResponsesRequestPluginResponseHealingTypedDict, - OpenResponsesRequestPluginAutoRouterTypedDict, - OpenResponsesRequestPluginFileParserTypedDict, - OpenResponsesRequestPluginWebTypedDict, - ], -) - - -OpenResponsesRequestPluginUnion = Annotated[ - Union[ - Annotated[OpenResponsesRequestPluginAutoRouter, Tag("auto-router")], - Annotated[OpenResponsesRequestPluginModeration, Tag("moderation")], - Annotated[OpenResponsesRequestPluginWeb, Tag("web")], - Annotated[OpenResponsesRequestPluginFileParser, Tag("file-parser")], - Annotated[OpenResponsesRequestPluginResponseHealing, Tag("response-healing")], - ], - Discriminator(lambda m: get_discriminator(m, "id", "id")), -] - - -class OpenResponsesRequestTraceTypedDict(TypedDict): - r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" - - trace_id: NotRequired[str] - trace_name: NotRequired[str] - span_name: NotRequired[str] - generation_name: NotRequired[str] - parent_span_id: NotRequired[str] - - -class OpenResponsesRequestTrace(BaseModel): - r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" - - model_config = ConfigDict( - populate_by_name=True, arbitrary_types_allowed=True, extra="allow" - ) - __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) - - trace_id: Optional[str] = None - - trace_name: Optional[str] = None - - span_name: Optional[str] = None - - generation_name: Optional[str] = None - - parent_span_id: Optional[str] = None - - @property - def additional_properties(self): - return self.__pydantic_extra__ - - @additional_properties.setter - def additional_properties(self, value): - self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] - - -class OpenResponsesRequestTypedDict(TypedDict): - r"""Request schema for Responses endpoint""" - - input: NotRequired[OpenResponsesInputUnionTypedDict] - r"""Input for a response request - can be a string or array of items""" - instructions: NotRequired[Nullable[str]] - metadata: NotRequired[Nullable[Dict[str, str]]] - r"""Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.""" - tools: NotRequired[List[OpenResponsesRequestToolUnionTypedDict]] - tool_choice: NotRequired[OpenAIResponsesToolChoiceUnionTypedDict] - parallel_tool_calls: NotRequired[Nullable[bool]] - model: NotRequired[str] - models: NotRequired[List[str]] - text: NotRequired[OpenResponsesResponseTextTypedDict] - r"""Text output configuration including format and verbosity""" - reasoning: NotRequired[Nullable[OpenResponsesReasoningConfigTypedDict]] - r"""Configuration for reasoning mode in the response""" - max_output_tokens: NotRequired[Nullable[float]] - temperature: NotRequired[Nullable[float]] - top_p: NotRequired[Nullable[float]] - top_logprobs: NotRequired[Nullable[int]] - max_tool_calls: NotRequired[Nullable[int]] - presence_penalty: NotRequired[Nullable[float]] - frequency_penalty: NotRequired[Nullable[float]] - top_k: NotRequired[float] - image_config: NotRequired[Dict[str, OpenResponsesRequestImageConfigTypedDict]] - r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.""" - modalities: NotRequired[List[ResponsesOutputModality]] - r"""Output modalities for the response. Supported values are \"text\" and \"image\".""" - prompt_cache_key: NotRequired[Nullable[str]] - previous_response_id: NotRequired[Nullable[str]] - prompt: NotRequired[Nullable[OpenAIResponsesPromptTypedDict]] - include: NotRequired[Nullable[List[OpenAIResponsesIncludable]]] - background: NotRequired[Nullable[bool]] - safety_identifier: NotRequired[Nullable[str]] - store: Literal[False] - service_tier: NotRequired[ServiceTier] - truncation: NotRequired[Nullable[Truncation]] - stream: NotRequired[bool] - provider: NotRequired[Nullable[OpenResponsesRequestProviderTypedDict]] - r"""When multiple model providers are available, optionally indicate your routing preference.""" - plugins: NotRequired[List[OpenResponsesRequestPluginUnionTypedDict]] - r"""Plugins you want to enable for this request, including their settings.""" - user: NotRequired[str] - r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.""" - session_id: NotRequired[str] - r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.""" - trace: NotRequired[OpenResponsesRequestTraceTypedDict] - r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" - - -class OpenResponsesRequest(BaseModel): - r"""Request schema for Responses endpoint""" - - input: Optional[OpenResponsesInputUnion] = None - r"""Input for a response request - can be a string or array of items""" - - instructions: OptionalNullable[str] = UNSET - - metadata: OptionalNullable[Dict[str, str]] = UNSET - r"""Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.""" - - tools: Optional[List[OpenResponsesRequestToolUnion]] = None - - tool_choice: Optional[OpenAIResponsesToolChoiceUnion] = None - - parallel_tool_calls: OptionalNullable[bool] = UNSET - - model: Optional[str] = None - - models: Optional[List[str]] = None - - text: Optional[OpenResponsesResponseText] = None - r"""Text output configuration including format and verbosity""" - - reasoning: OptionalNullable[OpenResponsesReasoningConfig] = UNSET - r"""Configuration for reasoning mode in the response""" - - max_output_tokens: OptionalNullable[float] = UNSET - - temperature: OptionalNullable[float] = UNSET - - top_p: OptionalNullable[float] = UNSET - - top_logprobs: OptionalNullable[int] = UNSET - - max_tool_calls: OptionalNullable[int] = UNSET - - presence_penalty: OptionalNullable[float] = UNSET - - frequency_penalty: OptionalNullable[float] = UNSET - - top_k: Optional[float] = None - - image_config: Optional[Dict[str, OpenResponsesRequestImageConfig]] = None - r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.""" - - modalities: Optional[ - List[ - Annotated[ - ResponsesOutputModality, PlainValidator(validate_open_enum(False)) - ] - ] - ] = None - r"""Output modalities for the response. Supported values are \"text\" and \"image\".""" - - prompt_cache_key: OptionalNullable[str] = UNSET - - previous_response_id: OptionalNullable[str] = UNSET - - prompt: OptionalNullable[OpenAIResponsesPrompt] = UNSET - - include: OptionalNullable[ - List[ - Annotated[ - OpenAIResponsesIncludable, PlainValidator(validate_open_enum(False)) - ] - ] - ] = UNSET - - background: OptionalNullable[bool] = UNSET - - safety_identifier: OptionalNullable[str] = UNSET - - STORE: Annotated[ - Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], - pydantic.Field(alias="store"), - ] = False - - service_tier: Optional[ServiceTier] = "auto" - - truncation: Annotated[ - OptionalNullable[Truncation], PlainValidator(validate_open_enum(False)) - ] = UNSET - - stream: Optional[bool] = False - - provider: OptionalNullable[OpenResponsesRequestProvider] = UNSET - r"""When multiple model providers are available, optionally indicate your routing preference.""" - - plugins: Optional[List[OpenResponsesRequestPluginUnion]] = None - r"""Plugins you want to enable for this request, including their settings.""" - - user: Optional[str] = None - r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.""" - - session_id: Optional[str] = None - r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.""" - - trace: Optional[OpenResponsesRequestTrace] = None - r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "input", - "instructions", - "metadata", - "tools", - "tool_choice", - "parallel_tool_calls", - "model", - "models", - "text", - "reasoning", - "max_output_tokens", - "temperature", - "top_p", - "top_logprobs", - "max_tool_calls", - "presence_penalty", - "frequency_penalty", - "top_k", - "image_config", - "modalities", - "prompt_cache_key", - "previous_response_id", - "prompt", - "include", - "background", - "safety_identifier", - "store", - "service_tier", - "truncation", - "stream", - "provider", - "plugins", - "user", - "session_id", - "trace", - ] - nullable_fields = [ - "instructions", - "metadata", - "parallel_tool_calls", - "reasoning", - "max_output_tokens", - "temperature", - "top_p", - "top_logprobs", - "max_tool_calls", - "presence_penalty", - "frequency_penalty", - "prompt_cache_key", - "previous_response_id", - "prompt", - "include", - "background", - "safety_identifier", - "truncation", - "provider", - ] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesresponsetext.py b/src/openrouter/components/openresponsesresponsetext.py deleted file mode 100644 index c8baa8c..0000000 --- a/src/openrouter/components/openresponsesresponsetext.py +++ /dev/null @@ -1,83 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responseformattextconfig import ( - ResponseFormatTextConfig, - ResponseFormatTextConfigTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import validate_open_enum -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypedDict - - -OpenResponsesResponseTextVerbosity = Union[ - Literal[ - "high", - "low", - "medium", - ], - UnrecognizedStr, -] - - -class OpenResponsesResponseTextTypedDict(TypedDict): - r"""Text output configuration including format and verbosity""" - - format_: NotRequired[ResponseFormatTextConfigTypedDict] - r"""Text response format configuration""" - verbosity: NotRequired[Nullable[OpenResponsesResponseTextVerbosity]] - - -class OpenResponsesResponseText(BaseModel): - r"""Text output configuration including format and verbosity""" - - format_: Annotated[ - Optional[ResponseFormatTextConfig], pydantic.Field(alias="format") - ] = None - r"""Text response format configuration""" - - verbosity: Annotated[ - OptionalNullable[OpenResponsesResponseTextVerbosity], - PlainValidator(validate_open_enum(False)), - ] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["format", "verbosity"] - nullable_fields = ["verbosity"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponsesstreamevent.py b/src/openrouter/components/openresponsesstreamevent.py deleted file mode 100644 index 5ec67a1..0000000 --- a/src/openrouter/components/openresponsesstreamevent.py +++ /dev/null @@ -1,793 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .openairesponsesannotation import ( - OpenAIResponsesAnnotation, - OpenAIResponsesAnnotationTypedDict, -) -from .openairesponsesrefusalcontent import ( - OpenAIResponsesRefusalContent, - OpenAIResponsesRefusalContentTypedDict, -) -from .openresponseserrorevent import ( - OpenResponsesErrorEvent, - OpenResponsesErrorEventTypedDict, -) -from .openresponsesimagegencallcompleted import ( - OpenResponsesImageGenCallCompleted, - OpenResponsesImageGenCallCompletedTypedDict, -) -from .openresponsesimagegencallgenerating import ( - OpenResponsesImageGenCallGenerating, - OpenResponsesImageGenCallGeneratingTypedDict, -) -from .openresponsesimagegencallinprogress import ( - OpenResponsesImageGenCallInProgress, - OpenResponsesImageGenCallInProgressTypedDict, -) -from .openresponsesimagegencallpartialimage import ( - OpenResponsesImageGenCallPartialImage, - OpenResponsesImageGenCallPartialImageTypedDict, -) -from .openresponsesnonstreamingresponse import ( - OpenResponsesNonStreamingResponse, - OpenResponsesNonStreamingResponseTypedDict, -) -from .openresponsesreasoningdeltaevent import ( - OpenResponsesReasoningDeltaEvent, - OpenResponsesReasoningDeltaEventTypedDict, -) -from .openresponsesreasoningdoneevent import ( - OpenResponsesReasoningDoneEvent, - OpenResponsesReasoningDoneEventTypedDict, -) -from .openresponsesreasoningsummarypartaddedevent import ( - OpenResponsesReasoningSummaryPartAddedEvent, - OpenResponsesReasoningSummaryPartAddedEventTypedDict, -) -from .openresponsesreasoningsummarytextdeltaevent import ( - OpenResponsesReasoningSummaryTextDeltaEvent, - OpenResponsesReasoningSummaryTextDeltaEventTypedDict, -) -from .openresponsesreasoningsummarytextdoneevent import ( - OpenResponsesReasoningSummaryTextDoneEvent, - OpenResponsesReasoningSummaryTextDoneEventTypedDict, -) -from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict -from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict -from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict -from .responsesoutputitem import ResponsesOutputItem, ResponsesOutputItemTypedDict -from openrouter.types import BaseModel -from openrouter.utils import get_discriminator -import pydantic -from pydantic import Discriminator, Tag -from typing import List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -TypeResponseReasoningSummaryPartDone = Literal["response.reasoning_summary_part.done",] - - -class OpenResponsesStreamEventResponseReasoningSummaryPartDoneTypedDict(TypedDict): - r"""Event emitted when a reasoning summary part is complete""" - - type: TypeResponseReasoningSummaryPartDone - output_index: float - item_id: str - summary_index: float - part: ReasoningSummaryTextTypedDict - sequence_number: float - - -class OpenResponsesStreamEventResponseReasoningSummaryPartDone(BaseModel): - r"""Event emitted when a reasoning summary part is complete""" - - type: TypeResponseReasoningSummaryPartDone - - output_index: float - - item_id: str - - summary_index: float - - part: ReasoningSummaryText - - sequence_number: float - - -TypeResponseFunctionCallArgumentsDone = Literal[ - "response.function_call_arguments.done", -] - - -class OpenResponsesStreamEventResponseFunctionCallArgumentsDoneTypedDict(TypedDict): - r"""Event emitted when function call arguments streaming is complete""" - - type: TypeResponseFunctionCallArgumentsDone - item_id: str - output_index: float - name: str - arguments: str - sequence_number: float - - -class OpenResponsesStreamEventResponseFunctionCallArgumentsDone(BaseModel): - r"""Event emitted when function call arguments streaming is complete""" - - type: TypeResponseFunctionCallArgumentsDone - - item_id: str - - output_index: float - - name: str - - arguments: str - - sequence_number: float - - -TypeResponseFunctionCallArgumentsDelta = Literal[ - "response.function_call_arguments.delta", -] - - -class OpenResponsesStreamEventResponseFunctionCallArgumentsDeltaTypedDict(TypedDict): - r"""Event emitted when function call arguments are being streamed""" - - type: TypeResponseFunctionCallArgumentsDelta - item_id: str - output_index: float - delta: str - sequence_number: float - - -class OpenResponsesStreamEventResponseFunctionCallArgumentsDelta(BaseModel): - r"""Event emitted when function call arguments are being streamed""" - - type: TypeResponseFunctionCallArgumentsDelta - - item_id: str - - output_index: float - - delta: str - - sequence_number: float - - -TypeResponseOutputTextAnnotationAdded = Literal[ - "response.output_text.annotation.added", -] - - -class OpenResponsesStreamEventResponseOutputTextAnnotationAddedTypedDict(TypedDict): - r"""Event emitted when a text annotation is added to output""" - - type: TypeResponseOutputTextAnnotationAdded - output_index: float - item_id: str - content_index: float - sequence_number: float - annotation_index: float - annotation: OpenAIResponsesAnnotationTypedDict - - -class OpenResponsesStreamEventResponseOutputTextAnnotationAdded(BaseModel): - r"""Event emitted when a text annotation is added to output""" - - type: TypeResponseOutputTextAnnotationAdded - - output_index: float - - item_id: str - - content_index: float - - sequence_number: float - - annotation_index: float - - annotation: OpenAIResponsesAnnotation - - -TypeResponseRefusalDone = Literal["response.refusal.done",] - - -class OpenResponsesStreamEventResponseRefusalDoneTypedDict(TypedDict): - r"""Event emitted when refusal streaming is complete""" - - type: TypeResponseRefusalDone - output_index: float - item_id: str - content_index: float - refusal: str - sequence_number: float - - -class OpenResponsesStreamEventResponseRefusalDone(BaseModel): - r"""Event emitted when refusal streaming is complete""" - - type: TypeResponseRefusalDone - - output_index: float - - item_id: str - - content_index: float - - refusal: str - - sequence_number: float - - -TypeResponseRefusalDelta = Literal["response.refusal.delta",] - - -class OpenResponsesStreamEventResponseRefusalDeltaTypedDict(TypedDict): - r"""Event emitted when a refusal delta is streamed""" - - type: TypeResponseRefusalDelta - output_index: float - item_id: str - content_index: float - delta: str - sequence_number: float - - -class OpenResponsesStreamEventResponseRefusalDelta(BaseModel): - r"""Event emitted when a refusal delta is streamed""" - - type: TypeResponseRefusalDelta - - output_index: float - - item_id: str - - content_index: float - - delta: str - - sequence_number: float - - -TypeResponseOutputTextDone = Literal["response.output_text.done",] - - -class OpenResponsesStreamEventTopLogprob2TypedDict(TypedDict): - r"""Alternative token with its log probability""" - - token: NotRequired[str] - logprob: NotRequired[float] - bytes_: NotRequired[List[float]] - - -class OpenResponsesStreamEventTopLogprob2(BaseModel): - r"""Alternative token with its log probability""" - - token: Optional[str] = None - - logprob: Optional[float] = None - - bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None - - -class OpenResponsesStreamEventLogprob2TypedDict(TypedDict): - r"""Log probability information for a token""" - - logprob: float - token: str - top_logprobs: NotRequired[List[OpenResponsesStreamEventTopLogprob2TypedDict]] - bytes_: NotRequired[List[float]] - - -class OpenResponsesStreamEventLogprob2(BaseModel): - r"""Log probability information for a token""" - - logprob: float - - token: str - - top_logprobs: Optional[List[OpenResponsesStreamEventTopLogprob2]] = None - - bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None - - -class OpenResponsesStreamEventResponseOutputTextDoneTypedDict(TypedDict): - r"""Event emitted when text streaming is complete""" - - type: TypeResponseOutputTextDone - output_index: float - item_id: str - content_index: float - text: str - sequence_number: float - logprobs: List[OpenResponsesStreamEventLogprob2TypedDict] - - -class OpenResponsesStreamEventResponseOutputTextDone(BaseModel): - r"""Event emitted when text streaming is complete""" - - type: TypeResponseOutputTextDone - - output_index: float - - item_id: str - - content_index: float - - text: str - - sequence_number: float - - logprobs: List[OpenResponsesStreamEventLogprob2] - - -TypeResponseOutputTextDelta = Literal["response.output_text.delta",] - - -class OpenResponsesStreamEventTopLogprob1TypedDict(TypedDict): - r"""Alternative token with its log probability""" - - token: NotRequired[str] - logprob: NotRequired[float] - bytes_: NotRequired[List[float]] - - -class OpenResponsesStreamEventTopLogprob1(BaseModel): - r"""Alternative token with its log probability""" - - token: Optional[str] = None - - logprob: Optional[float] = None - - bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None - - -class OpenResponsesStreamEventLogprob1TypedDict(TypedDict): - r"""Log probability information for a token""" - - logprob: float - token: str - top_logprobs: NotRequired[List[OpenResponsesStreamEventTopLogprob1TypedDict]] - bytes_: NotRequired[List[float]] - - -class OpenResponsesStreamEventLogprob1(BaseModel): - r"""Log probability information for a token""" - - logprob: float - - token: str - - top_logprobs: Optional[List[OpenResponsesStreamEventTopLogprob1]] = None - - bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None - - -class OpenResponsesStreamEventResponseOutputTextDeltaTypedDict(TypedDict): - r"""Event emitted when a text delta is streamed""" - - type: TypeResponseOutputTextDelta - logprobs: List[OpenResponsesStreamEventLogprob1TypedDict] - output_index: float - item_id: str - content_index: float - delta: str - sequence_number: float - - -class OpenResponsesStreamEventResponseOutputTextDelta(BaseModel): - r"""Event emitted when a text delta is streamed""" - - type: TypeResponseOutputTextDelta - - logprobs: List[OpenResponsesStreamEventLogprob1] - - output_index: float - - item_id: str - - content_index: float - - delta: str - - sequence_number: float - - -TypeResponseContentPartDone = Literal["response.content_part.done",] - - -Part2TypedDict = TypeAliasType( - "Part2TypedDict", - Union[ - ReasoningTextContentTypedDict, - OpenAIResponsesRefusalContentTypedDict, - ResponseOutputTextTypedDict, - ], -) - - -Part2 = Annotated[ - Union[ - Annotated[ResponseOutputText, Tag("output_text")], - Annotated[ReasoningTextContent, Tag("reasoning_text")], - Annotated[OpenAIResponsesRefusalContent, Tag("refusal")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -class OpenResponsesStreamEventResponseContentPartDoneTypedDict(TypedDict): - r"""Event emitted when a content part is complete""" - - type: TypeResponseContentPartDone - output_index: float - item_id: str - content_index: float - part: Part2TypedDict - sequence_number: float - - -class OpenResponsesStreamEventResponseContentPartDone(BaseModel): - r"""Event emitted when a content part is complete""" - - type: TypeResponseContentPartDone - - output_index: float - - item_id: str - - content_index: float - - part: Part2 - - sequence_number: float - - -TypeResponseContentPartAdded = Literal["response.content_part.added",] - - -Part1TypedDict = TypeAliasType( - "Part1TypedDict", - Union[ - ReasoningTextContentTypedDict, - OpenAIResponsesRefusalContentTypedDict, - ResponseOutputTextTypedDict, - ], -) - - -Part1 = Annotated[ - Union[ - Annotated[ResponseOutputText, Tag("output_text")], - Annotated[ReasoningTextContent, Tag("reasoning_text")], - Annotated[OpenAIResponsesRefusalContent, Tag("refusal")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -class OpenResponsesStreamEventResponseContentPartAddedTypedDict(TypedDict): - r"""Event emitted when a new content part is added to an output item""" - - type: TypeResponseContentPartAdded - output_index: float - item_id: str - content_index: float - part: Part1TypedDict - sequence_number: float - - -class OpenResponsesStreamEventResponseContentPartAdded(BaseModel): - r"""Event emitted when a new content part is added to an output item""" - - type: TypeResponseContentPartAdded - - output_index: float - - item_id: str - - content_index: float - - part: Part1 - - sequence_number: float - - -TypeResponseOutputItemDone = Literal["response.output_item.done",] - - -class OpenResponsesStreamEventResponseOutputItemDoneTypedDict(TypedDict): - r"""Event emitted when an output item is complete""" - - type: TypeResponseOutputItemDone - output_index: float - item: ResponsesOutputItemTypedDict - r"""An output item from the response""" - sequence_number: float - - -class OpenResponsesStreamEventResponseOutputItemDone(BaseModel): - r"""Event emitted when an output item is complete""" - - type: TypeResponseOutputItemDone - - output_index: float - - item: ResponsesOutputItem - r"""An output item from the response""" - - sequence_number: float - - -TypeResponseOutputItemAdded = Literal["response.output_item.added",] - - -class OpenResponsesStreamEventResponseOutputItemAddedTypedDict(TypedDict): - r"""Event emitted when a new output item is added to the response""" - - type: TypeResponseOutputItemAdded - output_index: float - item: ResponsesOutputItemTypedDict - r"""An output item from the response""" - sequence_number: float - - -class OpenResponsesStreamEventResponseOutputItemAdded(BaseModel): - r"""Event emitted when a new output item is added to the response""" - - type: TypeResponseOutputItemAdded - - output_index: float - - item: ResponsesOutputItem - r"""An output item from the response""" - - sequence_number: float - - -TypeResponseFailed = Literal["response.failed",] - - -class OpenResponsesStreamEventResponseFailedTypedDict(TypedDict): - r"""Event emitted when a response has failed""" - - type: TypeResponseFailed - response: OpenResponsesNonStreamingResponseTypedDict - r"""Complete non-streaming response from the Responses API""" - sequence_number: float - - -class OpenResponsesStreamEventResponseFailed(BaseModel): - r"""Event emitted when a response has failed""" - - type: TypeResponseFailed - - response: OpenResponsesNonStreamingResponse - r"""Complete non-streaming response from the Responses API""" - - sequence_number: float - - -TypeResponseIncomplete = Literal["response.incomplete",] - - -class OpenResponsesStreamEventResponseIncompleteTypedDict(TypedDict): - r"""Event emitted when a response is incomplete""" - - type: TypeResponseIncomplete - response: OpenResponsesNonStreamingResponseTypedDict - r"""Complete non-streaming response from the Responses API""" - sequence_number: float - - -class OpenResponsesStreamEventResponseIncomplete(BaseModel): - r"""Event emitted when a response is incomplete""" - - type: TypeResponseIncomplete - - response: OpenResponsesNonStreamingResponse - r"""Complete non-streaming response from the Responses API""" - - sequence_number: float - - -TypeResponseCompleted = Literal["response.completed",] - - -class OpenResponsesStreamEventResponseCompletedTypedDict(TypedDict): - r"""Event emitted when a response has completed successfully""" - - type: TypeResponseCompleted - response: OpenResponsesNonStreamingResponseTypedDict - r"""Complete non-streaming response from the Responses API""" - sequence_number: float - - -class OpenResponsesStreamEventResponseCompleted(BaseModel): - r"""Event emitted when a response has completed successfully""" - - type: TypeResponseCompleted - - response: OpenResponsesNonStreamingResponse - r"""Complete non-streaming response from the Responses API""" - - sequence_number: float - - -TypeResponseInProgress = Literal["response.in_progress",] - - -class OpenResponsesStreamEventResponseInProgressTypedDict(TypedDict): - r"""Event emitted when a response is in progress""" - - type: TypeResponseInProgress - response: OpenResponsesNonStreamingResponseTypedDict - r"""Complete non-streaming response from the Responses API""" - sequence_number: float - - -class OpenResponsesStreamEventResponseInProgress(BaseModel): - r"""Event emitted when a response is in progress""" - - type: TypeResponseInProgress - - response: OpenResponsesNonStreamingResponse - r"""Complete non-streaming response from the Responses API""" - - sequence_number: float - - -TypeResponseCreated = Literal["response.created",] - - -class OpenResponsesStreamEventResponseCreatedTypedDict(TypedDict): - r"""Event emitted when a response is created""" - - type: TypeResponseCreated - response: OpenResponsesNonStreamingResponseTypedDict - r"""Complete non-streaming response from the Responses API""" - sequence_number: float - - -class OpenResponsesStreamEventResponseCreated(BaseModel): - r"""Event emitted when a response is created""" - - type: TypeResponseCreated - - response: OpenResponsesNonStreamingResponse - r"""Complete non-streaming response from the Responses API""" - - sequence_number: float - - -OpenResponsesStreamEventTypedDict = TypeAliasType( - "OpenResponsesStreamEventTypedDict", - Union[ - OpenResponsesStreamEventResponseCreatedTypedDict, - OpenResponsesStreamEventResponseInProgressTypedDict, - OpenResponsesStreamEventResponseCompletedTypedDict, - OpenResponsesStreamEventResponseIncompleteTypedDict, - OpenResponsesStreamEventResponseFailedTypedDict, - OpenResponsesStreamEventResponseOutputItemAddedTypedDict, - OpenResponsesStreamEventResponseOutputItemDoneTypedDict, - OpenResponsesImageGenCallCompletedTypedDict, - OpenResponsesImageGenCallGeneratingTypedDict, - OpenResponsesImageGenCallInProgressTypedDict, - OpenResponsesErrorEventTypedDict, - OpenResponsesStreamEventResponseFunctionCallArgumentsDeltaTypedDict, - OpenResponsesStreamEventResponseRefusalDeltaTypedDict, - OpenResponsesReasoningSummaryPartAddedEventTypedDict, - OpenResponsesStreamEventResponseContentPartAddedTypedDict, - OpenResponsesImageGenCallPartialImageTypedDict, - OpenResponsesStreamEventResponseFunctionCallArgumentsDoneTypedDict, - OpenResponsesReasoningDeltaEventTypedDict, - OpenResponsesReasoningDoneEventTypedDict, - OpenResponsesStreamEventResponseRefusalDoneTypedDict, - OpenResponsesStreamEventResponseReasoningSummaryPartDoneTypedDict, - OpenResponsesReasoningSummaryTextDeltaEventTypedDict, - OpenResponsesReasoningSummaryTextDoneEventTypedDict, - OpenResponsesStreamEventResponseContentPartDoneTypedDict, - OpenResponsesStreamEventResponseOutputTextDeltaTypedDict, - OpenResponsesStreamEventResponseOutputTextDoneTypedDict, - OpenResponsesStreamEventResponseOutputTextAnnotationAddedTypedDict, - ], -) -r"""Union of all possible event types emitted during response streaming""" - - -OpenResponsesStreamEvent = Annotated[ - Union[ - Annotated[OpenResponsesStreamEventResponseCreated, Tag("response.created")], - Annotated[ - OpenResponsesStreamEventResponseInProgress, Tag("response.in_progress") - ], - Annotated[OpenResponsesStreamEventResponseCompleted, Tag("response.completed")], - Annotated[ - OpenResponsesStreamEventResponseIncomplete, Tag("response.incomplete") - ], - Annotated[OpenResponsesStreamEventResponseFailed, Tag("response.failed")], - Annotated[OpenResponsesErrorEvent, Tag("error")], - Annotated[ - OpenResponsesStreamEventResponseOutputItemAdded, - Tag("response.output_item.added"), - ], - Annotated[ - OpenResponsesStreamEventResponseOutputItemDone, - Tag("response.output_item.done"), - ], - Annotated[ - OpenResponsesStreamEventResponseContentPartAdded, - Tag("response.content_part.added"), - ], - Annotated[ - OpenResponsesStreamEventResponseContentPartDone, - Tag("response.content_part.done"), - ], - Annotated[ - OpenResponsesStreamEventResponseOutputTextDelta, - Tag("response.output_text.delta"), - ], - Annotated[ - OpenResponsesStreamEventResponseOutputTextDone, - Tag("response.output_text.done"), - ], - Annotated[ - OpenResponsesStreamEventResponseRefusalDelta, Tag("response.refusal.delta") - ], - Annotated[ - OpenResponsesStreamEventResponseRefusalDone, Tag("response.refusal.done") - ], - Annotated[ - OpenResponsesStreamEventResponseOutputTextAnnotationAdded, - Tag("response.output_text.annotation.added"), - ], - Annotated[ - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta, - Tag("response.function_call_arguments.delta"), - ], - Annotated[ - OpenResponsesStreamEventResponseFunctionCallArgumentsDone, - Tag("response.function_call_arguments.done"), - ], - Annotated[ - OpenResponsesReasoningDeltaEvent, Tag("response.reasoning_text.delta") - ], - Annotated[OpenResponsesReasoningDoneEvent, Tag("response.reasoning_text.done")], - Annotated[ - OpenResponsesReasoningSummaryPartAddedEvent, - Tag("response.reasoning_summary_part.added"), - ], - Annotated[ - OpenResponsesStreamEventResponseReasoningSummaryPartDone, - Tag("response.reasoning_summary_part.done"), - ], - Annotated[ - OpenResponsesReasoningSummaryTextDeltaEvent, - Tag("response.reasoning_summary_text.delta"), - ], - Annotated[ - OpenResponsesReasoningSummaryTextDoneEvent, - Tag("response.reasoning_summary_text.done"), - ], - Annotated[ - OpenResponsesImageGenCallInProgress, - Tag("response.image_generation_call.in_progress"), - ], - Annotated[ - OpenResponsesImageGenCallGenerating, - Tag("response.image_generation_call.generating"), - ], - Annotated[ - OpenResponsesImageGenCallPartialImage, - Tag("response.image_generation_call.partial_image"), - ], - Annotated[ - OpenResponsesImageGenCallCompleted, - Tag("response.image_generation_call.completed"), - ], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] -r"""Union of all possible event types emitted during response streaming""" diff --git a/src/openrouter/components/openresponsestoplogprobs.py b/src/openrouter/components/openresponsestoplogprobs.py deleted file mode 100644 index 5e27a3d..0000000 --- a/src/openrouter/components/openresponsestoplogprobs.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Optional -from typing_extensions import NotRequired, TypedDict - - -class OpenResponsesTopLogprobsTypedDict(TypedDict): - r"""Alternative token with its log probability""" - - token: NotRequired[str] - logprob: NotRequired[float] - - -class OpenResponsesTopLogprobs(BaseModel): - r"""Alternative token with its log probability""" - - token: Optional[str] = None - - logprob: Optional[float] = None diff --git a/src/openrouter/components/openresponsesusage.py b/src/openrouter/components/openresponsesusage.py deleted file mode 100644 index 084e1c4..0000000 --- a/src/openrouter/components/openresponsesusage.py +++ /dev/null @@ -1,140 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict - - -class InputTokensDetailsTypedDict(TypedDict): - cached_tokens: float - - -class InputTokensDetails(BaseModel): - cached_tokens: float - - -class OutputTokensDetailsTypedDict(TypedDict): - reasoning_tokens: float - - -class OutputTokensDetails(BaseModel): - reasoning_tokens: float - - -class CostDetailsTypedDict(TypedDict): - upstream_inference_input_cost: float - upstream_inference_output_cost: float - upstream_inference_cost: NotRequired[Nullable[float]] - - -class CostDetails(BaseModel): - upstream_inference_input_cost: float - - upstream_inference_output_cost: float - - upstream_inference_cost: OptionalNullable[float] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["upstream_inference_cost"] - nullable_fields = ["upstream_inference_cost"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -class OpenResponsesUsageTypedDict(TypedDict): - r"""Token usage information for the response""" - - input_tokens: float - input_tokens_details: InputTokensDetailsTypedDict - output_tokens: float - output_tokens_details: OutputTokensDetailsTypedDict - total_tokens: float - cost: NotRequired[Nullable[float]] - r"""Cost of the completion""" - is_byok: NotRequired[bool] - r"""Whether a request was made using a Bring Your Own Key configuration""" - cost_details: NotRequired[CostDetailsTypedDict] - - -class OpenResponsesUsage(BaseModel): - r"""Token usage information for the response""" - - input_tokens: float - - input_tokens_details: InputTokensDetails - - output_tokens: float - - output_tokens_details: OutputTokensDetails - - total_tokens: float - - cost: OptionalNullable[float] = UNSET - r"""Cost of the completion""" - - is_byok: Optional[bool] = None - r"""Whether a request was made using a Bring Your Own Key configuration""" - - cost_details: Optional[CostDetails] = None - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["cost", "is_byok", "cost_details"] - nullable_fields = ["cost"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponseswebsearch20250826tool.py b/src/openrouter/components/openresponseswebsearch20250826tool.py deleted file mode 100644 index 671afdf..0000000 --- a/src/openrouter/components/openresponseswebsearch20250826tool.py +++ /dev/null @@ -1,118 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responsessearchcontextsize import ResponsesSearchContextSize -from .responseswebsearchuserlocation import ( - ResponsesWebSearchUserLocation, - ResponsesWebSearchUserLocationTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import List, Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -OpenResponsesWebSearch20250826ToolType = Literal["web_search_2025_08_26",] - - -class OpenResponsesWebSearch20250826ToolFiltersTypedDict(TypedDict): - allowed_domains: NotRequired[Nullable[List[str]]] - - -class OpenResponsesWebSearch20250826ToolFilters(BaseModel): - allowed_domains: OptionalNullable[List[str]] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["allowed_domains"] - nullable_fields = ["allowed_domains"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -class OpenResponsesWebSearch20250826ToolTypedDict(TypedDict): - r"""Web search tool configuration (2025-08-26 version)""" - - type: OpenResponsesWebSearch20250826ToolType - filters: NotRequired[Nullable[OpenResponsesWebSearch20250826ToolFiltersTypedDict]] - search_context_size: NotRequired[ResponsesSearchContextSize] - r"""Size of the search context for web search tools""" - user_location: NotRequired[Nullable[ResponsesWebSearchUserLocationTypedDict]] - r"""User location information for web search""" - - -class OpenResponsesWebSearch20250826Tool(BaseModel): - r"""Web search tool configuration (2025-08-26 version)""" - - type: OpenResponsesWebSearch20250826ToolType - - filters: OptionalNullable[OpenResponsesWebSearch20250826ToolFilters] = UNSET - - search_context_size: Annotated[ - Optional[ResponsesSearchContextSize], PlainValidator(validate_open_enum(False)) - ] = None - r"""Size of the search context for web search tools""" - - user_location: OptionalNullable[ResponsesWebSearchUserLocation] = UNSET - r"""User location information for web search""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["filters", "search_context_size", "user_location"] - nullable_fields = ["filters", "user_location"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponseswebsearchpreview20250311tool.py b/src/openrouter/components/openresponseswebsearchpreview20250311tool.py deleted file mode 100644 index 38803d8..0000000 --- a/src/openrouter/components/openresponseswebsearchpreview20250311tool.py +++ /dev/null @@ -1,77 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responsessearchcontextsize import ResponsesSearchContextSize -from .websearchpreviewtooluserlocation import ( - WebSearchPreviewToolUserLocation, - WebSearchPreviewToolUserLocationTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -OpenResponsesWebSearchPreview20250311ToolType = Literal[ - "web_search_preview_2025_03_11", -] - - -class OpenResponsesWebSearchPreview20250311ToolTypedDict(TypedDict): - r"""Web search preview tool configuration (2025-03-11 version)""" - - type: OpenResponsesWebSearchPreview20250311ToolType - search_context_size: NotRequired[ResponsesSearchContextSize] - r"""Size of the search context for web search tools""" - user_location: NotRequired[Nullable[WebSearchPreviewToolUserLocationTypedDict]] - - -class OpenResponsesWebSearchPreview20250311Tool(BaseModel): - r"""Web search preview tool configuration (2025-03-11 version)""" - - type: OpenResponsesWebSearchPreview20250311ToolType - - search_context_size: Annotated[ - Optional[ResponsesSearchContextSize], PlainValidator(validate_open_enum(False)) - ] = None - r"""Size of the search context for web search tools""" - - user_location: OptionalNullable[WebSearchPreviewToolUserLocation] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["search_context_size", "user_location"] - nullable_fields = ["user_location"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponseswebsearchpreviewtool.py b/src/openrouter/components/openresponseswebsearchpreviewtool.py deleted file mode 100644 index 2c074cd..0000000 --- a/src/openrouter/components/openresponseswebsearchpreviewtool.py +++ /dev/null @@ -1,75 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responsessearchcontextsize import ResponsesSearchContextSize -from .websearchpreviewtooluserlocation import ( - WebSearchPreviewToolUserLocation, - WebSearchPreviewToolUserLocationTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -OpenResponsesWebSearchPreviewToolType = Literal["web_search_preview",] - - -class OpenResponsesWebSearchPreviewToolTypedDict(TypedDict): - r"""Web search preview tool configuration""" - - type: OpenResponsesWebSearchPreviewToolType - search_context_size: NotRequired[ResponsesSearchContextSize] - r"""Size of the search context for web search tools""" - user_location: NotRequired[Nullable[WebSearchPreviewToolUserLocationTypedDict]] - - -class OpenResponsesWebSearchPreviewTool(BaseModel): - r"""Web search preview tool configuration""" - - type: OpenResponsesWebSearchPreviewToolType - - search_context_size: Annotated[ - Optional[ResponsesSearchContextSize], PlainValidator(validate_open_enum(False)) - ] = None - r"""Size of the search context for web search tools""" - - user_location: OptionalNullable[WebSearchPreviewToolUserLocation] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["search_context_size", "user_location"] - nullable_fields = ["user_location"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/openresponseswebsearchtool.py b/src/openrouter/components/openresponseswebsearchtool.py deleted file mode 100644 index 0c93a22..0000000 --- a/src/openrouter/components/openresponseswebsearchtool.py +++ /dev/null @@ -1,118 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responsessearchcontextsize import ResponsesSearchContextSize -from .responseswebsearchuserlocation import ( - ResponsesWebSearchUserLocation, - ResponsesWebSearchUserLocationTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import List, Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -OpenResponsesWebSearchToolType = Literal["web_search",] - - -class OpenResponsesWebSearchToolFiltersTypedDict(TypedDict): - allowed_domains: NotRequired[Nullable[List[str]]] - - -class OpenResponsesWebSearchToolFilters(BaseModel): - allowed_domains: OptionalNullable[List[str]] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["allowed_domains"] - nullable_fields = ["allowed_domains"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -class OpenResponsesWebSearchToolTypedDict(TypedDict): - r"""Web search tool configuration""" - - type: OpenResponsesWebSearchToolType - filters: NotRequired[Nullable[OpenResponsesWebSearchToolFiltersTypedDict]] - search_context_size: NotRequired[ResponsesSearchContextSize] - r"""Size of the search context for web search tools""" - user_location: NotRequired[Nullable[ResponsesWebSearchUserLocationTypedDict]] - r"""User location information for web search""" - - -class OpenResponsesWebSearchTool(BaseModel): - r"""Web search tool configuration""" - - type: OpenResponsesWebSearchToolType - - filters: OptionalNullable[OpenResponsesWebSearchToolFilters] = UNSET - - search_context_size: Annotated[ - Optional[ResponsesSearchContextSize], PlainValidator(validate_open_enum(False)) - ] = None - r"""Size of the search context for web search tools""" - - user_location: OptionalNullable[ResponsesWebSearchUserLocation] = UNSET - r"""User location information for web search""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["filters", "search_context_size", "user_location"] - nullable_fields = ["filters", "user_location"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/reasoningsummaryverbosity.py b/src/openrouter/components/reasoningsummaryverbosity.py deleted file mode 100644 index 6ed1f76..0000000 --- a/src/openrouter/components/reasoningsummaryverbosity.py +++ /dev/null @@ -1,15 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import UnrecognizedStr -from typing import Literal, Union - - -ReasoningSummaryVerbosity = Union[ - Literal[ - "auto", - "concise", - "detailed", - ], - UnrecognizedStr, -] diff --git a/src/openrouter/components/responseformatjsonobject.py b/src/openrouter/components/responseformatjsonobject.py deleted file mode 100644 index ed3e1a6..0000000 --- a/src/openrouter/components/responseformatjsonobject.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -ResponseFormatJSONObjectType = Literal["json_object",] - - -class ResponseFormatJSONObjectTypedDict(TypedDict): - r"""JSON object response format""" - - type: ResponseFormatJSONObjectType - - -class ResponseFormatJSONObject(BaseModel): - r"""JSON object response format""" - - type: ResponseFormatJSONObjectType diff --git a/src/openrouter/components/responseformatjsonschema.py b/src/openrouter/components/responseformatjsonschema.py deleted file mode 100644 index 0dac22e..0000000 --- a/src/openrouter/components/responseformatjsonschema.py +++ /dev/null @@ -1,27 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .jsonschemaconfig import JSONSchemaConfig, JSONSchemaConfigTypedDict -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -ResponseFormatJSONSchemaType = Literal["json_schema",] - - -class ResponseFormatJSONSchemaTypedDict(TypedDict): - r"""JSON Schema response format for structured outputs""" - - type: ResponseFormatJSONSchemaType - json_schema: JSONSchemaConfigTypedDict - r"""JSON Schema configuration object""" - - -class ResponseFormatJSONSchema(BaseModel): - r"""JSON Schema response format for structured outputs""" - - type: ResponseFormatJSONSchemaType - - json_schema: JSONSchemaConfig - r"""JSON Schema configuration object""" diff --git a/src/openrouter/components/responseformattext.py b/src/openrouter/components/responseformattext.py deleted file mode 100644 index b369722..0000000 --- a/src/openrouter/components/responseformattext.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -ResponseFormatTextType = Literal["text",] - - -class ResponseFormatTextTypedDict(TypedDict): - r"""Default text response format""" - - type: ResponseFormatTextType - - -class ResponseFormatText(BaseModel): - r"""Default text response format""" - - type: ResponseFormatTextType diff --git a/src/openrouter/components/responseformattextconfig.py b/src/openrouter/components/responseformattextconfig.py deleted file mode 100644 index 4f4346a..0000000 --- a/src/openrouter/components/responseformattextconfig.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responseformatjsonobject import ( - ResponseFormatJSONObject, - ResponseFormatJSONObjectTypedDict, -) -from .responsesformattext import ResponsesFormatText, ResponsesFormatTextTypedDict -from .responsesformattextjsonschemaconfig import ( - ResponsesFormatTextJSONSchemaConfig, - ResponsesFormatTextJSONSchemaConfigTypedDict, -) -from openrouter.utils import get_discriminator -from pydantic import Discriminator, Tag -from typing import Union -from typing_extensions import Annotated, TypeAliasType - - -ResponseFormatTextConfigTypedDict = TypeAliasType( - "ResponseFormatTextConfigTypedDict", - Union[ - ResponsesFormatTextTypedDict, - ResponseFormatJSONObjectTypedDict, - ResponsesFormatTextJSONSchemaConfigTypedDict, - ], -) -r"""Text response format configuration""" - - -ResponseFormatTextConfig = Annotated[ - Union[ - Annotated[ResponsesFormatText, Tag("text")], - Annotated[ResponseFormatJSONObject, Tag("json_object")], - Annotated[ResponsesFormatTextJSONSchemaConfig, Tag("json_schema")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] -r"""Text response format configuration""" diff --git a/src/openrouter/components/responseformattextgrammar.py b/src/openrouter/components/responseformattextgrammar.py deleted file mode 100644 index 4ae8030..0000000 --- a/src/openrouter/components/responseformattextgrammar.py +++ /dev/null @@ -1,26 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -ResponseFormatTextGrammarType = Literal["grammar",] - - -class ResponseFormatTextGrammarTypedDict(TypedDict): - r"""Custom grammar response format""" - - type: ResponseFormatTextGrammarType - grammar: str - r"""Custom grammar for text generation""" - - -class ResponseFormatTextGrammar(BaseModel): - r"""Custom grammar response format""" - - type: ResponseFormatTextGrammarType - - grammar: str - r"""Custom grammar for text generation""" diff --git a/src/openrouter/components/responseformattextpython.py b/src/openrouter/components/responseformattextpython.py deleted file mode 100644 index 4654eb6..0000000 --- a/src/openrouter/components/responseformattextpython.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -ResponseFormatTextPythonType = Literal["python",] - - -class ResponseFormatTextPythonTypedDict(TypedDict): - r"""Python code response format""" - - type: ResponseFormatTextPythonType - - -class ResponseFormatTextPython(BaseModel): - r"""Python code response format""" - - type: ResponseFormatTextPythonType diff --git a/src/openrouter/components/responseinputaudio.py b/src/openrouter/components/responseinputaudio.py deleted file mode 100644 index 3d375e3..0000000 --- a/src/openrouter/components/responseinputaudio.py +++ /dev/null @@ -1,50 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel, UnrecognizedStr -from openrouter.utils import validate_open_enum -import pydantic -from pydantic.functional_validators import PlainValidator -from typing import Literal, Union -from typing_extensions import Annotated, TypedDict - - -ResponseInputAudioType = Literal["input_audio",] - - -ResponseInputAudioFormat = Union[ - Literal[ - "mp3", - "wav", - ], - UnrecognizedStr, -] - - -class ResponseInputAudioInputAudioTypedDict(TypedDict): - data: str - format_: ResponseInputAudioFormat - - -class ResponseInputAudioInputAudio(BaseModel): - data: str - - format_: Annotated[ - Annotated[ResponseInputAudioFormat, PlainValidator(validate_open_enum(False))], - pydantic.Field(alias="format"), - ] - - -class ResponseInputAudioTypedDict(TypedDict): - r"""Audio input content item""" - - type: ResponseInputAudioType - input_audio: ResponseInputAudioInputAudioTypedDict - - -class ResponseInputAudio(BaseModel): - r"""Audio input content item""" - - type: ResponseInputAudioType - - input_audio: ResponseInputAudioInputAudio diff --git a/src/openrouter/components/responseinputimage.py b/src/openrouter/components/responseinputimage.py deleted file mode 100644 index d2cbfed..0000000 --- a/src/openrouter/components/responseinputimage.py +++ /dev/null @@ -1,79 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Literal, Union -from typing_extensions import Annotated, NotRequired, TypedDict - - -ResponseInputImageType = Literal["input_image",] - - -ResponseInputImageDetail = Union[ - Literal[ - "auto", - "high", - "low", - ], - UnrecognizedStr, -] - - -class ResponseInputImageTypedDict(TypedDict): - r"""Image input content item""" - - type: ResponseInputImageType - detail: ResponseInputImageDetail - image_url: NotRequired[Nullable[str]] - - -class ResponseInputImage(BaseModel): - r"""Image input content item""" - - type: ResponseInputImageType - - detail: Annotated[ - ResponseInputImageDetail, PlainValidator(validate_open_enum(False)) - ] - - image_url: OptionalNullable[str] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["image_url"] - nullable_fields = ["image_url"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/responseinputtext.py b/src/openrouter/components/responseinputtext.py deleted file mode 100644 index 0e643e5..0000000 --- a/src/openrouter/components/responseinputtext.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -ResponseInputTextType = Literal["input_text",] - - -class ResponseInputTextTypedDict(TypedDict): - r"""Text input content item""" - - type: ResponseInputTextType - text: str - - -class ResponseInputText(BaseModel): - r"""Text input content item""" - - type: ResponseInputTextType - - text: str diff --git a/src/openrouter/components/responseinputvideo.py b/src/openrouter/components/responseinputvideo.py deleted file mode 100644 index e6ce718..0000000 --- a/src/openrouter/components/responseinputvideo.py +++ /dev/null @@ -1,26 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -ResponseInputVideoType = Literal["input_video",] - - -class ResponseInputVideoTypedDict(TypedDict): - r"""Video input content item""" - - type: ResponseInputVideoType - video_url: str - r"""A base64 data URL or remote URL that resolves to a video file""" - - -class ResponseInputVideo(BaseModel): - r"""Video input content item""" - - type: ResponseInputVideoType - - video_url: str - r"""A base64 data URL or remote URL that resolves to a video file""" diff --git a/src/openrouter/components/responsesformattext.py b/src/openrouter/components/responsesformattext.py deleted file mode 100644 index ac1382e..0000000 --- a/src/openrouter/components/responsesformattext.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal -from typing_extensions import TypedDict - - -ResponsesFormatTextType = Literal["text",] - - -class ResponsesFormatTextTypedDict(TypedDict): - r"""Plain text response format""" - - type: ResponsesFormatTextType - - -class ResponsesFormatText(BaseModel): - r"""Plain text response format""" - - type: ResponsesFormatTextType diff --git a/src/openrouter/components/responsesformattextjsonschemaconfig.py b/src/openrouter/components/responsesformattextjsonschemaconfig.py deleted file mode 100644 index d1e2aa2..0000000 --- a/src/openrouter/components/responsesformattextjsonschemaconfig.py +++ /dev/null @@ -1,71 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -import pydantic -from pydantic import model_serializer -from typing import Any, Dict, Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -ResponsesFormatTextJSONSchemaConfigType = Literal["json_schema",] - - -class ResponsesFormatTextJSONSchemaConfigTypedDict(TypedDict): - r"""JSON schema constrained response format""" - - type: ResponsesFormatTextJSONSchemaConfigType - name: str - schema_: Dict[str, Nullable[Any]] - description: NotRequired[str] - strict: NotRequired[Nullable[bool]] - - -class ResponsesFormatTextJSONSchemaConfig(BaseModel): - r"""JSON schema constrained response format""" - - type: ResponsesFormatTextJSONSchemaConfigType - - name: str - - schema_: Annotated[Dict[str, Nullable[Any]], pydantic.Field(alias="schema")] - - description: Optional[str] = None - - strict: OptionalNullable[bool] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["description", "strict"] - nullable_fields = ["strict"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/responsesimagegenerationcall.py b/src/openrouter/components/responsesimagegenerationcall.py deleted file mode 100644 index f26fefd..0000000 --- a/src/openrouter/components/responsesimagegenerationcall.py +++ /dev/null @@ -1,60 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .imagegenerationstatus import ImageGenerationStatus -from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET_SENTINEL -from openrouter.utils import validate_open_enum -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Literal -from typing_extensions import Annotated, NotRequired, TypedDict - - -ResponsesImageGenerationCallType = Literal["image_generation_call",] - - -class ResponsesImageGenerationCallTypedDict(TypedDict): - type: ResponsesImageGenerationCallType - id: str - status: ImageGenerationStatus - result: NotRequired[Nullable[str]] - - -class ResponsesImageGenerationCall(BaseModel): - type: ResponsesImageGenerationCallType - - id: str - - status: Annotated[ImageGenerationStatus, PlainValidator(validate_open_enum(False))] - - result: OptionalNullable[str] = None - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["result"] - nullable_fields = ["result"] - null_default_fields = ["result"] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/responsesoutputitem.py b/src/openrouter/components/responsesoutputitem.py deleted file mode 100644 index 5aff987..0000000 --- a/src/openrouter/components/responsesoutputitem.py +++ /dev/null @@ -1,59 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responsesimagegenerationcall import ( - ResponsesImageGenerationCall, - ResponsesImageGenerationCallTypedDict, -) -from .responsesoutputitemfilesearchcall import ( - ResponsesOutputItemFileSearchCall, - ResponsesOutputItemFileSearchCallTypedDict, -) -from .responsesoutputitemfunctioncall import ( - ResponsesOutputItemFunctionCall, - ResponsesOutputItemFunctionCallTypedDict, -) -from .responsesoutputitemreasoning import ( - ResponsesOutputItemReasoning, - ResponsesOutputItemReasoningTypedDict, -) -from .responsesoutputmessage import ( - ResponsesOutputMessage, - ResponsesOutputMessageTypedDict, -) -from .responseswebsearchcalloutput import ( - ResponsesWebSearchCallOutput, - ResponsesWebSearchCallOutputTypedDict, -) -from openrouter.utils import get_discriminator -from pydantic import Discriminator, Tag -from typing import Union -from typing_extensions import Annotated, TypeAliasType - - -ResponsesOutputItemTypedDict = TypeAliasType( - "ResponsesOutputItemTypedDict", - Union[ - ResponsesWebSearchCallOutputTypedDict, - ResponsesOutputItemFileSearchCallTypedDict, - ResponsesImageGenerationCallTypedDict, - ResponsesOutputMessageTypedDict, - ResponsesOutputItemFunctionCallTypedDict, - ResponsesOutputItemReasoningTypedDict, - ], -) -r"""An output item from the response""" - - -ResponsesOutputItem = Annotated[ - Union[ - Annotated[ResponsesOutputMessage, Tag("message")], - Annotated[ResponsesOutputItemReasoning, Tag("reasoning")], - Annotated[ResponsesOutputItemFunctionCall, Tag("function_call")], - Annotated[ResponsesWebSearchCallOutput, Tag("web_search_call")], - Annotated[ResponsesOutputItemFileSearchCall, Tag("file_search_call")], - Annotated[ResponsesImageGenerationCall, Tag("image_generation_call")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] -r"""An output item from the response""" diff --git a/src/openrouter/components/responsesoutputitemfilesearchcall.py b/src/openrouter/components/responsesoutputitemfilesearchcall.py deleted file mode 100644 index cdc59cc..0000000 --- a/src/openrouter/components/responsesoutputitemfilesearchcall.py +++ /dev/null @@ -1,29 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .websearchstatus import WebSearchStatus -from openrouter.types import BaseModel -from openrouter.utils import validate_open_enum -from pydantic.functional_validators import PlainValidator -from typing import List, Literal -from typing_extensions import Annotated, TypedDict - - -ResponsesOutputItemFileSearchCallType = Literal["file_search_call",] - - -class ResponsesOutputItemFileSearchCallTypedDict(TypedDict): - type: ResponsesOutputItemFileSearchCallType - id: str - queries: List[str] - status: WebSearchStatus - - -class ResponsesOutputItemFileSearchCall(BaseModel): - type: ResponsesOutputItemFileSearchCallType - - id: str - - queries: List[str] - - status: Annotated[WebSearchStatus, PlainValidator(validate_open_enum(False))] diff --git a/src/openrouter/components/responsesoutputitemfunctioncall.py b/src/openrouter/components/responsesoutputitemfunctioncall.py deleted file mode 100644 index b7d5b06..0000000 --- a/src/openrouter/components/responsesoutputitemfunctioncall.py +++ /dev/null @@ -1,61 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing import Literal, Optional, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict - - -ResponsesOutputItemFunctionCallType = Literal["function_call",] - - -ResponsesOutputItemFunctionCallStatusInProgress = Literal["in_progress",] - - -ResponsesOutputItemFunctionCallStatusIncomplete = Literal["incomplete",] - - -ResponsesOutputItemFunctionCallStatusCompleted = Literal["completed",] - - -ResponsesOutputItemFunctionCallStatusUnionTypedDict = TypeAliasType( - "ResponsesOutputItemFunctionCallStatusUnionTypedDict", - Union[ - ResponsesOutputItemFunctionCallStatusCompleted, - ResponsesOutputItemFunctionCallStatusIncomplete, - ResponsesOutputItemFunctionCallStatusInProgress, - ], -) - - -ResponsesOutputItemFunctionCallStatusUnion = TypeAliasType( - "ResponsesOutputItemFunctionCallStatusUnion", - Union[ - ResponsesOutputItemFunctionCallStatusCompleted, - ResponsesOutputItemFunctionCallStatusIncomplete, - ResponsesOutputItemFunctionCallStatusInProgress, - ], -) - - -class ResponsesOutputItemFunctionCallTypedDict(TypedDict): - type: ResponsesOutputItemFunctionCallType - name: str - arguments: str - call_id: str - id: NotRequired[str] - status: NotRequired[ResponsesOutputItemFunctionCallStatusUnionTypedDict] - - -class ResponsesOutputItemFunctionCall(BaseModel): - type: ResponsesOutputItemFunctionCallType - - name: str - - arguments: str - - call_id: str - - id: Optional[str] = None - - status: Optional[ResponsesOutputItemFunctionCallStatusUnion] = None diff --git a/src/openrouter/components/responsesoutputitemreasoning.py b/src/openrouter/components/responsesoutputitemreasoning.py deleted file mode 100644 index b0c8a9c..0000000 --- a/src/openrouter/components/responsesoutputitemreasoning.py +++ /dev/null @@ -1,144 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict -from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import validate_open_enum -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -ResponsesOutputItemReasoningType = Literal["reasoning",] - - -ResponsesOutputItemReasoningStatusInProgress = Literal["in_progress",] - - -ResponsesOutputItemReasoningStatusIncomplete = Literal["incomplete",] - - -ResponsesOutputItemReasoningStatusCompleted = Literal["completed",] - - -ResponsesOutputItemReasoningStatusUnionTypedDict = TypeAliasType( - "ResponsesOutputItemReasoningStatusUnionTypedDict", - Union[ - ResponsesOutputItemReasoningStatusCompleted, - ResponsesOutputItemReasoningStatusIncomplete, - ResponsesOutputItemReasoningStatusInProgress, - ], -) - - -ResponsesOutputItemReasoningStatusUnion = TypeAliasType( - "ResponsesOutputItemReasoningStatusUnion", - Union[ - ResponsesOutputItemReasoningStatusCompleted, - ResponsesOutputItemReasoningStatusIncomplete, - ResponsesOutputItemReasoningStatusInProgress, - ], -) - - -ResponsesOutputItemReasoningFormat = Union[ - Literal[ - "unknown", - "openai-responses-v1", - "azure-openai-responses-v1", - "xai-responses-v1", - "anthropic-claude-v1", - "google-gemini-v1", - ], - UnrecognizedStr, -] -r"""The format of the reasoning content""" - - -class ResponsesOutputItemReasoningTypedDict(TypedDict): - r"""An output item containing reasoning""" - - type: ResponsesOutputItemReasoningType - id: str - summary: List[ReasoningSummaryTextTypedDict] - content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]] - encrypted_content: NotRequired[Nullable[str]] - status: NotRequired[ResponsesOutputItemReasoningStatusUnionTypedDict] - signature: NotRequired[Nullable[str]] - r"""A signature for the reasoning content, used for verification""" - format_: NotRequired[Nullable[ResponsesOutputItemReasoningFormat]] - r"""The format of the reasoning content""" - - -class ResponsesOutputItemReasoning(BaseModel): - r"""An output item containing reasoning""" - - type: ResponsesOutputItemReasoningType - - id: str - - summary: List[ReasoningSummaryText] - - content: OptionalNullable[List[ReasoningTextContent]] = UNSET - - encrypted_content: OptionalNullable[str] = UNSET - - status: Optional[ResponsesOutputItemReasoningStatusUnion] = None - - signature: OptionalNullable[str] = UNSET - r"""A signature for the reasoning content, used for verification""" - - format_: Annotated[ - Annotated[ - OptionalNullable[ResponsesOutputItemReasoningFormat], - PlainValidator(validate_open_enum(False)), - ], - pydantic.Field(alias="format"), - ] = UNSET - r"""The format of the reasoning content""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "content", - "encrypted_content", - "status", - "signature", - "format", - ] - nullable_fields = ["content", "encrypted_content", "signature", "format"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/responsesoutputmessage.py b/src/openrouter/components/responsesoutputmessage.py deleted file mode 100644 index 5302365..0000000 --- a/src/openrouter/components/responsesoutputmessage.py +++ /dev/null @@ -1,156 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .openairesponsesrefusalcontent import ( - OpenAIResponsesRefusalContent, - OpenAIResponsesRefusalContentTypedDict, -) -from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import get_discriminator -from pydantic import Discriminator, Tag, model_serializer -from typing import Any, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -ResponsesOutputMessageRole = Literal["assistant",] - - -ResponsesOutputMessageType = Literal["message",] - - -ResponsesOutputMessageStatusInProgress = Literal["in_progress",] - - -ResponsesOutputMessageStatusIncomplete = Literal["incomplete",] - - -ResponsesOutputMessageStatusCompleted = Literal["completed",] - - -ResponsesOutputMessageStatusUnionTypedDict = TypeAliasType( - "ResponsesOutputMessageStatusUnionTypedDict", - Union[ - ResponsesOutputMessageStatusCompleted, - ResponsesOutputMessageStatusIncomplete, - ResponsesOutputMessageStatusInProgress, - ], -) - - -ResponsesOutputMessageStatusUnion = TypeAliasType( - "ResponsesOutputMessageStatusUnion", - Union[ - ResponsesOutputMessageStatusCompleted, - ResponsesOutputMessageStatusIncomplete, - ResponsesOutputMessageStatusInProgress, - ], -) - - -ResponsesOutputMessageContentTypedDict = TypeAliasType( - "ResponsesOutputMessageContentTypedDict", - Union[OpenAIResponsesRefusalContentTypedDict, ResponseOutputTextTypedDict], -) - - -ResponsesOutputMessageContent = Annotated[ - Union[ - Annotated[ResponseOutputText, Tag("output_text")], - Annotated[OpenAIResponsesRefusalContent, Tag("refusal")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -ResponsesOutputMessagePhaseFinalAnswer = Literal["final_answer",] - - -ResponsesOutputMessagePhaseCommentary = Literal["commentary",] - - -ResponsesOutputMessagePhaseUnionTypedDict = TypeAliasType( - "ResponsesOutputMessagePhaseUnionTypedDict", - Union[ - ResponsesOutputMessagePhaseCommentary, - ResponsesOutputMessagePhaseFinalAnswer, - Any, - ], -) -r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - -ResponsesOutputMessagePhaseUnion = TypeAliasType( - "ResponsesOutputMessagePhaseUnion", - Union[ - ResponsesOutputMessagePhaseCommentary, - ResponsesOutputMessagePhaseFinalAnswer, - Any, - ], -) -r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - -class ResponsesOutputMessageTypedDict(TypedDict): - r"""An output message item""" - - id: str - role: ResponsesOutputMessageRole - type: ResponsesOutputMessageType - content: List[ResponsesOutputMessageContentTypedDict] - status: NotRequired[ResponsesOutputMessageStatusUnionTypedDict] - phase: NotRequired[Nullable[ResponsesOutputMessagePhaseUnionTypedDict]] - r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - -class ResponsesOutputMessage(BaseModel): - r"""An output message item""" - - id: str - - role: ResponsesOutputMessageRole - - type: ResponsesOutputMessageType - - content: List[ResponsesOutputMessageContent] - - status: Optional[ResponsesOutputMessageStatusUnion] = None - - phase: OptionalNullable[ResponsesOutputMessagePhaseUnion] = UNSET - r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["status", "phase"] - nullable_fields = ["phase"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/responsesoutputmodality.py b/src/openrouter/components/responsesoutputmodality.py deleted file mode 100644 index a259061..0000000 --- a/src/openrouter/components/responsesoutputmodality.py +++ /dev/null @@ -1,14 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import UnrecognizedStr -from typing import Literal, Union - - -ResponsesOutputModality = Union[ - Literal[ - "text", - "image", - ], - UnrecognizedStr, -] diff --git a/src/openrouter/components/responsessearchcontextsize.py b/src/openrouter/components/responsessearchcontextsize.py deleted file mode 100644 index 3395638..0000000 --- a/src/openrouter/components/responsessearchcontextsize.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import UnrecognizedStr -from typing import Literal, Union - - -ResponsesSearchContextSize = Union[ - Literal[ - "low", - "medium", - "high", - ], - UnrecognizedStr, -] -r"""Size of the search context for web search tools""" diff --git a/src/openrouter/components/responseswebsearchcalloutput.py b/src/openrouter/components/responseswebsearchcalloutput.py deleted file mode 100644 index 1998402..0000000 --- a/src/openrouter/components/responseswebsearchcalloutput.py +++ /dev/null @@ -1,147 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .websearchstatus import WebSearchStatus -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from openrouter.utils import get_discriminator, validate_open_enum -from pydantic import Discriminator, Tag, model_serializer -from pydantic.functional_validators import PlainValidator -from typing import List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -TypeWebSearchCall = Literal["web_search_call",] - - -TypeFindInPage = Literal["find_in_page",] - - -class ActionFindInPageTypedDict(TypedDict): - type: TypeFindInPage - pattern: str - url: str - - -class ActionFindInPage(BaseModel): - type: TypeFindInPage - - pattern: str - - url: str - - -TypeOpenPage = Literal["open_page",] - - -class ActionOpenPageTypedDict(TypedDict): - type: TypeOpenPage - url: NotRequired[Nullable[str]] - - -class ActionOpenPage(BaseModel): - type: TypeOpenPage - - url: OptionalNullable[str] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["url"] - nullable_fields = ["url"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -TypeSearch = Literal["search",] - - -TypeURL = Literal["url",] - - -class SourceTypedDict(TypedDict): - type: TypeURL - url: str - - -class Source(BaseModel): - type: TypeURL - - url: str - - -class ActionSearchTypedDict(TypedDict): - type: TypeSearch - query: str - queries: NotRequired[List[str]] - sources: NotRequired[List[SourceTypedDict]] - - -class ActionSearch(BaseModel): - type: TypeSearch - - query: str - - queries: Optional[List[str]] = None - - sources: Optional[List[Source]] = None - - -ActionTypedDict = TypeAliasType( - "ActionTypedDict", - Union[ActionOpenPageTypedDict, ActionFindInPageTypedDict, ActionSearchTypedDict], -) - - -Action = Annotated[ - Union[ - Annotated[ActionSearch, Tag("search")], - Annotated[ActionOpenPage, Tag("open_page")], - Annotated[ActionFindInPage, Tag("find_in_page")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] - - -class ResponsesWebSearchCallOutputTypedDict(TypedDict): - type: TypeWebSearchCall - id: str - action: ActionTypedDict - status: WebSearchStatus - - -class ResponsesWebSearchCallOutput(BaseModel): - type: TypeWebSearchCall - - id: str - - action: Action - - status: Annotated[WebSearchStatus, PlainValidator(validate_open_enum(False))] diff --git a/src/openrouter/components/responseswebsearchuserlocation.py b/src/openrouter/components/responseswebsearchuserlocation.py deleted file mode 100644 index 707cf15..0000000 --- a/src/openrouter/components/responseswebsearchuserlocation.py +++ /dev/null @@ -1,70 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -ResponsesWebSearchUserLocationType = Literal["approximate",] - - -class ResponsesWebSearchUserLocationTypedDict(TypedDict): - r"""User location information for web search""" - - type: NotRequired[ResponsesWebSearchUserLocationType] - city: NotRequired[Nullable[str]] - country: NotRequired[Nullable[str]] - region: NotRequired[Nullable[str]] - timezone: NotRequired[Nullable[str]] - - -class ResponsesWebSearchUserLocation(BaseModel): - r"""User location information for web search""" - - type: Optional[ResponsesWebSearchUserLocationType] = None - - city: OptionalNullable[str] = UNSET - - country: OptionalNullable[str] = UNSET - - region: OptionalNullable[str] = UNSET - - timezone: OptionalNullable[str] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["type", "city", "country", "region", "timezone"] - nullable_fields = ["city", "country", "region", "timezone"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/responsetextconfig.py b/src/openrouter/components/responsetextconfig.py deleted file mode 100644 index 7b464d3..0000000 --- a/src/openrouter/components/responsetextconfig.py +++ /dev/null @@ -1,83 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .responseformattextconfig import ( - ResponseFormatTextConfig, - ResponseFormatTextConfigTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import validate_open_enum -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypedDict - - -ResponseTextConfigVerbosity = Union[ - Literal[ - "high", - "low", - "medium", - ], - UnrecognizedStr, -] - - -class ResponseTextConfigTypedDict(TypedDict): - r"""Text output configuration including format and verbosity""" - - format_: NotRequired[ResponseFormatTextConfigTypedDict] - r"""Text response format configuration""" - verbosity: NotRequired[Nullable[ResponseTextConfigVerbosity]] - - -class ResponseTextConfig(BaseModel): - r"""Text output configuration including format and verbosity""" - - format_: Annotated[ - Optional[ResponseFormatTextConfig], pydantic.Field(alias="format") - ] = None - r"""Text response format configuration""" - - verbosity: Annotated[ - OptionalNullable[ResponseTextConfigVerbosity], - PlainValidator(validate_open_enum(False)), - ] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["format", "verbosity"] - nullable_fields = ["verbosity"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/systemmessage.py b/src/openrouter/components/systemmessage.py deleted file mode 100644 index 6143e2e..0000000 --- a/src/openrouter/components/systemmessage.py +++ /dev/null @@ -1,48 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatmessagecontentitemtext import ( - ChatMessageContentItemText, - ChatMessageContentItemTextTypedDict, -) -from openrouter.types import BaseModel -from typing import List, Literal, Optional, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict - - -SystemMessageRole = Literal["system",] - - -SystemMessageContentTypedDict = TypeAliasType( - "SystemMessageContentTypedDict", - Union[str, List[ChatMessageContentItemTextTypedDict]], -) -r"""System message content""" - - -SystemMessageContent = TypeAliasType( - "SystemMessageContent", Union[str, List[ChatMessageContentItemText]] -) -r"""System message content""" - - -class SystemMessageTypedDict(TypedDict): - r"""System message for setting behavior""" - - role: SystemMessageRole - content: SystemMessageContentTypedDict - r"""System message content""" - name: NotRequired[str] - r"""Optional name for the system message""" - - -class SystemMessage(BaseModel): - r"""System message for setting behavior""" - - role: SystemMessageRole - - content: SystemMessageContent - r"""System message content""" - - name: Optional[str] = None - r"""Optional name for the system message""" diff --git a/src/openrouter/components/toolcallstatus.py b/src/openrouter/components/toolcallstatus.py deleted file mode 100644 index bbd8827..0000000 --- a/src/openrouter/components/toolcallstatus.py +++ /dev/null @@ -1,15 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import UnrecognizedStr -from typing import Literal, Union - - -ToolCallStatus = Union[ - Literal[ - "in_progress", - "completed", - "incomplete", - ], - UnrecognizedStr, -] diff --git a/src/openrouter/components/toolchoiceoption.py b/src/openrouter/components/toolchoiceoption.py deleted file mode 100644 index f280435..0000000 --- a/src/openrouter/components/toolchoiceoption.py +++ /dev/null @@ -1,39 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .namedtoolchoice import NamedToolChoice, NamedToolChoiceTypedDict -from typing import Literal, Union -from typing_extensions import TypeAliasType - - -ToolChoiceOptionRequired = Literal["required",] - - -ToolChoiceOptionAuto = Literal["auto",] - - -ToolChoiceOptionNone = Literal["none",] - - -ToolChoiceOptionTypedDict = TypeAliasType( - "ToolChoiceOptionTypedDict", - Union[ - NamedToolChoiceTypedDict, - ToolChoiceOptionNone, - ToolChoiceOptionAuto, - ToolChoiceOptionRequired, - ], -) -r"""Tool choice configuration""" - - -ToolChoiceOption = TypeAliasType( - "ToolChoiceOption", - Union[ - NamedToolChoice, - ToolChoiceOptionNone, - ToolChoiceOptionAuto, - ToolChoiceOptionRequired, - ], -) -r"""Tool choice configuration""" diff --git a/src/openrouter/components/tooldefinitionjson.py b/src/openrouter/components/tooldefinitionjson.py deleted file mode 100644 index 56f14a9..0000000 --- a/src/openrouter/components/tooldefinitionjson.py +++ /dev/null @@ -1,101 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatmessagecontentitemcachecontrol import ( - ChatMessageContentItemCacheControl, - ChatMessageContentItemCacheControlTypedDict, -) -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Any, Dict, Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -ToolDefinitionJSONType = Literal["function",] - - -class ToolDefinitionJSONFunctionTypedDict(TypedDict): - r"""Function definition for tool calling""" - - name: str - r"""Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)""" - description: NotRequired[str] - r"""Function description for the model""" - parameters: NotRequired[Dict[str, Nullable[Any]]] - r"""Function parameters as JSON Schema object""" - strict: NotRequired[Nullable[bool]] - r"""Enable strict schema adherence""" - - -class ToolDefinitionJSONFunction(BaseModel): - r"""Function definition for tool calling""" - - name: str - r"""Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)""" - - description: Optional[str] = None - r"""Function description for the model""" - - parameters: Optional[Dict[str, Nullable[Any]]] = None - r"""Function parameters as JSON Schema object""" - - strict: OptionalNullable[bool] = UNSET - r"""Enable strict schema adherence""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["description", "parameters", "strict"] - nullable_fields = ["strict"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -class ToolDefinitionJSONTypedDict(TypedDict): - r"""Tool definition for function calling""" - - type: ToolDefinitionJSONType - function: ToolDefinitionJSONFunctionTypedDict - r"""Function definition for tool calling""" - cache_control: NotRequired[ChatMessageContentItemCacheControlTypedDict] - r"""Cache control for the content part""" - - -class ToolDefinitionJSON(BaseModel): - r"""Tool definition for function calling""" - - type: ToolDefinitionJSONType - - function: ToolDefinitionJSONFunction - r"""Function definition for tool calling""" - - cache_control: Optional[ChatMessageContentItemCacheControl] = None - r"""Cache control for the content part""" diff --git a/src/openrouter/components/toolresponsemessage.py b/src/openrouter/components/toolresponsemessage.py deleted file mode 100644 index 5b7b747..0000000 --- a/src/openrouter/components/toolresponsemessage.py +++ /dev/null @@ -1,48 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatmessagecontentitem import ( - ChatMessageContentItem, - ChatMessageContentItemTypedDict, -) -from openrouter.types import BaseModel -from typing import List, Literal, Union -from typing_extensions import TypeAliasType, TypedDict - - -ToolResponseMessageRole = Literal["tool",] - - -ToolResponseMessageContentTypedDict = TypeAliasType( - "ToolResponseMessageContentTypedDict", - Union[str, List[ChatMessageContentItemTypedDict]], -) -r"""Tool response content""" - - -ToolResponseMessageContent = TypeAliasType( - "ToolResponseMessageContent", Union[str, List[ChatMessageContentItem]] -) -r"""Tool response content""" - - -class ToolResponseMessageTypedDict(TypedDict): - r"""Tool response message""" - - role: ToolResponseMessageRole - content: ToolResponseMessageContentTypedDict - r"""Tool response content""" - tool_call_id: str - r"""ID of the assistant message tool call this message responds to""" - - -class ToolResponseMessage(BaseModel): - r"""Tool response message""" - - role: ToolResponseMessageRole - - content: ToolResponseMessageContent - r"""Tool response content""" - - tool_call_id: str - r"""ID of the assistant message tool call this message responds to""" diff --git a/src/openrouter/components/usermessage.py b/src/openrouter/components/usermessage.py deleted file mode 100644 index 5300ded..0000000 --- a/src/openrouter/components/usermessage.py +++ /dev/null @@ -1,47 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .chatmessagecontentitem import ( - ChatMessageContentItem, - ChatMessageContentItemTypedDict, -) -from openrouter.types import BaseModel -from typing import List, Literal, Optional, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict - - -UserMessageRole = Literal["user",] - - -UserMessageContentTypedDict = TypeAliasType( - "UserMessageContentTypedDict", Union[str, List[ChatMessageContentItemTypedDict]] -) -r"""User message content""" - - -UserMessageContent = TypeAliasType( - "UserMessageContent", Union[str, List[ChatMessageContentItem]] -) -r"""User message content""" - - -class UserMessageTypedDict(TypedDict): - r"""User message""" - - role: UserMessageRole - content: UserMessageContentTypedDict - r"""User message content""" - name: NotRequired[str] - r"""Optional name for the user""" - - -class UserMessage(BaseModel): - r"""User message""" - - role: UserMessageRole - - content: UserMessageContent - r"""User message content""" - - name: Optional[str] = None - r"""Optional name for the user""" diff --git a/src/openrouter/components/videoinput.py b/src/openrouter/components/videoinput.py deleted file mode 100644 index 3cb4490..0000000 --- a/src/openrouter/components/videoinput.py +++ /dev/null @@ -1,19 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import BaseModel -from typing_extensions import TypedDict - - -class VideoInputTypedDict(TypedDict): - r"""Video input object""" - - url: str - r"""URL of the video (data: URLs supported)""" - - -class VideoInput(BaseModel): - r"""Video input object""" - - url: str - r"""URL of the video (data: URLs supported)""" diff --git a/src/openrouter/components/websearchpreviewtooluserlocation.py b/src/openrouter/components/websearchpreviewtooluserlocation.py deleted file mode 100644 index af36ed3..0000000 --- a/src/openrouter/components/websearchpreviewtooluserlocation.py +++ /dev/null @@ -1,66 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Literal -from typing_extensions import NotRequired, TypedDict - - -WebSearchPreviewToolUserLocationType = Literal["approximate",] - - -class WebSearchPreviewToolUserLocationTypedDict(TypedDict): - type: WebSearchPreviewToolUserLocationType - city: NotRequired[Nullable[str]] - country: NotRequired[Nullable[str]] - region: NotRequired[Nullable[str]] - timezone: NotRequired[Nullable[str]] - - -class WebSearchPreviewToolUserLocation(BaseModel): - type: WebSearchPreviewToolUserLocationType - - city: OptionalNullable[str] = UNSET - - country: OptionalNullable[str] = UNSET - - region: OptionalNullable[str] = UNSET - - timezone: OptionalNullable[str] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["city", "country", "region", "timezone"] - nullable_fields = ["city", "country", "region", "timezone"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/credits.py b/src/openrouter/credits.py index 43b95ff..c06e2ae 100644 --- a/src/openrouter/credits.py +++ b/src/openrouter/credits.py @@ -6,7 +6,8 @@ from openrouter._hooks import HookContext from openrouter.types import OptionalNullable, UNSET from openrouter.utils import get_security_from_env from openrouter.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, Mapping, Optional, Union +from typing import Any, Mapping, Optional +from typing_extensions import deprecated class Credits(BaseSDK): @@ -250,16 +251,12 @@ class Credits(BaseSDK): raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + @deprecated( + "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ) def create_coinbase_charge( self, *, - security: Union[ - operations.CreateCoinbaseChargeSecurity, - operations.CreateCoinbaseChargeSecurityTypedDict, - ], - amount: float, - sender: str, - chain_id: components.ChainID, http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, @@ -267,15 +264,11 @@ class Credits(BaseSDK): server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> operations.CreateCoinbaseChargeResponse: - r"""Create a Coinbase charge for crypto payment + ): + r"""Deprecated Coinbase Commerce charge endpoint - Create a Coinbase charge for crypto payment + Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead. - :param security: - :param amount: - :param sender: - :param chain_id: :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -302,11 +295,6 @@ class Credits(BaseSDK): http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, - create_charge_request=components.CreateChargeRequest( - amount=amount, - sender=sender, - chain_id=chain_id, - ), ) req = self._build_request( @@ -315,9 +303,9 @@ class Credits(BaseSDK): base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=False, - request_has_query_params=True, + request_has_query_params=False, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, @@ -326,16 +314,6 @@ class Credits(BaseSDK): x_open_router_title=self.sdk_configuration.globals.x_open_router_title, x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), - security=utils.get_pydantic_model( - security, operations.CreateCoinbaseChargeSecurity - ), - get_serialized_body=lambda: utils.serialize_request_body( - request.create_charge_request, - False, - False, - "json", - components.CreateChargeRequest, - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -354,38 +332,21 @@ class Credits(BaseSDK): base_url=base_url or "", operation_id="createCoinbaseCharge", oauth2_scopes=None, - security_source=get_security_from_env(security, components.Security), + security_source=None, ), request=req, - error_status_codes=["400", "401", "429", "4XX", "500", "5XX"], + error_status_codes=["410", "4XX", "5XX"], retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - operations.CreateCoinbaseChargeResponse, http_res - ) - if utils.match_response(http_res, "400", "application/json"): + if utils.match_response(http_res, "410", "application/json"): response_data = unmarshal_json_response( - errors.BadRequestResponseErrorData, http_res + errors.GoneResponseErrorData, http_res ) - raise errors.BadRequestResponseError(response_data, http_res) - if utils.match_response(http_res, "401", "application/json"): - response_data = unmarshal_json_response( - errors.UnauthorizedResponseErrorData, http_res - ) - raise errors.UnauthorizedResponseError(response_data, http_res) - if utils.match_response(http_res, "429", "application/json"): - response_data = unmarshal_json_response( - errors.TooManyRequestsResponseErrorData, http_res - ) - raise errors.TooManyRequestsResponseError(response_data, http_res) - if utils.match_response(http_res, "500", "application/json"): - response_data = unmarshal_json_response( - errors.InternalServerResponseErrorData, http_res - ) - raise errors.InternalServerResponseError(response_data, http_res) + raise errors.GoneResponseError(response_data, http_res) + if utils.match_response(http_res, "2XX", "*"): + return if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.OpenRouterDefaultError( @@ -399,16 +360,12 @@ class Credits(BaseSDK): raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + @deprecated( + "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ) async def create_coinbase_charge_async( self, *, - security: Union[ - operations.CreateCoinbaseChargeSecurity, - operations.CreateCoinbaseChargeSecurityTypedDict, - ], - amount: float, - sender: str, - chain_id: components.ChainID, http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, @@ -416,15 +373,11 @@ class Credits(BaseSDK): server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> operations.CreateCoinbaseChargeResponse: - r"""Create a Coinbase charge for crypto payment + ): + r"""Deprecated Coinbase Commerce charge endpoint - Create a Coinbase charge for crypto payment + Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead. - :param security: - :param amount: - :param sender: - :param chain_id: :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -451,11 +404,6 @@ class Credits(BaseSDK): http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, - create_charge_request=components.CreateChargeRequest( - amount=amount, - sender=sender, - chain_id=chain_id, - ), ) req = self._build_request_async( @@ -464,9 +412,9 @@ class Credits(BaseSDK): base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=False, - request_has_query_params=True, + request_has_query_params=False, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, @@ -475,16 +423,6 @@ class Credits(BaseSDK): x_open_router_title=self.sdk_configuration.globals.x_open_router_title, x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), - security=utils.get_pydantic_model( - security, operations.CreateCoinbaseChargeSecurity - ), - get_serialized_body=lambda: utils.serialize_request_body( - request.create_charge_request, - False, - False, - "json", - components.CreateChargeRequest, - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -503,38 +441,21 @@ class Credits(BaseSDK): base_url=base_url or "", operation_id="createCoinbaseCharge", oauth2_scopes=None, - security_source=get_security_from_env(security, components.Security), + security_source=None, ), request=req, - error_status_codes=["400", "401", "429", "4XX", "500", "5XX"], + error_status_codes=["410", "4XX", "5XX"], retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - operations.CreateCoinbaseChargeResponse, http_res - ) - if utils.match_response(http_res, "400", "application/json"): + if utils.match_response(http_res, "410", "application/json"): response_data = unmarshal_json_response( - errors.BadRequestResponseErrorData, http_res + errors.GoneResponseErrorData, http_res ) - raise errors.BadRequestResponseError(response_data, http_res) - if utils.match_response(http_res, "401", "application/json"): - response_data = unmarshal_json_response( - errors.UnauthorizedResponseErrorData, http_res - ) - raise errors.UnauthorizedResponseError(response_data, http_res) - if utils.match_response(http_res, "429", "application/json"): - response_data = unmarshal_json_response( - errors.TooManyRequestsResponseErrorData, http_res - ) - raise errors.TooManyRequestsResponseError(response_data, http_res) - if utils.match_response(http_res, "500", "application/json"): - response_data = unmarshal_json_response( - errors.InternalServerResponseErrorData, http_res - ) - raise errors.InternalServerResponseError(response_data, http_res) + raise errors.GoneResponseError(response_data, http_res) + if utils.match_response(http_res, "2XX", "*"): + return if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.OpenRouterDefaultError( diff --git a/src/openrouter/errors/__init__.py b/src/openrouter/errors/__init__.py index dc5ef68..1695b73 100644 --- a/src/openrouter/errors/__init__.py +++ b/src/openrouter/errors/__init__.py @@ -24,6 +24,7 @@ if TYPE_CHECKING: ForbiddenResponseError, ForbiddenResponseErrorData, ) + from .goneresponse_error import GoneResponseError, GoneResponseErrorData from .internalserverresponse_error import ( InternalServerResponseError, InternalServerResponseErrorData, @@ -76,6 +77,8 @@ __all__ = [ "EdgeNetworkTimeoutResponseErrorData", "ForbiddenResponseError", "ForbiddenResponseErrorData", + "GoneResponseError", + "GoneResponseErrorData", "InternalServerResponseError", "InternalServerResponseErrorData", "NoResponseError", @@ -113,6 +116,8 @@ _dynamic_imports: dict[str, str] = { "EdgeNetworkTimeoutResponseErrorData": ".edgenetworktimeoutresponse_error", "ForbiddenResponseError": ".forbiddenresponse_error", "ForbiddenResponseErrorData": ".forbiddenresponse_error", + "GoneResponseError": ".goneresponse_error", + "GoneResponseErrorData": ".goneresponse_error", "InternalServerResponseError": ".internalserverresponse_error", "InternalServerResponseErrorData": ".internalserverresponse_error", "NoResponseError": ".no_response_error", diff --git a/src/openrouter/errors/goneresponse_error.py b/src/openrouter/errors/goneresponse_error.py new file mode 100644 index 0000000..192dae5 --- /dev/null +++ b/src/openrouter/errors/goneresponse_error.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dataclasses import dataclass, field +import httpx +from openrouter.components import ( + goneresponseerrordata as components_goneresponseerrordata, +) +from openrouter.errors import OpenRouterError +from openrouter.types import BaseModel, OptionalNullable, UNSET +from typing import Optional + + +class GoneResponseErrorData(BaseModel): + error: components_goneresponseerrordata.GoneResponseErrorData + r"""Error data for GoneResponse""" + user_id: OptionalNullable[str] = UNSET + + +@dataclass(unsafe_hash=True) +class GoneResponseError(OpenRouterError): + r"""Gone - Endpoint has been permanently removed or deprecated""" + + data: GoneResponseErrorData = field(hash=False) + + def __init__( + self, + data: GoneResponseErrorData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + fallback = body or raw_response.text + message = str(data.error.message) or fallback + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/src/openrouter/operations/__init__.py b/src/openrouter/operations/__init__.py index f25347d..154f411 100644 --- a/src/openrouter/operations/__init__.py +++ b/src/openrouter/operations/__init__.py @@ -61,24 +61,10 @@ if TYPE_CHECKING: UsageLimitType, ) from .createcoinbasecharge import ( - CallData, - CallDataTypedDict, - CreateCoinbaseChargeData, - CreateCoinbaseChargeDataTypedDict, CreateCoinbaseChargeGlobals, CreateCoinbaseChargeGlobalsTypedDict, CreateCoinbaseChargeRequest, CreateCoinbaseChargeRequestTypedDict, - CreateCoinbaseChargeResponse, - CreateCoinbaseChargeResponseTypedDict, - CreateCoinbaseChargeSecurity, - CreateCoinbaseChargeSecurityTypedDict, - Metadata, - MetadataTypedDict, - TransferIntent, - TransferIntentTypedDict, - Web3Data, - Web3DataTypedDict, ) from .createembeddings import ( Content, @@ -432,8 +418,6 @@ __all__ = [ "BulkUnassignMembersFromGuardrailRequestTypedDict", "BulkUnassignMembersFromGuardrailResponse", "BulkUnassignMembersFromGuardrailResponseTypedDict", - "CallData", - "CallDataTypedDict", "Category", "Content", "ContentImageURL", @@ -452,16 +436,10 @@ __all__ = [ "CreateAuthKeysCodeRequestTypedDict", "CreateAuthKeysCodeResponse", "CreateAuthKeysCodeResponseTypedDict", - "CreateCoinbaseChargeData", - "CreateCoinbaseChargeDataTypedDict", "CreateCoinbaseChargeGlobals", "CreateCoinbaseChargeGlobalsTypedDict", "CreateCoinbaseChargeRequest", "CreateCoinbaseChargeRequestTypedDict", - "CreateCoinbaseChargeResponse", - "CreateCoinbaseChargeResponseTypedDict", - "CreateCoinbaseChargeSecurity", - "CreateCoinbaseChargeSecurityTypedDict", "CreateEmbeddingsData", "CreateEmbeddingsDataTypedDict", "CreateEmbeddingsGlobals", @@ -671,8 +649,6 @@ __all__ = [ "ListRequestTypedDict", "ListResponse", "ListResponseTypedDict", - "Metadata", - "MetadataTypedDict", "Object", "ObjectEmbedding", "ProviderName", @@ -688,8 +664,6 @@ __all__ = [ "SendChatCompletionRequestResponseBody", "SendChatCompletionRequestResponseBodyTypedDict", "SendChatCompletionRequestResponseTypedDict", - "TransferIntent", - "TransferIntentTypedDict", "TypeImageURL", "TypeText", "UpdateGuardrailData", @@ -718,8 +692,6 @@ __all__ = [ "Usage", "UsageLimitType", "UsageTypedDict", - "Web3Data", - "Web3DataTypedDict", ] _dynamic_imports: dict[str, str] = { @@ -767,24 +739,10 @@ _dynamic_imports: dict[str, str] = { "CreateAuthKeysCodeResponse": ".createauthkeyscode", "CreateAuthKeysCodeResponseTypedDict": ".createauthkeyscode", "UsageLimitType": ".createauthkeyscode", - "CallData": ".createcoinbasecharge", - "CallDataTypedDict": ".createcoinbasecharge", - "CreateCoinbaseChargeData": ".createcoinbasecharge", - "CreateCoinbaseChargeDataTypedDict": ".createcoinbasecharge", "CreateCoinbaseChargeGlobals": ".createcoinbasecharge", "CreateCoinbaseChargeGlobalsTypedDict": ".createcoinbasecharge", "CreateCoinbaseChargeRequest": ".createcoinbasecharge", "CreateCoinbaseChargeRequestTypedDict": ".createcoinbasecharge", - "CreateCoinbaseChargeResponse": ".createcoinbasecharge", - "CreateCoinbaseChargeResponseTypedDict": ".createcoinbasecharge", - "CreateCoinbaseChargeSecurity": ".createcoinbasecharge", - "CreateCoinbaseChargeSecurityTypedDict": ".createcoinbasecharge", - "Metadata": ".createcoinbasecharge", - "MetadataTypedDict": ".createcoinbasecharge", - "TransferIntent": ".createcoinbasecharge", - "TransferIntentTypedDict": ".createcoinbasecharge", - "Web3Data": ".createcoinbasecharge", - "Web3DataTypedDict": ".createcoinbasecharge", "Content": ".createembeddings", "ContentImageURL": ".createembeddings", "ContentImageURLTypedDict": ".createembeddings", diff --git a/src/openrouter/operations/createcoinbasecharge.py b/src/openrouter/operations/createcoinbasecharge.py index dc83233..6e296e1 100644 --- a/src/openrouter/operations/createcoinbasecharge.py +++ b/src/openrouter/operations/createcoinbasecharge.py @@ -1,14 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from openrouter.components import createchargerequest as components_createchargerequest from openrouter.types import BaseModel -from openrouter.utils import ( - FieldMetadata, - HeaderMetadata, - RequestMetadata, - SecurityMetadata, -) +from openrouter.utils import FieldMetadata, HeaderMetadata import pydantic from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -60,26 +54,7 @@ class CreateCoinbaseChargeGlobals(BaseModel): """ -class CreateCoinbaseChargeSecurityTypedDict(TypedDict): - bearer: str - - -class CreateCoinbaseChargeSecurity(BaseModel): - bearer: Annotated[ - str, - FieldMetadata( - security=SecurityMetadata( - scheme=True, - scheme_type="http", - sub_type="bearer", - field_name="Authorization", - ) - ), - ] - - class CreateCoinbaseChargeRequestTypedDict(TypedDict): - create_charge_request: components_createchargerequest.CreateChargeRequestTypedDict http_referer: NotRequired[str] r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -96,11 +71,6 @@ class CreateCoinbaseChargeRequestTypedDict(TypedDict): class CreateCoinbaseChargeRequest(BaseModel): - create_charge_request: Annotated[ - components_createchargerequest.CreateChargeRequest, - FieldMetadata(request=RequestMetadata(media_type="application/json")), - ] - http_referer: Annotated[ Optional[str], pydantic.Field(alias="HTTP-Referer"), @@ -128,100 +98,3 @@ class CreateCoinbaseChargeRequest(BaseModel): r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. """ - - -class CallDataTypedDict(TypedDict): - deadline: str - fee_amount: str - id: str - operator: str - prefix: str - recipient: str - recipient_amount: str - recipient_currency: str - refund_destination: str - signature: str - - -class CallData(BaseModel): - deadline: str - - fee_amount: str - - id: str - - operator: str - - prefix: str - - recipient: str - - recipient_amount: str - - recipient_currency: str - - refund_destination: str - - signature: str - - -class MetadataTypedDict(TypedDict): - chain_id: float - contract_address: str - sender: str - - -class Metadata(BaseModel): - chain_id: float - - contract_address: str - - sender: str - - -class TransferIntentTypedDict(TypedDict): - call_data: CallDataTypedDict - metadata: MetadataTypedDict - - -class TransferIntent(BaseModel): - call_data: CallData - - metadata: Metadata - - -class Web3DataTypedDict(TypedDict): - transfer_intent: TransferIntentTypedDict - - -class Web3Data(BaseModel): - transfer_intent: TransferIntent - - -class CreateCoinbaseChargeDataTypedDict(TypedDict): - id: str - created_at: str - expires_at: str - web3_data: Web3DataTypedDict - - -class CreateCoinbaseChargeData(BaseModel): - id: str - - created_at: str - - expires_at: str - - web3_data: Web3Data - - -class CreateCoinbaseChargeResponseTypedDict(TypedDict): - r"""Returns the calldata to fulfill the transaction""" - - data: CreateCoinbaseChargeDataTypedDict - - -class CreateCoinbaseChargeResponse(BaseModel): - r"""Returns the calldata to fulfill the transaction""" - - data: CreateCoinbaseChargeData diff --git a/src/openrouter/types/models.py b/src/openrouter/types/models.py deleted file mode 100644 index 9f68ee9..0000000 --- a/src/openrouter/types/models.py +++ /dev/null @@ -1,378 +0,0 @@ -"""Auto-generated by @openrouter/cli types. Do not edit manually.""" -# Run `npx @openrouter/cli types` to regenerate -# Generated: 2025-12-23T14:51:29.122Z -# Model count: 351 - -from typing import Literal, Union -from typing_extensions import TypeAlias - -# Union type of all available model IDs on OpenRouter. -# Includes base models and their variants (e.g., ":free", ":nitro"). -ModelId: TypeAlias = Literal[ - 'ai21/jamba-large-1.7', - 'ai21/jamba-mini-1.7', - 'aion-labs/aion-1.0', - 'aion-labs/aion-1.0-mini', - 'aion-labs/aion-rp-llama-3.1-8b', - 'alfredpros/codellama-7b-instruct-solidity', - 'alibaba/tongyi-deepresearch-30b-a3b', - 'alibaba/tongyi-deepresearch-30b-a3b:free', - 'allenai/olmo-2-0325-32b-instruct', - 'allenai/olmo-3-32b-think:free', - 'allenai/olmo-3-7b-instruct', - 'allenai/olmo-3-7b-think', - 'allenai/olmo-3.1-32b-think:free', - 'alpindale/goliath-120b', - 'amazon/nova-2-lite-v1', - 'amazon/nova-lite-v1', - 'amazon/nova-micro-v1', - 'amazon/nova-premier-v1', - 'amazon/nova-pro-v1', - 'anthracite-org/magnum-v4-72b', - 'anthropic/claude-3-haiku', - 'anthropic/claude-3-opus', - 'anthropic/claude-3.5-haiku', - 'anthropic/claude-3.5-haiku-20241022', - 'anthropic/claude-3.5-sonnet', - 'anthropic/claude-3.7-sonnet', - 'anthropic/claude-3.7-sonnet:thinking', - 'anthropic/claude-haiku-4.5', - 'anthropic/claude-opus-4', - 'anthropic/claude-opus-4.1', - 'anthropic/claude-opus-4.5', - 'anthropic/claude-sonnet-4', - 'anthropic/claude-sonnet-4.5', - 'arcee-ai/coder-large', - 'arcee-ai/maestro-reasoning', - 'arcee-ai/spotlight', - 'arcee-ai/trinity-mini', - 'arcee-ai/trinity-mini:free', - 'arcee-ai/virtuoso-large', - 'arliai/qwq-32b-arliai-rpr-v1', - 'baidu/ernie-4.5-21b-a3b', - 'baidu/ernie-4.5-21b-a3b-thinking', - 'baidu/ernie-4.5-300b-a47b', - 'baidu/ernie-4.5-vl-28b-a3b', - 'baidu/ernie-4.5-vl-424b-a47b', - 'bytedance/ui-tars-1.5-7b', - 'cognitivecomputations/dolphin-mistral-24b-venice-edition:free', - 'cohere/command-a', - 'cohere/command-r-08-2024', - 'cohere/command-r-plus-08-2024', - 'cohere/command-r7b-12-2024', - 'deepcogito/cogito-v2-preview-llama-109b-moe', - 'deepcogito/cogito-v2-preview-llama-405b', - 'deepcogito/cogito-v2-preview-llama-70b', - 'deepcogito/cogito-v2.1-671b', - 'deepseek/deepseek-chat', - 'deepseek/deepseek-chat-v3-0324', - 'deepseek/deepseek-chat-v3.1', - 'deepseek/deepseek-prover-v2', - 'deepseek/deepseek-r1', - 'deepseek/deepseek-r1-0528', - 'deepseek/deepseek-r1-0528-qwen3-8b', - 'deepseek/deepseek-r1-0528:free', - 'deepseek/deepseek-r1-distill-llama-70b', - 'deepseek/deepseek-r1-distill-qwen-14b', - 'deepseek/deepseek-r1-distill-qwen-32b', - 'deepseek/deepseek-v3.1-terminus', - 'deepseek/deepseek-v3.1-terminus:exacto', - 'deepseek/deepseek-v3.2', - 'deepseek/deepseek-v3.2-exp', - 'deepseek/deepseek-v3.2-speciale', - 'eleutherai/llemma_7b', - 'essentialai/rnj-1-instruct', - 'google/gemini-2.0-flash-001', - 'google/gemini-2.0-flash-exp:free', - 'google/gemini-2.0-flash-lite-001', - 'google/gemini-2.5-flash', - 'google/gemini-2.5-flash-image', - 'google/gemini-2.5-flash-image-preview', - 'google/gemini-2.5-flash-lite', - 'google/gemini-2.5-flash-lite-preview-09-2025', - 'google/gemini-2.5-flash-preview-09-2025', - 'google/gemini-2.5-pro', - 'google/gemini-2.5-pro-preview', - 'google/gemini-2.5-pro-preview-05-06', - 'google/gemini-3-flash-preview', - 'google/gemini-3-pro-image-preview', - 'google/gemini-3-pro-preview', - 'google/gemma-2-27b-it', - 'google/gemma-2-9b-it', - 'google/gemma-3-12b-it', - 'google/gemma-3-12b-it:free', - 'google/gemma-3-27b-it', - 'google/gemma-3-27b-it:free', - 'google/gemma-3-4b-it', - 'google/gemma-3-4b-it:free', - 'google/gemma-3n-e2b-it:free', - 'google/gemma-3n-e4b-it', - 'google/gemma-3n-e4b-it:free', - 'gryphe/mythomax-l2-13b', - 'ibm-granite/granite-4.0-h-micro', - 'inception/mercury', - 'inception/mercury-coder', - 'inflection/inflection-3-pi', - 'inflection/inflection-3-productivity', - 'kwaipilot/kat-coder-pro:free', - 'liquid/lfm-2.2-6b', - 'liquid/lfm2-8b-a1b', - 'mancer/weaver', - 'meituan/longcat-flash-chat', - 'meta-llama/llama-3-70b-instruct', - 'meta-llama/llama-3-8b-instruct', - 'meta-llama/llama-3.1-405b', - 'meta-llama/llama-3.1-405b-instruct', - 'meta-llama/llama-3.1-405b-instruct:free', - 'meta-llama/llama-3.1-70b-instruct', - 'meta-llama/llama-3.1-8b-instruct', - 'meta-llama/llama-3.2-11b-vision-instruct', - 'meta-llama/llama-3.2-1b-instruct', - 'meta-llama/llama-3.2-3b-instruct', - 'meta-llama/llama-3.2-3b-instruct:free', - 'meta-llama/llama-3.2-90b-vision-instruct', - 'meta-llama/llama-3.3-70b-instruct', - 'meta-llama/llama-3.3-70b-instruct:free', - 'meta-llama/llama-4-maverick', - 'meta-llama/llama-4-scout', - 'meta-llama/llama-guard-2-8b', - 'meta-llama/llama-guard-3-8b', - 'meta-llama/llama-guard-4-12b', - 'microsoft/phi-3-medium-128k-instruct', - 'microsoft/phi-3-mini-128k-instruct', - 'microsoft/phi-3.5-mini-128k-instruct', - 'microsoft/phi-4', - 'microsoft/phi-4-multimodal-instruct', - 'microsoft/phi-4-reasoning-plus', - 'microsoft/wizardlm-2-8x22b', - 'minimax/minimax-01', - 'minimax/minimax-m1', - 'minimax/minimax-m2', - 'minimax/minimax-m2.1', - 'mistralai/codestral-2508', - 'mistralai/devstral-2512', - 'mistralai/devstral-2512:free', - 'mistralai/devstral-medium', - 'mistralai/devstral-small', - 'mistralai/devstral-small-2505', - 'mistralai/ministral-14b-2512', - 'mistralai/ministral-3b', - 'mistralai/ministral-3b-2512', - 'mistralai/ministral-8b', - 'mistralai/ministral-8b-2512', - 'mistralai/mistral-7b-instruct', - 'mistralai/mistral-7b-instruct-v0.1', - 'mistralai/mistral-7b-instruct-v0.2', - 'mistralai/mistral-7b-instruct-v0.3', - 'mistralai/mistral-7b-instruct:free', - 'mistralai/mistral-large', - 'mistralai/mistral-large-2407', - 'mistralai/mistral-large-2411', - 'mistralai/mistral-large-2512', - 'mistralai/mistral-medium-3', - 'mistralai/mistral-medium-3.1', - 'mistralai/mistral-nemo', - 'mistralai/mistral-saba', - 'mistralai/mistral-small-24b-instruct-2501', - 'mistralai/mistral-small-3.1-24b-instruct', - 'mistralai/mistral-small-3.1-24b-instruct:free', - 'mistralai/mistral-small-3.2-24b-instruct', - 'mistralai/mistral-small-creative', - 'mistralai/mistral-tiny', - 'mistralai/mixtral-8x22b-instruct', - 'mistralai/mixtral-8x7b-instruct', - 'mistralai/pixtral-12b', - 'mistralai/pixtral-large-2411', - 'mistralai/voxtral-small-24b-2507', - 'moonshotai/kimi-dev-72b', - 'moonshotai/kimi-k2', - 'moonshotai/kimi-k2-0905', - 'moonshotai/kimi-k2-0905:exacto', - 'moonshotai/kimi-k2-thinking', - 'moonshotai/kimi-k2:free', - 'morph/morph-v3-fast', - 'morph/morph-v3-large', - 'neversleep/llama-3.1-lumimaid-8b', - 'neversleep/noromaid-20b', - 'nex-agi/deepseek-v3.1-nex-n1:free', - 'nousresearch/deephermes-3-mistral-24b-preview', - 'nousresearch/hermes-2-pro-llama-3-8b', - 'nousresearch/hermes-3-llama-3.1-405b', - 'nousresearch/hermes-3-llama-3.1-405b:free', - 'nousresearch/hermes-3-llama-3.1-70b', - 'nousresearch/hermes-4-405b', - 'nousresearch/hermes-4-70b', - 'nvidia/llama-3.1-nemotron-70b-instruct', - 'nvidia/llama-3.1-nemotron-ultra-253b-v1', - 'nvidia/llama-3.3-nemotron-super-49b-v1.5', - 'nvidia/nemotron-3-nano-30b-a3b', - 'nvidia/nemotron-3-nano-30b-a3b:free', - 'nvidia/nemotron-nano-12b-v2-vl', - 'nvidia/nemotron-nano-12b-v2-vl:free', - 'nvidia/nemotron-nano-9b-v2', - 'nvidia/nemotron-nano-9b-v2:free', - 'openai/chatgpt-4o-latest', - 'openai/codex-mini', - 'openai/gpt-3.5-turbo', - 'openai/gpt-3.5-turbo-0613', - 'openai/gpt-3.5-turbo-16k', - 'openai/gpt-3.5-turbo-instruct', - 'openai/gpt-4', - 'openai/gpt-4-0314', - 'openai/gpt-4-1106-preview', - 'openai/gpt-4-turbo', - 'openai/gpt-4-turbo-preview', - 'openai/gpt-4.1', - 'openai/gpt-4.1-mini', - 'openai/gpt-4.1-nano', - 'openai/gpt-4o', - 'openai/gpt-4o-2024-05-13', - 'openai/gpt-4o-2024-08-06', - 'openai/gpt-4o-2024-11-20', - 'openai/gpt-4o-audio-preview', - 'openai/gpt-4o-mini', - 'openai/gpt-4o-mini-2024-07-18', - 'openai/gpt-4o-mini-search-preview', - 'openai/gpt-4o-search-preview', - 'openai/gpt-4o:extended', - 'openai/gpt-5', - 'openai/gpt-5-chat', - 'openai/gpt-5-codex', - 'openai/gpt-5-image', - 'openai/gpt-5-image-mini', - 'openai/gpt-5-mini', - 'openai/gpt-5-nano', - 'openai/gpt-5-pro', - 'openai/gpt-5.1', - 'openai/gpt-5.1-chat', - 'openai/gpt-5.1-codex', - 'openai/gpt-5.1-codex-max', - 'openai/gpt-5.1-codex-mini', - 'openai/gpt-5.2', - 'openai/gpt-5.2-chat', - 'openai/gpt-5.2-pro', - 'openai/gpt-oss-120b', - 'openai/gpt-oss-120b:exacto', - 'openai/gpt-oss-120b:free', - 'openai/gpt-oss-20b', - 'openai/gpt-oss-20b:free', - 'openai/gpt-oss-safeguard-20b', - 'openai/o1', - 'openai/o1-pro', - 'openai/o3', - 'openai/o3-deep-research', - 'openai/o3-mini', - 'openai/o3-mini-high', - 'openai/o3-pro', - 'openai/o4-mini', - 'openai/o4-mini-deep-research', - 'openai/o4-mini-high', - 'opengvlab/internvl3-78b', - 'openrouter/auto', - 'openrouter/bodybuilder', - 'perplexity/sonar', - 'perplexity/sonar-deep-research', - 'perplexity/sonar-pro', - 'perplexity/sonar-pro-search', - 'perplexity/sonar-reasoning', - 'perplexity/sonar-reasoning-pro', - 'prime-intellect/intellect-3', - 'qwen/qwen-2.5-72b-instruct', - 'qwen/qwen-2.5-7b-instruct', - 'qwen/qwen-2.5-coder-32b-instruct', - 'qwen/qwen-2.5-vl-7b-instruct', - 'qwen/qwen-2.5-vl-7b-instruct:free', - 'qwen/qwen-max', - 'qwen/qwen-plus', - 'qwen/qwen-plus-2025-07-28', - 'qwen/qwen-plus-2025-07-28:thinking', - 'qwen/qwen-turbo', - 'qwen/qwen-vl-max', - 'qwen/qwen-vl-plus', - 'qwen/qwen2.5-coder-7b-instruct', - 'qwen/qwen2.5-vl-32b-instruct', - 'qwen/qwen2.5-vl-72b-instruct', - 'qwen/qwen3-14b', - 'qwen/qwen3-235b-a22b', - 'qwen/qwen3-235b-a22b-2507', - 'qwen/qwen3-235b-a22b-thinking-2507', - 'qwen/qwen3-30b-a3b', - 'qwen/qwen3-30b-a3b-instruct-2507', - 'qwen/qwen3-30b-a3b-thinking-2507', - 'qwen/qwen3-32b', - 'qwen/qwen3-4b:free', - 'qwen/qwen3-8b', - 'qwen/qwen3-coder', - 'qwen/qwen3-coder-30b-a3b-instruct', - 'qwen/qwen3-coder-flash', - 'qwen/qwen3-coder-plus', - 'qwen/qwen3-coder:exacto', - 'qwen/qwen3-coder:free', - 'qwen/qwen3-max', - 'qwen/qwen3-next-80b-a3b-instruct', - 'qwen/qwen3-next-80b-a3b-thinking', - 'qwen/qwen3-vl-235b-a22b-instruct', - 'qwen/qwen3-vl-235b-a22b-thinking', - 'qwen/qwen3-vl-30b-a3b-instruct', - 'qwen/qwen3-vl-30b-a3b-thinking', - 'qwen/qwen3-vl-32b-instruct', - 'qwen/qwen3-vl-8b-instruct', - 'qwen/qwen3-vl-8b-thinking', - 'qwen/qwq-32b', - 'raifle/sorcererlm-8x22b', - 'relace/relace-apply-3', - 'relace/relace-search', - 'sao10k/l3-euryale-70b', - 'sao10k/l3-lunaris-8b', - 'sao10k/l3.1-70b-hanami-x1', - 'sao10k/l3.1-euryale-70b', - 'sao10k/l3.3-euryale-70b', - 'stepfun-ai/step3', - 'switchpoint/router', - 'tencent/hunyuan-a13b-instruct', - 'thedrummer/cydonia-24b-v4.1', - 'thedrummer/rocinante-12b', - 'thedrummer/skyfall-36b-v2', - 'thedrummer/unslopnemo-12b', - 'thudm/glm-4.1v-9b-thinking', - 'tngtech/deepseek-r1t-chimera', - 'tngtech/deepseek-r1t-chimera:free', - 'tngtech/deepseek-r1t2-chimera', - 'tngtech/deepseek-r1t2-chimera:free', - 'tngtech/tng-r1t-chimera', - 'tngtech/tng-r1t-chimera:free', - 'undi95/remm-slerp-l2-13b', - 'x-ai/grok-3', - 'x-ai/grok-3-beta', - 'x-ai/grok-3-mini', - 'x-ai/grok-3-mini-beta', - 'x-ai/grok-4', - 'x-ai/grok-4-fast', - 'x-ai/grok-4.1-fast', - 'x-ai/grok-code-fast-1', - 'xiaomi/mimo-v2-flash:free', - 'z-ai/glm-4-32b', - 'z-ai/glm-4.5', - 'z-ai/glm-4.5-air', - 'z-ai/glm-4.5-air:free', - 'z-ai/glm-4.5v', - 'z-ai/glm-4.6', - 'z-ai/glm-4.6:exacto', - 'z-ai/glm-4.6v', - 'z-ai/glm-4.7' -] - -# Static variants that create distinct model IDs. -# These are already present in the API response (e.g., "openai/gpt-4:free"). -StaticVariant: TypeAlias = Literal['free', 'extended', 'exacto', 'thinking'] - -# Virtual variants used for routing hints. -# These do not create distinct model IDs but affect routing behavior. -VirtualVariant: TypeAlias = Literal['all', 'online', 'nitro', 'floor'] - -# All available variants. -Variant: TypeAlias = Union[StaticVariant, VirtualVariant] - -# Hash of model IDs for staleness checking. -# Used by postinstall script to detect outdated types. -MODEL_HASH: str = '986e77d89072f654' diff --git a/src/openrouter/utils/oauth_create_authorization_url.py b/src/openrouter/utils/oauth_create_authorization_url.py deleted file mode 100644 index 402c5ae..0000000 --- a/src/openrouter/utils/oauth_create_authorization_url.py +++ /dev/null @@ -1,97 +0,0 @@ -"""Generate OAuth2 authorization URL""" - -from dataclasses import dataclass -from typing import TYPE_CHECKING, Literal, Optional, Union -from urllib.parse import ParseResult, urlencode - -if TYPE_CHECKING: - from openrouter.sdk import OpenRouter - - -@dataclass -class CreateAuthorizationUrlRequestBase: - """Base request parameters for creating an authorization URL""" - callback_url: Union[str, ParseResult] - limit: Optional[float] = None - - -@dataclass -class CreateAuthorizationUrlRequestWithPKCE: - """Request parameters with PKCE for creating an authorization URL""" - callback_url: Union[str, ParseResult] - code_challenge_method: Literal["S256", "plain"] - code_challenge: str - limit: Optional[float] = None - - -# Union type for request - either with PKCE or without -CreateAuthorizationUrlRequest = Union[ - CreateAuthorizationUrlRequestWithPKCE, - CreateAuthorizationUrlRequestBase, -] - - -def _get_server_url(client: "OpenRouter") -> str: - """ - Get the server URL from the client configuration - - Args: - client: OpenRouter client instance - - Returns: - The server URL - - Raises: - ValueError: If no server URL is configured - """ - server_url, _ = client.sdk_configuration.get_server_details() - if not server_url: - raise ValueError("No server URL configured") - return server_url - - -def oauth_create_authorization_url( - client: "OpenRouter", - params: CreateAuthorizationUrlRequest, -) -> str: - """ - Generate an OAuth2 authorization URL - - Generates a URL to redirect users to for authorizing your application. The - URL includes the provided callback URL and, if applicable, the code - challenge parameters for PKCE. - - Args: - client: OpenRouter client instance - params: Request parameters including callback URL and optional PKCE parameters - - Returns: - The authorization URL as a string - - Raises: - ValueError: If no server URL is configured or parameters are invalid - - See Also: - - https://openrouter.ai/docs/use-cases/oauth-pkce - """ - base_url = _get_server_url(client) - - # Build the auth URL - auth_url = f"{base_url}/auth" - - # Build query parameters - query_params = { - "callback_url": str(params.callback_url), - } - - # Add PKCE parameters if present - if isinstance(params, CreateAuthorizationUrlRequestWithPKCE): - query_params["code_challenge"] = params.code_challenge - query_params["code_challenge_method"] = params.code_challenge_method - - # Add limit if present - if params.limit is not None: - query_params["limit"] = str(params.limit) - - # Construct final URL with query parameters - return f"{auth_url}?{urlencode(query_params)}" diff --git a/src/openrouter/utils/oauth_create_sha256_code_challenge.py b/src/openrouter/utils/oauth_create_sha256_code_challenge.py deleted file mode 100644 index 564862e..0000000 --- a/src/openrouter/utils/oauth_create_sha256_code_challenge.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Generate SHA-256 code challenge for PKCE OAuth flow""" - -import base64 -import hashlib -import re -import secrets -from dataclasses import dataclass -from typing import Optional - - -@dataclass -class CreateSHA256CodeChallengeRequest: - """ - Request parameters for creating a SHA-256 code challenge. - - If not provided, a random code verifier will be generated. - If provided, must be 43-128 characters and contain only unreserved - characters [A-Za-z0-9-._~] per RFC 7636. - """ - code_verifier: Optional[str] = None - - -@dataclass -class CreateSHA256CodeChallengeResponse: - """Response containing the code challenge and verifier""" - code_challenge: str - code_verifier: str - - -def _array_buffer_to_base64_url(data: bytes) -> str: - """ - Convert bytes to base64url encoding (RFC 4648) - - Args: - data: Bytes to encode - - Returns: - Base64url encoded string - """ - return base64.urlsafe_b64encode(data).rstrip(b"=").decode("ascii") - - -def _generate_code_verifier() -> str: - """ - Generate a cryptographically random code verifier per RFC 7636 - - RFC 7636 recommends 32 octets of random data, base64url encoded = 43 chars - - Returns: - A random code verifier string - """ - random_bytes = secrets.token_bytes(32) - return _array_buffer_to_base64_url(random_bytes) - - -def _validate_code_verifier(code_verifier: str) -> None: - """ - Validate code verifier according to RFC 7636 - - Args: - code_verifier: The code verifier to validate - - Raises: - ValueError: If the code verifier is invalid - """ - if len(code_verifier) < 43: - raise ValueError("Code verifier must be at least 43 characters") - if len(code_verifier) > 128: - raise ValueError("Code verifier must be at most 128 characters") - if not re.match(r"^[A-Za-z0-9\-._~]+$", code_verifier): - raise ValueError( - "Code verifier must only contain unreserved characters: [A-Za-z0-9-._~]" - ) - - -def oauth_create_sha256_code_challenge( - params: Optional[CreateSHA256CodeChallengeRequest] = None, -) -> CreateSHA256CodeChallengeResponse: - """ - Generate a SHA-256 code challenge for PKCE - - Generates a SHA-256 code challenge and corresponding code verifier for use - in the PKCE extension to OAuth2. If no code verifier is provided, a random - one will be generated according to RFC 7636 (32 random bytes, base64url - encoded). If a code verifier is provided, it must be 43-128 characters and - contain only unreserved characters [A-Za-z0-9-._~]. - - Args: - params: Optional request parameters. If None, a random code verifier will be generated. - - Returns: - CreateSHA256CodeChallengeResponse containing the code challenge and verifier - - Raises: - ValueError: If the provided code verifier is invalid - - See Also: - - https://openrouter.ai/docs/use-cases/oauth-pkce - - https://datatracker.ietf.org/doc/html/rfc7636 - """ - if params is None: - params = CreateSHA256CodeChallengeRequest() - - code_verifier = params.code_verifier - if code_verifier is None: - code_verifier = _generate_code_verifier() - else: - _validate_code_verifier(code_verifier) - - # Generate SHA-256 hash - data = code_verifier.encode("utf-8") - hash_digest = hashlib.sha256(data).digest() - - # Convert hash to base64url - code_challenge = _array_buffer_to_base64_url(hash_digest) - - return CreateSHA256CodeChallengeResponse( - code_challenge=code_challenge, - code_verifier=code_verifier, - ) diff --git a/uv.lock b/uv.lock index 856f2cb..773f329 100644 --- a/uv.lock +++ b/uv.lock @@ -211,7 +211,7 @@ wheels = [ [[package]] name = "openrouter" -version = "0.8.0" +version = "0.8.1" source = { editable = "." } dependencies = [ { name = "httpcore" },