From a2b2ed8405073321671d7e182bd0f2497f544bd1 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sun, 17 May 2026 00:50:19 +0000 Subject: [PATCH 1/2] ## Python SDK Changes: * `open_router.chat.send()`: * `request` **Changed** **Breaking** :warning: * `response` **Changed** * `error` **Changed** * `open_router.beta.responses.send()`: * `request` **Changed** **Breaking** :warning: * `response` **Changed** **Breaking** :warning: * `error` **Changed** * `open_router.tts.create_speech()`: **Added** * `open_router.stt.create_transcription()`: **Added** * `open_router.byok.list()`: **Added** * `open_router.byok.get()`: **Added** * `open_router.generations.list_generation_content()`: **Added** * `open_router.observability.list()`: **Added** * `open_router.observability.get()`: **Added** * `open_router.workspaces.list()`: **Added** * `open_router.workspaces.create()`: **Added** * `open_router.workspaces.delete()`: **Added** * `open_router.workspaces.get()`: **Added** * `open_router.workspaces.update()`: **Added** * `open_router.workspaces.bulk_add_members()`: **Added** * `open_router.workspaces.bulk_remove_members()`: **Added** * `open_router.analytics.get_user_activity()`: `error.openrouter_metadata` **Added** * `open_router.o_auth.exchange_auth_code_for_api_key()`: `error.openrouter_metadata` **Added** * `open_router.o_auth.create_auth_code()`: `error.openrouter_metadata` **Added** * `open_router.credits.get_credits()`: `error.openrouter_metadata` **Added** * `open_router.embeddings.generate()`: * `request.input.[array].[].content.[]` **Changed** * `response.usage.prompt_tokens_details` **Added** * `error.openrouter_metadata` **Added** * `open_router.embeddings.list_models()`: * `response.data.[].supported_voices` **Added** * `error.openrouter_metadata` **Added** * `open_router.endpoints.list_zdr_endpoints()`: `error.openrouter_metadata` **Added** * `open_router.endpoints.list()`: `error.openrouter_metadata` **Added** * `open_router.generations.get_generation()`: * `response.data` **Changed** * `error.openrouter_metadata` **Added** * `open_router.guardrails.list()`: * `request.workspace_id` **Added** * `response.data.[]` **Changed** * `error.openrouter_metadata` **Added** * `open_router.guardrails.create()`: * `request` **Changed** * `response.data` **Changed** * `error` **Changed** * `open_router.guardrails.delete()`: `error.openrouter_metadata` **Added** * `open_router.guardrails.get()`: * `response.data` **Changed** * `error.openrouter_metadata` **Added** * `open_router.guardrails.update()`: * `request` **Changed** * `response.data` **Changed** * `error.openrouter_metadata` **Added** * `open_router.guardrails.list_guardrail_key_assignments()`: `error.openrouter_metadata` **Added** * `open_router.guardrails.bulk_assign_keys()`: `error.openrouter_metadata` **Added** * `open_router.guardrails.bulk_unassign_keys()`: `error.openrouter_metadata` **Added** * `open_router.guardrails.list_guardrail_member_assignments()`: `error.openrouter_metadata` **Added** * `open_router.guardrails.bulk_assign_members()`: `error.openrouter_metadata` **Added** * `open_router.guardrails.bulk_unassign_members()`: `error.openrouter_metadata` **Added** * `open_router.guardrails.list_key_assignments()`: `error.openrouter_metadata` **Added** * `open_router.guardrails.list_member_assignments()`: `error.openrouter_metadata` **Added** * `open_router.api_keys.get_current_key_metadata()`: `error.openrouter_metadata` **Added** * `open_router.api_keys.list()`: * `request.workspace_id` **Added** * `response.data.[].workspace_id` **Added** * `error.openrouter_metadata` **Added** * `open_router.api_keys.create()`: * `request.workspace_id` **Added** * `response.data.workspace_id` **Added** * `error` **Changed** * `open_router.api_keys.delete()`: `error.openrouter_metadata` **Added** * `open_router.api_keys.get()`: * `response.data.workspace_id` **Added** * `error.openrouter_metadata` **Added** * `open_router.api_keys.update()`: * `response.data.workspace_id` **Added** * `error.openrouter_metadata` **Added** * `open_router.models.list()`: * `response.data.[].supported_voices` **Added** * `error.openrouter_metadata` **Added** * `open_router.models.count()`: `error.openrouter_metadata` **Added** * `open_router.models.list_for_user()`: * `response.data.[].supported_voices` **Added** * `error.openrouter_metadata` **Added** * `open_router.organization.list_members()`: `error.openrouter_metadata` **Added** * `open_router.providers.list()`: `error.openrouter_metadata` **Added** * `open_router.rerank.rerank()`: `error.openrouter_metadata` **Added** * `open_router.video_generation.generate()`: * `request` **Changed** * `error.openrouter_metadata` **Added** * `open_router.video_generation.get_generation()`: `error.openrouter_metadata` **Added** * `open_router.video_generation.get_video_content()`: `error.openrouter_metadata` **Added** * `open_router.video_generation.list_videos_models()`: `error.openrouter_metadata` **Added** --- .devcontainer/README.md | 5 + .speakeasy/gen.lock | 2683 ++- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 16499 +++++++++++----- .speakeasy/workflow.lock | 11 +- README-PYPI.md | 30 + README.md | 2 +- RELEASES.md | 12 +- docs/components/costdetails.md | 12 +- docs/components/data.md | 10 - docs/components/model.md | 1 + docs/components/modelscountresponse.md | 6 +- docs/components/modelslistresponse.md | 6 +- .../openairesponsestoolchoiceunion.md | 12 + docs/components/outputmodality.md | 18 +- docs/components/providername.md | 5 + docs/errors/badgatewayresponseerror.md | 1 + docs/errors/badrequestresponseerror.md | 1 + .../errors/edgenetworktimeoutresponseerror.md | 1 + docs/errors/forbiddenresponseerror.md | 1 + docs/errors/internalserverresponseerror.md | 1 + docs/errors/notfoundresponseerror.md | 1 + docs/errors/payloadtoolargeresponseerror.md | 1 + docs/errors/paymentrequiredresponseerror.md | 1 + .../errors/provideroverloadedresponseerror.md | 1 + docs/errors/requesttimeoutresponseerror.md | 1 + .../errors/serviceunavailableresponseerror.md | 1 + docs/errors/toomanyrequestsresponseerror.md | 1 + docs/errors/unauthorizedresponseerror.md | 1 + .../unprocessableentityresponseerror.md | 1 + docs/operations/apitype.md | 13 - docs/operations/content.md | 18 + docs/operations/createguardrailrequest.md | 12 +- docs/operations/createkeysdata.md | 3 +- docs/operations/createkeysrequestbody.md | 3 +- docs/operations/createkeysresponse.md | 8 +- docs/operations/createresponsesrequest.md | 1 + .../operations/createresponsesresponsebody.md | 10 - docs/operations/getgenerationdata.md | 47 - docs/operations/getgenerationresponse.md | 10 - docs/operations/getkeydata.md | 3 +- docs/operations/getkeyresponse.md | 6 +- docs/operations/listdata.md | 3 +- docs/operations/listguardrailsrequest.md | 3 +- docs/operations/listguardrailsresponse.md | 6 +- docs/operations/listrequest.md | 3 +- .../sendchatcompletionrequestrequest.md | 1 + .../sendchatcompletionrequestresponsebody.md | 10 - docs/operations/updatekeysdata.md | 3 +- docs/operations/updatekeysresponse.md | 6 +- docs/sdks/apikeys/README.md | 3 + docs/sdks/chat/README.md | 6 +- docs/sdks/generations/README.md | 57 +- docs/sdks/guardrails/README.md | 79 +- docs/sdks/responses/README.md | 5 +- pyproject.toml | 5 +- scripts/publish.sh | 2 + src/openrouter/_version.py | 4 +- src/openrouter/api_keys.py | 26 +- src/openrouter/byok.py | 591 + src/openrouter/chat.py | 44 +- src/openrouter/components/__init__.py | 1364 +- .../anthropiccachecontroldirective.py | 4 +- .../components/applypatchcallitem.py | 81 + .../components/applypatchcalloperation.py | 78 + .../applypatchcalloperationdiffdeltaevent.py | 35 + .../applypatchcalloperationdiffdoneevent.py | 35 + .../components/applypatchcalloutputitem.py | 84 + .../components/applypatchcallstatus.py | 15 + .../applypatchservertool_openrouter.py | 30 + .../components/applypatchservertoolconfig.py | 13 + src/openrouter/components/baseinputs_union.py | 25 +- .../bulkaddworkspacemembersrequest.py | 16 + .../bulkaddworkspacemembersresponse.py | 22 + .../bulkremoveworkspacemembersrequest.py | 16 + .../bulkremoveworkspacemembersresponse.py | 15 + src/openrouter/components/byokkey.py | 116 + src/openrouter/components/byokproviderslug.py | 93 + src/openrouter/components/chatfunctiontool.py | 3 + src/openrouter/components/chatrequest.py | 8 + src/openrouter/components/chatresult.py | 6 +- src/openrouter/components/chatstreamchunk.py | 12 +- .../components/chatstreamingresponse.py | 16 + src/openrouter/components/chatusage.py | 31 +- .../components/chatwebsearchshorthand.py | 16 +- src/openrouter/components/compactionitem.py | 64 + .../components/contentfilteraction.py | 15 + .../components/contentfilterbuiltinaction.py | 16 + .../components/contentfilterbuiltinentry.py | 36 + .../components/contentfilterbuiltinslug.py | 21 + .../components/contentfilterentry.py | 69 + .../components/contentpartinputaudio.py | 21 + .../components/contentpartinputfile.py | 21 + .../components/contentpartinputvideo.py | 21 + src/openrouter/components/costdetails.py | 60 + .../components/createguardrailrequest.py | 69 +- .../components/createworkspacerequest.py | 119 + .../components/createworkspaceresponse.py | 14 + .../customtoolcallinputdeltaevent.py | 33 + .../customtoolcallinputdoneevent.py | 33 + .../components/customtoolcallitem.py | 38 + .../components/customtoolcalloutputitem.py | 138 + .../components/deleteworkspaceresponse.py | 22 + src/openrouter/components/easyinputmessage.py | 1 + src/openrouter/components/endpointinfo.py | 19 + .../components/endpointsmetadata.py | 18 + .../components/filesearchservertool.py | 22 +- src/openrouter/components/functioncallitem.py | 5 + .../components/functioncalloutputitem.py | 13 +- src/openrouter/components/fusionplugin.py | 37 + .../components/fusionservertool_openrouter.py | 30 + .../components/fusionservertoolconfig.py | 30 + .../components/generationcontentdata.py | 101 + .../components/generationcontentresponse.py | 20 + .../components/generationresponse.py | 330 + .../components/getbyokkeyresponse.py | 14 + .../getobservabilitydestinationresponse.py | 17 + .../components/getworkspaceresponse.py | 14 + src/openrouter/components/guardrail.py | 66 +- .../imagegenerationservertoolconfig.py | 4 +- src/openrouter/components/inputimage.py | 1 + src/openrouter/components/inputmessageitem.py | 1 + src/openrouter/components/inputs_union.py | 175 +- .../components/itemreferenceitem.py | 24 + .../components/listbyokkeysresponse.py | 22 + .../listobservabilitydestinationsresponse.py | 25 + .../components/listworkspacesresponse.py | 22 + .../components/localshellcallitem.py | 99 + ...tconfig.py => localshellcalloutputitem.py} | 46 +- .../components/mcpapprovalrequestitem.py | 33 + .../components/mcpapprovalresponseitem.py | 70 + src/openrouter/components/mcpcallitem.py | 76 + src/openrouter/components/mcplisttoolsitem.py | 117 + src/openrouter/components/metadatalevel.py | 15 + src/openrouter/components/model.py | 6 + .../components/modelscountresponse.py | 8 +- src/openrouter/components/multimodalmedia.py | 18 + .../observabilityarizedestination.py | 130 + .../observabilitybraintrustdestination.py | 127 + .../observabilityclickhousedestination.py | 132 + .../observabilitydatadogdestination.py | 131 + .../components/observabilitydestination.py | 123 + .../observabilityfilterrulesconfig.py | 106 + .../observabilitygrafanadestination.py | 127 + .../observabilitylangfusedestination.py | 127 + .../observabilitylangsmithdestination.py | 132 + .../observabilitynewrelicdestination.py | 135 + .../observabilityopikdestination.py | 125 + .../observabilityotelcollectordestination.py | 118 + .../observabilityposthogdestination.py | 122 + .../observabilityrampdestination.py | 126 + .../components/observabilitys3destination.py | 146 + .../observabilitysentrydestination.py | 122 + .../observabilitysnowflakedestination.py | 134 + .../observabilityweavedestination.py | 130 + .../observabilitywebhookdestination.py | 132 + .../openairesponsecustomtoolcall.py | 34 + .../openairesponsecustomtoolcalloutput.py | 59 + .../openairesponsefunctiontoolcall.py | 5 + .../openairesponsestoolchoice_union.py | 26 + .../components/openresponsesresult.py | 11 +- .../components/openroutermetadata.py | 79 + .../components/outputapplypatchcallitem.py | 44 + .../outputapplypatchservertoolitem.py | 19 +- .../components/outputcustomtoolcallitem.py | 38 + .../components/outputfunctioncallitem.py | 5 + .../components/outputfusionservertoolitem.py | 141 + .../outputimagegenerationservertoolitem.py | 44 +- src/openrouter/components/outputitems.py | 43 +- src/openrouter/components/outputmodality.py | 2 + .../outputsearchmodelsservertoolitem.py | 40 + .../outputwebfetchservertoolitem.py | 11 + .../components/outputwebsearchcallitem.py | 18 +- .../outputwebsearchservertoolitem.py | 48 +- .../components/paretorouterplugin.py | 27 + src/openrouter/components/pipelinestage.py | 80 + .../components/pipelinestagetype.py | 18 + src/openrouter/components/providername.py | 5 + src/openrouter/components/provideroptions.py | 393 + src/openrouter/components/providerresponse.py | 5 + src/openrouter/components/responsesrequest.py | 39 +- .../components/responsesstreamingresponse.py | 16 + src/openrouter/components/routerattempt.py | 19 + src/openrouter/components/routerparams.py | 35 + src/openrouter/components/routingstrategy.py | 21 + .../components/searchqualitylevel.py | 2 +- src/openrouter/components/shellcallitem.py | 132 + .../components/shellcalloutputitem.py | 150 + src/openrouter/components/speechrequest.py | 74 + src/openrouter/components/streamevents.py | 62 +- src/openrouter/components/sttinputaudio.py | 25 + src/openrouter/components/sttrequest.py | 56 + src/openrouter/components/sttresponse.py | 26 + src/openrouter/components/sttusage.py | 40 + .../components/textextendedconfig.py | 11 +- .../components/updateguardrailrequest.py | 61 +- .../components/updateworkspacerequest.py | 121 + .../components/updateworkspaceresponse.py | 14 + src/openrouter/components/usage.py | 8 +- .../components/videogenerationrequest.py | 34 +- src/openrouter/components/videomodel.py | 10 + .../components/webfetchengineenum.py | 18 + .../components/webfetchservertool.py | 30 + .../components/webfetchservertoolconfig.py | 45 + src/openrouter/components/websearchconfig.py | 16 +- src/openrouter/components/websearchplugin.py | 113 +- .../websearchservertool_openrouter.py | 25 +- .../components/websearchservertoolconfig.py | 62 + .../websearchuserlocationservertool.py | 55 +- src/openrouter/components/workspace.py | 125 + src/openrouter/components/workspacemember.py | 48 + .../errors/badgatewayresponse_error.py | 5 +- .../errors/badrequestresponse_error.py | 5 +- .../errors/conflictresponse_error.py | 5 +- .../edgenetworktimeoutresponse_error.py | 5 +- .../errors/forbiddenresponse_error.py | 5 +- .../errors/internalserverresponse_error.py | 5 +- .../errors/notfoundresponse_error.py | 5 +- .../errors/payloadtoolargeresponse_error.py | 5 +- .../errors/paymentrequiredresponse_error.py | 5 +- .../provideroverloadedresponse_error.py | 5 +- .../errors/requesttimeoutresponse_error.py | 5 +- .../serviceunavailableresponse_error.py | 5 +- .../errors/toomanyrequestsresponse_error.py | 5 +- .../errors/unauthorizedresponse_error.py | 5 +- .../unprocessableentityresponse_error.py | 5 +- src/openrouter/generations.py | 332 +- src/openrouter/guardrails.py | 172 +- src/openrouter/observability.py | 589 + src/openrouter/operations/__init__.py | 250 +- .../operations/bulkaddworkspacemembers.py | 121 + .../operations/bulkremoveworkspacemembers.py | 121 + .../operations/createaudiospeech.py | 107 + .../operations/createaudiotranscriptions.py | 107 + src/openrouter/operations/createembeddings.py | 64 +- src/openrouter/operations/createkeys.py | 11 + src/openrouter/operations/createresponses.py | 29 +- src/openrouter/operations/createworkspace.py | 111 + src/openrouter/operations/deleteworkspace.py | 107 + src/openrouter/operations/getbyokkey.py | 107 + src/openrouter/operations/getgeneration.py | 310 +- src/openrouter/operations/getkey.py | 5 + .../operations/getobservabilitydestination.py | 107 + src/openrouter/operations/getworkspace.py | 107 + src/openrouter/operations/list.py | 13 + src/openrouter/operations/listbyokkeys.py | 242 + .../operations/listgenerationcontent.py | 107 + src/openrouter/operations/listguardrails.py | 8 + .../listobservabilitydestinations.py | 140 + src/openrouter/operations/listworkspaces.py | 132 + .../operations/sendchatcompletionrequest.py | 29 +- src/openrouter/operations/updatekeys.py | 5 + src/openrouter/operations/updateworkspace.py | 123 + src/openrouter/responses.py | 80 +- src/openrouter/sdk.py | 20 + src/openrouter/stt.py | 407 + src/openrouter/tts.py | 472 + src/openrouter/video_generation.py | 20 +- src/openrouter/workspaces.py | 2143 ++ uv.lock | 2 +- 260 files changed, 30595 insertions(+), 6055 deletions(-) delete mode 100644 docs/components/data.md delete mode 100644 docs/operations/apitype.md delete mode 100644 docs/operations/createresponsesresponsebody.md delete mode 100644 docs/operations/getgenerationdata.md delete mode 100644 docs/operations/getgenerationresponse.md delete mode 100644 docs/operations/sendchatcompletionrequestresponsebody.md create mode 100644 src/openrouter/byok.py create mode 100644 src/openrouter/components/applypatchcallitem.py create mode 100644 src/openrouter/components/applypatchcalloperation.py create mode 100644 src/openrouter/components/applypatchcalloperationdiffdeltaevent.py create mode 100644 src/openrouter/components/applypatchcalloperationdiffdoneevent.py create mode 100644 src/openrouter/components/applypatchcalloutputitem.py create mode 100644 src/openrouter/components/applypatchcallstatus.py create mode 100644 src/openrouter/components/applypatchservertool_openrouter.py create mode 100644 src/openrouter/components/applypatchservertoolconfig.py create mode 100644 src/openrouter/components/bulkaddworkspacemembersrequest.py create mode 100644 src/openrouter/components/bulkaddworkspacemembersresponse.py create mode 100644 src/openrouter/components/bulkremoveworkspacemembersrequest.py create mode 100644 src/openrouter/components/bulkremoveworkspacemembersresponse.py create mode 100644 src/openrouter/components/byokkey.py create mode 100644 src/openrouter/components/byokproviderslug.py create mode 100644 src/openrouter/components/chatstreamingresponse.py create mode 100644 src/openrouter/components/compactionitem.py create mode 100644 src/openrouter/components/contentfilteraction.py create mode 100644 src/openrouter/components/contentfilterbuiltinaction.py create mode 100644 src/openrouter/components/contentfilterbuiltinentry.py create mode 100644 src/openrouter/components/contentfilterbuiltinslug.py create mode 100644 src/openrouter/components/contentfilterentry.py create mode 100644 src/openrouter/components/contentpartinputaudio.py create mode 100644 src/openrouter/components/contentpartinputfile.py create mode 100644 src/openrouter/components/contentpartinputvideo.py create mode 100644 src/openrouter/components/costdetails.py create mode 100644 src/openrouter/components/createworkspacerequest.py create mode 100644 src/openrouter/components/createworkspaceresponse.py create mode 100644 src/openrouter/components/customtoolcallinputdeltaevent.py create mode 100644 src/openrouter/components/customtoolcallinputdoneevent.py create mode 100644 src/openrouter/components/customtoolcallitem.py create mode 100644 src/openrouter/components/customtoolcalloutputitem.py create mode 100644 src/openrouter/components/deleteworkspaceresponse.py create mode 100644 src/openrouter/components/endpointinfo.py create mode 100644 src/openrouter/components/endpointsmetadata.py create mode 100644 src/openrouter/components/fusionplugin.py create mode 100644 src/openrouter/components/fusionservertool_openrouter.py create mode 100644 src/openrouter/components/fusionservertoolconfig.py create mode 100644 src/openrouter/components/generationcontentdata.py create mode 100644 src/openrouter/components/generationcontentresponse.py create mode 100644 src/openrouter/components/generationresponse.py create mode 100644 src/openrouter/components/getbyokkeyresponse.py create mode 100644 src/openrouter/components/getobservabilitydestinationresponse.py create mode 100644 src/openrouter/components/getworkspaceresponse.py create mode 100644 src/openrouter/components/itemreferenceitem.py create mode 100644 src/openrouter/components/listbyokkeysresponse.py create mode 100644 src/openrouter/components/listobservabilitydestinationsresponse.py create mode 100644 src/openrouter/components/listworkspacesresponse.py create mode 100644 src/openrouter/components/localshellcallitem.py rename src/openrouter/components/{textconfig.py => localshellcalloutputitem.py} (60%) create mode 100644 src/openrouter/components/mcpapprovalrequestitem.py create mode 100644 src/openrouter/components/mcpapprovalresponseitem.py create mode 100644 src/openrouter/components/mcpcallitem.py create mode 100644 src/openrouter/components/mcplisttoolsitem.py create mode 100644 src/openrouter/components/metadatalevel.py create mode 100644 src/openrouter/components/multimodalmedia.py create mode 100644 src/openrouter/components/observabilityarizedestination.py create mode 100644 src/openrouter/components/observabilitybraintrustdestination.py create mode 100644 src/openrouter/components/observabilityclickhousedestination.py create mode 100644 src/openrouter/components/observabilitydatadogdestination.py create mode 100644 src/openrouter/components/observabilitydestination.py create mode 100644 src/openrouter/components/observabilityfilterrulesconfig.py create mode 100644 src/openrouter/components/observabilitygrafanadestination.py create mode 100644 src/openrouter/components/observabilitylangfusedestination.py create mode 100644 src/openrouter/components/observabilitylangsmithdestination.py create mode 100644 src/openrouter/components/observabilitynewrelicdestination.py create mode 100644 src/openrouter/components/observabilityopikdestination.py create mode 100644 src/openrouter/components/observabilityotelcollectordestination.py create mode 100644 src/openrouter/components/observabilityposthogdestination.py create mode 100644 src/openrouter/components/observabilityrampdestination.py create mode 100644 src/openrouter/components/observabilitys3destination.py create mode 100644 src/openrouter/components/observabilitysentrydestination.py create mode 100644 src/openrouter/components/observabilitysnowflakedestination.py create mode 100644 src/openrouter/components/observabilityweavedestination.py create mode 100644 src/openrouter/components/observabilitywebhookdestination.py create mode 100644 src/openrouter/components/openairesponsecustomtoolcall.py create mode 100644 src/openrouter/components/openairesponsecustomtoolcalloutput.py create mode 100644 src/openrouter/components/openroutermetadata.py create mode 100644 src/openrouter/components/outputapplypatchcallitem.py create mode 100644 src/openrouter/components/outputcustomtoolcallitem.py create mode 100644 src/openrouter/components/outputfusionservertoolitem.py create mode 100644 src/openrouter/components/outputsearchmodelsservertoolitem.py create mode 100644 src/openrouter/components/paretorouterplugin.py create mode 100644 src/openrouter/components/pipelinestage.py create mode 100644 src/openrouter/components/pipelinestagetype.py create mode 100644 src/openrouter/components/provideroptions.py create mode 100644 src/openrouter/components/responsesstreamingresponse.py create mode 100644 src/openrouter/components/routerattempt.py create mode 100644 src/openrouter/components/routerparams.py create mode 100644 src/openrouter/components/routingstrategy.py create mode 100644 src/openrouter/components/shellcallitem.py create mode 100644 src/openrouter/components/shellcalloutputitem.py create mode 100644 src/openrouter/components/speechrequest.py create mode 100644 src/openrouter/components/sttinputaudio.py create mode 100644 src/openrouter/components/sttrequest.py create mode 100644 src/openrouter/components/sttresponse.py create mode 100644 src/openrouter/components/sttusage.py create mode 100644 src/openrouter/components/updateworkspacerequest.py create mode 100644 src/openrouter/components/updateworkspaceresponse.py create mode 100644 src/openrouter/components/webfetchengineenum.py create mode 100644 src/openrouter/components/webfetchservertool.py create mode 100644 src/openrouter/components/webfetchservertoolconfig.py create mode 100644 src/openrouter/components/websearchservertoolconfig.py create mode 100644 src/openrouter/components/workspace.py create mode 100644 src/openrouter/components/workspacemember.py create mode 100644 src/openrouter/observability.py create mode 100644 src/openrouter/operations/bulkaddworkspacemembers.py create mode 100644 src/openrouter/operations/bulkremoveworkspacemembers.py create mode 100644 src/openrouter/operations/createaudiospeech.py create mode 100644 src/openrouter/operations/createaudiotranscriptions.py create mode 100644 src/openrouter/operations/createworkspace.py create mode 100644 src/openrouter/operations/deleteworkspace.py create mode 100644 src/openrouter/operations/getbyokkey.py create mode 100644 src/openrouter/operations/getobservabilitydestination.py create mode 100644 src/openrouter/operations/getworkspace.py create mode 100644 src/openrouter/operations/listbyokkeys.py create mode 100644 src/openrouter/operations/listgenerationcontent.py create mode 100644 src/openrouter/operations/listobservabilitydestinations.py create mode 100644 src/openrouter/operations/listworkspaces.py create mode 100644 src/openrouter/operations/updateworkspace.py create mode 100644 src/openrouter/stt.py create mode 100644 src/openrouter/tts.py create mode 100644 src/openrouter/workspaces.py diff --git a/.devcontainer/README.md b/.devcontainer/README.md index 396929a..c7d8d27 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -1,4 +1,9 @@ +
+ +
+
+ > **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 8f932cd..69518cc 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,17 +1,19 @@ lockVersion: 2.0.0 id: c48cf606-fb42-4a45-9c23-8f0555307828 management: - docChecksum: 59bf622329ff2d6d2a28acceada10a6d + docChecksum: 375b15d16bd1f4a82a85013bf9519bbd docVersion: 1.0.0 speakeasyVersion: 1.680.0 generationVersion: 2.788.4 - releaseVersion: 0.9.1 - configChecksum: 9c8b936b4b1d37d964e844ee1a15cd4b + releaseVersion: 0.9.2 + configChecksum: f906b25652bcc83a52d1c74e5018c02e + repoURL: https://github.com/OpenRouterTeam/python-sdk.git + installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: ce3858e4-7fbd-4f52-9d57-24016d5c1504 - pristine_commit_hash: c581f0a6ace9e1c793b0f4d759585b420c157610 - pristine_tree_hash: c5a3bf3d181c5c54d764cdf6372feb79505d5ed7 + generation_id: ef5c323d-c6fa-4cf0-bad2-4150a66413b8 + pristine_commit_hash: a1936b370034e26b949a746d6b18e15dd36e76f4 + pristine_tree_hash: 7e9d1911e696213f06ea35ec3b5c56cb63a6ee4f features: python: acceptHeaders: 3.0.0 @@ -50,8 +52,8 @@ features: trackedFiles: .devcontainer/README.md: id: b170c0f184ac - last_write_checksum: sha1:3c63dfd4dcea8df0d4add09e975a6887e6da4aab - pristine_git_object: 396929ab2e57cf09dd25ec83bd4496f733b95701 + last_write_checksum: sha1:919a25ed5129d316f05a60131c164011763b7c54 + pristine_git_object: c7d8d278438e7906fedb39d99151372b3324ea66 .devcontainer/devcontainer.json: id: b34062a34eb1 last_write_checksum: sha1:94309e8c8eab5ab063986bf625f513a59825e947 @@ -74,8 +76,8 @@ trackedFiles: pristine_git_object: 9c1506b8f539140db04b239d7a84d8b599747932 docs/components/action.md: id: 6b3978ee918f - last_write_checksum: sha1:7026f076ddcf89df8f64180c1f6c55b42e642083 - pristine_git_object: 7e76bbedc5fe8e969ccce0ce12a07dd89e2d740b + last_write_checksum: sha1:9d4cd420c5cd5ea25837e2c6db447d5ecb600b7a + pristine_git_object: 937ac471f7118c9064b2db116df9cf68f1b6b288 docs/components/actionenum.md: id: 608bbbe865bb last_write_checksum: sha1:b7b7984fc2930c3a7be17c2f731e9ced7f8432c5 @@ -88,10 +90,10 @@ trackedFiles: id: 0956df8f10e4 last_write_checksum: sha1:88d726e5b59287d1ff171621cbf0d16ea9d5d9da pristine_git_object: 0401058dca54568c8f2e686e4e82e0f40e0445cf - docs/components/actionsearch.md: - id: 8cee1325fe56 - last_write_checksum: sha1:69b2b7b0c8f67d42c1db23642fd622af2d9f7c2b - pristine_git_object: 994ad66e550cb9478fe4419d05dba8024b752af7 + docs/components/actiontypesearch.md: + id: b9d4385f8dbc + last_write_checksum: sha1:b47e07eb215799391aa85eb26fdd81b3ad21ba0f + pristine_git_object: 094a1e844d3476ba189a4a88987d4507efdda2a6 docs/components/activityitem.md: id: 3a8beda39814 last_write_checksum: sha1:c91cff73639d4b52bea337fc8110c840684b247f @@ -112,6 +114,10 @@ trackedFiles: id: 60d5b0ff8f83 last_write_checksum: sha1:04684b9e3eea071da9938b3e1deed152f845a0e2 pristine_git_object: a7a7fd1155f474f4c45ce17e4d678ad2736153b2 + docs/components/analysis.md: + id: 2ecd87cdab78 + last_write_checksum: sha1:a5480508d709d2cff940bbf99eac51cdb228b8ba + pristine_git_object: 67ddf3f5bb17f9eb31970a1b67ea4717166508f1 docs/components/annotationaddedevent.md: id: 7639957f7faf last_write_checksum: sha1:fb9a7f6efa4a47ea2b1c6a48c55c087c21fa11e0 @@ -122,8 +128,8 @@ trackedFiles: pristine_git_object: 4840df7f7005389811fae7c8868ad8d6c1efcd18 docs/components/anthropiccachecontroldirective.md: id: 3bdd9daf51d9 - last_write_checksum: sha1:5fb9adeb019b713045bd59caa06950067644b0c5 - pristine_git_object: 9dbc2830cb4cd675922e2070c34af86530597666 + last_write_checksum: sha1:c69886ea262e4d88ee0d17e0be62a7fba60a8b4b + pristine_git_object: d71a660204cd918ac8ab609da5f70d9f51a5b6f0 docs/components/anthropiccachecontroldirectivetype.md: id: a20a54545fe3 last_write_checksum: sha1:467772e8b5b227b4e80b0600d3ed275aeb2ea210 @@ -132,10 +138,82 @@ trackedFiles: id: 980004cae93f last_write_checksum: sha1:6f66927f536c351dcfbb940672511bd8a6fdd1a0 pristine_git_object: 32e8fd42002d9379fa207d0867b428c443a63a42 + docs/components/apitype.md: + id: "0e0508573603" + last_write_checksum: sha1:197a0eb64a2c9d6a631e2d8353df6fba49ee6247 + pristine_git_object: e1ca91596a1831fbc0a9161699db3c5bbc10f2fc + docs/components/applypatchcallitem.md: + id: 3b65f71849fb + last_write_checksum: sha1:9b9efa229a6801da2ecd6fe16526adce76039dab + pristine_git_object: 1a5242abe7b4b84a334e40104f1f8e37d102ac76 + docs/components/applypatchcallitemtype.md: + id: af492b652e95 + last_write_checksum: sha1:ce150433d6fc023d92c4c92bfa151748dfe79976 + pristine_git_object: 46cff3bed1ac629620c343236e022c9dcbcd3262 + docs/components/applypatchcalloperation.md: + id: 8f8084ad5328 + last_write_checksum: sha1:01a433ef5b637771607e0aa5b2be7a3db5b63f12 + pristine_git_object: e24a17db5649fb1e39b351e3c74dac116cfe3ba3 + docs/components/applypatchcalloperationcreatefile.md: + id: 4ec84e9c0488 + last_write_checksum: sha1:a11ad389174f7d4fd86c220e89ea7db8f20bfd86 + pristine_git_object: e04385b97bdffbb89902e2ff3f2eaa4d28624c60 + docs/components/applypatchcalloperationdeletefile.md: + id: 0de73e9b5bdd + last_write_checksum: sha1:2328ddfa7ad81b3e5244434eb0d0e2e24c49ffbb + pristine_git_object: 5b1fc0fb695265d2796351daca19b894644715ab + docs/components/applypatchcalloperationdiffdeltaevent.md: + id: d3415d4a1b9b + last_write_checksum: sha1:11bd720248016d0471a3f0a77472d4ab0e5bd1e7 + pristine_git_object: 8909a6bf68ccef93331486c47e2dbc6f2fff5e2e + docs/components/applypatchcalloperationdiffdeltaeventtype.md: + id: 54634e44c46c + last_write_checksum: sha1:9a44a4cc508e7168e88735a3364842f11fc7d16a + pristine_git_object: e6617985996f698f0aab9cc8a02b1afd96f34486 + docs/components/applypatchcalloperationdiffdoneevent.md: + id: 97b9df6f879c + last_write_checksum: sha1:74b5dc299f320882312db1990eb8906c2ee4ced5 + pristine_git_object: 341163b35457a4d5a7e55dbc4f3a8ca3a7ade543 + docs/components/applypatchcalloperationdiffdoneeventtype.md: + id: 102f8c5ccfcc + last_write_checksum: sha1:0e1dd7f57e56d0ec76b803608fc89adb542bc40c + pristine_git_object: d4dbd0e072f04d2c0044d1cc06a34d4edf7b77e0 + docs/components/applypatchcalloperationupdatefile.md: + id: 71a551ffae37 + last_write_checksum: sha1:f016fa83ee53b40a560fa4dfb09c4f4be9c1fa02 + pristine_git_object: 0f9835f631713cd954177727c49e7c1418421401 + docs/components/applypatchcalloutputitem.md: + id: 5c1f50f02008 + last_write_checksum: sha1:c0f25cda15d3a3bc4e7503e78a6f397d738fc160 + pristine_git_object: 76eca926b0d9ba9ce9c6cc35e90f563e01553c4c + docs/components/applypatchcalloutputitemstatus.md: + id: 23ec4ce36067 + last_write_checksum: sha1:8ae4e87b085331254ff882190f1cddebb64b6928 + pristine_git_object: 7a4608be7dabb77f98399f19ddaa5ea53432934b + docs/components/applypatchcalloutputitemtype.md: + id: ab607dca3dbe + last_write_checksum: sha1:ee760d4d4960bfc69f60962903a7158289f055ee + pristine_git_object: 3e5acbd34e8eca78b6b1c32acdc60ad2c3f22a94 + docs/components/applypatchcallstatus.md: + id: 0815abe9f197 + last_write_checksum: sha1:d0154ff9c6255e336a968f3eb8c9fb676f2ecd24 + pristine_git_object: c9a787f93df86fbdd02f560b747515ec8192658d docs/components/applypatchservertool.md: id: 924a4805520a last_write_checksum: sha1:f87ee16357b393e199bf0a4ba74e02130f1f243b pristine_git_object: 704ebe93904414764ac0d52dcfa8bc76c1eaebe2 + docs/components/applypatchservertoolconfig.md: + id: 39d0b010aed8 + last_write_checksum: sha1:775cb3a4cfa673d2f8c32174c95a5188ba6664c2 + pristine_git_object: bb3e4fe05d006ccce590afd9ba49dd5b44d4521a + docs/components/applypatchservertoolopenrouter.md: + id: 8a6bdee0a3c2 + last_write_checksum: sha1:e6798349fc9225d9f2fdbaca96bbaaebb6f67b95 + pristine_git_object: 4bdea1c9c34108c6bd6e954ba3e0043a53e8b39e + docs/components/applypatchservertoolopenroutertype.md: + id: 5ce7a9b8308e + last_write_checksum: sha1:eba1ac2d9ac43d1eeda60227b6a3bc6498dc1e79 + pristine_git_object: 44cfe93954107c960d527a15270e8a8107263363 docs/components/applypatchservertooltype.md: id: 3638a8a53d67 last_write_checksum: sha1:c3139367515e9c0b3dd3109065594824e704c35f @@ -146,8 +224,8 @@ trackedFiles: pristine_git_object: 335e0104f7f12774a22886876bde455234e7ea9b docs/components/aspectratio.md: id: fc8c3ccdb468 - last_write_checksum: sha1:e03bcf5c3643e7e49e4d02657727162d4c116b1f - pristine_git_object: bef16665425b5a80ba08db0f55a0aa90d33c5e43 + last_write_checksum: sha1:573dc4ea5cdec788353f87f49ab48434367d7a56 + pristine_git_object: 10febe4b549ef241d21e8ec471c5867c4c670f9e docs/components/autorouterplugin.md: id: ebc3c78144c1 last_write_checksum: sha1:dd7c45de7c791dfd33d9fd1a89adc12cd26f6608 @@ -222,12 +300,20 @@ trackedFiles: pristine_git_object: 2d7597f6a1250fa1b35dc5853f25a0ce1cdfb286 docs/components/baseinputsunion1.md: id: 3b291815d087 - last_write_checksum: sha1:395f8da0635022842bf2152f149506b56ed3a357 - pristine_git_object: 4664a9aa60de0b185ed5bccab4ccf20dfd371fcf + last_write_checksum: sha1:9802e7fee7ddae373d1e3f0e0e9679218b2dab3b + pristine_git_object: 5d49ac1145e668327a3426952a99d7a4edde0d80 docs/components/basereasoningconfig.md: id: c161e7a17271 last_write_checksum: sha1:4f3c5e5dda570bb87ec7e2deff31e2372f36b833 pristine_git_object: 031166f6d79ea3ef1781e95468197271da98738f + docs/components/bulkaddworkspacemembersrequest.md: + id: 12cbe93243c4 + last_write_checksum: sha1:5bc0f5067f2fdd1a05409b18ec723b8b2acb4026 + pristine_git_object: 021221840a6dee060a6d38db651561e5cedf5fc5 + docs/components/bulkaddworkspacemembersresponse.md: + id: d3aab5e7eed9 + last_write_checksum: sha1:37171ea7c4582693d05a06f6ebeb19a129cf6a51 + pristine_git_object: 41c1638401d9354a1024e72a47d50110d24b71f5 docs/components/bulkassignkeysrequest.md: id: 66e9231f0c3c last_write_checksum: sha1:7c4564346bbe9f2692053bb1d518972a9db5ad0e @@ -244,6 +330,14 @@ trackedFiles: id: 04b004029650 last_write_checksum: sha1:64d50ed55132163d6d6337f53e7a97f7fbbdacbd pristine_git_object: 2d6897c459041c7d09ec0260ec7fe56efaa4584e + docs/components/bulkremoveworkspacemembersrequest.md: + id: e265be6b6db8 + last_write_checksum: sha1:a72176adae768afd731c2ccbad121c82ea3c163d + pristine_git_object: 370a7447730e57693615aa1dd96d48cef546117a + docs/components/bulkremoveworkspacemembersresponse.md: + id: 36a1e8be9e5c + last_write_checksum: sha1:994efa56174f14f87605bb3e19eefcdad0aea8b7 + pristine_git_object: 3769f7b5f970db9324d32ec681a30dcee2b0a6ad docs/components/bulkunassignkeysrequest.md: id: 6d254be079fd last_write_checksum: sha1:c61da3563e04a493e6b1b72e0f8e5f3f6f6075e8 @@ -264,6 +358,14 @@ trackedFiles: id: 1bcedb5155b3 last_write_checksum: sha1:e71a7e5b233d761921f330ae499a73024aa4a0a5 pristine_git_object: 557c891217e953757e8385a4b54a50d4528ea91a + docs/components/byokkey.md: + id: 9834cbadc071 + last_write_checksum: sha1:a5d63ecfc3e6048e9b4ca699a0c2383bc0106b84 + pristine_git_object: b4b8d797251e82804d823c25a93aa5116e292d5f + docs/components/byokproviderslug.md: + id: 73e588243967 + last_write_checksum: sha1:48a9c78d2ffcbeabd7707466ec488b391a13a58f + pristine_git_object: 9d3a6ea1fb4c2c62a630efc1750633d54084ca44 docs/components/chatassistantimages.md: id: f1f776b0c4ae last_write_checksum: sha1:05697e4bc0690cabd72965d01519102c149f6363 @@ -414,8 +516,8 @@ trackedFiles: pristine_git_object: f3a972b60a63cdb55670cc56cc92eae40578aa87 docs/components/chatfunctiontool.md: id: 3c79deefdcc0 - last_write_checksum: sha1:b782161259f089ecf304dce269d16c6d4aa3d95d - pristine_git_object: 6a4416a3c9d119186661a8c3987b1bfa63b91882 + last_write_checksum: sha1:b8ef7854c248c31c45327f7ce1fa6ae729d574db + pristine_git_object: 373d51769162ca4c578d67c34a672f9b564d0cd9 docs/components/chatfunctiontoolfunction.md: id: 0de29ccfd817 last_write_checksum: sha1:0a25d1c9b64f1da2513e9153682848cf41f324b2 @@ -454,20 +556,20 @@ trackedFiles: pristine_git_object: ca73483767de32b3d83b7f9e2741011e26ac8e59 docs/components/chatrequest.md: id: 5e0fa9a2cb13 - last_write_checksum: sha1:87b3d27fcc66ed8236442681392750b87ee15209 - pristine_git_object: 617ce2091e37323ba91ec47c7e1a6ccff420a710 + last_write_checksum: sha1:7672b43616016d963be85717056f8b59268061d7 + pristine_git_object: a218e7c4cbf3be8e0ed6bfa68fc3a56941c99db0 docs/components/chatrequestplugin.md: id: 24a908f99472 - last_write_checksum: sha1:872a0f5dec13b33dac3aba3616a1b45ce5352feb - pristine_git_object: 3fcb3f49302af9c7394c00f4946576c5e3ebdabd + last_write_checksum: sha1:e8575889fd035e2abaab82802c0acd081f867460 + pristine_git_object: 0e992f4afa39b85dabce336336d71766bbbded17 docs/components/chatrequestservicetier.md: id: deaf591bec38 last_write_checksum: sha1:8fa53b0f868c99934b83719b7c0b6b44b1f960eb pristine_git_object: 13ae40be5e3c883f88789c3b5b74a3b2da4c85c2 docs/components/chatresult.md: id: 212b0f66efd0 - last_write_checksum: sha1:00d612b46dc057645e9f5b56e6ab94e50ffe9728 - pristine_git_object: b4354698466089e4acfad8dad9d2d61dfb06662e + last_write_checksum: sha1:0a94cfb0c88a0dbf0f0abc5d83ac6fc6c48051b4 + pristine_git_object: cc04eadd2f48efd93533a3ddae52ad39e91f5dee docs/components/chatresultobject.md: id: 668504931d18 last_write_checksum: sha1:6d550246aa007a5be94a9788ae4cfdfb75006980 @@ -486,8 +588,8 @@ trackedFiles: pristine_git_object: 690d74b67239bf7f423039652aea3741c831137e docs/components/chatstreamchunk.md: id: 404d264ea22c - last_write_checksum: sha1:db550d704231305879464bb7ea5d3a00ffbac185 - pristine_git_object: ead7b7ab994da4a328713d1a42a554bfaaeabfa1 + last_write_checksum: sha1:1353c09378850a9810c39cf3198f0fd5e049f610 + pristine_git_object: 3c64aec72fb2eb9f0cf6eae975dd9c8bb183c6e6 docs/components/chatstreamchunkobject.md: id: 5393918d9606 last_write_checksum: sha1:0765d94b3d01c811155dce29c20c2ae4bd4abd0e @@ -500,6 +602,10 @@ trackedFiles: id: bd41a2e6e1ba last_write_checksum: sha1:4382019bbc25043a562225a2d54f07d282c65968 pristine_git_object: 03d5ac5ab133efae7ae05733395324c136247357 + docs/components/chatstreamingresponse.md: + id: 2b5d703d7b01 + last_write_checksum: sha1:a897660437d6d71c4fe70d71cccccbe3e0be042d + pristine_git_object: 26e54c468befcb6070a54bd3560bb8128fa36024 docs/components/chatstreamoptions.md: id: b01e4aa7d192 last_write_checksum: sha1:0f21f4cb7a3f28135b4117e20dcf829ea08ded52 @@ -582,8 +688,8 @@ trackedFiles: pristine_git_object: 7eb1791a9153498d5ffffc6b67d3668df59000c2 docs/components/chatusage.md: id: 72cd0c41ec64 - last_write_checksum: sha1:ceb141009eac851f231ff66b767ba40627148f3b - pristine_git_object: e7312f04590a4a5b31a97597ab4f723f9ff356ef + last_write_checksum: sha1:9a6a709e2ea8f36c1f55afc3ae364917ab787e5e + pristine_git_object: 536fc52c1d3dec20dc3dd38e65714da08779e4d3 docs/components/chatusermessage.md: id: 4ab205b0030b last_write_checksum: sha1:4c87fbc12f54bb5b58526949e3f8ea9c161f8cdf @@ -598,8 +704,8 @@ trackedFiles: pristine_git_object: 95203396fad26d48c76b23f3481b6167291500e5 docs/components/chatwebsearchshorthand.md: id: 97a5522cf188 - last_write_checksum: sha1:3058010c14073b6e201adb7400622a012abfea4e - pristine_git_object: 638c8a94151ac17091347e705f6eb35399b70d98 + last_write_checksum: sha1:ceee57e03f6e0f5bdeee3a8449f9b81bae13ba83 + pristine_git_object: be149fba78748dfaa2b84a6759252cf39fe1f3c2 docs/components/chatwebsearchshorthandtype.md: id: ec8d82e4169d last_write_checksum: sha1:11a35b858e9630405ffdde10c89e60ed33fbed45 @@ -624,6 +730,14 @@ trackedFiles: id: 53e85119ed43 last_write_checksum: sha1:eae4f9ff22f1fb6c5139b9e44a35d0238388a2ea pristine_git_object: 3c45dd0765fa97b40928a609a6bbc0e6092be0fa + docs/components/compactionitem.md: + id: 5c6d406968ec + last_write_checksum: sha1:0314cc2f54c07b7d07da0a815dac19ffef673d33 + pristine_git_object: 76160f0750ffc10ef9d07a2f8d6652f05670cf18 + docs/components/compactionitemtype.md: + id: 1033dd974aab + last_write_checksum: sha1:ba3f1ccb85f1193a2523c96199a7e15a4923e5ef + pristine_git_object: 3616c45038b37d4adc7f0d643f7159853915586d docs/components/completiontokensdetails.md: id: 6b7b08e269a0 last_write_checksum: sha1:1731f180f3ed8e9fb0a52137853b0d587f8f703c @@ -664,6 +778,26 @@ trackedFiles: id: beda1b89c7a4 last_write_checksum: sha1:f513446b0c8b1cb3a34ed6721bd716536ffbae47 pristine_git_object: 9be5b3ce474de60fa8116325313e5a8d9ebe188d + docs/components/contentfilteraction.md: + id: c9b7c26b9524 + last_write_checksum: sha1:363f70d11cc87b49cf7d5ba82f4c4d7063a2a5dd + pristine_git_object: 43ee22f394d068eed9cdda45a655a1f64fdab84e + docs/components/contentfilterbuiltinaction.md: + id: 55a04916d7d4 + last_write_checksum: sha1:1e6e0ebc1b88dbef7029f951368198e20e1cedd3 + pristine_git_object: 4f71cc021888a043f920cd5ae1abad2e34a99056 + docs/components/contentfilterbuiltinentry.md: + id: 82426635e713 + last_write_checksum: sha1:9599772b86c05e215f6429d2ea1d6b34b6791404 + pristine_git_object: 967a11eaa79582e3746e94eaa25ff141450c0c58 + docs/components/contentfilterbuiltinslug.md: + id: 0ce8d26d9c87 + last_write_checksum: sha1:320e33dee158ab882b3728194d266fa1369a83a8 + pristine_git_object: 823e41ff1b867856201745c4d059f6965ebd013f + docs/components/contentfilterentry.md: + id: 856c24c8dad0 + last_write_checksum: sha1:4c604fed1ea84146d5430b5cd449237664655c24 + pristine_git_object: 9b7b6c8c4a83d7c39f6640cdc1b366736c49f38e docs/components/contentpartaddedevent.md: id: 46c34edca7cc last_write_checksum: sha1:d92174df5be607cd3c387504774864c6c80e7899 @@ -700,6 +834,30 @@ trackedFiles: id: 7b799c2f4203 last_write_checksum: sha1:77ad88cf178e7ba6ec27eb2ab17bad7473668a6b pristine_git_object: a63a040363df5d6da9d336daeb354a87a73e531f + docs/components/contentpartinputaudio.md: + id: 649dc80c9a9e + last_write_checksum: sha1:04c4a3da8b685d3d0119b54c8416c667354b5796 + pristine_git_object: edd07bf97cbb02004082f9c976601fa5cfc0d116 + docs/components/contentpartinputaudiotype.md: + id: 93b19b8d50a5 + last_write_checksum: sha1:7bd25fa498c5d21320ab03ee7a5d932d136fa4dd + pristine_git_object: 9feb3fcb787c42aa9f06ff2b48463d167771ed66 + docs/components/contentpartinputfile.md: + id: dfb6b2c0e96f + last_write_checksum: sha1:76b6c74e1f390f5bdc54b8060ac110fcc67eefe1 + pristine_git_object: f7f021677830ff6da9ef89f61de7e3a9811e9a64 + docs/components/contentpartinputfiletype.md: + id: fb7732ac8299 + last_write_checksum: sha1:685e7d57fd27c0e12f82471e3d5853d83f2ff7f9 + pristine_git_object: 60a5682a9cac3cbc856150074dfcd30d70a8e185 + docs/components/contentpartinputvideo.md: + id: 4632198b7a38 + last_write_checksum: sha1:43f358673ca2a9e4d4fbf7b0bef946419abdda06 + pristine_git_object: 27bb8b259a2a81cb33ebc0c9a2a62b7ac94422cf + docs/components/contentpartinputvideotype.md: + id: eac3808e492d + last_write_checksum: sha1:4f9b77cb1c6a8a9d437e44062956bcf0888f3814 + pristine_git_object: 8be0a0534737efc557c6f76a868ce6cf5df50481 docs/components/contextcompressionengine.md: id: de089ca4a588 last_write_checksum: sha1:4dee80dba0a801d9d6aec487235a39d548744372 @@ -712,26 +870,86 @@ trackedFiles: id: 1946fe4536f3 last_write_checksum: sha1:918d605b019529584735b29b008e465a4f798af5 pristine_git_object: 4922c8b3bb952f712fcc0cf414dd5b505ed2c4a4 + docs/components/contradiction.md: + id: 395878b36283 + last_write_checksum: sha1:2ea135646f838c852beef96adc47ab28a0f903a9 + pristine_git_object: 1a94d757e5ad641098da32fda8e9818fe36c134b docs/components/costdetails.md: id: 2e3d81b7a646 - last_write_checksum: sha1:298cb44901e7c50563597aae9e0606cf83edbc2b - pristine_git_object: ada009ced29fcaf5d19e81bc67276fe9718ccfaa + last_write_checksum: sha1:b2748fc0cf305791446f5f217947d82bd74a8350 + pristine_git_object: 58a1aa8485130f8b49c633dfef0439b83a5f239c docs/components/createguardrailrequest.md: id: 5144188aed43 - last_write_checksum: sha1:78119c6dd8cc0b40009afb1da489638ac35f16b6 - pristine_git_object: 77b840640f4d30cf4513745df984d3a950b76c12 + last_write_checksum: sha1:75e69ce805cbe7f5784823960c758ec974e3b7e0 + pristine_git_object: 4a48426b5015437404e4e6b1d2007051d94983e8 docs/components/createguardrailresponse.md: id: 94a5ed00d7b9 - last_write_checksum: sha1:bad318ece1219797a8db60631961006554b38cda - pristine_git_object: bf3c2f7a4c16ba60ecac1fef7a733cfe6c9efb3b + last_write_checksum: sha1:75752f40a309176f17c99306a16ac0d197968190 + pristine_git_object: ff2c8ad048f37007a5c7ae9c19df14dd430a310a + docs/components/createworkspacerequest.md: + id: c81e27cca23b + last_write_checksum: sha1:02a8d08050dfad4c7aa30c136376492597a280b2 + pristine_git_object: 6a27face512625b803b3019961e92fb93507c07c + docs/components/createworkspaceresponse.md: + id: 32307c6ed876 + last_write_checksum: sha1:06da8a383b790b50e9112e715bc27193b773e412 + pristine_git_object: f8016bd9b1a1836738e1f4811999a96dabf244ec docs/components/customtool.md: id: ff0ec1b8ea8b last_write_checksum: sha1:1da938f1452f026020f8f3c617e2ee3fd11b78e5 pristine_git_object: 6cc1ff6a2b47a8fa754fa22f63506126b9b9d0a3 - docs/components/data.md: - id: 097aebaf54b6 - last_write_checksum: sha1:b2407ba7d2f14428d780fc4196d96622d2d4dc07 - pristine_git_object: 386321b1fbeae16dfa3fc07c073b7f1dd8844c1d + docs/components/customtoolcallinputdeltaevent.md: + id: aa74a9239e4a + last_write_checksum: sha1:4e4fc3e68dc1fc5b2d06480df23b7b300976efac + pristine_git_object: 4f602b0e61488f794f97b0d9bcceb46b7e93afb3 + docs/components/customtoolcallinputdeltaeventtype.md: + id: 65bad1b92e5e + last_write_checksum: sha1:028f27c1b938af3e8ccc9234cf28b296eda87778 + pristine_git_object: 1029c1bf974c37ad107d5eb589eede4fc1066f29 + docs/components/customtoolcallinputdoneevent.md: + id: 97d597082345 + last_write_checksum: sha1:221fc723d1c277e5210b8a4c9b050ababaadd58f + pristine_git_object: 691db8e9a97f4ea4ddf07f51464ad7a20900ed9a + docs/components/customtoolcallinputdoneeventtype.md: + id: 1909dec217d4 + last_write_checksum: sha1:67020dd1f2231c0fd73324d8d01ca9272fdbe2cb + pristine_git_object: 088afd273160b71d1eff1495bd50bdee784dc706 + docs/components/customtoolcallitem.md: + id: ae7a6ef3060d + last_write_checksum: sha1:bb1d924cd9719ea627615ac328b110f3ed090b65 + pristine_git_object: a4bf10f7c9de3955d685b74a84bd573fcb799cb5 + docs/components/customtoolcallitemtype.md: + id: 43c75f922ac8 + last_write_checksum: sha1:038cc5d06f5d69a4a2d1318eac6994d25b97d693 + pristine_git_object: 45ae18528e90d2780fc584798ca68c59aa139914 + docs/components/customtoolcalloutputitem.md: + id: 7fd804624ea4 + last_write_checksum: sha1:59c60228c9cfdf9aaf7849308986561f3f6a3362 + pristine_git_object: 9bddd1f51bfa27f3beceae0ec2c0bc961031abe5 + docs/components/customtoolcalloutputitemdetail.md: + id: 9060d746d744 + last_write_checksum: sha1:48b8d9387e689ac4d1011b18ee47b6b50e68f172 + pristine_git_object: 269dcd5c4827764641f5480b124354a9d4c86220 + docs/components/customtoolcalloutputitemoutputinputimage.md: + id: 644e4613d935 + last_write_checksum: sha1:eca57add1039ee49ded44b6ccc5d2415ced9e6d1 + pristine_git_object: 9e9e1f26f81213ba473d6e8888816e7aa4bdcb4e + docs/components/customtoolcalloutputitemoutputtype.md: + id: 6fcaab05b88d + last_write_checksum: sha1:552b29c1a6e03d8f39b1461abb0a76703f2d9a3e + pristine_git_object: 9e86d3f8871e78308c02a40de55ed92298b6fc14 + docs/components/customtoolcalloutputitemoutputunion1.md: + id: 72bb55707f72 + last_write_checksum: sha1:05a9d4f91756451143d0dd75d551cae5dd572a5e + pristine_git_object: 9061394039ad4daeb84740e333554e6828ef8299 + docs/components/customtoolcalloutputitemoutputunion2.md: + id: ca10033f3ed9 + last_write_checksum: sha1:213c956b2fc511b952bd8f3416fdef20336c4081 + pristine_git_object: 6750f9d41f77ec38d8554a2c880ae9e0daab8357 + docs/components/customtoolcalloutputitemtypecustomtoolcalloutput.md: + id: e6ba19bbdb9a + last_write_checksum: sha1:435ef3f664fa25e832e09d4b7fd23bec43711962 + pristine_git_object: 1f833f8904c45c28f378a297e912f2413b0ba6b8 docs/components/datacollection.md: id: cacd95d2ebf9 last_write_checksum: sha1:1d9eb4c12467860d5ef9edceb6456a4b9d6de643 @@ -756,6 +974,10 @@ trackedFiles: id: 78770374c8ed last_write_checksum: sha1:1ceae5a23d706b158b011b234d968a0fd495d2fc pristine_git_object: 7e0a483e6690842ba12d2a9349a9e2f0c79df8c9 + docs/components/deleteworkspaceresponse.md: + id: df0fb6410027 + last_write_checksum: sha1:e5eebf42ba059f27a266fee18c032e193fa382e6 + pristine_git_object: ba3c2bfda961110864cb08434398c94c698415f5 docs/components/easyinputmessage.md: id: a4927c37a92c last_write_checksum: sha1:9da1d4db9cd27f00a6b95f2bfd770e3e1f3755f0 @@ -778,8 +1000,8 @@ trackedFiles: pristine_git_object: fece542858a307b4381b49dd8a48438f6e5412a1 docs/components/easyinputmessagedetail.md: id: c61a76d3f5f7 - last_write_checksum: sha1:307cb8955a3d3e6dcf4d975203de59c86865d3a3 - pristine_git_object: 31995d86e0c84af6a6e05212a342d3e13615941b + last_write_checksum: sha1:6b39918f586956910ec295b1554f7d60344644e1 + pristine_git_object: d16be2523383510ef5e70821cc9fcd80952b1520 docs/components/easyinputmessagephasecommentary.md: id: 876e7cf3c1bd last_write_checksum: sha1:a66361bbf2c77f4c9ead65c37687136d44fa5b25 @@ -824,6 +1046,14 @@ trackedFiles: id: 7038976c6de5 last_write_checksum: sha1:fa890164de181096fd8c1c3b208c2c783c193b2f pristine_git_object: b23f0fb57a0dead83ce5f3bb69a809bc1e1fbf00 + docs/components/endpointinfo.md: + id: 98e0e75e1121 + last_write_checksum: sha1:5563b32279aeafa2725d1547df1d0f517e53789d + pristine_git_object: aa455ebb10ec0c722ed3c38824d82c0689507663 + docs/components/endpointsmetadata.md: + id: 9b403c20b7a4 + last_write_checksum: sha1:805465cf28357e16abc156888f5bbf305612e0f6 + pristine_git_object: 83eba1215ad932ffe98dccc5b1b5c24fd79a8ae3 docs/components/endpointstatus.md: id: 8643237270dc last_write_checksum: sha1:945606bc29cd884375a5c9404786df5e726e67a0 @@ -844,6 +1074,14 @@ trackedFiles: id: c66a1a2560ef last_write_checksum: sha1:75e5cd528e6faeee349e685da1810190643ae17d pristine_git_object: b3410e67c37edd66f60b0f2364e0d858abe3bd88 + docs/components/failedmodel.md: + id: 352428b99ca5 + last_write_checksum: sha1:d3b276edea42194104b04b7ef806daeacf186a6b + pristine_git_object: 75e10664080dd62bc88ea87de04ac5b21832cf18 + docs/components/fieldt.md: + id: 80d3b62a3bde + last_write_checksum: sha1:c9ed5fc7d8bb28083fa40f14788adeb694770c89 + pristine_git_object: 2589ece524306e237bbd57cb749e469856e5c1e2 docs/components/file.md: id: 6148b0bfb103 last_write_checksum: sha1:6ed22bc8b67721e109d726be38bcfac96f0fd327 @@ -876,10 +1114,18 @@ trackedFiles: id: 4a63087d0118 last_write_checksum: sha1:3713c32b626ffd11e485e37d2d37b25e8feb12f8 pristine_git_object: 0315adc688c60198e04b04c516e0d8ac69009900 + docs/components/filesearchservertoolvalue1.md: + id: bc1f3e9addd7 + last_write_checksum: sha1:d37518968240e5e99c3a8539489eb364c64c0c44 + pristine_git_object: 7f367fe902c643ad5a973deb76af02dc38647336 + docs/components/filesearchservertoolvalue2.md: + id: 087cdb1e4407 + last_write_checksum: sha1:bd9a21d7465dbfb696ec8c0d4d09ef7ee2d34143 + pristine_git_object: 9ad11d360b2d30f737b0560c61b321b748f04e63 docs/components/filters.md: id: bb43ec42351f - last_write_checksum: sha1:88d9a30429c9e65db5641349520318d4782dfe48 - pristine_git_object: 28b2378e634ef0df5d0a030bb79d58ecca770db3 + last_write_checksum: sha1:c982cec79f513d3c3836d401762a7b7131d307e2 + pristine_git_object: 89463d7dbf25d5d3cc6e1a7467cdc5f6bffdd513 docs/components/filterstype.md: id: 7a1c1e739033 last_write_checksum: sha1:355e43e7bfb04a8119a571ead3b12904526669ac @@ -978,8 +1224,8 @@ trackedFiles: pristine_git_object: 3f4c91d5bbe63c375f8ba938bfa6b620355c82c3 docs/components/functioncallitem.md: id: 728446a82c6b - last_write_checksum: sha1:b85a6cb3ac90cb0a7dfba0bb1d05a4362b892dc7 - pristine_git_object: f1c940dea0a871300f9b3e4a213e0fb90e0386d1 + last_write_checksum: sha1:305e2150f29e5d112d0cb1393d992af191fe206f + pristine_git_object: 264caf51ad826572ceddc91ba4a3ed61a8a14a78 docs/components/functioncallitemtype.md: id: c7b1c1ec212b last_write_checksum: sha1:995a373197e8ee246d7127595dfdd1c77a913dfe @@ -990,16 +1236,20 @@ trackedFiles: pristine_git_object: 70980ff71ad1d40d3883760dd03e08e441cae5d0 docs/components/functioncalloutputitemdetail.md: id: 2cb02374b48c - last_write_checksum: sha1:c03306cc3461fa680c42fe147394c5b2a27d58cd - pristine_git_object: 3308be744f3ae5d92e2e90e5f9d4b29bc30c4ebf + last_write_checksum: sha1:f6dd8efe5930ce437012cc96a61f0b7db0483a91 + pristine_git_object: 110493d3ee8ba69d0eaaa462e3b33151253f86c9 + docs/components/functioncalloutputitemoutputinputimage.md: + id: 9570df9b26d2 + last_write_checksum: sha1:569ab5111f81e4a0c33cabe518de90a55a7406c8 + pristine_git_object: a187bd3c93ad121551b2e41673a88bae251213c9 docs/components/functioncalloutputitemoutputtype.md: id: de216282851f last_write_checksum: sha1:2a078e25376f85ab835fd8e685305b62091426b9 pristine_git_object: 048a5f46975d5a2df14a7df7cb98e217382c09ee docs/components/functioncalloutputitemoutputunion1.md: id: f029cb33f764 - last_write_checksum: sha1:ab07cf8dcc44a1d42fe622ef4ced5a0ecebde673 - pristine_git_object: 41e5f165f9b2af0af87df7743058db29d6e1a97e + last_write_checksum: sha1:46f8e24dfc769f4df47be4cc6b411879f68d51dc + pristine_git_object: 11055d5492955153e6be80801a6666d37f1f7c90 docs/components/functioncalloutputitemoutputunion2.md: id: 1737d9834676 last_write_checksum: sha1:edde5e34d278f6fc8068d42e94e42d4fdad355e2 @@ -1012,14 +1262,70 @@ trackedFiles: id: 88a512c5f9ce last_write_checksum: sha1:611201e2dbd2c8fe1c501b5365bc06367bc5370c pristine_git_object: 2f4629220306ced5674a9ef70dbcbce1f908b93a + docs/components/fusionplugin.md: + id: a8f51a52a342 + last_write_checksum: sha1:59177bb74574bf13ca5032af2debdecde74d6399 + pristine_git_object: 818c820a4266775c781f1f9f513a533eaea9484b + docs/components/fusionpluginid.md: + id: 4e5b1c34b883 + last_write_checksum: sha1:111b144dc73f68ccc99f40d23de78fd47126b323 + pristine_git_object: b3de5efcf0d7dad28e612d41b523ce26bf0de245 + docs/components/fusionservertoolconfig.md: + id: bc9b9f7ae08b + last_write_checksum: sha1:f78588d5b744fbd73f71ebf99a0b875ff358a95a + pristine_git_object: 18505d90d7ab7a6ce727a38a93326786b3d841f7 + docs/components/fusionservertoolopenrouter.md: + id: 8862a760f37d + last_write_checksum: sha1:c419e86213da1be43c98705c826b344894f583cc + pristine_git_object: 7373389f8fd797c77ead1056462dfe1f75a4f56e + docs/components/fusionservertoolopenroutertype.md: + id: 58ee513b0cad + last_write_checksum: sha1:2ec57cd7447b8eecdbe6fec744c22edb3a817999 + pristine_git_object: c7121728c6509e3d02a0b431431f133067ca057d + docs/components/generationcontentdata.md: + id: 1085c488fd3a + last_write_checksum: sha1:186d3e8118f6d393d524a91e2ac06772a7eaf818 + pristine_git_object: 8bad571af50a9bc78e4ccc4b3f1d1911aac8c3b4 + docs/components/generationcontentdataoutput.md: + id: e4651dfa179c + last_write_checksum: sha1:3cedede3c273cc7bdd2971e7cd252f487729770b + pristine_git_object: 6847cf3f3a47d2911badcc90a5723a96f22f106d + docs/components/generationcontentresponse.md: + id: b2bded35fce6 + last_write_checksum: sha1:4f347840c969a60a734230601882eb01b4d64aaf + pristine_git_object: fb8acc9bc1fcee02384155f50ab24ac160d35af6 + docs/components/generationresponse.md: + id: ba81b6e0c164 + last_write_checksum: sha1:e7362ecc7f743d516fbb13fb0045739cb6e33eec + pristine_git_object: 20c523d806b2dae5c3c425f2020a5e5ab6079774 + docs/components/generationresponsedata.md: + id: 1059d258bbf8 + last_write_checksum: sha1:9dd999978ce9f10c80454237a3456b8d7e5c0422 + pristine_git_object: ca853a46aa5a900b45382bb0daac5e7e04352376 + docs/components/getbyokkeyresponse.md: + id: c07fd08fb110 + last_write_checksum: sha1:9b19d2ed29c6fd4784ae04f15f3db9f2ce9c0da6 + pristine_git_object: 14fa3aed58f927ad4e2a3597543bdbedf68ced17 docs/components/getguardrailresponse.md: id: eac79c96805c - last_write_checksum: sha1:da1d99fad316a21e9db253b30bbf9d590062fc59 - pristine_git_object: d7de0f8ddb4847ec9c60c25f3d46ab408aac707d + last_write_checksum: sha1:300933194b67a56550e1c7b55f99dc10850646d1 + pristine_git_object: 37baa9239d2dd410ebe7eee4441b4ae349af07e2 + docs/components/getobservabilitydestinationresponse.md: + id: 3e7a05d3c27a + last_write_checksum: sha1:c53f2f769d9b31fdb8e21b57048d561ab7bd2fe1 + pristine_git_object: 839f8079d681be608c2d2b46768ca55280541588 + docs/components/getworkspaceresponse.md: + id: b65ac2b42215 + last_write_checksum: sha1:f4bd96439e0ae998bb2712b603f3a94638e398ff + pristine_git_object: 96104ecd0f4117d4004ba5b2f7c488988ca40f2a + docs/components/group.md: + id: fc829526a4e3 + last_write_checksum: sha1:cf17cb7f4935d2c4190eff29c8e4df89297360a8 + pristine_git_object: 77588dd2feeb0c67a8b63bc64bc4f3a441aa0d08 docs/components/guardrail.md: id: ce84902d4cc2 - last_write_checksum: sha1:bf7a0be7e156abadc6adf0d426c40bf7c088bcd0 - pristine_git_object: 994b02604a9be6a0e9705b182621e9a2df085864 + last_write_checksum: sha1:af56476430e7005d35cd8f50984b79a39aaeae56 + pristine_git_object: cf0dc2d44ec2df68ad8ece0bdf9724fad0031c9f docs/components/guardrailinterval.md: id: 79efeedcb880 last_write_checksum: sha1:3c071c14943c7b26474847eee46925ae884a8a6b @@ -1070,16 +1376,16 @@ trackedFiles: pristine_git_object: e38b5c19b6356f255783dfacea66b45418679e21 docs/components/imagegenerationservertoolconfig.md: id: 4086d42eed1b - last_write_checksum: sha1:9da8f5dbeb8e76419b5ca3041965105934b0ad9b - pristine_git_object: b3fbb8ea61ef0f98681cc1507b2f192556822141 + last_write_checksum: sha1:4be4af2bb484ca26d779f052da6a645dcb4d912c + pristine_git_object: d1bc3aceee221331b9f45bd00bbd8d0ea75a4a73 docs/components/imagegenerationservertoolconfigunion.md: id: 7ba56d56f6bc last_write_checksum: sha1:99eb92cf87c2e68e8db530d3ebdaaff6be117587 pristine_git_object: b9319d587cbf5118b4b12874b67a4a86ec4d1b16 docs/components/imagegenerationservertoolopenrouter.md: id: c5bf0021441a - last_write_checksum: sha1:25069e75ba4a6a6b98bc6c168ef09c2e2960f630 - pristine_git_object: edee38367aaf7511e2a5d3f386d493005ce3c544 + last_write_checksum: sha1:01a0ffcf8d7d3c806c1135e73ed4926ca5d05dc9 + pristine_git_object: dce650cbf584a1798754d1610898a9432b544d28 docs/components/imagegenerationservertoolopenroutertype.md: id: 420c811d4561 last_write_checksum: sha1:6b8ce48b3e662ea3bfd8a9be737e43cd1b051e39 @@ -1096,6 +1402,14 @@ trackedFiles: id: 4ce388faaac0 last_write_checksum: sha1:3aad9a98e1bb15a540b9f8307a1c9524432e7959 pristine_git_object: 1e12f5f39649bbc28907eb579d26b1dedcd634d9 + docs/components/input1.md: + id: 8f1c3029546b + last_write_checksum: sha1:d663edec52736ced26235eef64a7cad9e2d9f321 + pristine_git_object: a6a125b4880fdc36a4a48a71d81d1d85a81390f5 + docs/components/input2.md: + id: 950f7afb714f + last_write_checksum: sha1:0f7308af83357715e138b0027cd723278d28b256 + pristine_git_object: 18930bf394330c4853277ad0d38622adfcef1229 docs/components/inputaudio.md: id: 3bad9d0f3bfb last_write_checksum: sha1:911ae8d63fb5a0fd4b27d922aa2547cc6e973523 @@ -1126,8 +1440,8 @@ trackedFiles: pristine_git_object: cfe6e3e41c8ac75a7f00d1a316153d6e7eec587b docs/components/inputimagedetail.md: id: 582114ff5e40 - last_write_checksum: sha1:8b26812936eea42fe754a8376c1bf909d8b85197 - pristine_git_object: 09106b0661c2e4b67a76f98513efec087153912a + last_write_checksum: sha1:ff65ae99531f467abea6eee220d81819a4cea473 + pristine_git_object: 53e9e69e72a640f83938080aeb4a8a230731313c docs/components/inputimagemask.md: id: 014a4ddc9ad5 last_write_checksum: sha1:7ff0dcc8b47b7cccff30255b13d2f4b585e6919c @@ -1154,8 +1468,8 @@ trackedFiles: pristine_git_object: 39a5d724f55933275a35c44457a7482c049d9e18 docs/components/inputmessageitemdetail.md: id: 66296c9a1130 - last_write_checksum: sha1:9e3e3a4797556b1596efeb675adbd98f37ac3db1 - pristine_git_object: d6a0bdca75c1b561668cc1c222a7f54573bdfd19 + last_write_checksum: sha1:15df515837fa341b102965c1b8d3dff2d0e154aa + pristine_git_object: d1a50afa15eb7ac7c9faf7171b34e2a011b5e173 docs/components/inputmessageitemroledeveloper.md: id: b5ea7f626a52 last_write_checksum: sha1:42799b848928abc8f7bb0cc45b938455185b71e7 @@ -1258,8 +1572,8 @@ trackedFiles: pristine_git_object: 404cc4a69bca7b64c9172078420c72359ed9c2d8 docs/components/inputsunion1.md: id: d017aeaed00c - last_write_checksum: sha1:37e5b6e526766168c9b5d4227c4f18d1a8a065d1 - pristine_git_object: 8289eb7af2e7ed5da6b65edc0dbef4b11fcdef26 + last_write_checksum: sha1:4a50c747b7f280c46f135dcf0bcd102135049347 + pristine_git_object: 0d56b2ee5017adc62b0990d7bb34b63da47cff71 docs/components/inputtext.md: id: cf4503b3219c last_write_checksum: sha1:af646125dfffda8cb71e15c602fcd4823b85f3ab @@ -1272,6 +1586,10 @@ trackedFiles: id: 331af539199a last_write_checksum: sha1:136d08c7846075581f141aa89c74743a4684585e pristine_git_object: 7b6d8235fbeb431c27cec3d689c6d5aa558d8d40 + docs/components/inputunion.md: + id: e92a20448613 + last_write_checksum: sha1:6caa00eb5847278d7fa4033f863a9719fece403f + pristine_git_object: 3667170c054053b09d2a34627f2cc1b1ed9cc01f docs/components/inputvideo.md: id: 5775df94513a last_write_checksum: sha1:9096278894b57ece97edefbfcfbbbae5f91fb259 @@ -1288,6 +1606,14 @@ trackedFiles: id: c7d253bbe0f1 last_write_checksum: sha1:c95fa69b2e5ba1ad8801577e0833513b4045c733 pristine_git_object: b320ded97617f2a84341aaf23e73be3e0d46546e + docs/components/itemreferenceitem.md: + id: df82caccce8e + last_write_checksum: sha1:d5235ecfa37a370a769c27575da351873551fb98 + pristine_git_object: d9a8c531ca098fc9827e1fd81c35b9a8e4f967fc + docs/components/itemreferenceitemtype.md: + id: 42b45a1ce59c + last_write_checksum: sha1:8c0c439657b24ff5ad081d95b89e0f088547304f + pristine_git_object: 95aa04d9e921d642faacec6df23bc1761b9265ca docs/components/keyassignment.md: id: c2be60993728 last_write_checksum: sha1:4791e8ff5cc6777dd2e130a2b67f019a1f6639ad @@ -1308,6 +1634,10 @@ trackedFiles: id: c5def381d385 last_write_checksum: sha1:ea65b6214a79a7125bff8e6cca1f55863f5c1c08 pristine_git_object: cfa9fd582c4d290d8700f34f092b5fd45d5a1172 + docs/components/listbyokkeysresponse.md: + id: 2bdc1d5f0f9f + last_write_checksum: sha1:c6deab84b3fee2d18ad7d91f151ba2a3b233e8a5 + pristine_git_object: 9416c56392444105af3bb6a5fe07b9dd539b7e22 docs/components/listendpointsresponse.md: id: b79a056a7034 last_write_checksum: sha1:046b22b032ea14ce42886c0b1d2945c2027ab1de @@ -1324,6 +1654,38 @@ trackedFiles: id: b34008c23794 last_write_checksum: sha1:a80fc686dfb13c7179c1a49808ca9d10fbca0cec pristine_git_object: 16092238affd61950df82d45bc46ae0be98df7b3 + docs/components/listobservabilitydestinationsresponse.md: + id: c5efedc66c10 + last_write_checksum: sha1:1a3398a7358e41acb7bd39f2f9160c229c3054bf + pristine_git_object: 880f789f057a6ed4e1d2a95b631c00b156b999bc + docs/components/listworkspacesresponse.md: + id: 8cc6fbfc9dfb + last_write_checksum: sha1:ad9f94ea6eafd3cbd5d2c2dca61b3ac6f0403a1f + pristine_git_object: c4b9ff0e4cc402706ad28c35f75189aa2478470a + docs/components/localshellcallitem.md: + id: 9b7bd8fb3ebb + last_write_checksum: sha1:0b60897b2b25319e9d06d338322e7dc2a1635c06 + pristine_git_object: 4a81afde0ff55830aec9f41ef22c0adacbfa866d + docs/components/localshellcallitemaction.md: + id: d87559af5023 + last_write_checksum: sha1:ffc8b201705a9d30009267245a09a8e10ceb7b58 + pristine_git_object: 0d18c7ca53d43a5d58d6d15c17ce342ba56a06c6 + docs/components/localshellcalloutputitem.md: + id: 53951495a615 + last_write_checksum: sha1:08612c721fdf42ec25d191963a4a1105b588d6f9 + pristine_git_object: 34491a6ab13f2b5a5ef60acac308721d3e395981 + docs/components/localshellcalloutputitemstatus.md: + id: 1878f165a6fe + last_write_checksum: sha1:985386c9a863fffe9d4107bf63d7316095749d32 + pristine_git_object: 18938c8e8923df99b6f11d774c748f4f618ed16b + docs/components/localshellcalloutputitemtype.md: + id: 83a5e3ddca07 + last_write_checksum: sha1:2777314d0b96a5f23fab16ef30b055da323e300a + pristine_git_object: 3419c8a1ae972f04b2ad4689e04bfe8fd592087f + docs/components/logic.md: + id: 57db8def283d + last_write_checksum: sha1:6c1e841dba4660d9498219d6cb534d2988eb0d43 + pristine_git_object: effc42ec4dc4e34d90d0a51be532ec7c923b8384 docs/components/logprob.md: id: 351b5c050527 last_write_checksum: sha1:fce93846d1c33a013a40764c5e00e6191982bdbf @@ -1332,6 +1694,42 @@ trackedFiles: id: 15ed956070c8 last_write_checksum: sha1:a6b154896d64cb9feac8742b812bf40951867375 pristine_git_object: b932c8f3988960414d7cd0f2ac795f1cc3b58884 + docs/components/mcpapprovalrequestitem.md: + id: 0d3537b2e5c8 + last_write_checksum: sha1:d2c00357d59374eee2845918d50ab5125d9583be + pristine_git_object: 100c830f3d7a41b5f68d22404a7469b051f5c0b9 + docs/components/mcpapprovalrequestitemtype.md: + id: 5d9fc336efb0 + last_write_checksum: sha1:6094bb015b51c4f3bcdd430abb7e369c746046ec + pristine_git_object: f7bab5327d14d16a40b9ec16770b77afae586226 + docs/components/mcpapprovalresponseitem.md: + id: 5dff2e68eccf + last_write_checksum: sha1:8368ac4bdcd72052d24f1f298d18c31663855b3e + pristine_git_object: eeacdc0afbc5e4662106aa18ace2b17dbd96d4bc + docs/components/mcpapprovalresponseitemtype.md: + id: 75bf622adc93 + last_write_checksum: sha1:88ce33f76415887fe812b880678392b1afcbe494 + pristine_git_object: 94baaa0cabb60a9c9f32633369fbcba2aed03131 + docs/components/mcpcallitem.md: + id: 96b8cb1e23c1 + last_write_checksum: sha1:e4f227c176f78b32f05d6c2875f5c19e3f17be7c + pristine_git_object: df7c228d307f76df8b98c7d4b451a3dc314b4cc3 + docs/components/mcpcallitemtype.md: + id: f764926c4d2f + last_write_checksum: sha1:675fe43eb73267b7a4944792104051ca1181d2e7 + pristine_git_object: 2e94b45437d96ff1c0188c2b20ae3405dee07e99 + docs/components/mcplisttoolsitem.md: + id: 0846373595f9 + last_write_checksum: sha1:075e68d99a8ab50e4e6afa007cce282bac44003d + pristine_git_object: 96141e87f0e250e5c5d8f282ab80b4420db95520 + docs/components/mcplisttoolsitemtool.md: + id: 96647e6a9ace + last_write_checksum: sha1:17d0ca88652cd39eabc780107b666fdaac6273e0 + pristine_git_object: 3da39425fbbbd0fdf978e0debee37c55a87f45b4 + docs/components/mcplisttoolsitemtype.md: + id: 32b1baa29df8 + last_write_checksum: sha1:1117e3345e79f4c8fe1c207eea4a2d057f691e0f + pristine_git_object: 4a52a0fc4282e3062ce2a1e33a6d35d67a62538f docs/components/mcpservertool.md: id: fcc92d12bf9a last_write_checksum: sha1:edc8bdacc891f72eb9685d076ac2aa2ac18d30f7 @@ -1348,6 +1746,14 @@ trackedFiles: id: 6b23dc8e3b8d last_write_checksum: sha1:af1899a519c3c3b50871014b17b50153050b59e8 pristine_git_object: 39f5ae21785874af1f2ef0000e9fcecc000ec8fd + docs/components/metadatalevel.md: + id: 9f671abd00b9 + last_write_checksum: sha1:6238f82ab3af2fe7bf4a1e3945d5612e59afcde3 + pristine_git_object: febc8ad20cad1050527f99760668d7e0770da391 + docs/components/method.md: + id: b033f8729bbe + last_write_checksum: sha1:45a4264bd618111e097084519a5f4d017baf16cd + pristine_git_object: c1ac578717dab45d7e86236836634ea777e603e8 docs/components/modality.md: id: c06a1698adc6 last_write_checksum: sha1:9bbac55e2cb009dfd90e129cf3abd35dcab6d2ac @@ -1362,8 +1768,8 @@ trackedFiles: pristine_git_object: d5bbdc95f658be46eebf13f0ba8b9ae3716f72e2 docs/components/model.md: id: 673ad57400cd - last_write_checksum: sha1:9af41fb1a8b66fcc4ff3830f3b12c736218bdf7d - pristine_git_object: 106eb5cfac49cfa3106ee1d0142d9166fd6064d2 + last_write_checksum: sha1:e628f3670edde9ecdd3b5c227c95b8f3f6c2620f + pristine_git_object: 55f6fe4664787c9dd50ae653851a2d42b70ba7e2 docs/components/modelarchitecture.md: id: 79816051e6e8 last_write_checksum: sha1:158b04c79b7a32a2d95e3d3fda8fa6da0ab91cd9 @@ -1386,12 +1792,16 @@ trackedFiles: pristine_git_object: 317190772f743d2aba63c4dad770827b46688f6a docs/components/modelscountresponse.md: id: abdad0c1a02a - last_write_checksum: sha1:6c32f935021d24ff9eeae39f903f71b9ddaedf3d - pristine_git_object: 84bbce80ebf7ce2a93ad853bfe2f2a80a8395077 + last_write_checksum: sha1:50ae205604eddcbdced268b8cd3e1ac06f0dd7c0 + pristine_git_object: 4ad6e6a692b19b29789b7a505fae3df72b3fc19d + docs/components/modelscountresponsedata.md: + id: 98e05b6bdddd + last_write_checksum: sha1:62caa9966f2730ed93eba332041916903d279228 + pristine_git_object: d661997290e487a9d0920293830a81afb8b4a853 docs/components/modelslistresponse.md: id: 37e791d4f265 - last_write_checksum: sha1:fb8fe5748b0c7a5e1e515233cad4d9524cd342bd - pristine_git_object: fb5d458197af006a3706e4c133bbb3af45dd64bd + last_write_checksum: sha1:63605b3361627fdb35caac3651ca4ac63732cd07 + pristine_git_object: 04b43f59dd2202f1a5fe8b3a890f68010194ec90 docs/components/moderation.md: id: de90083e5402 last_write_checksum: sha1:d0cd3160a76e89d8749cb27687b1bba3dac5089d @@ -1408,6 +1818,10 @@ trackedFiles: id: 6e564fce1a7d last_write_checksum: sha1:16f798521d1221c04b8c39d7e25383c8ffb7be7b pristine_git_object: cfecb28d11204fe2cd3d69f1ba16a09212f5cf93 + docs/components/multimodalmedia.md: + id: f90fdd384c93 + last_write_checksum: sha1:fd51c136be8400ff6d5066913fcb9bb00e0a7c88 + pristine_git_object: c794ca17ca96be1844ccddc71842421048ebcd42 docs/components/never.md: id: 43f2ea5e9932 last_write_checksum: sha1:e6525fb53deebcdebcb5da707fd9f3250d8f2e9d @@ -1416,14 +1830,254 @@ trackedFiles: id: fa528f1f7879 last_write_checksum: sha1:8872a5d706d3a3392ae8c552f54ecc3c6df00f9b pristine_git_object: 0ba248529a84feb2bf9d2f519895b3194349d2db + docs/components/observabilityarizedestination.md: + id: f513447ea793 + last_write_checksum: sha1:c5f996a83745e781e4a1b41fd29bcd773f1c1b71 + pristine_git_object: 0a9ab962ad6818e751bfd325cc47a1cc2c1b61b1 + docs/components/observabilityarizedestinationconfig.md: + id: dc1d535079ea + last_write_checksum: sha1:abb1dd20f7c854e5ef212d78da381740ae160a5d + pristine_git_object: a62521fecc1f3c34092879f92859f4020684936d + docs/components/observabilityarizedestinationtype.md: + id: 8e8a0fa37466 + last_write_checksum: sha1:ac6b0d3b0f878616a9cfd4c82d3bf5f992176f65 + pristine_git_object: dd7791378e18a915cb10a805e89e87017bb72ef4 + docs/components/observabilitybraintrustdestination.md: + id: 145a536c10c1 + last_write_checksum: sha1:0be65094f207dcddabdce346076b03530bc6df86 + pristine_git_object: 00016dad1373d45940f49d66ce349aa4fec2f13d + docs/components/observabilitybraintrustdestinationconfig.md: + id: 0013ee8af3c2 + last_write_checksum: sha1:de7e22f79bd3aefd8ccd34f12249a91192c30571 + pristine_git_object: 484cfcffb3e2bd3fcba725e5b59de99394604248 + docs/components/observabilitybraintrustdestinationtype.md: + id: 5b2c2f854656 + last_write_checksum: sha1:c3c4308d3d5821e88bb3781ae1f8663c53a2c65f + pristine_git_object: 07e7f6339ce6df1107447a33fa1c50509d35269f + docs/components/observabilityclickhousedestination.md: + id: e0ee8ee1c7fc + last_write_checksum: sha1:be0d670e1aa5b482633a2afe4cf863f02448fe64 + pristine_git_object: deb8725f80c93dfa2d65307e2386c336d1e7da78 + docs/components/observabilityclickhousedestinationconfig.md: + id: dc0c611863b2 + last_write_checksum: sha1:5742331f360f56b17bae994a327e21af364d97f8 + pristine_git_object: 54f09ea3b737efb3030ef9fe066820f6ecb5ebfb + docs/components/observabilityclickhousedestinationtype.md: + id: a938251b2fa4 + last_write_checksum: sha1:cd4f6fdb4561ec47d0e40f0a65ba9a28d91d1b7d + pristine_git_object: babefb65e0bbe0c948836d3451fbcff43a852385 + docs/components/observabilitydatadogdestination.md: + id: 9f27ace42342 + last_write_checksum: sha1:9aed00a1a3e722419475d43df6dde0bbbecd043d + pristine_git_object: 93ed060f7791da4e9a2d2c68dab4d17590a3486e + docs/components/observabilitydatadogdestinationconfig.md: + id: 987756bd3477 + last_write_checksum: sha1:f694e79f3bd3738b4f29e1456c8b4ca48a11d53d + pristine_git_object: 73edf7915e8800a1972a2d675c57ccf244a5f649 + docs/components/observabilitydatadogdestinationtype.md: + id: ee1c2137ca39 + last_write_checksum: sha1:69762b3bd3e41b114f27a0352f91fd121c0f99c3 + pristine_git_object: adad4bcc6fd2473b01333d8d853d9bcd8a3ef397 + docs/components/observabilitydestination.md: + id: b7be8a7cc49c + last_write_checksum: sha1:86950faedf8774004b61e3023eeceb9dfc85c5be + pristine_git_object: 266c69e959338f4835f9097a3d9b53537b9a93b7 + docs/components/observabilityfilterrulesconfig.md: + id: c1b3582ea8bf + last_write_checksum: sha1:26a5aacdcc8cc84b77f2e0d2100b7dcbbe504510 + pristine_git_object: ab02f08984737f29ab04fc15ffadb9b0b2212014 + docs/components/observabilityfilterrulesconfigvalue.md: + id: 76c9622dd0a3 + last_write_checksum: sha1:cb515a04863f9c9f42aaa3ae1c0a021c51e45616 + pristine_git_object: b6756482d237df17828ac929ae6d1dfe01b55f17 + docs/components/observabilitygrafanadestination.md: + id: 869cdaf1858d + last_write_checksum: sha1:3007879271071a68f1f7e96c0b5ecde8e5d1ed4c + pristine_git_object: 5dc901fb73d8af816d85204c144d795d3138fe70 + docs/components/observabilitygrafanadestinationconfig.md: + id: 341e8d7c29cc + last_write_checksum: sha1:3aa831e99f119076781bc7829018f67a208ad811 + pristine_git_object: a66d915a86123b0689301eca4cd9bc9fd5c5ae8f + docs/components/observabilitygrafanadestinationtype.md: + id: 31be9564d467 + last_write_checksum: sha1:fa4f96be1a58484ba1f520c1d45944a2f47fbdff + pristine_git_object: f5c7a1e0a29f54a0b9cbeef9a824515d6601d8ad + docs/components/observabilitylangfusedestination.md: + id: d3923d950e4c + last_write_checksum: sha1:ea478366b47f7a52ae55e1d5bada7e849513bcaa + pristine_git_object: 5adbfbbd35b47a0f7976482c98d84e2a02c0ec12 + docs/components/observabilitylangfusedestinationconfig.md: + id: dc419b3c2b64 + last_write_checksum: sha1:c5b7d73cbe808972878e2def5434a97e3b60fbd6 + pristine_git_object: ba02f48832ac62bb1342d0655ccb060ecb47670b + docs/components/observabilitylangfusedestinationtype.md: + id: b23de5f0f74f + last_write_checksum: sha1:f497c7e5b25c971037b56d868d41af9ad6b77ba4 + pristine_git_object: 96f45ca0c628b3d1d0c74e3638d1f073ce2bb338 + docs/components/observabilitylangsmithdestination.md: + id: cf543df3b6a2 + last_write_checksum: sha1:0601265c3341bca95b434fa8bc4ab0843a06aac5 + pristine_git_object: 8526f186281dac4d2368b2b0628dc43d659d5637 + docs/components/observabilitylangsmithdestinationconfig.md: + id: 4a80dd659c6a + last_write_checksum: sha1:7c11da5b5112b3da24d563a7e161e431baa0facf + pristine_git_object: 48a0daae8084bb6113c510a2d7ea3393fcea060d + docs/components/observabilitylangsmithdestinationtype.md: + id: c3e6e20fbe51 + last_write_checksum: sha1:76181b8b31b0f3ef3bd1f22ce4c5ba8caeee0b47 + pristine_git_object: 1412570ef5ae5d6c16da8d937c30ea7e65d37f87 + docs/components/observabilitynewrelicdestination.md: + id: ae617fe0603c + last_write_checksum: sha1:7b7693dba7702bdc008d35266536ca37b87b0f4a + pristine_git_object: 698b16374bd10c6b184aa67b783b20f9e1de0ed4 + docs/components/observabilitynewrelicdestinationconfig.md: + id: 21ca56b40c65 + last_write_checksum: sha1:2a6acb29cc5daa2d4e70591bfe837a95d67db0dc + pristine_git_object: 1cc3498cfe82f0814d36f606b036e8e43567f454 + docs/components/observabilitynewrelicdestinationtype.md: + id: 9e1990a0b096 + last_write_checksum: sha1:b97b608eea21250b92ac8048c10c72e3ed2b91a8 + pristine_git_object: 24f27fab589d4b4c65a5e1159e98779e3261a744 + docs/components/observabilityopikdestination.md: + id: db66b07ae65c + last_write_checksum: sha1:d8516b5e2ea71781db9374970258da43d0abe579 + pristine_git_object: 62bfc96dc3da9fb45dbfc8c2de67e0afba39426e + docs/components/observabilityopikdestinationconfig.md: + id: b374ed3b47d5 + last_write_checksum: sha1:b92ad6d3083465668ef5abdd0ffcf13adfa83a8e + pristine_git_object: d4c9ec5338a2366105ea8da32d427da64adb0d7f + docs/components/observabilityopikdestinationtype.md: + id: 87b673feb2bf + last_write_checksum: sha1:93aeb40e16484b72cf9913993a8b9ca334f8e2e9 + pristine_git_object: 2812133c956134ab2d153aa2c89fc896adc58285 + docs/components/observabilityotelcollectordestination.md: + id: d33bee74e26c + last_write_checksum: sha1:f8b3a9ed6674ffe19182db42b2deefe541013c63 + pristine_git_object: 03a4ecfe6d469911dd356b9abc1a0d682e43f2a4 + docs/components/observabilityotelcollectordestinationconfig.md: + id: 5e5e9562fb09 + last_write_checksum: sha1:bff2120ae00fc563b0cd8eeafd700fd6e29bb014 + pristine_git_object: 3d5f1ba56a0b83b1084363f185cc552ee800aa37 + docs/components/observabilityotelcollectordestinationtype.md: + id: c78211a83000 + last_write_checksum: sha1:1ad7c1e21ac263d0c7fef5efa4c1107da9772488 + pristine_git_object: cced176b01380b0cbe7a36a91fdfdaebbf34b228 + docs/components/observabilityposthogdestination.md: + id: ff245b7db549 + last_write_checksum: sha1:c617f83cabdc8ef0b107ab9b1dad91b92307c793 + pristine_git_object: a22c18a68cf40ad98f2c66e6ffcf2e5d275a760f + docs/components/observabilityposthogdestinationconfig.md: + id: 005b7ba53ef2 + last_write_checksum: sha1:6f8e601b2e27c8292138258c9d92d26452d77d5f + pristine_git_object: 417abca41ac81fdc6b0f6b6d6dbe1a916a57f93c + docs/components/observabilityposthogdestinationtype.md: + id: a3ce062df326 + last_write_checksum: sha1:63c802ea9b1b3b72ed8a579c47bba035920b8948 + pristine_git_object: 0b292361d17c18c0ea9e2a438e78e73a0e2c4a7f + docs/components/observabilityrampdestination.md: + id: a46ae803969b + last_write_checksum: sha1:d50b742195cad2f2df60a9d25dc78e4c058539e6 + pristine_git_object: 841eb618f7db267ee6e7bfbf1c1249c1f59dfd5c + docs/components/observabilityrampdestinationconfig.md: + id: ed120fec93c8 + last_write_checksum: sha1:bbe68c9cabede09198294ac44376c5803c86b1d5 + pristine_git_object: 4221a78626b13ad1080354aafac31044d070cd30 + docs/components/observabilityrampdestinationtype.md: + id: 98ded470a529 + last_write_checksum: sha1:03a8dc497c1e7e75ae4c6fddcccfa608ed9da0ea + pristine_git_object: a385403b09e1020ece95e1d923b0c058ab228051 + docs/components/observabilitys3destination.md: + id: 3cfb33f703ab + last_write_checksum: sha1:5fba374a5ea5514ef80d6f451a27ffd39a61d11e + pristine_git_object: cb41cc646c23a8e981bf52f8180a21bbf016a13e + docs/components/observabilitys3destinationconfig.md: + id: 9857e1788ca9 + last_write_checksum: sha1:215caf5c0bb6d845e154f9e4dced38882cf7f30b + pristine_git_object: 8a79a8c3c2a3a2d8ea03ae10d75ea650bdb9aa44 + docs/components/observabilitys3destinationtype.md: + id: 99758c95d6ad + last_write_checksum: sha1:f13f7307321aa61b830d7a6fcbabe801225c0020 + pristine_git_object: 167928ae975633a0f0521efaad58fe82ac9da402 + docs/components/observabilitysentrydestination.md: + id: c0db66ec1664 + last_write_checksum: sha1:dbf0ef811b623ff92cee33fbe9624b870daa7ed2 + pristine_git_object: 6135d8843c969405d594ed4251e6e9b26b35725f + docs/components/observabilitysentrydestinationconfig.md: + id: f61819b137bd + last_write_checksum: sha1:0364b3bebcb1636eb8f2feba923d8ab0ec5bfd30 + pristine_git_object: c76ddf04cc6eaf366ba96d18d13aaf1db28ab6ae + docs/components/observabilitysentrydestinationtype.md: + id: e9fe16eaf329 + last_write_checksum: sha1:9be17cdea703a48dfc3cb2e5c709f16a1a97fce7 + pristine_git_object: c579db4a0009cf8bcdcc79c6cfeb563a9e20f6d7 + docs/components/observabilitysnowflakedestination.md: + id: 01c80b662bd2 + last_write_checksum: sha1:86d6d59fef614b8a1c728c900e12fef9e1e5dcfc + pristine_git_object: d5ca13100d15481a29899c79af123a67f733ef93 + docs/components/observabilitysnowflakedestinationconfig.md: + id: 5863c15e5c2e + last_write_checksum: sha1:38a96c2cb11b478fa3f8ff4c334a30bb82fc46b0 + pristine_git_object: e42de6dbb36eb49faded0ccb3fb7d0922ec6df64 + docs/components/observabilitysnowflakedestinationtype.md: + id: ce209a361916 + last_write_checksum: sha1:244a36b33db8f6a3000b998d892f88ee3fc420ae + pristine_git_object: 4c02a083cdb7c917d8afffdaec5158dce23354eb + docs/components/observabilityweavedestination.md: + id: c34a90c15698 + last_write_checksum: sha1:23e1eb2ba0319fce33d4f0fc25539bb28051f0f1 + pristine_git_object: d0cdee401f7cd45785a885514b36edf970115ce2 + docs/components/observabilityweavedestinationconfig.md: + id: 73228e35948e + last_write_checksum: sha1:40d75673453e308fea0126f1202efce502f7ed1a + pristine_git_object: 596b679f81c4ae44c63f3d0d17c73a89c2d74d8f + docs/components/observabilityweavedestinationtype.md: + id: 35b8114daf60 + last_write_checksum: sha1:41ae9dddca44856b6ccc2c9d2426af22d4a42e76 + pristine_git_object: f432ecd7ebd47db79545fbfa1643768e4367df74 + docs/components/observabilitywebhookdestination.md: + id: 51348fbd75c7 + last_write_checksum: sha1:09d30b15c5073af0cbad0e0f5a5473ce2cc54f4b + pristine_git_object: f6766abc9f29b4f9be385b36cd297bd566f8bed2 + docs/components/observabilitywebhookdestinationconfig.md: + id: bdcd4f7adfc0 + last_write_checksum: sha1:42e280c9d149b1e7386c669f3c05bf8b9cd1c60e + pristine_git_object: 31b46e3b6fce0d020f5a8eabd73cc3f690056d1b + docs/components/observabilitywebhookdestinationtype.md: + id: eda8f89f5d4e + last_write_checksum: sha1:d59b7878f2985f9aa97eb510e8dbec76460a6f22 + pristine_git_object: d0208f5eef93e4ecd0e9a38de258f39e0ed403cc docs/components/only.md: id: 91bc6779dc0a last_write_checksum: sha1:9d9c9f1858695f9fe710f28aecb7c84856c494a7 pristine_git_object: a62341bd1e17c836ec7539bd7d8e494a1a5184dc + docs/components/openairesponsecustomtoolcall.md: + id: ac3aee21895d + last_write_checksum: sha1:16e629b4a9dacc4644d1efef349c68f02de5ea5f + pristine_git_object: 4615c033bbf754dd285702b736767aa9f018e24f + docs/components/openairesponsecustomtoolcalloutput.md: + id: 898c9ec80afb + last_write_checksum: sha1:4da2372651911ee10a63df94068e5ec6a91d1f93 + pristine_git_object: 73cb55149d5963cda326d0cea2f2545ea42c1c09 + docs/components/openairesponsecustomtoolcalloutputoutput1.md: + id: fc80a5761631 + last_write_checksum: sha1:f5d0d55ea31b932e7fd5d8f9d9155aa5061fa86b + pristine_git_object: 0f2552eebdb34b9c8750204b5644b08d0733dd57 + docs/components/openairesponsecustomtoolcalloutputoutput2.md: + id: 0722ac09f02b + last_write_checksum: sha1:562d190855df03f20f41ae0e70b1d981cd5fd56f + pristine_git_object: b374dc6cbbfea894098c524ab65ba08712228ceb + docs/components/openairesponsecustomtoolcalloutputtype.md: + id: 99674dd00609 + last_write_checksum: sha1:b4ccac74cc49ede5eb63dfaa5317b08504c6b561 + pristine_git_object: 8785852bc927f0a78a4012bfb58700a7e2d97a8a + docs/components/openairesponsecustomtoolcalltype.md: + id: a842d72e61fc + last_write_checksum: sha1:5dbe9b6def695cf8ee2f283160b1013094862c6e + pristine_git_object: 6d718cc235ce1e24ac715a5323871ce0bd766949 docs/components/openairesponsefunctiontoolcall.md: id: 3a1364f8d3e1 - last_write_checksum: sha1:27c018aace3db99e6163b746c270bf5a1d0266aa - pristine_git_object: 9e32253dfeeef51181e0789fada005b1edfcaa2b + last_write_checksum: sha1:fc16b457b389728471198954cf2a4322e238592e + pristine_git_object: 15a293510664ad28497a1fe708b58be8402fd287 docs/components/openairesponsefunctiontoolcalloutput.md: id: b3939fe71de2 last_write_checksum: sha1:1705dc61ae8733d30d88947b6a950f92af935ffc @@ -1496,6 +2150,10 @@ trackedFiles: id: e0916138c088 last_write_checksum: sha1:10ae047eeb5951e67b6e16bfdc61898e79f92b8d pristine_git_object: 72b8738f1a2b1e34b51ddd61d3911e585cbcfd14 + docs/components/openairesponsestoolchoiceapplypatch.md: + id: 4b46229cb2dd + last_write_checksum: sha1:2efda634d7d7371df066d38f9979ae56da089039 + pristine_git_object: 1f76d7b87d3203e47dbb67b28c992a137671c573 docs/components/openairesponsestoolchoiceauto.md: id: "864322169068" last_write_checksum: sha1:4df5b1713e54f2fbcbf4acd91243b19f07898d40 @@ -1512,10 +2170,22 @@ trackedFiles: id: 1a18707d5f17 last_write_checksum: sha1:ed310a851eb6b16175ff1aee2f1d51dc1ca63120 pristine_git_object: 57aefba1d93597b1944cf8ce84a55e6578e1908f + docs/components/openairesponsestoolchoiceshell.md: + id: 946027d4a9cd + last_write_checksum: sha1:b43e5c87f09cf9279dd948c17df532c36426b4e9 + pristine_git_object: 736d8f29a42debb1bdd4026725d9c55fc08467e1 + docs/components/openairesponsestoolchoicetypeapplypatch.md: + id: a28326e5e717 + last_write_checksum: sha1:a74e5e47b84038bd83004d371925f0aedd9fb0fd + pristine_git_object: 84d2045ff0a40a02dfc74286f133f0f7214a4f5f docs/components/openairesponsestoolchoicetypefunction.md: id: bf87379c3667 last_write_checksum: sha1:9275e8d69c3615686c52f0c7f2607f79bedaa39c pristine_git_object: de3caa3f6351a1cefab397803760aabee509a32d + docs/components/openairesponsestoolchoicetypeshell.md: + id: e6f9a610204b + last_write_checksum: sha1:2dc29ea8cf64ac8b97b7db83bef402ab8bbfae53 + pristine_git_object: 32b67ebb8be6202e4a85d3e2a3bffcfa0d227b64 docs/components/openairesponsestoolchoicetypewebsearchpreview.md: id: a0dcc27980f9 last_write_checksum: sha1:c56012a4d3ef1dcfc993f31529c9f21cd2f2d45b @@ -1526,8 +2196,8 @@ trackedFiles: pristine_git_object: 3162d396225c6fa3f2597ed4aea08c8b1dc7db22 docs/components/openairesponsestoolchoiceunion.md: id: 0deaf8366a16 - last_write_checksum: sha1:117368768009291418543d72c854fe5bdabc2e81 - pristine_git_object: 7e503bb70c5c5e4a853d65d39fac69f6c8c1f503 + last_write_checksum: sha1:5605d2dafe5ae816fc30294c7e2a4ceebc79a694 + pristine_git_object: 15e1482ab0963c950b350d46284d1d9f75102bcb docs/components/openairesponsestruncation.md: id: d4ad0cf0c093 last_write_checksum: sha1:0adf4105f41726d94f43e9b76a7df2bb4cd791f3 @@ -1550,8 +2220,8 @@ trackedFiles: pristine_git_object: e88886f738fef9ad22e5efc74e3e0ea2cd8ceeb3 docs/components/openresponsesresult.md: id: 9795b7de3f92 - last_write_checksum: sha1:5c1834da4b2297e6cdc0328c8d9c026303f6b9b3 - pristine_git_object: 7980a1a0edea51a2fa9cde48f5f9554029ef827b + last_write_checksum: sha1:e76ebc50bf983fda5b31b5c87b306c5abd5b43ae + pristine_git_object: c4ef91fa969c5ac26e6de263b88b7d816edab692 docs/components/openresponsesresultobject.md: id: a8c7f7bc0b24 last_write_checksum: sha1:3df49df80dda49ea4cb53f913931fd4754769b66 @@ -1568,6 +2238,10 @@ trackedFiles: id: 11e423f51c0a last_write_checksum: sha1:aafa032ff25d8adeec0c0bd0d995fdcebecb59b0 pristine_git_object: 1fd0de22bc2eadd015eb6e04c46eafa3dc992af4 + docs/components/openroutermetadata.md: + id: 7d5b19c796e5 + last_write_checksum: sha1:dd7b644e0859928b6685ebe073946b2af58a3742 + pristine_git_object: 60461ffa8bfa773b9d15c7698fcac23ece59fb62 docs/components/openrouterwebsearchservertool.md: id: fb93a3700123 last_write_checksum: sha1:9bea49bbae5d084bf15a20caa095165fcf14a334 @@ -1576,18 +2250,30 @@ trackedFiles: id: 16e1e8501319 last_write_checksum: sha1:6d83c960b1b1f5be7be0f0f6f6b71d86fb160cc7 pristine_git_object: 947a0b4decad7398ad4ddd0ff70a3a8cf95c5e87 + docs/components/operator.md: + id: 63449f6362da + last_write_checksum: sha1:11b3d7ad51195be1e48a90e2861633551b9992d5 + pristine_git_object: ffa82a743b58e9352a9dfad57f7a4a94c629944c docs/components/options.md: id: d57f3108a48d - last_write_checksum: sha1:33aba904de1c5bbbb772a34eaf56daa859a81143 - pristine_git_object: e695cb694be73ef388c6039ef8803a6ce146e500 + last_write_checksum: sha1:80d9f367ed06b92681e63f88928f2a7f3e09c526 + pristine_git_object: d5a4ad0e134d3671ade753625484af402e0eedf8 docs/components/order.md: id: 16e6ae6962e7 last_write_checksum: sha1:a060705e562a2f3fc024c4fd8aa80604535b0bc1 pristine_git_object: b0e21fa3c30d5f4efb71936cd033937d0b0ad8a9 + docs/components/outputapplypatchcallitem.md: + id: b300dd735bcc + last_write_checksum: sha1:a4351bd6de39f88c19f448fae0a1b307ae637656 + pristine_git_object: 5a97bc9076a00ce89e3d78cba834fcdb0aa5ba69 + docs/components/outputapplypatchcallitemtype.md: + id: 0d574fbb1219 + last_write_checksum: sha1:7bec10beea9f5b12c88ab74e9884d02d0091a637 + pristine_git_object: d63680f8325b6bd06b0b1bbf50256b714486af07 docs/components/outputapplypatchservertoolitem.md: id: 31b40a05f9bf - last_write_checksum: sha1:6060e1f8ffa79af2c60eb80637b5ad2130b79501 - pristine_git_object: ffa5f0e7eeb63de787e8b1830482ffa368976413 + last_write_checksum: sha1:018a47d1a2e118ad529f1498488aa1cd7ca1dba5 + pristine_git_object: 1d6f10ab527097cec8a9450b3b8ff2730d0f9454 docs/components/outputapplypatchservertoolitemtype.md: id: 0fc0eefe1f94 last_write_checksum: sha1:4e7bd5264d2da2fb6fb31d4f17cff1c5f6159e41 @@ -1636,6 +2322,14 @@ trackedFiles: id: 93a8202e16fc last_write_checksum: sha1:3d997f3397a92ffd8d05ff539073e06c38b0e2bc pristine_git_object: 6433a41ff2a718dc451382f1d3a5e616e7c6d5d9 + docs/components/outputcustomtoolcallitem.md: + id: 5da0a60e34f2 + last_write_checksum: sha1:34f4aee85faefd77cdd9e6768cd6de3ed4e31a41 + pristine_git_object: fdc80b16dc73c80d4d8d2685f128defd32eb1762 + docs/components/outputcustomtoolcallitemtype.md: + id: 57eeb19002ba + last_write_checksum: sha1:42be29623e1f16ee8aa483966aa0e2a430b3ed73 + pristine_git_object: 2d44dae494019cf25037f7c36311f1bd0f4903f6 docs/components/outputdatetimeitem.md: id: eccb35ac217b last_write_checksum: sha1:426d333d7fa20b3da448c40c5d1d6f0cd6667ebb @@ -1666,8 +2360,8 @@ trackedFiles: pristine_git_object: 7f5c5453ac49de51f495c9bc9ab491a02025e92b docs/components/outputfunctioncallitem.md: id: a0b3dcf93469 - last_write_checksum: sha1:c87ae53881823e5d660d25ee190d316e16026cbf - pristine_git_object: a1bfc0dc317f6638d51dcb248757660829983925 + last_write_checksum: sha1:30c6f678351da68f90cc92d45d6c477ab0aee6a4 + pristine_git_object: 44d9e070c54b27288d5ff2f73fe97f920c4c5eac docs/components/outputfunctioncallitemstatuscompleted.md: id: fcce7d103880 last_write_checksum: sha1:a555c5ed9cfba8bb91a9f3bbfa561a4df06e1d6a @@ -1688,6 +2382,14 @@ trackedFiles: id: e4f072d4f1d1 last_write_checksum: sha1:042aa6381e2b6b199e9ec48f1554f011403525b6 pristine_git_object: 31066e50f45a2f32c35d0389886757885704ea4a + docs/components/outputfusionservertoolitem.md: + id: 886e6be27ec2 + last_write_checksum: sha1:86e1efeea78473e09cb5f04743218fa098f77923 + pristine_git_object: a9dda846d4792d4d1c97917408e6ac93f8b562c9 + docs/components/outputfusionservertoolitemtype.md: + id: 93233bb8c5d7 + last_write_checksum: sha1:5e9a0f90c938eaa5fc231859f48f5b9673b6b00b + pristine_git_object: 60a41c468727f288331bd5b91a547edb2969661c docs/components/outputimage.md: id: 6f1d41cfe2f6 last_write_checksum: sha1:ade263b8889aa203c5fa3444d2868c589424ff49 @@ -1702,16 +2404,12 @@ trackedFiles: pristine_git_object: d7d592b96122136f2e4becd5edc72b95062d6237 docs/components/outputimagegenerationservertoolitem.md: id: 0a39a1c10949 - last_write_checksum: sha1:b7ffc78b0acdbd0c9e5c9b6a777e8e2e39ff16ee - pristine_git_object: 563b9e780a842074f1ea9da0a9b81133833609fc + last_write_checksum: sha1:794cbf0f99dc7ea2739d94d9ab96e2f3f07bb323 + pristine_git_object: ec9409ff0690e6787b0f464c83aa9cf5753fb4f6 docs/components/outputimagegenerationservertoolitemtype.md: id: e8483d8856aa last_write_checksum: sha1:43f034d1b716ef2878be034bb01e836395c7b686 pristine_git_object: bd9e1fe6213d47f2eb203ae3765551cae69784cc - docs/components/outputinputimage.md: - id: 776d1d3ae41b - last_write_checksum: sha1:c1fdf4043148b34fc92ea0363006731dddc8e3cc - pristine_git_object: 6a3865d688cfa35328a6e6e4c409d2caf7541bd1 docs/components/outputitemimagegenerationcall.md: id: 1338bdb69860 last_write_checksum: sha1:d08ae2d3ad68eadc96ec27786fbe23a32a0aa82e @@ -1722,8 +2420,8 @@ trackedFiles: pristine_git_object: d9e663fcae49dba7885223f4f0848aa9f9a23002 docs/components/outputitems.md: id: 92565743132e - last_write_checksum: sha1:0080f5650ea184795c28fc44983eec2989b58634 - pristine_git_object: aaa3a85a2a72fba77cc2a3e939d8df3a00e1073e + last_write_checksum: sha1:609d22a2b1d478cfe6d8af3e714d3de2c74db2cb + pristine_git_object: 1f1f5afa9be9cbb778d0ecbe33f0309f1023c2b1 docs/components/outputlogs.md: id: 0821eefe9546 last_write_checksum: sha1:1ff4592093bd2fe28038cc8db28bee6a35025c96 @@ -1834,8 +2532,8 @@ trackedFiles: pristine_git_object: acbedfe1aca86bfe4d682abcd075b89d872e9e06 docs/components/outputmodality.md: id: 8e1105f01041 - last_write_checksum: sha1:6fe20f70faa190a188e00961cb8f13edb2dc371c - pristine_git_object: 7b8edcffcb042e3dd1115d6a2f976ac4d5967461 + last_write_checksum: sha1:d3c1b4ce81cdf2858288683dacbe426698793a45 + pristine_git_object: 2e0633eee8835d45f782af9a76b1d3d866f70bb6 docs/components/outputmodalityenum.md: id: 9e9b5b751962 last_write_checksum: sha1:e445a894b182e6fd805d5b9310d13b8a8520349d @@ -1864,6 +2562,14 @@ trackedFiles: id: 2efd271441f7 last_write_checksum: sha1:36a63bf61d927a595f3e58dd0b607a8937db9ff3 pristine_git_object: 24800454b81c6b2f9a0180f283d793216bd90384 + docs/components/outputsearchmodelsservertoolitem.md: + id: 17da96b2505f + last_write_checksum: sha1:da40a4743d0ae6385588944cac094ce9bd4d14c9 + pristine_git_object: a5e1fb16896dc6841105b7f01e735539b8876a5b + docs/components/outputsearchmodelsservertoolitemtype.md: + id: 37be34b271c8 + last_write_checksum: sha1:237762e35b5cf89509bc3bf8b261f174016d3903 + pristine_git_object: dc9df5ca2122a044efa3d2ab1d13b2f957f67d34 docs/components/outputtexteditorservertoolitem.md: id: 6c114519044a last_write_checksum: sha1:7b90b5ce30ff6df03376e337e266dbdadfa751c0 @@ -1886,8 +2592,8 @@ trackedFiles: pristine_git_object: 0083cab9d32c4c2364eaafd66c376220aa8ece54 docs/components/outputwebfetchservertoolitem.md: id: 9f1abd1711b9 - last_write_checksum: sha1:22b9c861aefe5a3316875212f6db6401c24b6ec5 - pristine_git_object: 251e0495c03d2cb1edb1500df2bd5c32610e127c + last_write_checksum: sha1:3372f2b1174ea8b800fbfee5b643d15b2fd5d872 + pristine_git_object: ece6f16e25f0fefd093bb9f0784d42ccdcd71c7b docs/components/outputwebfetchservertoolitemtype.md: id: 6e1e0de2a502 last_write_checksum: sha1:0c7af6f7dce5a92e6c906e8edfd6524b949f0857 @@ -1896,22 +2602,46 @@ trackedFiles: id: 7d5a537f4c7c last_write_checksum: sha1:7b1b7592236a4bfcba7eeae5d67d86579c86679d pristine_git_object: 8b512f47e3ea22da48a6ef9c9f2a664ca80b9751 + docs/components/outputwebsearchcallitemactionsearch.md: + id: 9f59c4212631 + last_write_checksum: sha1:756994237267ad25b63927f598215f72d7aa88d2 + pristine_git_object: db67ffae60eb48e19b47d5ecbabbe99306a19249 docs/components/outputwebsearchservertoolitem.md: id: f5fdb9904c43 - last_write_checksum: sha1:91d82e9f05cf24c8ac1750bd1611c5e54cdf4819 - pristine_git_object: 613f59d643bb07deb3a08f2ac79619c00d86bbd0 - docs/components/outputwebsearchservertoolitemtype.md: - id: 7115f48d3dee - last_write_checksum: sha1:92519069adee4ad02b897ed5ec4fff2cd59ca025 - pristine_git_object: 157187a6304be8c0f3d04e8525c93442518bffcf + last_write_checksum: sha1:6b857eb4aec882ee3eea48b4e1a4bfe0e517664c + pristine_git_object: e82d86378b87dd74cc4e5d7a0f10f06f64aa5174 + docs/components/outputwebsearchservertoolitemaction.md: + id: b6b0cbb67ab8 + last_write_checksum: sha1:e1230e257231a76100eee042a3945a314cb178df + pristine_git_object: 8557c96482d7733dc86ca9ac847cf90650867b61 + docs/components/outputwebsearchservertoolitemtypeopenrouterwebsearch.md: + id: 7e76bc306963 + last_write_checksum: sha1:e4c09750dcccdb30e32b8ed8974770d25d754647 + pristine_git_object: 204598652178d2425622e6d73fe626b86ee0635e + docs/components/outputwebsearchservertoolitemtypesearch.md: + id: 00e6e8cd525e + last_write_checksum: sha1:65019a14aa26f42c0a0e754c17f50cd6ecfb1f2c + pristine_git_object: 5c652417ae82dd439989abefa6099f0a10f73909 + docs/components/outputwebsearchservertoolitemtypeurl.md: + id: 505e96bae165 + last_write_checksum: sha1:374b95b67ca2ca964059428006e4cfdfc7dffc60 + pristine_git_object: 0f61afffaa0d269fbc07069264e57b57be5b3e1f docs/components/parameter.md: id: d1b8871be7f8 last_write_checksum: sha1:f25835d07a38e32f2ebf37b2e5df67c915bb0112 pristine_git_object: c00420ef1c6db8f5c63d1372eef3a3f7b2ae63ab - docs/components/parameters.md: - id: 74a7ffefc804 - last_write_checksum: sha1:a278eb563604b86204eccdf754760624f1dac8af - pristine_git_object: 0fc28bfa15cad7eada2db5f199ebb13f32e68d4f + docs/components/paretorouterplugin.md: + id: e4afc1e2a656 + last_write_checksum: sha1:8721ee5f64c6bb07fcbc1e3d40c04d9c3969e182 + pristine_git_object: 10c1195d432607fab7047d13fc5019e9b70bc09f + docs/components/paretorouterpluginid.md: + id: 353199e41ef9 + last_write_checksum: sha1:811dbbce35aa0fa7c3d55727e0061c1a6e6acc62 + pristine_git_object: 08be131910dd1e6bd88a103b022080eafdc54571 + docs/components/partialcoverage.md: + id: f09f55d1053c + last_write_checksum: sha1:0952353ecff862e0cd69170b03b50cb21b859a58 + pristine_git_object: face39408dbf68c7cdada7998daf36d09248a01f docs/components/partition.md: id: cc74439b2251 last_write_checksum: sha1:de88a6dedcd65f73fca2bd1913f7cbfd0d62a4ba @@ -1960,6 +2690,14 @@ trackedFiles: id: b3e279b3aa17 last_write_checksum: sha1:4b5e8c0bb453b54a0c31faffca45d3ded875be48 pristine_git_object: f42074dab36af7d2b068c0b24652b7db672dc0cc + docs/components/pipelinestage.md: + id: 54d91561d6e3 + last_write_checksum: sha1:eb2d1e6b1ab6aa6a375476cb90ad5b2802824615 + pristine_git_object: 277bf3d9e447086cc9213f1bb473b18d779a2139 + docs/components/pipelinestagetype.md: + id: 9097aa0e97fb + last_write_checksum: sha1:6ad16307547f51c9daefc056485a04a6efc17b36 + pristine_git_object: e7cddd9c2a12ee48a3769d4447bd8583e137cf73 docs/components/preferredmaxlatency.md: id: 0b82201b730d last_write_checksum: sha1:5dc1be79949b581650dbecd75ab4afccbf320a8b @@ -2000,14 +2738,14 @@ trackedFiles: id: 58d2af57c508 last_write_checksum: sha1:900904dec588ecd97ed17fc0d99896082494f729 pristine_git_object: ecc924e0faf698d142621fce07381ec15ce6d725 - docs/components/provider.md: - id: ed488bb1dc3f - last_write_checksum: sha1:06525d0f66030e9d8d4aac140d3ae780c044e7ac - pristine_git_object: 56d2fd0642e93c72502597f761e75cf50ef6a597 docs/components/providername.md: id: fe24a77d9911 - last_write_checksum: sha1:47af6679dbedcf8d8d0ac8995cfc9cd3020a6b7b - pristine_git_object: 22effdd1f55bc9d60648a80e825e17d4b94b01c1 + last_write_checksum: sha1:851ddf6036b64860ebd617305a1b75d0cb4e38d5 + pristine_git_object: dec15732dda1bae00f7de677c40d184c803fd536 + docs/components/provideroptions.md: + id: 48594a6d2d81 + last_write_checksum: sha1:3e13bd7db4ed183ce55a2315b93a8034ee475c15 + pristine_git_object: 587fdc5df5f9b8a0c2177557a33a35a454ea313e docs/components/provideroverloadedresponseerrordata.md: id: c2a8cc4ec6df last_write_checksum: sha1:1d206d00dc0d91b5ceec470579c6ce345cc23d29 @@ -2022,8 +2760,8 @@ trackedFiles: pristine_git_object: 9dca4ee9d4a9ec0a46ce21fb3823f05e8e119334 docs/components/providerresponseprovidername.md: id: 800bab487911 - last_write_checksum: sha1:befe2d2077d8abc969729b09ce4aba6a2b14bb37 - pristine_git_object: 73838c84a7682a4b6903b0ab3383b6514ca6951e + last_write_checksum: sha1:8f55451554c9f4dc23ff85fcca3454724bf397d1 + pristine_git_object: 3c3b24de6a89e237277fe9782b8271bfe211b649 docs/components/providersort.md: id: 290449b1880f last_write_checksum: sha1:f15d65e5c226a222c3bfc0b9f55dd9ca0443d415 @@ -2216,6 +2954,10 @@ trackedFiles: id: c4000667a2c8 last_write_checksum: sha1:2ff86281263010d78e755cdd7289f5daffe05cbf pristine_git_object: 7035e9e9bc9752c39ce6152d4691e92a55f34aa4 + docs/components/region.md: + id: 38a8f57aefad + last_write_checksum: sha1:a5bda39be649ced37c120ce277841c37985c5db7 + pristine_git_object: 0206a524803bce4112b0a9a88254a0b81dcaeab6 docs/components/requesttimeoutresponseerrordata.md: id: 25804cfd7f36 last_write_checksum: sha1:fc01cafdce0dc5ea0e3def122b7885ab7afff9ed @@ -2240,10 +2982,18 @@ trackedFiles: id: 84d737f84bee last_write_checksum: sha1:606fd74ebc92be927228afd7adefa80e64c47a52 pristine_git_object: 596502b2f94707deb347c53015c764525c9ba3b9 + docs/components/response.md: + id: 2b40822178c9 + last_write_checksum: sha1:ddb0671abd0ab28f74d44294340e2c3678763abd + pristine_git_object: d04de1af590bf3d0a1ac54fb51c04c14d331510c docs/components/responseformat.md: id: 21aa2dcdc770 last_write_checksum: sha1:2ea5efe6bbf68d068fdf992ae335cc4fc2fcf7d7 pristine_git_object: 86cd00504691f2fdc33549cb33e9b07d0c31dd3b + docs/components/responseformatenum.md: + id: fef1c313ab3d + last_write_checksum: sha1:935d113cac8fb79702adb5bc30c7540035ebb4a1 + pristine_git_object: 89912bf57d12ca881110486c0ca69342d38accd4 docs/components/responsehealingplugin.md: id: a9a3b6d3e0c1 last_write_checksum: sha1:ba75992bae3382339f5f1e654a91da4cdd1f7eda @@ -2274,12 +3024,12 @@ trackedFiles: pristine_git_object: e21193bbab68ee5dfdb0a113e26ba70f82bcab55 docs/components/responsesrequest.md: id: cb5cd99790f3 - last_write_checksum: sha1:41f81240aba6c05767ee1de2bcdf2ed6c1851f22 - pristine_git_object: fa27d12757cb1759f2d445125705def9e13a57b9 + last_write_checksum: sha1:f6c727915cce7987bb0456d0030bfe211383d45f + pristine_git_object: b4cfb01336eaeaca9d944b48f8ce741f8dfaee78 docs/components/responsesrequestplugin.md: id: 20da7be12bb9 - last_write_checksum: sha1:14dbd6cd32c51d333548f2c43772c43540dc97fd - pristine_git_object: 39234e56fbc2e0bc654e55a7811fca1169ded5da + last_write_checksum: sha1:f7c809fb45e9579b7853bfd93ee5ec2411c1a66e + pristine_git_object: 873bda12a3f64b07fc59dd11832eb2eb2642b8c5 docs/components/responsesrequestservicetier.md: id: 79d0f5c6bdbe last_write_checksum: sha1:759cbf960f90a2680f905be11049e8f88cf6ecda @@ -2290,12 +3040,32 @@ trackedFiles: pristine_git_object: 98ae0961e2afdbf95cdc71e2eee23c9c06972889 docs/components/responsesrequesttoolunion.md: id: d6a807777d03 - last_write_checksum: sha1:31403e31e2adebdf6ed12d7c2ddc24637826381e - pristine_git_object: 944ee6cc07e0e55107e75679efeaf3fa65e0a1d7 + last_write_checksum: sha1:59ea24cd0c56304d137cb24eb165309170392342 + pristine_git_object: e9d6484124f2d80ce046512227af2362489221b4 docs/components/responsesrequesttype.md: id: 5bd80a5ef99f last_write_checksum: sha1:96aba92528f15b2e26760ec90539b8fd7a0e9cc3 pristine_git_object: a1b8e6cfcbd056ddb1daf6fcf7f217afde717698 + docs/components/responsesstreamingresponse.md: + id: 5d93a59c671a + last_write_checksum: sha1:7fc7227e197939bef3c858dff903899922871187 + pristine_git_object: 49042a626076feb210b0f9ea38404bd7a1fc2d2b + docs/components/routerattempt.md: + id: 5444722011a3 + last_write_checksum: sha1:27a4f026961813e1714009c0248e10841ef23c01 + pristine_git_object: fbcb54690c8f245dfd518ff8bf0b86e50c1c464a + docs/components/routerparams.md: + id: c76ec52146b5 + last_write_checksum: sha1:1fa168fa76be11fd84bcdcb2beefe3323a2c0c40 + pristine_git_object: a76b529f381742a56fc9b4720016023bb2d84156 + docs/components/routingstrategy.md: + id: 43ec0d203f4c + last_write_checksum: sha1:7a52d9b52c61317a0b6c886adc920995550950c3 + pristine_git_object: 42c33d595afcaf94acfb4b04e188af4b5e266ac5 + docs/components/rule.md: + id: dbcaf58c98fc + last_write_checksum: sha1:8f3d1a647870ec092677bcff48ded8123b387c9f + pristine_git_object: 5fda8b8e205bf5bda431c5bad8f32c3e014ed1a0 docs/components/searchcontextsizeenum.md: id: ba037b375d32 last_write_checksum: sha1:1802fbb5223f07b0db2e7503e12f59647b3608f9 @@ -2306,8 +3076,8 @@ trackedFiles: pristine_git_object: a3dc6194e6abc9a0cc62bd9e20b7131fe106ab36 docs/components/searchqualitylevel.md: id: a4e6b74956c7 - last_write_checksum: sha1:bd89df72f13cb501966c208333fa00f123eff131 - pristine_git_object: 05f28d4664e7c5101ed1629a347dcec7e3c6904a + last_write_checksum: sha1:8ac839c3bcb0764ce2c995fed05ba266ef9fc731 + pristine_git_object: d7b0acc40783090b54731919832c9c23e12336e7 docs/components/security.md: id: beee40001fda last_write_checksum: sha1:45b7b8881a6560a468153662d61b99605a492edf @@ -2316,6 +3086,38 @@ trackedFiles: id: 6d65ecfd7ad3 last_write_checksum: sha1:c0e9357b45a58f3da2d3520b502cec7dae5f3446 pristine_git_object: 797c8310a34ec5ac85628fe7d60706221f14e573 + docs/components/shellcallitem.md: + id: 7c90af9ed20b + last_write_checksum: sha1:cff1a19c10dae4fc68503ede7de302401bb676e3 + pristine_git_object: 770148e5a9eb0f7d52ffa3f3ebbe0e6396f9d460 + docs/components/shellcallitemaction.md: + id: 966c83480abc + last_write_checksum: sha1:c8aa1528fafe1a7130a4b43faf90b6daee3f4e11 + pristine_git_object: 5e0455dc912e22c53d313ed5261530528d5efede + docs/components/shellcallitemstatus.md: + id: 3686c616a4ce + last_write_checksum: sha1:5a462123fffcd6f4b60efe48d529739e32e246f3 + pristine_git_object: 62af9a8bf9f79ebddbec1ddab799b23156fb8315 + docs/components/shellcallitemtype.md: + id: c193046e306d + last_write_checksum: sha1:6343b1cd900ef6726449a15a2f4967be36c324d5 + pristine_git_object: 4bc6539fe90491885319b8bf597187c2f15ab8c4 + docs/components/shellcalloutputitem.md: + id: 7c8d9a8d7145 + last_write_checksum: sha1:7dd6d238883f7e70f5b08b077788bcfa1521aed7 + pristine_git_object: f5c1081bbb1f26458d9ba51c78309185220d53fb + docs/components/shellcalloutputitemoutput.md: + id: 3d5419f14a4e + last_write_checksum: sha1:929da03678fe61046fa1ef3cdb462981d3f90048 + pristine_git_object: 47c542cf09298d5bcd97b860d907f05a51fd17ec + docs/components/shellcalloutputitemstatus.md: + id: 4d98e96563c7 + last_write_checksum: sha1:88a3edc33171508aa9d35d9b145c992e00394d33 + pristine_git_object: 84c418c6101b4096a723aa749a226f7f78de644c + docs/components/shellcalloutputitemtype.md: + id: "070444798601" + last_write_checksum: sha1:f210535e0c6e9daf9b7759ac2e39ba968f18acb6 + pristine_git_object: f6d8055010dd9a16f8782e543809c37efdddb93d docs/components/shellservertool.md: id: 3e196aa5ad05 last_write_checksum: sha1:0019a7a2fb5879826ca7db5b779c3dd8a4fcad68 @@ -2332,6 +3134,22 @@ trackedFiles: id: 063e11fe2d35 last_write_checksum: sha1:c8046f6bc1c8c61e823f49c846fe7ee6af3d0cdc pristine_git_object: 4b07bd1be51b737783b69c8b3d71725fd4484a25 + docs/components/source.md: + id: feb017a05936 + last_write_checksum: sha1:a48ca75c018f33451db625fb286fdf61a85d9f6d + pristine_git_object: 2ef36bd52d476406de7bbd31f9b95a9b3a96339c + docs/components/speechrequest.md: + id: c5cba48286f8 + last_write_checksum: sha1:956140ea1f1ae63bf64fb9ca7e300c836c2c3eaf + pristine_git_object: cafc4863b5ddb822f56577f9261d8acc3b23803c + docs/components/speechrequestprovider.md: + id: ced2f821fced + last_write_checksum: sha1:f3f19326a6b4f7f16aca37f5f5ba55892d168156 + pristine_git_object: faa49852aaf6f4306db44412ef8722a7527e4fb1 + docs/components/stance.md: + id: de29c9dfaf9f + last_write_checksum: sha1:dea71169cc0952b4ccc4b6a9dac2b6ab105d55f5 + pristine_git_object: 99b44b33449f95bc5d476036c9cbd00a29634deb docs/components/stop.md: id: 0d74a157c3ba last_write_checksum: sha1:f1b797e3188274e4411a26f0934c1d455bd85bbb @@ -2342,8 +3160,8 @@ trackedFiles: pristine_git_object: 0b3d0bcfd7082915b45ef9a4a8e74422857dd665 docs/components/streamevents.md: id: bdfd7bf6c2b0 - last_write_checksum: sha1:96cebd9096c23e86968d5091660332c579f5a865 - pristine_git_object: c41dc50aa360349bb92222a9f608e1438b3b91d4 + last_write_checksum: sha1:0a7062563bbe865076040d8bd0ba61ff07752480 + pristine_git_object: 3198c9e5c4f8b8365d0d14d538668f1c1381a5f3 docs/components/streameventsresponsecompleted.md: id: 072f9ee89867 last_write_checksum: sha1:9f33add33825fc28ad93f36c26638728fc66712b @@ -2392,10 +3210,30 @@ trackedFiles: id: b2f58ab0ba4b last_write_checksum: sha1:38b5fc345aff1c89059d223f85b31a717aa29257 pristine_git_object: 4f2e093dd4ace184096b017431053be92051d471 + docs/components/sttinputaudio.md: + id: a5385ca71d31 + last_write_checksum: sha1:57761225a6dff5c64ce2665b2540217a79ef49fb + pristine_git_object: 30f9e955a9f6959e2d5ac10ab5217283d6dbb0f2 + docs/components/sttrequest.md: + id: d8b35448e247 + last_write_checksum: sha1:1fbc9b9122417ac52db79870ca3cab8f066b867b + pristine_git_object: 5cb4441df65c4a469e4189ff72a3c16e0e2b44eb + docs/components/sttrequestprovider.md: + id: 7d5372214ddc + last_write_checksum: sha1:f1b57dfe27aa522bc773139b21382a6a48f8cf59 + pristine_git_object: 504b7cc5061d8afedfab25c5001611d7bd148619 + docs/components/sttresponse.md: + id: b2b5aa72221b + last_write_checksum: sha1:50d1ac0fd4dd2455318ff68b8329d48c5436beb8 + pristine_git_object: bd49b0c41d764c6854d760cd7a7738e94e6e9df1 + docs/components/sttusage.md: + id: bda939de1537 + last_write_checksum: sha1:e11351ee3e6d4a0470f28a611080c00e9eed11f0 + pristine_git_object: 8d8525a4e7947322cbc5b35d82f87d76d7157b24 docs/components/supportedaspectratio.md: id: 435dd9a15912 - last_write_checksum: sha1:9e8076a9123cf9c4e40e43d3dcbff14b112c64cc - pristine_git_object: 08be4d09aa458c3a87df3d385179c81607c83d2c + last_write_checksum: sha1:25a608572d10d4c76eb9e4f45e16494bea931120 + pristine_git_object: 3601360f723ac37ac09e4b5fcb22b1198089a0c3 docs/components/supportedframeimage.md: id: ee9feca3fec2 last_write_checksum: sha1:4ae34fbda72b5e31ea60cbd20b1a970bfca30056 @@ -2406,20 +3244,12 @@ trackedFiles: pristine_git_object: ffb37fabf1622a890eff20193ffc86677a299f2d docs/components/supportedsize.md: id: 8322ab1a4113 - last_write_checksum: sha1:b4c23982056253808e490aa3bccf6e6ae86c29b5 - pristine_git_object: 196402df2e8bf443573d9bd21c69cc8c49fd0316 + last_write_checksum: sha1:b037d4ca8c8a904d32ce03c73082ef2e55332d0f + pristine_git_object: c0f8f57e0192934d7cd0473b66f921b4452c7e27 docs/components/syntax.md: id: 0cf5ab254bc8 last_write_checksum: sha1:632fc2775ec4066a2b1ee403579ff59bdddb4a91 pristine_git_object: 4b82eb64344981f49f6a8fa220eb817427f4de78 - docs/components/textconfig.md: - id: 11301a29023b - last_write_checksum: sha1:62e407146de6b41467b9ec8c630ad8ad8a3f1743 - pristine_git_object: cb4ddd8f20f0302ac0550682d8e75f162c78c0b3 - docs/components/textconfigverbosity.md: - id: d49483ecf413 - last_write_checksum: sha1:a51ce28b6733aa1b579c3f9dacee605e08086497 - pristine_git_object: 0bdb609ebbb664477effde646423a619b74738b9 docs/components/textdeltaevent.md: id: 339fe3591c0d last_write_checksum: sha1:97aed7ba0e23221806738f4ed7819f8aec0db957 @@ -2438,12 +3268,8 @@ trackedFiles: pristine_git_object: 5c73058b054429983632f0542af4fc0fb50300c5 docs/components/textextendedconfig.md: id: 669e1815f825 - last_write_checksum: sha1:a64da07e11d1437c3c7453d7a6c8d3f2757a8af6 - pristine_git_object: cdda558b74a056f33dbc0f2cf63a02265087d7db - docs/components/textextendedconfigverbosity.md: - id: 355071ba1bcf - last_write_checksum: sha1:9457b6011994833a86a2223b544d9d7d1b7189b6 - pristine_git_object: bbb9988342a55552bdd3c0985cd9f6aa9a302bdd + last_write_checksum: sha1:7751fbe499ffee299268428faa3a3c63a5541796 + pristine_git_object: b876df7514e8427c7eb7bacd42461924d5b0796f docs/components/tokenizer.md: id: f1ad3417d8d1 last_write_checksum: sha1:4223f630f7d880b9288fb654f67817560fb2dbd8 @@ -2488,10 +3314,22 @@ trackedFiles: id: 0753f817b4ec last_write_checksum: sha1:1f256664635f1a8ea45367cdd40d5e4f92a46418 pristine_git_object: bc24fd4a7a4e7c6af170ee257707568d465a3833 + docs/components/typecreatefile.md: + id: 72b768523f7d + last_write_checksum: sha1:40c67785bec610506766bc490c34beb46d291957 + pristine_git_object: db50256aa160074dd41b03ef2cbdc4f19f3d79b4 docs/components/typecustom.md: id: 7346206117ce last_write_checksum: sha1:85677cff1322ca22fde8effb6d9e1f24351b12b8 pristine_git_object: 798b1c511c91925b3d92a5dce1cce33b236b0754 + docs/components/typedeletefile.md: + id: c7a3887d50cf + last_write_checksum: sha1:356b2b86f075e30b3993e276bdb450e21f4a3fb9 + pristine_git_object: 73fc83747fef56bdd83ac99a09dce4e0ed5d4283 + docs/components/typeexec.md: + id: 9332f4c34355 + last_write_checksum: sha1:81d4fc42cffcaec7c2e18fc66f0e1dd5a91e8c0b + pristine_git_object: 4ff9323d12cc4a955ea055d422197294cacb66c2 docs/components/typefilesearch.md: id: 75b395ec49b7 last_write_checksum: sha1:80dc01b6e9862ce234d31d6b571ff6b61ab2db2a @@ -2504,6 +3342,10 @@ trackedFiles: id: 37235a183141 last_write_checksum: sha1:fbb633d58e1be270989c46bc5961f361772e1f8c pristine_git_object: 1aa3dd7e7f1964bef22d3851ac42f5b480544e2e + docs/components/typelocalshellcall.md: + id: c01a4da422b7 + last_write_checksum: sha1:93cf3f4729dd2013bed102155df230927b46ea62 + pristine_git_object: 248bd685cf8ee49668fd66f214dd790fa355af19 docs/components/typelogs.md: id: 2db9d386c665 last_write_checksum: sha1:bef7fb6f13f0e7078fa25821b7d5787733569a52 @@ -2512,10 +3354,10 @@ trackedFiles: id: 3e349476bb3c last_write_checksum: sha1:795aceda2ea4559886aa768e536a738a42f49cc7 pristine_git_object: 37b24080fbf349299ebecd8f7ee42a62c5c84de6 - docs/components/typesearch.md: - id: 61c60e55211d - last_write_checksum: sha1:390cbcc7add489ce06a860d4116ed721a98b4121 - pristine_git_object: bfea226955f7aae698b7841853c0f57719b7a69b + docs/components/typeupdatefile.md: + id: 6b97ff36ea80 + last_write_checksum: sha1:efc65189b0ea6f534665df2f0de58822090a2f9e + pristine_git_object: 12aacac67297ec74eea283a8152a37986b8efd93 docs/components/typewebsearchcall.md: id: d4647ca78da9 last_write_checksum: sha1:0abbaba9c6c9a3722f755516331a80d5a1e7aac6 @@ -2524,18 +3366,30 @@ trackedFiles: id: 79b657be05c4 last_write_checksum: sha1:69e58ae8931fc723bbb4aa1212e50b97a83db709 pristine_git_object: 1db2a3a9378d0eeb5de39f1d6621e69bbb7e0953 + docs/components/uniqueinsight.md: + id: 8f721a7538ef + last_write_checksum: sha1:d1955a3237b8047e074df6a6cf0e158beeac10c0 + pristine_git_object: 3395cb6ae241647ad498206ba1672bc3e4a1f7fc docs/components/unprocessableentityresponseerrordata.md: id: 6a36f0c9d959 last_write_checksum: sha1:b7adc7ae81b79cb1436c8f85b45283fe52320d81 pristine_git_object: 9ccd3c05cd75915c70aa542bb16e2a8f77bb91cd docs/components/updateguardrailrequest.md: id: 5a0fb143eaab - last_write_checksum: sha1:76435a23043cc77dfcfd7aab0be4cfbc6de6a7e5 - pristine_git_object: 36829dd7af525b1289daa3a84c583689dc5ae125 + last_write_checksum: sha1:6827491031187b98e360d2f709b12d5fe7d19a22 + pristine_git_object: bb6288918d74e28df6323b95f3b5d9e53170d1b4 docs/components/updateguardrailresponse.md: id: 311d3e7a185a - last_write_checksum: sha1:240e2fc38ee1954caf6afb473cd9d85030b28285 - pristine_git_object: d88f7735cfa90be90763bbcfc7cbf1b8e12d7cf4 + last_write_checksum: sha1:6ef9cb86d732775c44ec679c6ece9e73b1bfdd4b + pristine_git_object: 5a0e4a701bf5b815db84cc352c7e7ec7565c4013 + docs/components/updateworkspacerequest.md: + id: 0fa61bf22fc1 + last_write_checksum: sha1:75b0020fcacd32f5d0a5c286f6aacf5e16629222 + pristine_git_object: 1a32c6cc0ac510fa2bd47a81360731a10e8e46c5 + docs/components/updateworkspaceresponse.md: + id: c8e4b8fbf004 + last_write_checksum: sha1:4e63930baddcd5f65ac3d196921b1a45447a4fd4 + pristine_git_object: 186cd5625964da06544c8e8c64f2b42d14e4c85b docs/components/urlcitation.md: id: 02c4f88e5f51 last_write_checksum: sha1:5d5a717a552b86279bfe20c6125cb0561d2052dd @@ -2546,24 +3400,32 @@ trackedFiles: pristine_git_object: 2b6e38f54f447f8fc794d3c35c1a0bc690cc4d2e docs/components/usage.md: id: 15e3eea02540 - last_write_checksum: sha1:f012bc7dd75b18e1aeea794c46f3ea666911d339 - pristine_git_object: a7798add67edd29c8712284fb383a59183932157 - docs/components/value1.md: - id: a13f75759dc0 - last_write_checksum: sha1:0c7d94ae129961ad32dbc85fdc0958596316939b - pristine_git_object: a969ac11475c494d073feee546068913aff31a6f - docs/components/value2.md: - id: cb39f5b8da43 - last_write_checksum: sha1:b0b00e40babaaed031459e229396c37300e60d92 - pristine_git_object: a281d051c89234ebb83ea44f01c2f6d3e36c2894 + last_write_checksum: sha1:2f9b8740c46b8e1a69dc9ad0b891352ded5e70e2 + pristine_git_object: 76a1d443818ff4471133dff00127bfed468f3eea + docs/components/usagecostdetails.md: + id: eca6fb6e3ba5 + last_write_checksum: sha1:368d21231a591747d2340e023b6983c195da4aa8 + pristine_git_object: df2c8ace4895ed1a54e919643d4cd3c9187b3d59 + docs/components/userlocation.md: + id: 29641029acf6 + last_write_checksum: sha1:e2295be925d9064a6125f5ba48a692a345ccd247 + pristine_git_object: e06fd727345b790473b48236b9248418cbf3ca79 docs/components/variables.md: id: ad5d1b284346 last_write_checksum: sha1:30ebb41e8bac9a8d817b2c0ab0a9e9fded4a73ee pristine_git_object: 0698d06289a06a6cfcd35f7069f2ef64a0aa0e25 + docs/components/verbosity.md: + id: 0a9da5ac382d + last_write_checksum: sha1:76ec453c1e767ce0f8c76afc0617cdc7ff29b60c + pristine_git_object: cf10c9e56352e1ef074e794b915639774a0de872 docs/components/videogenerationrequest.md: id: cacead3ac9fe - last_write_checksum: sha1:e9f69f5b244d468fbf3ecdd1872671fca4b4fc9b - pristine_git_object: 437ac8fd1a297aebc6dd9369947b80d85530cb92 + last_write_checksum: sha1:e7a7cd87b9a363efeac77c451b6dab3f4de99701 + pristine_git_object: 225e625379917b545417eab3bb2b83abd012001a + docs/components/videogenerationrequestprovider.md: + id: e2a64e74f555 + last_write_checksum: sha1:e27ed0509f52bc14e831d19fe4205ed37f5f65a8 + pristine_git_object: 28a704024a917c0aaff8c53f2a8c9e20c7ee52b4 docs/components/videogenerationresponse.md: id: adbbd66af4bd last_write_checksum: sha1:52c73fc2047792e3194f316e3182a96f8c7b85f2 @@ -2584,6 +3446,22 @@ trackedFiles: id: 6a46f08aab47 last_write_checksum: sha1:63812cb97f0ba13e4e9e0e524fb82edccecca061 pristine_git_object: 45a68af199ccff5747b446511dd9fc1c550a4d34 + docs/components/webfetchengineenum.md: + id: 7e88b8695736 + last_write_checksum: sha1:92d5e3a49ac3471a4171941c539eeea7d3ac4648 + pristine_git_object: 132c40a476553acf1fbb4bda056cc286b5287df8 + docs/components/webfetchservertool.md: + id: 16f65007e382 + last_write_checksum: sha1:377497147ada29f671b0713981227fb8e1dbf7db + pristine_git_object: 2152aba006b34b1d758e75cba8cf141d7af54223 + docs/components/webfetchservertoolconfig.md: + id: 96f1a4842e80 + last_write_checksum: sha1:7fc3508a109db361552684b5253005a89543724d + pristine_git_object: 4398ac745bea2ddc8a204258825f3e1059d586a7 + docs/components/webfetchservertooltype.md: + id: 23175d499624 + last_write_checksum: sha1:7072da0ec7dac5426abd235fea4347695ab176ee + pristine_git_object: ea6c00679c7118ddcb43185fc5f34ee01c148be2 docs/components/websearchcallcompletedevent.md: id: 8c338a61bc9d last_write_checksum: sha1:b46bf9e0c87df24c83fba70f4a0ca91648680c22 @@ -2610,8 +3488,8 @@ trackedFiles: pristine_git_object: f1771d0b194da9cadcbe7176c43059189745af44 docs/components/websearchconfig.md: id: 3fcee95e24a6 - last_write_checksum: sha1:f5edbfa631a4a020b7e4d2c4e2abb5e7081681d7 - pristine_git_object: e619e700a585c8daefaba731cb926733cb917f91 + last_write_checksum: sha1:e129c44a7e2b0063d3619097f702cf7b657ce892 + pristine_git_object: 5a3fcbb0df0abe1a55a51fccd6c5208f2becad7a docs/components/websearchdomainfilter.md: id: 47d067b8286d last_write_checksum: sha1:bc0207fdf5478614ee90906ce70c42e57506378d @@ -2626,20 +3504,28 @@ trackedFiles: pristine_git_object: 915b4ef64620b4cbf4ef4595cd1780a414bbfac1 docs/components/websearchplugin.md: id: d6baf3aa0a96 - last_write_checksum: sha1:13cae4374787097735b6896cefeea505ef33824b - pristine_git_object: 5a49814a65bddea31eafaa3bacfe5ed7d0444d2e + last_write_checksum: sha1:cc37dce50cf180ddb4d6ece96993600f0d73eff2 + pristine_git_object: 9f5b99bc633585ffa43baea8a53d371b05261a1c docs/components/websearchpluginid.md: id: 0b025727cb2e last_write_checksum: sha1:b8da5b1cb0bcc0e2e067e6d09f5e2b51a77d0592 pristine_git_object: b0913dcfee22f1204335350b9b9bca75db27c821 + docs/components/websearchplugintype.md: + id: 027b51292738 + last_write_checksum: sha1:4a13256166d1e2f00901f55e8500e66686730b07 + pristine_git_object: a64310784046570184cdec6d848897351c112b30 docs/components/websearchservertool.md: id: 92cff6162ede last_write_checksum: sha1:860b4c1b13b6be3ffbd2ff99f20e7055a0ac2098 pristine_git_object: 8ad43c178a611051aabb65b30222a2e901004d9f + docs/components/websearchservertoolconfig.md: + id: 03a09e9ae532 + last_write_checksum: sha1:835afbafd82329a89abc1e8b06844f4fd025bc57 + pristine_git_object: 68539733e56df0286777a1f1a4bb1275e732139c docs/components/websearchservertoolopenrouter.md: id: 34b36452e3b3 - last_write_checksum: sha1:0600f96fa45dbc72b36e1cb67c35e30583650f97 - pristine_git_object: ed81b6598a5d13d51f235e7017bf1c563f9ebb43 + last_write_checksum: sha1:c3676ba15e24d124c35c69ed20af393f10bc111e + pristine_git_object: 94a42fd05fbbd0453d936b9ac4b52f97c8ff0d95 docs/components/websearchservertoolopenroutertype.md: id: 709a7a44c3c9 last_write_checksum: sha1:a2b894302d879e185fdad29ab6911c7a9b72f6ca @@ -2666,8 +3552,8 @@ trackedFiles: pristine_git_object: 678c7653c10d98a575a20208d824170418a1950f docs/components/websearchuserlocationservertool.md: id: 10b54200c690 - last_write_checksum: sha1:270139f080f581acc09cfc726f3144e3e457d9ab - pristine_git_object: 9e77679591ae44e647b1fcc515d0905744b488f4 + last_write_checksum: sha1:e2121866212d004cb58952bcfe2fc71c1d51245d + pristine_git_object: b5fe52e94455874fca43426e9802363658284874 docs/components/websearchuserlocationservertooltype.md: id: 9418ba6655a0 last_write_checksum: sha1:195a53255f2c1f20a1dd978730b9b772c7f2d987 @@ -2676,66 +3562,78 @@ trackedFiles: id: ac432a0db67a last_write_checksum: sha1:6b322242229459f409a83243db53ff8069fe1a3f pristine_git_object: 8213d86aa4dea092924605829dce95a1f31b0897 + docs/components/workspace.md: + id: 0a15ff43e01c + last_write_checksum: sha1:a44aaefdf977be3defda943f7a0a6b78726a2e10 + pristine_git_object: fc03d550582e7ac86ba51c17bcb5568961b7e631 + docs/components/workspacemember.md: + id: 250baf73019f + last_write_checksum: sha1:d0079b9edc10857c5d2fd55b8122851e235dec21 + pristine_git_object: 31e122462373cfbb603a4e35d88810743e9e585b + docs/components/workspacememberrole.md: + id: b6a965f120c4 + last_write_checksum: sha1:3315f44ee8ccfccabfcf89f32cb7d585864593be + pristine_git_object: 00592d06a5c490ccce759f0b259f756f3f11c104 docs/errors/badgatewayresponseerror.md: id: 32126b40d635 - last_write_checksum: sha1:86b3a24f2523bb4df0972bf2fca93dceb7a190a2 - pristine_git_object: 54c51b9dd9ed8dc98dd52c0e68ef5554677197f0 + last_write_checksum: sha1:223852bbefa4599b01ff0e8e716cb7216231c99e + pristine_git_object: 5bd359e8668e33d05ec94cdde74c51206a047dc7 docs/errors/badrequestresponseerror.md: id: 557cbbed2def - last_write_checksum: sha1:91d337751953ebee60ebc85946706aad64aae951 - pristine_git_object: b7ca5ac0173bdb6d535d9aa86bf582f05ea7ca65 + last_write_checksum: sha1:9ebfd0bd854fb3be7bbc9cbc6a49869f874caa75 + pristine_git_object: 6bb5d84d7ebcf391108ed791db32bebf16e37d2e docs/errors/conflictresponseerror.md: id: a6291cc4fcfb - last_write_checksum: sha1:3dd3b7bad49f0f6648791dbd3a9609820eed4a71 - pristine_git_object: b3da3b7a122ddeda00203e6f0245673bafc70e98 + last_write_checksum: sha1:7f65dd130bb9a265070827fd2cbccd34faaef440 + pristine_git_object: cebaddbb10025814671f5f33b8dcdcedc19b5acf docs/errors/edgenetworktimeoutresponseerror.md: id: 2e06bbd77e57 - last_write_checksum: sha1:21452cb7aababb75432da12ab9f73a4c446f6203 - pristine_git_object: b12eb0627b703ad6a81397d3d2fecd33c795613b + last_write_checksum: sha1:5dac0d2c35bc6f172cf34f89be8c8bb50311a722 + pristine_git_object: 3720bcc7c6d7b8e30fb81336aee6e56efc202d55 docs/errors/forbiddenresponseerror.md: id: 7decb227f487 - last_write_checksum: sha1:283f0f2a777f118448acd3bed2b98a879a8175a7 - pristine_git_object: 290d3a4196ed994d4c8637490aa1449fbe624724 + last_write_checksum: sha1:1ed86d541b2413d207f720c6723cb12231ef9904 + pristine_git_object: 8015439adc3dbb0fa36b2f2d470d518e10d538a3 docs/errors/internalserverresponseerror.md: id: 7e8ff7f684b2 - last_write_checksum: sha1:7286bd98d0952f44d807965c284796fa8b271be4 - pristine_git_object: b625175afeab822bd2c84b7430bf711656813419 + last_write_checksum: sha1:d2dba8365a2592a3c5b2053e6df9aba954f6ab5c + pristine_git_object: 5db18a9b30b04f9e85e989cf93af56f0c13205ce docs/errors/notfoundresponseerror.md: id: 24546e4ae2b1 - last_write_checksum: sha1:d7a17885213efd454b691f6ee5b899cd0ba692f2 - pristine_git_object: 80d0191686bee32f48f5df345b1bbf39b13e5fea + last_write_checksum: sha1:3489bbfc7d8524f7bc00416d368d08c88cb693b1 + pristine_git_object: 3f377475b54b415589c2f495c6c46dd424d111c6 docs/errors/payloadtoolargeresponseerror.md: id: 11b7364bb388 - last_write_checksum: sha1:fa2630842cf4627459da16d1aa3e1994a0f93cc0 - pristine_git_object: 322cefe3a38f280ea4b9b77ca68d17b7b063d277 + last_write_checksum: sha1:49e52c253b21fafc9c7ed83b392b601a2db2e9d3 + pristine_git_object: 5027338f1f76f8eec7e121e3f89a907c0fec1764 docs/errors/paymentrequiredresponseerror.md: id: 1df8bf21f2ec - last_write_checksum: sha1:25494fb9511e5c0771065e7227db40c1c532675d - pristine_git_object: 1cf4c3f8a8ac361d2ba94b2abdde72ae9e73103e + last_write_checksum: sha1:438c021020ba04a6c6356a49b10101f4948290da + pristine_git_object: 974318969fccd04206b3dfe1e45d9300e11df85e docs/errors/provideroverloadedresponseerror.md: id: bae15be73247 - last_write_checksum: sha1:9384bc2db38813760ea96dcf8d741e734297ddc0 - pristine_git_object: 9eff488317ce9c348cef09d3398581fa58812171 + last_write_checksum: sha1:c58d85a79ac15626d09d2f13ca2596f4d804fa9a + pristine_git_object: 7a2e57818215a8202cc331c9e4ea718996fc334c docs/errors/requesttimeoutresponseerror.md: id: 8d026980f8a1 - last_write_checksum: sha1:8ed616de74c14b661f415c8cc2ba06f193d04fff - pristine_git_object: 4f5d8f7c964859bce730da7ea3a85a71447d42f1 + last_write_checksum: sha1:3447ecfc92466e9de0e2265e0d084ba9b3edf662 + pristine_git_object: 4029799436c103d71c9d121762666b0c36f8e77a docs/errors/serviceunavailableresponseerror.md: id: 4673e5ccf763 - last_write_checksum: sha1:71084f978900f2f69880d767af428f1de2e51af2 - pristine_git_object: ecd703aef5447801f014a4e9479120af82877292 + last_write_checksum: sha1:5b4c28adfc9b5f12aad217a77536ce413c72ec0f + pristine_git_object: ac2fed91a62ad9e15c353bc71a90822ddfff2e65 docs/errors/toomanyrequestsresponseerror.md: id: be0bd7d3b18d - last_write_checksum: sha1:51af9ddc560868b3766719af9a5d8eaf24eb051a - pristine_git_object: d03ed75e3fb9e8211a25051459708ce03dc69bde + last_write_checksum: sha1:d645a93709eee394d9e70ee740c4feeab9aaf450 + pristine_git_object: 294f69579f46ea917d03236b5c6123c3681819cc docs/errors/unauthorizedresponseerror.md: id: 500194829c27 - last_write_checksum: sha1:2d29af324a37fceabd072b787efae825dfe83cf2 - pristine_git_object: 7dd77440386a5708344749797bb608c79623830b + last_write_checksum: sha1:17503cd8d5eeec97b9d674b9a2bdcace9902e5a3 + pristine_git_object: 50d78da46455cb36f7dd14165dea80e77e542717 docs/errors/unprocessableentityresponseerror.md: id: cc0e37e6516e - last_write_checksum: sha1:3f387fa8558b528884f8d7f61cbc576bb32924b9 - pristine_git_object: 33f001c56da91058dbab85aac79a77c48ddc869b + last_write_checksum: sha1:dfef75a5f9094b0d9bfab11d7ccfb2bbf371bbb2 + pristine_git_object: 77b55729e28c297a11737222fea74063314f5cee docs/models/internal/globals.md: id: 9c173b87f41f last_write_checksum: sha1:eb08bb4e1e88b4fd1740cd6737a7f5752a101c85 @@ -2744,10 +3642,14 @@ trackedFiles: id: 4343ac43161c last_write_checksum: sha1:562c0f21e308ad10c27f85f75704c15592c6929d pristine_git_object: 69dd549ec7f5f885101d08dd502e25748183aebf - docs/operations/apitype.md: - id: e271bff20dc7 - last_write_checksum: sha1:589d9ed0a91014cf2b66f83a118259aafb78983f - pristine_git_object: ffff0b9ea5cb410b51798b848ccf40a763edc216 + docs/operations/bulkaddworkspacemembersglobals.md: + id: 6cff183f93a1 + last_write_checksum: sha1:39941ebc9a51b0189aed03680e2168e25b7c9692 + pristine_git_object: f4a5325dcf71a943b6b1d01679587f2b0b291fd3 + docs/operations/bulkaddworkspacemembersrequest.md: + id: d8246fdf3e0b + last_write_checksum: sha1:156694bd17ba999b2ce0886da7153e7d349beea7 + pristine_git_object: df933fdfe35d136462f083cd40afb3d997171024 docs/operations/bulkassignkeystoguardrailglobals.md: id: 10cab63c9a95 last_write_checksum: sha1:5c7983931ef784a72f7dfec732eb7809d352c313 @@ -2764,6 +3666,14 @@ trackedFiles: id: 6d6c7e9ae12f last_write_checksum: sha1:8aa5702d46c01c87db1df7624b5125ee9bbc8edc pristine_git_object: f15474f24f02a38716f8c83f74a501a3dadef26a + docs/operations/bulkremoveworkspacemembersglobals.md: + id: eca056a05e51 + last_write_checksum: sha1:eb2295ca61d2b6f430119c3e42a3cda4958b2fea + pristine_git_object: e2a1edc52f0035b6d0f55403fc5ead2e351f2499 + docs/operations/bulkremoveworkspacemembersrequest.md: + id: ac8eba8ae2ab + last_write_checksum: sha1:ca7f3d49baa41f7996bff82eb7a6cae01fb3275b + pristine_git_object: ee134f45349379dd00569354b8aaa2a6d1aed373 docs/operations/bulkunassignkeysfromguardrailglobals.md: id: "491635767122" last_write_checksum: sha1:06e7a6b0f052e73e5cacd480e3bff8ab7756d0b0 @@ -2786,8 +3696,8 @@ trackedFiles: pristine_git_object: f0fa9d7be281df813c938123cf7a67213c98e9b7 docs/operations/content.md: id: 33ab0eb04a0b - last_write_checksum: sha1:5a1a468675c152ae46d98cc4d68f26163a36bfa3 - pristine_git_object: 727997fcf2c2d7ecd0576adcd3fafc945c90ad61 + last_write_checksum: sha1:c4d2c8081f9275dae2e19c1d5ce3074325a4d5e4 + pristine_git_object: 22aef15930d1f88538534310e6304c0aae726531 docs/operations/contentimageurl.md: id: 8e6b0dcac568 last_write_checksum: sha1:0a8701c28d0de7adef8ac51053bc5f701a26aca5 @@ -2796,6 +3706,22 @@ trackedFiles: id: 01cceb61d42f last_write_checksum: sha1:7e1d73bd30584d55f4b116737c15d7c73cdf6a3a pristine_git_object: 522f4978a3c4e1d1c0d197b541fc57e745b7d4e7 + docs/operations/createaudiospeechglobals.md: + id: c67d64f11ad7 + last_write_checksum: sha1:a0026b1caf2268dd4a79177fa2bb630eca1498b4 + pristine_git_object: 0fbd4f1ad17604e5e31b457c0e3073d5389539c8 + docs/operations/createaudiospeechrequest.md: + id: d3139a0713f5 + last_write_checksum: sha1:dd894ff1ac1021c4202c1e8197f2a7b5d7d856d3 + pristine_git_object: c1ca2b7336e47fe365a59cebb643e9a780d44e7e + docs/operations/createaudiotranscriptionsglobals.md: + id: b58641464e34 + last_write_checksum: sha1:cfc998017937ba731fbc1584d199b9668d8e08e3 + pristine_git_object: f505a7180aca4ca2240cbecfab2bf5d464c6be34 + docs/operations/createaudiotranscriptionsrequest.md: + id: 9a2ff1044ad2 + last_write_checksum: sha1:de442d138768324f36e046817b44719ba4ac6274 + pristine_git_object: 8fc1edc9df06004768f5dfa12f1f2fbc5d02dfad docs/operations/createauthkeyscodecodechallengemethod.md: id: d598c7da9363 last_write_checksum: sha1:3b81340adcf218991f7829e692e64f484763de2b @@ -2846,20 +3772,20 @@ trackedFiles: pristine_git_object: 1ff75cb8fa59d2b7b756ea07e9f5849995b62435 docs/operations/createembeddingsusage.md: id: 2dc99973f6c7 - last_write_checksum: sha1:a51043a1dcc144a05c76c218c73ff3f413d313ec - pristine_git_object: ef0429e0678238d40901c630b48ab20680eee1f5 + last_write_checksum: sha1:b01ba733f5d1369b21a54b9f3bfb0e4059504b6f + pristine_git_object: 007fb235eef4ebb9b3dda14352e9a252004de4c2 docs/operations/createguardrailglobals.md: id: 34f5b2a17330 last_write_checksum: sha1:a43fb357b9c08974befd14a79da7623e72bc3245 pristine_git_object: 862c3641250154a3e227d020738f893d316d391a docs/operations/createguardrailrequest.md: id: 2d8932b329b3 - last_write_checksum: sha1:4b958201a047311bd6b7c74e767fe25f7c949d45 - pristine_git_object: 5a414e26806520a98f50229a063f127f712054b0 + last_write_checksum: sha1:e03ea14af1abe30c5dc38323a824a91fa817bc2d + pristine_git_object: 74958a262f7d16b3cd8166b0a80a832d44b3df03 docs/operations/createkeysdata.md: id: 903a6d611ab2 - last_write_checksum: sha1:fd7089b7dff765f863b0c02542c9e480656526a8 - pristine_git_object: f51f201d1e8c5c7216a508a652b154ca9fa20543 + last_write_checksum: sha1:78eb64a7cc6deeb3959adeb0ca705826f5f47005 + pristine_git_object: e60eaf9f45abcfdba122a7b04d1c66be31af48fa docs/operations/createkeysglobals.md: id: 15dd52d4443e last_write_checksum: sha1:032800ca0e8b56a1819431b9b27fa09a5b4b09c9 @@ -2874,12 +3800,12 @@ trackedFiles: pristine_git_object: f587de752afc6f5f82d55ba4b80f6d59336db24a docs/operations/createkeysrequestbody.md: id: 9aee51637cee - last_write_checksum: sha1:1d8572e91a7634a55014b51d6eff7be8e8e92690 - pristine_git_object: a384fabe3ae8b6d1fa3ead87957d9552591d7664 + last_write_checksum: sha1:dbd509a932f74e85a237fa1f4a2fab4c78af6c89 + pristine_git_object: e63e997bf3d6eba579db664fba80bd295c145f17 docs/operations/createkeysresponse.md: id: 42bb3427e12b - last_write_checksum: sha1:b3aab1702c99f425a12e00607278808682bcf666 - pristine_git_object: e74907571f4147d457e544df8bcf6e4bb5be38fa + last_write_checksum: sha1:e113e49e9b3aa54f0d8021d13be59fc533830a7e + pristine_git_object: 91744f3dce817f96d0f5bb44af9988f4c54feac2 docs/operations/creatererankglobals.md: id: 46c967a0d2ba last_write_checksum: sha1:9dffe3342695ec66163cb83423f441d527d4e561 @@ -2910,16 +3836,12 @@ trackedFiles: pristine_git_object: 265872cbb44f436ced32612e7d880ad31d3fa41d docs/operations/createresponsesrequest.md: id: 98a355410675 - last_write_checksum: sha1:42013ced1fe3f6f5f080cee401a67e01ed6fd9d7 - pristine_git_object: 479750cece19c843bc8cca71f32ead0f5e0dfb1d + last_write_checksum: sha1:da900b92e73c387f01fa9621a2a080dcf23f8a7f + pristine_git_object: 0552d2555951ced289860da4b822da0fa697336e docs/operations/createresponsesresponse.md: id: a3d80d6706a3 last_write_checksum: sha1:b02dd81018eb73c7761a32ead8011abff17d9962 pristine_git_object: 5c515b1d273af54ccbf5e3d32b1677cbe867a1f2 - docs/operations/createresponsesresponsebody.md: - id: 5f7fc3c975e3 - last_write_checksum: sha1:79a9815ab0129b3254e878501ebe5b2cd85c51e1 - pristine_git_object: b6dddbc3a55f3297719a3648b699634e50ca2f98 docs/operations/createvideosglobals.md: id: 356f4c73b7c4 last_write_checksum: sha1:c639cea73f4e6c596f5b1fe567fa9b0c584caa6d @@ -2928,6 +3850,14 @@ trackedFiles: id: b8190b2b48e4 last_write_checksum: sha1:ccf223bd7e2958b01032fffc328ba43f0e6bf260 pristine_git_object: c9ce4f85e23827bdd48ebb8bf00525343eac73ce + docs/operations/createworkspaceglobals.md: + id: bb43600a84d0 + last_write_checksum: sha1:431ed0e1519765d8b94d50ac991a64f6e6241513 + pristine_git_object: 1f46dbb7552fe39db8fdf7209d9d5287f808bfa4 + docs/operations/createworkspacerequest.md: + id: 9aebad99652f + last_write_checksum: sha1:26e3648e75871274c27e60ed42715d7434223819 + pristine_git_object: ac92a748a5524ccb683ffb32dce19de3714a0e37 docs/operations/datacenter.md: id: b08a21cce65c last_write_checksum: sha1:9f399d250c42bff63295881990961f871a36b8a9 @@ -2952,6 +3882,14 @@ trackedFiles: id: 843ae03c4c33 last_write_checksum: sha1:3e34ea65b5397e4d1203306e4a08f12023ebfba2 pristine_git_object: cc7cddbdde6e0f31ddbec25b8a01e7ece0b8e04c + docs/operations/deleteworkspaceglobals.md: + id: c9f40cc89b0e + last_write_checksum: sha1:4131177651ca5ad33b7160b2f4b8ff74e2233152 + pristine_git_object: ef29294eda583f20fa40d5a544537cb72f1e98d8 + docs/operations/deleteworkspacerequest.md: + id: bd62f5b93ebd + last_write_checksum: sha1:8bd64edf9b0684036c34ab258b95914d46cf8520 + pristine_git_object: 980bab8fc4db27e0e7ef13f8799e0abd3ce8054e docs/operations/document.md: id: 640b715eb2a4 last_write_checksum: sha1:18b3bcf786efa0cf41dd10ba4c3a3a58c65cd134 @@ -2984,6 +3922,14 @@ trackedFiles: id: 62e36bd89583 last_write_checksum: sha1:f1f06cc15b7bf183358c6de9aa6351b70ca5e8bf pristine_git_object: 11975e02a266c09b4c6c77409c7e8a42fe7cb537 + docs/operations/getbyokkeyglobals.md: + id: 82a8cd8db21c + last_write_checksum: sha1:4490949622267f537def903fa3efe64142925739 + pristine_git_object: f2fe5e4320b22e90fda49f1476cd4a8a5a5a4f26 + docs/operations/getbyokkeyrequest.md: + id: 0415f890e75a + last_write_checksum: sha1:0ee7c46f0cbdd349f1b17a1e2275bc7a6aeaaa54 + pristine_git_object: 99b01898e72b7fcd892c7fae0707a295e36aea2c docs/operations/getcreditsdata.md: id: 57e01e9078b5 last_write_checksum: sha1:0f1d133fe4045e1b1d0e494e54bbb02b76d16607 @@ -3016,10 +3962,6 @@ trackedFiles: id: 37af8951de4d last_write_checksum: sha1:1e62836ec19a8aad8b0dcafd7799b71250a5c6f7 pristine_git_object: 2855d5b95d41a494bc7ffa9f85c74ff27a46ca96 - docs/operations/getgenerationdata.md: - id: 89a3aab8da20 - last_write_checksum: sha1:a535e1604ef9524eb8fb752711abd36dbe7219c6 - pristine_git_object: 7be5766a6c6a5f065834bdbbec761795c255689f docs/operations/getgenerationglobals.md: id: 0d6e856c5861 last_write_checksum: sha1:b5236815132dedf2b595fd520f1753d5ec8bb6e0 @@ -3028,10 +3970,6 @@ trackedFiles: id: c830d67c6a95 last_write_checksum: sha1:508adc1d9d3a03a5b6d12515ae9dd8f0b5b1c2e4 pristine_git_object: 8c54a7a47635c68bb980670de08a748d076a401a - docs/operations/getgenerationresponse.md: - id: ab03c2c610cc - last_write_checksum: sha1:419e7fafd845db9c63545b55bf6ab1ecd6a04371 - pristine_git_object: 989c19a3997fe21716eea833ef30eef8a980b733 docs/operations/getguardrailglobals.md: id: 6cf14d555b8f last_write_checksum: sha1:025d0a3b53ce5603d5d262a5db3ac54b5ce981d0 @@ -3042,8 +3980,8 @@ trackedFiles: pristine_git_object: ad49c823ffd11b46d8a8ce2a67eed5bd71d09db8 docs/operations/getkeydata.md: id: 4fba05263947 - last_write_checksum: sha1:15596e6d829847c4916aa0c8cc2d53f47cf43295 - pristine_git_object: 5ba4a1f8bb80defa921093533a2c7e5f1a4c45a2 + last_write_checksum: sha1:914831859afa885b63cf4d8a252ae16997007438 + pristine_git_object: c5a3db6f9a847b1fafaca37b04e58e0f63cf77e0 docs/operations/getkeyglobals.md: id: 7f990e0efc1e last_write_checksum: sha1:12dcc44c433951cdd8c4136ae1a70702e2b3e47d @@ -3054,8 +3992,8 @@ trackedFiles: pristine_git_object: b7b0a302d24d5964ce5a4bd24672d766362564cf docs/operations/getkeyresponse.md: id: c145b1a0dd5f - last_write_checksum: sha1:71d93bb73bc10bb55afe1d816f2c839b43528c96 - pristine_git_object: 7959a400503db3233fc13546d4b63995690d5984 + last_write_checksum: sha1:c315584d278f8f91f4437479ef8e95ce48b3130c + pristine_git_object: 72e8055b7d9b0de224ea423fab24a5614d6e9da3 docs/operations/getmodelsglobals.md: id: 61588f3029c8 last_write_checksum: sha1:f1565d45f3d06f070a8bc5ebe53d6205656b4b3b @@ -3064,6 +4002,14 @@ trackedFiles: id: ffb89fce8262 last_write_checksum: sha1:8a16948332630ebc3a9c1d6daeff63cf11e4b07b pristine_git_object: afb02bfe9dacbe10ef68aeda55e8c50ccd35ecfe + docs/operations/getobservabilitydestinationglobals.md: + id: 00303cf00619 + last_write_checksum: sha1:ae437bab3d6cd3996eacfbb713f9b29385eee1c9 + pristine_git_object: 66c60398544681aea2ef847648b6b1b6b7f83000 + docs/operations/getobservabilitydestinationrequest.md: + id: a182ef732e42 + last_write_checksum: sha1:5d0d08269002a80e0cb73523ad75571569c1b7be + pristine_git_object: f74d79fd1c0ff58fb95812dcb8821eaa601f8275 docs/operations/getuseractivityglobals.md: id: 39aded6fc0f1 last_write_checksum: sha1:53ccc45e0783444aa97f4e051b6ac6edc3acc588 @@ -3080,6 +4026,14 @@ trackedFiles: id: 2eeac3b6576d last_write_checksum: sha1:9f6eec582ec3a568a6e14f57a687f0d360fc9748 pristine_git_object: db40577d2526f81edbcc38cef6517c598a98bc7b + docs/operations/getworkspaceglobals.md: + id: c0101897f893 + last_write_checksum: sha1:5ac92be2d4cd79c39bad1ed47a4e689ed44f3769 + pristine_git_object: 1bd5e0856557b36ea222bd2b685557bb0c75a7f3 + docs/operations/getworkspacerequest.md: + id: 6443ed4f7ead + last_write_checksum: sha1:c2ada6583e276f2a6c553b24053453853207b302 + pristine_git_object: 8b59d2daf235f8af09bf4664c8080ea7a0e5b3e2 docs/operations/headquarters.md: id: 3ccf7adf2542 last_write_checksum: sha1:24ca86fa6e2ebabf4cb034f6e368901e5041ccc7 @@ -3096,10 +4050,22 @@ trackedFiles: id: 8bde108b50c7 last_write_checksum: sha1:e671ac1a028be0528b5273dd61b8deea5c3f9451 pristine_git_object: 655cca3c9dde2904f47187955063ed1def505e47 + docs/operations/listbyokkeysglobals.md: + id: 97eb1fd15ac1 + last_write_checksum: sha1:7c545f4b2bac2dc7c814cbeb0ce3ece4e8338f9a + pristine_git_object: 9bd9dcc5a67a8361541150beff1fd3f67873220b + docs/operations/listbyokkeysrequest.md: + id: 2616eb6c184d + last_write_checksum: sha1:5cf5f6e129d99ea30797d3523ba69915d1057bda + pristine_git_object: 4a8bb4188542896d96807b154ed1423c12fb0f52 + docs/operations/listbyokkeysresponse.md: + id: 15eaf6a6fa23 + last_write_checksum: sha1:8f688dc5041a88fa5417a4d58471c1c9399decd9 + pristine_git_object: 0e6a3cf7bce0fb030a0bd8f2c3c9d0e076490504 docs/operations/listdata.md: id: 3a3029670d40 - last_write_checksum: sha1:3849b8da164914dd9aedabf0982439c1e1bef02e - pristine_git_object: d8fcbe3395bbf9581c75455e3c0c49dae72f73a2 + last_write_checksum: sha1:1384605ff96cc0e7797d7dd2ff42752fe980d91e + pristine_git_object: d2a0b36ca2cbc9e297beba6471f7838b12b0b783 docs/operations/listembeddingsmodelsglobals.md: id: 29c3a9629ff7 last_write_checksum: sha1:a8b2d679ac7a558761e4289233d31084f4f7663e @@ -3132,6 +4098,14 @@ trackedFiles: id: 37a957da8f54 last_write_checksum: sha1:6892fe1fc31da14493b937171caec5f0fabb8daf pristine_git_object: 54cf662af701995f7c04272d932f9a2e2731beeb + docs/operations/listgenerationcontentglobals.md: + id: 86c60d8ee820 + last_write_checksum: sha1:6bb5e89777b8f25572237af5065a15ff5abea244 + pristine_git_object: eb76ee2d7e2516c9942be0fb3a1fe38177741f71 + docs/operations/listgenerationcontentrequest.md: + id: 2fd43266dedb + last_write_checksum: sha1:e9831ae9536176f944df36910bcbcde652545a6d + pristine_git_object: a025996eecd9ddf89a1eb10a5931becdc58983bc docs/operations/listglobals.md: id: 32d30e56f680 last_write_checksum: sha1:6b2661b1a208354794ee9f591c7581526d4641be @@ -3166,12 +4140,12 @@ trackedFiles: pristine_git_object: 4a623f2b7664346b324037e5e099cc19a22e0f99 docs/operations/listguardrailsrequest.md: id: c00416201071 - last_write_checksum: sha1:59f051110dcbb0bff3ef96bb5f098b561a810c43 - pristine_git_object: 65946b14204dcd39c2a43303d56e62439506a07b + last_write_checksum: sha1:e73c3a5dab8af65b85eafbacaa9c3e7bff99ce3d + pristine_git_object: e6f8126048b2344f42c86d1df9e472b9b0618bc7 docs/operations/listguardrailsresponse.md: id: 0e85f301aa5c - last_write_checksum: sha1:ef8d1dd575f41c8fdbefce870526326b9f213912 - pristine_git_object: 3046aeb171cb27a5ce37814a5723e3fae8ef2969 + last_write_checksum: sha1:36a74026db582e180dddba706a029930c7d29fbe + pristine_git_object: a45543ba017778d4e258f274bc8e434c99627d8c docs/operations/listkeyassignmentsglobals.md: id: eb16fba53032 last_write_checksum: sha1:823375a0dc84574748befda39821c790b469a6b4 @@ -3216,6 +4190,18 @@ trackedFiles: id: a5b7382e5fb8 last_write_checksum: sha1:c4de0a5a996b4ad48cf50e0f5f35db05c882c574 pristine_git_object: 3d42e13fcb006322664b3458e5399483ad0b73fb + docs/operations/listobservabilitydestinationsglobals.md: + id: f97e8b407351 + last_write_checksum: sha1:18ce351edf724c073d1a7e48cec4a4d1fe3344c3 + pristine_git_object: e743e9fcb59eed90783d6e02c525c9203000ba00 + docs/operations/listobservabilitydestinationsrequest.md: + id: fe42600264e2 + last_write_checksum: sha1:2c9fca29d3666dd8a0a6831ac171c3870bc8611f + pristine_git_object: 823bd375a911d42d6748a48a1475f737b9b2cbac + docs/operations/listobservabilitydestinationsresponse.md: + id: 27e52198d1cd + last_write_checksum: sha1:7bfd16e81835713d3c4da71b96e50dec3b2c44e4 + pristine_git_object: 2ca4b2b0b7fddcc9539f0c76ad9dd3c116c58d15 docs/operations/listorganizationmembersdata.md: id: e2cb8741f8f1 last_write_checksum: sha1:2ca75ea8dd657b6cf33236ec7e3949215b958a8f @@ -3254,8 +4240,8 @@ trackedFiles: pristine_git_object: 922cc65548995e12edbe83abf86732c4190c7a97 docs/operations/listrequest.md: id: 40bb7fe37ce6 - last_write_checksum: sha1:36a84dbd57ce7422a28707449d645c467d77dcb4 - pristine_git_object: 5507b0aa07c0220cfdad1e7ec264f0d74cd2ac94 + last_write_checksum: sha1:dd1cdb3c672fb456b05afa8c838bfca5e7a4f2db + pristine_git_object: a5646bdeb6412940b9f6f2320315d9f1f58788d6 docs/operations/listresponse.md: id: 14450e1d6614 last_write_checksum: sha1:e432e29d3c7de8517cc16b59b958134ec561f09c @@ -3276,6 +4262,18 @@ trackedFiles: id: e0e776f67adb last_write_checksum: sha1:0d590826439a800f340367b6721265535827aede pristine_git_object: cbd65ef6238a8b9bb2c36bc37cbdb5a5e181d3ad + docs/operations/listworkspacesglobals.md: + id: 4ccdc202de01 + last_write_checksum: sha1:3eade1075e3b0f917a9afee3da18cfebbc4ac886 + pristine_git_object: c5967dd23490646d0a10ffa24df8aa0bab712c9f + docs/operations/listworkspacesrequest.md: + id: 93bf2ba40fbd + last_write_checksum: sha1:c0d073a290e63ae12c5099d38abc89f87d6ca525 + pristine_git_object: f46ba571e6e7cefe535e9a429ed811978fe697a8 + docs/operations/listworkspacesresponse.md: + id: 54505a70bba7 + last_write_checksum: sha1:4f3cb764af31985161832976edf2fefb97c0cdc5 + pristine_git_object: f817644945c1182df48c2166fbf931e91ab34b36 docs/operations/object.md: id: baee3544844d last_write_checksum: sha1:2fba5ecf3f93c90460a972666d6acdfb597cafad @@ -3284,6 +4282,14 @@ trackedFiles: id: 7a144a9c7a29 last_write_checksum: sha1:5f009bd24fd951128cdc546a6a5c937ab0426387 pristine_git_object: 4f8c20dd33dceafda3362119a1cfb1e5133810d1 + docs/operations/prompttokensdetails.md: + id: 4e204e79631e + last_write_checksum: sha1:253a012fe630387ab4de4461bf797cc8cd7a09c7 + pristine_git_object: 56c454715dfb32bf210dfe8031e7145fd4c2c83b + docs/operations/provider.md: + id: 9d89f101fabf + last_write_checksum: sha1:8350a29f30fcbd620772e1539f9b8db11ccfed7e + pristine_git_object: 7d8d624a9a75f226175ccf6fc7c48c3086be888d docs/operations/ratelimit.md: id: 55ccfab9dcb0 last_write_checksum: sha1:ba383320e312bc87bd156a5d338f3d973376ec02 @@ -3302,16 +4308,12 @@ trackedFiles: pristine_git_object: 3256c024465d68f376df1e9498da94ce756bf320 docs/operations/sendchatcompletionrequestrequest.md: id: "220604035185" - last_write_checksum: sha1:55f1470ef51551503f7ad08489329bd1b81e4c4f - pristine_git_object: f0a096f40d2d0e187d2cd3884aa957d863913ef5 + last_write_checksum: sha1:a8b6f060509a6b87ed4de6795b418ecc19242d7c + pristine_git_object: c274edbbcae2d719b26fb8fa2019283fb547e26c docs/operations/sendchatcompletionrequestresponse.md: id: 354b29241c52 last_write_checksum: sha1:baf6f1195eeabcb4742fec427127f2c33ffd9b3c pristine_git_object: c4ba8c79c6ba3021472583b922c3ef01c4115bf4 - docs/operations/sendchatcompletionrequestresponsebody.md: - id: f89a67417d77 - last_write_checksum: sha1:18f9b7a258b6cec3ea91def378505c01d63b8abb - pristine_git_object: ff4ce98066d383548220f9dd7a3e127603a1b6b9 docs/operations/typeimageurl.md: id: 433d2dc21947 last_write_checksum: sha1:24b83d5212d95f5e5ee95d1b9e47059613126ea1 @@ -3330,8 +4332,8 @@ trackedFiles: pristine_git_object: 58ac81b1a12447b17d1da21f1b2275b32e2c2ca7 docs/operations/updatekeysdata.md: id: 989d7ddeeb46 - last_write_checksum: sha1:bf9ed436df63ce56f2b3c570f96bed89ebe42400 - pristine_git_object: 499598c65d3218fac3da20e1f6a42e8f6d691c16 + last_write_checksum: sha1:81679927eccfbb9957d4cc3454668f9cc60458dc + pristine_git_object: f1ef38208b77ffa7eabeb448a4d6b7894315dcb0 docs/operations/updatekeysglobals.md: id: fe06e9820a16 last_write_checksum: sha1:bc44e1936abe8d3ce77e223aacb0326143a4a812 @@ -3350,8 +4352,16 @@ trackedFiles: pristine_git_object: a6130fd788229ee52843ebbb537b1a9ef6601278 docs/operations/updatekeysresponse.md: id: 594f08a35b03 - last_write_checksum: sha1:f4a1479f7df16e20dcc7f9259245163c0550d423 - pristine_git_object: c1dde7cca4a08be11d91f1f97bea5d2a08ab5d6e + last_write_checksum: sha1:4590d0a24f313d60e4e7e18688eac54e755151a1 + pristine_git_object: 8b5ef1fca6768575bb49ed510fd83b27c77db805 + docs/operations/updateworkspaceglobals.md: + id: 1f2cac8a13a4 + last_write_checksum: sha1:aeffb26e2ce0ddfe37f1ccee67035ebe9041c673 + pristine_git_object: 5835a41ee1c7a0e557a7282271e8d31230b54e82 + docs/operations/updateworkspacerequest.md: + id: 719c33978f4d + last_write_checksum: sha1:3ea95e60674f4d0380f532123c75579855ac00fe + pristine_git_object: d5bd345f6faefd5e2448b7e6c6c15ae58df7d0d2 docs/operations/usagelimittype.md: id: f83f3fcb36f8 last_write_checksum: sha1:9c272d9908a57fdbd2b376e13c8fd226e7d4ce65 @@ -3362,12 +4372,16 @@ trackedFiles: pristine_git_object: 44f78122819ded7e472e28ebcf37dd8812707097 docs/sdks/apikeys/README.md: id: e2bd25998427 - last_write_checksum: sha1:59291dbba3de15ee545d124fb51232152b2c7e4a - pristine_git_object: 0e6da8598106dcd4130e57ef747c365915ed0c79 + last_write_checksum: sha1:82bec11fedf21eed760739e1adb08fec06239279 + pristine_git_object: 6e72f51df9e9811cee424032f7dba0887e15afec + docs/sdks/byok/README.md: + id: 511ba2ae7a1b + last_write_checksum: sha1:ba71d5df35f021af390f25ce92ccfdd3eecd160e + pristine_git_object: 659509039bd199adf5bc16d9d730edba9812da52 docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:74076b3d74207ac98f47e323bd2badbeeb604e3f - pristine_git_object: 03d623c9d94c1d1c85cfacaa292055df0fa04ca7 + last_write_checksum: sha1:844fd49d48920a685dc80f25db3c7870b89352c5 + pristine_git_object: fee1721e64c733ab587ddefce7d2473e549f86fb docs/sdks/credits/README.md: id: 81608135c0ff last_write_checksum: sha1:abca02bc25760be47f80100a7cce6bb711202aef @@ -3382,12 +4396,12 @@ trackedFiles: pristine_git_object: 2ce96e9a6eedf3a64256cd848615e9c4fd76c0af docs/sdks/generations/README.md: id: a7d12ae95fb1 - last_write_checksum: sha1:5846217fd9616824edcf5f41d6c54bc727f07195 - pristine_git_object: 332b5683cfe8c07ce4cae93b3247cd56f545f535 + last_write_checksum: sha1:70dbb18cfaff95cf5e398fed34ef969a683964d5 + pristine_git_object: 7fd647d02bfd29a3c7a5da0487761e89f308f224 docs/sdks/guardrails/README.md: id: f72b38a5a2a7 - last_write_checksum: sha1:e55d9d4938da4dd306775c589d48e99e7f169870 - pristine_git_object: 7bcdbb6e6baa29cc411a01eb20c3ee63064dc8ea + last_write_checksum: sha1:a7efb43d69a06cfbf2cfc54dcc1ced289e7e1cc4 + pristine_git_object: 280cd5800586aa3155bd2e3298362db395731bf8 docs/sdks/models/README.md: id: b35bdf4bc7ed last_write_checksum: sha1:ac628dd17b528a4772ef0797c4c47906faf8dc40 @@ -3396,6 +4410,10 @@ trackedFiles: id: 80ad2c1a7b62 last_write_checksum: sha1:bec31275e907bdf1f888ad7e2a6af916b84d5103 pristine_git_object: 562e2e83f65a925b834b591ede742db3050d3cce + docs/sdks/observability/README.md: + id: bab967736831 + last_write_checksum: sha1:d6faec0f40d50e4a401e84ddc395aaafc988cbaa + pristine_git_object: d23bac63dc6416dc689063703b966b270a5f926b docs/sdks/organization/README.md: id: 69e4232b8432 last_write_checksum: sha1:3aca4d3971ef8e049ec6c66d4dd160cf110529b1 @@ -3410,24 +4428,40 @@ trackedFiles: pristine_git_object: 3bda1a6f6fccc91a04e52d373727cac8861e1a26 docs/sdks/responses/README.md: id: e717bad14f63 - last_write_checksum: sha1:02f29159f69cbc264437745e1d7cd54ed7e30ced - pristine_git_object: a38d2b1b819d977c739f6a7b6f55344514c5447c + last_write_checksum: sha1:e724fff28e9df03db5738ba62cc88d3fbdb25294 + pristine_git_object: b4bfca34253a3b0141b8f47df74335653a91f6d5 + docs/sdks/stt/README.md: + id: 0806154492f9 + last_write_checksum: sha1:a8b75526dac340b813f687081fab11165dec3d11 + pristine_git_object: 99c5b7996c65d09da7a83c9de11b3e4a98442e71 + docs/sdks/tts/README.md: + id: 0c425074d09f + last_write_checksum: sha1:dc5da92e8d50ff1e5b91bb4571bf900aaf7fc5f5 + pristine_git_object: 1543931c82477df894cca5b2a2e32838bc66bf5d docs/sdks/videogeneration/README.md: id: b6dbf7b0729c - last_write_checksum: sha1:594c4bbe8b2396d28e4a5fe664e21de4d2dc8444 - pristine_git_object: b2f26971f1f28f4614f021ffdb87fe958522d029 + last_write_checksum: sha1:7030c679c78c2ccd41072cbfebf3d293e328a1a0 + pristine_git_object: 32d40ea41f61fbdf542ec9073cb3e9c3295f83eb + docs/sdks/workspaces/README.md: + id: 1f5b051a6380 + last_write_checksum: sha1:b83b2a0c83ea3472aff7ff3573b4cfec737c966e + pristine_git_object: 8b87895fc40d01d8792d98c833cbdfca2ce51ccd py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:fe68c7165977ede3cf438be1344f72e54cf67919 - pristine_git_object: c678027236e18070a0081d37fb78bfd44392a8c0 + last_write_checksum: sha1:62d35f2ecbe840540100da937920ee63980a1e12 + pristine_git_object: 9e4606d0c68e092819b9d86eb23859bd85c5ede7 + scripts/prepare_readme.py: + id: e0c5957a6035 + last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 + pristine_git_object: 03e9f9b59063c73d6f24995a77cdb971f3318d30 scripts/publish.sh: id: fe273b08f514 - last_write_checksum: sha1:adc9b741c12ad1591ab4870eabe20f0d0a86cd1a - pristine_git_object: ef28dc10c60d7d6a4bac0c6a1e9caba36b471861 + last_write_checksum: sha1:b290b25b36dca3d5eb1a2e66a2e1bcf2e7326cf3 + pristine_git_object: c35748f360329c2bc370e9b189f49b1a360b2c48 src/openrouter/__init__.py: id: 4514650f64eb last_write_checksum: sha1:da077c0bdfcef64a4a5aea91a17292f72fa2b088 @@ -3446,16 +4480,16 @@ trackedFiles: pristine_git_object: 07ace03229fd3267623c8f48665d2c3a67c3565d src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:8283c360656da42036d190270a7ad47551bc4317 - pristine_git_object: 4d43d337f71492564f02b651e5bfc78d27932ac5 + last_write_checksum: sha1:dd226a1c87253767a3a41d735f600db8980faa45 + pristine_git_object: fcebde34f88b9450f406b1563d00942dbd6d7b80 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:6d47d1ab3da9cb4ac9f0a2bfe442f1a82a614f35 pristine_git_object: ea004eaf47a1a48622d4a4276fba1e329d5559ab src/openrouter/api_keys.py: id: 876fac88fff6 - last_write_checksum: sha1:749055fb2e5719d1cdc72c4391d83cb498e37080 - pristine_git_object: 923a5f8c432f42427caa517e5fb1fab9b10f029e + last_write_checksum: sha1:4c037d1c4fc922061ca968b9cd961b2db69429f6 + pristine_git_object: e4a30e1b293a197994317a1e2169619fcbd0a0c6 src/openrouter/basesdk.py: id: c5733c5a1e12 last_write_checksum: sha1:71f242fd9955e5a17a8d055e2210cc2708bb94fc @@ -3464,14 +4498,18 @@ trackedFiles: id: fffdf54fd8f5 last_write_checksum: sha1:64e68d68415d70fc30bb8f55491935c1c4bf7214 pristine_git_object: 5e7c70d1f15e0699b4b4099322ef2217f66b4696 + src/openrouter/byok.py: + id: bec352462ae1 + last_write_checksum: sha1:3487021711889437652fd3b217b7f39fc2a1b4b1 + pristine_git_object: 6a1408caa7271bac2d16f5423f209cab3e7b6017 src/openrouter/chat.py: id: 723fdce15c1d - last_write_checksum: sha1:5bce19b139e225e62bb28fd2143bd6fc28b4f9cd - pristine_git_object: bfa078ebbbff63f2c80860abf718fc57abcac2bd + last_write_checksum: sha1:b18ce1e50460f0ada68195744f72e980242ba87e + pristine_git_object: 6a37ab68612da65cc400eb2b9f8dc810ef9edf88 src/openrouter/components/__init__.py: id: 81754e97b3f4 - last_write_checksum: sha1:fba957e705a1e6222a64cdd71111390c6e14826e - pristine_git_object: e41de295792aaaea529e94d6c70c3ee111266202 + last_write_checksum: sha1:8d6005bf2f7dda72ec5ab25d7a89aa5bce5b7233 + pristine_git_object: beefbbb98bf4c7ec9e65a66b2c1364338528a8aa src/openrouter/components/activityitem.py: id: 3bbe7d35f459 last_write_checksum: sha1:32b873ba5c0a9dbf5f0cf32c0217ce17395ae69e @@ -3486,16 +4524,48 @@ trackedFiles: pristine_git_object: 597a5e01e843b06758f9c49b32d5d18d473dd106 src/openrouter/components/anthropiccachecontroldirective.py: id: ffa72802cd82 - last_write_checksum: sha1:526dea61f351102a3b51a90e9979460468f4bce5 - pristine_git_object: 67645f080ac04382b3f363455231d80771894dd3 + last_write_checksum: sha1:d1bb4e32bf3463f8d5c05c2aea74b2acdbf5134f + pristine_git_object: 4b2567b583ce4e52e0607a0fbdb15a1d617df029 src/openrouter/components/anthropiccachecontrolttl.py: id: 2ec3e3546afe last_write_checksum: sha1:338e193bd6929eb6ed69da9bdb4e608e5db6121b pristine_git_object: 05a105c6e4f6c9037f953e4620576a8494645865 + src/openrouter/components/applypatchcallitem.py: + id: 532887f6dcc3 + last_write_checksum: sha1:fd5ee933b7c7ab2160bc5dc95e967a67700201d4 + pristine_git_object: 1a5f1e022b2cfbea90c13746a0bc3dfad1328fa5 + src/openrouter/components/applypatchcalloperation.py: + id: d1e3d8983106 + last_write_checksum: sha1:08d788e20e7407d1ab64da12e305bd725c8e3b6c + pristine_git_object: 8d940a270ff554f6f7e3c678a0e3ceaeda5dbfd9 + src/openrouter/components/applypatchcalloperationdiffdeltaevent.py: + id: 59d7d1eb8040 + last_write_checksum: sha1:6734b7c0e87b123d7b5c3967597967a41b42e54c + pristine_git_object: 830de6c18a699efe6444c95e335881a7b282992e + src/openrouter/components/applypatchcalloperationdiffdoneevent.py: + id: 592026769da7 + last_write_checksum: sha1:708f23eeb58503cc389449b0dd97ac2bf0045435 + pristine_git_object: d03decfa67050aa2d35106caa46d4aadd03728bd + src/openrouter/components/applypatchcalloutputitem.py: + id: b412ea6dde1f + last_write_checksum: sha1:9056677a3c330dfcf563b8689a5ff348fc7c450d + pristine_git_object: 1b768e6e402356ef39d9754a1031bded2d9d6959 + src/openrouter/components/applypatchcallstatus.py: + id: e92aac2d606a + last_write_checksum: sha1:c5cd7c843e94088b14774838c28a96ad291d1de6 + pristine_git_object: ae5ca583f5508384e83feac7e7061718e524403c src/openrouter/components/applypatchservertool.py: id: fb93c63175d6 last_write_checksum: sha1:4e388dc3b303e77308413810a0c090f760debeb2 pristine_git_object: 0be07495eeb9ab2be9421d1a5deda27859865e57 + src/openrouter/components/applypatchservertool_openrouter.py: + id: 60c161a64fd4 + last_write_checksum: sha1:3c406ce2874327a95777f92b53996eba3403cc35 + pristine_git_object: 158c52b8fb174faa5f41a646453d24fdc51f780a + src/openrouter/components/applypatchservertoolconfig.py: + id: 57e332dc2e56 + last_write_checksum: sha1:4c35b8410cf68b3b0d4152d87d88a74730775f43 + pristine_git_object: 9ee0ffd6290978025b59a1b87b895552b4819c87 src/openrouter/components/autorouterplugin.py: id: cf49add5d1ae last_write_checksum: sha1:efd7f350bb1712b793ecb53c64aad26938cf9be5 @@ -3510,12 +4580,20 @@ trackedFiles: pristine_git_object: caaacbde392cefe0e8be9a0991b42fa653909bc2 src/openrouter/components/baseinputs_union.py: id: d85e19ff642b - last_write_checksum: sha1:96fc5c400f324fcc90cdefb7dbcadc3e120a80a7 - pristine_git_object: 7e501214d82701f45cc406ad676c4d690204854e + last_write_checksum: sha1:12249be51b825a297fdd94b2ffd19fcf0d221707 + pristine_git_object: 25128bdb864052bcc6310b50d7dddccaa89a23dc src/openrouter/components/basereasoningconfig.py: id: 8bd09a7e873a last_write_checksum: sha1:c7c812629a7fc46f8064bc874b77424b30df9226 pristine_git_object: 22bd982575db23648faceab9dbedf75fa1f1cb38 + src/openrouter/components/bulkaddworkspacemembersrequest.py: + id: c042d4bce938 + last_write_checksum: sha1:dd5b69cce65985231a77351be04aadeecc85c46c + pristine_git_object: c7927258bba10e237972eb9ba2fdefc51c255c78 + src/openrouter/components/bulkaddworkspacemembersresponse.py: + id: 2b00519587ec + last_write_checksum: sha1:0a06047ed1719ecae11bd563513eb1f4b7527c19 + pristine_git_object: f46030f3a99672a57495047392e286d48cd1d4ad src/openrouter/components/bulkassignkeysrequest.py: id: f801d53f55d5 last_write_checksum: sha1:20f64607c61683eb2438b5b7411643e1340b2db6 @@ -3532,6 +4610,14 @@ trackedFiles: id: 6c7ce2235489 last_write_checksum: sha1:c708637e9d6aaf9eef90747b3da1af97c1b73e92 pristine_git_object: 2435b0dc46cc7e26a961eafde84ca68ad52a0a95 + src/openrouter/components/bulkremoveworkspacemembersrequest.py: + id: b420f0c56b0f + last_write_checksum: sha1:9564d3caa2da67db04624ffa5ada84fcdf31a610 + pristine_git_object: a02c46cd5ea87dc00f6db01f1be72f36b90b05ad + src/openrouter/components/bulkremoveworkspacemembersresponse.py: + id: 5c4c7d603c5a + last_write_checksum: sha1:e64c15f3c75ca08aad6b32a7555ce3812c59a520 + pristine_git_object: 69082ffbbb380c690ca659819bab53869b82f273 src/openrouter/components/bulkunassignkeysrequest.py: id: f7ef88765f9b last_write_checksum: sha1:a46b022e4264377b2d8c137f9d0df34824aa2100 @@ -3548,6 +4634,14 @@ trackedFiles: id: e76005848b0d last_write_checksum: sha1:48f2993ea9d7ff4fb9a0a44053ee1ca2e1b54d3f pristine_git_object: 219148fc990faf0541310cf55cf11ffbcccc2e55 + src/openrouter/components/byokkey.py: + id: 94a3339e7dfc + last_write_checksum: sha1:18628a1bfee383851a284845bd810df629974fc3 + pristine_git_object: 033a6f367e4da3d56835bb0d593042f24bfa0930 + src/openrouter/components/byokproviderslug.py: + id: 6738a8516caf + last_write_checksum: sha1:1c159b178e4c72433834636c99e5f3d9b7dee8f0 + pristine_git_object: 5b24f83804072c94bd230d7b25491ba10e01bbb5 src/openrouter/components/chatassistantimages.py: id: 993f9dcd8575 last_write_checksum: sha1:0b6be31bb9c8b3bc8f2098af5b2bd12b62a710bb @@ -3626,8 +4720,8 @@ trackedFiles: pristine_git_object: 7a6140f2b8afb0cde9b031322a4284c9cbce7e33 src/openrouter/components/chatfunctiontool.py: id: 1fcf92f8a7da - last_write_checksum: sha1:30bcc6404395f55b361c4e73a9f991f383a9b18b - pristine_git_object: b0c0d436e5389ed1f997414145bb00d605489df0 + last_write_checksum: sha1:1cdb5bb801463ed6c42bc59c91ca288a56061002 + pristine_git_object: 90b069fea5bb0c35c4920e60af9541db9ec57d10 src/openrouter/components/chatjsonschemaconfig.py: id: d2278e414fab last_write_checksum: sha1:69efa91d33e4767058c2d377814b820bb5104ab4 @@ -3646,12 +4740,12 @@ trackedFiles: pristine_git_object: 8bbde153b53887e426989fd5b0486b6dc1122810 src/openrouter/components/chatrequest.py: id: 5e39eaefa9cf - last_write_checksum: sha1:33d4df3eb6abbe51b5f825ad878809ae5eb04686 - pristine_git_object: 7559c771fc127e9e112fbf6fbb80ee6a0e4370ee + last_write_checksum: sha1:06663ae0bc5af83ce622abb096093f99df7358c2 + pristine_git_object: 12a7bcdc4303249c6ccac89b6b501af24e651edc src/openrouter/components/chatresult.py: id: 9062fe2935fe - last_write_checksum: sha1:b0a7c4966abc14496a4fbaf9d3cd596c845da797 - pristine_git_object: 35a7ea24902a10fb9daf16e7e56c42cf063c7453 + last_write_checksum: sha1:b44dc25412b1206cc188d9516191a273d0f3e4dc + pristine_git_object: 85bb6c1a31b0f762b4a87928dc67114c954efaed src/openrouter/components/chatsearchmodelsservertool.py: id: e280d3720327 last_write_checksum: sha1:d16ee5aeba32baddf132119bcc46cf390020da63 @@ -3662,12 +4756,16 @@ trackedFiles: pristine_git_object: 9166d93e4c351c7465ba67e2e7f4708038d6ef2b src/openrouter/components/chatstreamchunk.py: id: 16cdd8d4a3d1 - last_write_checksum: sha1:4474a7f0b1e6bee8302231bd5cd6ed295d102a0c - pristine_git_object: 24aa825cd2c2ca95464306d2c73e80378a049ebd + last_write_checksum: sha1:fe5022e99730741f13a46946596fe8221c9ae8e8 + pristine_git_object: 52c37761f777435f6d75e03242f8b9069f08a84f src/openrouter/components/chatstreamdelta.py: id: 7484252729d4 last_write_checksum: sha1:2e1a6408c51e6519337e01c394f4ce7695edf573 pristine_git_object: 8d0c74c413e531eee7b7130e3cc3d9286a262229 + src/openrouter/components/chatstreamingresponse.py: + id: 045cf83786aa + last_write_checksum: sha1:9e087f1821b264bf59828aae7bd7f9c35b838d74 + pristine_git_object: cf5a90d9a20e7221f68d66a3338a9526a0cd06be src/openrouter/components/chatstreamoptions.py: id: 85e752c7d55e last_write_checksum: sha1:9e989c9b9282d3a014d3933e6d2227ca242ae1f6 @@ -3702,16 +4800,16 @@ trackedFiles: pristine_git_object: 2ccba8386486b7a730816a9829b01754935a2e96 src/openrouter/components/chatusage.py: id: f224a054bf45 - last_write_checksum: sha1:441960796299d49d6b7632d0b823250e08bbfccd - pristine_git_object: 12b58ec62abb59b19530dc22f55065a5909aa08a + last_write_checksum: sha1:947079d2163225a49e423151de25dc6132df5bf6 + pristine_git_object: 3a7357d8a6f725ba18b1f15215a197f11e917659 src/openrouter/components/chatusermessage.py: id: 7777191e729a last_write_checksum: sha1:1ecc9101c05178427d73e455de4d679ac8d78015 pristine_git_object: 9092aa329bdd58891c2c6f92a6d9c4228b37400c src/openrouter/components/chatwebsearchshorthand.py: id: 13091b97a3f6 - last_write_checksum: sha1:0b1c948199169dd81947509f41128c5df6d74e05 - pristine_git_object: 707f0cf6b3b874838ea24df2364ec8cc913df244 + last_write_checksum: sha1:9707e77ee5bdc70fa2d9a9bc195cdd9183100551 + pristine_git_object: 2f8dec538de5b4607d6675c969a26da76085c591 src/openrouter/components/codeinterpreterservertool.py: id: a72c520afbf9 last_write_checksum: sha1:f6123d9808c530e0b042e0a30fbb1a11a82096e6 @@ -3720,6 +4818,10 @@ trackedFiles: id: 74a77b6a8b21 last_write_checksum: sha1:135cdc82ad9f65401da11274c786e471888e27e7 pristine_git_object: ea86f79f7e10d7584621fb804ac56e7bb79578ba + src/openrouter/components/compactionitem.py: + id: f1535c3a68c3 + last_write_checksum: sha1:b4922929d7588f19227f70092050063111a6cef9 + pristine_git_object: eb9ac6983a6423622c1f8f027b6e9a898c0374ec src/openrouter/components/compoundfilter.py: id: 0cab72c7a3bc last_write_checksum: sha1:8ff3005f188637f3a82bfb4c842ac1eed8fdb8e1 @@ -3732,6 +4834,26 @@ trackedFiles: id: 212cdf3bcdda last_write_checksum: sha1:ee91dc17cf80f2aa72eb976fdf60ad4c094ca45b pristine_git_object: fdbfb1678062f33794f10f032a13f127c35a7db7 + src/openrouter/components/contentfilteraction.py: + id: 55792ae75016 + last_write_checksum: sha1:450250c8a4cf3f24f3a6c2208a7d8be348b54b37 + pristine_git_object: 55c559ec7a453e6aefa58dcb43738b7577ea79ae + src/openrouter/components/contentfilterbuiltinaction.py: + id: a7fbc29e9e94 + last_write_checksum: sha1:da020541530a08c0e94babe42c024d53fac8e8c2 + pristine_git_object: d5ba92a250e53b44240e5dedb4473cbabafd65ad + src/openrouter/components/contentfilterbuiltinentry.py: + id: 8506c7d8aca9 + last_write_checksum: sha1:76292695a607b71154cfe859ad01ad4959e4540b + pristine_git_object: 57eada206839f285ad5f0b0e04126a46fa6f898e + src/openrouter/components/contentfilterbuiltinslug.py: + id: f222de10f841 + last_write_checksum: sha1:130e56231d8a3a4fd16516bf7734097471118b66 + pristine_git_object: bbc07e6bf29faada2c71a0fd44fdaf3286b94f4b + src/openrouter/components/contentfilterentry.py: + id: 149ebe184f88 + last_write_checksum: sha1:4e40edff6184741aeeb1f2c7416e9fbb451fc1c3 + pristine_git_object: 856522d0916c23cb1d2f6573a417958f15e34bcd src/openrouter/components/contentpartaddedevent.py: id: a074d4f3e193 last_write_checksum: sha1:016196b914b861c920e8cea01b04207bddd5e286 @@ -3744,6 +4866,18 @@ trackedFiles: id: d6af351c330e last_write_checksum: sha1:22c7d09037d2aca7022a4e1e507d44d2eb051a89 pristine_git_object: baee3cb60f9359158c57a53c75d1702cdeed6c2b + src/openrouter/components/contentpartinputaudio.py: + id: 7de203e77aaa + last_write_checksum: sha1:ad4a82c3884394a03affb2b22ef313cae31c5419 + pristine_git_object: 99da9ad9b37d21f74f95d15dd360434de35f5bc0 + src/openrouter/components/contentpartinputfile.py: + id: 1eecb9639c8f + last_write_checksum: sha1:7b327b1868bf8b215912cdfa55ff39c73cbae506 + pristine_git_object: 1adf8a7bcb92f6760994c01268fc531fa5ae3986 + src/openrouter/components/contentpartinputvideo.py: + id: 8f56736104b9 + last_write_checksum: sha1:bf02984892ff6eb8baef8f63d317d4cb18c829a9 + pristine_git_object: 6c6f819b7bd957c3cfcfcce5ee7cba97d05c42fb src/openrouter/components/contextcompressionengine.py: id: a3965275d07f last_write_checksum: sha1:8aeacab427a9277db44ef731fd7a38a58752a64f @@ -3752,18 +4886,46 @@ trackedFiles: id: 0262a4f96713 last_write_checksum: sha1:288a9cf2f3b3a0d90a71ac60f4c4a6f03f6f2444 pristine_git_object: 22758a015ceb978263246b58da19d382ae38938e + src/openrouter/components/costdetails.py: + id: 513b4309de6e + last_write_checksum: sha1:10436fdda1161f93c711bc0e758d9bb029a36ace + pristine_git_object: 7880cdc0b0ce6f4629616820c1e10997a7ce3468 src/openrouter/components/createguardrailrequest.py: id: 34d69149fb33 - last_write_checksum: sha1:8ee78165a84f16ed848fc6ce3ac7898df7d1a60c - pristine_git_object: c6dd6d6088287c6f1cf8adc4841ba5756e59031e + last_write_checksum: sha1:15e66d67986a7a2471e23ba5ff3754003293b00a + pristine_git_object: 36caca70e2434132143b97e2fbfdc96b7ca9f508 src/openrouter/components/createguardrailresponse.py: id: b4e1bdf1de5b last_write_checksum: sha1:ae20a5e7425510c240e5697d847b1cae65940bd6 pristine_git_object: d6c4a4dc73222668daddc2a1788d314ff30e8fe6 + src/openrouter/components/createworkspacerequest.py: + id: 3785d9b207c2 + last_write_checksum: sha1:49ef014d2611e4c399c28d05763f5e1ad076b25b + pristine_git_object: e068f80885a98542edd9fef71c90ddc1647bf8e3 + src/openrouter/components/createworkspaceresponse.py: + id: 986d9ff993c1 + last_write_checksum: sha1:7e9028b437a9e33a7541ba222cf01e6629f5c74d + pristine_git_object: 54c7b43902b4c72a43cf4ea1fa965edbdecb5304 src/openrouter/components/customtool.py: id: e83b0c530680 last_write_checksum: sha1:4ac260beeb9cb5b2bd21156d23315263ebe7f891 pristine_git_object: 128bede72e4efe343a109ae6f37dbd646a3fe20e + src/openrouter/components/customtoolcallinputdeltaevent.py: + id: ee80a0e981a3 + last_write_checksum: sha1:784ec213ebcf9a386aa3f0528602089181a5baa2 + pristine_git_object: bb8eacdd973b461a678907f617388f07865963ce + src/openrouter/components/customtoolcallinputdoneevent.py: + id: d095aa6434df + last_write_checksum: sha1:77ec279805273d75c8ff3144e7fbbbfb10c5c095 + pristine_git_object: 308a29665db6048780b3d9d3dad551110e002cfe + src/openrouter/components/customtoolcallitem.py: + id: 232ac63226eb + last_write_checksum: sha1:a1ec646d50681fa4106fb0ee63d2b4fc2f4084e8 + pristine_git_object: 486f76dc6d1207486f815919e9bb18354f418297 + src/openrouter/components/customtoolcalloutputitem.py: + id: 533940b12cd2 + last_write_checksum: sha1:39bca83451924d534588bd03f4398f45f4c1ebd6 + pristine_git_object: dd9af834667c765e2a39f04da11c1bf17005482c src/openrouter/components/datetimeservertool.py: id: 444350bd66f4 last_write_checksum: sha1:ce9c7aba930c6a8764ca762052912d6533ccf53a @@ -3780,14 +4942,26 @@ trackedFiles: id: c3ac908331ef last_write_checksum: sha1:8984f78ae6a2b3ee8b16d7f0018622ba725c1583 pristine_git_object: f31843cfe4e36f3f6371837221b6966fabaa563a + src/openrouter/components/deleteworkspaceresponse.py: + id: 5e45e8064f69 + last_write_checksum: sha1:4e326914693c0d0caf901651cf214f73df624f64 + pristine_git_object: bed459583970617979bb6aec394bfeb161274514 src/openrouter/components/easyinputmessage.py: id: 72619a312585 - last_write_checksum: sha1:154ba5f3afee09526acdc5d6291584e01c54f6ed - pristine_git_object: 75661670388ead48bc50e34948fbebdf8caa5f66 + last_write_checksum: sha1:e7e7a9c76990db02b3e5d8497a6bc8c599d564f0 + pristine_git_object: 7c35393b5d3ba493c7609eadbf1e7fedee6d8dc0 src/openrouter/components/edgenetworktimeoutresponseerrordata.py: id: dc53aae5b171 last_write_checksum: sha1:5f40d76eafb399dfee5f6e5a8cc6eb94ecf3ff8b pristine_git_object: b44fcaf3b15716035fc7bb13cac592f120e7afbf + src/openrouter/components/endpointinfo.py: + id: ce049670b5ae + last_write_checksum: sha1:914f173c73fe1035e56c9acf4ad9e23555bde95a + pristine_git_object: cac5d921655b370dfe940c0b5b893b5c07dc85ad + src/openrouter/components/endpointsmetadata.py: + id: a20b9ec1fb0a + last_write_checksum: sha1:15cd0294a8ee21a2dd415d556f3f1368fd1a9d6d + pristine_git_object: 52344436b1159f808478572a2ed6c90c24a1384f src/openrouter/components/endpointstatus.py: id: e935c578fce8 last_write_checksum: sha1:8a9c8184852faf1e3ca9a478e48df41ccac6fc33 @@ -3810,8 +4984,8 @@ trackedFiles: pristine_git_object: fc29881e08f5804dd5ba0ab66572d6c74f83e0c4 src/openrouter/components/filesearchservertool.py: id: 8ecc4d4a0ddd - last_write_checksum: sha1:e8e50b2359f7c8e18f8a015720cb230cbffc9912 - pristine_git_object: 54e3cfb48db5ef4bc60aa64ba46837596c388316 + last_write_checksum: sha1:59cdd1d8a27a94f52302d611952e2258957802d4 + pristine_git_object: 974ee97d94c9bed742537fdaae159554e752202f src/openrouter/components/forbiddenresponseerrordata.py: id: 93ae47a0c337 last_write_checksum: sha1:dffd1d7517d9ad6ce139089de52a0308c2b234ec @@ -3846,20 +5020,56 @@ trackedFiles: pristine_git_object: 613c2bbaec296ed9b0da13f249ef96b9314ff9ed src/openrouter/components/functioncallitem.py: id: 5e69afffd660 - last_write_checksum: sha1:43301cbce07f88805e03ac0a1e1c236a382cd4d4 - pristine_git_object: 5f04a0596dc5e071e601336c6f710e6d47d1e296 + last_write_checksum: sha1:0517e6c41fd95ca5252e59e0e618b96581ae3fcd + pristine_git_object: 82a1e6393654f4c9ff71ff2a9226f65898e365f4 src/openrouter/components/functioncalloutputitem.py: id: bf659aa04e7d - last_write_checksum: sha1:0beae7f5475531ffd58d6b8bcceb5e9ea987387f - pristine_git_object: 239f67dc3d0b8bd82e81c1f510afb7df96397401 + last_write_checksum: sha1:cdd0463bb7c3ec8a05c9b0d216d8b64f9f5b8e45 + pristine_git_object: e38d12f79e06b62d2edf886263ce96eedb5904c9 + src/openrouter/components/fusionplugin.py: + id: c0b307f15bb0 + last_write_checksum: sha1:8b2431d61df170bd2b2c666121dbe54af5bd15b6 + pristine_git_object: 3cc9d74196490315c4a2dcf839e586053799f962 + src/openrouter/components/fusionservertool_openrouter.py: + id: a1d6d3aefe6f + last_write_checksum: sha1:db6085cf3a96f2ff93707bd0209f59cfe153f467 + pristine_git_object: 5729ea0c31a0ce7283a77316282ea77c91f13ae3 + src/openrouter/components/fusionservertoolconfig.py: + id: 0d1d229c531f + last_write_checksum: sha1:ce194c4311e48d06ab37986e25d0d8212f3ea37c + pristine_git_object: aea5920cfb91d25585364c44b5489cf54553ed1e + src/openrouter/components/generationcontentdata.py: + id: 0140215b5b46 + last_write_checksum: sha1:09e15ae2acc4f44084e2206ea51e6a06f4c5ee11 + pristine_git_object: 065679a3408bbfd07e86646a6b3aa135cd573973 + src/openrouter/components/generationcontentresponse.py: + id: c3f3f745a193 + last_write_checksum: sha1:0a87a329f4b565c773d730ddc74595c6a0d64ddc + pristine_git_object: b762f6507fe7c7456df88a9400f82587fd6d63c9 + src/openrouter/components/generationresponse.py: + id: 84d4e3e7da8b + last_write_checksum: sha1:dde2c2b760dc39136db768fc66e02d0c7b436103 + pristine_git_object: 99a84fb233d965ea2523620da8daf1447945d683 + src/openrouter/components/getbyokkeyresponse.py: + id: ca3a8db80018 + last_write_checksum: sha1:9b428028a01ffb73915a278096ca51bd1c660326 + pristine_git_object: a9f599456987f4c9dc84c36c9f7ba11d20b5ec0d src/openrouter/components/getguardrailresponse.py: id: 6f9054fab3d9 last_write_checksum: sha1:f20a0be686991d8f7ed0eb884612586052efc5c1 pristine_git_object: 6cdeb99e76ab6ad2e22b13164efbdb68cf8f328d + src/openrouter/components/getobservabilitydestinationresponse.py: + id: 45d85dd019ab + last_write_checksum: sha1:8219d5c3d0794996e29a82b1320d1cd7a1ad7395 + pristine_git_object: 8cab91d07480938a14c4e8fe3e47cb54b891243c + src/openrouter/components/getworkspaceresponse.py: + id: d993d0c4c3da + last_write_checksum: sha1:918535730d1c352bcc8fd2342e1c4cea89bc357f + pristine_git_object: acda534cb0ced2a391479b720434cf0f57f46276 src/openrouter/components/guardrail.py: id: 67ee78dd06e6 - last_write_checksum: sha1:51ab908cd40c1dad9c499c4dec4ebb29ecd94b87 - pristine_git_object: afc25c729b3d7583ea116b1fbdb0e0e3e06aac3a + last_write_checksum: sha1:0ee86031c907b1fda6e8f6fc2f80d76db2534289 + pristine_git_object: ec0d13984df644fea39ef2e985116627aa2e7291 src/openrouter/components/guardrailinterval.py: id: 01687fc135ab last_write_checksum: sha1:430f886f371b85777346de663202d62708cd84cf @@ -3894,8 +5104,8 @@ trackedFiles: pristine_git_object: c9609dbda39bbc43666c9625cf58baf469a6160c src/openrouter/components/imagegenerationservertoolconfig.py: id: 76f45207c1be - last_write_checksum: sha1:8d092f865ab995390b0370627657a8689c6a36aa - pristine_git_object: 7b7010abb24612645e134c7052a9475ca327b2d5 + last_write_checksum: sha1:065e1ab5d5e29f01bc86428ecb438ad9f7f9dc7b + pristine_git_object: 0fdc8f67a8af50e789e2ae73d647d9ba43b703b2 src/openrouter/components/imagegenerationservertoolconfig_union.py: id: d1c630a1476a last_write_checksum: sha1:50d45b5a787e8cc9024c05b31e4113993ffe4038 @@ -3918,20 +5128,20 @@ trackedFiles: pristine_git_object: 7a6dacdccea14227eed247b8c2442a79578608e1 src/openrouter/components/inputimage.py: id: 995d068f1073 - last_write_checksum: sha1:1922908de3eb591081acf99d2a34b1659ee54c69 - pristine_git_object: 279f76bb22e6b123d6ba49447c5a5098871fb9f3 + last_write_checksum: sha1:4fa2c93999bf024faa82d33f8f36856158cccf93 + pristine_git_object: c249efe66d797aac2bff3331387041b07f1edcac src/openrouter/components/inputmessageitem.py: id: 6c5260d62714 - last_write_checksum: sha1:79ef4e787e82e9839cb1523d5d8e34ff2afad5bd - pristine_git_object: 9ee8aab8f11a526af00d93d20b69ffb7cd04f6a7 + last_write_checksum: sha1:45ebf10667c10fe5818c5a7c0fd065eb6b0cd21e + pristine_git_object: 399b1b01242b3e262b7b6b7bdfb6bc401a3f7f49 src/openrouter/components/inputmodality.py: id: ffa999fb401a last_write_checksum: sha1:da607c1deed71fcc11d880b7cebe92471e2ec5d4 pristine_git_object: 3b0c560bc9298bd40e2cdf1933ed0d5b98bb919b src/openrouter/components/inputs_union.py: id: 17d6239cb6a7 - last_write_checksum: sha1:6b4ed04db14f3afdc0d62b9cc36da363101c4f8e - pristine_git_object: 723f035840411ada143c5a48fa8372a9bb098d24 + last_write_checksum: sha1:4ab85465550205ff47b4dae5e18edcdc622c68ba + pristine_git_object: 152d21e71bc02e0ed2fe0aa8e81ae7b6a59ab5f6 src/openrouter/components/inputtext.py: id: a995ae96be99 last_write_checksum: sha1:0e30dbfa1813d3e69e0ccd2511f50080cce0fb6e @@ -3948,6 +5158,10 @@ trackedFiles: id: 91397805fa13 last_write_checksum: sha1:cb5655008ac7209608b832f0d28de8c21a0831c5 pristine_git_object: 499f4923723d9e027cfc90e8481de44a123134b0 + src/openrouter/components/itemreferenceitem.py: + id: d3c42b5f11fb + last_write_checksum: sha1:25fd74f1c34307a97931e1d2c138a1db347218ad + pristine_git_object: b5a0bc16faa52f26d293eea18183e4d0b0bbb901 src/openrouter/components/keyassignment.py: id: 07a64362e7fd last_write_checksum: sha1:769458eeb21e1b275a63ba7bdf70a60fe9506a8f @@ -3960,6 +5174,10 @@ trackedFiles: id: 8b28b05b8756 last_write_checksum: sha1:2a917ce617b652fa9bc490d8f74e661480ff4f81 pristine_git_object: 3b584a93c2329f2ff1c4b24a57abe0d238e35fcb + src/openrouter/components/listbyokkeysresponse.py: + id: d5f63cba5dd9 + last_write_checksum: sha1:97cd54e94ba4996ebb43252ac31aa70511e0328c + pristine_git_object: 3cbde84c8d3cc12e69b9788bd365dc39f9fa27b8 src/openrouter/components/listendpointsresponse.py: id: 7662d5774bdb last_write_checksum: sha1:47bb7a70d674ab63a157333c6c11cd36f1f41a6c @@ -3976,6 +5194,38 @@ trackedFiles: id: 78ca80afcc6f last_write_checksum: sha1:3edda0c8ff111abaf5332475d89a87e84f4f5d78 pristine_git_object: 1497ba3814f2f058c1332d8bcf92a2e2bbed0fe5 + src/openrouter/components/listobservabilitydestinationsresponse.py: + id: 3752b99f5e22 + last_write_checksum: sha1:34fd7efbbf22fb9004737ab0fea34881b4cce554 + pristine_git_object: 181236d7dc0ba7e4fe8acc6aa722efafb8896262 + src/openrouter/components/listworkspacesresponse.py: + id: 0c5f98eddbf5 + last_write_checksum: sha1:53b10630a44ccc43fa86a34e9a3f5a64f08488c4 + pristine_git_object: b70d4bbc7e84bc0f9ae3beedb8784bbc46aae9c0 + src/openrouter/components/localshellcallitem.py: + id: 0b6a39ef0319 + last_write_checksum: sha1:1f597aa2fc434cfef556f8c5f07f9402c1c99c2b + pristine_git_object: 00560d64813819940abefe8bf2ef88fd2ff6f5d3 + src/openrouter/components/localshellcalloutputitem.py: + id: 762eac87313a + last_write_checksum: sha1:e77e55b6ba383571090b89807c486a2442470cf2 + pristine_git_object: c1fc1796eb8097b9a73a50f8927b7b5290e04f8b + src/openrouter/components/mcpapprovalrequestitem.py: + id: 30c0962de16a + last_write_checksum: sha1:d823d5a2d589949bc94d4f76dde21f8654695272 + pristine_git_object: 3c56ace657bb934609744a7055f0ed0e3b3f5431 + src/openrouter/components/mcpapprovalresponseitem.py: + id: b39dfe6b18a0 + last_write_checksum: sha1:ffcbf766b3d7997fac0755aa4c0092d8622512ef + pristine_git_object: 3231df92cdf6fc65cda2ad77243e0332aa504916 + src/openrouter/components/mcpcallitem.py: + id: e56a30943ca4 + last_write_checksum: sha1:b3105515c3f44e0c6a8e503cc1004235bcf334d6 + pristine_git_object: d593dd4020308ddd8b4191cf3afc2ae6163d0820 + src/openrouter/components/mcplisttoolsitem.py: + id: f2dd3ab36ae6 + last_write_checksum: sha1:c5e513e2923b074ddf393946b831e7037ac1cbb6 + pristine_git_object: 305621bddb2ea4f663b694d17be70b6f99d38b50 src/openrouter/components/mcpservertool.py: id: bb8aeb03a111 last_write_checksum: sha1:014b01dd6253437640d2b3fbd084cfddb2399073 @@ -3984,10 +5234,14 @@ trackedFiles: id: c11eba01a3db last_write_checksum: sha1:db9d3c5dcd61a231f7c93bc92a5adce4a4811ad6 pristine_git_object: bf257605d2a5dc41234cb9fcfdda939948b26388 + src/openrouter/components/metadatalevel.py: + id: 0eede47eef62 + last_write_checksum: sha1:b4e7e6fc4e9016b65008e9ebbfcc6f018fe89ced + pristine_git_object: 1257b38d2001f34078cd1b052c20264e81a95e57 src/openrouter/components/model.py: id: cef3adaa772b - last_write_checksum: sha1:32480e573bb64c06f1cae9845ca6269b8d5ef926 - pristine_git_object: 14dc4b9b71d0dcfc4d55ab086f5a90bf8325c159 + last_write_checksum: sha1:091b93cae931939e83e2fdcbf86f72ff36e9344a + pristine_git_object: 53fc43004c15681897f637536c1f8a023bee953c src/openrouter/components/modelarchitecture.py: id: b37ac27e512b last_write_checksum: sha1:e1dd41aa140b2ca2c3bbf15abf74e034d42b0166 @@ -4002,8 +5256,8 @@ trackedFiles: pristine_git_object: c197cb2c527296adff2c3cfd9e49bcbc48087ce7 src/openrouter/components/modelscountresponse.py: id: c08f960ac611 - last_write_checksum: sha1:e53d3191d1edd6e289a90fe22c69ab1f02ec73ed - pristine_git_object: 86bb27c9ce62c148a54ec7a61796154a2ca18c76 + last_write_checksum: sha1:82669f5aa9379f6c90393ea0b78f2bafdce545df + pristine_git_object: 8d68ee4aa093ba2754a65f28e46a23a1848fd99b src/openrouter/components/modelslistresponse.py: id: c2d4bb2cac89 last_write_checksum: sha1:54bc618bea7ddcaa4e49082d601065c634fb2ea1 @@ -4012,14 +5266,102 @@ trackedFiles: id: d99bd9d505d3 last_write_checksum: sha1:58ff3e6829b973b3db5ed7dda3fa11558ded04b2 pristine_git_object: c2db9e78ad403cc9c27269d0be222ec85706446d + src/openrouter/components/multimodalmedia.py: + id: 0a12ae380c2d + last_write_checksum: sha1:2e35b4bec2402b723fd8deef7e2029917d7f2e6c + pristine_git_object: 2cd306cd65f9caf6333e7b1cc3e49ee33d250d21 src/openrouter/components/notfoundresponseerrordata.py: id: 6ebceef7a039 last_write_checksum: sha1:b57cbe36f5a56241d3736f59a6a10f974751feb4 pristine_git_object: 5b8ca0ce252ca2fc909770c5c338793b05877a91 + src/openrouter/components/observabilityarizedestination.py: + id: 8926882c1d18 + last_write_checksum: sha1:14994594002c8da70a4d52bdf30a221401043556 + pristine_git_object: abc4aebffe1bf28623d6e0ffefcebef9e606cc47 + src/openrouter/components/observabilitybraintrustdestination.py: + id: 432de20d1c77 + last_write_checksum: sha1:e802d3be6238fc9ee3089c71fdca002c77e9ae37 + pristine_git_object: 133c7894f1107100975f65557e876253d0e23dd2 + src/openrouter/components/observabilityclickhousedestination.py: + id: 0bafb43cfee3 + last_write_checksum: sha1:9559629c08950c4bef54b2d4c827e416b3065400 + pristine_git_object: b3ae76d0d3ddce8fae18a4e1f1dd5a4244fcb3e4 + src/openrouter/components/observabilitydatadogdestination.py: + id: 2b99c86aa089 + last_write_checksum: sha1:1dc57d3904d96830326d1726755489a6badc70ce + pristine_git_object: 293de2b6baba617e563ccdb01aff1b8496fddde1 + src/openrouter/components/observabilitydestination.py: + id: f02862444a3d + last_write_checksum: sha1:5dfc984fe4fe009ecf28a8cb83f9ddbbd9e71976 + pristine_git_object: 340a94c501d3d3ad11f20cf4e8865af49a059668 + src/openrouter/components/observabilityfilterrulesconfig.py: + id: 98476c1c326b + last_write_checksum: sha1:3e7a055391b5f2f279bd63fcc1fcb9c2758a620a + pristine_git_object: 25fc9cf1ba263cb0b3a2a6052053f1b36d0a8722 + src/openrouter/components/observabilitygrafanadestination.py: + id: 36c8f26bcf6f + last_write_checksum: sha1:3fb94ec15789ef182100e940226a6c416941ec05 + pristine_git_object: 3311adc0f434860012d1b083d86a9a74d53d0e34 + src/openrouter/components/observabilitylangfusedestination.py: + id: 46cb7e3719a7 + last_write_checksum: sha1:c69ae8dda2377a5c9a7faf8c2cd1e1c40a73c1fe + pristine_git_object: 862fbd18323b12eb73beeb5502c510ee9fc13693 + src/openrouter/components/observabilitylangsmithdestination.py: + id: 90dfe215aead + last_write_checksum: sha1:c6281e3700108080660060c724e4c034344da0f0 + pristine_git_object: 7b7a9a8839a784b9e67c0edd16590305da2acc7f + src/openrouter/components/observabilitynewrelicdestination.py: + id: 6294b06c08ec + last_write_checksum: sha1:62f25a203aad0b38b5134013b2fbd0d52e2edb24 + pristine_git_object: 44bc782bda4d6c5d57017cdec1da9ef1a3b03c3c + src/openrouter/components/observabilityopikdestination.py: + id: 404c6ff48b85 + last_write_checksum: sha1:3693adecc2cfe633640bbd03b775cdb63578784b + pristine_git_object: 69beb9d640b0cc5acb88e0d3463d4d2d782a0fe7 + src/openrouter/components/observabilityotelcollectordestination.py: + id: dc77f211456a + last_write_checksum: sha1:4173d2b4c4eb3562906224b157b48498b1d4ad7b + pristine_git_object: 74e199715ef42f310ff76946679ea0d57b0bd980 + src/openrouter/components/observabilityposthogdestination.py: + id: 3a9f4942fcf9 + last_write_checksum: sha1:640d5cef3301a6624bade3a3a78e92bbb13f1826 + pristine_git_object: 96cdf300dec5a10435dbeffcf60ac26a5f0a09c7 + src/openrouter/components/observabilityrampdestination.py: + id: 8559b9e7501b + last_write_checksum: sha1:942b85f8e683364719b5c354752c5a92c58c396f + pristine_git_object: e6f42b3e7d40e8ce8d8653a2ff906b851b17f4d2 + src/openrouter/components/observabilitys3destination.py: + id: 2022d25fe7d6 + last_write_checksum: sha1:7f740c0ffdb71ee25659981e4c43a1cef73ac2a9 + pristine_git_object: e21037f370734afdf0387022664d5e13e75e8e6c + src/openrouter/components/observabilitysentrydestination.py: + id: d27b8b37d1f8 + last_write_checksum: sha1:297b38943c72d0c381d1eecce513947bd4549783 + pristine_git_object: a0db130a91f8362b2ae956634dc2c848fbe09433 + src/openrouter/components/observabilitysnowflakedestination.py: + id: 4e4136c11a0f + last_write_checksum: sha1:086ba386310d6ea38992bf2de6fefa72ef226242 + pristine_git_object: 0e366246af22f282a23665b2af8f794afe0af9f1 + src/openrouter/components/observabilityweavedestination.py: + id: 6ee5e9677e6c + last_write_checksum: sha1:82afa328aade31e990b30be7ca60d4c9af70a59a + pristine_git_object: b1f48cd5aea7e299d1a230ee951bad6a298a45c8 + src/openrouter/components/observabilitywebhookdestination.py: + id: 2f942be86581 + last_write_checksum: sha1:0f30e8dfa9fe791e905694fa4a6f0d79e1c3f9d2 + pristine_git_object: c31fe807a6d3e6b77a37d16c8895d87d338f0603 + src/openrouter/components/openairesponsecustomtoolcall.py: + id: b1a8a20b6710 + last_write_checksum: sha1:3f2a04c33ec98b85b78daf38019ad29e77556b6f + pristine_git_object: a7c4d28268ea6f20aba851547de1ba49bc525296 + src/openrouter/components/openairesponsecustomtoolcalloutput.py: + id: 54a2863b76bd + last_write_checksum: sha1:eecd71438611310be3df2938cae7ad164a144b4f + pristine_git_object: 1fdfc5564527f668aaef926ea22784195be86660 src/openrouter/components/openairesponsefunctiontoolcall.py: id: f201e89f8dcb - last_write_checksum: sha1:502991b4294892f58dfbaf0f8dc4c8ffdcb08b6c - pristine_git_object: f3a4cf75215d3ccad2be058f8423e8254d758551 + last_write_checksum: sha1:288f5a70d1b7227946d18e12e106445dec191965 + pristine_git_object: 2c0fa25be233851bcacb262a2a448320c95b595f src/openrouter/components/openairesponsefunctiontoolcalloutput.py: id: 1440f5810305 last_write_checksum: sha1:d24140b6566a04d5962fa967d28575c828502bf9 @@ -4042,8 +5384,8 @@ trackedFiles: pristine_git_object: cd39badb7af07d0bb5390e687427aebd6230ea76 src/openrouter/components/openairesponsestoolchoice_union.py: id: 1a0b229049a2 - last_write_checksum: sha1:1912fd554d0659742cdb7a30d381de1f97457ea5 - pristine_git_object: cca8c5f26eb9e616a5916a04f277f0d64a414ca7 + last_write_checksum: sha1:d80c2658f7dc564795cabb57f3970c4a3af38689 + pristine_git_object: edcd5ae548f85ba1be805bf6a6fb798baeb0dd29 src/openrouter/components/openairesponsestruncation.py: id: 0c92464e7292 last_write_checksum: sha1:5df4098cf0472d2df40fdcc1350f81d6059a9ab7 @@ -4058,16 +5400,24 @@ trackedFiles: pristine_git_object: 08d990d8cc07b7928158fc55784cd9d613f4c58b src/openrouter/components/openresponsesresult.py: id: 78f7e33b19e6 - last_write_checksum: sha1:8dd339b5021699b49dbfcff86e388947f61d5747 - pristine_git_object: fa04955d5675d8aef3ff3deaeb6560c7a0070f4f + last_write_checksum: sha1:20511d969d1679022d2bf3fd92584c613c2d5b63 + pristine_git_object: 60eaf9f1e8860d8b064a58f9cb4dd2c27fcd061d + src/openrouter/components/openroutermetadata.py: + id: 87062f38be59 + last_write_checksum: sha1:5f69423c82ec021b04be5d518f2b75acf671dba8 + pristine_git_object: bc1d7f3bc726cfe0451e543ce7d8adde0d0cf305 src/openrouter/components/openrouterwebsearchservertool.py: id: f5400a5de3cd last_write_checksum: sha1:e1cd10158e15f88d5c2903b1508a42d4006f4f3f pristine_git_object: 0f83d4405d1f2f7892dea255eac01aa34bd8ee2c + src/openrouter/components/outputapplypatchcallitem.py: + id: a755b7e7b924 + last_write_checksum: sha1:85ee2ac5528e9a5799f76b77038b582266278845 + pristine_git_object: 14c02013831202f1de640a03d98c0203efb7e62f src/openrouter/components/outputapplypatchservertoolitem.py: id: e38119e7e094 - last_write_checksum: sha1:7193cc63977b00836e70456e630e608563a2e233 - pristine_git_object: 5b2be1e4d805e992dd139ca6a37c0998dce05922 + last_write_checksum: sha1:3f5d04634c8ea8f2877e8116c6b76a94be2dc695 + pristine_git_object: 96d4daccc1132eab3f6157549b853766303e7dba src/openrouter/components/outputbashservertoolitem.py: id: 39d03767e214 last_write_checksum: sha1:1f60c9358728a826bba8a6226f11deba788120d8 @@ -4088,6 +5438,10 @@ trackedFiles: id: b6b688951964 last_write_checksum: sha1:6277e30250e00908ebdf47710d20b9d7bf54e684 pristine_git_object: 6d1009d4e2ce8adda879e3ba997ace6a25ece010 + src/openrouter/components/outputcustomtoolcallitem.py: + id: a5deb8d3fe6a + last_write_checksum: sha1:1ecf1244f7a1b542b3af8be19abb8259a295e952 + pristine_git_object: 5c3049d831dc561e2456a4b43269cdcee98fca1e src/openrouter/components/outputdatetimeitem.py: id: d7784d04fba3 last_write_checksum: sha1:95710e9c510d4b205ae5c52e512377a999c5c1ce @@ -4102,24 +5456,28 @@ trackedFiles: pristine_git_object: 1916f7da478607126180a8d7e25dcc56cd36c93f src/openrouter/components/outputfunctioncallitem.py: id: 516ed67b5406 - last_write_checksum: sha1:71708bac0660918fb3b71100435b232e0f9ad2e4 - pristine_git_object: 9df0afe02e5cd6b96e09933031df1d0a86906458 + last_write_checksum: sha1:95288879078c977eb5cd2e63218ebffbc666ad22 + pristine_git_object: dcfc7a806fbf5794ad168bca00344b005e0d16ee + src/openrouter/components/outputfusionservertoolitem.py: + id: 1d798a2bb7ae + last_write_checksum: sha1:cf7f3eb9908d83756ab438dfb78856750aefc112 + pristine_git_object: a8b22b61138e1d4a57bc7b474da31a776f30fbda src/openrouter/components/outputimagegenerationcallitem.py: id: 48d20dc00e1c last_write_checksum: sha1:6795b316ac97958ba4381cdd4d6cc6108d7bd1a5 pristine_git_object: abaaa53610171f25ed9d814f355f9a600101b254 src/openrouter/components/outputimagegenerationservertoolitem.py: id: cb34639447d7 - last_write_checksum: sha1:2383f1a2904297a4289e0523778bb928f5614d1f - pristine_git_object: e91756b3e8d3e46283706192f9e44d03770d0fb3 + last_write_checksum: sha1:21f58c84bea8a3ace8b91bba914e54cf62dad70e + pristine_git_object: a94bd0964eb714782858820e0db39afc28a0dcc3 src/openrouter/components/outputitemimagegenerationcall.py: id: 0b4cbdbd733f last_write_checksum: sha1:f9ea61a170b8e516108d2d59b0e7df9d264d3aad pristine_git_object: 897c4727eec2497fe15e5603187e24218c08ac87 src/openrouter/components/outputitems.py: id: 90f107de3116 - last_write_checksum: sha1:3e25cbb638d9f753193e6c7882077468032a30f8 - pristine_git_object: 4457f805c46470e36ff5cfd30eebab43e0039a96 + last_write_checksum: sha1:f7da92ef441cc5977e579426165949f43e2a93c2 + pristine_git_object: 9b0b74dc0637aca56fb4e56b237cf55ae64e2a9f src/openrouter/components/outputmcpservertoolitem.py: id: bb8c2536a58e last_write_checksum: sha1:6cbe556b2268af0142d982007b273cc43b7605c7 @@ -4138,8 +5496,8 @@ trackedFiles: pristine_git_object: ec59a9d5b4c96843033bd73783a7b923fb741928 src/openrouter/components/outputmodality.py: id: 74c79e4cad45 - last_write_checksum: sha1:76cc17e2a535074d823d7250c3e856d165ceeb70 - pristine_git_object: c926bb65891bd067cfbf45ae48f960a63820aa70 + last_write_checksum: sha1:a7e7205a3469166de2bd6649d94b8da6475cc3bd + pristine_git_object: 08bfb228f9e602675b1ec68de800e5f0602212dc src/openrouter/components/outputmodalityenum.py: id: 82bebf193d55 last_write_checksum: sha1:2983ef9a3c82244eff5f8b1184637a1fef13573c @@ -4148,6 +5506,10 @@ trackedFiles: id: 0bc0568f44f9 last_write_checksum: sha1:3c460a262ff94910ea443fa6ac7d3f6608c3209f pristine_git_object: 50eff94f87fe82aba4fe330ee61e79ab885847fc + src/openrouter/components/outputsearchmodelsservertoolitem.py: + id: ba87dc220c62 + last_write_checksum: sha1:f9682aae6fc8cafa19217af10d745180cacde1e2 + pristine_git_object: f94949d2e5aedf4873295efcdf87f0f5367c1d32 src/openrouter/components/outputtexteditorservertoolitem.py: id: 2a5dc9318fe6 last_write_checksum: sha1:75ce53e78b352b0427acfb5310b2500ee76351dd @@ -4158,20 +5520,24 @@ trackedFiles: pristine_git_object: 45dfd93dab49766840806b9263ab64da9f6fe0e5 src/openrouter/components/outputwebfetchservertoolitem.py: id: 2b12eb287cdf - last_write_checksum: sha1:9cbfbd687515a31c41c198f9fa0dcb82a1046932 - pristine_git_object: f443472d28fae0a33cf50463bd76525d0ba296dd + last_write_checksum: sha1:1faafdadd295f064d2d39c12330f256abb2dcf46 + pristine_git_object: 71c97ae1ae222c114c3d0480b265031c47aa54a1 src/openrouter/components/outputwebsearchcallitem.py: id: 8c94cd441023 - last_write_checksum: sha1:8eb97fbc2b8dd6a21377ca892ee6fbfd36924610 - pristine_git_object: 706303d7461ee7df2823f973f5ba517f076ed27e + last_write_checksum: sha1:5076cc7374513eb9f6c5ab596386082e3e9bcb7c + pristine_git_object: c0c8f1bef699e051a66e9a95c8d8f9dacef97332 src/openrouter/components/outputwebsearchservertoolitem.py: id: b1fcca0b3fd3 - last_write_checksum: sha1:c82e5ab1c16b409708c4997fcaf45d8abaa1e1b9 - pristine_git_object: 304cab51826d39b91964917148f886f8bb681149 + last_write_checksum: sha1:7302bea52916eeb4a52915c02538e3c301076aa7 + pristine_git_object: cdb04856a32b6dc9b6d24291f8d9cf7b6b245b82 src/openrouter/components/parameter.py: id: d76aede00388 last_write_checksum: sha1:bfd3c5f0f386b8c743f724c52ba51d97e49a1757 pristine_git_object: 9aaebc4cb7eefdce97f37e89d6d719e524d148e5 + src/openrouter/components/paretorouterplugin.py: + id: b239c8e11899 + last_write_checksum: sha1:9d070d49f1983cee493ba27cba80c41e6133aaf4 + pristine_git_object: 6b12a70411a04b73112da5192baf0131b7f0ff36 src/openrouter/components/payloadtoolargeresponseerrordata.py: id: 5209b3a61cc9 last_write_checksum: sha1:ba13b793314af45716d3ed5572abaad213d01850 @@ -4204,6 +5570,14 @@ trackedFiles: id: 5a170d7d1f2e last_write_checksum: sha1:9b269bd87a1f704a0f0fa731da57cb35bc960674 pristine_git_object: d572e3bfa6c8a55afa7d4f057fa17186652a98a1 + src/openrouter/components/pipelinestage.py: + id: b87ef92fdac2 + last_write_checksum: sha1:f3f59e51956dabc99e4006fba125ca1c334c5cbd + pristine_git_object: a5a763d022ed39dab6e7ab05ce28582d408d42de + src/openrouter/components/pipelinestagetype.py: + id: e84fda1bf034 + last_write_checksum: sha1:ada3c3cbb5726f94c566c172bb3b682f0efbe9fb + pristine_git_object: 1cc72acc2047fb461b91f69083d37b5d5188acde src/openrouter/components/preferredmaxlatency.py: id: 20675ae045ba last_write_checksum: sha1:279e300348daf2d15744ee9e0e6520639e95dfd2 @@ -4226,8 +5600,12 @@ trackedFiles: pristine_git_object: 72dd15242d7d35b2b493f90d0cdebf6f8a51d684 src/openrouter/components/providername.py: id: fcc722fa2fce - last_write_checksum: sha1:5f1b8a8471ab3d11bd0d18927a9cd9c747bababe - pristine_git_object: 7764a12512827640f3c32a22b199b09cd890b57f + last_write_checksum: sha1:55846ccfb5dd1a33e10cf186c30ad66e9ef4649d + pristine_git_object: eefad3f3a657f28c2bac4af4d24615673f516768 + src/openrouter/components/provideroptions.py: + id: 73dde6c8f359 + last_write_checksum: sha1:e0ead1b353f1634bdb29df5be33c45e0a2915f77 + pristine_git_object: 78f582ce5546e61b4a0b256a0a1e44e576b9de5a src/openrouter/components/provideroverloadedresponseerrordata.py: id: 5b693682570e last_write_checksum: sha1:41a977452d58b52cb9d4b3a85f4b7970529352d5 @@ -4238,8 +5616,8 @@ trackedFiles: pristine_git_object: 5145815e6196470f3f5f24893afdc4415d27c53e src/openrouter/components/providerresponse.py: id: ad3887be54c5 - last_write_checksum: sha1:d5988a5d8c6174971287275305c6b638b6325940 - pristine_git_object: 4856eee2be0d7aeaadc4cbacd0ba1b08e5886999 + last_write_checksum: sha1:60ec45441fd0d9a694639a26aba61cdf8361686f + pristine_git_object: b771178f1c1e7f29dc71637bb34a281a54f04dc0 src/openrouter/components/providersort.py: id: 348e382bf494 last_write_checksum: sha1:57551507f95cd2e16ef995e1c13f859fd0726152 @@ -4358,8 +5736,24 @@ trackedFiles: pristine_git_object: d3c77624292ba0985104a6125e462c305a633d84 src/openrouter/components/responsesrequest.py: id: 8c850080ec5d - last_write_checksum: sha1:d3736138872e8a2af2681707dac0d4b08c9f198f - pristine_git_object: 357c19a3c8198fe785cee157960b438f96d84cb0 + last_write_checksum: sha1:f6beac4c9e5e8f5607214f3dfd5f23ab9fa62887 + pristine_git_object: 2a17314afeea800d96bbe5ba072d3936c6213ac6 + src/openrouter/components/responsesstreamingresponse.py: + id: 142379f3bd90 + last_write_checksum: sha1:a48d6f3610f5d15248ef4d25a0d88a0a4a1a9db7 + pristine_git_object: f42e7330886d2b9f721ed6fbd8eb9c286d03794f + src/openrouter/components/routerattempt.py: + id: 16832108a087 + last_write_checksum: sha1:d68e885e38f3b531cf47e2663af17913a1dcb743 + pristine_git_object: d47bd379ad5b3e0e548581340f4afaaf54d1d8ce + src/openrouter/components/routerparams.py: + id: 4563ca5dc421 + last_write_checksum: sha1:c1d9388e903d23bdb4ab21334c9fe57c4d4db095 + pristine_git_object: ae952a332acd3de14461078bce81279c90dcd54b + src/openrouter/components/routingstrategy.py: + id: 553fefb9814c + last_write_checksum: sha1:5db57f3fb6368777e8c2713eba613830d4f647fb + pristine_git_object: 2f0e24f4e60f92151982237f1b2e871fbbf03278 src/openrouter/components/searchcontextsizeenum.py: id: c246413c0bd7 last_write_checksum: sha1:863a664a9f17def86180b0407c8233c263acfae7 @@ -4370,8 +5764,8 @@ trackedFiles: pristine_git_object: 559ecad60dc51d3a30a5b40421fd0e1e5db2aaed src/openrouter/components/searchqualitylevel.py: id: 8fdb148edfb2 - last_write_checksum: sha1:ef6932e03bc19a234c36b511313826048241b56f - pristine_git_object: 36eba036095d6981523ed162e3a9b30188731651 + last_write_checksum: sha1:d22889d8bd9da8c8552257d2cf603c7592d086a5 + pristine_git_object: cb18824d2ea198df9b96e6c46b326eae8534006e src/openrouter/components/security.py: id: ae2ca334218a last_write_checksum: sha1:e6bfa94172df4c823ed9dd83b9b2614e6890d462 @@ -4380,18 +5774,30 @@ trackedFiles: id: 606d51d201e8 last_write_checksum: sha1:8b76218af34c1287190b8d4ac5d7fc3545bbbac1 pristine_git_object: 0b28bb2db7b7c195366e992bb71c03ac30cf9280 + src/openrouter/components/shellcallitem.py: + id: 0b3b4f503413 + last_write_checksum: sha1:917b39b2347de74ab3040a1b4f1d0ed6efee4a9e + pristine_git_object: 892539bfbacf3ee6cbc4a2e834215f0d84db2ebc + src/openrouter/components/shellcalloutputitem.py: + id: 54409ebc9cdd + last_write_checksum: sha1:5f26e4cef8b9e91e32f7d475d3b5e68ac87e9b03 + pristine_git_object: fb4b3007a890802b57b3433c56451b92a0e29761 src/openrouter/components/shellservertool.py: id: ac0e4bd3caa3 last_write_checksum: sha1:06f390a37d82c115be033bcfceb3e99b30e1fc92 pristine_git_object: 7e26325a31eb3ed1dbd4323a0e61afc1f6bd885f + src/openrouter/components/speechrequest.py: + id: 2a9400167112 + last_write_checksum: sha1:62da67e554f2325d459f2a353472823058d3ff69 + pristine_git_object: aebab1a4f975b5a3e3434fc3865cc99e090b9114 src/openrouter/components/storedprompttemplate.py: id: 6be99e870ecd last_write_checksum: sha1:6b7d17641d9e2b52010962cb586e32f99254db79 pristine_git_object: ffb7a43e64bfef2809683fe60a5d17744ea345c3 src/openrouter/components/streamevents.py: id: 331636234c76 - last_write_checksum: sha1:9940f9b8ae8a4198a4ead72a1906bc31e979839b - pristine_git_object: c663877267863a9a85e45c56c03004f642feca50 + last_write_checksum: sha1:09d272fe33e123c1c32389158e5d037af79a606b + pristine_git_object: bae92a3226a4d61585b1ddffc26148179710a683 src/openrouter/components/streameventsresponsecompleted.py: id: fd244f61371c last_write_checksum: sha1:011e0930c7994f64dbee78c0a4c2fa5d7167d8ab @@ -4420,10 +5826,22 @@ trackedFiles: id: e39bb8998edb last_write_checksum: sha1:cd5570f2a08ea1c0315dfcbc0e4d704610adca41 pristine_git_object: 49f4ae2d09fa5d311465a0a77f7cede0f97f779a - src/openrouter/components/textconfig.py: - id: cbd40c12b745 - last_write_checksum: sha1:737f5adabb641d1d30152cee2f9a8db1e43d697b - pristine_git_object: cf8fa534d38146d0734b6161264406d5d53b7955 + src/openrouter/components/sttinputaudio.py: + id: d59edf301037 + last_write_checksum: sha1:ee9580093ccb22ec4d5e2cdc6f9ddddd33d84d56 + pristine_git_object: d1b15b44f530c920110bc808980fc89a00e3c879 + src/openrouter/components/sttrequest.py: + id: 5fb1d469e16e + last_write_checksum: sha1:b810f4e689869b66855b9ee0cbaf1022b0e98f92 + pristine_git_object: 5ea932b47f9c3885f004d615d761faa04524dc2a + src/openrouter/components/sttresponse.py: + id: 2dc8eb8daaca + last_write_checksum: sha1:7af7b04e09abeccee24863ae133cf811e9453b8d + pristine_git_object: d50a8c428ddd5293b059d3d15bdf1e46b2306a27 + src/openrouter/components/sttusage.py: + id: abe8329af787 + last_write_checksum: sha1:213749fb8f5389bc607b75300b6fcff714c83b6d + pristine_git_object: c7661d13e6970fcb82970968a85d5e8507bc0c0e src/openrouter/components/textdeltaevent.py: id: 6d1d416a373d last_write_checksum: sha1:9a024e07b3f2d65d5f88e01f0e2035efd956f3fc @@ -4434,8 +5852,8 @@ trackedFiles: pristine_git_object: 9bc3b1fd09ca7d4be981ceb7b10e14fb157dbb5f src/openrouter/components/textextendedconfig.py: id: 150a449e46de - last_write_checksum: sha1:8e6dd8672fcc687c8a930c533d94daac4bb4ce5d - pristine_git_object: ee561b18699c16f952bc036a2d0903e0ea3a8d9b + last_write_checksum: sha1:81f539fffffee92247de216b1ddc9269b02fcd54 + pristine_git_object: 89224c7a342575e694ac269e1773c4c2a0ad5c07 src/openrouter/components/toolcallstatus.py: id: 32339139c3f3 last_write_checksum: sha1:a75631cdb460f190aa10d5557519519d1ef5fbe3 @@ -4470,24 +5888,32 @@ trackedFiles: pristine_git_object: 1c70ab3d8b23363543675abe5d3b3566aea113e7 src/openrouter/components/updateguardrailrequest.py: id: 6a557cd822a0 - last_write_checksum: sha1:c9a41a90ad1eee466855137101ae02def9c7e553 - pristine_git_object: c4000777114116a421b2e2f51675497ea89263ce + last_write_checksum: sha1:c23e67e53585fbc8d00ee23cca8b4832b1818aa3 + pristine_git_object: c4f4dc4d878ec895b746908d181af032d3c8706c src/openrouter/components/updateguardrailresponse.py: id: 7b068d26ce31 last_write_checksum: sha1:2b63cbb90747f07f775d9a22e80f74c67221fea8 pristine_git_object: df833960211cc7ed2a2a42fddbeafda0092e1c0c + src/openrouter/components/updateworkspacerequest.py: + id: 78d86b3b0a63 + last_write_checksum: sha1:0dc21aeddda84729d3fce7ef38e1cd5798eacf99 + pristine_git_object: 8271be1596210a1c6efcf3d5bd0f132ec1e7d115 + src/openrouter/components/updateworkspaceresponse.py: + id: 46253fa9690a + last_write_checksum: sha1:4708e7e4cbfddc34ffc9ed4808a88bb5b4a61ebf + pristine_git_object: 35d7ad3f80af77356a5478b386be29773f31db69 src/openrouter/components/urlcitation.py: id: fe4578e64ea3 last_write_checksum: sha1:c63b25e9b3162a543d7e4a8bb88f8a10b2d8d8d9 pristine_git_object: 5fbad2e52909780be771ec9e3aa3410cf0ed7561 src/openrouter/components/usage.py: id: 965ca6748bf6 - last_write_checksum: sha1:0ad13adb2797e0e9f080bd695e9e349aa4364eb6 - pristine_git_object: 3ff415b693496c00c41261d09e7c0c12d83730fd + last_write_checksum: sha1:5f86e0218099e33187e8238eebd3bf1aef5d6c74 + pristine_git_object: b140a02148be319bb2aeb0287bdd6e031ad6a3a4 src/openrouter/components/videogenerationrequest.py: id: 70e3c9ff288c - last_write_checksum: sha1:f892d1c5506561312151604aa837b90546603d7f - pristine_git_object: db54f129779d55863e0ea63affc0600700d2fcaf + last_write_checksum: sha1:eb16827412bb8e6ede57c28d2b43463634287be6 + pristine_git_object: a9bdef49d8b1b9d1eaa205fcb0313d686fecd4f1 src/openrouter/components/videogenerationresponse.py: id: 541f1321b072 last_write_checksum: sha1:051ace67776106616ec4c8e55cf2df9a99855d0f @@ -4498,12 +5924,24 @@ trackedFiles: pristine_git_object: 2b555be30b2462ae3065ed6a78918ba764289dae src/openrouter/components/videomodel.py: id: a544a49f7891 - last_write_checksum: sha1:5a49a75ead25b02765b589d207e3bb5e98bb190e - pristine_git_object: f313821b8f9b35d48978c2040c1953b7a0d50f3a + last_write_checksum: sha1:4d900058a40b08ca5ff6b1060c995befc79e9413 + pristine_git_object: 04170e1a7153868b8eef47234859263800b9c61d src/openrouter/components/videomodelslistresponse.py: id: 2e9d1ce2cf19 last_write_checksum: sha1:b94977aa6941f7cf15c889f1b7cc69b50cd35856 pristine_git_object: 796e741c43389a96f2ed44d3b5d862475a8af2cc + src/openrouter/components/webfetchengineenum.py: + id: 47c172c99604 + last_write_checksum: sha1:23a1bfb765ae772a0340e1354ee1a1e658fb69c4 + pristine_git_object: d5a9a26ae762751c0d3e038bb3e449ee64d8ba78 + src/openrouter/components/webfetchservertool.py: + id: f861247ea1e0 + last_write_checksum: sha1:76761dfd639356b765783eb5205226ec317a69c9 + pristine_git_object: cbd34b30aaef5cf4262526df86edc35287b10787 + src/openrouter/components/webfetchservertoolconfig.py: + id: 05cda975d2bd + last_write_checksum: sha1:fe079f9f0c7c05578b2f6f1269dc4b0ef6211e96 + pristine_git_object: 4dae2c4e01d376689a2c83c1a198463e8d609525 src/openrouter/components/websearchcallcompletedevent.py: id: a5818af2b521 last_write_checksum: sha1:538a39bf773415567086a28ff2cde66fd37ea763 @@ -4518,8 +5956,8 @@ trackedFiles: pristine_git_object: adceee794cf8135f5db3b2d741dc6e4de9c4e968 src/openrouter/components/websearchconfig.py: id: 3884d9509e8c - last_write_checksum: sha1:203af5719bc5fb7c66956e4554eba9d3b1a30542 - pristine_git_object: dfe91153bcab48d544ee9a7f4a4d409640e6599a + last_write_checksum: sha1:9160baa7912db33095bba0f08b2c42c65ea1ad32 + pristine_git_object: 610465d7844e539fd5c2789c1a5d2fcb53a5c364 src/openrouter/components/websearchdomainfilter.py: id: 4a7307ed2ba6 last_write_checksum: sha1:043839dada28f82b33f70534895e98e7ee6ce7f5 @@ -4534,16 +5972,20 @@ trackedFiles: pristine_git_object: e98eed23d754ed438624c041a7f433522e0e001d src/openrouter/components/websearchplugin.py: id: 1d872d1792a7 - last_write_checksum: sha1:e6d621eeea6b000cb7cc4e75f2b0695a9426ac9a - pristine_git_object: 93c8f70b055d065e08480b5a75ca23d74dbb57e5 + last_write_checksum: sha1:824232ea50b6befbbfae9537d44c42fa2b84b26e + pristine_git_object: 3c8e46d68d02d7b60ccfbfc9ebcbcc92a443bd54 src/openrouter/components/websearchservertool.py: id: 32c7333e3c21 last_write_checksum: sha1:57f9a9d65715b12f0ad7ddf88690b9eb656b074b pristine_git_object: 363a4ea93e4eff5ac708bd2eb69aa6aada986075 src/openrouter/components/websearchservertool_openrouter.py: id: 3fcedc999f5b - last_write_checksum: sha1:f7419ca78cf720ba7968d0091740d3abdd8fb621 - pristine_git_object: 29b8262239fccee9b159ec93f0b6fe307d3e636d + last_write_checksum: sha1:81c68c3a06f55fee5b6cf18730f3bb0141d168a4 + pristine_git_object: c5717ed5a3d7adf2ef2777ed76233365c1d5b443 + src/openrouter/components/websearchservertoolconfig.py: + id: ebdaa99d47da + last_write_checksum: sha1:333e889623d7327976324be25a64e150657e8516 + pristine_git_object: 754bb613e25de2ea06e395427728ed641dda5a3a src/openrouter/components/websearchsource.py: id: a1fe81b68a7b last_write_checksum: sha1:fa30e5813682231d742fb6861f0fe92f655c8e81 @@ -4558,8 +6000,16 @@ trackedFiles: pristine_git_object: bdb5b03c5e524404f4aeb7123b0410b645ac8a74 src/openrouter/components/websearchuserlocationservertool.py: id: 34efd6600d16 - last_write_checksum: sha1:cb3ea048d0ba10bb8fe943c8e1330e677f598a2f - pristine_git_object: a716b872c7c00c57fc27733362d5e78120c89c3e + last_write_checksum: sha1:d283241abfbab4b0d36dbba7b6ca227c0403e375 + pristine_git_object: bf4bb709e49cc25a82b441246ed709308a1360c2 + src/openrouter/components/workspace.py: + id: 682282304bd8 + last_write_checksum: sha1:ad9199698aa5679829b846839c25235b3039f457 + pristine_git_object: 583db0c55612de3aff4fcbad1983d489eed9bbf0 + src/openrouter/components/workspacemember.py: + id: b510f727fe9c + last_write_checksum: sha1:63595d8ce7e9df050f1bc97f7cf70b4215da09d0 + pristine_git_object: 9ece87803cfa8b3ab38c0dffdfbd8de176eaaed5 src/openrouter/credits.py: id: cdc961937101 last_write_checksum: sha1:2d49b088f5895c7d1b3167d6d99d304221812fb6 @@ -4578,36 +6028,36 @@ trackedFiles: pristine_git_object: dc5ef68c20dea9461abf913779f5f0e21defc829 src/openrouter/errors/badgatewayresponse_error.py: id: 818c3605ce23 - last_write_checksum: sha1:d9d2599c2be63be36d3891bc94e34535edb3f05a - pristine_git_object: b2138fd9fffc06d1715ecca8bf6dab150b3096fa + last_write_checksum: sha1:abf8470143de24b708943ca1fa0b7bcb2b4e84b1 + pristine_git_object: 28ce1d4e5620021bcad39fbc58c45459013de4b1 src/openrouter/errors/badrequestresponse_error.py: id: 562928a0bbcb - last_write_checksum: sha1:dd8028bd3e353b2a279d0287393266f61337dac0 - pristine_git_object: eb34f266301fc7ba48b8d1403c5f4cf7e3291295 + last_write_checksum: sha1:5cca64da1d9f3536b2ae9e0e13c75438c04be433 + pristine_git_object: 514a2727d42471d1e2cba0002d1d2f67ce297dfc src/openrouter/errors/conflictresponse_error.py: id: 2411f691a552 - last_write_checksum: sha1:5dde74d955027d3d1ba8cbd5b19fc0a26538a55d - pristine_git_object: 4c23784060e905d4dbd1416f0060b2ba3a302c43 + last_write_checksum: sha1:17347336a5c3126c199c7f94da6ec9302111255c + pristine_git_object: 434f65c0e5b9165ed6ef608f4105ae200e66fc07 src/openrouter/errors/edgenetworktimeoutresponse_error.py: id: 2a740d29452a - last_write_checksum: sha1:11e8880778c0f2be20cb4c10e73daf5c8eb7bcb2 - pristine_git_object: c2881a581d72c7b444003ecd974dc0e38218afad + last_write_checksum: sha1:e8db1c9eb416ec255115337f0dee669644831cde + pristine_git_object: 4ba05c459f7c0885698b54fe7e500d41d65fd94c src/openrouter/errors/forbiddenresponse_error.py: id: 4c1d3e6c95a4 - last_write_checksum: sha1:930eb57082f282587d05c77b243990d4bc32fdec - pristine_git_object: f9fd3e58e09630c176f4868c6a962c96c630eb8b + last_write_checksum: sha1:ddc14da480a282ee0550b73aa73fde7fa9d4a7cb + pristine_git_object: f6bd1810c53a35663add19d4066d8b59d6dcd2e4 src/openrouter/errors/internalserverresponse_error.py: id: a5ab5c4a53a9 - last_write_checksum: sha1:f91e21d4022b0ede924736ab9664e63d73e64b55 - pristine_git_object: 2d8be8210d37497052c01738f86f8520b1ab737c + last_write_checksum: sha1:ce08c9c400461eb0e24aba17c443614e9ae18a36 + pristine_git_object: 207c80c8e384e818a670a58fa451ae10ddd49cf6 src/openrouter/errors/no_response_error.py: id: b8b987b5e306 last_write_checksum: sha1:7f326424a7d5ae1bcd5c89a0d6b3dbda9138942f pristine_git_object: 1deab64bc43e1e65bf3c412d326a4032ce342366 src/openrouter/errors/notfoundresponse_error.py: id: 283f4657fb1c - last_write_checksum: sha1:d678c505934d319d79c75e73a5d28e2f7eddda64 - pristine_git_object: 99c3f9feba614b608c0a5fe33fdfef773fd20e2b + last_write_checksum: sha1:ed800dce3d8fe690376d7b3afaede1c80fb42b86 + pristine_git_object: a79ff3ce9dcb8f7d18ca8b8a32c8cd89ff4a797d src/openrouter/errors/openrouterdefaulterror.py: id: ec1269b0a602 last_write_checksum: sha1:c7e323985411ebc622a365df7d1560db134e5fb8 @@ -4618,48 +6068,48 @@ trackedFiles: pristine_git_object: a3218e9a6bc8dfa4093c179225507d55e0dec027 src/openrouter/errors/payloadtoolargeresponse_error.py: id: 94bb184d04ae - last_write_checksum: sha1:c2880729e81e6f5085bb4007b111242202237bb9 - pristine_git_object: 8b9daa272db8aee6adfbd4105124c1f4adabfb12 + last_write_checksum: sha1:cd6a53126dfaf2e1ef6380d3ed19678df493e173 + pristine_git_object: 2f118141eb32430c4b0350ef2fd624e69d0cb206 src/openrouter/errors/paymentrequiredresponse_error.py: id: 323b9c0a7cdd - last_write_checksum: sha1:7829364046b6dba0f27ed58acae3506ae516253f - pristine_git_object: fe3b3c202d614b1cf15fff5629a0245f0deaaa38 + last_write_checksum: sha1:e6969e50de086e6df048b998751be3dd748e1f5a + pristine_git_object: 1bd7e6bf443f5986b04c8cc03528d5fd73f71dab src/openrouter/errors/provideroverloadedresponse_error.py: id: 78dc52b11d59 - last_write_checksum: sha1:d73ada51520ca201ebd0ebc828513e333c3a4a43 - pristine_git_object: bdb7061a773907ab29bd9da4e38b492af8886b22 + last_write_checksum: sha1:4c1dee619eb80b257f669ea830a07e73ad38b4c1 + pristine_git_object: 4594e433f5247e9984203ab8be56119c58b0d342 src/openrouter/errors/requesttimeoutresponse_error.py: id: 74f87b9d42d2 - last_write_checksum: sha1:82642353a23643f25d2541f6b3801a80f5003c6a - pristine_git_object: 4937892a72d007b48f6852eedebc00db84c425b4 + last_write_checksum: sha1:981c6f7eac598df76bee80aed26ca5a4b0f5f6b1 + pristine_git_object: eb403d9a83e5ce274137de63e78142abaaadf29c src/openrouter/errors/responsevalidationerror.py: id: 861959e3671e last_write_checksum: sha1:96842d22bdaacde74bc581692af0230b4aa2684c pristine_git_object: 8d0d6fd5911c93c00c6a272d3c91ff16573f468b src/openrouter/errors/serviceunavailableresponse_error.py: id: 18cc83a0fd00 - last_write_checksum: sha1:b9eb34e98c775abff6c18e756039aad1751249a4 - pristine_git_object: b94cfc22f031873c995c5e8fb9b334387c886c6a + last_write_checksum: sha1:d654d25d43e19aa3214ba870259066c49bb8ff32 + pristine_git_object: 0c9c74b3a67ce7131f6401e337ea3dc9a75d2f60 src/openrouter/errors/toomanyrequestsresponse_error.py: id: a3f4058d56a1 - last_write_checksum: sha1:b83e40a5ee6a542d13ed6e5abc65002c87d3c33d - pristine_git_object: bdf7914607cccd54fec4be42edd20b4aee00e069 + last_write_checksum: sha1:807f834fadb128356eb5009d0348e4298a1a958b + pristine_git_object: fbbad1643a27eaed2626282e225320cbfc9828bd src/openrouter/errors/unauthorizedresponse_error.py: id: b26af31a1ee9 - last_write_checksum: sha1:3bf21eac6390dad775f1c75e537cd324cec99650 - pristine_git_object: 7f9c5a66ea59adc6989a7e0e5fd731d542c4b45a + last_write_checksum: sha1:05cda7a87e5024058aa8d3de83a8decfd03c154c + pristine_git_object: f70ea1cc64c798c46029381951fc7f1f89fe3996 src/openrouter/errors/unprocessableentityresponse_error.py: id: fac4aa89599e - last_write_checksum: sha1:5a76379b95c1c938e125641a1cb30568c1eae271 - pristine_git_object: 7304f75b9e8f3bef2d1c918f875420b26a15f8d7 + last_write_checksum: sha1:5505f65c29d570dee9ccbc7188b50b3d833c68fa + pristine_git_object: d858f3b578b189d20b89d0dfc1a6b829ff5897ff src/openrouter/generations.py: id: 70e1c21042bc - last_write_checksum: sha1:a8dcb94d3809b0b837398caca08dabd3c0481d21 - pristine_git_object: fddcce7468125b281b22f520928ee5d31f027fc5 + last_write_checksum: sha1:f7df8719bf188b05a29b8694e6c2db7adb262bd3 + pristine_git_object: 409e169fc5f43a0eea65b7568588c25c82abb46a src/openrouter/guardrails.py: id: 705839f34e66 - last_write_checksum: sha1:b8b1ea14cd57a7f4100f63efbe76d3baf5e62254 - pristine_git_object: 7d1038da0c7b1e6989aaeb070b1a2081157b53e1 + last_write_checksum: sha1:be441e71b7ba23f3a54677db1f01b9d3aa773485 + pristine_git_object: 0ac9846504631d9a8bcf7049ff3ea601f59191e2 src/openrouter/httpclient.py: id: e9311185443d last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 @@ -4684,10 +6134,18 @@ trackedFiles: id: 1948ce27255b last_write_checksum: sha1:e847767a0718afa3d0cac8a3d0735d95e6892265 pristine_git_object: ef6eb9aa10d9b067d96dad78a1d34f939c1091e8 + src/openrouter/observability.py: + id: 6a17f32d3f33 + last_write_checksum: sha1:15ee01d756d27563d3b09d29e32ee1ca154cb0b2 + pristine_git_object: 5d9daf67fe61f63ab4ddd52fea9e5a55fa416770 src/openrouter/operations/__init__.py: id: 9afcea1e7161 - last_write_checksum: sha1:ec3ab8fd0729912259f86a370453dd311f440953 - pristine_git_object: 8c2b3198136aec28d1b51abc1b12386429039561 + last_write_checksum: sha1:358f357c26428f1e73aff46ea4c157abaace62ee + pristine_git_object: 4abcaa997e1a56f75a43de33f0ed77ee313e4ecf + src/openrouter/operations/bulkaddworkspacemembers.py: + id: e0ed56117619 + last_write_checksum: sha1:2b9c73dd8a24d6c479d50118a309e4e0969ca7ea + pristine_git_object: 32dcfea12b195a499c91c55aee78aaa0144e60e0 src/openrouter/operations/bulkassignkeystoguardrail.py: id: 6d8435d51d9d last_write_checksum: sha1:2136b0223191e5d8159c77cff06845958930184e @@ -4696,6 +6154,10 @@ trackedFiles: id: 079706f81038 last_write_checksum: sha1:7c8fb1abae40f33c8d467f73b3779503469cad1c pristine_git_object: 80a1cb770eb34221c7691abb44849bb6db23322d + src/openrouter/operations/bulkremoveworkspacemembers.py: + id: b5f68d465d4d + last_write_checksum: sha1:1fbd3d2660a4261d12c97b464bc445f4dc24c891 + pristine_git_object: fe0ebfd7d6f5e748ba7105c848c94fe3ed6598ea src/openrouter/operations/bulkunassignkeysfromguardrail.py: id: 006249615b0e last_write_checksum: sha1:88df9d073f73c7d1f0fb70e46a109b17f84f04e8 @@ -4704,34 +6166,46 @@ trackedFiles: id: 8127aafae1ef last_write_checksum: sha1:a4c24a2e84c611856ed0ea45168b31cd5b8e1dd0 pristine_git_object: 3613dcf6d85a45e916983f238cd807695433b401 + src/openrouter/operations/createaudiospeech.py: + id: af9df6195878 + last_write_checksum: sha1:a3bd0bd212bfd34631dfd07b265f3be23e0ef458 + pristine_git_object: dae7b28a11b1c100ddf9c66f175d0d583a4506ca + src/openrouter/operations/createaudiotranscriptions.py: + id: 53f76e1550e4 + last_write_checksum: sha1:f72d4be6f461aa2d12344394c1d8492f9018e035 + pristine_git_object: 01441144f8433569cb0846df23bbafc9b790a1de src/openrouter/operations/createauthkeyscode.py: id: 4253a437de22 last_write_checksum: sha1:de809cb9a55efb7b22d033bace50344bf53696f4 pristine_git_object: d3ef6c4b8374be3dfa5d807f879a430e50dc444e src/openrouter/operations/createembeddings.py: id: fe1160a960e9 - last_write_checksum: sha1:7c43b2de3e40ec1fcbac46f4bc89ae6fbf5eb95d - pristine_git_object: 3872d32380bd3ae8cb9cdb6d7420a4e32464596f + last_write_checksum: sha1:5307ac65b8a4c3eec3de9158c2a3d10554212e8b + pristine_git_object: 4cc4c5c044fa87a8ae21dd7aa0f83d09f4d00f09 src/openrouter/operations/createguardrail.py: id: 52ed4b2f5903 last_write_checksum: sha1:119141c01d19df6b6d090b67f80145e3bf4d4d60 pristine_git_object: 75b9661b38be99f2a067eda4051592111301bed1 src/openrouter/operations/createkeys.py: id: 64ad31fdaa6c - last_write_checksum: sha1:2d9152fa4d928959e6fa6fd87064a5eff9593f85 - pristine_git_object: 5ed218dc83d851e8ccf7da73203c7677c7ef75c5 + last_write_checksum: sha1:41931fecbca34b228d5fe6230810eb6bf9271250 + pristine_git_object: 6d18cf707841629cc63ed2ed56aacd67f639a717 src/openrouter/operations/creatererank.py: id: 99b5d368a168 last_write_checksum: sha1:86b7c32d7b0bb77f16b9926384c47774e9e25c6a pristine_git_object: 68f500af519207c91a5bb34c7006ec5f8d8b3f46 src/openrouter/operations/createresponses.py: id: afb834172b62 - last_write_checksum: sha1:55f5ba6a2eafc9d0519fa5aa072a1c22e42ed5f2 - pristine_git_object: e92bbc2995c3a3769c9cc45b0a6b6b690e67d02c + last_write_checksum: sha1:8a0b6954abbb070c51fd860a33b04d8629f65d95 + pristine_git_object: db9db18e8b602f14e74496979ef07b7ee13d4362 src/openrouter/operations/createvideos.py: id: d52f6a4a3fe4 last_write_checksum: sha1:12507b8087961d8efe67590e8c5b93f47a9d1a23 pristine_git_object: 3892fc759bd022cdbbaf830f5f20f655131a6d90 + src/openrouter/operations/createworkspace.py: + id: 690a809c4592 + last_write_checksum: sha1:897268bff3352aff34ba62f6622ee3ba17406752 + pristine_git_object: 1757be8d72bad9c0076d5492babb798eba2b5582 src/openrouter/operations/deleteguardrail.py: id: 1fbdb98bbb85 last_write_checksum: sha1:e245a5061592daf839d38caace9cc38abbce879d @@ -4740,10 +6214,18 @@ trackedFiles: id: 0bd72d53b0a0 last_write_checksum: sha1:de3ec2a557ba007482a9d7ecaecef00cb6ead537 pristine_git_object: 51d48818bce022ab5e9514ea48429e3aca75e997 + src/openrouter/operations/deleteworkspace.py: + id: f92017ce65e8 + last_write_checksum: sha1:ac9aa22002cf938a69643dac44c38ab7d702c31c + pristine_git_object: fbfef8826b9993d95d355ec0335f943e97a75bda src/openrouter/operations/exchangeauthcodeforapikey.py: id: 37bdd1517a07 last_write_checksum: sha1:963c95a165a35ae235d9b03d31c4e029de0246d4 pristine_git_object: 4e4295d69ef4c06a932c3141568c61cb72ebee4c + src/openrouter/operations/getbyokkey.py: + id: d141452bd88a + last_write_checksum: sha1:16c33afc84cd0d3a68e977e739a59d14dfd3bd44 + pristine_git_object: 04945fd4eb11ee104cafcc6a06730b3f1c52a9e2 src/openrouter/operations/getcredits.py: id: 83155df53da5 last_write_checksum: sha1:8b1eccdc3313fb35c0d5fdbfe63dbf64f35d460b @@ -4754,20 +6236,24 @@ trackedFiles: pristine_git_object: 2d26173fd7e4555e188999eee1e282e85b68c73d src/openrouter/operations/getgeneration.py: id: d7c64961334f - last_write_checksum: sha1:8816e63b89634cc5b5df7ef6119421224965e529 - pristine_git_object: 94dfcb738c716d409f17be7a2e11485531d90a34 + last_write_checksum: sha1:7c919236caf0943f145d584024a85bb663f0e911 + pristine_git_object: bf21d05e955bbfc62ed484b566555bafe0049e10 src/openrouter/operations/getguardrail.py: id: 9b3309b59c64 last_write_checksum: sha1:f83b3d52731324d0bc87c382196b84713e77f6da pristine_git_object: e3a2ca2914e9add5060e7efa73dd268d5e32a9a5 src/openrouter/operations/getkey.py: id: d9769da90865 - last_write_checksum: sha1:3630fb35d372c6541061cf2d425ebf58acc336f7 - pristine_git_object: ec3948b6b7c470258a3dfe10d304c2d52bd68b04 + last_write_checksum: sha1:511b994a0bd1241856b06184f05433bec3a16733 + pristine_git_object: d2370a94a10fadec861d31e6fd1a9b2566e94d22 src/openrouter/operations/getmodels.py: id: 5bd5dfcb0125 last_write_checksum: sha1:013ccee44da99aa609f290aef9f253e64dca38c6 pristine_git_object: 4f37b3b7dfc9f4e6c0f127865afd5889baa8fda7 + src/openrouter/operations/getobservabilitydestination.py: + id: 15b49f22aca9 + last_write_checksum: sha1:89cbc1ea42d52efd81f18ebe90094c204fbe88ad + pristine_git_object: 3a79bcb425563eb0cbebc8103d20966f07173654 src/openrouter/operations/getuseractivity.py: id: 560a0e01c2c3 last_write_checksum: sha1:88c8f4fe8019dc79934cf6b566111bf34d4adb08 @@ -4776,10 +6262,18 @@ trackedFiles: id: a5f626467a69 last_write_checksum: sha1:00f000b3fab29247f632c12bcdfe71a579a2ee6a pristine_git_object: 3a120ed0aacd7ac94b3421fc1439e1308d53f83f + src/openrouter/operations/getworkspace.py: + id: 2ead327ab15e + last_write_checksum: sha1:d9c6371c14333537e74d326634bc2ed2dbbeb76a + pristine_git_object: f4d279e42c326dbda828b4a875cd152cfa0ae14a src/openrouter/operations/list.py: id: 3ced31e3804e - last_write_checksum: sha1:a160c202d3cce31f3cb2f9cc911d5e4cd9c44c30 - pristine_git_object: e1d703cfe6485faee33c1ca4a7599b9c950bb7af + last_write_checksum: sha1:aeaae46cbe0e9403241e50baab791212404b29a0 + pristine_git_object: bf9965a274d7249abb169adb43c8358b1ee73105 + src/openrouter/operations/listbyokkeys.py: + id: b6dd42b3e05f + last_write_checksum: sha1:5daf507857b07871d2ac52f1030a5bf5f7eed362 + pristine_git_object: 7b6580dd055fd03729d428a85ae77c0a9786acea src/openrouter/operations/listembeddingsmodels.py: id: bf749a1f23d6 last_write_checksum: sha1:654a4e7e7b486f1d321eeb11ef7a7fa928e501a6 @@ -4792,6 +6286,10 @@ trackedFiles: id: 588bf206e92f last_write_checksum: sha1:6d8e90c542ae6344e403767a3a4f8ec5d1d4dc75 pristine_git_object: 23e735db74e27dc35e80b2f72cf386b0eeeb116d + src/openrouter/operations/listgenerationcontent.py: + id: 2f086d74631c + last_write_checksum: sha1:922e30991bb7b3ef69e2672a2b969d74ce0b838d + pristine_git_object: 8d195009671fdd52cc86795bc1612fa3ddb79364 src/openrouter/operations/listguardrailkeyassignments.py: id: ee9d33f4de6b last_write_checksum: sha1:51cdc972a09b21dc3610b634bd0837a8d3b5b249 @@ -4802,8 +6300,8 @@ trackedFiles: pristine_git_object: c9c8c3ec5ea6ebcf1e160aa1e3ec41390bcbdfe3 src/openrouter/operations/listguardrails.py: id: c99a9e7be93c - last_write_checksum: sha1:0a38c88bb6f4f89dc5dd671d6d8b752902e042b5 - pristine_git_object: 8345e0e2d960cb1df76f5a8c60dd7817db7d22f8 + last_write_checksum: sha1:f82932a120516264880ec2defa377bb03a56071f + pristine_git_object: f91db9e67fe3a10b2fffd681a517a65eee4df8c8 src/openrouter/operations/listkeyassignments.py: id: e26c11d1bd3c last_write_checksum: sha1:2c4e9b2dac5566beb3b4f1331686ec45c174e021 @@ -4820,6 +6318,10 @@ trackedFiles: id: 16eb5946cf60 last_write_checksum: sha1:bf9aee7db7762dcd082791962b962940dc7e16be pristine_git_object: d25eea81bff3710243fca5874e934c024ab1f007 + src/openrouter/operations/listobservabilitydestinations.py: + id: 40d2ffa975ee + last_write_checksum: sha1:e6214f3e639b5495977cb32a9b8a3780e4b0f8e2 + pristine_git_object: 02233af5e6ecda1c0351d0b294c137ea0e3f5d3f src/openrouter/operations/listorganizationmembers.py: id: d40a3e0e2b38 last_write_checksum: sha1:201eccb7b2352cfeba4e2fb05dc23ae2ebe92e6c @@ -4836,18 +6338,26 @@ trackedFiles: id: 77ba4890284b last_write_checksum: sha1:9bb93fb1d1d71effb5f4dc58cef9d7b2265a92b7 pristine_git_object: d1497b8429e19d06cc674940e2641b3ed2222ca7 + src/openrouter/operations/listworkspaces.py: + id: fe94c6f61835 + last_write_checksum: sha1:d8845cc07779359b6d9b29ff4a2367e8c8eeb942 + pristine_git_object: 236dc188826db184deca4a749dab47e58c3dd637 src/openrouter/operations/sendchatcompletionrequest.py: id: d9fee71bb577 - last_write_checksum: sha1:35f707844223de94c0ddcb0d7d67abb50dc0fa26 - pristine_git_object: ef5ccb09584600a7c8dc99c2f02a5d7f1c65f10e + last_write_checksum: sha1:57e7ddb6651a3d5822d26e86f6be6342b111d1ff + pristine_git_object: a5d2f9646f7014e86aca63be2213fbd0bce3c0b1 src/openrouter/operations/updateguardrail.py: id: 6cfb33d7d40c last_write_checksum: sha1:fa9ca7390db4e4b45d514f821c008748af8e4c8e pristine_git_object: b3675a1d1a828f26750e5b7ac98fb7cf42ed49e1 src/openrouter/operations/updatekeys.py: id: 56fb213253a8 - last_write_checksum: sha1:cd60ee4ccc84dc5e491edc2df0780f2ea757d3ae - pristine_git_object: a8d2f865c3915c75bfef1865f567c3ffe6129bf7 + last_write_checksum: sha1:d7eeeaae7c738016d176985c529b9a60df5f7966 + pristine_git_object: 8ea23655b38916560ec65dc2f37842812add7c3f + src/openrouter/operations/updateworkspace.py: + id: 2e9960985cbc + last_write_checksum: sha1:88c11ee7a31bc5e2267981d882a01a2a71aafe55 + pristine_git_object: 4ab7929896a5dede1fa4cf9ce6acfaedd99160aa src/openrouter/organization.py: id: 6f4c63c416e8 last_write_checksum: sha1:4ca00158cd6a4971e7a4cf6da1ef084da25630d9 @@ -4866,16 +6376,24 @@ trackedFiles: pristine_git_object: e8fdd1dd0911b8cfb465e577d22079644733f687 src/openrouter/responses.py: id: f2108fb635e1 - last_write_checksum: sha1:0904d495ee9d0e8e08bd2000406c9f147acb730e - pristine_git_object: 4844bc0a635f0d4450e617c4a66810ff9e55890e + last_write_checksum: sha1:97081d31813f095f5345158820b9620dcea36233 + pristine_git_object: 1ceb71c8df8222ed6773fdedbcc92bd1d7b19aad src/openrouter/sdk.py: id: ee9846c4c9c5 - last_write_checksum: sha1:af0469095dac69b5b92dd0f717ecf193a9c353e2 - pristine_git_object: 43d1636646e181c09eaa9a42cae71c53d8ee9f1e + last_write_checksum: sha1:c884bc06aeb24d8d12eca0d1affa24cc67d819ec + pristine_git_object: c3d5d64b07abfd91c68cd7eb983efac3395514e8 src/openrouter/sdkconfiguration.py: id: 55773bb98d7c last_write_checksum: sha1:c01826125c31a8b8bc99d9d679782c8758fae001 pristine_git_object: 26433165a0b1c25d7bd3115b9b129b18f2dc9387 + src/openrouter/stt.py: + id: fc0c2f669423 + last_write_checksum: sha1:85b66bb07b0d906fc30f5077056fad632f34757a + pristine_git_object: 3b12f69849adc34582f75bb873ca1d15f562a187 + src/openrouter/tts.py: + id: 5055d4b95f1d + last_write_checksum: sha1:4097f8545f7276c8d1e007e35ac90e2006300c69 + pristine_git_object: 66886a4afd9e8195f2e1910741b3ee7d2e2b13cf src/openrouter/types/__init__.py: id: 5eab536205b7 last_write_checksum: sha1:140ebdd01a46f92ffc710c52c958c4eba3cf68ed @@ -4954,8 +6472,12 @@ trackedFiles: pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3 src/openrouter/video_generation.py: id: d0a90c1b8efe - last_write_checksum: sha1:e71109a7ac4215c56e5fa3d0e843d532278d681c - pristine_git_object: 238bbcc92885086a6faaf351dbfdc095b8c6d8d8 + last_write_checksum: sha1:b9477e48508be439c722b8cee18acdb2ec17fd2c + pristine_git_object: d079f5acd00637da4f874c3c9ed116fc5c6b131e + src/openrouter/workspaces.py: + id: cd6c533b1802 + last_write_checksum: sha1:089b5b8a784ce816227c4caec15b7dd9cdb088bf + pristine_git_object: 13306888cde2053eff7b929398a2e70c41c5370a examples: createResponses: speakeasy-default-create-responses: @@ -4990,6 +6512,20 @@ examples: application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} "529": application/json: {"error": {"code": 529, "message": "Provider returned error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + guardrail-blocked: + requestBody: + application/json: {"service_tier": "auto", "store": false, "stream": false} + responses: + "403": + application/json: {"error": {"code": 403, "message": "Request blocked: prompt injection patterns detected"}} + insufficient-permissions: + requestBody: + application/json: {"service_tier": "auto", "store": false, "stream": false} + responses: + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} getUserActivity: speakeasy-default-get-user-activity: responses: @@ -5038,6 +6574,20 @@ examples: application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} "529": application/json: {"error": {"code": 529, "message": "Provider returned error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + guardrail-blocked: + requestBody: + application/json: {"messages": [{"content": "You are a helpful assistant.", "role": "system"}, {"content": "What is the capital of France?", "role": "user"}], "stream": false} + responses: + "403": + application/json: {"error": {"code": 403, "message": "Request blocked: prompt injection patterns detected"}} + insufficient-permissions: + requestBody: + application/json: {"messages": [{"content": "You are a helpful assistant.", "role": "system"}, {"content": "What is the capital of France?", "role": "user"}], "stream": false} + responses: + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} getCredits: speakeasy-default-get-credits: responses: @@ -5086,7 +6636,7 @@ examples: speakeasy-default-list-embeddings-models: responses: "200": - application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "top_provider": {"is_moderated": true}}]} + application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "supported_voices": null, "top_provider": {"is_moderated": true}}]} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "500": @@ -5098,7 +6648,7 @@ examples: id: "gen-1234567890" responses: "200": - application/json: {"data": {"api_type": "completions", "app_id": 12345, "cache_discount": 0.0002, "cancelled": false, "created_at": "2024-07-15T23:33:19.433273+00:00", "external_user": "user-123", "finish_reason": "stop", "generation_time": 1200, "http_referer": "", "id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "is_byok": false, "latency": 1250, "model": "sao10k/l3-stheno-8b", "moderation_latency": 50, "native_finish_reason": "stop", "native_tokens_cached": 3, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_prompt": 10, "native_tokens_reasoning": 5, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_media_prompt": 1, "num_search_results": 5, "origin": "https://openrouter.ai/", "provider_name": "Infermatic", "provider_responses": [], "router": "openrouter/auto", "streamed": true, "tokens_completion": 25, "tokens_prompt": 10, "total_cost": 0.0015, "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "upstream_inference_cost": 0.0012, "usage": 0.0015, "user_agent": ""}} + application/json: {"data": {"api_type": "completions", "app_id": 12345, "cache_discount": null, "cancelled": false, "created_at": "2024-07-15T23:33:19.433273+00:00", "external_user": "user-123", "finish_reason": "stop", "generation_time": 1200, "http_referer": "https://openrouter.ai/", "id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "is_byok": false, "latency": 1250, "model": "sao10k/l3-stheno-8b", "moderation_latency": 50, "native_finish_reason": "stop", "native_tokens_cached": 3, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_prompt": 10, "native_tokens_reasoning": 5, "num_fetches": 0, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_media_prompt": 1, "num_search_results": 5, "origin": "https://openrouter.ai/", "provider_name": "Infermatic", "provider_responses": null, "router": "openrouter/auto", "service_tier": "priority", "streamed": true, "tokens_completion": 25, "tokens_prompt": 10, "total_cost": 0.0015, "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "upstream_inference_cost": 0.0012, "usage": 0.0015, "user_agent": "Mozilla/5.0", "web_search_engine": "exa"}} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "402": @@ -5128,7 +6678,7 @@ examples: speakeasy-default-get-models: responses: "200": - application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "top_provider": {"is_moderated": true}}]} + application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "supported_voices": null, "top_provider": {"is_moderated": true}}]} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "500": @@ -5137,7 +6687,7 @@ examples: speakeasy-default-list-models-user: responses: "200": - application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "top_provider": {"is_moderated": true}}]} + application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "supported_voices": null, "top_provider": {"is_moderated": true}}]} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": @@ -5175,7 +6725,7 @@ examples: speakeasy-default-list: responses: "200": - application/json: {"data": [{"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": false, "label": "Production API Key", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "name": "My Production Key", "updated_at": "2025-08-24T15:45:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5}]} + application/json: {"data": [{"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": false, "label": "Production API Key", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "name": "My Production Key", "updated_at": "2025-08-24T15:45:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5, "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}]} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "429": @@ -5188,7 +6738,7 @@ examples: application/json: {"name": "My New API Key"} responses: "201": - application/json: {"data": {"byok_usage": 0, "byok_usage_daily": 0, "byok_usage_monthly": 0, "byok_usage_weekly": 0, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": true, "label": "My New API Key", "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "name": "My New API Key", "updated_at": null, "usage": 0, "usage_daily": 0, "usage_monthly": 0, "usage_weekly": 0}, "key": "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"} + application/json: {"data": {"byok_usage": 0, "byok_usage_daily": 0, "byok_usage_monthly": 0, "byok_usage_weekly": 0, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": true, "label": "My New API Key", "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "name": "My New API Key", "updated_at": null, "usage": 0, "usage_daily": 0, "usage_monthly": 0, "usage_weekly": 0, "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}, "key": "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"} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": @@ -5197,6 +6747,8 @@ examples: application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} updateKeys: speakeasy-default-update-keys: parameters: @@ -5206,7 +6758,7 @@ examples: application/json: {} responses: "200": - application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": true, "label": "Updated API Key Name", "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "name": "Updated API Key Name", "updated_at": "2025-08-24T16:00:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5}} + application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": true, "label": "Updated API Key Name", "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "name": "Updated API Key Name", "updated_at": "2025-08-24T16:00:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5, "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": @@ -5240,7 +6792,7 @@ examples: hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943" responses: "200": - application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": false, "label": "Production API Key", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "name": "My Production Key", "updated_at": "2025-08-24T15:45:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5}} + application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": false, "label": "Production API Key", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "name": "My Production Key", "updated_at": "2025-08-24T15:45:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5, "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": @@ -5262,7 +6814,7 @@ examples: speakeasy-default-list-guardrails: responses: "200": - application/json: {"data": [{"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail"}], "total_count": 1} + application/json: {"data": [{"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}], "total_count": 1} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "500": @@ -5273,13 +6825,15 @@ examples: application/json: {"name": "My New Guardrail"} responses: "201": - application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail"}} + application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail", "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}} "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"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} getGuardrail: speakeasy-default-get-guardrail: parameters: @@ -5287,7 +6841,7 @@ examples: id: "550e8400-e29b-41d4-a716-446655440000" responses: "200": - application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail"}} + application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": @@ -5303,7 +6857,7 @@ examples: application/json: {} responses: "200": - application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name"}} + application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name", "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": @@ -5573,4 +7127,245 @@ examples: application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createAudioSpeech: + speakeasy-default-create-audio-speech: + requestBody: + application/json: {"input": "Hello world", "model": "elevenlabs/eleven-turbo-v2", "response_format": "pcm", "voice": "alloy"} + responses: + "200": + audio/*: "" + "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"}} + "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"}} + createAudioTranscriptions: + speakeasy-default-create-audio-transcriptions: + requestBody: + application/json: {"input_audio": {"data": "UklGRiQA...", "format": "wav"}, "model": "openai/whisper-large-v3"} + responses: + "200": + application/json: {"text": "Hello, this is a test of OpenAI speech-to-text transcription."} + "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"}} + "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"}} + listBYOKKeys: + speakeasy-default-list-BYOK-keys: + responses: + "200": + application/json: {"data": [{"allowed_api_key_hashes": null, "allowed_models": null, "allowed_user_ids": null, "created_at": "2025-08-24T10:30:00Z", "disabled": false, "id": "11111111-2222-3333-4444-555555555555", "is_fallback": false, "label": "sk-...AbCd", "provider": "openai", "sort_order": 0, "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}], "total_count": 1} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getBYOKKey: + speakeasy-default-get-BYOK-key: + parameters: + path: + id: "11111111-2222-3333-4444-555555555555" + responses: + "200": + application/json: {"data": {"allowed_api_key_hashes": null, "allowed_models": null, "allowed_user_ids": null, "created_at": "2025-08-24T10:30:00Z", "disabled": false, "id": "11111111-2222-3333-4444-555555555555", "is_fallback": false, "label": "sk-...AbCd", "provider": "openai", "sort_order": 0, "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listGenerationContent: + speakeasy-default-list-generation-content: + parameters: + query: + id: "gen-1234567890" + responses: + "200": + application/json: {"data": {"input": {"messages": [{"content": "What is the meaning of life?", "role": "user"}]}, "output": {"completion": "The meaning of life is a philosophical question...", "reasoning": null}}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "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"}} + "524": + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} + "529": + application/json: {"error": {"code": 529, "message": "Provider returned error"}} + listObservabilityDestinations: + speakeasy-default-list-observability-destinations: + responses: + "200": + application/json: {"data": [{"api_key_hashes": null, "config": {"baseUrl": "https://us.cloud.langfuse.com", "publicKey": "pk-l...EfGh", "secretKey": "sk-l...AbCd"}, "created_at": "2025-08-24T10:30:00Z", "enabled": true, "filter_rules": null, "id": "99999999-aaaa-bbbb-cccc-dddddddddddd", "name": "Production Langfuse", "privacy_mode": false, "sampling_rate": 1, "type": "langfuse", "updated_at": "2025-08-24T15:45:00Z", "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}], "total_count": 1} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getObservabilityDestination: + speakeasy-default-get-observability-destination: + parameters: + path: + id: "99999999-aaaa-bbbb-cccc-dddddddddddd" + responses: + "200": + application/json: {"data": {"api_key_hashes": null, "config": {"baseUrl": "https://us.cloud.langfuse.com", "publicKey": "pk-l...EfGh", "secretKey": "sk-l...AbCd"}, "created_at": "2025-08-24T10:30:00Z", "enabled": true, "filter_rules": null, "id": "99999999-aaaa-bbbb-cccc-dddddddddddd", "name": "Production Langfuse", "privacy_mode": false, "sampling_rate": 1, "type": "langfuse", "updated_at": "2025-08-24T15:45:00Z", "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listWorkspaces: + speakeasy-default-list-workspaces: + responses: + "200": + application/json: {"data": [{"created_at": "2025-08-24T10:30:00Z", "created_by": "user_abc123", "default_image_model": "openai/dall-e-3", "default_provider_sort": "price", "default_text_model": "openai/gpt-4o", "description": "Production environment workspace", "id": "550e8400-e29b-41d4-a716-446655440000", "io_logging_api_key_ids": null, "io_logging_sampling_rate": 1, "is_data_discount_logging_enabled": true, "is_observability_broadcast_enabled": false, "is_observability_io_logging_enabled": false, "name": "Production", "slug": "production", "updated_at": "2025-08-24T15:45:00Z"}], "total_count": 1} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createWorkspace: + speakeasy-default-create-workspace: + requestBody: + application/json: {"name": "Production", "slug": "production"} + responses: + "201": + application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "created_by": "user_abc123", "default_image_model": "openai/dall-e-3", "default_provider_sort": "price", "default_text_model": "openai/gpt-4o", "description": "Production environment workspace", "id": "550e8400-e29b-41d4-a716-446655440000", "io_logging_api_key_ids": null, "io_logging_sampling_rate": 1, "is_data_discount_logging_enabled": true, "is_observability_broadcast_enabled": false, "is_observability_io_logging_enabled": false, "name": "Production", "slug": "production", "updated_at": null}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + deleteWorkspace: + speakeasy-default-delete-workspace: + parameters: + path: + id: "production" + responses: + "200": + application/json: {"deleted": true} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getWorkspace: + speakeasy-default-get-workspace: + parameters: + path: + id: "production" + responses: + "200": + application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "created_by": "user_abc123", "default_image_model": "openai/dall-e-3", "default_provider_sort": "price", "default_text_model": "openai/gpt-4o", "description": "Production environment workspace", "id": "550e8400-e29b-41d4-a716-446655440000", "io_logging_api_key_ids": null, "io_logging_sampling_rate": 1, "is_data_discount_logging_enabled": true, "is_observability_broadcast_enabled": false, "is_observability_io_logging_enabled": false, "name": "Production", "slug": "production", "updated_at": "2025-08-24T15:45:00Z"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + updateWorkspace: + speakeasy-default-update-workspace: + parameters: + path: + id: "production" + requestBody: + application/json: {} + responses: + "200": + application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "created_by": "user_abc123", "default_image_model": "openai/dall-e-3", "default_provider_sort": "price", "default_text_model": "openai/gpt-4o", "description": "Production environment workspace", "id": "550e8400-e29b-41d4-a716-446655440000", "io_logging_api_key_ids": null, "io_logging_sampling_rate": 1, "is_data_discount_logging_enabled": true, "is_observability_broadcast_enabled": false, "is_observability_io_logging_enabled": false, "name": "Updated Workspace", "slug": "updated-workspace", "updated_at": "2025-08-25T10:00:00Z"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + bulkAddWorkspaceMembers: + speakeasy-default-bulk-add-workspace-members: + parameters: + path: + id: "production" + requestBody: + application/json: {"user_ids": ["user_abc123", "user_def456"]} + responses: + "200": + application/json: {"added_count": 1, "data": [{"created_at": "2025-08-24T10:30:00Z", "id": "660e8400-e29b-41d4-a716-446655440000", "role": "member", "user_id": "user_abc123", "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}]} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + bulkRemoveWorkspaceMembers: + speakeasy-default-bulk-remove-workspace-members: + parameters: + path: + id: "production" + requestBody: + application/json: {"user_ids": ["user_abc123", "user_def456"]} + responses: + "200": + application/json: {"removed_count": 2} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 +releaseNotes: "## Python SDK Changes:\n* `open_router.chat.send()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed**\n * `error` **Changed**\n* `open_router.beta.responses.send()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n * `error` **Changed**\n* `open_router.tts.create_speech()`: **Added**\n* `open_router.stt.create_transcription()`: **Added**\n* `open_router.byok.list()`: **Added**\n* `open_router.byok.get()`: **Added**\n* `open_router.generations.list_generation_content()`: **Added**\n* `open_router.observability.list()`: **Added**\n* `open_router.observability.get()`: **Added**\n* `open_router.workspaces.list()`: **Added**\n* `open_router.workspaces.create()`: **Added**\n* `open_router.workspaces.delete()`: **Added**\n* `open_router.workspaces.get()`: **Added**\n* `open_router.workspaces.update()`: **Added**\n* `open_router.workspaces.bulk_add_members()`: **Added**\n* `open_router.workspaces.bulk_remove_members()`: **Added**\n* `open_router.analytics.get_user_activity()`: `error.openrouter_metadata` **Added**\n* `open_router.o_auth.exchange_auth_code_for_api_key()`: `error.openrouter_metadata` **Added**\n* `open_router.o_auth.create_auth_code()`: `error.openrouter_metadata` **Added**\n* `open_router.credits.get_credits()`: `error.openrouter_metadata` **Added**\n* `open_router.embeddings.generate()`: \n * `request.input.[array].[].content.[]` **Changed**\n * `response.usage.prompt_tokens_details` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.embeddings.list_models()`: \n * `response.data.[].supported_voices` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.endpoints.list_zdr_endpoints()`: `error.openrouter_metadata` **Added**\n* `open_router.endpoints.list()`: `error.openrouter_metadata` **Added**\n* `open_router.generations.get_generation()`: \n * `response.data` **Changed**\n * `error.openrouter_metadata` **Added**\n* `open_router.guardrails.list()`: \n * `request.workspace_id` **Added**\n * `response.data.[]` **Changed**\n * `error.openrouter_metadata` **Added**\n* `open_router.guardrails.create()`: \n * `request` **Changed**\n * `response.data` **Changed**\n * `error` **Changed**\n* `open_router.guardrails.delete()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.get()`: \n * `response.data` **Changed**\n * `error.openrouter_metadata` **Added**\n* `open_router.guardrails.update()`: \n * `request` **Changed**\n * `response.data` **Changed**\n * `error.openrouter_metadata` **Added**\n* `open_router.guardrails.list_guardrail_key_assignments()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.bulk_assign_keys()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.bulk_unassign_keys()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.list_guardrail_member_assignments()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.bulk_assign_members()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.bulk_unassign_members()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.list_key_assignments()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.list_member_assignments()`: `error.openrouter_metadata` **Added**\n* `open_router.api_keys.get_current_key_metadata()`: `error.openrouter_metadata` **Added**\n* `open_router.api_keys.list()`: \n * `request.workspace_id` **Added**\n * `response.data.[].workspace_id` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.api_keys.create()`: \n * `request.workspace_id` **Added**\n * `response.data.workspace_id` **Added**\n * `error` **Changed**\n* `open_router.api_keys.delete()`: `error.openrouter_metadata` **Added**\n* `open_router.api_keys.get()`: \n * `response.data.workspace_id` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.api_keys.update()`: \n * `response.data.workspace_id` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.models.list()`: \n * `response.data.[].supported_voices` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.models.count()`: `error.openrouter_metadata` **Added**\n* `open_router.models.list_for_user()`: \n * `response.data.[].supported_voices` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.organization.list_members()`: `error.openrouter_metadata` **Added**\n* `open_router.providers.list()`: `error.openrouter_metadata` **Added**\n* `open_router.rerank.rerank()`: `error.openrouter_metadata` **Added**\n* `open_router.video_generation.generate()`: \n * `request` **Changed**\n * `error.openrouter_metadata` **Added**\n* `open_router.video_generation.get_generation()`: `error.openrouter_metadata` **Added**\n* `open_router.video_generation.get_video_content()`: `error.openrouter_metadata` **Added**\n* `open_router.video_generation.list_videos_models()`: `error.openrouter_metadata` **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 27a3b9f..a104a8b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: skipResponseBodyAssertions: false preApplyUnionDiscriminators: true python: - version: 0.9.1 + version: 0.9.2 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 6cbf6ba..cb66da3 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -138,6 +138,62 @@ components: output_index: 0 sequence_number: 5 type: response.output_text.annotation.added + AnthropicAdvisorMessageUsageIteration: + allOf: + - $ref: '#/components/schemas/AnthropicBaseUsageIteration' + - properties: + model: + type: string + type: + enum: + - advisor_message + type: string + required: + - type + - model + type: object + example: + cache_creation: null + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + input_tokens: 823 + model: claude-opus-4-6 + output_tokens: 1612 + type: advisor_message + AnthropicAdvisorToolResult: + example: + content: + text: Advisor response text + type: advisor_result + tool_use_id: srvtoolu_01abc + type: advisor_tool_result + properties: + content: + additionalProperties: + nullable: true + type: object + tool_use_id: + type: string + type: + enum: + - advisor_tool_result + type: string + required: + - type + - tool_use_id + - content + type: object + AnthropicAllowedCallers: + example: + - direct + items: + enum: + - direct + - code_execution_20250825 + - code_execution_20260120 + type: string + x-speakeasy-unknown-values: allow + type: array AnthropicBase64ImageSource: example: data: /9j/4AAQ... @@ -303,6 +359,8 @@ components: - type type: object AnthropicCacheControlDirective: + description: >- + Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. example: type: ephemeral properties: @@ -1153,18 +1211,6 @@ components: example: unavailable type: string x-speakeasy-unknown-values: allow - AnthropicServerToolName: - enum: - - web_search - - web_fetch - - code_execution - - bash_code_execution - - text_editor_code_execution - - tool_search_tool_regex - - tool_search_tool_bm25 - example: web_search - type: string - x-speakeasy-unknown-values: allow AnthropicServerToolUsage: example: web_fetch_requests: 0 @@ -1179,34 +1225,6 @@ components: - web_search_requests - web_fetch_requests type: object - AnthropicServerToolUseBlock: - example: - caller: - type: direct - id: srvtoolu_01abc - input: - query: latest news - name: web_search - type: server_tool_use - properties: - caller: - $ref: '#/components/schemas/AnthropicCaller' - id: - type: string - input: - nullable: true - name: - $ref: '#/components/schemas/AnthropicServerToolName' - type: - enum: - - server_tool_use - type: string - required: - - type - - id - - caller - - name - type: object AnthropicServiceTier: enum: - standard @@ -1489,6 +1507,15 @@ components: - thinking - signature type: object + AnthropicThinkingDisplay: + enum: + - summarized + - omitted + - null + example: summarized + nullable: true + type: string + x-speakeasy-unknown-values: allow AnthropicThinkingTurns: example: type: thinking_turns @@ -1743,6 +1770,7 @@ components: anyOf: - $ref: '#/components/schemas/AnthropicCompactionUsageIteration' - $ref: '#/components/schemas/AnthropicMessageUsageIteration' + - $ref: '#/components/schemas/AnthropicAdvisorMessageUsageIteration' - $ref: '#/components/schemas/AnthropicUnknownUsageIteration' example: cache_creation: null @@ -1996,6 +2024,190 @@ components: required: - type type: object + ApplyPatchCallItem: + description: >- + A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn. + example: + call_id: call_abc123 + id: apc_abc123 + operation: + diff: |- + @@ function main() { + + console.log("hi"); + } + path: /src/main.ts + type: update_file + status: completed + type: apply_patch_call + properties: + call_id: + type: string + id: + nullable: true + type: string + operation: + $ref: '#/components/schemas/ApplyPatchCallOperation' + status: + $ref: '#/components/schemas/ApplyPatchCallStatus' + type: + enum: + - apply_patch_call + type: string + required: + - type + - call_id + - status + - operation + type: object + ApplyPatchCallOperation: + description: >- + The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it. + example: + diff: |- + @@ function main() { + + console.log("hi"); + } + path: /src/main.ts + type: update_file + oneOf: + - properties: + diff: + type: string + path: + type: string + type: + enum: + - create_file + type: string + required: + - type + - path + - diff + type: object + - properties: + diff: + type: string + path: + type: string + type: + enum: + - update_file + type: string + required: + - type + - path + - diff + type: object + - properties: + path: + type: string + type: + enum: + - delete_file + type: string + required: + - type + - path + type: object + ApplyPatchCallOperationDiffDeltaEvent: + description: Incremental chunk of `operation.diff` for an `apply_patch_call`. Matches OpenAI's streaming shape. + example: + delta: | + +console.log("hi"); + item_id: apc_abc123 + output_index: 0 + sequence_number: 5 + type: response.apply_patch_call_operation_diff.delta + properties: + delta: + type: string + item_id: + type: string + output_index: + type: integer + sequence_number: + type: integer + type: + enum: + - response.apply_patch_call_operation_diff.delta + type: string + required: + - type + - item_id + - output_index + - delta + - sequence_number + type: object + ApplyPatchCallOperationDiffDoneEvent: + description: Emitted when `operation.diff` streaming completes for an `apply_patch_call`. + example: + diff: | + @@ + +console.log("hi"); + item_id: apc_abc123 + output_index: 0 + sequence_number: 12 + type: response.apply_patch_call_operation_diff.done + properties: + diff: + type: string + item_id: + type: string + output_index: + type: integer + sequence_number: + type: integer + type: + enum: + - response.apply_patch_call_operation_diff.done + type: string + required: + - type + - item_id + - output_index + - diff + - sequence_number + type: object + ApplyPatchCallOutputItem: + description: >- + The client's echo of an `apply_patch_call` after applying the patch. `output` is an optional human-readable log; `status` is `completed` when the patch was applied successfully, `failed` otherwise. + example: + call_id: call_abc123 + output: Applied patch to /src/main.ts + status: completed + type: apply_patch_call_output + properties: + call_id: + type: string + id: + nullable: true + type: string + output: + nullable: true + type: string + status: + enum: + - completed + - failed + type: string + x-speakeasy-unknown-values: allow + type: + enum: + - apply_patch_call_output + type: string + required: + - type + - call_id + - status + type: object + ApplyPatchCallStatus: + description: Lifecycle state of an `apply_patch_call` output item. + enum: + - in_progress + - completed + example: completed + type: string + x-speakeasy-unknown-values: allow ApplyPatchServerTool: description: Apply patch tool configuration example: @@ -2008,6 +2220,26 @@ components: required: - type type: object + ApplyPatchServerTool_OpenRouter: + description: >- + OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API. + example: + type: openrouter:apply_patch + properties: + parameters: + $ref: '#/components/schemas/ApplyPatchServerToolConfig' + type: + enum: + - openrouter:apply_patch + type: string + required: + - type + type: object + ApplyPatchServerToolConfig: + description: Configuration for the openrouter:apply_patch server tool + example: {} + properties: {} + type: object AutoRouterPlugin: example: allowed_models: @@ -2045,6 +2277,11 @@ components: properties: error: $ref: '#/components/schemas/BadGatewayResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object user_id: nullable: true type: string @@ -2079,6 +2316,11 @@ components: properties: error: $ref: '#/components/schemas/BadRequestResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object user_id: nullable: true type: string @@ -2219,44 +2461,15 @@ components: - part - sequence_number type: object - BaseErrorEvent: - description: Event emitted when an error occurs during streaming - example: - code: rate_limit_exceeded - message: Rate limit exceeded. Please try again later. - param: null - sequence_number: 2 - type: error - properties: - code: - nullable: true - type: string - message: - type: string - param: - nullable: true - type: string - sequence_number: - type: integer - type: - enum: - - error - type: string - required: - - type - - code - - message - - param - - sequence_number - type: object - BaseFunctionCallArgsDeltaEvent: - description: Event emitted when function call arguments are being streamed + BaseCustomToolCallInputDeltaEvent: + description: >- + Event emitted when a custom tool call's freeform input is being streamed. Mirrors `response.function_call_arguments.delta` but for `custom` tools whose input is opaque text rather than JSON arguments. example: - delta: '{"city": "..."}' + delta: '*** Begin Patch' item_id: item-1 output_index: 0 sequence_number: 4 - type: response.function_call_arguments.delta + type: response.custom_tool_call_input.delta properties: delta: type: string @@ -2268,7 +2481,7 @@ components: type: integer type: enum: - - response.function_call_arguments.delta + - response.custom_tool_call_input.delta type: string required: - type @@ -2277,22 +2490,111 @@ components: - delta - sequence_number type: object - BaseFunctionCallArgsDoneEvent: - description: Event emitted when function call arguments streaming is complete + BaseCustomToolCallInputDoneEvent: + description: >- + Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools. example: - arguments: '{"city": "San Francisco", "units": "celsius"}' + input: |- + *** Begin Patch + *** End Patch item_id: item-1 - name: get_weather output_index: 0 sequence_number: 6 - type: response.function_call_arguments.done + type: response.custom_tool_call_input.done properties: - arguments: + input: type: string item_id: type: string - name: - type: string + output_index: + type: integer + sequence_number: + type: integer + type: + enum: + - response.custom_tool_call_input.done + type: string + required: + - type + - item_id + - output_index + - input + - sequence_number + type: object + BaseErrorEvent: + description: Event emitted when an error occurs during streaming + example: + code: rate_limit_exceeded + message: Rate limit exceeded. Please try again later. + param: null + sequence_number: 2 + type: error + properties: + code: + nullable: true + type: string + message: + type: string + param: + nullable: true + type: string + sequence_number: + type: integer + type: + enum: + - error + type: string + required: + - type + - code + - message + - param + - sequence_number + type: object + BaseFunctionCallArgsDeltaEvent: + description: Event emitted when function call arguments are being streamed + example: + delta: '{"city": "..."}' + item_id: item-1 + output_index: 0 + sequence_number: 4 + type: response.function_call_arguments.delta + properties: + delta: + type: string + item_id: + type: string + output_index: + type: integer + sequence_number: + type: integer + type: + enum: + - response.function_call_arguments.delta + type: string + required: + - type + - item_id + - output_index + - delta + - sequence_number + type: object + BaseFunctionCallArgsDoneEvent: + description: Event emitted when function call arguments streaming is complete + example: + arguments: '{"city": "San Francisco", "units": "celsius"}' + item_id: item-1 + name: get_weather + output_index: 0 + sequence_number: 6 + type: response.function_call_arguments.done + properties: + arguments: + type: string + item_id: + type: string + name: + type: string output_index: type: integer sequence_number: @@ -2368,6 +2670,10 @@ components: - $ref: '#/components/schemas/OpenAIResponseFunctionToolCall' - $ref: '#/components/schemas/OutputItemImageGenerationCall' - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/OpenAIResponseCustomToolCall' + - $ref: '#/components/schemas/OpenAIResponseCustomToolCallOutput' + - $ref: '#/components/schemas/ApplyPatchCallItem' + - $ref: '#/components/schemas/ApplyPatchCallOutputItem' type: array - nullable: true example: @@ -2378,7 +2684,7 @@ components: example: container: null content: - - citations: null + - citations: [] text: Hello! type: text id: msg_01XFDUDYJgAACzvnptvVoYEL @@ -2780,6 +3086,7 @@ components: items: discriminator: mapping: + custom_tool_call: '#/components/schemas/OutputItemCustomToolCall' file_search_call: '#/components/schemas/OutputItemFileSearchCall' function_call: '#/components/schemas/OutputItemFunctionCall' image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' @@ -2791,6 +3098,7 @@ components: - $ref: '#/components/schemas/OutputMessage' - $ref: '#/components/schemas/OutputItemReasoning' - $ref: '#/components/schemas/OutputItemFunctionCall' + - $ref: '#/components/schemas/OutputItemCustomToolCall' - $ref: '#/components/schemas/OutputItemWebSearchCall' - $ref: '#/components/schemas/OutputItemFileSearchCall' - $ref: '#/components/schemas/OutputItemImageGenerationCall' @@ -2983,6 +3291,48 @@ components: description: Price per million prompt tokens example: 1000 type: string + BulkAddWorkspaceMembersRequest: + example: + user_ids: + - user_abc123 + - user_def456 + properties: + user_ids: + description: List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization. + example: + - user_abc123 + - user_def456 + items: + type: string + maxItems: 100 + minItems: 1 + type: array + required: + - user_ids + type: object + BulkAddWorkspaceMembersResponse: + example: + added_count: 1 + data: + - created_at: '2025-08-24T10:30:00Z' + id: 660e8400-e29b-41d4-a716-446655440000 + role: member + user_id: user_abc123 + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + properties: + added_count: + description: Number of workspace memberships created or updated + example: 2 + type: integer + data: + description: List of added workspace memberships + items: + $ref: '#/components/schemas/WorkspaceMember' + type: array + required: + - data + - added_count + type: object BulkAssignKeysRequest: example: key_hashes: @@ -3041,6 +3391,36 @@ components: required: - assigned_count type: object + BulkRemoveWorkspaceMembersRequest: + example: + user_ids: + - user_abc123 + - user_def456 + properties: + user_ids: + description: List of user IDs to remove from the workspace + example: + - user_abc123 + - user_def456 + items: + type: string + maxItems: 100 + minItems: 1 + type: array + required: + - user_ids + type: object + BulkRemoveWorkspaceMembersResponse: + example: + removed_count: 2 + properties: + removed_count: + description: Number of members removed + example: 2 + type: integer + required: + - removed_count + type: object BulkUnassignKeysRequest: example: key_hashes: @@ -3099,6 +3479,185 @@ components: required: - unassigned_count type: object + BYOKKey: + example: + allowed_api_key_hashes: null + allowed_models: null + allowed_user_ids: null + created_at: '2025-08-24T10:30:00Z' + disabled: false + id: 11111111-2222-3333-4444-555555555555 + is_fallback: false + label: sk-...AbCd + name: Production OpenAI Key + provider: openai + sort_order: 0 + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + properties: + allowed_api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. + example: + - f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + items: + type: string + maxItems: 100 + nullable: true + type: array + allowed_models: + description: Optional allowlist of model slugs this credential may be used for. `null` means no restriction. + example: null + items: + type: string + maxItems: 100 + nullable: true + type: array + allowed_user_ids: + description: Optional allowlist of user IDs that may use this credential. `null` means no restriction. + example: null + items: + type: string + maxItems: 100 + nullable: true + type: array + created_at: + description: ISO timestamp of when the credential was created. + example: '2025-08-24T10:30:00Z' + type: string + disabled: + description: Whether this credential is currently disabled. + example: false + type: boolean + id: + description: Stable public identifier for this BYOK credential. + example: 11111111-2222-3333-4444-555555555555 + format: uuid + type: string + is_fallback: + description: >- + Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried. + example: false + type: boolean + label: + description: Short masked snippet of the key (e.g. the first/last few characters) used to identify it in the UI. + example: sk-...AbCd + type: string + name: + description: Optional human-readable name for the credential. + example: Production OpenAI Key + nullable: true + type: string + provider: + $ref: '#/components/schemas/BYOKProviderSlug' + sort_order: + description: Position within the provider — credentials are tried in ascending sort order. + example: 0 + type: integer + workspace_id: + description: ID of the workspace this credential belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string + required: + - id + - provider + - workspace_id + - label + - disabled + - is_fallback + - allowed_models + - allowed_api_key_hashes + - allowed_user_ids + - sort_order + - created_at + type: object + BYOKProviderSlug: + description: >- + The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`). + enum: + - ai21 + - aion-labs + - akashml + - alibaba + - amazon-bedrock + - amazon-nova + - ambient + - anthropic + - arcee-ai + - atlas-cloud + - avian + - azure + - baidu + - baseten + - black-forest-labs + - byteplus + - cerebras + - chutes + - cirrascale + - clarifai + - cloudflare + - cohere + - crusoe + - deepinfra + - deepseek + - dekallm + - featherless + - fireworks + - friendli + - gmicloud + - google-ai-studio + - google-vertex + - groq + - hyperbolic + - inception + - inceptron + - inference-net + - infermatic + - inflection + - io-net + - ionstream + - liquid + - mancer + - mara + - minimax + - mistral + - modelrun + - modular + - moonshotai + - morph + - ncompass + - nebius + - nex-agi + - nextbit + - novita + - nvidia + - open-inference + - openai + - parasail + - perceptron + - perplexity + - phala + - poolside + - recraft + - reka + - relace + - sambanova + - seed + - siliconflow + - sourceful + - stepfun + - streamlake + - switchpoint + - together + - upstage + - venice + - wandb + - xai + - xiaomi + - z-ai + example: openai + type: string + x-speakeasy-unknown-values: allow ChatAssistantImages: description: Generated images from image generation models example: @@ -3547,6 +4106,7 @@ components: - $ref: '#/components/schemas/DatetimeServerTool' - $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter' - $ref: '#/components/schemas/ChatSearchModelsServerTool' + - $ref: '#/components/schemas/WebFetchServerTool' - $ref: '#/components/schemas/OpenRouterWebSearchServerTool' - $ref: '#/components/schemas/ChatWebSearchShorthand' description: Tool definition for function calling (regular function or OpenRouter built-in server tool) @@ -3696,10 +4256,7 @@ components: temperature: 0.7 properties: cache_control: - allOf: - - $ref: '#/components/schemas/AnthropicCacheControlDirective' - - description: >- - 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. + $ref: '#/components/schemas/AnthropicCacheControlDirective' debug: $ref: '#/components/schemas/ChatDebugOptions' frequency_penalty: @@ -3782,7 +4339,9 @@ components: auto-router: '#/components/schemas/AutoRouterPlugin' context-compression: '#/components/schemas/ContextCompressionPlugin' file-parser: '#/components/schemas/FileParserPlugin' + fusion: '#/components/schemas/FusionPlugin' moderation: '#/components/schemas/ModerationPlugin' + pareto-router: '#/components/schemas/ParetoRouterPlugin' response-healing: '#/components/schemas/ResponseHealingPlugin' web: '#/components/schemas/WebSearchPlugin' propertyName: id @@ -3793,6 +4352,8 @@ components: - $ref: '#/components/schemas/FileParserPlugin' - $ref: '#/components/schemas/ResponseHealingPlugin' - $ref: '#/components/schemas/ContextCompressionPlugin' + - $ref: '#/components/schemas/ParetoRouterPlugin' + - $ref: '#/components/schemas/FusionPlugin' type: array presence_penalty: description: Presence penalty (-2.0 to 2.0) @@ -3963,6 +4524,8 @@ components: enum: - chat.completion type: string + openrouter_metadata: + $ref: '#/components/schemas/OpenRouterMetadata' service_tier: description: The service tier used by the upstream provider for this request example: default @@ -4077,6 +4640,8 @@ components: enum: - chat.completion.chunk type: string + openrouter_metadata: + $ref: '#/components/schemas/OpenRouterMetadata' service_tier: description: The service tier used by the upstream provider for this request example: default @@ -4135,6 +4700,25 @@ components: $ref: '#/components/schemas/ChatStreamToolCall' type: array type: object + ChatStreamingResponse: + example: + data: + choices: + - delta: + content: Hello + role: assistant + finish_reason: null + index: 0 + created: 1677652288 + id: chatcmpl-123 + model: openai/gpt-4 + object: chat.completion.chunk + properties: + data: + $ref: '#/components/schemas/ChatStreamChunk' + required: + - data + type: object ChatStreamOptions: description: Streaming configuration options example: @@ -4378,6 +4962,12 @@ components: completion_tokens: 15 completion_tokens_details: reasoning_tokens: 5 + cost: 0.0012 + cost_details: + upstream_inference_completions_cost: 0.0004 + upstream_inference_cost: null + upstream_inference_prompt_cost: 0.0008 + is_byok: false prompt_tokens: 10 prompt_tokens_details: cached_tokens: 2 @@ -4407,6 +4997,16 @@ components: nullable: true type: integer type: object + cost: + description: Cost of the completion + format: double + nullable: true + type: number + cost_details: + $ref: '#/components/schemas/CostDetails' + is_byok: + description: Whether a request was made using a Bring Your Own Key configuration + type: boolean prompt_tokens: description: Number of tokens in the prompt type: integer @@ -4468,7 +5068,7 @@ components: properties: allowed_domains: description: >- - Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity. + Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains. items: type: string type: array @@ -4476,7 +5076,7 @@ components: $ref: '#/components/schemas/WebSearchEngineEnum' excluded_domains: description: >- - Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity. + Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains. items: type: string type: array @@ -4487,8 +5087,8 @@ components: type: integer max_total_results: description: >- - Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. - example: 20 + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified. + example: 50 type: integer parameters: $ref: '#/components/schemas/WebSearchConfig' @@ -4618,6 +5218,25 @@ components: required: - type type: object + CompactionItem: + description: A context compaction marker with encrypted summary + example: + encrypted_content: enc_abc123... + type: compaction + properties: + encrypted_content: + type: string + id: + nullable: true + type: string + type: + enum: + - compaction + type: string + required: + - type + - encrypted_content + type: object CompletedEvent: description: Event emitted when a response has completed successfully example: @@ -4727,6 +5346,11 @@ components: properties: error: $ref: '#/components/schemas/ConflictResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object user_id: nullable: true type: string @@ -4752,6 +5376,82 @@ components: - code - message type: object + ContentFilterAction: + description: Action taken when the pattern matches + enum: + - redact + - block + example: block + type: string + x-speakeasy-unknown-values: allow + ContentFilterBuiltinAction: + description: Action taken when the builtin filter triggers + enum: + - redact + - block + - flag + example: block + type: string + x-speakeasy-unknown-values: allow + ContentFilterBuiltinEntry: + description: >- + A builtin content filter entry. Builtin filters include PII detectors and the regex-based prompt injection detector. + example: + action: block + label: '[PROMPT_INJECTION]' + slug: regex-prompt-injection + properties: + action: + $ref: '#/components/schemas/ContentFilterBuiltinAction' + label: + description: Optional label used in redaction placeholders (e.g. "[PROMPT_INJECTION]") + example: '[PROMPT_INJECTION]' + maxLength: 100 + type: string + slug: + $ref: '#/components/schemas/ContentFilterBuiltinSlug' + required: + - slug + - action + type: object + ContentFilterBuiltinSlug: + description: The builtin filter identifier + enum: + - email + - phone + - ssn + - credit-card + - ip-address + - person-name + - address + - regex-prompt-injection + example: regex-prompt-injection + type: string + x-speakeasy-unknown-values: allow + ContentFilterEntry: + description: A custom regex content filter that scans request messages for matching patterns. + example: + action: redact + label: '[API_KEY]' + pattern: \b(sk-[a-zA-Z0-9]{48})\b + properties: + action: + $ref: '#/components/schemas/ContentFilterAction' + label: + description: Optional label used in redaction placeholders or error messages + example: '[API_KEY]' + maxLength: 100 + nullable: true + type: string + pattern: + description: A regex pattern to match against request content + example: \b(sk-[a-zA-Z0-9]{48})\b + minLength: 1 + type: string + required: + - pattern + - action + type: object ContentPartAddedEvent: allOf: - $ref: '#/components/schemas/BaseContentPartAddedEvent' @@ -4815,9 +5515,60 @@ components: - type - image_url type: object - ContextCompressionEngine: - description: The compression engine to use. Defaults to "middle-out". - enum: + ContentPartInputAudio: + example: + input_audio: + data: data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA... + format: wav + type: input_audio + properties: + input_audio: + $ref: '#/components/schemas/MultimodalMedia' + type: + enum: + - input_audio + type: string + required: + - type + - input_audio + type: object + ContentPartInputFile: + example: + input_file: + data: data:application/pdf;base64,JVBERi0xLjQKJeLjz9MKMyAw... + format: pdf + type: input_file + properties: + input_file: + $ref: '#/components/schemas/MultimodalMedia' + type: + enum: + - input_file + type: string + required: + - type + - input_file + type: object + ContentPartInputVideo: + example: + input_video: + data: data:video/mp4;base64,AAAAGGZ0eXBtcDQyAAAAAGlzb21tcDQy... + format: mp4 + type: input_video + properties: + input_video: + $ref: '#/components/schemas/MultimodalMedia' + type: + enum: + - input_video + type: string + required: + - type + - input_video + type: object + ContextCompressionEngine: + description: The compression engine to use. Defaults to "middle-out". + enum: - middle-out example: middle-out type: string @@ -4839,6 +5590,28 @@ components: required: - id type: object + CostDetails: + description: Breakdown of upstream inference costs + example: + upstream_inference_completions_cost: 0.0004 + upstream_inference_cost: null + upstream_inference_prompt_cost: 0.0008 + nullable: true + properties: + upstream_inference_completions_cost: + format: double + type: number + upstream_inference_cost: + format: double + nullable: true + type: number + upstream_inference_prompt_cost: + format: double + type: number + required: + - upstream_inference_prompt_cost + - upstream_inference_completions_cost + type: object CreatedEvent: description: Event emitted when a response is created example: @@ -4882,8 +5655,15 @@ components: - openai - anthropic - deepseek + content_filter_builtins: + - action: block + slug: regex-prompt-injection + content_filters: null description: A guardrail for limiting API usage - enforce_zdr: false + enforce_zdr_anthropic: true + enforce_zdr_google: false + enforce_zdr_openai: true + enforce_zdr_other: false ignored_models: null ignored_providers: null limit_usd: 50 @@ -4912,6 +5692,26 @@ components: minItems: 1 nullable: true type: array + content_filter_builtins: + description: >- + Builtin content filters to apply. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. + example: + - action: block + slug: regex-prompt-injection + items: + $ref: '#/components/schemas/ContentFilterBuiltinEntry' + nullable: true + type: array + content_filters: + description: Custom regex content filters to apply to request messages + example: + - action: redact + label: '[API_KEY]' + pattern: \b(sk-[a-zA-Z0-9]{48})\b + items: + $ref: '#/components/schemas/ContentFilterEntry' + nullable: true + type: array description: description: Description of the guardrail example: A guardrail for limiting API usage @@ -4919,7 +5719,30 @@ components: nullable: true type: string enforce_zdr: - description: Whether to enforce zero data retention + deprecated: true + description: >- + Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. + example: false + nullable: true + type: boolean + enforce_zdr_anthropic: + description: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. + example: false + nullable: true + type: boolean + enforce_zdr_google: + description: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. + example: false + nullable: true + type: boolean + enforce_zdr_openai: + description: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. + example: false + nullable: true + type: boolean + enforce_zdr_other: + description: >- + Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. example: false nullable: true type: boolean @@ -4955,6 +5778,11 @@ components: type: string reset_interval: $ref: '#/components/schemas/GuardrailInterval' + workspace_id: + description: The workspace to create the guardrail in. Defaults to the default workspace if not provided. + example: 0df9e665-d932-5740-b2c7-b52af166bc11 + format: uuid + type: string required: - name type: object @@ -4966,9 +5794,18 @@ components: - openai - anthropic - google + content_filter_builtins: + - action: block + label: '[PROMPT_INJECTION]' + slug: regex-prompt-injection + content_filters: null created_at: '2025-08-24T10:30:00Z' description: A guardrail for limiting API usage - enforce_zdr: false + enforce_zdr: null + enforce_zdr_anthropic: true + enforce_zdr_google: false + enforce_zdr_openai: true + enforce_zdr_other: false id: 550e8400-e29b-41d4-a716-446655440000 ignored_models: null ignored_providers: null @@ -4976,6 +5813,7 @@ components: name: My New Guardrail reset_interval: monthly updated_at: null + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 properties: data: allOf: @@ -4984,6 +5822,103 @@ components: required: - data type: object + CreateWorkspaceRequest: + example: + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + name: Production + slug: production + properties: + default_image_model: + description: Default image model for this workspace + example: openai/dall-e-3 + nullable: true + type: string + default_provider_sort: + description: Default provider sort preference (price, throughput, latency, exacto) + example: price + nullable: true + type: string + default_text_model: + description: Default text model for this workspace + example: openai/gpt-4o + nullable: true + type: string + description: + description: Description of the workspace + example: Production environment workspace + maxLength: 500 + nullable: true + type: string + io_logging_api_key_ids: + description: Optional array of API key IDs to filter I/O logging + example: null + items: + type: integer + nullable: true + type: array + io_logging_sampling_rate: + description: Sampling rate for I/O logging (0.0001-1) + example: 1 + format: double + type: number + is_data_discount_logging_enabled: + description: Whether data discount logging is enabled + example: true + type: boolean + is_observability_broadcast_enabled: + description: Whether broadcast is enabled + example: false + type: boolean + is_observability_io_logging_enabled: + description: Whether private logging is enabled + example: false + type: boolean + name: + description: Name for the new workspace + example: Production + maxLength: 100 + minLength: 1 + type: string + slug: + description: URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens) + example: production + maxLength: 50 + minLength: 1 + pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ + type: string + required: + - name + - slug + type: object + CreateWorkspaceResponse: + example: + data: + created_at: '2025-08-24T10:30:00Z' + created_by: user_abc123 + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + id: 550e8400-e29b-41d4-a716-446655440000 + io_logging_api_key_ids: null + io_logging_sampling_rate: 1 + is_data_discount_logging_enabled: true + is_observability_broadcast_enabled: false + is_observability_io_logging_enabled: false + name: Production + slug: production + updated_at: null + properties: + data: + allOf: + - $ref: '#/components/schemas/Workspace' + - description: The created workspace + required: + - data + type: object CustomTool: description: Custom tool configuration example: @@ -5030,6 +5965,96 @@ components: - type - name type: object + CustomToolCallInputDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseCustomToolCallInputDeltaEvent' + - properties: {} + type: object + description: >- + Event emitted when a custom tool call's freeform input is being streamed. Mirrors `response.function_call_arguments.delta` but for `custom` tools whose input is opaque text rather than JSON arguments. + example: + delta: '*** Begin Patch' + item_id: item-1 + output_index: 0 + sequence_number: 4 + type: response.custom_tool_call_input.delta + CustomToolCallInputDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseCustomToolCallInputDoneEvent' + - properties: {} + type: object + description: >- + Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools. + example: + input: |- + *** Begin Patch + *** End Patch + item_id: item-1 + output_index: 0 + sequence_number: 6 + type: response.custom_tool_call_input.done + CustomToolCallItem: + description: >- + A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments. + example: + call_id: call-abc123 + id: ctc-abc123 + input: |- + *** Begin Patch + *** End Patch + name: apply_patch + type: custom_tool_call + properties: + call_id: + type: string + id: + type: string + input: + type: string + name: + type: string + namespace: + description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) + type: string + type: + enum: + - custom_tool_call + type: string + required: + - type + - call_id + - name + - input + type: object + CustomToolCallOutputItem: + allOf: + - $ref: '#/components/schemas/OpenAIResponseCustomToolCallOutput' + - properties: + output: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/InputText' + - allOf: + - $ref: '#/components/schemas/InputImage' + - properties: {} + type: object + description: Image input content item + example: + detail: auto + image_url: https://example.com/image.jpg + type: input_image + - $ref: '#/components/schemas/InputFile' + type: array + type: object + description: >- + The output from a custom (freeform-grammar) tool call execution. Mirrors `function_call_output` but is matched to a `custom_tool_call` rather than a `function_call`. + example: + call_id: call-abc123 + id: ctco-abc123 + output: patch applied successfully + type: custom_tool_call_output DatetimeServerTool: description: 'OpenRouter built-in server tool: returns the current date and time' example: @@ -5104,6 +6129,18 @@ components: required: - deleted type: object + DeleteWorkspaceResponse: + example: + deleted: true + properties: + deleted: + const: true + description: Confirmation that the workspace was deleted + example: true + type: boolean + required: + - deleted + type: object DeprecatedRoute: deprecated: true description: >- @@ -5186,6 +6223,11 @@ components: properties: error: $ref: '#/components/schemas/EdgeNetworkTimeoutResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object user_id: nullable: true type: string @@ -5211,6 +6253,41 @@ components: - code - message type: object + EndpointInfo: + example: + model: openai/gpt-4o + provider: OpenAI + selected: true + properties: + model: + type: string + provider: + type: string + selected: + type: boolean + required: + - provider + - model + - selected + type: object + EndpointsMetadata: + example: + available: + - model: openai/gpt-4o + provider: OpenAI + selected: true + total: 3 + properties: + available: + items: + $ref: '#/components/schemas/EndpointInfo' + type: array + total: + type: integer + required: + - total + - available + type: object EndpointStatus: enum: - 0 @@ -5407,6 +6484,11 @@ components: properties: error: $ref: '#/components/schemas/ForbiddenResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object user_id: nullable: true type: string @@ -5631,31 +6713,588 @@ components: - name - parameters type: object - GetGuardrailResponse: + FusionPlugin: example: - data: - allowed_models: null - allowed_providers: - - openai - - anthropic - - google - created_at: '2025-08-24T10:30:00Z' - description: Guardrail for production environment - enforce_zdr: false - id: 550e8400-e29b-41d4-a716-446655440000 - ignored_models: null - ignored_providers: null - limit_usd: 100 - name: Production Guardrail - reset_interval: monthly - updated_at: '2025-08-24T15:45:00Z' + analysis_models: + - ~anthropic/claude-opus-latest + - ~openai/gpt-latest + - ~google/gemini-pro-latest + enabled: true + id: fusion + model: ~anthropic/claude-opus-latest properties: - data: - allOf: - - $ref: '#/components/schemas/Guardrail' - - description: The guardrail + analysis_models: + description: >- + Slugs of models to run in parallel as the "expert panel" the judge analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest). + example: + - ~anthropic/claude-opus-latest + - ~openai/gpt-latest + - ~google/gemini-pro-latest + items: + type: string + maxItems: 8 + minItems: 1 + type: array + enabled: + description: Set to false to disable the fusion plugin for this request. Defaults to true. + type: boolean + id: + enum: + - fusion + type: string + max_tool_calls: + description: >- + Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16. + example: 12 + maximum: 16 + minimum: 1 + type: integer + model: + description: >- + Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset. + example: ~anthropic/claude-opus-latest + type: string required: - - data + - id + type: object + FusionServerTool_OpenRouter: + description: >- + OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks a judge model to summarize their collective output as structured JSON the outer model can synthesize from. + example: + parameters: + analysis_models: + - ~anthropic/claude-opus-latest + - ~openai/gpt-latest + type: openrouter:fusion + properties: + parameters: + $ref: '#/components/schemas/FusionServerToolConfig' + type: + enum: + - openrouter:fusion + type: string + required: + - type + type: object + FusionServerToolConfig: + description: Configuration for the openrouter:fusion server tool. + example: + analysis_models: + - ~anthropic/claude-opus-latest + - ~openai/gpt-latest + - ~google/gemini-pro-latest + properties: + analysis_models: + description: >- + Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion. + example: + - ~anthropic/claude-opus-latest + - ~openai/gpt-latest + - ~google/gemini-pro-latest + items: + type: string + maxItems: 8 + minItems: 1 + type: array + max_tool_calls: + description: >- + Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16. + example: 12 + maximum: 16 + minimum: 1 + type: integer + model: + description: >- + Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request. + example: ~anthropic/claude-opus-latest + type: string + type: object + GenerationContentData: + description: Stored prompt and completion content + example: + input: + messages: + - content: What is the meaning of life? + role: user + output: + completion: The meaning of life is a philosophical question... + reasoning: null + properties: + input: + anyOf: + - properties: + prompt: + example: What is the meaning of life? + type: string + required: + - prompt + type: object + - properties: + messages: + example: + - content: What is the meaning of life? + role: user + items: + nullable: true + type: array + required: + - messages + type: object + description: The input to the generation — either a prompt string or an array of messages + output: + description: The output from the generation + properties: + completion: + description: The completion output + example: The meaning of life is a philosophical question... + nullable: true + type: string + reasoning: + description: Reasoning/thinking output, if any + example: null + nullable: true + type: string + required: + - reasoning + - completion + type: object + required: + - input + - output + type: object + GenerationContentResponse: + description: Stored prompt and completion content for a generation + example: + data: + input: + messages: + - content: What is the meaning of life? + role: user + output: + completion: The meaning of life is a philosophical question... + reasoning: null + properties: + data: + $ref: '#/components/schemas/GenerationContentData' + required: + - data + type: object + GenerationResponse: + description: Generation response + example: + data: + api_type: completions + app_id: 12345 + cache_discount: null + cancelled: false + created_at: '2024-07-15T23:33:19.433273+00:00' + external_user: user-123 + finish_reason: stop + generation_time: 1200 + http_referer: https://openrouter.ai/ + id: gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG + is_byok: false + latency: 1250 + model: sao10k/l3-stheno-8b + moderation_latency: 50 + native_finish_reason: stop + native_tokens_cached: 3 + native_tokens_completion: 25 + native_tokens_completion_images: 0 + native_tokens_prompt: 10 + native_tokens_reasoning: 5 + num_input_audio_prompt: 0 + num_media_completion: 0 + num_media_prompt: 1 + num_search_results: 5 + origin: https://openrouter.ai/ + provider_name: Infermatic + provider_responses: null + request_id: req-1727282430-aBcDeFgHiJkLmNoPqRsT + router: openrouter/auto + service_tier: priority + session_id: null + streamed: true + tokens_completion: 25 + tokens_prompt: 10 + total_cost: 0.0015 + upstream_id: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 + upstream_inference_cost: 0.0012 + usage: 0.0015 + user_agent: Mozilla/5.0 + properties: + data: + description: Generation data + properties: + api_type: + description: Type of API used for the generation + enum: + - completions + - embeddings + - rerank + - tts + - stt + - video + - null + nullable: true + type: string + x-speakeasy-unknown-values: allow + app_id: + description: ID of the app that made the request + example: 12345 + nullable: true + type: integer + cache_discount: + description: Discount applied due to caching + example: 0.0002 + format: double + nullable: true + type: number + cancelled: + description: Whether the generation was cancelled + example: false + nullable: true + type: boolean + created_at: + description: ISO 8601 timestamp of when the generation was created + example: '2024-07-15T23:33:19.433273+00:00' + type: string + external_user: + description: External user identifier + example: user-123 + nullable: true + type: string + finish_reason: + description: Reason the generation finished + example: stop + nullable: true + type: string + generation_time: + description: Time taken for generation in milliseconds + example: 1200 + format: double + nullable: true + type: number + http_referer: + description: Referer header from the request + nullable: true + type: string + id: + description: Unique identifier for the generation + example: gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG + type: string + is_byok: + description: Whether this used bring-your-own-key + example: false + type: boolean + latency: + description: Total latency in milliseconds + example: 1250 + format: double + nullable: true + type: number + model: + description: Model used for the generation + example: sao10k/l3-stheno-8b + type: string + moderation_latency: + description: Moderation latency in milliseconds + example: 50 + format: double + nullable: true + type: number + native_finish_reason: + description: Native finish reason as reported by provider + example: stop + nullable: true + type: string + native_tokens_cached: + description: Native cached tokens as reported by provider + example: 3 + nullable: true + type: integer + native_tokens_completion: + description: Native completion tokens as reported by provider + example: 25 + nullable: true + type: integer + native_tokens_completion_images: + description: Native completion image tokens as reported by provider + example: 0 + nullable: true + type: integer + native_tokens_prompt: + description: Native prompt tokens as reported by provider + example: 10 + nullable: true + type: integer + native_tokens_reasoning: + description: Native reasoning tokens as reported by provider + example: 5 + nullable: true + type: integer + num_fetches: + description: Number of web fetches performed + example: 0 + nullable: true + type: integer + num_input_audio_prompt: + description: Number of audio inputs in the prompt + example: 0 + nullable: true + type: integer + num_media_completion: + description: Number of media items in the completion + example: 0 + nullable: true + type: integer + num_media_prompt: + description: Number of media items in the prompt + example: 1 + nullable: true + type: integer + num_search_results: + description: Number of search results included + example: 5 + nullable: true + type: integer + origin: + description: Origin URL of the request + example: https://openrouter.ai/ + type: string + provider_name: + description: Name of the provider that served the request + example: Infermatic + nullable: true + type: string + provider_responses: + description: List of provider responses for this generation, including fallback attempts + items: + $ref: '#/components/schemas/ProviderResponse' + nullable: true + type: array + request_id: + description: Unique identifier grouping all generations from a single API request + example: req-1727282430-aBcDeFgHiJkLmNoPqRsT + nullable: true + type: string + response_cache_source_id: + description: If this generation was served from response cache, contains the original generation ID. Null otherwise. + nullable: true + type: string + router: + description: Router used for the request (e.g., openrouter/auto) + example: openrouter/auto + nullable: true + type: string + service_tier: + description: Service tier the upstream provider reported running this request on, or null if it did not report one. + example: priority + nullable: true + type: string + session_id: + description: Session identifier grouping multiple generations in the same session + nullable: true + type: string + streamed: + description: Whether the response was streamed + example: true + nullable: true + type: boolean + tokens_completion: + description: Number of tokens in the completion + example: 25 + nullable: true + type: integer + tokens_prompt: + description: Number of tokens in the prompt + example: 10 + nullable: true + type: integer + total_cost: + description: Total cost of the generation in USD + example: 0.0015 + format: double + type: number + upstream_id: + description: Upstream provider's identifier for this generation + example: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 + nullable: true + type: string + upstream_inference_cost: + description: Cost charged by the upstream provider + example: 0.0012 + format: double + nullable: true + type: number + usage: + description: Usage amount in USD + example: 0.0015 + format: double + type: number + user_agent: + description: User-Agent header from the request + nullable: true + type: string + web_search_engine: + description: The resolved web search engine used for this generation (e.g. exa, firecrawl, parallel) + example: exa + nullable: true + type: string + required: + - id + - upstream_id + - total_cost + - cache_discount + - upstream_inference_cost + - created_at + - model + - app_id + - streamed + - cancelled + - provider_name + - latency + - moderation_latency + - generation_time + - finish_reason + - service_tier + - tokens_prompt + - tokens_completion + - native_tokens_prompt + - native_tokens_completion + - native_tokens_completion_images + - native_tokens_reasoning + - native_tokens_cached + - num_media_prompt + - num_input_audio_prompt + - num_media_completion + - num_search_results + - num_fetches + - web_search_engine + - origin + - usage + - is_byok + - native_finish_reason + - external_user + - api_type + - router + - provider_responses + - user_agent + - http_referer + type: object + required: + - data + type: object + GetBYOKKeyResponse: + example: + data: + allowed_api_key_hashes: null + allowed_models: null + allowed_user_ids: null + created_at: '2025-08-24T10:30:00Z' + disabled: false + id: 11111111-2222-3333-4444-555555555555 + is_fallback: false + label: sk-...AbCd + name: Production OpenAI Key + provider: openai + sort_order: 0 + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + properties: + data: + allOf: + - $ref: '#/components/schemas/BYOKKey' + - description: The BYOK credential. + required: + - data + type: object + GetGuardrailResponse: + example: + data: + allowed_models: null + allowed_providers: + - openai + - anthropic + - google + content_filter_builtins: + - action: block + label: '[PROMPT_INJECTION]' + slug: regex-prompt-injection + content_filters: null + created_at: '2025-08-24T10:30:00Z' + description: Guardrail for production environment + enforce_zdr: null + enforce_zdr_anthropic: true + enforce_zdr_google: false + enforce_zdr_openai: true + enforce_zdr_other: false + id: 550e8400-e29b-41d4-a716-446655440000 + ignored_models: null + ignored_providers: null + limit_usd: 100 + name: Production Guardrail + reset_interval: monthly + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 + properties: + data: + allOf: + - $ref: '#/components/schemas/Guardrail' + - description: The guardrail + required: + - data + type: object + GetObservabilityDestinationResponse: + example: + data: + api_key_hashes: null + config: + baseUrl: https://us.cloud.langfuse.com + publicKey: pk-l...EfGh + secretKey: sk-l...AbCd + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Langfuse + privacy_mode: false + sampling_rate: 1 + type: langfuse + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + properties: + data: + allOf: + - $ref: '#/components/schemas/ObservabilityDestination' + - description: The observability destination. + required: + - data + type: object + GetWorkspaceResponse: + example: + data: + created_at: '2025-08-24T10:30:00Z' + created_by: user_abc123 + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + id: 550e8400-e29b-41d4-a716-446655440000 + io_logging_api_key_ids: null + io_logging_sampling_rate: 1 + is_data_discount_logging_enabled: true + is_observability_broadcast_enabled: false + is_observability_io_logging_enabled: false + name: Production + slug: production + updated_at: '2025-08-24T15:45:00Z' + properties: + data: + allOf: + - $ref: '#/components/schemas/Workspace' + - description: The workspace + required: + - data type: object GoneResponse: description: Gone - Endpoint has been permanently removed or deprecated @@ -5667,6 +7306,11 @@ components: properties: error: $ref: '#/components/schemas/GoneResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object user_id: nullable: true type: string @@ -5700,9 +7344,18 @@ components: - openai - anthropic - google + content_filter_builtins: + - action: block + label: '[PROMPT_INJECTION]' + slug: regex-prompt-injection + content_filters: null created_at: '2025-08-24T10:30:00Z' description: Guardrail for production environment - enforce_zdr: false + enforce_zdr: null + enforce_zdr_anthropic: true + enforce_zdr_google: false + enforce_zdr_openai: true + enforce_zdr_other: false id: 550e8400-e29b-41d4-a716-446655440000 ignored_models: null ignored_providers: null @@ -5710,6 +7363,7 @@ components: name: Production Guardrail reset_interval: monthly updated_at: '2025-08-24T15:45:00Z' + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 properties: allowed_models: description: Array of model canonical_slugs (immutable identifiers) @@ -5731,6 +7385,27 @@ components: type: string nullable: true type: array + content_filter_builtins: + description: >- + Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector. + example: + - action: block + label: '[PROMPT_INJECTION]' + slug: regex-prompt-injection + items: + $ref: '#/components/schemas/ContentFilterBuiltinEntry' + nullable: true + type: array + content_filters: + description: Custom regex content filters applied to request messages + example: + - action: redact + label: '[API_KEY]' + pattern: \b(sk-[a-zA-Z0-9]{48})\b + items: + $ref: '#/components/schemas/ContentFilterEntry' + nullable: true + type: array created_at: description: ISO 8601 timestamp of when the guardrail was created example: '2025-08-24T10:30:00Z' @@ -5741,18 +7416,41 @@ components: nullable: true type: string enforce_zdr: - description: Whether to enforce zero data retention + deprecated: true + description: >- + Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. example: false nullable: true type: boolean - id: - description: Unique identifier for the guardrail - example: 550e8400-e29b-41d4-a716-446655440000 - format: uuid - type: string - ignored_models: - description: Array of model canonical_slugs to exclude from routing - example: + enforce_zdr_anthropic: + description: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. + example: false + nullable: true + type: boolean + enforce_zdr_google: + description: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. + example: false + nullable: true + type: boolean + enforce_zdr_openai: + description: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. + example: false + nullable: true + type: boolean + enforce_zdr_other: + description: >- + Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. + example: false + nullable: true + type: boolean + id: + description: Unique identifier for the guardrail + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string + ignored_models: + description: Array of model canonical_slugs to exclude from routing + example: - openai/gpt-4o-mini-2024-07-18 items: type: string @@ -5783,10 +7481,15 @@ components: example: '2025-08-24T15:45:00Z' nullable: true type: string + workspace_id: + description: The workspace ID this guardrail belongs to. + example: 0df9e665-d932-5740-b2c7-b52af166bc11 + type: string required: - id - name - created_at + - workspace_id type: object GuardrailInterval: description: Interval at which the limit resets (daily, weekly, monthly) @@ -5965,12 +7668,12 @@ components: Configuration for the openrouter:image_generation server tool. Accepts all image_config params (aspect_ratio, quality, size, background, output_format, output_compression, moderation, etc.) plus a model field. example: aspect_ratio: '16:9' - model: openai/gpt-image-1 + model: openai/gpt-5-image quality: high properties: model: - description: Which image generation model to use (e.g. "openai/gpt-image-1"). Defaults to "openai/gpt-image-1". - example: openai/gpt-image-1 + description: Which image generation model to use (e.g. "openai/gpt-5-image"). Defaults to "openai/gpt-5-image". + example: openai/gpt-5-image type: string type: object ImageGenerationStatus: @@ -6131,6 +7834,7 @@ components: - auto - high - low + - original type: string x-speakeasy-unknown-values: allow image_url: @@ -6211,6 +7915,8 @@ components: - $ref: '#/components/schemas/InputMessageItem' - $ref: '#/components/schemas/FunctionCallItem' - $ref: '#/components/schemas/FunctionCallOutputItem' + - $ref: '#/components/schemas/ApplyPatchCallItem' + - $ref: '#/components/schemas/ApplyPatchCallOutputItem' - allOf: - $ref: '#/components/schemas/OutputMessageItem' - properties: @@ -6257,11 +7963,38 @@ components: type: summary_text type: reasoning - $ref: '#/components/schemas/OutputFunctionCallItem' + - $ref: '#/components/schemas/OutputCustomToolCallItem' - $ref: '#/components/schemas/OutputWebSearchCallItem' - $ref: '#/components/schemas/OutputFileSearchCallItem' - $ref: '#/components/schemas/OutputImageGenerationCallItem' + - $ref: '#/components/schemas/OutputCodeInterpreterCallItem' + - $ref: '#/components/schemas/OutputComputerCallItem' - $ref: '#/components/schemas/OutputDatetimeItem' - $ref: '#/components/schemas/OutputWebSearchServerToolItem' + - $ref: '#/components/schemas/OutputCodeInterpreterServerToolItem' + - $ref: '#/components/schemas/OutputFileSearchServerToolItem' + - $ref: '#/components/schemas/OutputImageGenerationServerToolItem' + - $ref: '#/components/schemas/OutputBrowserUseServerToolItem' + - $ref: '#/components/schemas/OutputBashServerToolItem' + - $ref: '#/components/schemas/OutputTextEditorServerToolItem' + - $ref: '#/components/schemas/OutputApplyPatchServerToolItem' + - $ref: '#/components/schemas/OutputWebFetchServerToolItem' + - $ref: '#/components/schemas/OutputToolSearchServerToolItem' + - $ref: '#/components/schemas/OutputMemoryServerToolItem' + - $ref: '#/components/schemas/OutputMcpServerToolItem' + - $ref: '#/components/schemas/OutputSearchModelsServerToolItem' + - $ref: '#/components/schemas/LocalShellCallItem' + - $ref: '#/components/schemas/LocalShellCallOutputItem' + - $ref: '#/components/schemas/ShellCallItem' + - $ref: '#/components/schemas/ShellCallOutputItem' + - $ref: '#/components/schemas/McpListToolsItem' + - $ref: '#/components/schemas/McpApprovalRequestItem' + - $ref: '#/components/schemas/McpApprovalResponseItem' + - $ref: '#/components/schemas/McpCallItem' + - $ref: '#/components/schemas/CustomToolCallItem' + - $ref: '#/components/schemas/CustomToolCallOutputItem' + - $ref: '#/components/schemas/CompactionItem' + - $ref: '#/components/schemas/ItemReferenceItem' type: array description: Input for a response request - can be a string or array of items example: @@ -6339,6 +8072,11 @@ components: properties: error: $ref: '#/components/schemas/InternalServerResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object user_id: nullable: true type: string @@ -6364,6 +8102,22 @@ components: - code - message type: object + ItemReferenceItem: + description: A reference to a previous response item by ID + example: + id: msg-abc123 + type: item_reference + properties: + id: + type: string + type: + enum: + - item_reference + type: string + required: + - type + - id + type: object KeyAssignment: example: assigned_by: user_abc123 @@ -6461,6 +8215,36 @@ components: required: - type type: object + ListBYOKKeysResponse: + example: + data: + - allowed_api_key_hashes: null + allowed_models: null + allowed_user_ids: null + created_at: '2025-08-24T10:30:00Z' + disabled: false + id: 11111111-2222-3333-4444-555555555555 + is_fallback: false + label: sk-...AbCd + name: Production OpenAI Key + provider: openai + sort_order: 0 + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + total_count: 1 + properties: + data: + description: List of BYOK credentials. + items: + $ref: '#/components/schemas/BYOKKey' + type: array + total_count: + description: Total number of BYOK credentials matching the filters. + example: 1 + type: integer + required: + - data + - total_count + type: object ListEndpointsResponse: description: List of available endpoints for a model example: @@ -6584,9 +8368,18 @@ components: - openai - anthropic - google + content_filter_builtins: + - action: block + label: '[PROMPT_INJECTION]' + slug: regex-prompt-injection + content_filters: null created_at: '2025-08-24T10:30:00Z' description: Guardrail for production environment - enforce_zdr: false + enforce_zdr: null + enforce_zdr_anthropic: true + enforce_zdr_google: false + enforce_zdr_openai: true + enforce_zdr_other: false id: 550e8400-e29b-41d4-a716-446655440000 ignored_models: null ignored_providers: null @@ -6594,6 +8387,7 @@ components: name: Production Guardrail reset_interval: monthly updated_at: '2025-08-24T15:45:00Z' + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 total_count: 1 properties: data: @@ -6658,6 +8452,301 @@ components: - data - total_count type: object + ListObservabilityDestinationsResponse: + example: + data: + - api_key_hashes: null + config: + baseUrl: https://us.cloud.langfuse.com + publicKey: pk-l...EfGh + secretKey: sk-l...AbCd + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Langfuse + privacy_mode: false + sampling_rate: 1 + type: langfuse + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + total_count: 1 + properties: + data: + description: List of observability destinations. + items: + $ref: '#/components/schemas/ObservabilityDestination' + type: array + total_count: + description: Total number of destinations matching the filters. + example: 1 + type: integer + required: + - data + - total_count + type: object + ListWorkspacesResponse: + example: + data: + - created_at: '2025-08-24T10:30:00Z' + created_by: user_abc123 + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + id: 550e8400-e29b-41d4-a716-446655440000 + io_logging_api_key_ids: null + io_logging_sampling_rate: 1 + is_data_discount_logging_enabled: true + is_observability_broadcast_enabled: false + is_observability_io_logging_enabled: false + name: Production + slug: production + updated_at: '2025-08-24T15:45:00Z' + total_count: 1 + properties: + data: + description: List of workspaces + items: + $ref: '#/components/schemas/Workspace' + type: array + total_count: + description: Total number of workspaces + example: 5 + type: integer + required: + - data + - total_count + type: object + LocalShellCallItem: + description: A local shell command execution call + example: + action: + command: + - ls + - '-la' + env: + PATH: /usr/bin + timeout_ms: 5000 + type: exec + call_id: call-abc123 + id: shell-abc123 + status: completed + type: local_shell_call + properties: + action: + properties: + command: + items: + type: string + type: array + env: + additionalProperties: + type: string + type: object + timeout_ms: + nullable: true + type: integer + type: + enum: + - exec + type: string + user: + nullable: true + type: string + working_directory: + nullable: true + type: string + required: + - type + - command + - env + type: object + call_id: + type: string + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + type: + enum: + - local_shell_call + type: string + required: + - type + - id + - call_id + - action + - status + type: object + LocalShellCallOutputItem: + description: Output from a local shell command execution + example: + id: output-abc123 + output: |- + total 24 + drwxr-xr-x 5 user staff 160 Jan 1 12:00 . + status: completed + type: local_shell_call_output + properties: + id: + type: string + output: + type: string + status: + allOf: + - $ref: '#/components/schemas/ToolCallStatus' + - nullable: true + type: + enum: + - local_shell_call_output + type: string + required: + - type + - id + - output + type: object + McpApprovalRequestItem: + description: Request for approval to execute an MCP tool + example: + arguments: '{"id":"123"}' + id: approval-abc123 + name: delete_record + server_label: database-server + type: mcp_approval_request + properties: + arguments: + type: string + id: + type: string + name: + type: string + server_label: + type: string + type: + enum: + - mcp_approval_request + type: string + required: + - type + - id + - name + - arguments + - server_label + type: object + McpApprovalResponseItem: + description: User response to an MCP tool approval request + example: + approval_request_id: approval-abc123 + approve: true + reason: Approved for execution + type: mcp_approval_response + properties: + approval_request_id: + type: string + approve: + type: boolean + id: + nullable: true + type: string + reason: + nullable: true + type: string + type: + enum: + - mcp_approval_response + type: string + required: + - type + - approval_request_id + - approve + type: object + McpCallItem: + description: An MCP tool call with its output or error + example: + arguments: '{"query":"SELECT * FROM users"}' + id: mcp-call-abc123 + name: query_database + output: '[{"id":1,"name":"Alice"}]' + server_label: database-server + type: mcp_call + properties: + arguments: + type: string + error: + nullable: true + type: string + id: + type: string + name: + type: string + output: + nullable: true + type: string + server_label: + type: string + type: + enum: + - mcp_call + type: string + required: + - type + - id + - name + - arguments + - server_label + type: object + McpListToolsItem: + description: List of available MCP tools from a server + example: + id: mcp-list-abc123 + server_label: database-server + tools: + - description: Execute a database query + input_schema: + properties: + query: + type: string + type: object + name: query_database + type: mcp_list_tools + properties: + error: + nullable: true + type: string + id: + type: string + server_label: + type: string + tools: + items: + properties: + annotations: + nullable: true + description: + nullable: true + type: string + input_schema: + additionalProperties: + nullable: true + type: object + name: + type: string + required: + - name + - input_schema + type: object + type: array + type: + enum: + - mcp_list_tools + type: string + required: + - type + - id + - server_label + - tools + type: object McpServerTool: description: MCP (Model Context Protocol) tool configuration example: @@ -6781,18 +8870,43 @@ components: - assigned_by - created_at type: object - MessagesContentBlockDeltaEvent: - description: Event sent when content is added to a content block + MessagesAdvisorToolResultBlock: + description: >- + Advisor tool result from a prior assistant turn, replayed back to the model on the next turn. Mirrors the block Anthropic returns in assistant content when the `advisor_20260301` tool runs. example: - delta: - text: Hello - type: text_delta - index: 0 - type: content_block_delta + content: + text: Advisor response text + type: advisor_result + tool_use_id: srvtoolu_01abc + type: advisor_tool_result properties: - delta: - oneOf: - - properties: + content: + additionalProperties: + nullable: true + type: object + tool_use_id: + type: string + type: + enum: + - advisor_tool_result + type: string + required: + - type + - tool_use_id + - content + type: object + MessagesContentBlockDeltaEvent: + description: Event sent when content is added to a content block + example: + delta: + text: Hello + type: text_delta + index: 0 + type: content_block_delta + properties: + delta: + oneOf: + - properties: text: type: string type: @@ -6898,7 +9012,7 @@ components: - $ref: '#/components/schemas/AnthropicToolUseBlock' - $ref: '#/components/schemas/AnthropicThinkingBlock' - $ref: '#/components/schemas/AnthropicRedactedThinkingBlock' - - $ref: '#/components/schemas/AnthropicServerToolUseBlock' + - $ref: '#/components/schemas/ORAnthropicServerToolUseBlock' - $ref: '#/components/schemas/AnthropicWebSearchToolResult' - $ref: '#/components/schemas/AnthropicWebFetchToolResult' - $ref: '#/components/schemas/AnthropicCodeExecutionToolResult' @@ -6907,6 +9021,7 @@ components: - $ref: '#/components/schemas/AnthropicToolSearchToolResult' - $ref: '#/components/schemas/AnthropicContainerUpload' - $ref: '#/components/schemas/AnthropicCompactionBlock' + - $ref: '#/components/schemas/AnthropicAdvisorToolResult' - properties: content: nullable: true @@ -7175,7 +9290,7 @@ components: input: nullable: true name: - $ref: '#/components/schemas/AnthropicServerToolName' + type: string type: enum: - server_tool_use @@ -7237,6 +9352,7 @@ components: - type - content type: object + - $ref: '#/components/schemas/MessagesAdvisorToolResultBlock' type: array role: enum: @@ -7255,11 +9371,12 @@ components: properties: effort: description: >- - How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`. + How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, `xhigh`, or `max`. enum: - low - medium - high + - xhigh - max - null example: medium @@ -7283,6 +9400,29 @@ components: - type - schema type: object + task_budget: + description: >- + Task budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap. + example: + total: 400000 + type: tokens + nullable: true + properties: + remaining: + minimum: 0 + nullable: true + type: integer + total: + minimum: 20000 + type: integer + type: + enum: + - tokens + type: string + required: + - type + - total + type: object type: object MessagesPingEvent: description: Keep-alive ping event @@ -7422,7 +9562,9 @@ components: auto-router: '#/components/schemas/AutoRouterPlugin' context-compression: '#/components/schemas/ContextCompressionPlugin' file-parser: '#/components/schemas/FileParserPlugin' + fusion: '#/components/schemas/FusionPlugin' moderation: '#/components/schemas/ModerationPlugin' + pareto-router: '#/components/schemas/ParetoRouterPlugin' response-healing: '#/components/schemas/ResponseHealingPlugin' web: '#/components/schemas/WebSearchPlugin' propertyName: id @@ -7433,17 +9575,15 @@ components: - $ref: '#/components/schemas/FileParserPlugin' - $ref: '#/components/schemas/ResponseHealingPlugin' - $ref: '#/components/schemas/ContextCompressionPlugin' + - $ref: '#/components/schemas/ParetoRouterPlugin' + - $ref: '#/components/schemas/FusionPlugin' type: array provider: $ref: '#/components/schemas/ProviderPreferences' route: $ref: '#/components/schemas/DeprecatedRoute' service_tier: - enum: - - auto - - standard_only type: string - x-speakeasy-unknown-values: allow session_id: description: >- 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 256 characters. @@ -7475,6 +9615,8 @@ components: - properties: budget_tokens: type: integer + display: + $ref: '#/components/schemas/AnthropicThinkingDisplay' type: enum: - enabled @@ -7492,6 +9634,8 @@ components: - type type: object - properties: + display: + $ref: '#/components/schemas/AnthropicThinkingDisplay' type: enum: - adaptive @@ -7637,14 +9781,7 @@ components: type: object - properties: allowed_callers: - items: - enum: - - direct - - code_execution_20250825 - - code_execution_20260120 - type: string - x-speakeasy-unknown-values: allow - type: array + $ref: '#/components/schemas/AnthropicAllowedCallers' allowed_domains: items: type: string @@ -7674,10 +9811,47 @@ components: - type - name type: object + - properties: + allowed_callers: + $ref: '#/components/schemas/AnthropicAllowedCallers' + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' + caching: + allOf: + - $ref: '#/components/schemas/AnthropicCacheControlDirective' + - nullable: true + defer_loading: + type: boolean + max_uses: + type: integer + model: + type: string + name: + enum: + - advisor + type: string + type: + enum: + - advisor_20260301 + type: string + required: + - type + - name + - model + type: object - $ref: '#/components/schemas/DatetimeServerTool' - $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter' - $ref: '#/components/schemas/ChatSearchModelsServerTool' + - $ref: '#/components/schemas/WebFetchServerTool' - $ref: '#/components/schemas/OpenRouterWebSearchServerTool' + - additionalProperties: + nullable: true + properties: + type: + type: string + required: + - type + type: object type: array top_k: type: integer @@ -7699,6 +9873,25 @@ components: allOf: - $ref: '#/components/schemas/BaseMessagesResult' - properties: + context_management: + nullable: true + properties: + applied_edits: + items: + additionalProperties: + nullable: true + properties: + type: + type: string + required: + - type + type: object + type: array + required: + - applied_edits + type: object + openrouter_metadata: + $ref: '#/components/schemas/OpenRouterMetadata' provider: $ref: '#/components/schemas/ProviderName' usage: @@ -7710,22 +9903,7 @@ components: nullable: true type: number cost_details: - nullable: true - properties: - upstream_inference_completions_cost: - format: double - type: number - upstream_inference_cost: - format: double - nullable: true - type: number - upstream_inference_prompt_cost: - format: double - type: number - required: - - upstream_inference_prompt_cost - - upstream_inference_completions_cost - type: object + $ref: '#/components/schemas/CostDetails' is_byok: type: boolean iterations: @@ -7752,7 +9930,7 @@ components: example: container: null content: - - citations: null + - citations: [] text: Hello! I'm doing well, thank you for asking. type: text id: msg_01XFDUDYJgAACzvnptvVoYEL @@ -7835,6 +10013,7 @@ components: - AionLabs - Alibaba - Ambient + - Baidu - Amazon Bedrock - Amazon Nova - Anthropic @@ -7851,6 +10030,7 @@ components: - Clarifai - Cloudflare - Cohere + - Crucible - Crusoe - DeepInfra - DeepSeek @@ -7881,12 +10061,15 @@ components: - Morph - NCompass - Nebius + - Nex AGI - NextBit - Novita - Nvidia - OpenAI - OpenInference - Parasail + - Poolside + - Perceptron - Perplexity - Phala - Recraft @@ -7969,6 +10152,8 @@ components: example: type: message_stop properties: + openrouter_metadata: + $ref: '#/components/schemas/OpenRouterMetadata' type: enum: - message_stop @@ -8004,6 +10189,32 @@ components: - $ref: '#/components/schemas/MessagesContentBlockStopEvent' - $ref: '#/components/schemas/MessagesPingEvent' - $ref: '#/components/schemas/MessagesErrorEvent' + MessagesStreamingResponse: + example: + data: + delta: + text: Hello + type: text_delta + index: 0 + type: content_block_delta + event: content_block_delta + properties: + data: + $ref: '#/components/schemas/MessagesStreamEvents' + event: + type: string + required: + - event + - data + type: object + MetadataLevel: + description: Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`. + enum: + - disabled + - enabled + example: enabled + type: string + x-speakeasy-unknown-values: allow Model: description: Information about an AI model available on OpenRouter example: @@ -8036,6 +10247,7 @@ components: - temperature - top_p - max_tokens + supported_voices: null top_provider: context_length: 8192 is_moderated: true @@ -8096,6 +10308,13 @@ components: items: $ref: '#/components/schemas/Parameter' type: array + supported_voices: + description: List of supported voice identifiers for TTS models. Null for non-TTS models. + example: null + items: + type: string + nullable: true + type: array top_provider: $ref: '#/components/schemas/TopProviderInfo' required: @@ -8110,6 +10329,7 @@ components: - per_request_limits - supported_parameters - default_parameters + - supported_voices - links type: object ModelArchitecture: @@ -8273,6 +10493,7 @@ components: - max_tokens - frequency_penalty - presence_penalty + supported_voices: null top_provider: context_length: 8192 is_moderated: true @@ -8315,6 +10536,7 @@ components: - temperature - top_p - max_tokens + supported_voices: null top_provider: context_length: 8192 is_moderated: true @@ -8333,6 +10555,18 @@ components: required: - id type: object + MultimodalMedia: + example: + data: data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA... + format: wav + properties: + data: + type: string + format: + type: string + required: + - data + type: object NotFoundResponse: description: Not Found - Resource does not exist example: @@ -8342,6 +10576,11 @@ components: properties: error: $ref: '#/components/schemas/NotFoundResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object user_id: nullable: true type: string @@ -8367,865 +10606,1959 @@ components: - code - message type: object - OpenAIResponseFunctionToolCall: + ObservabilityArizeDestination: example: - arguments: '{"location":"San Francisco"}' - call_id: call-abc123 - id: fc-abc123 - name: get_weather - status: completed - type: function_call + api_key_hashes: null + config: + apiKey: arize_...AbCd + baseUrl: https://otlp.arize.com + modelId: openrouter-prod + spaceKey: space_...EfGh + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Arize + privacy_mode: false + sampling_rate: 1 + type: arize + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - arguments: - type: string - call_id: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + apiKey: + minLength: 1 + type: string + baseUrl: + default: https://otlp.arize.com + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + modelId: + minLength: 1 + type: string + spaceKey: + minLength: 1 + type: string + required: + - apiKey + - spaceKey + - modelId + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid type: string name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true type: string - status: - $ref: '#/components/schemas/ToolCallStatus' + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - function_call + - arize + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: - - type - - call_id + - id + - workspace_id - name - - arguments + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at + - type + - config type: object - OpenAIResponseFunctionToolCallOutput: + ObservabilityBraintrustDestination: example: - call_id: call-abc123 - output: '{"temperature":72,"conditions":"sunny"}' - type: function_call_output + api_key_hashes: null + config: + apiKey: sk-...AbCd + baseUrl: https://api.braintrust.dev + projectId: proj_... + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Braintrust + privacy_mode: false + sampling_rate: 1 + type: braintrust + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - call_id: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + apiKey: + minLength: 1 + type: string + baseUrl: + default: https://api.braintrust.dev + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + projectId: + minLength: 1 + type: string + required: + - apiKey + - projectId + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + name: + description: Human-readable name for the destination. + example: Production Langfuse nullable: true type: string - output: - anyOf: - - type: string - - items: - discriminator: - mapping: - input_file: '#/components/schemas/InputFile' - input_image: '#/components/schemas/InputImage' - input_text: '#/components/schemas/InputText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/InputText' - - $ref: '#/components/schemas/InputImage' - - $ref: '#/components/schemas/InputFile' - type: array - status: - allOf: - - $ref: '#/components/schemas/ToolCallStatus' - - nullable: true + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - function_call_output + - braintrust + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type - - call_id - - output + - config type: object - OpenAIResponseInputMessageItem: + ObservabilityClickhouseDestination: example: - content: - - text: Hello, how are you? - type: input_text - id: msg-abc123 - role: user - type: message + api_key_hashes: null + config: + database: analytics + host: https://clickhouse.example.com:8123 + password: '********' + table: OPENROUTER_TRACES + username: default + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production ClickHouse + privacy_mode: false + sampling_rate: 1 + type: clickhouse + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - content: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null items: - discriminator: - mapping: - input_audio: '#/components/schemas/InputAudio' - input_file: '#/components/schemas/InputFile' - input_image: '#/components/schemas/InputImage' - input_text: '#/components/schemas/InputText' - propertyName: type - oneOf: - - $ref: '#/components/schemas/InputText' - - $ref: '#/components/schemas/InputImage' - - $ref: '#/components/schemas/InputFile' - - $ref: '#/components/schemas/InputAudio' + type: string + nullable: true type: array - id: - type: string - role: - anyOf: - - enum: - - user + config: + properties: + database: + minLength: 1 type: string - - enum: - - system + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + host: + minLength: 1 type: string - - enum: - - developer + password: + minLength: 1 + type: string + table: + default: OPENROUTER_TRACES + type: string + username: + description: If you have not set a specific username in ClickHouse, simply type in 'default' below. + minLength: 1 type: string + required: + - host + - database + - username + - password + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' + type: string + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' + id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true + type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - message + - clickhouse + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: - id - - role - - content + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at + - type + - config type: object - OpenAIResponsesAnnotation: - anyOf: - - $ref: '#/components/schemas/FileCitation' - - $ref: '#/components/schemas/URLCitation' - - $ref: '#/components/schemas/FilePath' - example: - file_id: file-abc123 - filename: research_paper.pdf - index: 0 - type: file_citation - OpenAIResponsesImageGenCallCompleted: + ObservabilityDatadogDestination: example: - item_id: ig_abc123 - output_index: 0 - sequence_number: 4 - type: response.image_generation_call.completed + api_key_hashes: null + config: + apiKey: '************...AbCd' + mlApp: my-llm-app + url: https://api.us5.datadoghq.com + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Datadog + privacy_mode: false + sampling_rate: 1 + type: datadog + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - item_id: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + apiKey: + description: 'Datadog API key must have LLM Observability permissions. Create at: ' + minLength: 1 + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + mlApp: + description: Name to identify your application in Datadog LLM Observability + minLength: 1 + type: string + url: + default: https://api.us5.datadoghq.com + description: >- + Datadog API URL for your region (e.g., https://api.datadoghq.com, https://api.us3.datadoghq.com, https://api.datadoghq.eu) + type: string + required: + - apiKey + - mlApp + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string - output_index: - type: integer - sequence_number: - type: integer + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' + id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true + type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - response.image_generation_call.completed + - datadog + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type - - item_id - - output_index - - sequence_number + - config type: object - OpenAIResponsesImageGenCallGenerating: + ObservabilityDestination: + discriminator: + mapping: + arize: '#/components/schemas/ObservabilityArizeDestination' + braintrust: '#/components/schemas/ObservabilityBraintrustDestination' + clickhouse: '#/components/schemas/ObservabilityClickhouseDestination' + datadog: '#/components/schemas/ObservabilityDatadogDestination' + grafana: '#/components/schemas/ObservabilityGrafanaDestination' + langfuse: '#/components/schemas/ObservabilityLangfuseDestination' + langsmith: '#/components/schemas/ObservabilityLangsmithDestination' + newrelic: '#/components/schemas/ObservabilityNewrelicDestination' + opik: '#/components/schemas/ObservabilityOpikDestination' + otel-collector: '#/components/schemas/ObservabilityOtelCollectorDestination' + posthog: '#/components/schemas/ObservabilityPosthogDestination' + ramp: '#/components/schemas/ObservabilityRampDestination' + s3: '#/components/schemas/ObservabilityS3Destination' + sentry: '#/components/schemas/ObservabilitySentryDestination' + snowflake: '#/components/schemas/ObservabilitySnowflakeDestination' + weave: '#/components/schemas/ObservabilityWeaveDestination' + webhook: '#/components/schemas/ObservabilityWebhookDestination' + propertyName: type example: - item_id: ig_abc123 - output_index: 0 - sequence_number: 2 - type: response.image_generation_call.generating + api_key_hashes: null + config: + baseUrl: https://us.cloud.langfuse.com + publicKey: pk-l...EfGh + secretKey: sk-l...AbCd + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Langfuse + privacy_mode: false + sampling_rate: 1 + type: langfuse + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + oneOf: + - $ref: '#/components/schemas/ObservabilityArizeDestination' + - $ref: '#/components/schemas/ObservabilityBraintrustDestination' + - $ref: '#/components/schemas/ObservabilityClickhouseDestination' + - $ref: '#/components/schemas/ObservabilityDatadogDestination' + - $ref: '#/components/schemas/ObservabilityGrafanaDestination' + - $ref: '#/components/schemas/ObservabilityLangfuseDestination' + - $ref: '#/components/schemas/ObservabilityLangsmithDestination' + - $ref: '#/components/schemas/ObservabilityNewrelicDestination' + - $ref: '#/components/schemas/ObservabilityOpikDestination' + - $ref: '#/components/schemas/ObservabilityOtelCollectorDestination' + - $ref: '#/components/schemas/ObservabilityPosthogDestination' + - $ref: '#/components/schemas/ObservabilityRampDestination' + - $ref: '#/components/schemas/ObservabilityS3Destination' + - $ref: '#/components/schemas/ObservabilitySentryDestination' + - $ref: '#/components/schemas/ObservabilitySnowflakeDestination' + - $ref: '#/components/schemas/ObservabilityWeaveDestination' + - $ref: '#/components/schemas/ObservabilityWebhookDestination' + ObservabilityFilterRulesConfig: + description: Optional structured filter rules controlling which events are forwarded. + example: null + nullable: true properties: - item_id: - type: string - output_index: - type: integer - sequence_number: - type: integer - type: - enum: - - response.image_generation_call.generating - type: string + enabled: + default: true + type: boolean + groups: + items: + properties: + logic: + default: and + enum: + - and + - or + type: string + x-speakeasy-unknown-values: allow + rules: + items: + properties: + field: + enum: + - model + - provider + - session_id + - user_id + - api_key_name + - finish_reason + - input + - output + - total_cost + - total_tokens + - prompt_tokens + - completion_tokens + type: string + x-speakeasy-unknown-values: allow + operator: + enum: + - equals + - not_equals + - contains + - not_contains + - regex + - starts_with + - ends_with + - gt + - lt + - gte + - lte + - exists + - not_exists + type: string + x-speakeasy-unknown-values: allow + value: + anyOf: + - type: string + - type: number + required: + - field + - operator + type: object + type: array + required: + - rules + type: object + type: array required: - - type - - item_id - - output_index - - sequence_number + - groups type: object - OpenAIResponsesImageGenCallInProgress: + ObservabilityGrafanaDestination: example: - item_id: ig_abc123 - output_index: 0 - sequence_number: 1 - type: response.image_generation_call.in_progress + api_key_hashes: null + config: + apiKey: glc_...AbCd + baseUrl: https://otlp-gateway-prod-us-west-0.grafana.net + instanceId: '123456' + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Grafana + privacy_mode: false + sampling_rate: 1 + type: grafana + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - item_id: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + apiKey: + minLength: 1 + type: string + baseUrl: + default: https://otlp-gateway-prod-us-west-0.grafana.net + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + instanceId: + minLength: 1 + type: string + required: + - apiKey + - instanceId + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string - output_index: - type: integer - sequence_number: - type: integer + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' + id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true + type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - response.image_generation_call.in_progress + - grafana + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type - - item_id - - output_index - - sequence_number + - config type: object - OpenAIResponsesImageGenCallPartialImage: + ObservabilityLangfuseDestination: example: - item_id: ig_abc123 - output_index: 0 - partial_image_b64: iVBORw0KGgo... - partial_image_index: 0 - sequence_number: 3 - type: response.image_generation_call.partial_image + api_key_hashes: null + config: + baseUrl: https://us.cloud.langfuse.com + publicKey: pk-l...EfGh + secretKey: sk-l...AbCd + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Langfuse + privacy_mode: false + sampling_rate: 1 + type: langfuse + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - item_id: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + baseUrl: + default: https://us.cloud.langfuse.com + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + publicKey: + minLength: 1 + type: string + secretKey: + minLength: 1 + type: string + required: + - secretKey + - publicKey + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string - output_index: - type: integer - partial_image_b64: + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' + id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid type: string - partial_image_index: - type: integer - sequence_number: - type: integer + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true + type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - response.image_generation_call.partial_image + - langfuse + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type - - item_id - - output_index - - sequence_number - - partial_image_b64 - - partial_image_index + - config type: object - OpenAIResponsesRefusalContent: + ObservabilityLangsmithDestination: example: - refusal: I'm sorry, I cannot assist with that request - type: refusal + api_key_hashes: null + config: + apiKey: lsv2_...AbCd + endpoint: https://api.smith.langchain.com + project: main + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production LangSmith + privacy_mode: false + sampling_rate: 1 + type: langsmith + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - refusal: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + apiKey: + minLength: 1 + type: string + endpoint: + default: https://api.smith.langchain.com + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + project: + default: main + description: The name for this project, such as pr-openrouter-demo. Defaults to "main" if not set. + minLength: 1 + type: string + workspaceId: + description: Required for org-scoped API keys. Find this in your LangSmith workspace settings. + type: string + required: + - apiKey + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' + type: string + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' + id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - refusal + - langsmith + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type - - refusal + - config type: object - OpenAIResponsesResponseStatus: - enum: - - completed - - incomplete - - in_progress - - failed - - cancelled - - queued - example: completed - type: string - x-speakeasy-unknown-values: allow - OpenAIResponsesSearchCompleted: + ObservabilityNewrelicDestination: example: - item_id: ws_abc123 - output_index: 0 - sequence_number: 5 - type: response.web_search_call.completed + api_key_hashes: null + config: + licenseKey: '****...AbCd' + region: US + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production New Relic + privacy_mode: false + sampling_rate: 1 + type: newrelic + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - item_id: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + licenseKey: + minLength: 1 + type: string + region: + default: us + enum: + - us + - eu + type: string + x-speakeasy-unknown-values: allow + required: + - licenseKey + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string - output_index: - type: integer - sequence_number: - type: integer + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' + id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true + type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - response.web_search_call.completed + - newrelic + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type - - item_id - - output_index - - sequence_number + - config type: object - OpenAIResponsesToolChoice: - anyOf: - - enum: - - auto - type: string - - enum: - - none - type: string - - enum: - - required - type: string - - properties: - name: - type: string - type: - enum: - - function - type: string - required: - - type - - name - type: object - - properties: - type: - anyOf: - - enum: - - web_search_preview_2025_03_11 - type: string - - enum: - - web_search_preview - type: string - required: - - type - type: object - - $ref: '#/components/schemas/ToolChoiceAllowed' - example: auto - OpenAIResponsesTruncation: - enum: - - auto - - disabled - - null - example: auto - nullable: true - type: string - x-speakeasy-unknown-values: allow - OpenAIResponsesUsage: + ObservabilityOpikDestination: example: - input_tokens: 100 - input_tokens_details: - cached_tokens: 0 - output_tokens: 50 - output_tokens_details: - reasoning_tokens: 0 - total_tokens: 150 + api_key_hashes: null + config: + apiKey: '****...AbCd' + projectName: openrouter-prod + workspace: my-workspace + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Opik + privacy_mode: false + sampling_rate: 1 + type: opik + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - input_tokens: - type: integer - input_tokens_details: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: properties: - cached_tokens: - type: integer + apiKey: + minLength: 1 + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + projectName: + minLength: 1 + type: string + workspace: + minLength: 1 + type: string required: - - cached_tokens + - apiKey + - workspace + - projectName type: object - output_tokens: - type: integer - output_tokens_details: - properties: - reasoning_tokens: - type: integer - required: - - reasoning_tokens - type: object - total_tokens: - type: integer - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - type: object - OpenAIResponsesWebSearchCallInProgress: - example: - item_id: ws_abc123 - output_index: 0 - sequence_number: 1 - type: response.web_search_call.in_progress - properties: - item_id: + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string - output_index: - type: integer - sequence_number: - type: integer + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' + id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true + type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - response.web_search_call.in_progress + - opik + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type - - item_id - - output_index - - sequence_number + - config type: object - OpenAIResponsesWebSearchCallSearching: + ObservabilityOtelCollectorDestination: example: - item_id: ws_abc123 - output_index: 0 - sequence_number: 2 - type: response.web_search_call.searching + api_key_hashes: null + config: + endpoint: https://otel.example.com:4318 + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production OTel Collector + privacy_mode: false + sampling_rate: 1 + type: otel-collector + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - item_id: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + endpoint: + type: string + headers: + additionalProperties: + type: string + description: >- + Custom HTTP headers as a JSON object. For Axiom, use {"Authorization": "Bearer xaat-xxx", "X-Axiom-Dataset": "your-dataset"} + type: object + required: + - endpoint + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string - output_index: - type: integer - sequence_number: - type: integer + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' + id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true + type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - response.web_search_call.searching + - otel-collector + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type - - item_id - - output_index - - sequence_number + - config type: object - OpenResponsesCreatedEvent: - allOf: - - $ref: '#/components/schemas/CreatedEvent' - - properties: - response: - $ref: '#/components/schemas/OpenResponsesResult' - type: object - description: Event emitted when a response is created - example: - response: - created_at: 1704067200 - error: null - id: resp-abc123 - incomplete_details: null - instructions: null - max_output_tokens: null - metadata: null - model: gpt-4 - object: response - output: [] - parallel_tool_calls: true - status: in_progress - temperature: null - tool_choice: auto - tools: [] - top_p: null - sequence_number: 0 - type: response.created - OpenResponsesInProgressEvent: - allOf: - - $ref: '#/components/schemas/InProgressEvent' - - properties: - response: - $ref: '#/components/schemas/OpenResponsesResult' - type: object - description: Event emitted when a response is in progress - example: - response: - created_at: 1704067200 - error: null - id: resp-abc123 - incomplete_details: null - instructions: null - max_output_tokens: null - metadata: null - model: gpt-4 - object: response - output: [] - parallel_tool_calls: true - status: in_progress - temperature: null - tool_choice: auto - tools: [] - top_p: null - sequence_number: 1 - type: response.in_progress - OpenResponsesLogProbs: - description: Log probability information for a token + ObservabilityPosthogDestination: example: - logprob: -0.1 - token: world - top_logprobs: - - logprob: -0.5 - token: hello + api_key_hashes: null + config: + apiKey: phc_...AbCd + endpoint: https://us.i.posthog.com + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production PostHog + privacy_mode: false + sampling_rate: 1 + type: posthog + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - bytes: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null items: - type: integer + type: string + nullable: true type: array - logprob: + config: + properties: + apiKey: + minLength: 1 + type: string + endpoint: + default: https://us.i.posthog.com + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + required: + - apiKey + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' + type: string + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' + id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true + type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 format: double type: number - token: + type: + enum: + - posthog + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string - top_logprobs: - items: - $ref: '#/components/schemas/OpenResponsesTopLogprobs' - type: array required: - - logprob - - token + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at + - type + - config type: object - OpenResponsesResult: - allOf: - - $ref: '#/components/schemas/BaseResponsesResult' - - properties: - output: - items: - $ref: '#/components/schemas/OutputItems' - type: array - service_tier: - nullable: true - type: string - usage: - $ref: '#/components/schemas/Usage' - type: object - description: Complete non-streaming response from the Responses API + ObservabilityRampDestination: example: - created_at: 1704067200 - error: null - id: resp-abc123 - incomplete_details: null - instructions: null - max_output_tokens: null - metadata: null - model: gpt-4 - object: response - output: - - content: - - annotations: [] - text: Hello! How can I help you today? - type: output_text - id: msg-abc123 - role: assistant - status: completed - type: message - parallel_tool_calls: true - status: completed - temperature: null - tool_choice: auto - tools: [] - top_p: null - usage: - input_tokens: 10 - input_tokens_details: - cached_tokens: 0 - output_tokens: 25 - output_tokens_details: - reasoning_tokens: 0 - total_tokens: 35 - OpenResponsesTopLogprobs: - description: Alternative token with its log probability - example: - logprob: -0.5 - token: hello + api_key_hashes: null + config: + apiKey: rmp_...AbCd + baseUrl: https://api.ramp.com/developer/v1/ai-usage/openrouter + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Ramp + privacy_mode: false + sampling_rate: 1 + type: ramp + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - bytes: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null items: - type: integer + type: string + nullable: true type: array - logprob: + config: + properties: + apiKey: + description: Generate this in your Ramp integration settings. + minLength: 1 + type: string + baseUrl: + default: https://api.ramp.com/developer/v1/ai-usage/openrouter + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to Ramp. + type: object + required: + - apiKey + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' + type: string + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' + id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true + type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 format: double type: number - token: - type: string - type: object - OpenRouterWebSearchServerTool: - description: 'OpenRouter built-in server tool: searches the web for current information' - example: - parameters: - max_results: 5 - type: openrouter:web_search - properties: - parameters: - $ref: '#/components/schemas/WebSearchConfig' type: enum: - - openrouter:web_search + - ramp + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type + - config type: object - ORAnthropicContentBlock: - discriminator: - mapping: - bash_code_execution_tool_result: '#/components/schemas/AnthropicBashCodeExecutionToolResult' - code_execution_tool_result: '#/components/schemas/AnthropicCodeExecutionToolResult' - compaction: '#/components/schemas/AnthropicCompactionBlock' - container_upload: '#/components/schemas/AnthropicContainerUpload' - redacted_thinking: '#/components/schemas/AnthropicRedactedThinkingBlock' - server_tool_use: '#/components/schemas/AnthropicServerToolUseBlock' - text: '#/components/schemas/AnthropicTextBlock' - text_editor_code_execution_tool_result: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult' - thinking: '#/components/schemas/AnthropicThinkingBlock' - tool_search_tool_result: '#/components/schemas/AnthropicToolSearchToolResult' - tool_use: '#/components/schemas/AnthropicToolUseBlock' - web_fetch_tool_result: '#/components/schemas/AnthropicWebFetchToolResult' - web_search_tool_result: '#/components/schemas/AnthropicWebSearchToolResult' - propertyName: type - example: - citations: null - text: Hello, world! - type: text - oneOf: - - $ref: '#/components/schemas/AnthropicTextBlock' - - $ref: '#/components/schemas/AnthropicToolUseBlock' - - $ref: '#/components/schemas/AnthropicThinkingBlock' - - $ref: '#/components/schemas/AnthropicRedactedThinkingBlock' - - $ref: '#/components/schemas/AnthropicServerToolUseBlock' - - $ref: '#/components/schemas/AnthropicWebSearchToolResult' - - $ref: '#/components/schemas/AnthropicWebFetchToolResult' - - $ref: '#/components/schemas/AnthropicCodeExecutionToolResult' - - $ref: '#/components/schemas/AnthropicBashCodeExecutionToolResult' - - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult' - - $ref: '#/components/schemas/AnthropicToolSearchToolResult' - - $ref: '#/components/schemas/AnthropicContainerUpload' - - $ref: '#/components/schemas/AnthropicCompactionBlock' - ORAnthropicStopReason: - enum: - - end_turn - - max_tokens - - stop_sequence - - tool_use - - pause_turn - - refusal - - compaction - - null - example: end_turn - nullable: true - type: string - x-speakeasy-unknown-values: allow - OutputApplyPatchServerToolItem: - description: An openrouter:apply_patch server tool output item + ObservabilityS3Destination: example: - filePath: /src/main.ts - id: ap_tmp_abc123 - status: completed - type: openrouter:apply_patch + api_key_hashes: null + config: + accessKeyId: AKIA...AbCd + bucketName: openrouter-traces + secretAccessKey: '****...EfGh' + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production S3 + privacy_mode: false + sampling_rate: 1 + type: s3 + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - filePath: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + accessKeyId: + minLength: 1 + type: string + bucketName: + minLength: 1 + type: string + endpoint: + description: >- + Only for S3-compatible services like Cloudflare R2 (https://account-id.r2.cloudflarestorage.com) or MinIO. Leave blank for standard AWS S3. + format: uri + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + pathTemplate: + default: '{prefix}/{date}' + description: >- + Template for S3 object path. The filename ({traceId}-{timestamp}.json) is automatically appended. Available variables: {prefix}, {date}, {year}, {month}, {day}, {apiKeyName} + type: string + prefix: + default: openrouter-traces + type: string + region: + type: string + secretAccessKey: + minLength: 1 + type: string + sessionToken: + type: string + required: + - bucketName + - accessKeyId + - secretAccessKey + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid type: string - patch: + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true type: string - status: - $ref: '#/components/schemas/ToolCallStatus' + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - openrouter:apply_patch + - s3 + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: - - status + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type + - config type: object - OutputBashServerToolItem: - description: An openrouter:bash server tool output item + ObservabilitySentryDestination: example: - command: ls -la - exitCode: 0 - id: bash_tmp_abc123 - status: completed - stdout: | - total 0 - type: openrouter:bash + api_key_hashes: null + config: + otlpEndpoint: https://o0.ingest.sentry.io/api/0/otlp + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Sentry + privacy_mode: false + sampling_rate: 1 + type: sentry + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - command: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + dsn: + minLength: 1 + pattern: ^https:\/\/([^:@]+)(?::[^@]*)?@([^/]+)(?:\/[^/]+)*\/(\d+)\/?$ + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + otlpEndpoint: + type: string + required: + - otlpEndpoint + - dsn + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string - exitCode: - type: integer + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid type: string - status: - $ref: '#/components/schemas/ToolCallStatus' - stderr: - type: string - stdout: + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - openrouter:bash + - sentry + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: - - status + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type + - config type: object - OutputBrowserUseServerToolItem: - description: An openrouter:browser_use server tool output item + ObservabilitySnowflakeDestination: example: - action: screenshot - id: bu_tmp_abc123 - status: completed - type: openrouter:browser_use + api_key_hashes: null + config: + account: xy12345.us-east-1 + token: '****...AbCd' + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Snowflake + privacy_mode: false + sampling_rate: 1 + type: snowflake + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - action: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + account: + minLength: 1 + type: string + database: + default: SNOWFLAKE_LEARNING_DB + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + schema: + default: PUBLIC + type: string + table: + default: OPENROUTER_TRACES + type: string + token: + minLength: 1 + type: string + warehouse: + default: COMPUTE_WH + type: string + required: + - account + - token + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid type: string - screenshotB64: + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true type: string - status: - $ref: '#/components/schemas/ToolCallStatus' + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - openrouter:browser_use + - snowflake + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: - - status + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type + - config type: object - OutputCodeInterpreterCallItem: - allOf: - - $ref: '#/components/schemas/CodeInterpreterCallItem' - - properties: {} - type: object - description: A code interpreter execution call with outputs - example: - code: print("hello") - container_id: ctr-xyz789 - id: ci-abc123 - outputs: - - logs: | - hello - type: logs - status: completed - type: code_interpreter_call - OutputCodeInterpreterServerToolItem: - description: An openrouter:code_interpreter server tool output item + ObservabilityWeaveDestination: example: - code: print("hello") - id: ci_tmp_abc123 - language: python - status: completed - stdout: | - hello - type: openrouter:code_interpreter + api_key_hashes: null + config: + apiKey: '****...AbCd' + baseUrl: https://trace.wandb.ai + entity: my-team + project: openrouter-prod + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Weave + privacy_mode: false + sampling_rate: 1 + type: weave + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - code: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string + nullable: true + type: array + config: + properties: + apiKey: + minLength: 1 + type: string + baseUrl: + default: https://trace.wandb.ai + type: string + entity: + minLength: 1 + type: string + headers: + additionalProperties: + type: string + description: Custom HTTP headers to include in requests to this destination. + type: object + project: + minLength: 1 + type: string + required: + - apiKey + - entity + - project + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string - exitCode: - type: integer + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid type: string - language: - type: string - status: - $ref: '#/components/schemas/ToolCallStatus' - stderr: - type: string - stdout: + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true type: string + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - openrouter:code_interpreter + - weave + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: - - status + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type + - config type: object - OutputComputerCallItem: + ObservabilityWebhookDestination: example: - action: - type: screenshot - call_id: call-abc123 - id: cu-abc123 - pending_safety_checks: [] - status: completed - type: computer_call + api_key_hashes: null + config: + url: https://example.com/openrouter-events + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Webhook + privacy_mode: false + sampling_rate: 1 + type: webhook + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 properties: - action: + api_key_hashes: + description: >- + Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys. + example: null + items: + type: string nullable: true - call_id: + type: array + config: + properties: + headers: + additionalProperties: + type: string + type: object + method: + default: POST + enum: + - POST + - PUT + type: string + x-speakeasy-unknown-values: allow + url: + type: string + required: + - url + type: object + created_at: + description: ISO timestamp of when the destination was created. + example: '2025-08-24T10:30:00Z' type: string + enabled: + description: Whether this destination is currently enabled. + example: true + type: boolean + filter_rules: + $ref: '#/components/schemas/ObservabilityFilterRulesConfig' id: + description: Stable public identifier for this destination. + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid type: string - pending_safety_checks: - items: - properties: - code: - type: string - id: - type: string - message: - type: string - required: - - id - - code - - message - type: object - type: array - status: - enum: - - completed - - incomplete - - in_progress + name: + description: Human-readable name for the destination. + example: Production Langfuse + nullable: true type: string - x-speakeasy-unknown-values: allow + privacy_mode: + description: When true, request/response bodies are not forwarded to this destination — only metadata. + example: false + type: boolean + sampling_rate: + description: Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%). + example: 1 + format: double + type: number type: enum: - - computer_call + - webhook + type: string + updated_at: + description: ISO timestamp of when the destination was last updated. + example: '2025-08-24T15:45:00Z' + type: string + workspace_id: + description: ID of the workspace this destination belongs to. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid type: string required: + - id + - workspace_id + - name + - enabled + - privacy_mode + - sampling_rate + - api_key_hashes + - filter_rules + - created_at + - updated_at - type - - call_id - - status - - pending_safety_checks + - config type: object - OutputDatetimeItem: - description: An openrouter:datetime server tool output item + OpenAIResponseCustomToolCall: example: - datetime: '2026-03-12T14:30:00.000Z' - id: dt_tmp_abc123 - status: completed - timezone: UTC - type: openrouter:datetime + call_id: call-abc123 + id: ctc-abc123 + input: |- + *** Begin Patch + *** End Patch + name: apply_patch + type: custom_tool_call properties: - datetime: - description: ISO 8601 datetime string + call_id: type: string id: type: string - status: - $ref: '#/components/schemas/ToolCallStatus' - timezone: - description: IANA timezone name + input: + type: string + name: + type: string + namespace: + description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) type: string type: enum: - - openrouter:datetime + - custom_tool_call type: string required: - - status - type - - datetime - - timezone + - call_id + - name + - input type: object - OutputFileSearchCallItem: - allOf: - - $ref: '#/components/schemas/OutputItemFileSearchCall' - - properties: {} - type: object - example: - id: fs-abc123 - queries: - - search term - results: [] - status: completed - type: file_search_call - OutputFileSearchServerToolItem: - description: An openrouter:file_search server tool output item + OpenAIResponseCustomToolCallOutput: example: - id: fs_tmp_abc123 - queries: - - search term - status: completed - type: openrouter:file_search + call_id: call-abc123 + output: patch applied successfully + type: custom_tool_call_output properties: + call_id: + type: string id: type: string - queries: - items: - type: string - type: array - status: - $ref: '#/components/schemas/ToolCallStatus' + output: + anyOf: + - type: string + - items: + discriminator: + mapping: + input_file: '#/components/schemas/InputFile' + input_image: '#/components/schemas/InputImage' + input_text: '#/components/schemas/InputText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + type: array type: enum: - - openrouter:file_search + - custom_tool_call_output type: string required: - - status - type + - call_id + - output type: object - OutputFunctionCallItem: - allOf: - - $ref: '#/components/schemas/OutputItemFunctionCall' - - properties: {} - type: object + OpenAIResponseFunctionToolCall: example: arguments: '{"location":"San Francisco"}' call_id: call-abc123 @@ -9233,2409 +12566,2025 @@ components: name: get_weather status: completed type: function_call - OutputImageGenerationCallItem: - allOf: - - $ref: '#/components/schemas/OutputItemImageGenerationCall' - - properties: {} - type: object - example: - id: img-abc123 - result: null - status: completed - type: image_generation_call - OutputImageGenerationServerToolItem: - description: An openrouter:image_generation server tool output item - example: - id: ig_tmp_abc123 - imageUrl: https://example.com/image.png - status: completed - type: openrouter:image_generation properties: - id: + arguments: type: string - imageB64: + call_id: type: string - imageUrl: + id: type: string - revisedPrompt: + name: + type: string + namespace: + description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) type: string status: $ref: '#/components/schemas/ToolCallStatus' type: enum: - - openrouter:image_generation + - function_call type: string required: - - status - type + - call_id + - name + - arguments type: object - OutputItemAddedEvent: - description: Event emitted when a new output item is added to the response + OpenAIResponseFunctionToolCallOutput: example: - item: - content: [] - id: item-1 - role: assistant - status: in_progress - type: message + call_id: call-abc123 + output: '{"temperature":72,"conditions":"sunny"}' + type: function_call_output + properties: + call_id: + type: string + id: + nullable: true + type: string + output: + anyOf: + - type: string + - items: + discriminator: + mapping: + input_file: '#/components/schemas/InputFile' + input_image: '#/components/schemas/InputImage' + input_text: '#/components/schemas/InputText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + type: array + status: + allOf: + - $ref: '#/components/schemas/ToolCallStatus' + - nullable: true + type: + enum: + - function_call_output + type: string + required: + - type + - call_id + - output + type: object + OpenAIResponseInputMessageItem: + example: + content: + - text: Hello, how are you? + type: input_text + id: msg-abc123 + role: user + type: message + properties: + content: + items: + discriminator: + mapping: + input_audio: '#/components/schemas/InputAudio' + input_file: '#/components/schemas/InputFile' + input_image: '#/components/schemas/InputImage' + input_text: '#/components/schemas/InputText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + - $ref: '#/components/schemas/InputAudio' + type: array + id: + type: string + role: + anyOf: + - enum: + - user + type: string + - enum: + - system + type: string + - enum: + - developer + type: string + type: + enum: + - message + type: string + required: + - id + - role + - content + type: object + OpenAIResponsesAnnotation: + anyOf: + - $ref: '#/components/schemas/FileCitation' + - $ref: '#/components/schemas/URLCitation' + - $ref: '#/components/schemas/FilePath' + example: + file_id: file-abc123 + filename: research_paper.pdf + index: 0 + type: file_citation + OpenAIResponsesImageGenCallCompleted: + example: + item_id: ig_abc123 output_index: 0 - sequence_number: 2 - type: response.output_item.added + sequence_number: 4 + type: response.image_generation_call.completed properties: - item: - discriminator: - mapping: - file_search_call: '#/components/schemas/OutputItemFileSearchCall' - function_call: '#/components/schemas/OutputItemFunctionCall' - image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' - message: '#/components/schemas/OutputMessage' - reasoning: '#/components/schemas/OutputItemReasoning' - web_search_call: '#/components/schemas/OutputItemWebSearchCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OutputMessage' - - $ref: '#/components/schemas/OutputItemReasoning' - - $ref: '#/components/schemas/OutputItemFunctionCall' - - $ref: '#/components/schemas/OutputItemWebSearchCall' - - $ref: '#/components/schemas/OutputItemFileSearchCall' - - $ref: '#/components/schemas/OutputItemImageGenerationCall' + item_id: + type: string output_index: type: integer sequence_number: type: integer type: enum: - - response.output_item.added + - response.image_generation_call.completed type: string required: - type + - item_id - output_index - - item - sequence_number type: object - OutputItemDoneEvent: - description: Event emitted when an output item is complete + OpenAIResponsesImageGenCallGenerating: example: - item: - content: - - annotations: [] - text: Hello! How can I help you? - type: output_text - id: item-1 - role: assistant - status: completed - type: message + item_id: ig_abc123 output_index: 0 - sequence_number: 8 - type: response.output_item.done + sequence_number: 2 + type: response.image_generation_call.generating properties: - item: - discriminator: - mapping: - file_search_call: '#/components/schemas/OutputItemFileSearchCall' - function_call: '#/components/schemas/OutputItemFunctionCall' - image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' - message: '#/components/schemas/OutputMessage' - reasoning: '#/components/schemas/OutputItemReasoning' - web_search_call: '#/components/schemas/OutputItemWebSearchCall' - propertyName: type - oneOf: - - $ref: '#/components/schemas/OutputMessage' - - $ref: '#/components/schemas/OutputItemReasoning' - - $ref: '#/components/schemas/OutputItemFunctionCall' - - $ref: '#/components/schemas/OutputItemWebSearchCall' - - $ref: '#/components/schemas/OutputItemFileSearchCall' - - $ref: '#/components/schemas/OutputItemImageGenerationCall' + item_id: + type: string output_index: type: integer sequence_number: type: integer type: enum: - - response.output_item.done + - response.image_generation_call.generating type: string required: - type + - item_id - output_index - - item - sequence_number type: object - OutputItemFileSearchCall: + OpenAIResponsesImageGenCallInProgress: example: - id: filesearch-abc123 - queries: - - machine learning algorithms - - neural networks - status: completed - type: file_search_call + item_id: ig_abc123 + output_index: 0 + sequence_number: 1 + type: response.image_generation_call.in_progress properties: - id: + item_id: type: string - queries: - items: - type: string - type: array - status: - $ref: '#/components/schemas/WebSearchStatus' + output_index: + type: integer + sequence_number: + type: integer type: enum: - - file_search_call + - response.image_generation_call.in_progress type: string required: - type - - id - - queries - - status + - item_id + - output_index + - sequence_number type: object - OutputItemFunctionCall: + OpenAIResponsesImageGenCallPartialImage: example: - arguments: '{"location":"San Francisco","unit":"celsius"}' - call_id: call-abc123 - id: call-abc123 - name: get_weather - type: function_call + item_id: ig_abc123 + output_index: 0 + partial_image_b64: iVBORw0KGgo... + partial_image_index: 0 + sequence_number: 3 + type: response.image_generation_call.partial_image properties: - arguments: - type: string - call_id: - type: string - id: + item_id: type: string - name: + output_index: + type: integer + partial_image_b64: type: string - status: - anyOf: - - enum: - - completed - type: string - - enum: - - incomplete - type: string - - enum: - - in_progress - type: string + partial_image_index: + type: integer + sequence_number: + type: integer type: enum: - - function_call + - response.image_generation_call.partial_image type: string required: - type - - name - - arguments - - call_id + - item_id + - output_index + - sequence_number + - partial_image_b64 + - partial_image_index type: object - OutputItemImageGenerationCall: + OpenAIResponsesRefusalContent: example: - id: imagegen-abc123 - result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== - status: completed - type: image_generation_call + refusal: I'm sorry, I cannot assist with that request + type: refusal properties: - id: - type: string - result: - default: null - nullable: true + refusal: type: string - status: - $ref: '#/components/schemas/ImageGenerationStatus' type: enum: - - image_generation_call + - refusal type: string required: - type - - id - - status + - refusal type: object - OutputItemReasoning: + OpenAIResponsesResponseStatus: + enum: + - completed + - incomplete + - in_progress + - failed + - cancelled + - queued + example: completed + type: string + x-speakeasy-unknown-values: allow + OpenAIResponsesSearchCompleted: example: - id: reasoning-abc123 - summary: - - text: Analyzed the problem using first principles - type: summary_text - type: reasoning + item_id: ws_abc123 + output_index: 0 + sequence_number: 5 + type: response.web_search_call.completed properties: - content: - items: - $ref: '#/components/schemas/ReasoningTextContent' - type: array - encrypted_content: - nullable: true + item_id: type: string - id: + output_index: + type: integer + sequence_number: + type: integer + type: + enum: + - response.web_search_call.completed type: string - status: - anyOf: - - enum: - - completed + required: + - type + - item_id + - output_index + - sequence_number + type: object + OpenAIResponsesToolChoice: + anyOf: + - enum: + - auto + type: string + - enum: + - none + type: string + - enum: + - required + type: string + - properties: + name: type: string - - enum: - - incomplete + type: + enum: + - function type: string - - enum: - - in_progress + required: + - type + - name + type: object + - properties: + type: + anyOf: + - enum: + - web_search_preview_2025_03_11 + type: string + - enum: + - web_search_preview + type: string + required: + - type + type: object + - $ref: '#/components/schemas/ToolChoiceAllowed' + - properties: + type: + enum: + - apply_patch type: string - summary: - items: - $ref: '#/components/schemas/ReasoningSummaryText' - type: array + required: + - type + type: object + - properties: + type: + enum: + - shell + type: string + required: + - type + type: object + example: auto + OpenAIResponsesTruncation: + enum: + - auto + - disabled + - null + example: auto + nullable: true + type: string + x-speakeasy-unknown-values: allow + OpenAIResponsesUsage: + example: + input_tokens: 100 + input_tokens_details: + cached_tokens: 0 + output_tokens: 50 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 150 + properties: + input_tokens: + type: integer + input_tokens_details: + properties: + cached_tokens: + type: integer + required: + - cached_tokens + type: object + output_tokens: + type: integer + output_tokens_details: + properties: + reasoning_tokens: + type: integer + required: + - reasoning_tokens + type: object + total_tokens: + type: integer + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + type: object + OpenAIResponsesWebSearchCallInProgress: + example: + item_id: ws_abc123 + output_index: 0 + sequence_number: 1 + type: response.web_search_call.in_progress + properties: + item_id: + type: string + output_index: + type: integer + sequence_number: + type: integer type: enum: - - reasoning + - response.web_search_call.in_progress type: string required: - type - - id - - summary + - item_id + - output_index + - sequence_number type: object - OutputItems: - description: An output item from the response - discriminator: - mapping: - code_interpreter_call: '#/components/schemas/OutputCodeInterpreterCallItem' - computer_call: '#/components/schemas/OutputComputerCallItem' - file_search_call: '#/components/schemas/OutputFileSearchCallItem' - function_call: '#/components/schemas/OutputFunctionCallItem' - image_generation_call: '#/components/schemas/OutputImageGenerationCallItem' - message: '#/components/schemas/OutputMessageItem' - openrouter:apply_patch: '#/components/schemas/OutputApplyPatchServerToolItem' - openrouter:bash: '#/components/schemas/OutputBashServerToolItem' - openrouter:browser_use: '#/components/schemas/OutputBrowserUseServerToolItem' - openrouter:code_interpreter: '#/components/schemas/OutputCodeInterpreterServerToolItem' - openrouter:datetime: '#/components/schemas/OutputDatetimeItem' - openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem' - openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem' - openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem' - openrouter:memory: '#/components/schemas/OutputMemoryServerToolItem' - openrouter:text_editor: '#/components/schemas/OutputTextEditorServerToolItem' - openrouter:tool_search: '#/components/schemas/OutputToolSearchServerToolItem' - openrouter:web_fetch: '#/components/schemas/OutputWebFetchServerToolItem' - openrouter:web_search: '#/components/schemas/OutputWebSearchServerToolItem' - reasoning: '#/components/schemas/OutputReasoningItem' - web_search_call: '#/components/schemas/OutputWebSearchCallItem' - propertyName: type - example: - content: - - text: Hello! How can I help you today? - type: output_text - id: msg-abc123 - role: assistant - status: completed - type: message - oneOf: - - $ref: '#/components/schemas/OutputMessageItem' - - $ref: '#/components/schemas/OutputReasoningItem' - - $ref: '#/components/schemas/OutputFunctionCallItem' - - $ref: '#/components/schemas/OutputWebSearchCallItem' - - $ref: '#/components/schemas/OutputFileSearchCallItem' - - $ref: '#/components/schemas/OutputImageGenerationCallItem' - - $ref: '#/components/schemas/OutputCodeInterpreterCallItem' - - $ref: '#/components/schemas/OutputComputerCallItem' - - $ref: '#/components/schemas/OutputDatetimeItem' - - $ref: '#/components/schemas/OutputWebSearchServerToolItem' - - $ref: '#/components/schemas/OutputCodeInterpreterServerToolItem' - - $ref: '#/components/schemas/OutputFileSearchServerToolItem' - - $ref: '#/components/schemas/OutputImageGenerationServerToolItem' - - $ref: '#/components/schemas/OutputBrowserUseServerToolItem' - - $ref: '#/components/schemas/OutputBashServerToolItem' - - $ref: '#/components/schemas/OutputTextEditorServerToolItem' - - $ref: '#/components/schemas/OutputApplyPatchServerToolItem' - - $ref: '#/components/schemas/OutputWebFetchServerToolItem' - - $ref: '#/components/schemas/OutputToolSearchServerToolItem' - - $ref: '#/components/schemas/OutputMemoryServerToolItem' - - $ref: '#/components/schemas/OutputMcpServerToolItem' - OutputItemWebSearchCall: + OpenAIResponsesWebSearchCallSearching: example: - action: - query: OpenAI API - type: search - id: search-abc123 - status: completed - type: web_search_call + item_id: ws_abc123 + output_index: 0 + sequence_number: 2 + type: response.web_search_call.searching properties: - action: - oneOf: - - properties: - queries: - items: - type: string - type: array - query: - type: string - sources: - items: - $ref: '#/components/schemas/WebSearchSource' - type: array - type: - enum: - - search - type: string - required: - - type - - query - type: object - - properties: - type: - enum: - - open_page - type: string - url: - nullable: true - type: string - required: - - type - type: object - - properties: - pattern: - type: string - type: - enum: - - find_in_page - type: string - url: - type: string - required: - - type - - pattern - - url - type: object - id: + item_id: type: string - status: - $ref: '#/components/schemas/WebSearchStatus' + output_index: + type: integer + sequence_number: + type: integer type: enum: - - web_search_call + - response.web_search_call.searching type: string required: - type - - id - - action - - status + - item_id + - output_index + - sequence_number type: object - OutputMcpServerToolItem: - description: An openrouter:mcp server tool output item + OpenResponsesCreatedEvent: + allOf: + - $ref: '#/components/schemas/CreatedEvent' + - properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + type: object + description: Event emitted when a response is created example: - id: mcp_tmp_abc123 - serverLabel: my-server - status: completed - toolName: get_data - type: openrouter:mcp - properties: - id: - type: string - serverLabel: - type: string - status: - $ref: '#/components/schemas/ToolCallStatus' - toolName: - type: string - type: - enum: - - openrouter:mcp - type: string - required: - - status - - type - type: object - OutputMemoryServerToolItem: - description: An openrouter:memory server tool output item + response: + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: [] + parallel_tool_calls: true + status: in_progress + temperature: null + tool_choice: auto + tools: [] + top_p: null + sequence_number: 0 + type: response.created + OpenResponsesInProgressEvent: + allOf: + - $ref: '#/components/schemas/InProgressEvent' + - properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + type: object + description: Event emitted when a response is in progress example: - action: read - id: mem_tmp_abc123 - key: user_preference - status: completed - type: openrouter:memory - properties: - action: - enum: - - read - - write - - delete - type: string - x-speakeasy-unknown-values: allow - id: - type: string - key: - type: string - status: - $ref: '#/components/schemas/ToolCallStatus' - type: - enum: - - openrouter:memory - type: string - value: - nullable: true - required: - - status - - type - type: object - OutputMessage: + response: + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: [] + parallel_tool_calls: true + status: in_progress + temperature: null + tool_choice: auto + tools: [] + top_p: null + sequence_number: 1 + type: response.in_progress + OpenResponsesLogProbs: + description: Log probability information for a token example: - content: - - text: Hello! How can I help you today? - type: output_text - id: msg-abc123 - role: assistant - status: completed - type: message + logprob: -0.1 + token: world + top_logprobs: + - logprob: -0.5 + token: hello properties: - content: + bytes: items: - anyOf: - - $ref: '#/components/schemas/ResponseOutputText' - - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + type: integer type: array - id: - type: string - phase: - anyOf: - - enum: - - commentary - type: string - - enum: - - final_answer - type: string - - nullable: true - description: >- - 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. - role: - enum: - - assistant - type: string - status: - anyOf: - - enum: - - completed - type: string - - enum: - - incomplete - type: string - - enum: - - in_progress - type: string - type: - enum: - - message + logprob: + format: double + type: number + token: type: string + top_logprobs: + items: + $ref: '#/components/schemas/OpenResponsesTopLogprobs' + type: array required: - - id - - role - - type - - content + - logprob + - token type: object - OutputMessageItem: - allOf: - - $ref: '#/components/schemas/OutputMessage' - - properties: {} - type: object - description: An output message item - example: - content: - - annotations: [] - text: Hello! How can I help you? - type: output_text - id: msg-123 - role: assistant - status: completed - type: message - OutputModality: - enum: - - text - - image - - embeddings - - audio - - video - - rerank - example: text - type: string - x-speakeasy-unknown-values: allow - OutputModalityEnum: - enum: - - text - - image - example: text - type: string - x-speakeasy-unknown-values: allow - OutputReasoningItem: + OpenResponsesResult: allOf: - - $ref: '#/components/schemas/OutputItemReasoning' + - $ref: '#/components/schemas/BaseResponsesResult' - properties: - content: + openrouter_metadata: + $ref: '#/components/schemas/OpenRouterMetadata' + output: items: - $ref: '#/components/schemas/ReasoningTextContent' - nullable: true + $ref: '#/components/schemas/OutputItems' type: array - format: - $ref: '#/components/schemas/ReasoningFormat' - signature: - description: A signature for the reasoning content, used for verification - example: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + service_tier: nullable: true type: string + text: + $ref: '#/components/schemas/TextExtendedConfig' + usage: + $ref: '#/components/schemas/Usage' type: object - description: An output item containing reasoning - example: - content: - - text: First, we analyze the problem... - type: reasoning_text - format: anthropic-claude-v1 - id: reasoning-123 - signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... - status: completed - summary: - - text: Analyzed the problem and found the optimal solution. - type: summary_text - type: reasoning - OutputTextEditorServerToolItem: - description: An openrouter:text_editor server tool output item + description: Complete non-streaming response from the Responses API example: - command: view - filePath: /src/main.ts - id: te_tmp_abc123 + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: + - content: + - annotations: [] + text: Hello! How can I help you today? + type: output_text + id: msg-abc123 + role: assistant + status: completed + type: message + parallel_tool_calls: true status: completed - type: openrouter:text_editor - properties: - command: - enum: - - view - - create - - str_replace - - insert - type: string - x-speakeasy-unknown-values: allow - filePath: - type: string - id: - type: string - status: - $ref: '#/components/schemas/ToolCallStatus' - type: - enum: - - openrouter:text_editor - type: string - required: - - status - - type - type: object - OutputToolSearchServerToolItem: - description: An openrouter:tool_search server tool output item + temperature: null + tool_choice: auto + tools: [] + top_p: null + usage: + input_tokens: 10 + input_tokens_details: + cached_tokens: 0 + output_tokens: 25 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 35 + OpenResponsesTopLogprobs: + description: Alternative token with its log probability example: - id: ts_tmp_abc123 - query: weather tools - status: completed - type: openrouter:tool_search + logprob: -0.5 + token: hello properties: - id: - type: string - query: - type: string - status: - $ref: '#/components/schemas/ToolCallStatus' - type: - enum: - - openrouter:tool_search + bytes: + items: + type: integer + type: array + logprob: + format: double + type: number + token: type: string - required: - - status - - type type: object - OutputWebFetchServerToolItem: - description: An openrouter:web_fetch server tool output item + OpenRouterMetadata: example: - id: wf_tmp_abc123 - status: completed - title: Example Domain - type: openrouter:web_fetch - url: https://example.com + attempt: 1 + endpoints: + available: + - model: openai/gpt-4o + provider: OpenAI + selected: true + total: 1 + is_byok: false + region: iad + requested: openai/gpt-4o + strategy: direct + summary: available=1, selected=OpenAI properties: - content: - type: string - id: - type: string - status: - $ref: '#/components/schemas/ToolCallStatus' - title: + attempt: + type: integer + attempts: + items: + $ref: '#/components/schemas/RouterAttempt' + type: array + endpoints: + $ref: '#/components/schemas/EndpointsMetadata' + is_byok: + type: boolean + params: + $ref: '#/components/schemas/RouterParams' + pipeline: + items: + $ref: '#/components/schemas/PipelineStage' + type: array + region: + nullable: true type: string - type: - enum: - - openrouter:web_fetch + requested: type: string - url: + strategy: + $ref: '#/components/schemas/RoutingStrategy' + summary: type: string required: - - status - - type + - requested + - strategy + - region + - summary + - attempt + - is_byok + - endpoints type: object - OutputWebSearchCallItem: - allOf: - - $ref: '#/components/schemas/OutputItemWebSearchCall' - - properties: {} - type: object - example: - id: ws-abc123 - status: completed - type: web_search_call - OutputWebSearchServerToolItem: - description: An openrouter:web_search server tool output item + OpenRouterWebSearchServerTool: + description: 'OpenRouter built-in server tool: searches the web for current information' example: - id: ws_tmp_abc123 - status: completed + parameters: + max_results: 5 type: openrouter:web_search properties: - id: - type: string - status: - $ref: '#/components/schemas/ToolCallStatus' + parameters: + $ref: '#/components/schemas/WebSearchConfig' type: enum: - openrouter:web_search type: string required: - - status - type type: object - Parameter: - enum: - - temperature - - top_p - - top_k - - min_p - - top_a - - frequency_penalty - - presence_penalty - - repetition_penalty - - max_tokens - - max_completion_tokens - - logit_bias - - logprobs - - top_logprobs - - seed - - response_format - - structured_outputs - - stop - - tools - - tool_choice - - parallel_tool_calls - - include_reasoning - - reasoning - - reasoning_effort - - web_search_options - - verbosity - example: temperature - type: string - x-speakeasy-unknown-values: allow - PayloadTooLargeResponse: - description: Payload Too Large - Request payload exceeds size limits + ORAnthropicContentBlock: + discriminator: + mapping: + advisor_tool_result: '#/components/schemas/AnthropicAdvisorToolResult' + bash_code_execution_tool_result: '#/components/schemas/AnthropicBashCodeExecutionToolResult' + code_execution_tool_result: '#/components/schemas/AnthropicCodeExecutionToolResult' + compaction: '#/components/schemas/AnthropicCompactionBlock' + container_upload: '#/components/schemas/AnthropicContainerUpload' + redacted_thinking: '#/components/schemas/AnthropicRedactedThinkingBlock' + server_tool_use: '#/components/schemas/ORAnthropicServerToolUseBlock' + text: '#/components/schemas/AnthropicTextBlock' + text_editor_code_execution_tool_result: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult' + thinking: '#/components/schemas/AnthropicThinkingBlock' + tool_search_tool_result: '#/components/schemas/AnthropicToolSearchToolResult' + tool_use: '#/components/schemas/AnthropicToolUseBlock' + web_fetch_tool_result: '#/components/schemas/AnthropicWebFetchToolResult' + web_search_tool_result: '#/components/schemas/AnthropicWebSearchToolResult' + propertyName: type example: - error: - code: 413 - message: Request payload too large + citations: null + text: Hello, world! + type: text + oneOf: + - $ref: '#/components/schemas/AnthropicTextBlock' + - $ref: '#/components/schemas/AnthropicToolUseBlock' + - $ref: '#/components/schemas/AnthropicThinkingBlock' + - $ref: '#/components/schemas/AnthropicRedactedThinkingBlock' + - $ref: '#/components/schemas/ORAnthropicServerToolUseBlock' + - $ref: '#/components/schemas/AnthropicWebSearchToolResult' + - $ref: '#/components/schemas/AnthropicWebFetchToolResult' + - $ref: '#/components/schemas/AnthropicCodeExecutionToolResult' + - $ref: '#/components/schemas/AnthropicBashCodeExecutionToolResult' + - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult' + - $ref: '#/components/schemas/AnthropicToolSearchToolResult' + - $ref: '#/components/schemas/AnthropicContainerUpload' + - $ref: '#/components/schemas/AnthropicCompactionBlock' + - $ref: '#/components/schemas/AnthropicAdvisorToolResult' + ORAnthropicNullableCaller: + discriminator: + mapping: + code_execution_20250825: '#/components/schemas/AnthropicCodeExecution20250825Caller' + code_execution_20260120: '#/components/schemas/AnthropicCodeExecution20260120Caller' + direct: '#/components/schemas/AnthropicDirectCaller' + propertyName: type + example: null + oneOf: + - $ref: '#/components/schemas/AnthropicDirectCaller' + - $ref: '#/components/schemas/AnthropicCodeExecution20250825Caller' + - $ref: '#/components/schemas/AnthropicCodeExecution20260120Caller' + - nullable: true + ORAnthropicServerToolUseBlock: + example: + caller: null + id: srvtoolu_01abc + input: {} + name: advisor + type: server_tool_use properties: - error: - $ref: '#/components/schemas/PayloadTooLargeResponseErrorData' - user_id: + caller: + $ref: '#/components/schemas/ORAnthropicNullableCaller' + id: + type: string + input: nullable: true + name: + type: string + type: + enum: + - server_tool_use type: string required: - - error + - type + - id + - name type: object - PayloadTooLargeResponseErrorData: - description: Error data for PayloadTooLargeResponse - example: - code: 413 - message: Request payload too large + ORAnthropicStopReason: + enum: + - end_turn + - max_tokens + - stop_sequence + - tool_use + - pause_turn + - refusal + - compaction + - null + example: end_turn + nullable: true + type: string + x-speakeasy-unknown-values: allow + OutputApplyPatchCallItem: + description: >- + A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand. + example: + call_id: call_abc123 + id: apc_abc123 + operation: + diff: |- + @@ function main() { + + console.log("hi"); + } + path: /src/main.ts + type: update_file + status: completed + type: apply_patch_call properties: - code: - type: integer - message: + call_id: + type: string + id: + type: string + operation: + $ref: '#/components/schemas/ApplyPatchCallOperation' + status: + $ref: '#/components/schemas/ApplyPatchCallStatus' + type: + enum: + - apply_patch_call type: string - metadata: - additionalProperties: - nullable: true - nullable: true - type: object required: - - code - - message + - type + - id + - call_id + - status + - operation type: object - PaymentRequiredResponse: - description: Payment Required - Insufficient credits or quota to complete request - example: - error: - code: 402 - message: Insufficient credits. Add more using https://openrouter.ai/credits + OutputApplyPatchServerToolItem: + description: >- + An openrouter:apply_patch server tool output item. The turn halts when validation succeeds so the client can apply the patch and echo an `apply_patch_call_output` on the next turn. + example: + call_id: call_abc123 + id: apc_abc123 + operation: + diff: |- + @@ function main() { + + console.log("hi"); + } + path: /src/main.ts + type: update_file + status: completed + type: openrouter:apply_patch properties: - error: - $ref: '#/components/schemas/PaymentRequiredResponseErrorData' - user_id: - nullable: true + call_id: + type: string + id: + type: string + operation: + $ref: '#/components/schemas/ApplyPatchCallOperation' + status: + $ref: '#/components/schemas/ToolCallStatus' + type: + enum: + - openrouter:apply_patch type: string required: - - error + - status + - type type: object - PaymentRequiredResponseErrorData: - description: Error data for PaymentRequiredResponse + OutputBashServerToolItem: + description: An openrouter:bash server tool output item example: - code: 402 - message: Insufficient credits. Add more using https://openrouter.ai/credits + command: ls -la + exitCode: 0 + id: bash_tmp_abc123 + status: completed + stdout: | + total 0 + type: openrouter:bash properties: - code: + command: + type: string + exitCode: type: integer - message: + id: type: string - metadata: - additionalProperties: - nullable: true - nullable: true - type: object - required: - - code - - message - type: object - PDFParserEngine: - anyOf: - - enum: - - mistral-ocr - - native - - cloudflare-ai + status: + $ref: '#/components/schemas/ToolCallStatus' + stderr: type: string - x-speakeasy-unknown-values: allow - - enum: - - pdf-text + stdout: type: string - description: >- - The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". - example: cloudflare-ai - PDFParserOptions: - description: Options for PDF parsing. + type: + enum: + - openrouter:bash + type: string + required: + - status + - type + type: object + OutputBrowserUseServerToolItem: + description: An openrouter:browser_use server tool output item example: - engine: cloudflare-ai + action: screenshot + id: bu_tmp_abc123 + status: completed + type: openrouter:browser_use properties: - engine: - $ref: '#/components/schemas/PDFParserEngine' + action: + type: string + id: + type: string + screenshotB64: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + type: + enum: + - openrouter:browser_use + type: string + required: + - status + - type type: object - PercentileLatencyCutoffs: - description: Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + OutputCodeInterpreterCallItem: + allOf: + - $ref: '#/components/schemas/CodeInterpreterCallItem' + - properties: {} + type: object + description: A code interpreter execution call with outputs example: - p50: 5 - p90: 10 - properties: - p50: - description: Maximum p50 latency (seconds) - format: double - nullable: true - type: number - p75: - description: Maximum p75 latency (seconds) - format: double - nullable: true - type: number - p90: - description: Maximum p90 latency (seconds) - format: double - nullable: true - type: number - p99: - description: Maximum p99 latency (seconds) - format: double - nullable: true - type: number - type: object - PercentileStats: - description: >- - Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. - example: - p50: 25.5 - p75: 35.2 - p90: 48.7 - p99: 85.3 - nullable: true - properties: - p50: - description: Median (50th percentile) - example: 25.5 - format: double - type: number - p75: - description: 75th percentile - example: 35.2 - format: double - type: number - p90: - description: 90th percentile - example: 48.7 - format: double - type: number - p99: - description: 99th percentile - example: 85.3 - format: double - type: number - required: - - p50 - - p75 - - p90 - - p99 - type: object - PercentileThroughputCutoffs: - description: Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred. - example: - p50: 100 - p90: 50 - properties: - p50: - description: Minimum p50 throughput (tokens/sec) - format: double - nullable: true - type: number - p75: - description: Minimum p75 throughput (tokens/sec) - format: double - nullable: true - type: number - p90: - description: Minimum p90 throughput (tokens/sec) - format: double - nullable: true - type: number - p99: - description: Minimum p99 throughput (tokens/sec) - format: double - nullable: true - type: number - type: object - PerRequestLimits: - description: Per-request token limits - example: - completion_tokens: 1000 - prompt_tokens: 1000 - nullable: true - properties: - completion_tokens: - description: Maximum completion tokens per request - example: 1000 - type: number - prompt_tokens: - description: Maximum prompt tokens per request - example: 1000 - type: number - required: - - prompt_tokens - - completion_tokens - type: object - PreferredMaxLatency: - anyOf: - - format: double - type: number - - $ref: '#/components/schemas/PercentileLatencyCutoffs' - - nullable: true - description: >- - 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. - example: 5 - PreferredMinThroughput: - anyOf: - - format: double - type: number - - $ref: '#/components/schemas/PercentileThroughputCutoffs' - - nullable: true - description: >- - 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. - example: 100 - Preview_20250311_WebSearchServerTool: - description: Web search preview tool configuration (2025-03-11 version) + code: print("hello") + container_id: ctr-xyz789 + id: ci-abc123 + outputs: + - logs: | + hello + type: logs + status: completed + type: code_interpreter_call + OutputCodeInterpreterServerToolItem: + description: An openrouter:code_interpreter server tool output item example: - type: web_search_preview_2025_03_11 + code: print("hello") + id: ci_tmp_abc123 + language: python + status: completed + stdout: | + hello + type: openrouter:code_interpreter properties: - engine: - $ref: '#/components/schemas/WebSearchEngineEnum' - filters: - $ref: '#/components/schemas/WebSearchDomainFilter' - max_results: - description: >- - Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. - example: 5 + code: + type: string + exitCode: type: integer - search_context_size: - $ref: '#/components/schemas/SearchContextSizeEnum' + id: + type: string + language: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + stderr: + type: string + stdout: + type: string type: enum: - - web_search_preview_2025_03_11 + - openrouter:code_interpreter type: string - user_location: - $ref: '#/components/schemas/Preview_WebSearchUserLocation' required: + - status - type type: object - Preview_WebSearchServerTool: - description: Web search preview tool configuration + OutputComputerCallItem: example: - type: web_search_preview + action: + type: screenshot + call_id: call-abc123 + id: cu-abc123 + pending_safety_checks: [] + status: completed + type: computer_call properties: - engine: - $ref: '#/components/schemas/WebSearchEngineEnum' - filters: - $ref: '#/components/schemas/WebSearchDomainFilter' - max_results: - description: >- - Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. - example: 5 - type: integer - search_context_size: - $ref: '#/components/schemas/SearchContextSizeEnum' + action: + nullable: true + call_id: + type: string + id: + type: string + pending_safety_checks: + items: + properties: + code: + type: string + id: + type: string + message: + type: string + required: + - id + - code + - message + type: object + type: array + status: + enum: + - completed + - incomplete + - in_progress + type: string + x-speakeasy-unknown-values: allow type: enum: - - web_search_preview + - computer_call type: string - user_location: - $ref: '#/components/schemas/Preview_WebSearchUserLocation' required: - type + - call_id + - status + - pending_safety_checks type: object - Preview_WebSearchUserLocation: + OutputCustomToolCallItem: + description: >- + A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments. example: - city: San Francisco - country: USA - region: California - timezone: America/Los_Angeles - type: approximate - nullable: true + call_id: call-abc123 + id: ctc-abc123 + input: |- + *** Begin Patch + *** End Patch + name: apply_patch + type: custom_tool_call properties: - city: - nullable: true + call_id: type: string - country: - nullable: true + id: type: string - region: - nullable: true + input: type: string - timezone: - nullable: true + name: + type: string + namespace: + description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) type: string type: enum: - - approximate + - custom_tool_call type: string required: - type + - name + - input + - call_id type: object - ProviderName: - enum: - - AkashML - - AI21 - - AionLabs - - Alibaba - - Ambient - - Amazon Bedrock - - Amazon Nova - - Anthropic - - Arcee AI - - AtlasCloud - - Avian - - Azure - - BaseTen - - BytePlus - - Black Forest Labs - - Cerebras - - Chutes - - Cirrascale - - Clarifai - - Cloudflare - - Cohere - - Crusoe - - DeepInfra - - DeepSeek - - DekaLLM - - Featherless - - Fireworks - - Friendli - - GMICloud - - Google - - Google AI Studio - - Groq - - Hyperbolic - - Inception - - Inceptron - - InferenceNet - - Ionstream - - Infermatic - - Io Net - - Inflection - - Liquid - - Mara - - Mancer 2 - - Minimax - - ModelRun - - Mistral - - Modular - - Moonshot AI - - Morph - - NCompass - - Nebius - - NextBit - - Novita - - Nvidia - - OpenAI - - OpenInference - - Parasail - - Perplexity - - Phala - - Recraft - - Reka - - Relace - - SambaNova - - Seed - - SiliconFlow - - Sourceful - - StepFun - - Stealth - - StreamLake - - Switchpoint - - Together - - Upstage - - Venice - - WandB - - Xiaomi - - xAI - - Z.AI - - FakeProvider - example: OpenAI - type: string - x-speakeasy-unknown-values: allow - ProviderOverloadedResponse: - description: Provider Overloaded - Provider is temporarily overloaded + OutputDatetimeItem: + description: An openrouter:datetime server tool output item example: - error: - code: 529 - message: Provider returned error + datetime: '2026-03-12T14:30:00.000Z' + id: dt_tmp_abc123 + status: completed + timezone: UTC + type: openrouter:datetime properties: - error: - $ref: '#/components/schemas/ProviderOverloadedResponseErrorData' - user_id: - nullable: true + datetime: + description: ISO 8601 datetime string + type: string + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + timezone: + description: IANA timezone name + type: string + type: + enum: + - openrouter:datetime type: string required: - - error + - status + - type + - datetime + - timezone type: object - ProviderOverloadedResponseErrorData: - description: Error data for ProviderOverloadedResponse + OutputFileSearchCallItem: + allOf: + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - properties: {} + type: object example: - code: 529 - message: Provider returned error + id: fs-abc123 + queries: + - search term + results: [] + status: completed + type: file_search_call + OutputFileSearchServerToolItem: + description: An openrouter:file_search server tool output item + example: + id: fs_tmp_abc123 + queries: + - search term + status: completed + type: openrouter:file_search properties: - code: - type: integer - message: + id: + type: string + queries: + items: + type: string + type: array + status: + $ref: '#/components/schemas/ToolCallStatus' + type: + enum: + - openrouter:file_search type: string - metadata: - additionalProperties: - nullable: true - nullable: true - type: object required: - - code - - message + - status + - type type: object - ProviderPreferences: - additionalProperties: false - description: When multiple model providers are available, optionally indicate your routing preference. + OutputFunctionCallItem: + allOf: + - $ref: '#/components/schemas/OutputItemFunctionCall' + - properties: {} + type: object example: - allow_fallbacks: true - nullable: true + arguments: '{"location":"San Francisco"}' + call_id: call-abc123 + id: fc-abc123 + name: get_weather + status: completed + type: function_call + OutputFusionServerToolItem: + description: An openrouter:fusion server tool output item + example: + id: st_tmp_abc123 + status: completed + type: openrouter:fusion properties: - allow_fallbacks: - description: > - 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. - - nullable: true - type: boolean - data_collection: - description: >- - 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. - enum: - - deny - - allow - - null - example: allow - nullable: true + analysis: + description: Structured analysis produced by the fusion judge model. + properties: + blind_spots: + items: + type: string + type: array + consensus: + items: + type: string + type: array + contradictions: + items: + properties: + stances: + items: + properties: + model: + type: string + stance: + type: string + required: + - model + - stance + type: object + type: array + topic: + type: string + required: + - topic + - stances + type: object + type: array + partial_coverage: + items: + properties: + models: + items: + type: string + type: array + point: + type: string + required: + - models + - point + type: object + type: array + unique_insights: + items: + properties: + insight: + type: string + model: + type: string + required: + - model + - insight + type: object + type: array + required: + - consensus + - contradictions + - partial_coverage + - unique_insights + - blind_spots + type: object + error: + description: Error message when the fusion run did not produce an analysis result. type: string - x-speakeasy-unknown-values: allow - enforce_distillable_text: - description: >- - Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. - example: true - nullable: true - type: boolean - ignore: + failed_models: description: >- - List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. - example: - - openai - - anthropic + Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. The fusion result is still usable but was produced from a degraded panel. items: - anyOf: - - $ref: '#/components/schemas/ProviderName' - - type: string - nullable: true + properties: + error: + description: Error message describing why the model failed. + type: string + model: + description: Slug of the analysis model that failed. + type: string + required: + - model + - error + type: object type: array - max_price: - description: >- - The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - properties: - audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per audio unit - completion: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per million completion tokens - image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per image - prompt: - $ref: '#/components/schemas/BigNumberUnion' - request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: Price per request - type: object - only: - description: >- - List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. - example: - - openai - - anthropic - items: - anyOf: - - $ref: '#/components/schemas/ProviderName' - - type: string - nullable: true - type: array - order: - description: >- - 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. - example: - - openai - - anthropic - items: - anyOf: - - $ref: '#/components/schemas/ProviderName' - - type: string - nullable: true - type: array - preferred_max_latency: - $ref: '#/components/schemas/PreferredMaxLatency' - preferred_min_throughput: - $ref: '#/components/schemas/PreferredMinThroughput' - quantizations: - description: A list of quantization levels to filter the provider by. + id: + type: string + responses: + description: Slugs of the analysis models that produced a response in this fusion run. items: - $ref: '#/components/schemas/Quantization' - nullable: true + properties: + model: + type: string + required: + - model + type: object type: array - require_parameters: - description: >- - 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. - nullable: true - type: boolean - sort: - anyOf: - - $ref: '#/components/schemas/ProviderSort' - - $ref: '#/components/schemas/ProviderSortConfig' - - nullable: true - description: >- - The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - example: price - zdr: - description: >- - Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. - example: true - nullable: true - type: boolean + status: + $ref: '#/components/schemas/ToolCallStatus' + type: + enum: + - openrouter:fusion + type: string + required: + - status + - type type: object - ProviderResponse: - description: Details of a provider response for a generation attempt + OutputImageGenerationCallItem: + allOf: + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + - properties: {} + type: object example: - endpoint_id: ep_abc123 - id: chatcmpl-abc123 - is_byok: false - latency: 1200 - model_permaslug: openai/gpt-4 - provider_name: OpenAI - status: 200 + id: img-abc123 + result: null + status: completed + type: image_generation_call + OutputImageGenerationServerToolItem: + description: An openrouter:image_generation server tool output item + example: + id: ig_tmp_abc123 + imageUrl: https://example.com/image.png + result: https://example.com/image.png + status: completed + type: openrouter:image_generation properties: - endpoint_id: - description: Internal endpoint identifier - example: ep_abc123 - type: string id: - description: Upstream provider response identifier - example: chatcmpl-abc123 type: string - is_byok: - description: Whether the request used a bring-your-own-key - example: false - type: boolean - latency: - description: Response latency in milliseconds - example: 1200 - type: number - model_permaslug: - description: Canonical model slug - example: openai/gpt-4 + imageB64: type: string - provider_name: - description: Name of the provider - enum: - - AnyScale - - Atoma - - Cent-ML - - CrofAI - - Enfer - - GoPomelo - - HuggingFace - - Hyperbolic 2 - - InoCloud - - Kluster - - Lambda - - Lepton - - Lynn 2 - - Lynn - - Mancer - - Meta - - Modal - - Nineteen - - OctoAI - - Recursal - - Reflection - - Replicate - - SambaNova 2 - - SF Compute - - Targon - - Together 2 - - Ubicloud - - 01.AI - - AkashML - - AI21 - - AionLabs - - Alibaba - - Ambient - - Amazon Bedrock - - Amazon Nova - - Anthropic - - Arcee AI - - AtlasCloud - - Avian - - Azure - - BaseTen - - BytePlus - - Black Forest Labs - - Cerebras - - Chutes - - Cirrascale - - Clarifai - - Cloudflare - - Cohere - - Crusoe - - DeepInfra - - DeepSeek - - DekaLLM - - Featherless - - Fireworks - - Friendli - - GMICloud - - Google - - Google AI Studio - - Groq - - Hyperbolic - - Inception - - Inceptron - - InferenceNet - - Ionstream - - Infermatic - - Io Net - - Inflection - - Liquid - - Mara - - Mancer 2 - - Minimax - - ModelRun - - Mistral - - Modular - - Moonshot AI - - Morph - - NCompass - - Nebius - - NextBit - - Novita - - Nvidia - - OpenAI - - OpenInference - - Parasail - - Perplexity - - Phala - - Recraft - - Reka - - Relace - - SambaNova - - Seed - - SiliconFlow - - Sourceful - - StepFun - - Stealth - - StreamLake - - Switchpoint - - Together - - Upstage - - Venice - - WandB - - Xiaomi - - xAI - - Z.AI - - FakeProvider - example: OpenAI + imageUrl: type: string - x-speakeasy-unknown-values: allow - status: - description: HTTP status code from the provider - example: 200 + result: + description: The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format nullable: true - type: number + type: string + revisedPrompt: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + type: + enum: + - openrouter:image_generation + type: string required: - status + - type type: object - ProviderSort: - description: The provider sorting strategy (price, throughput, latency) - enum: - - price - - throughput - - latency - - exacto - example: price - type: string - x-speakeasy-unknown-values: allow - ProviderSortConfig: - description: The provider sorting strategy (price, throughput, latency) + OutputItemAddedEvent: + description: Event emitted when a new output item is added to the response example: - by: price - partition: model + item: + content: [] + id: item-1 + role: assistant + status: in_progress + type: message + output_index: 0 + sequence_number: 2 + type: response.output_item.added properties: - by: - description: The provider sorting strategy (price, throughput, latency) - enum: - - price - - throughput - - latency - - exacto - - null - example: price - nullable: true - type: string - x-speakeasy-unknown-values: allow - partition: - description: >- - Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. + item: + discriminator: + mapping: + custom_tool_call: '#/components/schemas/OutputItemCustomToolCall' + file_search_call: '#/components/schemas/OutputItemFileSearchCall' + function_call: '#/components/schemas/OutputItemFunctionCall' + image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' + message: '#/components/schemas/OutputMessage' + reasoning: '#/components/schemas/OutputItemReasoning' + web_search_call: '#/components/schemas/OutputItemWebSearchCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/OutputItemReasoning' + - $ref: '#/components/schemas/OutputItemFunctionCall' + - $ref: '#/components/schemas/OutputItemCustomToolCall' + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + output_index: + type: integer + sequence_number: + type: integer + type: enum: - - model - - none - - null - example: model - nullable: true + - response.output_item.added type: string - x-speakeasy-unknown-values: allow + required: + - type + - output_index + - item + - sequence_number type: object - PublicEndpoint: - description: Information about a specific model endpoint + OutputItemCustomToolCall: example: - context_length: 8192 - latency_last_30m: - p50: 0.25 - p75: 0.35 - p90: 0.48 - p99: 0.85 - max_completion_tokens: 4096 - max_prompt_tokens: 8192 - model_id: openai/gpt-4 - model_name: GPT-4 - name: 'OpenAI: GPT-4' - pricing: - completion: '0.00006' - image: '0' - prompt: '0.00003' - request: '0' - provider_name: OpenAI - quantization: fp16 - status: 0 - supported_parameters: - - temperature - - top_p - - max_tokens - supports_implicit_caching: true - tag: openai - throughput_last_30m: - p50: 45.2 - p75: 38.5 - p90: 28.3 - p99: 15.1 - uptime_last_1d: 99.8 - uptime_last_30m: 99.5 - uptime_last_5m: 100 + call_id: call-abc123 + id: ctc-abc123 + input: |- + *** Begin Patch + *** End Patch + name: apply_patch + type: custom_tool_call properties: - context_length: - type: integer - latency_last_30m: - $ref: '#/components/schemas/PercentileStats' - max_completion_tokens: - nullable: true - type: integer - max_prompt_tokens: - nullable: true - type: integer - model_id: - description: The unique identifier for the model (permaslug) - example: openai/gpt-4 + call_id: type: string - model_name: + id: + type: string + input: type: string name: type: string - pricing: - properties: - audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - audio_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - completion: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - discount: - type: number - image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - image_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - image_token: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_audio_cache: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_cache_read: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_cache_write: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - internal_reasoning: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - prompt: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - web_search: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - required: - - prompt - - completion - type: object - provider_name: - $ref: '#/components/schemas/ProviderName' - quantization: - allOf: - - $ref: '#/components/schemas/Quantization' - - nullable: true - status: - $ref: '#/components/schemas/EndpointStatus' - supported_parameters: - items: - $ref: '#/components/schemas/Parameter' - type: array - supports_implicit_caching: - type: boolean - tag: + namespace: + description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) + type: string + type: + enum: + - custom_tool_call type: string - throughput_last_30m: - allOf: - - $ref: '#/components/schemas/PercentileStats' - - description: >- - Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. - uptime_last_1d: - description: >- - Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. - format: double - nullable: true - type: number - uptime_last_30m: - format: double - nullable: true - type: number - uptime_last_5m: - description: >- - Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. - format: double - nullable: true - type: number required: + - type - name - - model_id - - model_name - - context_length - - pricing - - provider_name - - tag - - quantization - - max_completion_tokens - - max_prompt_tokens - - supported_parameters - - uptime_last_30m - - uptime_last_5m - - uptime_last_1d - - supports_implicit_caching - - latency_last_30m - - throughput_last_30m + - input + - call_id type: object - PublicPricing: - description: Pricing information for the model + OutputItemDoneEvent: + description: Event emitted when an output item is complete example: - completion: '0.00006' - image: '0' - prompt: '0.00003' - request: '0' - properties: - audio: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - audio_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - completion: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - discount: - type: number - image: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - image_output: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - image_token: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_audio_cache: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_cache_read: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - input_cache_write: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - internal_reasoning: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - prompt: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - request: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number - web_search: - allOf: - - $ref: '#/components/schemas/BigNumberUnion' - - description: A number or string value representing a large number + item: + content: + - annotations: [] + text: Hello! How can I help you? + type: output_text + id: item-1 + role: assistant + status: completed + type: message + output_index: 0 + sequence_number: 8 + type: response.output_item.done + properties: + item: + discriminator: + mapping: + custom_tool_call: '#/components/schemas/OutputItemCustomToolCall' + file_search_call: '#/components/schemas/OutputItemFileSearchCall' + function_call: '#/components/schemas/OutputItemFunctionCall' + image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' + message: '#/components/schemas/OutputMessage' + reasoning: '#/components/schemas/OutputItemReasoning' + web_search_call: '#/components/schemas/OutputItemWebSearchCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/OutputItemReasoning' + - $ref: '#/components/schemas/OutputItemFunctionCall' + - $ref: '#/components/schemas/OutputItemCustomToolCall' + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + output_index: + type: integer + sequence_number: + type: integer + type: + enum: + - response.output_item.done + type: string required: - - prompt - - completion + - type + - output_index + - item + - sequence_number type: object - Quantization: - enum: - - int4 - - int8 - - fp4 - - fp6 - - fp8 - - fp16 - - bf16 - - fp32 - - unknown - example: fp16 - type: string - x-speakeasy-unknown-values: allow - ReasoningConfig: - allOf: - - $ref: '#/components/schemas/BaseReasoningConfig' - - nullable: true - properties: - enabled: - nullable: true - type: boolean - max_tokens: - nullable: true - type: integer - type: object - description: Configuration for reasoning mode in the response - example: - enabled: true - summary: auto - ReasoningDeltaEvent: - allOf: - - $ref: '#/components/schemas/BaseReasoningDeltaEvent' - - properties: {} - type: object - description: Event emitted when reasoning text delta is streamed - example: - content_index: 0 - delta: First, we need - item_id: item-1 - output_index: 0 - sequence_number: 4 - type: response.reasoning_text.delta - ReasoningDetailEncrypted: - description: Reasoning detail encrypted schema + OutputItemFileSearchCall: example: - data: encrypted data - type: reasoning.encrypted + id: filesearch-abc123 + queries: + - machine learning algorithms + - neural networks + status: completed + type: file_search_call properties: - data: - type: string - format: - $ref: '#/components/schemas/ReasoningFormat' id: - nullable: true type: string - index: - type: integer + queries: + items: + type: string + type: array + status: + $ref: '#/components/schemas/WebSearchStatus' type: enum: - - reasoning.encrypted + - file_search_call type: string required: - type - - data + - id + - queries + - status type: object - ReasoningDetailSummary: - description: Reasoning detail summary schema + OutputItemFunctionCall: example: - summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... - type: reasoning.summary + arguments: '{"location":"San Francisco","unit":"celsius"}' + call_id: call-abc123 + id: call-abc123 + name: get_weather + type: function_call properties: - format: - $ref: '#/components/schemas/ReasoningFormat' + arguments: + type: string + call_id: + type: string id: - nullable: true type: string - index: - type: integer - summary: + name: + type: string + namespace: + description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) type: string + status: + anyOf: + - enum: + - completed + type: string + - enum: + - incomplete + type: string + - enum: + - in_progress + type: string type: enum: - - reasoning.summary + - function_call type: string required: - type - - summary + - name + - arguments + - call_id type: object - ReasoningDetailText: - description: Reasoning detail text schema + OutputItemImageGenerationCall: example: - signature: signature - text: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... - type: reasoning.text + id: imagegen-abc123 + result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== + status: completed + type: image_generation_call properties: - format: - $ref: '#/components/schemas/ReasoningFormat' id: - nullable: true - type: string - index: - type: integer - signature: - nullable: true type: string - text: + result: + default: null nullable: true type: string + status: + $ref: '#/components/schemas/ImageGenerationStatus' type: enum: - - reasoning.text + - image_generation_call type: string required: - type + - id + - status type: object - ReasoningDetailUnion: - description: Reasoning detail union schema - discriminator: - mapping: - reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted' - reasoning.summary: '#/components/schemas/ReasoningDetailSummary' - reasoning.text: '#/components/schemas/ReasoningDetailText' - propertyName: type - example: - summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... - type: reasoning.summary - oneOf: - - $ref: '#/components/schemas/ReasoningDetailSummary' - - $ref: '#/components/schemas/ReasoningDetailEncrypted' - - $ref: '#/components/schemas/ReasoningDetailText' - ReasoningDoneEvent: - allOf: - - $ref: '#/components/schemas/BaseReasoningDoneEvent' - - properties: {} - type: object - description: Event emitted when reasoning text streaming is complete - example: - content_index: 0 - item_id: item-1 - output_index: 0 - sequence_number: 6 - text: First, we need to identify the key components and then combine them logically. - type: response.reasoning_text.done - ReasoningEffort: - enum: - - xhigh - - high - - medium - - low - - minimal - - none - - null - example: medium - nullable: true - type: string - x-speakeasy-unknown-values: allow - ReasoningFormat: - enum: - - unknown - - openai-responses-v1 - - azure-openai-responses-v1 - - xai-responses-v1 - - anthropic-claude-v1 - - google-gemini-v1 - - null - example: unknown - nullable: true - type: string - x-speakeasy-unknown-values: allow - ReasoningItem: - allOf: - - $ref: '#/components/schemas/OutputItemReasoning' - - properties: - content: - items: - $ref: '#/components/schemas/ReasoningTextContent' - nullable: true - type: array - format: - $ref: '#/components/schemas/ReasoningFormat' - signature: - nullable: true - type: string - type: object - description: Reasoning output item with signature and format extensions + OutputItemReasoning: example: id: reasoning-abc123 summary: - - text: Step by step analysis + - text: Analyzed the problem using first principles type: summary_text type: reasoning - ReasoningSummaryPartAddedEvent: - allOf: - - $ref: '#/components/schemas/BaseReasoningSummaryPartAddedEvent' - - properties: {} - type: object - description: Event emitted when a reasoning summary part is added - example: - item_id: item-1 - output_index: 0 - part: - text: '' - type: summary_text - sequence_number: 3 - summary_index: 0 - type: response.reasoning_summary_part.added - ReasoningSummaryPartDoneEvent: - allOf: - - $ref: '#/components/schemas/BaseReasoningSummaryPartDoneEvent' - - properties: {} - type: object - description: Event emitted when a reasoning summary part is complete - example: - item_id: item-1 - output_index: 0 - part: - text: Analyzing the problem step by step to find the optimal solution. - type: summary_text - sequence_number: 7 - summary_index: 0 - type: response.reasoning_summary_part.done - ReasoningSummaryText: - example: - text: Analyzed the problem using first principles - type: summary_text properties: - text: - type: string - type: - enum: - - summary_text + content: + items: + $ref: '#/components/schemas/ReasoningTextContent' + type: array + encrypted_content: + nullable: true type: string - required: - - type - - text - type: object - ReasoningSummaryTextDeltaEvent: - allOf: - - $ref: '#/components/schemas/BaseReasoningSummaryTextDeltaEvent' - - properties: {} - type: object - description: Event emitted when reasoning summary text delta is streamed - example: - delta: Analyzing - item_id: item-1 - output_index: 0 - sequence_number: 4 - summary_index: 0 - type: response.reasoning_summary_text.delta - ReasoningSummaryTextDoneEvent: - allOf: - - $ref: '#/components/schemas/BaseReasoningSummaryTextDoneEvent' - - properties: {} - type: object - description: Event emitted when reasoning summary text streaming is complete - example: - item_id: item-1 - output_index: 0 - sequence_number: 6 - summary_index: 0 - text: Analyzing the problem step by step to find the optimal solution. - type: response.reasoning_summary_text.done - ReasoningSummaryVerbosity: - enum: - - auto - - concise - - detailed - - null - example: auto - nullable: true - type: string - x-speakeasy-unknown-values: allow - ReasoningTextContent: - example: - text: Let me think step by step about this problem... - type: reasoning_text - properties: - text: + id: type: string + status: + anyOf: + - enum: + - completed + type: string + - enum: + - incomplete + type: string + - enum: + - in_progress + type: string + summary: + items: + $ref: '#/components/schemas/ReasoningSummaryText' + type: array type: enum: - - reasoning_text + - reasoning type: string required: - type - - text + - id + - summary type: object - RefusalDeltaEvent: - allOf: - - $ref: '#/components/schemas/BaseRefusalDeltaEvent' - - properties: {} - type: object - description: Event emitted when a refusal delta is streamed - example: - content_index: 0 - delta: I'm sorry - item_id: item-1 - output_index: 0 - sequence_number: 4 - type: response.refusal.delta - RefusalDoneEvent: - allOf: - - $ref: '#/components/schemas/BaseRefusalDoneEvent' - - properties: {} - type: object - description: Event emitted when refusal streaming is complete + OutputItems: + description: An output item from the response + discriminator: + mapping: + apply_patch_call: '#/components/schemas/OutputApplyPatchCallItem' + code_interpreter_call: '#/components/schemas/OutputCodeInterpreterCallItem' + computer_call: '#/components/schemas/OutputComputerCallItem' + custom_tool_call: '#/components/schemas/OutputCustomToolCallItem' + file_search_call: '#/components/schemas/OutputFileSearchCallItem' + function_call: '#/components/schemas/OutputFunctionCallItem' + image_generation_call: '#/components/schemas/OutputImageGenerationCallItem' + message: '#/components/schemas/OutputMessageItem' + openrouter:apply_patch: '#/components/schemas/OutputApplyPatchServerToolItem' + openrouter:bash: '#/components/schemas/OutputBashServerToolItem' + openrouter:browser_use: '#/components/schemas/OutputBrowserUseServerToolItem' + openrouter:code_interpreter: '#/components/schemas/OutputCodeInterpreterServerToolItem' + openrouter:datetime: '#/components/schemas/OutputDatetimeItem' + openrouter:experimental__search_models: '#/components/schemas/OutputSearchModelsServerToolItem' + openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem' + openrouter:fusion: '#/components/schemas/OutputFusionServerToolItem' + openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem' + openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem' + openrouter:memory: '#/components/schemas/OutputMemoryServerToolItem' + openrouter:text_editor: '#/components/schemas/OutputTextEditorServerToolItem' + openrouter:tool_search: '#/components/schemas/OutputToolSearchServerToolItem' + openrouter:web_fetch: '#/components/schemas/OutputWebFetchServerToolItem' + openrouter:web_search: '#/components/schemas/OutputWebSearchServerToolItem' + reasoning: '#/components/schemas/OutputReasoningItem' + web_search_call: '#/components/schemas/OutputWebSearchCallItem' + propertyName: type example: - content_index: 0 - item_id: item-1 - output_index: 0 - refusal: I'm sorry, but I can't assist with that request. - sequence_number: 6 - type: response.refusal.done - RequestMetadata: - additionalProperties: - maxLength: 512 - type: string - description: >- - 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. + content: + - text: Hello! How can I help you today? + type: output_text + id: msg-abc123 + role: assistant + status: completed + type: message + oneOf: + - $ref: '#/components/schemas/OutputMessageItem' + - $ref: '#/components/schemas/OutputReasoningItem' + - $ref: '#/components/schemas/OutputFunctionCallItem' + - $ref: '#/components/schemas/OutputWebSearchCallItem' + - $ref: '#/components/schemas/OutputFileSearchCallItem' + - $ref: '#/components/schemas/OutputImageGenerationCallItem' + - $ref: '#/components/schemas/OutputCodeInterpreterCallItem' + - $ref: '#/components/schemas/OutputComputerCallItem' + - $ref: '#/components/schemas/OutputDatetimeItem' + - $ref: '#/components/schemas/OutputWebSearchServerToolItem' + - $ref: '#/components/schemas/OutputCodeInterpreterServerToolItem' + - $ref: '#/components/schemas/OutputFileSearchServerToolItem' + - $ref: '#/components/schemas/OutputImageGenerationServerToolItem' + - $ref: '#/components/schemas/OutputBrowserUseServerToolItem' + - $ref: '#/components/schemas/OutputBashServerToolItem' + - $ref: '#/components/schemas/OutputTextEditorServerToolItem' + - $ref: '#/components/schemas/OutputApplyPatchServerToolItem' + - $ref: '#/components/schemas/OutputApplyPatchCallItem' + - $ref: '#/components/schemas/OutputWebFetchServerToolItem' + - $ref: '#/components/schemas/OutputToolSearchServerToolItem' + - $ref: '#/components/schemas/OutputMemoryServerToolItem' + - $ref: '#/components/schemas/OutputMcpServerToolItem' + - $ref: '#/components/schemas/OutputSearchModelsServerToolItem' + - $ref: '#/components/schemas/OutputFusionServerToolItem' + - $ref: '#/components/schemas/OutputCustomToolCallItem' + OutputItemWebSearchCall: example: - session_id: abc-def-ghi - user_id: '123' - nullable: true - type: object - RequestTimeoutResponse: - description: Request Timeout - Operation exceeded time limit - example: - error: - code: 408 - message: Operation timed out. Please try again later. + action: + query: OpenAI API + type: search + id: search-abc123 + status: completed + type: web_search_call properties: - error: - $ref: '#/components/schemas/RequestTimeoutResponseErrorData' - user_id: - nullable: true + action: + oneOf: + - properties: + queries: + items: + type: string + type: array + query: + type: string + sources: + items: + $ref: '#/components/schemas/WebSearchSource' + type: array + type: + enum: + - search + type: string + required: + - type + - query + type: object + - properties: + type: + enum: + - open_page + type: string + url: + nullable: true + type: string + required: + - type + type: object + - properties: + pattern: + type: string + type: + enum: + - find_in_page + type: string + url: + type: string + required: + - type + - pattern + - url + type: object + id: + type: string + status: + $ref: '#/components/schemas/WebSearchStatus' + type: + enum: + - web_search_call type: string required: - - error + - type + - id + - action + - status type: object - RequestTimeoutResponseErrorData: - description: Error data for RequestTimeoutResponse + OutputMcpServerToolItem: + description: An openrouter:mcp server tool output item example: - code: 408 - message: Operation timed out. Please try again later. + id: mcp_tmp_abc123 + serverLabel: my-server + status: completed + toolName: get_data + type: openrouter:mcp properties: - code: - type: integer - message: + id: + type: string + serverLabel: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + toolName: + type: string + type: + enum: + - openrouter:mcp type: string - metadata: - additionalProperties: - nullable: true - nullable: true - type: object required: - - code - - message + - status + - type type: object - ResponseHealingPlugin: + OutputMemoryServerToolItem: + description: An openrouter:memory server tool output item example: - enabled: true - id: response-healing + action: read + id: mem_tmp_abc123 + key: user_preference + status: completed + type: openrouter:memory properties: - enabled: - description: Set to false to disable the response-healing plugin for this request. Defaults to true. - type: boolean + action: + enum: + - read + - write + - delete + type: string + x-speakeasy-unknown-values: allow id: + type: string + key: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + type: enum: - - response-healing + - openrouter:memory type: string + value: + nullable: true required: - - id + - status + - type type: object - ResponseIncludesEnum: - enum: - - file_search_call.results - - message.input_image.image_url - - computer_call_output.output.image_url - - reasoning.encrypted_content - - code_interpreter_call.outputs - example: file_search_call.results - type: string - x-speakeasy-unknown-values: allow - ResponseOutputText: + OutputMessage: example: - annotations: - - end_index: 42 - start_index: 0 - title: Paris - Wikipedia - type: url_citation - url: https://en.wikipedia.org/wiki/Paris - text: The capital of France is Paris. - type: output_text + content: + - text: Hello! How can I help you today? + type: output_text + id: msg-abc123 + role: assistant + status: completed + type: message properties: - annotations: - items: - $ref: '#/components/schemas/OpenAIResponsesAnnotation' - type: array - logprobs: + content: items: - properties: - bytes: - items: - type: integer - type: array - logprob: - format: double - type: number - token: - type: string - top_logprobs: - items: - properties: - bytes: - items: - type: integer - type: array - logprob: - format: double - type: number - token: - type: string - required: - - token - - bytes - - logprob - type: object - type: array - required: - - token - - bytes - - logprob - - top_logprobs - type: object + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' type: array - text: + id: + type: string + phase: + anyOf: + - enum: + - commentary + type: string + - enum: + - final_answer + type: string + - nullable: true + description: >- + 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. + role: + enum: + - assistant type: string + status: + anyOf: + - enum: + - completed + type: string + - enum: + - incomplete + type: string + - enum: + - in_progress + type: string type: enum: - - output_text + - message type: string required: + - id + - role - type - - text + - content type: object - ResponsesErrorField: - description: Error information returned from the API + OutputMessageItem: + allOf: + - $ref: '#/components/schemas/OutputMessage' + - properties: {} + type: object + description: An output message item example: - code: rate_limit_exceeded - message: Rate limit exceeded. Please try again later. - nullable: true + content: + - annotations: [] + text: Hello! How can I help you? + type: output_text + id: msg-123 + role: assistant + status: completed + type: message + OutputModality: + enum: + - text + - image + - embeddings + - audio + - video + - rerank + - speech + - transcription + example: text + type: string + x-speakeasy-unknown-values: allow + OutputModalityEnum: + enum: + - text + - image + example: text + type: string + x-speakeasy-unknown-values: allow + OutputReasoningItem: + allOf: + - $ref: '#/components/schemas/OutputItemReasoning' + - properties: + content: + items: + $ref: '#/components/schemas/ReasoningTextContent' + nullable: true + type: array + format: + $ref: '#/components/schemas/ReasoningFormat' + signature: + description: A signature for the reasoning content, used for verification + example: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + nullable: true + type: string + type: object + description: An output item containing reasoning + example: + content: + - text: First, we analyze the problem... + type: reasoning_text + format: anthropic-claude-v1 + id: reasoning-123 + signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + status: completed + summary: + - text: Analyzed the problem and found the optimal solution. + type: summary_text + type: reasoning + OutputSearchModelsServerToolItem: + description: An openrouter:experimental__search_models server tool output item + example: + arguments: '{"query":"Claude Opus"}' + id: sm_tmp_abc123 + query: Claude Opus + status: completed + type: openrouter:experimental__search_models properties: - code: - enum: - - server_error - - rate_limit_exceeded - - invalid_prompt - - vector_store_timeout - - invalid_image - - invalid_image_format - - invalid_base64_image - - invalid_image_url - - image_too_large - - image_too_small - - image_parse_error - - image_content_policy_violation - - invalid_image_mode - - image_file_too_large - - unsupported_image_media_type - - empty_image_file - - failed_to_download_image - - image_file_not_found + arguments: + description: The JSON arguments submitted to the search tool (e.g. {"query":"Claude"}) type: string - x-speakeasy-unknown-values: allow - message: + id: + type: string + query: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + type: + enum: + - openrouter:experimental__search_models type: string required: - - code - - message + - status + - type type: object - ResponsesRequest: - description: Request schema for Responses endpoint + OutputTextEditorServerToolItem: + description: An openrouter:text_editor server tool output item example: - input: - - content: Hello, how are you? - role: user - type: message - model: anthropic/claude-4.5-sonnet-20250929 - temperature: 0.7 - tools: - - description: Get the current weather in a given location - name: get_current_weather - parameters: - properties: - location: - type: string - type: object - type: function - top_p: 0.9 + command: view + filePath: /src/main.ts + id: te_tmp_abc123 + status: completed + type: openrouter:text_editor properties: - background: - nullable: true - type: boolean - frequency_penalty: - format: double - nullable: true - type: number - image_config: - $ref: '#/components/schemas/ImageConfig' - include: - items: - $ref: '#/components/schemas/ResponseIncludesEnum' - nullable: true - type: array - input: - $ref: '#/components/schemas/Inputs' - instructions: - nullable: true + command: + enum: + - view + - create + - str_replace + - insert type: string - max_output_tokens: - nullable: true - type: integer - max_tool_calls: - nullable: true - type: integer - metadata: - $ref: '#/components/schemas/RequestMetadata' - modalities: - description: Output modalities for the response. Supported values are "text" and "image". - example: - - text - - image - items: - $ref: '#/components/schemas/OutputModalityEnum' - type: array - model: + x-speakeasy-unknown-values: allow + filePath: type: string - models: - items: - type: string - type: array - parallel_tool_calls: - nullable: true - type: boolean - plugins: - description: Plugins you want to enable for this request, including their settings. - items: - discriminator: - mapping: - auto-router: '#/components/schemas/AutoRouterPlugin' - context-compression: '#/components/schemas/ContextCompressionPlugin' - file-parser: '#/components/schemas/FileParserPlugin' - moderation: '#/components/schemas/ModerationPlugin' - response-healing: '#/components/schemas/ResponseHealingPlugin' - web: '#/components/schemas/WebSearchPlugin' - propertyName: id - oneOf: - - $ref: '#/components/schemas/AutoRouterPlugin' - - $ref: '#/components/schemas/ModerationPlugin' - - $ref: '#/components/schemas/WebSearchPlugin' - - $ref: '#/components/schemas/FileParserPlugin' - - $ref: '#/components/schemas/ResponseHealingPlugin' - - $ref: '#/components/schemas/ContextCompressionPlugin' - type: array - presence_penalty: - format: double - nullable: true - type: number - previous_response_id: - nullable: true + id: type: string - prompt: - $ref: '#/components/schemas/StoredPromptTemplate' - prompt_cache_key: - nullable: true + status: + $ref: '#/components/schemas/ToolCallStatus' + type: + enum: + - openrouter:text_editor type: string - provider: - $ref: '#/components/schemas/ProviderPreferences' - reasoning: - $ref: '#/components/schemas/ReasoningConfig' - route: - $ref: '#/components/schemas/DeprecatedRoute' - safety_identifier: - nullable: true + required: + - status + - type + type: object + OutputToolSearchServerToolItem: + description: An openrouter:tool_search server tool output item + example: + id: ts_tmp_abc123 + query: weather tools + status: completed + type: openrouter:tool_search + properties: + id: type: string - service_tier: - default: auto - enum: - - auto - - default - - flex - - priority - - scale - - null - nullable: true + query: type: string - x-speakeasy-unknown-values: allow - session_id: - description: >- - 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 256 characters. - maxLength: 256 + status: + $ref: '#/components/schemas/ToolCallStatus' + type: + enum: + - openrouter:tool_search type: string - store: - const: false - default: false - type: boolean - stream: - default: false - type: boolean - temperature: - format: double - nullable: true - type: number - text: - $ref: '#/components/schemas/TextExtendedConfig' - tool_choice: - $ref: '#/components/schemas/OpenAIResponsesToolChoice' - tools: - items: - anyOf: - - allOf: - - $ref: '#/components/schemas/FunctionTool' - - properties: {} - type: object - description: Function tool definition - example: - description: Get the current weather in a location - name: get_weather - parameters: - properties: - location: - description: The city and state - type: string - unit: - enum: - - celsius - - fahrenheit - type: string - x-speakeasy-unknown-values: allow - required: - - location - type: object - type: function - - $ref: '#/components/schemas/Preview_WebSearchServerTool' - - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool' - - $ref: '#/components/schemas/Legacy_WebSearchServerTool' - - $ref: '#/components/schemas/WebSearchServerTool' - - $ref: '#/components/schemas/FileSearchServerTool' - - $ref: '#/components/schemas/ComputerUseServerTool' - - $ref: '#/components/schemas/CodeInterpreterServerTool' - - $ref: '#/components/schemas/McpServerTool' - - $ref: '#/components/schemas/ImageGenerationServerTool' - - $ref: '#/components/schemas/CodexLocalShellTool' - - $ref: '#/components/schemas/ShellServerTool' - - $ref: '#/components/schemas/ApplyPatchServerTool' - - $ref: '#/components/schemas/CustomTool' - - $ref: '#/components/schemas/DatetimeServerTool' - - $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter' - - $ref: '#/components/schemas/ChatSearchModelsServerTool' - - $ref: '#/components/schemas/WebSearchServerTool_OpenRouter' - type: array - top_k: - type: integer - top_logprobs: - nullable: true + required: + - status + - type + type: object + OutputWebFetchServerToolItem: + description: An openrouter:web_fetch server tool output item + example: + httpStatus: 200 + id: wf_tmp_abc123 + status: completed + title: Example Domain + type: openrouter:web_fetch + url: https://example.com + properties: + content: + type: string + error: + description: The error message if the fetch failed. + type: string + httpStatus: + description: The HTTP status code returned by the upstream URL fetch. type: integer - top_p: - format: double - nullable: true - type: number - trace: - $ref: '#/components/schemas/TraceConfig' - truncation: - $ref: '#/components/schemas/OpenAIResponsesTruncation' - user: + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + title: + type: string + type: + enum: + - openrouter:web_fetch + type: string + url: + type: string + required: + - status + - type + type: object + OutputWebSearchCallItem: + allOf: + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - properties: {} + type: object + example: + id: ws-abc123 + status: completed + type: web_search_call + OutputWebSearchServerToolItem: + description: An openrouter:web_search server tool output item + example: + action: + query: latest AI news + type: search + id: ws_tmp_abc123 + status: completed + type: openrouter:web_search + properties: + action: description: >- - 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 256 characters. - maxLength: 256 + The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider. + properties: + query: + type: string + sources: + items: + properties: + type: + enum: + - url + type: string + url: + type: string + required: + - type + - url + type: object + type: array + type: + enum: + - search + type: string + required: + - type + - query + type: object + id: + type: string + status: + $ref: '#/components/schemas/ToolCallStatus' + type: + enum: + - openrouter:web_search type: string + required: + - status + - type type: object - SearchContextSizeEnum: - description: Size of the search context for web search tools + Parameter: enum: - - low - - medium - - high - example: medium + - temperature + - top_p + - top_k + - min_p + - top_a + - frequency_penalty + - presence_penalty + - repetition_penalty + - max_tokens + - max_completion_tokens + - logit_bias + - logprobs + - top_logprobs + - seed + - response_format + - structured_outputs + - stop + - tools + - tool_choice + - parallel_tool_calls + - include_reasoning + - reasoning + - reasoning_effort + - web_search_options + - verbosity + example: temperature type: string x-speakeasy-unknown-values: allow - SearchModelsServerToolConfig: - description: Configuration for the openrouter:experimental__search_models server tool + ParetoRouterPlugin: example: - max_results: 5 + enabled: true + id: pareto-router + min_coding_score: 0.8 properties: - max_results: - description: Maximum number of models to return. Defaults to 5, max 20. - example: 5 - type: integer + enabled: + description: Set to false to disable the pareto-router plugin for this request. Defaults to true. + type: boolean + id: + enum: + - pareto-router + type: string + min_coding_score: + description: >- + Minimum desired coding score between 0 and 1, where 1 is best. Higher values select from stronger coding models (sourced from Artificial Analysis coding percentiles). Maps internally to one of three tiers (low, medium, high). Omit to use the router default tier. + example: 0.8 + format: double + maximum: 1 + minimum: 0 + type: number + required: + - id type: object - SearchQualityLevel: - description: >- - How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - enum: - - low - - medium - - high - example: medium - type: string - x-speakeasy-unknown-values: allow - ServiceTier: - enum: - - auto - - default - - flex - - priority - - scale - - null - example: default - nullable: true - type: string - x-speakeasy-unknown-values: allow - ServiceUnavailableResponse: - description: Service Unavailable - Service temporarily unavailable + PayloadTooLargeResponse: + description: Payload Too Large - Request payload exceeds size limits example: error: - code: 503 - message: Service temporarily unavailable + code: 413 + message: Request payload too large properties: error: - $ref: '#/components/schemas/ServiceUnavailableResponseErrorData' + $ref: '#/components/schemas/PayloadTooLargeResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object user_id: nullable: true type: string required: - error type: object - ServiceUnavailableResponseErrorData: - description: Error data for ServiceUnavailableResponse + PayloadTooLargeResponseErrorData: + description: Error data for PayloadTooLargeResponse example: - code: 503 - message: Service temporarily unavailable + code: 413 + message: Request payload too large properties: code: type: integer @@ -11650,1190 +14599,3479 @@ components: - code - message type: object - ShellServerTool: - description: Shell tool configuration + PaymentRequiredResponse: + description: Payment Required - Insufficient credits or quota to complete request example: - type: shell + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits properties: - type: - enum: - - shell - type: string - required: - - type + error: + $ref: '#/components/schemas/PaymentRequiredResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object + user_id: + nullable: true + type: string + required: + - error type: object - StoredPromptTemplate: + PaymentRequiredResponseErrorData: + description: Error data for PaymentRequiredResponse example: - id: prompt-abc123 - variables: - name: John - nullable: true + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits properties: - id: + code: + type: integer + message: type: string - variables: + metadata: additionalProperties: - anyOf: - - type: string - - $ref: '#/components/schemas/InputText' - - $ref: '#/components/schemas/InputImage' - - $ref: '#/components/schemas/InputFile' + nullable: true nullable: true type: object required: - - id + - code + - message type: object - StreamEvents: - description: Union of all possible event types emitted during response streaming - discriminator: - mapping: - error: '#/components/schemas/ErrorEvent' - response.completed: '#/components/schemas/StreamEventsResponseCompleted' - response.content_part.added: '#/components/schemas/ContentPartAddedEvent' - response.content_part.done: '#/components/schemas/ContentPartDoneEvent' - response.created: '#/components/schemas/OpenResponsesCreatedEvent' - response.failed: '#/components/schemas/StreamEventsResponseFailed' - response.function_call_arguments.delta: '#/components/schemas/FunctionCallArgsDeltaEvent' - response.function_call_arguments.done: '#/components/schemas/FunctionCallArgsDoneEvent' - response.image_generation_call.completed: '#/components/schemas/ImageGenCallCompletedEvent' - response.image_generation_call.generating: '#/components/schemas/ImageGenCallGeneratingEvent' - response.image_generation_call.in_progress: '#/components/schemas/ImageGenCallInProgressEvent' - response.image_generation_call.partial_image: '#/components/schemas/ImageGenCallPartialImageEvent' - response.in_progress: '#/components/schemas/OpenResponsesInProgressEvent' - response.incomplete: '#/components/schemas/StreamEventsResponseIncomplete' - response.output_item.added: '#/components/schemas/StreamEventsResponseOutputItemAdded' - response.output_item.done: '#/components/schemas/StreamEventsResponseOutputItemDone' - response.output_text.annotation.added: '#/components/schemas/AnnotationAddedEvent' - response.output_text.delta: '#/components/schemas/TextDeltaEvent' - response.output_text.done: '#/components/schemas/TextDoneEvent' - response.reasoning_summary_part.added: '#/components/schemas/ReasoningSummaryPartAddedEvent' - response.reasoning_summary_part.done: '#/components/schemas/ReasoningSummaryPartDoneEvent' - response.reasoning_summary_text.delta: '#/components/schemas/ReasoningSummaryTextDeltaEvent' - response.reasoning_summary_text.done: '#/components/schemas/ReasoningSummaryTextDoneEvent' - response.reasoning_text.delta: '#/components/schemas/ReasoningDeltaEvent' - response.reasoning_text.done: '#/components/schemas/ReasoningDoneEvent' - response.refusal.delta: '#/components/schemas/RefusalDeltaEvent' - response.refusal.done: '#/components/schemas/RefusalDoneEvent' - response.web_search_call.completed: '#/components/schemas/WebSearchCallCompletedEvent' - response.web_search_call.in_progress: '#/components/schemas/WebSearchCallInProgressEvent' - response.web_search_call.searching: '#/components/schemas/WebSearchCallSearchingEvent' - propertyName: type - example: - response: - created_at: 1704067200 - error: null - id: resp-abc123 - incomplete_details: null - instructions: null - max_output_tokens: null - metadata: null - model: gpt-4 - object: response - output: [] - parallel_tool_calls: true - status: in_progress - temperature: null - tool_choice: auto - tools: [] - top_p: null - sequence_number: 0 - type: response.created - oneOf: - - $ref: '#/components/schemas/OpenResponsesCreatedEvent' - - $ref: '#/components/schemas/OpenResponsesInProgressEvent' - - $ref: '#/components/schemas/StreamEventsResponseCompleted' - - $ref: '#/components/schemas/StreamEventsResponseIncomplete' - - $ref: '#/components/schemas/StreamEventsResponseFailed' - - $ref: '#/components/schemas/ErrorEvent' - - $ref: '#/components/schemas/StreamEventsResponseOutputItemAdded' - - $ref: '#/components/schemas/StreamEventsResponseOutputItemDone' - - $ref: '#/components/schemas/ContentPartAddedEvent' - - $ref: '#/components/schemas/ContentPartDoneEvent' - - $ref: '#/components/schemas/TextDeltaEvent' - - $ref: '#/components/schemas/TextDoneEvent' - - $ref: '#/components/schemas/RefusalDeltaEvent' - - $ref: '#/components/schemas/RefusalDoneEvent' - - $ref: '#/components/schemas/AnnotationAddedEvent' - - $ref: '#/components/schemas/FunctionCallArgsDeltaEvent' - - $ref: '#/components/schemas/FunctionCallArgsDoneEvent' - - $ref: '#/components/schemas/ReasoningDeltaEvent' - - $ref: '#/components/schemas/ReasoningDoneEvent' - - $ref: '#/components/schemas/ReasoningSummaryPartAddedEvent' - - $ref: '#/components/schemas/ReasoningSummaryPartDoneEvent' - - $ref: '#/components/schemas/ReasoningSummaryTextDeltaEvent' - - $ref: '#/components/schemas/ReasoningSummaryTextDoneEvent' - - $ref: '#/components/schemas/ImageGenCallInProgressEvent' - - $ref: '#/components/schemas/ImageGenCallGeneratingEvent' - - $ref: '#/components/schemas/ImageGenCallPartialImageEvent' - - $ref: '#/components/schemas/ImageGenCallCompletedEvent' - - $ref: '#/components/schemas/WebSearchCallInProgressEvent' - - $ref: '#/components/schemas/WebSearchCallSearchingEvent' - - $ref: '#/components/schemas/WebSearchCallCompletedEvent' - StreamEventsResponseCompleted: - allOf: - - $ref: '#/components/schemas/CompletedEvent' - - properties: - response: - $ref: '#/components/schemas/OpenResponsesResult' - type: object - description: Event emitted when a response has completed successfully + PDFParserEngine: + anyOf: + - enum: + - mistral-ocr + - native + - cloudflare-ai + type: string + x-speakeasy-unknown-values: allow + - enum: + - pdf-text + type: string + description: >- + The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". + example: cloudflare-ai + PDFParserOptions: + description: Options for PDF parsing. example: - response: - created_at: 1704067200 - error: null - id: resp-abc123 - incomplete_details: null - instructions: null - max_output_tokens: null - metadata: null - model: gpt-4 - object: response - output: [] - parallel_tool_calls: true - status: completed - temperature: null - tool_choice: auto - tools: [] - top_p: null - sequence_number: 10 - type: response.completed - StreamEventsResponseFailed: - allOf: - - $ref: '#/components/schemas/FailedEvent' - - properties: - response: - $ref: '#/components/schemas/OpenResponsesResult' - type: object - description: Event emitted when a response has failed + engine: cloudflare-ai + properties: + engine: + $ref: '#/components/schemas/PDFParserEngine' + type: object + PercentileLatencyCutoffs: + description: Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred. example: - response: - created_at: 1704067200 - error: null - id: resp-abc123 - incomplete_details: null - instructions: null - max_output_tokens: null - metadata: null - model: gpt-4 - object: response - output: [] - parallel_tool_calls: true - status: failed - temperature: null - tool_choice: auto - tools: [] - top_p: null - sequence_number: 3 - type: response.failed - StreamEventsResponseIncomplete: - allOf: - - $ref: '#/components/schemas/IncompleteEvent' - - properties: - response: - $ref: '#/components/schemas/OpenResponsesResult' - type: object - description: Event emitted when a response is incomplete + p50: 5 + p90: 10 + properties: + p50: + description: Maximum p50 latency (seconds) + format: double + nullable: true + type: number + p75: + description: Maximum p75 latency (seconds) + format: double + nullable: true + type: number + p90: + description: Maximum p90 latency (seconds) + format: double + nullable: true + type: number + p99: + description: Maximum p99 latency (seconds) + format: double + nullable: true + type: number + type: object + PercentileStats: + description: >- + Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. example: - response: - created_at: 1704067200 - error: null - id: resp-abc123 - incomplete_details: null - instructions: null - max_output_tokens: null - metadata: null - model: gpt-4 - object: response - output: [] - parallel_tool_calls: true - status: incomplete - temperature: null - tool_choice: auto - tools: [] - top_p: null - sequence_number: 5 - type: response.incomplete - StreamEventsResponseOutputItemAdded: - allOf: - - $ref: '#/components/schemas/OutputItemAddedEvent' - - properties: - item: - $ref: '#/components/schemas/OutputItems' - type: object - description: Event emitted when a new output item is added to the response - example: - item: - content: [] - id: item-1 - role: assistant - status: in_progress - type: message - output_index: 0 - sequence_number: 2 - type: response.output_item.added - StreamEventsResponseOutputItemDone: - allOf: - - $ref: '#/components/schemas/OutputItemDoneEvent' - - properties: - item: - $ref: '#/components/schemas/OutputItems' - type: object - description: Event emitted when an output item is complete - example: - item: - content: - - annotations: [] - text: Hello! How can I help you? - type: output_text - id: item-1 - role: assistant - status: completed - type: message - output_index: 0 - sequence_number: 8 - type: response.output_item.done - StreamLogprob: - allOf: - - $ref: '#/components/schemas/OpenResponsesLogProbs' - - properties: - top_logprobs: - items: - $ref: '#/components/schemas/StreamLogprobTopLogprob' - type: array - type: object - description: Log probability information for a token - example: - bytes: - - 72 - - 101 - - 108 - - 108 - - 111 - logprob: -0.5 - token: Hello - top_logprobs: [] - StreamLogprobTopLogprob: - allOf: - - $ref: '#/components/schemas/OpenResponsesTopLogprobs' - - properties: {} - type: object - description: Alternative token with its log probability - example: - bytes: - - 72 - - 101 - - 108 - - 108 - - 111 - logprob: -0.5 - token: Hello - TextConfig: - description: Text output configuration including format and verbosity + p50: 25.5 + p75: 35.2 + p90: 48.7 + p99: 85.3 + nullable: true + properties: + p50: + description: Median (50th percentile) + example: 25.5 + format: double + type: number + p75: + description: 75th percentile + example: 35.2 + format: double + type: number + p90: + description: 90th percentile + example: 48.7 + format: double + type: number + p99: + description: 99th percentile + example: 85.3 + format: double + type: number + required: + - p50 + - p75 + - p90 + - p99 + type: object + PercentileThroughputCutoffs: + description: Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred. example: - format: - type: text - verbosity: medium + p50: 100 + p90: 50 properties: - format: - $ref: '#/components/schemas/Formats' - verbosity: - enum: - - high - - low - - medium - - null + p50: + description: Minimum p50 throughput (tokens/sec) + format: double nullable: true - type: string - x-speakeasy-unknown-values: allow + type: number + p75: + description: Minimum p75 throughput (tokens/sec) + format: double + nullable: true + type: number + p90: + description: Minimum p90 throughput (tokens/sec) + format: double + nullable: true + type: number + p99: + description: Minimum p99 throughput (tokens/sec) + format: double + nullable: true + type: number type: object - TextDeltaEvent: - allOf: - - $ref: '#/components/schemas/BaseTextDeltaEvent' - - properties: - logprobs: - items: - $ref: '#/components/schemas/StreamLogprob' - type: array - type: object - description: Event emitted when a text delta is streamed + PerRequestLimits: + description: Per-request token limits example: - content_index: 0 - delta: Hello - item_id: item-1 - logprobs: [] - output_index: 0 - sequence_number: 4 - type: response.output_text.delta - TextDoneEvent: - allOf: - - $ref: '#/components/schemas/BaseTextDoneEvent' - - properties: - logprobs: - items: - $ref: '#/components/schemas/StreamLogprob' - type: array - type: object - description: Event emitted when text streaming is complete + completion_tokens: 1000 + prompt_tokens: 1000 + nullable: true + properties: + completion_tokens: + description: Maximum completion tokens per request + example: 1000 + type: number + prompt_tokens: + description: Maximum prompt tokens per request + example: 1000 + type: number + required: + - prompt_tokens + - completion_tokens + type: object + PipelineStage: example: - content_index: 0 - item_id: item-1 - logprobs: [] - output_index: 0 - sequence_number: 6 - text: Hello! How can I help you? - type: response.output_text.done - TextExtendedConfig: - allOf: - - $ref: '#/components/schemas/TextConfig' - - properties: {} + data: + action: redacted + engines: + - presidio + flagged: true + matched_entity_types: + - EMAIL + - PHONE + name: content-filter + summary: PII redacted via Presidio (EMAIL, PHONE) + type: guardrail + properties: + cost_usd: + format: double + nullable: true + type: number + data: + additionalProperties: + nullable: true type: object - description: Text output configuration including format and verbosity - example: - format: - type: text - ToolCallStatus: + guardrail_id: + type: string + guardrail_scope: + type: string + name: + type: string + summary: + type: string + type: + $ref: '#/components/schemas/PipelineStageType' + required: + - type + - name + type: object + PipelineStageType: + description: >- + Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it. enum: - - in_progress - - completed - - incomplete - example: completed + - guardrail + - plugin + - server_tools + - response_healing + - context_compression + example: guardrail type: string x-speakeasy-unknown-values: allow - ToolChoiceAllowed: - description: Constrains the model to a pre-defined set of allowed tools + PreferredMaxLatency: + anyOf: + - format: double + type: number + - $ref: '#/components/schemas/PercentileLatencyCutoffs' + - nullable: true + description: >- + 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. + example: 5 + PreferredMinThroughput: + anyOf: + - format: double + type: number + - $ref: '#/components/schemas/PercentileThroughputCutoffs' + - nullable: true + description: >- + 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. + example: 100 + Preview_20250311_WebSearchServerTool: + description: Web search preview tool configuration (2025-03-11 version) example: - mode: auto - tools: - - name: get_weather - type: function - type: allowed_tools + type: web_search_preview_2025_03_11 properties: - mode: - anyOf: - - enum: - - auto - type: string - - enum: - - required - type: string - tools: - items: - additionalProperties: - nullable: true - type: object - type: array + engine: + $ref: '#/components/schemas/WebSearchEngineEnum' + filters: + $ref: '#/components/schemas/WebSearchDomainFilter' + max_results: + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 + type: integer + search_context_size: + $ref: '#/components/schemas/SearchContextSizeEnum' type: enum: - - allowed_tools + - web_search_preview_2025_03_11 type: string + user_location: + $ref: '#/components/schemas/Preview_WebSearchUserLocation' required: - type - - mode - - tools - type: object - TooManyRequestsResponse: - description: Too Many Requests - Rate limit exceeded - example: - error: - code: 429 - message: Rate limit exceeded - properties: - error: - $ref: '#/components/schemas/TooManyRequestsResponseErrorData' - user_id: - nullable: true - type: string - required: - - error type: object - TooManyRequestsResponseErrorData: - description: Error data for TooManyRequestsResponse + Preview_WebSearchServerTool: + description: Web search preview tool configuration example: - code: 429 - message: Rate limit exceeded + type: web_search_preview properties: - code: + engine: + $ref: '#/components/schemas/WebSearchEngineEnum' + filters: + $ref: '#/components/schemas/WebSearchDomainFilter' + max_results: + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 type: integer - message: + search_context_size: + $ref: '#/components/schemas/SearchContextSizeEnum' + type: + enum: + - web_search_preview type: string - metadata: - additionalProperties: - nullable: true - nullable: true - type: object + user_location: + $ref: '#/components/schemas/Preview_WebSearchUserLocation' required: - - code - - message + - type type: object - TopProviderInfo: - description: Information about the top provider for this model + Preview_WebSearchUserLocation: example: - context_length: 8192 - is_moderated: true - max_completion_tokens: 4096 + city: San Francisco + country: USA + region: California + timezone: America/Los_Angeles + type: approximate + nullable: true properties: - context_length: - description: Context length from the top provider - example: 8192 - nullable: true - type: integer - is_moderated: - description: Whether the top provider moderates content - example: true - type: boolean - max_completion_tokens: - description: Maximum completion tokens from the top provider - example: 4096 + city: nullable: true - type: integer - required: - - is_moderated - type: object - TraceConfig: - additionalProperties: - nullable: true - description: >- - 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. - example: - trace_id: trace-abc123 - trace_name: my-app-trace - properties: - generation_name: type: string - parent_span_id: + country: + nullable: true type: string - span_name: + region: + nullable: true type: string - trace_id: + timezone: + nullable: true type: string - trace_name: + type: + enum: + - approximate type: string + required: + - type type: object - Truncation: + ProviderName: enum: - - auto - - disabled - - null - example: auto - nullable: true + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - Baidu + - Amazon Bedrock + - Amazon Nova + - Anthropic + - Arcee AI + - AtlasCloud + - Avian + - Azure + - BaseTen + - BytePlus + - Black Forest Labs + - Cerebras + - Chutes + - Cirrascale + - Clarifai + - Cloudflare + - Cohere + - Crucible + - Crusoe + - DeepInfra + - DeepSeek + - DekaLLM + - Featherless + - Fireworks + - Friendli + - GMICloud + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - Nex AGI + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Poolside + - Perceptron + - Perplexity + - Phala + - Recraft + - Reka + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider + example: OpenAI type: string x-speakeasy-unknown-values: allow - UnauthorizedResponse: - description: Unauthorized - Authentication required or invalid credentials - example: - error: - code: 401 - message: Missing Authentication header - properties: - error: - $ref: '#/components/schemas/UnauthorizedResponseErrorData' - user_id: - nullable: true - type: string - required: - - error - type: object - UnauthorizedResponseErrorData: - description: Error data for UnauthorizedResponse + ProviderOptions: + description: >- + Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body. example: - code: 401 - message: Missing Authentication header + openai: + max_tokens: 1000 properties: - code: - type: integer - message: - type: string - metadata: + 01ai: additionalProperties: nullable: true - nullable: true type: object - required: - - code - - message - type: object - UnprocessableEntityResponse: - description: Unprocessable Entity - Semantic validation failure - example: - error: - code: 422 - message: Invalid argument - properties: - error: - $ref: '#/components/schemas/UnprocessableEntityResponseErrorData' - user_id: - nullable: true - type: string - required: - - error - type: object - UnprocessableEntityResponseErrorData: - description: Error data for UnprocessableEntityResponse - example: - code: 422 - message: Invalid argument - properties: - code: - type: integer - message: - type: string - metadata: + ai21: additionalProperties: nullable: true - nullable: true type: object - required: - - code - - message - type: object - UpdateGuardrailRequest: - example: - description: Updated description - limit_usd: 75 - name: Updated Guardrail Name - reset_interval: weekly - properties: - allowed_models: - description: Array of model identifiers (slug or canonical_slug accepted) - example: - - openai/gpt-5.2 - items: - type: string - minItems: 1 - nullable: true - type: array - allowed_providers: - description: New list of allowed provider IDs - example: - - openai - - anthropic - - deepseek - items: - type: string - minItems: 1 - nullable: true - type: array - description: - description: New description for the guardrail - example: Updated description - maxLength: 1000 - nullable: true - type: string - enforce_zdr: - description: Whether to enforce zero data retention - example: true - nullable: true - type: boolean - ignored_models: - description: Array of model identifiers to exclude from routing (slug or canonical_slug accepted) - example: - - openai/gpt-4o-mini - items: - type: string - minItems: 1 - nullable: true - type: array - ignored_providers: - description: List of provider IDs to exclude from routing - example: - - azure - items: - type: string - minItems: 1 - nullable: true - type: array - limit_usd: - description: New spending limit in USD - example: 75 - format: double - nullable: true - type: number - name: - description: New name for the guardrail - example: Updated Guardrail Name - maxLength: 200 - minLength: 1 - type: string - reset_interval: - $ref: '#/components/schemas/GuardrailInterval' - type: object - UpdateGuardrailResponse: - example: - data: - allowed_models: null - allowed_providers: - - openai - created_at: '2025-08-24T10:30:00Z' - description: Updated description - enforce_zdr: true - id: 550e8400-e29b-41d4-a716-446655440000 - ignored_models: null - ignored_providers: null - limit_usd: 75 - name: Updated Guardrail Name - reset_interval: weekly - updated_at: '2025-08-24T16:00:00Z' - properties: - data: - allOf: - - $ref: '#/components/schemas/Guardrail' - - description: The updated guardrail - required: - - data - type: object - URLCitation: - example: - end_index: 42 - start_index: 0 - title: OpenRouter Documentation - type: url_citation - url: https://openrouter.ai/docs - properties: - end_index: - type: integer - start_index: - type: integer - title: - type: string - type: - enum: - - url_citation - type: string - url: - type: string - required: - - type - - url - - title - - start_index - - end_index - type: object - Usage: - allOf: - - $ref: '#/components/schemas/OpenAIResponsesUsage' - - nullable: true - properties: - cost: - description: Cost of the completion - format: double - nullable: true - type: number - cost_details: - properties: - upstream_inference_cost: - format: double - nullable: true - type: number - upstream_inference_input_cost: - format: double - type: number - upstream_inference_output_cost: - format: double - type: number - required: - - upstream_inference_input_cost - - upstream_inference_output_cost - type: object - is_byok: - description: Whether a request was made using a Bring Your Own Key configuration - type: boolean + aion-labs: + additionalProperties: + nullable: true type: object - description: Token usage information for the response - example: - cost: 0.0012 - cost_details: - upstream_inference_cost: null - upstream_inference_input_cost: 0.0008 - upstream_inference_output_cost: 0.0004 - input_tokens: 10 - input_tokens_details: - cached_tokens: 0 - output_tokens: 25 - output_tokens_details: - reasoning_tokens: 0 - total_tokens: 35 - VideoGenerationRequest: - example: - aspect_ratio: '16:9' - duration: 8 - model: google/veo-3.1 - prompt: A serene mountain landscape at sunset - resolution: 720p - properties: - aspect_ratio: - description: Aspect ratio of the generated video - enum: - - '16:9' - - '9:16' - - '1:1' - - '4:3' - - '3:4' - - '21:9' - - '9:21' - example: '16:9' - type: string - x-speakeasy-unknown-values: allow - duration: - description: Duration of the generated video in seconds - example: 8 - minimum: 1 - type: integer - frame_images: - description: >- - Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. - items: - $ref: '#/components/schemas/FrameImage' - type: array - generate_audio: - description: >- - Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. - example: true - type: boolean - input_references: - description: Reference images to guide video generation - items: - $ref: '#/components/schemas/ContentPartImage' - type: array - model: - type: string - prompt: - type: string - provider: - description: Provider-specific passthrough configuration - properties: - options: - description: >- - Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body. - example: - google-vertex: - output_config: - effort: low - properties: - 01ai: - additionalProperties: - nullable: true - type: object - ai21: - additionalProperties: - nullable: true - type: object - aion-labs: - additionalProperties: - nullable: true - type: object - akashml: - additionalProperties: - nullable: true - type: object - alibaba: - additionalProperties: - nullable: true - type: object - amazon-bedrock: - additionalProperties: - nullable: true - type: object - amazon-nova: - additionalProperties: - nullable: true - type: object - ambient: - additionalProperties: - nullable: true - type: object - anthropic: - additionalProperties: - nullable: true - type: object - anyscale: - additionalProperties: - nullable: true - type: object - arcee-ai: - additionalProperties: - nullable: true - type: object - atlas-cloud: - additionalProperties: - nullable: true - type: object - atoma: - additionalProperties: - nullable: true - type: object - avian: - additionalProperties: - nullable: true - type: object - azure: - additionalProperties: - nullable: true - type: object - baseten: - additionalProperties: - nullable: true - type: object - black-forest-labs: - additionalProperties: - nullable: true - type: object - byteplus: - additionalProperties: - nullable: true - type: object - centml: - additionalProperties: - nullable: true - type: object - cerebras: - additionalProperties: - nullable: true - type: object - chutes: - additionalProperties: - nullable: true - type: object - cirrascale: - additionalProperties: - nullable: true - type: object - clarifai: - additionalProperties: - nullable: true - type: object - cloudflare: - additionalProperties: - nullable: true - type: object - cohere: - additionalProperties: - nullable: true - type: object - crofai: - additionalProperties: - nullable: true - type: object - crusoe: - additionalProperties: - nullable: true - type: object - deepinfra: - additionalProperties: - nullable: true - type: object - deepseek: - additionalProperties: - nullable: true - type: object - dekallm: - additionalProperties: - nullable: true - type: object - enfer: - additionalProperties: - nullable: true - type: object - fake-provider: - additionalProperties: - nullable: true - type: object - featherless: - additionalProperties: - nullable: true - type: object - fireworks: - additionalProperties: - nullable: true - type: object - friendli: - additionalProperties: - nullable: true - type: object - gmicloud: - additionalProperties: - nullable: true - type: object - google-ai-studio: - additionalProperties: - nullable: true - type: object - google-vertex: - additionalProperties: - nullable: true - type: object - gopomelo: - additionalProperties: - nullable: true - type: object - groq: - additionalProperties: - nullable: true - type: object - huggingface: - additionalProperties: - nullable: true - type: object - hyperbolic: - additionalProperties: - nullable: true - type: object - hyperbolic-quantized: - additionalProperties: - nullable: true - type: object - inception: - additionalProperties: - nullable: true - type: object - inceptron: - additionalProperties: - nullable: true - type: object - inference-net: - additionalProperties: - nullable: true - type: object - infermatic: - additionalProperties: - nullable: true - type: object - inflection: - additionalProperties: - nullable: true - type: object - inocloud: - additionalProperties: - nullable: true - type: object - io-net: - additionalProperties: - nullable: true - type: object - ionstream: - additionalProperties: - nullable: true - type: object - klusterai: - additionalProperties: - nullable: true - type: object - lambda: - additionalProperties: - nullable: true - type: object - lepton: - additionalProperties: - nullable: true - type: object - liquid: - additionalProperties: - nullable: true - type: object - lynn: - additionalProperties: - nullable: true - type: object - lynn-private: - additionalProperties: - nullable: true - type: object - mancer: - additionalProperties: - nullable: true - type: object - mancer-old: - additionalProperties: - nullable: true - type: object - mara: - additionalProperties: - nullable: true - type: object - meta: - additionalProperties: - nullable: true - type: object - minimax: - additionalProperties: - nullable: true - type: object - mistral: - additionalProperties: - nullable: true - type: object - modal: - additionalProperties: - nullable: true - type: object - modelrun: - additionalProperties: - nullable: true - type: object - modular: - additionalProperties: - nullable: true - type: object - moonshotai: - additionalProperties: - nullable: true - type: object - morph: - additionalProperties: - nullable: true - type: object - ncompass: - additionalProperties: - nullable: true - type: object - nebius: - additionalProperties: - nullable: true - type: object - nextbit: - additionalProperties: - nullable: true - type: object - nineteen: - additionalProperties: - nullable: true - type: object - novita: - additionalProperties: - nullable: true - type: object - nvidia: - additionalProperties: - nullable: true - type: object - octoai: - additionalProperties: - nullable: true - type: object - open-inference: - additionalProperties: - nullable: true - type: object - openai: - additionalProperties: - nullable: true - type: object - parasail: - additionalProperties: - nullable: true - type: object - perplexity: - additionalProperties: - nullable: true - type: object - phala: - additionalProperties: - nullable: true - type: object - recraft: - additionalProperties: - nullable: true - type: object - recursal: - additionalProperties: - nullable: true - type: object - reflection: - additionalProperties: - nullable: true - type: object - reka: - additionalProperties: - nullable: true - type: object - relace: - additionalProperties: - nullable: true - type: object - replicate: - additionalProperties: - nullable: true - type: object - sambanova: - additionalProperties: - nullable: true - type: object - sambanova-cloaked: - additionalProperties: - nullable: true - type: object - seed: - additionalProperties: - nullable: true - type: object - sf-compute: - additionalProperties: - nullable: true - type: object - siliconflow: - additionalProperties: - nullable: true - type: object - sourceful: - additionalProperties: - nullable: true - type: object - stealth: - additionalProperties: - nullable: true - type: object - stepfun: - additionalProperties: - nullable: true - type: object - streamlake: - additionalProperties: - nullable: true - type: object - switchpoint: - additionalProperties: - nullable: true - type: object - targon: - additionalProperties: - nullable: true - type: object - together: - additionalProperties: - nullable: true - type: object - together-lite: - additionalProperties: - nullable: true - type: object - ubicloud: - additionalProperties: - nullable: true - type: object - upstage: - additionalProperties: - nullable: true - type: object - venice: - additionalProperties: - nullable: true - type: object - wandb: - additionalProperties: - nullable: true - type: object - xai: - additionalProperties: - nullable: true - type: object - xiaomi: - additionalProperties: - nullable: true - type: object - z-ai: - additionalProperties: - nullable: true + akashml: + additionalProperties: + nullable: true + type: object + alibaba: + additionalProperties: + nullable: true + type: object + amazon-bedrock: + additionalProperties: + nullable: true + type: object + amazon-nova: + additionalProperties: + nullable: true + type: object + ambient: + additionalProperties: + nullable: true + type: object + anthropic: + additionalProperties: + nullable: true + type: object + anyscale: + additionalProperties: + nullable: true + type: object + arcee-ai: + additionalProperties: + nullable: true + type: object + atlas-cloud: + additionalProperties: + nullable: true + type: object + atoma: + additionalProperties: + nullable: true + type: object + avian: + additionalProperties: + nullable: true + type: object + azure: + additionalProperties: + nullable: true + type: object + baidu: + additionalProperties: + nullable: true + type: object + baseten: + additionalProperties: + nullable: true + type: object + black-forest-labs: + additionalProperties: + nullable: true + type: object + byteplus: + additionalProperties: + nullable: true + type: object + centml: + additionalProperties: + nullable: true + type: object + cerebras: + additionalProperties: + nullable: true + type: object + chutes: + additionalProperties: + nullable: true + type: object + cirrascale: + additionalProperties: + nullable: true + type: object + clarifai: + additionalProperties: + nullable: true + type: object + cloudflare: + additionalProperties: + nullable: true + type: object + cohere: + additionalProperties: + nullable: true + type: object + crofai: + additionalProperties: + nullable: true + type: object + crucible: + additionalProperties: + nullable: true + type: object + crusoe: + additionalProperties: + nullable: true + type: object + deepinfra: + additionalProperties: + nullable: true + type: object + deepseek: + additionalProperties: + nullable: true + type: object + dekallm: + additionalProperties: + nullable: true + type: object + enfer: + additionalProperties: + nullable: true + type: object + fake-provider: + additionalProperties: + nullable: true + type: object + featherless: + additionalProperties: + nullable: true + type: object + fireworks: + additionalProperties: + nullable: true + type: object + friendli: + additionalProperties: + nullable: true + type: object + gmicloud: + additionalProperties: + nullable: true + type: object + google-ai-studio: + additionalProperties: + nullable: true + type: object + google-vertex: + additionalProperties: + nullable: true + type: object + gopomelo: + additionalProperties: + nullable: true + type: object + groq: + additionalProperties: + nullable: true + type: object + huggingface: + additionalProperties: + nullable: true + type: object + hyperbolic: + additionalProperties: + nullable: true + type: object + hyperbolic-quantized: + additionalProperties: + nullable: true + type: object + inception: + additionalProperties: + nullable: true + type: object + inceptron: + additionalProperties: + nullable: true + type: object + inference-net: + additionalProperties: + nullable: true + type: object + infermatic: + additionalProperties: + nullable: true + type: object + inflection: + additionalProperties: + nullable: true + type: object + inocloud: + additionalProperties: + nullable: true + type: object + io-net: + additionalProperties: + nullable: true + type: object + ionstream: + additionalProperties: + nullable: true + type: object + klusterai: + additionalProperties: + nullable: true + type: object + lambda: + additionalProperties: + nullable: true + type: object + lepton: + additionalProperties: + nullable: true + type: object + liquid: + additionalProperties: + nullable: true + type: object + lynn: + additionalProperties: + nullable: true + type: object + lynn-private: + additionalProperties: + nullable: true + type: object + mancer: + additionalProperties: + nullable: true + type: object + mancer-old: + additionalProperties: + nullable: true + type: object + mara: + additionalProperties: + nullable: true + type: object + meta: + additionalProperties: + nullable: true + type: object + minimax: + additionalProperties: + nullable: true + type: object + mistral: + additionalProperties: + nullable: true + type: object + modal: + additionalProperties: + nullable: true + type: object + modelrun: + additionalProperties: + nullable: true + type: object + modular: + additionalProperties: + nullable: true + type: object + moonshotai: + additionalProperties: + nullable: true + type: object + morph: + additionalProperties: + nullable: true + type: object + ncompass: + additionalProperties: + nullable: true + type: object + nebius: + additionalProperties: + nullable: true + type: object + nex-agi: + additionalProperties: + nullable: true + type: object + nextbit: + additionalProperties: + nullable: true + type: object + nineteen: + additionalProperties: + nullable: true + type: object + novita: + additionalProperties: + nullable: true + type: object + nvidia: + additionalProperties: + nullable: true + type: object + octoai: + additionalProperties: + nullable: true + type: object + open-inference: + additionalProperties: + nullable: true + type: object + openai: + additionalProperties: + nullable: true + type: object + parasail: + additionalProperties: + nullable: true + type: object + perceptron: + additionalProperties: + nullable: true + type: object + perplexity: + additionalProperties: + nullable: true + type: object + phala: + additionalProperties: + nullable: true + type: object + poolside: + additionalProperties: + nullable: true + type: object + recraft: + additionalProperties: + nullable: true + type: object + recursal: + additionalProperties: + nullable: true + type: object + reflection: + additionalProperties: + nullable: true + type: object + reka: + additionalProperties: + nullable: true + type: object + relace: + additionalProperties: + nullable: true + type: object + replicate: + additionalProperties: + nullable: true + type: object + sambanova: + additionalProperties: + nullable: true + type: object + sambanova-cloaked: + additionalProperties: + nullable: true + type: object + seed: + additionalProperties: + nullable: true + type: object + sf-compute: + additionalProperties: + nullable: true + type: object + siliconflow: + additionalProperties: + nullable: true + type: object + sourceful: + additionalProperties: + nullable: true + type: object + stealth: + additionalProperties: + nullable: true + type: object + stepfun: + additionalProperties: + nullable: true + type: object + streamlake: + additionalProperties: + nullable: true + type: object + switchpoint: + additionalProperties: + nullable: true + type: object + targon: + additionalProperties: + nullable: true + type: object + together: + additionalProperties: + nullable: true + type: object + together-lite: + additionalProperties: + nullable: true + type: object + ubicloud: + additionalProperties: + nullable: true + type: object + upstage: + additionalProperties: + nullable: true + type: object + venice: + additionalProperties: + nullable: true + type: object + wandb: + additionalProperties: + nullable: true + type: object + xai: + additionalProperties: + nullable: true + type: object + xiaomi: + additionalProperties: + nullable: true + type: object + z-ai: + additionalProperties: + nullable: true + type: object + type: object + ProviderOverloadedResponse: + description: Provider Overloaded - Provider is temporarily overloaded + example: + error: + code: 529 + message: Provider returned error + properties: + error: + $ref: '#/components/schemas/ProviderOverloadedResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object + user_id: + nullable: true + type: string + required: + - error + type: object + ProviderOverloadedResponseErrorData: + description: Error data for ProviderOverloadedResponse + example: + code: 529 + message: Provider returned error + properties: + code: + type: integer + message: + type: string + metadata: + additionalProperties: + nullable: true + nullable: true + type: object + required: + - code + - message + type: object + ProviderPreferences: + additionalProperties: false + description: When multiple model providers are available, optionally indicate your routing preference. + example: + allow_fallbacks: true + nullable: true + properties: + allow_fallbacks: + description: > + 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. + + nullable: true + type: boolean + data_collection: + description: >- + 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. + enum: + - deny + - allow + - null + example: allow + nullable: true + type: string + x-speakeasy-unknown-values: allow + enforce_distillable_text: + description: >- + Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. + example: true + nullable: true + type: boolean + ignore: + description: >- + List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + example: + - openai + - anthropic + items: + anyOf: + - $ref: '#/components/schemas/ProviderName' + - type: string + nullable: true + type: array + max_price: + description: >- + The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. + properties: + audio: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: Price per audio unit + completion: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: Price per million completion tokens + image: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: Price per image + prompt: + $ref: '#/components/schemas/BigNumberUnion' + request: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: Price per request + type: object + only: + description: >- + List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + example: + - openai + - anthropic + items: + anyOf: + - $ref: '#/components/schemas/ProviderName' + - type: string + nullable: true + type: array + order: + description: >- + 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. + example: + - openai + - anthropic + items: + anyOf: + - $ref: '#/components/schemas/ProviderName' + - type: string + nullable: true + type: array + preferred_max_latency: + $ref: '#/components/schemas/PreferredMaxLatency' + preferred_min_throughput: + $ref: '#/components/schemas/PreferredMinThroughput' + quantizations: + description: A list of quantization levels to filter the provider by. + items: + $ref: '#/components/schemas/Quantization' + nullable: true + type: array + require_parameters: + description: >- + 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. + nullable: true + type: boolean + sort: + anyOf: + - $ref: '#/components/schemas/ProviderSort' + - $ref: '#/components/schemas/ProviderSortConfig' + - nullable: true + description: >- + The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. + example: price + zdr: + description: >- + Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. + example: true + nullable: true + type: boolean + type: object + ProviderResponse: + description: Details of a provider response for a generation attempt + example: + endpoint_id: ep_abc123 + id: chatcmpl-abc123 + is_byok: false + latency: 1200 + model_permaslug: openai/gpt-4 + provider_name: OpenAI + status: 200 + properties: + endpoint_id: + description: Internal endpoint identifier + example: ep_abc123 + type: string + id: + description: Upstream provider response identifier + example: chatcmpl-abc123 + type: string + is_byok: + description: Whether the request used a bring-your-own-key + example: false + type: boolean + latency: + description: Response latency in milliseconds + example: 1200 + type: number + model_permaslug: + description: Canonical model slug + example: openai/gpt-4 + type: string + provider_name: + description: Name of the provider + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - Baidu + - Amazon Bedrock + - Amazon Nova + - Anthropic + - Arcee AI + - AtlasCloud + - Avian + - Azure + - BaseTen + - BytePlus + - Black Forest Labs + - Cerebras + - Chutes + - Cirrascale + - Clarifai + - Cloudflare + - Cohere + - Crucible + - Crusoe + - DeepInfra + - DeepSeek + - DekaLLM + - Featherless + - Fireworks + - Friendli + - GMICloud + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - Nex AGI + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Poolside + - Perceptron + - Perplexity + - Phala + - Recraft + - Reka + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider + example: OpenAI + type: string + x-speakeasy-unknown-values: allow + status: + description: HTTP status code from the provider + example: 200 + nullable: true + type: number + required: + - status + type: object + ProviderSort: + description: The provider sorting strategy (price, throughput, latency) + enum: + - price + - throughput + - latency + - exacto + example: price + type: string + x-speakeasy-unknown-values: allow + ProviderSortConfig: + description: The provider sorting strategy (price, throughput, latency) + example: + by: price + partition: model + properties: + by: + description: The provider sorting strategy (price, throughput, latency) + enum: + - price + - throughput + - latency + - exacto + - null + example: price + nullable: true + type: string + x-speakeasy-unknown-values: allow + partition: + description: >- + Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. + enum: + - model + - none + - null + example: model + nullable: true + type: string + x-speakeasy-unknown-values: allow + type: object + PublicEndpoint: + description: Information about a specific model endpoint + example: + context_length: 8192 + latency_last_30m: + p50: 0.25 + p75: 0.35 + p90: 0.48 + p99: 0.85 + max_completion_tokens: 4096 + max_prompt_tokens: 8192 + model_id: openai/gpt-4 + model_name: GPT-4 + name: 'OpenAI: GPT-4' + pricing: + completion: '0.00006' + image: '0' + prompt: '0.00003' + request: '0' + provider_name: OpenAI + quantization: fp16 + status: 0 + supported_parameters: + - temperature + - top_p + - max_tokens + supports_implicit_caching: true + tag: openai + throughput_last_30m: + p50: 45.2 + p75: 38.5 + p90: 28.3 + p99: 15.1 + uptime_last_1d: 99.8 + uptime_last_30m: 99.5 + uptime_last_5m: 100 + properties: + context_length: + type: integer + latency_last_30m: + $ref: '#/components/schemas/PercentileStats' + max_completion_tokens: + nullable: true + type: integer + max_prompt_tokens: + nullable: true + type: integer + model_id: + description: The unique identifier for the model (permaslug) + example: openai/gpt-4 + type: string + model_name: + type: string + name: + type: string + pricing: + properties: + audio: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + audio_output: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + completion: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + discount: + type: number + image: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + image_output: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + image_token: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_audio_cache: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_cache_read: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_cache_write: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + internal_reasoning: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + prompt: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + request: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + web_search: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + required: + - prompt + - completion + type: object + provider_name: + $ref: '#/components/schemas/ProviderName' + quantization: + allOf: + - $ref: '#/components/schemas/Quantization' + - nullable: true + status: + $ref: '#/components/schemas/EndpointStatus' + supported_parameters: + items: + $ref: '#/components/schemas/Parameter' + type: array + supports_implicit_caching: + type: boolean + tag: + type: string + throughput_last_30m: + allOf: + - $ref: '#/components/schemas/PercentileStats' + - description: >- + Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. + uptime_last_1d: + description: >- + Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. + format: double + nullable: true + type: number + uptime_last_30m: + format: double + nullable: true + type: number + uptime_last_5m: + description: >- + Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. + format: double + nullable: true + type: number + required: + - name + - model_id + - model_name + - context_length + - pricing + - provider_name + - tag + - quantization + - max_completion_tokens + - max_prompt_tokens + - supported_parameters + - uptime_last_30m + - uptime_last_5m + - uptime_last_1d + - supports_implicit_caching + - latency_last_30m + - throughput_last_30m + type: object + PublicPricing: + description: Pricing information for the model + example: + completion: '0.00006' + image: '0' + prompt: '0.00003' + request: '0' + properties: + audio: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + audio_output: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + completion: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + discount: + type: number + image: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + image_output: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + image_token: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_audio_cache: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_cache_read: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + input_cache_write: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + internal_reasoning: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + prompt: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + request: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + web_search: + allOf: + - $ref: '#/components/schemas/BigNumberUnion' + - description: A number or string value representing a large number + required: + - prompt + - completion + type: object + Quantization: + enum: + - int4 + - int8 + - fp4 + - fp6 + - fp8 + - fp16 + - bf16 + - fp32 + - unknown + example: fp16 + type: string + x-speakeasy-unknown-values: allow + ReasoningConfig: + allOf: + - $ref: '#/components/schemas/BaseReasoningConfig' + - nullable: true + properties: + enabled: + nullable: true + type: boolean + max_tokens: + nullable: true + type: integer + type: object + description: Configuration for reasoning mode in the response + example: + enabled: true + summary: auto + ReasoningDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningDeltaEvent' + - properties: {} + type: object + description: Event emitted when reasoning text delta is streamed + example: + content_index: 0 + delta: First, we need + item_id: item-1 + output_index: 0 + sequence_number: 4 + type: response.reasoning_text.delta + ReasoningDetailEncrypted: + description: Reasoning detail encrypted schema + example: + data: encrypted data + type: reasoning.encrypted + properties: + data: + type: string + format: + $ref: '#/components/schemas/ReasoningFormat' + id: + nullable: true + type: string + index: + type: integer + type: + enum: + - reasoning.encrypted + type: string + required: + - type + - data + type: object + ReasoningDetailSummary: + description: Reasoning detail summary schema + example: + summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... + type: reasoning.summary + properties: + format: + $ref: '#/components/schemas/ReasoningFormat' + id: + nullable: true + type: string + index: + type: integer + summary: + type: string + type: + enum: + - reasoning.summary + type: string + required: + - type + - summary + type: object + ReasoningDetailText: + description: Reasoning detail text schema + example: + signature: signature + text: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... + type: reasoning.text + properties: + format: + $ref: '#/components/schemas/ReasoningFormat' + id: + nullable: true + type: string + index: + type: integer + signature: + nullable: true + type: string + text: + nullable: true + type: string + type: + enum: + - reasoning.text + type: string + required: + - type + type: object + ReasoningDetailUnion: + description: Reasoning detail union schema + discriminator: + mapping: + reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted' + reasoning.summary: '#/components/schemas/ReasoningDetailSummary' + reasoning.text: '#/components/schemas/ReasoningDetailText' + propertyName: type + example: + summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... + type: reasoning.summary + oneOf: + - $ref: '#/components/schemas/ReasoningDetailSummary' + - $ref: '#/components/schemas/ReasoningDetailEncrypted' + - $ref: '#/components/schemas/ReasoningDetailText' + ReasoningDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningDoneEvent' + - properties: {} + type: object + description: Event emitted when reasoning text streaming is complete + example: + content_index: 0 + item_id: item-1 + output_index: 0 + sequence_number: 6 + text: First, we need to identify the key components and then combine them logically. + type: response.reasoning_text.done + ReasoningEffort: + enum: + - xhigh + - high + - medium + - low + - minimal + - none + - null + example: medium + nullable: true + type: string + x-speakeasy-unknown-values: allow + ReasoningFormat: + enum: + - unknown + - openai-responses-v1 + - azure-openai-responses-v1 + - xai-responses-v1 + - anthropic-claude-v1 + - google-gemini-v1 + - null + example: unknown + nullable: true + type: string + x-speakeasy-unknown-values: allow + ReasoningItem: + allOf: + - $ref: '#/components/schemas/OutputItemReasoning' + - properties: + content: + items: + $ref: '#/components/schemas/ReasoningTextContent' + nullable: true + type: array + format: + $ref: '#/components/schemas/ReasoningFormat' + signature: + nullable: true + type: string + type: object + description: Reasoning output item with signature and format extensions + example: + id: reasoning-abc123 + summary: + - text: Step by step analysis + type: summary_text + type: reasoning + ReasoningSummaryPartAddedEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningSummaryPartAddedEvent' + - properties: {} + type: object + description: Event emitted when a reasoning summary part is added + example: + item_id: item-1 + output_index: 0 + part: + text: '' + type: summary_text + sequence_number: 3 + summary_index: 0 + type: response.reasoning_summary_part.added + ReasoningSummaryPartDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningSummaryPartDoneEvent' + - properties: {} + type: object + description: Event emitted when a reasoning summary part is complete + example: + item_id: item-1 + output_index: 0 + part: + text: Analyzing the problem step by step to find the optimal solution. + type: summary_text + sequence_number: 7 + summary_index: 0 + type: response.reasoning_summary_part.done + ReasoningSummaryText: + example: + text: Analyzed the problem using first principles + type: summary_text + properties: + text: + type: string + type: + enum: + - summary_text + type: string + required: + - type + - text + type: object + ReasoningSummaryTextDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningSummaryTextDeltaEvent' + - properties: {} + type: object + description: Event emitted when reasoning summary text delta is streamed + example: + delta: Analyzing + item_id: item-1 + output_index: 0 + sequence_number: 4 + summary_index: 0 + type: response.reasoning_summary_text.delta + ReasoningSummaryTextDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningSummaryTextDoneEvent' + - properties: {} + type: object + description: Event emitted when reasoning summary text streaming is complete + example: + item_id: item-1 + output_index: 0 + sequence_number: 6 + summary_index: 0 + text: Analyzing the problem step by step to find the optimal solution. + type: response.reasoning_summary_text.done + ReasoningSummaryVerbosity: + enum: + - auto + - concise + - detailed + - null + example: auto + nullable: true + type: string + x-speakeasy-unknown-values: allow + ReasoningTextContent: + example: + text: Let me think step by step about this problem... + type: reasoning_text + properties: + text: + type: string + type: + enum: + - reasoning_text + type: string + required: + - type + - text + type: object + RefusalDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseRefusalDeltaEvent' + - properties: {} + type: object + description: Event emitted when a refusal delta is streamed + example: + content_index: 0 + delta: I'm sorry + item_id: item-1 + output_index: 0 + sequence_number: 4 + type: response.refusal.delta + RefusalDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseRefusalDoneEvent' + - properties: {} + type: object + description: Event emitted when refusal streaming is complete + example: + content_index: 0 + item_id: item-1 + output_index: 0 + refusal: I'm sorry, but I can't assist with that request. + sequence_number: 6 + type: response.refusal.done + RequestMetadata: + additionalProperties: + maxLength: 512 + type: string + description: >- + 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. + example: + session_id: abc-def-ghi + user_id: '123' + nullable: true + type: object + RequestTimeoutResponse: + description: Request Timeout - Operation exceeded time limit + example: + error: + code: 408 + message: Operation timed out. Please try again later. + properties: + error: + $ref: '#/components/schemas/RequestTimeoutResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object + user_id: + nullable: true + type: string + required: + - error + type: object + RequestTimeoutResponseErrorData: + description: Error data for RequestTimeoutResponse + example: + code: 408 + message: Operation timed out. Please try again later. + properties: + code: + type: integer + message: + type: string + metadata: + additionalProperties: + nullable: true + nullable: true + type: object + required: + - code + - message + type: object + ResponseHealingPlugin: + example: + enabled: true + id: response-healing + properties: + enabled: + description: Set to false to disable the response-healing plugin for this request. Defaults to true. + type: boolean + id: + enum: + - response-healing + type: string + required: + - id + type: object + ResponseIncludesEnum: + enum: + - file_search_call.results + - message.input_image.image_url + - computer_call_output.output.image_url + - reasoning.encrypted_content + - code_interpreter_call.outputs + example: file_search_call.results + type: string + x-speakeasy-unknown-values: allow + ResponseOutputText: + example: + annotations: + - end_index: 42 + start_index: 0 + title: Paris - Wikipedia + type: url_citation + url: https://en.wikipedia.org/wiki/Paris + text: The capital of France is Paris. + type: output_text + properties: + annotations: + items: + $ref: '#/components/schemas/OpenAIResponsesAnnotation' + type: array + logprobs: + items: + properties: + bytes: + items: + type: integer + type: array + logprob: + format: double + type: number + token: + type: string + top_logprobs: + items: + properties: + bytes: + items: + type: integer + type: array + logprob: + format: double + type: number + token: + type: string + required: + - token + - bytes + - logprob type: object + type: array + required: + - token + - bytes + - logprob + - top_logprobs + type: object + type: array + text: + type: string + type: + enum: + - output_text + type: string + required: + - type + - text + type: object + ResponsesErrorField: + description: Error information returned from the API + example: + code: rate_limit_exceeded + message: Rate limit exceeded. Please try again later. + nullable: true + properties: + code: + enum: + - server_error + - rate_limit_exceeded + - invalid_prompt + - vector_store_timeout + - invalid_image + - invalid_image_format + - invalid_base64_image + - invalid_image_url + - image_too_large + - image_too_small + - image_parse_error + - image_content_policy_violation + - invalid_image_mode + - image_file_too_large + - unsupported_image_media_type + - empty_image_file + - failed_to_download_image + - image_file_not_found + type: string + x-speakeasy-unknown-values: allow + message: + type: string + required: + - code + - message + type: object + ResponsesRequest: + description: Request schema for Responses endpoint + example: + input: + - content: Hello, how are you? + role: user + type: message + model: anthropic/claude-4.5-sonnet-20250929 + temperature: 0.7 + tools: + - description: Get the current weather in a given location + name: get_current_weather + parameters: + properties: + location: + type: string + type: object + type: function + top_p: 0.9 + properties: + background: + nullable: true + type: boolean + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' + frequency_penalty: + format: double + nullable: true + type: number + image_config: + $ref: '#/components/schemas/ImageConfig' + include: + items: + $ref: '#/components/schemas/ResponseIncludesEnum' + nullable: true + type: array + input: + $ref: '#/components/schemas/Inputs' + instructions: + nullable: true + type: string + max_output_tokens: + nullable: true + type: integer + max_tool_calls: + nullable: true + type: integer + metadata: + $ref: '#/components/schemas/RequestMetadata' + modalities: + description: Output modalities for the response. Supported values are "text" and "image". + example: + - text + - image + items: + $ref: '#/components/schemas/OutputModalityEnum' + type: array + model: + type: string + models: + items: + type: string + type: array + parallel_tool_calls: + nullable: true + type: boolean + plugins: + description: Plugins you want to enable for this request, including their settings. + items: + discriminator: + mapping: + auto-router: '#/components/schemas/AutoRouterPlugin' + context-compression: '#/components/schemas/ContextCompressionPlugin' + file-parser: '#/components/schemas/FileParserPlugin' + fusion: '#/components/schemas/FusionPlugin' + moderation: '#/components/schemas/ModerationPlugin' + pareto-router: '#/components/schemas/ParetoRouterPlugin' + response-healing: '#/components/schemas/ResponseHealingPlugin' + web: '#/components/schemas/WebSearchPlugin' + propertyName: id + oneOf: + - $ref: '#/components/schemas/AutoRouterPlugin' + - $ref: '#/components/schemas/ModerationPlugin' + - $ref: '#/components/schemas/WebSearchPlugin' + - $ref: '#/components/schemas/FileParserPlugin' + - $ref: '#/components/schemas/ResponseHealingPlugin' + - $ref: '#/components/schemas/ContextCompressionPlugin' + - $ref: '#/components/schemas/ParetoRouterPlugin' + - $ref: '#/components/schemas/FusionPlugin' + type: array + presence_penalty: + format: double + nullable: true + type: number + previous_response_id: + nullable: true + type: string + prompt: + $ref: '#/components/schemas/StoredPromptTemplate' + prompt_cache_key: + nullable: true + type: string + provider: + $ref: '#/components/schemas/ProviderPreferences' + reasoning: + $ref: '#/components/schemas/ReasoningConfig' + route: + $ref: '#/components/schemas/DeprecatedRoute' + safety_identifier: + nullable: true + type: string + service_tier: + default: auto + enum: + - auto + - default + - flex + - priority + - scale + - null + nullable: true + type: string + x-speakeasy-unknown-values: allow + session_id: + description: >- + 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 256 characters. + maxLength: 256 + type: string + store: + const: false + default: false + type: boolean + stream: + default: false + type: boolean + temperature: + format: double + nullable: true + type: number + text: + $ref: '#/components/schemas/TextExtendedConfig' + tool_choice: + $ref: '#/components/schemas/OpenAIResponsesToolChoice' + tools: + items: + anyOf: + - allOf: + - $ref: '#/components/schemas/FunctionTool' + - properties: {} + type: object + description: Function tool definition + example: + description: Get the current weather in a location + name: get_weather + parameters: + properties: + location: + description: The city and state + type: string + unit: + enum: + - celsius + - fahrenheit + type: string + x-speakeasy-unknown-values: allow + required: + - location + type: object + type: function + - $ref: '#/components/schemas/Preview_WebSearchServerTool' + - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool' + - $ref: '#/components/schemas/Legacy_WebSearchServerTool' + - $ref: '#/components/schemas/WebSearchServerTool' + - $ref: '#/components/schemas/FileSearchServerTool' + - $ref: '#/components/schemas/ComputerUseServerTool' + - $ref: '#/components/schemas/CodeInterpreterServerTool' + - $ref: '#/components/schemas/McpServerTool' + - $ref: '#/components/schemas/ImageGenerationServerTool' + - $ref: '#/components/schemas/CodexLocalShellTool' + - $ref: '#/components/schemas/ShellServerTool' + - $ref: '#/components/schemas/ApplyPatchServerTool' + - $ref: '#/components/schemas/CustomTool' + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/FusionServerTool_OpenRouter' + - $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter' + - $ref: '#/components/schemas/ChatSearchModelsServerTool' + - $ref: '#/components/schemas/WebFetchServerTool' + - $ref: '#/components/schemas/WebSearchServerTool_OpenRouter' + - $ref: '#/components/schemas/ApplyPatchServerTool_OpenRouter' + type: array + top_k: + type: integer + top_logprobs: + nullable: true + type: integer + top_p: + format: double + nullable: true + type: number + trace: + $ref: '#/components/schemas/TraceConfig' + truncation: + $ref: '#/components/schemas/OpenAIResponsesTruncation' + user: + description: >- + 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 256 characters. + maxLength: 256 + type: string + type: object + ResponsesStreamingResponse: + example: + data: + delta: Hello + type: response.output_text.delta + properties: + data: + $ref: '#/components/schemas/StreamEvents' + required: + - data + type: object + RouterAttempt: + example: + model: openai/gpt-4o + provider: OpenAI + status: 200 + properties: + model: + type: string + provider: + type: string + status: + type: integer + required: + - provider + - model + - status + type: object + RouterParams: + additionalProperties: + nullable: true + example: + version_group: anthropic/claude-sonnet-4 + properties: + quality_floor: + format: double + type: number + throughput_floor: + format: double + type: number + version_group: + type: string + type: object + RoutingStrategy: + enum: + - direct + - auto + - free + - latest + - alias + - fallback + - pareto + - bodybuilder + - fusion + example: direct + type: string + x-speakeasy-unknown-values: allow + SearchContextSizeEnum: + description: Size of the search context for web search tools + enum: + - low + - medium + - high + example: medium + type: string + x-speakeasy-unknown-values: allow + SearchModelsServerToolConfig: + description: Configuration for the openrouter:experimental__search_models server tool + example: + max_results: 5 + properties: + max_results: + description: Maximum number of models to return. Defaults to 5, max 20. + example: 5 + type: integer + type: object + SearchQualityLevel: + description: >- + How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. + enum: + - low + - medium + - high + example: medium + type: string + x-speakeasy-unknown-values: allow + ServiceTier: + enum: + - auto + - default + - flex + - priority + - scale + - null + example: default + nullable: true + type: string + x-speakeasy-unknown-values: allow + ServiceUnavailableResponse: + description: Service Unavailable - Service temporarily unavailable + example: + error: + code: 503 + message: Service temporarily unavailable + properties: + error: + $ref: '#/components/schemas/ServiceUnavailableResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object + user_id: + nullable: true + type: string + required: + - error + type: object + ServiceUnavailableResponseErrorData: + description: Error data for ServiceUnavailableResponse + example: + code: 503 + message: Service temporarily unavailable + properties: + code: + type: integer + message: + type: string + metadata: + additionalProperties: + nullable: true + nullable: true + type: object + required: + - code + - message + type: object + ShellCallItem: + description: A shell command execution call (newer variant) + example: + action: + commands: + - ls + - '-la' + max_output_length: 10000 + call_id: call-abc123 + status: completed + type: shell_call + properties: + action: + properties: + commands: + items: + type: string + type: array + max_output_length: + nullable: true + type: integer + timeout_ms: + nullable: true + type: integer + required: + - commands + type: object + call_id: + type: string + environment: + nullable: true + id: + nullable: true + type: string + status: + allOf: + - $ref: '#/components/schemas/ToolCallStatus' + - nullable: true + type: + enum: + - shell_call + type: string + required: + - type + - call_id + - action + type: object + ShellCallOutputItem: + description: Output from a shell command execution (newer variant) + example: + call_id: call-abc123 + output: + - content: | + total 0 + type: stdout + status: completed + type: shell_call_output + properties: + call_id: + type: string + id: + nullable: true + type: string + max_output_length: + nullable: true + type: integer + output: + items: + additionalProperties: + nullable: true + properties: + content: + nullable: true + type: string + exit_code: + nullable: true + type: integer + type: + type: string + required: + - type + type: object + type: array + status: + allOf: + - $ref: '#/components/schemas/ToolCallStatus' + - nullable: true + type: + enum: + - shell_call_output + type: string + required: + - type + - call_id + - output + type: object + ShellServerTool: + description: Shell tool configuration + example: + type: shell + properties: + type: + enum: + - shell + type: string + required: + - type + type: object + SpeechRequest: + description: Text-to-speech request input + example: + input: Hello world + model: elevenlabs/eleven-turbo-v2 + response_format: pcm + speed: 1 + voice: alloy + properties: + input: + description: Text to synthesize + example: Hello world + type: string + model: + description: TTS model identifier + example: elevenlabs/eleven-turbo-v2 + type: string + provider: + description: Provider-specific passthrough configuration + properties: + options: + $ref: '#/components/schemas/ProviderOptions' + type: object + response_format: + default: pcm + description: Audio output format + enum: + - mp3 + - pcm + example: pcm + type: string + x-speakeasy-unknown-values: allow + speed: + description: >- + Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers. + example: 1 + format: double + type: number + voice: + description: Voice identifier (provider-specific). + example: alloy + type: string + required: + - model + - input + - voice + type: object + StoredPromptTemplate: + example: + id: prompt-abc123 + variables: + name: John + nullable: true + properties: + id: + type: string + variables: + additionalProperties: + anyOf: + - type: string + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + nullable: true + type: object + required: + - id + type: object + StreamEvents: + description: Union of all possible event types emitted during response streaming + discriminator: + mapping: + error: '#/components/schemas/ErrorEvent' + response.apply_patch_call_operation_diff.delta: '#/components/schemas/ApplyPatchCallOperationDiffDeltaEvent' + response.apply_patch_call_operation_diff.done: '#/components/schemas/ApplyPatchCallOperationDiffDoneEvent' + response.completed: '#/components/schemas/StreamEventsResponseCompleted' + response.content_part.added: '#/components/schemas/ContentPartAddedEvent' + response.content_part.done: '#/components/schemas/ContentPartDoneEvent' + response.created: '#/components/schemas/OpenResponsesCreatedEvent' + response.custom_tool_call_input.delta: '#/components/schemas/CustomToolCallInputDeltaEvent' + response.custom_tool_call_input.done: '#/components/schemas/CustomToolCallInputDoneEvent' + response.failed: '#/components/schemas/StreamEventsResponseFailed' + response.function_call_arguments.delta: '#/components/schemas/FunctionCallArgsDeltaEvent' + response.function_call_arguments.done: '#/components/schemas/FunctionCallArgsDoneEvent' + response.image_generation_call.completed: '#/components/schemas/ImageGenCallCompletedEvent' + response.image_generation_call.generating: '#/components/schemas/ImageGenCallGeneratingEvent' + response.image_generation_call.in_progress: '#/components/schemas/ImageGenCallInProgressEvent' + response.image_generation_call.partial_image: '#/components/schemas/ImageGenCallPartialImageEvent' + response.in_progress: '#/components/schemas/OpenResponsesInProgressEvent' + response.incomplete: '#/components/schemas/StreamEventsResponseIncomplete' + response.output_item.added: '#/components/schemas/StreamEventsResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/StreamEventsResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/AnnotationAddedEvent' + response.output_text.delta: '#/components/schemas/TextDeltaEvent' + response.output_text.done: '#/components/schemas/TextDoneEvent' + response.reasoning_summary_part.added: '#/components/schemas/ReasoningSummaryPartAddedEvent' + response.reasoning_summary_part.done: '#/components/schemas/ReasoningSummaryPartDoneEvent' + response.reasoning_summary_text.delta: '#/components/schemas/ReasoningSummaryTextDeltaEvent' + response.reasoning_summary_text.done: '#/components/schemas/ReasoningSummaryTextDoneEvent' + response.reasoning_text.delta: '#/components/schemas/ReasoningDeltaEvent' + response.reasoning_text.done: '#/components/schemas/ReasoningDoneEvent' + response.refusal.delta: '#/components/schemas/RefusalDeltaEvent' + response.refusal.done: '#/components/schemas/RefusalDoneEvent' + response.web_search_call.completed: '#/components/schemas/WebSearchCallCompletedEvent' + response.web_search_call.in_progress: '#/components/schemas/WebSearchCallInProgressEvent' + response.web_search_call.searching: '#/components/schemas/WebSearchCallSearchingEvent' + propertyName: type + example: + response: + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: [] + parallel_tool_calls: true + status: in_progress + temperature: null + tool_choice: auto + tools: [] + top_p: null + sequence_number: 0 + type: response.created + oneOf: + - $ref: '#/components/schemas/OpenResponsesCreatedEvent' + - $ref: '#/components/schemas/OpenResponsesInProgressEvent' + - $ref: '#/components/schemas/StreamEventsResponseCompleted' + - $ref: '#/components/schemas/StreamEventsResponseIncomplete' + - $ref: '#/components/schemas/StreamEventsResponseFailed' + - $ref: '#/components/schemas/ErrorEvent' + - $ref: '#/components/schemas/StreamEventsResponseOutputItemAdded' + - $ref: '#/components/schemas/StreamEventsResponseOutputItemDone' + - $ref: '#/components/schemas/ContentPartAddedEvent' + - $ref: '#/components/schemas/ContentPartDoneEvent' + - $ref: '#/components/schemas/TextDeltaEvent' + - $ref: '#/components/schemas/TextDoneEvent' + - $ref: '#/components/schemas/RefusalDeltaEvent' + - $ref: '#/components/schemas/RefusalDoneEvent' + - $ref: '#/components/schemas/AnnotationAddedEvent' + - $ref: '#/components/schemas/FunctionCallArgsDeltaEvent' + - $ref: '#/components/schemas/FunctionCallArgsDoneEvent' + - $ref: '#/components/schemas/ReasoningDeltaEvent' + - $ref: '#/components/schemas/ReasoningDoneEvent' + - $ref: '#/components/schemas/ReasoningSummaryPartAddedEvent' + - $ref: '#/components/schemas/ReasoningSummaryPartDoneEvent' + - $ref: '#/components/schemas/ReasoningSummaryTextDeltaEvent' + - $ref: '#/components/schemas/ReasoningSummaryTextDoneEvent' + - $ref: '#/components/schemas/ImageGenCallInProgressEvent' + - $ref: '#/components/schemas/ImageGenCallGeneratingEvent' + - $ref: '#/components/schemas/ImageGenCallPartialImageEvent' + - $ref: '#/components/schemas/ImageGenCallCompletedEvent' + - $ref: '#/components/schemas/WebSearchCallInProgressEvent' + - $ref: '#/components/schemas/WebSearchCallSearchingEvent' + - $ref: '#/components/schemas/WebSearchCallCompletedEvent' + - $ref: '#/components/schemas/CustomToolCallInputDeltaEvent' + - $ref: '#/components/schemas/CustomToolCallInputDoneEvent' + - $ref: '#/components/schemas/ApplyPatchCallOperationDiffDeltaEvent' + - $ref: '#/components/schemas/ApplyPatchCallOperationDiffDoneEvent' + StreamEventsResponseCompleted: + allOf: + - $ref: '#/components/schemas/CompletedEvent' + - properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + type: object + description: Event emitted when a response has completed successfully + example: + response: + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: [] + parallel_tool_calls: true + status: completed + temperature: null + tool_choice: auto + tools: [] + top_p: null + sequence_number: 10 + type: response.completed + StreamEventsResponseFailed: + allOf: + - $ref: '#/components/schemas/FailedEvent' + - properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + type: object + description: Event emitted when a response has failed + example: + response: + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: [] + parallel_tool_calls: true + status: failed + temperature: null + tool_choice: auto + tools: [] + top_p: null + sequence_number: 3 + type: response.failed + StreamEventsResponseIncomplete: + allOf: + - $ref: '#/components/schemas/IncompleteEvent' + - properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + type: object + description: Event emitted when a response is incomplete + example: + response: + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: [] + parallel_tool_calls: true + status: incomplete + temperature: null + tool_choice: auto + tools: [] + top_p: null + sequence_number: 5 + type: response.incomplete + StreamEventsResponseOutputItemAdded: + allOf: + - $ref: '#/components/schemas/OutputItemAddedEvent' + - properties: + item: + $ref: '#/components/schemas/OutputItems' + type: object + description: Event emitted when a new output item is added to the response + example: + item: + content: [] + id: item-1 + role: assistant + status: in_progress + type: message + output_index: 0 + sequence_number: 2 + type: response.output_item.added + StreamEventsResponseOutputItemDone: + allOf: + - $ref: '#/components/schemas/OutputItemDoneEvent' + - properties: + item: + $ref: '#/components/schemas/OutputItems' + type: object + description: Event emitted when an output item is complete + example: + item: + content: + - annotations: [] + text: Hello! How can I help you? + type: output_text + id: item-1 + role: assistant + status: completed + type: message + output_index: 0 + sequence_number: 8 + type: response.output_item.done + StreamLogprob: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - properties: + top_logprobs: + items: + $ref: '#/components/schemas/StreamLogprobTopLogprob' + type: array + type: object + description: Log probability information for a token + example: + bytes: + - 72 + - 101 + - 108 + - 108 + - 111 + logprob: -0.5 + token: Hello + top_logprobs: [] + StreamLogprobTopLogprob: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - properties: {} + type: object + description: Alternative token with its log probability + example: + bytes: + - 72 + - 101 + - 108 + - 108 + - 111 + logprob: -0.5 + token: Hello + STTInputAudio: + description: Base64-encoded audio to transcribe + example: + data: UklGRiQA... + format: wav + properties: + data: + description: Base64-encoded audio data (raw bytes, not a data URI) + type: string + format: + description: Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider. + type: string + required: + - data + - format + type: object + STTRequest: + description: Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio. + example: + input_audio: + data: UklGRiQA... + format: wav + language: en + model: openai/whisper-large-v3 + properties: + input_audio: + $ref: '#/components/schemas/STTInputAudio' + language: + description: ISO-639-1 language code (e.g., "en", "ja"). Auto-detected if omitted. + example: en + type: string + model: + description: STT model identifier + example: openai/whisper-large-v3 + type: string + provider: + description: Provider-specific passthrough configuration + properties: + options: + $ref: '#/components/schemas/ProviderOptions' + type: object + temperature: + description: Sampling temperature for transcription + example: 0 + format: double + type: number + required: + - model + - input_audio + type: object + STTResponse: + description: STT response containing transcribed text and optional usage statistics + example: + text: Hello, this is a test of OpenAI speech-to-text transcription. + usage: + cost: 0.000508 + input_tokens: 83 + output_tokens: 30 + seconds: 9.2 + total_tokens: 113 + properties: + text: + description: The transcribed text + example: >- + Hello, this is a test of OpenAI speech-to-text transcription. The weather is sunny today and the temperature is around 72 degrees. + type: string + usage: + $ref: '#/components/schemas/STTUsage' + required: + - text + type: object + STTUsage: + description: Aggregated usage statistics for the request + example: + cost: 0.000508 + input_tokens: 83 + output_tokens: 30 + seconds: 9.2 + total_tokens: 113 + properties: + cost: + description: Total cost of the request in USD + example: 0.000508 + format: double + type: number + input_tokens: + description: Number of input tokens billed for this request + example: 83 + type: integer + output_tokens: + description: Number of output tokens generated + example: 30 + type: integer + seconds: + description: Duration of the input audio in seconds + example: 9.2 + format: double + type: number + total_tokens: + description: Total number of tokens used (input + output) + example: 113 + type: integer + type: object + TextConfig: + description: Text output configuration including format and verbosity + example: + format: + type: text + verbosity: medium + properties: + format: + $ref: '#/components/schemas/Formats' + verbosity: + enum: + - high + - low + - medium + - null + nullable: true + type: string + x-speakeasy-unknown-values: allow + type: object + TextDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseTextDeltaEvent' + - properties: + logprobs: + items: + $ref: '#/components/schemas/StreamLogprob' + type: array + type: object + description: Event emitted when a text delta is streamed + example: + content_index: 0 + delta: Hello + item_id: item-1 + logprobs: [] + output_index: 0 + sequence_number: 4 + type: response.output_text.delta + TextDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseTextDoneEvent' + - properties: + logprobs: + items: + $ref: '#/components/schemas/StreamLogprob' + type: array + type: object + description: Event emitted when text streaming is complete + example: + content_index: 0 + item_id: item-1 + logprobs: [] + output_index: 0 + sequence_number: 6 + text: Hello! How can I help you? + type: response.output_text.done + TextExtendedConfig: + allOf: + - $ref: '#/components/schemas/TextConfig' + - properties: + verbosity: + enum: + - low + - medium + - high + - xhigh + - max + - null + nullable: true + type: string + x-speakeasy-unknown-values: allow + type: object + description: Text output configuration including format and verbosity + example: + format: + type: text + ToolCallStatus: + enum: + - in_progress + - completed + - incomplete + example: completed + type: string + x-speakeasy-unknown-values: allow + ToolChoiceAllowed: + description: Constrains the model to a pre-defined set of allowed tools + example: + mode: auto + tools: + - name: get_weather + type: function + type: allowed_tools + properties: + mode: + anyOf: + - enum: + - auto + type: string + - enum: + - required + type: string + tools: + items: + additionalProperties: + nullable: true + type: object + type: array + type: + enum: + - allowed_tools + type: string + required: + - type + - mode + - tools + type: object + TooManyRequestsResponse: + description: Too Many Requests - Rate limit exceeded + example: + error: + code: 429 + message: Rate limit exceeded + properties: + error: + $ref: '#/components/schemas/TooManyRequestsResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object + user_id: + nullable: true + type: string + required: + - error + type: object + TooManyRequestsResponseErrorData: + description: Error data for TooManyRequestsResponse + example: + code: 429 + message: Rate limit exceeded + properties: + code: + type: integer + message: + type: string + metadata: + additionalProperties: + nullable: true + nullable: true + type: object + required: + - code + - message + type: object + TopProviderInfo: + description: Information about the top provider for this model + example: + context_length: 8192 + is_moderated: true + max_completion_tokens: 4096 + properties: + context_length: + description: Context length from the top provider + example: 8192 + nullable: true + type: integer + is_moderated: + description: Whether the top provider moderates content + example: true + type: boolean + max_completion_tokens: + description: Maximum completion tokens from the top provider + example: 4096 + nullable: true + type: integer + required: + - is_moderated + type: object + TraceConfig: + additionalProperties: + nullable: true + description: >- + 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. + example: + trace_id: trace-abc123 + trace_name: my-app-trace + properties: + generation_name: + type: string + parent_span_id: + type: string + span_name: + type: string + trace_id: + type: string + trace_name: + type: string + type: object + Truncation: + enum: + - auto + - disabled + - null + example: auto + nullable: true + type: string + x-speakeasy-unknown-values: allow + UnauthorizedResponse: + description: Unauthorized - Authentication required or invalid credentials + example: + error: + code: 401 + message: Missing Authentication header + properties: + error: + $ref: '#/components/schemas/UnauthorizedResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object + user_id: + nullable: true + type: string + required: + - error + type: object + UnauthorizedResponseErrorData: + description: Error data for UnauthorizedResponse + example: + code: 401 + message: Missing Authentication header + properties: + code: + type: integer + message: + type: string + metadata: + additionalProperties: + nullable: true + nullable: true + type: object + required: + - code + - message + type: object + UnprocessableEntityResponse: + description: Unprocessable Entity - Semantic validation failure + example: + error: + code: 422 + message: Invalid argument + properties: + error: + $ref: '#/components/schemas/UnprocessableEntityResponseErrorData' + openrouter_metadata: + additionalProperties: + nullable: true + nullable: true + type: object + user_id: + nullable: true + type: string + required: + - error + type: object + UnprocessableEntityResponseErrorData: + description: Error data for UnprocessableEntityResponse + example: + code: 422 + message: Invalid argument + properties: + code: + type: integer + message: + type: string + metadata: + additionalProperties: + nullable: true + nullable: true + type: object + required: + - code + - message + type: object + UpdateGuardrailRequest: + example: + description: Updated description + limit_usd: 75 + name: Updated Guardrail Name + reset_interval: weekly + properties: + allowed_models: + description: Array of model identifiers (slug or canonical_slug accepted) + example: + - openai/gpt-5.2 + items: + type: string + minItems: 1 + nullable: true + type: array + allowed_providers: + description: New list of allowed provider IDs + example: + - openai + - anthropic + - deepseek + items: + type: string + minItems: 1 + nullable: true + type: array + content_filter_builtins: + description: >- + Builtin content filters to apply. Set to null to remove. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. + example: + - action: block + slug: regex-prompt-injection + items: + $ref: '#/components/schemas/ContentFilterBuiltinEntry' + nullable: true + type: array + content_filters: + description: Custom regex content filters to apply. Set to null to remove. + example: null + items: + $ref: '#/components/schemas/ContentFilterEntry' + nullable: true + type: array + description: + description: New description for the guardrail + example: Updated description + maxLength: 1000 + nullable: true + type: string + enforce_zdr: + deprecated: true + description: >- + Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. + example: true + nullable: true + type: boolean + enforce_zdr_anthropic: + description: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. + example: true + nullable: true + type: boolean + enforce_zdr_google: + description: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. + example: true + nullable: true + type: boolean + enforce_zdr_openai: + description: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. + example: true + nullable: true + type: boolean + enforce_zdr_other: + description: >- + Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. + example: true + nullable: true + type: boolean + ignored_models: + description: Array of model identifiers to exclude from routing (slug or canonical_slug accepted) + example: + - openai/gpt-4o-mini + items: + type: string + minItems: 1 + nullable: true + type: array + ignored_providers: + description: List of provider IDs to exclude from routing + example: + - azure + items: + type: string + minItems: 1 + nullable: true + type: array + limit_usd: + description: New spending limit in USD + example: 75 + format: double + nullable: true + type: number + name: + description: New name for the guardrail + example: Updated Guardrail Name + maxLength: 200 + minLength: 1 + type: string + reset_interval: + $ref: '#/components/schemas/GuardrailInterval' + type: object + UpdateGuardrailResponse: + example: + data: + allowed_models: null + allowed_providers: + - openai + content_filter_builtins: + - action: block + label: '[PROMPT_INJECTION]' + slug: regex-prompt-injection + content_filters: null + created_at: '2025-08-24T10:30:00Z' + description: Updated description + enforce_zdr: null + enforce_zdr_anthropic: true + enforce_zdr_google: true + enforce_zdr_openai: true + enforce_zdr_other: true + id: 550e8400-e29b-41d4-a716-446655440000 + ignored_models: null + ignored_providers: null + limit_usd: 75 + name: Updated Guardrail Name + reset_interval: weekly + updated_at: '2025-08-24T16:00:00Z' + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 + properties: + data: + allOf: + - $ref: '#/components/schemas/Guardrail' + - description: The updated guardrail + required: + - data + type: object + UpdateWorkspaceRequest: + example: + name: Updated Workspace + slug: updated-workspace + properties: + default_image_model: + description: Default image model for this workspace + example: openai/dall-e-3 + nullable: true + type: string + default_provider_sort: + description: Default provider sort preference (price, throughput, latency, exacto) + example: price + nullable: true + type: string + default_text_model: + description: Default text model for this workspace + example: openai/gpt-4o + nullable: true + type: string + description: + description: New description for the workspace + example: Updated description + maxLength: 500 + nullable: true + type: string + io_logging_api_key_ids: + description: Optional array of API key IDs to filter I/O logging + example: null + items: + type: integer + nullable: true + type: array + io_logging_sampling_rate: + description: Sampling rate for I/O logging (0.0001-1) + example: 1 + format: double + type: number + is_data_discount_logging_enabled: + description: Whether data discount logging is enabled + example: true + type: boolean + is_observability_broadcast_enabled: + description: Whether broadcast is enabled + example: false + type: boolean + is_observability_io_logging_enabled: + description: Whether private logging is enabled + example: false + type: boolean + name: + description: New name for the workspace + example: Updated Workspace + maxLength: 100 + minLength: 1 + type: string + slug: + description: >- + New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens) + example: updated-workspace + maxLength: 50 + minLength: 1 + pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ + type: string + type: object + UpdateWorkspaceResponse: + example: + data: + created_at: '2025-08-24T10:30:00Z' + created_by: user_abc123 + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + id: 550e8400-e29b-41d4-a716-446655440000 + io_logging_api_key_ids: null + io_logging_sampling_rate: 1 + is_data_discount_logging_enabled: true + is_observability_broadcast_enabled: false + is_observability_io_logging_enabled: false + name: Updated Workspace + slug: updated-workspace + updated_at: '2025-08-25T10:00:00Z' + properties: + data: + allOf: + - $ref: '#/components/schemas/Workspace' + - description: The updated workspace + required: + - data + type: object + URLCitation: + example: + end_index: 42 + start_index: 0 + title: OpenRouter Documentation + type: url_citation + url: https://openrouter.ai/docs + properties: + end_index: + type: integer + start_index: + type: integer + title: + type: string + type: + enum: + - url_citation + type: string + url: + type: string + required: + - type + - url + - title + - start_index + - end_index + type: object + Usage: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesUsage' + - nullable: true + properties: + cost: + description: Cost of the completion + format: double + nullable: true + type: number + cost_details: + properties: + upstream_inference_cost: + format: double + nullable: true + type: number + upstream_inference_input_cost: + format: double + type: number + upstream_inference_output_cost: + format: double + type: number + required: + - upstream_inference_input_cost + - upstream_inference_output_cost type: object + is_byok: + description: Whether a request was made using a Bring Your Own Key configuration + type: boolean + type: object + description: Token usage information for the response + example: + cost: 0.0012 + cost_details: + upstream_inference_cost: null + upstream_inference_input_cost: 0.0008 + upstream_inference_output_cost: 0.0004 + input_tokens: 10 + input_tokens_details: + cached_tokens: 0 + output_tokens: 25 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 35 + VideoGenerationRequest: + example: + aspect_ratio: '16:9' + duration: 8 + model: google/veo-3.1 + prompt: A serene mountain landscape at sunset + resolution: 720p + properties: + aspect_ratio: + description: Aspect ratio of the generated video + enum: + - '16:9' + - '9:16' + - '1:1' + - '4:3' + - '3:4' + - '3:2' + - '2:3' + - '21:9' + - '9:21' + example: '16:9' + type: string + x-speakeasy-unknown-values: allow + callback_url: + description: >- + URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + example: https://example.com/webhook + format: uri + type: string + duration: + description: Duration of the generated video in seconds + example: 8 + minimum: 1 + type: integer + frame_images: + description: >- + Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. + items: + $ref: '#/components/schemas/FrameImage' + type: array + generate_audio: + description: >- + Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + example: true + type: boolean + input_references: + description: Reference images to guide video generation + items: + $ref: '#/components/schemas/ContentPartImage' + type: array + model: + type: string + prompt: + type: string + provider: + description: Provider-specific passthrough configuration + properties: + options: + allOf: + - $ref: '#/components/schemas/ProviderOptions' + - example: + google-vertex: + output_config: + effort: low type: object resolution: description: Resolution of the generated video @@ -12989,6 +18227,8 @@ components: - '1:1' - '4:3' - '3:4' + - '3:2' + - '2:3' - '21:9' - '9:21' type: string @@ -13031,30 +18271,38 @@ components: enum: - 480x480 - 480x640 + - 480x720 - 480x854 - 480x1120 - 640x480 + - 720x480 - 720x720 - 720x960 + - 720x1080 - 720x1280 - 720x1680 - 854x480 - 960x720 + - 1080x720 - 1080x1080 - 1080x1440 + - 1080x1620 - 1080x1920 - 1080x2520 - 1120x480 - 1280x720 - 1440x1080 + - 1620x1080 - 1680x720 - 1920x1080 - 2160x2160 - 2160x2880 + - 2160x3240 - 2160x3840 - 2160x5040 - 2520x1080 - 2880x2160 + - 3240x2160 - 3840x2160 - 5040x2160 type: string @@ -13107,6 +18355,61 @@ components: required: - data type: object + WebFetchEngineEnum: + description: >- + Which fetch engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in fetch. "exa" uses Exa Contents API. "openrouter" uses direct HTTP fetch. "firecrawl" uses Firecrawl scrape (requires BYOK). + enum: + - auto + - native + - openrouter + - firecrawl + - exa + example: auto + type: string + x-speakeasy-unknown-values: allow + WebFetchServerTool: + description: 'OpenRouter built-in server tool: fetches full content from a URL (web page or PDF)' + example: + parameters: + max_uses: 10 + type: openrouter:web_fetch + properties: + parameters: + $ref: '#/components/schemas/WebFetchServerToolConfig' + type: + enum: + - openrouter:web_fetch + type: string + required: + - type + type: object + WebFetchServerToolConfig: + description: Configuration for the openrouter:web_fetch server tool + example: + max_content_tokens: 100000 + max_uses: 10 + properties: + allowed_domains: + description: Only fetch from these domains. + items: + type: string + type: array + blocked_domains: + description: Never fetch from these domains. + items: + type: string + type: array + engine: + $ref: '#/components/schemas/WebFetchEngineEnum' + max_content_tokens: + description: Maximum content length in approximate tokens. Content exceeding this limit is truncated. + example: 100000 + type: integer + max_uses: + description: Maximum number of web fetches per request. Once exceeded, the tool returns an error. + example: 10 + type: integer + type: object WebSearchCallCompletedEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesSearchCompleted' @@ -13147,7 +18450,7 @@ components: properties: allowed_domains: description: >- - Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity. + Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains. items: type: string type: array @@ -13155,7 +18458,7 @@ components: $ref: '#/components/schemas/WebSearchEngineEnum' excluded_domains: description: >- - Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity. + Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains. items: type: string type: array @@ -13166,8 +18469,8 @@ components: type: integer max_total_results: description: >- - Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. - example: 20 + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified. + example: 50 type: integer search_context_size: $ref: '#/components/schemas/SearchQualityLevel' @@ -13252,8 +18555,25 @@ components: type: array max_results: type: integer + max_uses: + description: >- + Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic). + type: integer search_prompt: type: string + user_location: + allOf: + - $ref: '#/components/schemas/WebSearchUserLocation' + - description: >- + Approximate user location for location-biased search results. Passed through to native providers that support it (e.g. Anthropic). + example: + city: San Francisco + country: US + region: California + timezone: America/Los_Angeles + type: approximate + required: + - type required: - id type: object @@ -13294,17 +18614,7 @@ components: type: openrouter:web_search properties: parameters: - properties: - max_results: - description: Maximum number of search results to return per search call. Defaults to 5. - example: 5 - type: integer - max_total_results: - description: >- - Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. - example: 20 - type: integer - type: object + $ref: '#/components/schemas/WebSearchServerToolConfig' type: enum: - openrouter:web_search @@ -13312,6 +18622,41 @@ components: required: - type type: object + WebSearchServerToolConfig: + description: Configuration for the openrouter:web_search server tool + example: + max_results: 5 + search_context_size: medium + properties: + allowed_domains: + description: >- + Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains. + items: + type: string + type: array + engine: + $ref: '#/components/schemas/WebSearchEngineEnum' + excluded_domains: + description: >- + Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains. + items: + type: string + type: array + max_results: + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 + type: integer + max_total_results: + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified. + example: 50 + type: integer + search_context_size: + $ref: '#/components/schemas/SearchQualityLevel' + user_location: + $ref: '#/components/schemas/WebSearchUserLocationServerTool' + type: object WebSearchSource: example: type: url @@ -13373,18 +18718,169 @@ components: type: approximate properties: city: + nullable: true type: string country: + nullable: true type: string region: + nullable: true type: string timezone: + nullable: true type: string type: enum: - approximate type: string type: object + Workspace: + example: + created_at: '2025-08-24T10:30:00Z' + created_by: user_abc123 + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + id: 550e8400-e29b-41d4-a716-446655440000 + io_logging_api_key_ids: null + io_logging_sampling_rate: 1 + is_data_discount_logging_enabled: true + is_observability_broadcast_enabled: false + is_observability_io_logging_enabled: false + name: Production + slug: production + updated_at: '2025-08-24T15:45:00Z' + properties: + created_at: + description: ISO 8601 timestamp of when the workspace was created + example: '2025-08-24T10:30:00Z' + type: string + created_by: + description: User ID of the workspace creator + example: user_abc123 + nullable: true + type: string + default_image_model: + description: Default image model for this workspace + example: openai/dall-e-3 + nullable: true + type: string + default_provider_sort: + description: Default provider sort preference (price, throughput, latency, exacto) + example: price + nullable: true + type: string + default_text_model: + description: Default text model for this workspace + example: openai/gpt-4o + nullable: true + type: string + description: + description: Description of the workspace + example: Production environment workspace + nullable: true + type: string + id: + description: Unique identifier for the workspace + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string + io_logging_api_key_ids: + description: Optional array of API key IDs to filter I/O logging. Null means all keys are logged. + example: null + items: + type: integer + nullable: true + type: array + io_logging_sampling_rate: + description: Sampling rate for I/O logging (0.0001-1). 1 means 100% of requests are logged. + example: 1 + format: double + type: number + is_data_discount_logging_enabled: + description: Whether data discount logging is enabled for this workspace + example: true + type: boolean + is_observability_broadcast_enabled: + description: Whether broadcast is enabled for this workspace + example: false + type: boolean + is_observability_io_logging_enabled: + description: Whether private logging is enabled for this workspace + example: false + type: boolean + name: + description: Name of the workspace + example: Production + type: string + slug: + description: URL-friendly slug for the workspace + example: production + type: string + updated_at: + description: ISO 8601 timestamp of when the workspace was last updated + example: '2025-08-24T15:45:00Z' + nullable: true + type: string + required: + - id + - name + - slug + - description + - default_text_model + - default_image_model + - default_provider_sort + - is_observability_io_logging_enabled + - is_observability_broadcast_enabled + - is_data_discount_logging_enabled + - io_logging_sampling_rate + - io_logging_api_key_ids + - created_at + - updated_at + - created_by + type: object + WorkspaceMember: + example: + created_at: '2025-08-24T10:30:00Z' + id: 660e8400-e29b-41d4-a716-446655440000 + role: member + user_id: user_abc123 + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + properties: + created_at: + description: ISO 8601 timestamp of when the membership was created + example: '2025-08-24T10:30:00Z' + type: string + id: + description: Unique identifier for the workspace membership + example: 660e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string + role: + description: Role of the member in the workspace + enum: + - admin + - member + example: member + type: string + x-speakeasy-unknown-values: allow + user_id: + description: Clerk user ID of the member + example: user_abc123 + type: string + workspace_id: + description: ID of the workspace + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string + required: + - id + - workspace_id + - user_id + - role + - created_at + type: object securitySchemes: apiKey: description: API key as bearer token in Authorization header @@ -13445,21 +18941,246 @@ paths: content: application/json: example: - data: - - byok_usage_inference: 0.012 - completion_tokens: 125 - date: '2025-08-24' - endpoint_id: 550e8400-e29b-41d4-a716-446655440000 - model: openai/gpt-4.1 - model_permaslug: openai/gpt-4.1-2025-04-14 - prompt_tokens: 50 - provider_name: OpenAI - reasoning_tokens: 25 - requests: 5 - usage: 0.015 + data: + - byok_usage_inference: 0.012 + completion_tokens: 125 + date: '2025-08-24' + endpoint_id: 550e8400-e29b-41d4-a716-446655440000 + model: openai/gpt-4.1 + model_permaslug: openai/gpt-4.1-2025-04-14 + prompt_tokens: 50 + provider_name: OpenAI + reasoning_tokens: 25 + requests: 5 + usage: 0.015 + schema: + $ref: '#/components/schemas/ActivityResponse' + description: Returns user activity data grouped by endpoint + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '403': + content: + application/json: + example: + error: + code: 403 + message: Only management keys can perform this operation + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: Get user activity grouped by endpoint + tags: + - Analytics + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /audio/speech: + post: + description: >- + Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav). + operationId: createAudioSpeech + requestBody: + content: + application/json: + example: + input: Hello world + model: elevenlabs/eleven-turbo-v2 + response_format: pcm + speed: 1 + voice: alloy + schema: + $ref: '#/components/schemas/SpeechRequest' + required: true + responses: + '200': + content: + audio/*: + schema: + description: >- + Raw audio bytestream. Content-Type varies by requested format (audio/mpeg for mp3, audio/pcm for pcm — 16-bit little-endian). + example: + format: binary + type: string + description: Audio bytes stream + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '402': + content: + application/json: + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits + schema: + $ref: '#/components/schemas/PaymentRequiredResponse' + description: Payment Required - Insufficient credits or quota to complete request + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + '502': + content: + application/json: + example: + error: + code: 502 + message: Provider returned error + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: Bad Gateway - Provider/upstream API failure + '503': + content: + application/json: + example: + error: + code: 503 + message: Service temporarily unavailable + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: Service Unavailable - Service temporarily unavailable + '524': + content: + application/json: + example: + error: + code: 524 + message: Request timed out. Please try again later. + schema: + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + description: Infrastructure Timeout - Provider request timed out at edge network + '529': + content: + application/json: + example: + error: + code: 529 + message: Provider returned error + schema: + $ref: '#/components/schemas/ProviderOverloadedResponse' + description: Provider Overloaded - Provider is temporarily overloaded + summary: Create speech + tags: + - TTS + x-speakeasy-max-method-params: 1 + x-speakeasy-name-override: createSpeech + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /audio/transcriptions: + post: + description: Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text. + operationId: createAudioTranscriptions + requestBody: + content: + application/json: + example: + input_audio: + data: UklGRiQA... + format: wav + language: en + model: openai/whisper-large-v3 + schema: + $ref: '#/components/schemas/STTRequest' + required: true + responses: + '200': + content: + application/json: + example: + text: Hello, this is a test of OpenAI speech-to-text transcription. + usage: + cost: 0.000508 + input_tokens: 83 + output_tokens: 30 + seconds: 9.2 + total_tokens: 113 schema: - $ref: '#/components/schemas/ActivityResponse' - description: Returns user activity data grouped by endpoint + $ref: '#/components/schemas/STTResponse' + description: Transcription result '400': content: application/json: @@ -13480,16 +19201,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: Unauthorized - Authentication required or invalid credentials - '403': + '402': content: application/json: example: error: - code: 403 - message: Only management keys can perform this operation + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits schema: - $ref: '#/components/schemas/ForbiddenResponse' - description: Forbidden - Authentication successful but insufficient permissions + $ref: '#/components/schemas/PaymentRequiredResponse' + description: Payment Required - Insufficient credits or quota to complete request '404': content: application/json: @@ -13500,6 +19221,16 @@ paths: schema: $ref: '#/components/schemas/NotFoundResponse' description: Not Found - Resource does not exist + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded '500': content: application/json: @@ -13510,9 +19241,51 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - summary: Get user activity grouped by endpoint + '502': + content: + application/json: + example: + error: + code: 502 + message: Provider returned error + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: Bad Gateway - Provider/upstream API failure + '503': + content: + application/json: + example: + error: + code: 503 + message: Service temporarily unavailable + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: Service Unavailable - Service temporarily unavailable + '524': + content: + application/json: + example: + error: + code: 524 + message: Request timed out. Please try again later. + schema: + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + description: Infrastructure Timeout - Provider request timed out at edge network + '529': + content: + application/json: + example: + error: + code: 529 + message: Provider returned error + schema: + $ref: '#/components/schemas/ProviderOverloadedResponse' + description: Provider Overloaded - Provider is temporarily overloaded + summary: Create transcription tags: - - Analytics + - STT + x-speakeasy-max-method-params: 1 + x-speakeasy-name-override: createTranscription parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -13769,8 +19542,268 @@ paths: code: 409 message: Resource conflict. Please try again later. schema: - $ref: '#/components/schemas/ConflictResponse' - description: Conflict - Resource conflict or concurrent modification + $ref: '#/components/schemas/ConflictResponse' + description: Conflict - Resource conflict or concurrent modification + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: Create authorization code + tags: + - OAuth + x-speakeasy-name-override: createAuthCode + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /byok: + get: + description: >- + List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: listBYOKKeys + parameters: + - description: Number of records to skip for pagination + in: query + name: offset + required: false + schema: + description: Number of records to skip for pagination + example: 0 + minimum: 0 + nullable: false + type: integer + - description: Maximum number of records to return (max 100) + in: query + name: limit + required: false + schema: + description: Maximum number of records to return (max 100) + example: 50 + maximum: 100 + minimum: 1 + type: integer + - description: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace. + in: query + name: workspace_id + required: false + schema: + description: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string + - description: Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`). + in: query + name: provider + required: false + schema: + description: Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`). + enum: + - ai21 + - aion-labs + - akashml + - alibaba + - amazon-bedrock + - amazon-nova + - ambient + - anthropic + - arcee-ai + - atlas-cloud + - avian + - azure + - baidu + - baseten + - black-forest-labs + - byteplus + - cerebras + - chutes + - cirrascale + - clarifai + - cloudflare + - cohere + - crusoe + - deepinfra + - deepseek + - dekallm + - featherless + - fireworks + - friendli + - gmicloud + - google-ai-studio + - google-vertex + - groq + - hyperbolic + - inception + - inceptron + - inference-net + - infermatic + - inflection + - io-net + - ionstream + - liquid + - mancer + - mara + - minimax + - mistral + - modelrun + - modular + - moonshotai + - morph + - ncompass + - nebius + - nex-agi + - nextbit + - novita + - nvidia + - open-inference + - openai + - parasail + - perceptron + - perplexity + - phala + - poolside + - recraft + - reka + - relace + - sambanova + - seed + - siliconflow + - sourceful + - stepfun + - streamlake + - switchpoint + - together + - upstage + - venice + - wandb + - xai + - xiaomi + - z-ai + example: openai + type: string + x-speakeasy-unknown-values: allow + responses: + '200': + content: + application/json: + example: + data: + - allowed_api_key_hashes: null + allowed_models: null + allowed_user_ids: null + created_at: '2025-08-24T10:30:00Z' + disabled: false + id: 11111111-2222-3333-4444-555555555555 + is_fallback: false + label: sk-...AbCd + name: Production OpenAI Key + provider: openai + sort_order: 0 + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + total_count: 1 + schema: + $ref: '#/components/schemas/ListBYOKKeysResponse' + description: List of BYOK credentials + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: List BYOK provider credentials + tags: + - BYOK + x-speakeasy-name-override: list + x-speakeasy-pagination: + inputs: + - in: parameters + name: offset + type: offset + - in: parameters + name: limit + type: limit + outputs: + results: $.data + type: offsetLimit + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /byok/{id}: + get: + description: >- + Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: getBYOKKey + parameters: + - description: The BYOK credential ID (UUID). + in: path + name: id + required: true + schema: + description: The BYOK credential ID (UUID). + example: 11111111-2222-3333-4444-555555555555 + format: uuid + type: string + responses: + '200': + content: + application/json: + example: + data: + allowed_api_key_hashes: null + allowed_models: null + allowed_user_ids: null + created_at: '2025-08-24T10:30:00Z' + disabled: false + id: 11111111-2222-3333-4444-555555555555 + is_fallback: false + label: sk-...AbCd + name: Production OpenAI Key + provider: openai + sort_order: 0 + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + schema: + $ref: '#/components/schemas/GetBYOKKeyResponse' + description: BYOK credential details + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist '500': content: application/json: @@ -13781,10 +19814,10 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - summary: Create authorization code + summary: Get a BYOK provider credential tags: - - OAuth - x-speakeasy-name-override: createAuthCode + - BYOK + x-speakeasy-name-override: get parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -13794,6 +19827,14 @@ paths: description: >- Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes. operationId: sendChatCompletionRequest + parameters: + - description: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. + example: enabled + in: header + name: X-OpenRouter-Experimental-Metadata + required: false + schema: + $ref: '#/components/schemas/MetadataLevel' requestBody: content: application/json: @@ -13844,12 +19885,7 @@ paths: model: openai/gpt-4 object: chat.completion.chunk schema: - properties: - data: - $ref: '#/components/schemas/ChatStreamChunk' - required: - - data - type: object + $ref: '#/components/schemas/ChatStreamingResponse' x-speakeasy-sse-sentinel: '[DONE]' description: Successful chat completion response '400': @@ -13882,6 +19918,55 @@ paths: schema: $ref: '#/components/schemas/PaymentRequiredResponse' description: Payment Required - Insufficient credits or quota to complete request + '403': + content: + application/json: + examples: + guardrail-blocked: + summary: Guardrail blocked the request + value: + error: + code: 403 + message: 'Request blocked: prompt injection patterns detected' + metadata: + patterns: + - ignore all previous instructions + openrouter_metadata: + attempt: 1 + endpoints: + available: + - model: openai/gpt-4o + provider: OpenAI + selected: false + total: 1 + is_byok: false + pipeline: + - data: + action: blocked + detected: true + engines: + - regex + patterns: + - ignore all previous instructions + guardrail_id: grd_abc123 + guardrail_scope: api-key + name: regex_pi_detection + summary: 'Blocked: prompt injection detected (1 pattern matched)' + type: guardrail + region: iad + requested: openai/gpt-4o + strategy: direct + summary: available=1 + insufficient-permissions: + summary: Insufficient permissions + value: + error: + code: 403 + message: Only management keys can perform this operation + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: >- + Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details. '404': content: application/json: @@ -14177,6 +20262,9 @@ paths: - type - image_url type: object + - $ref: '#/components/schemas/ContentPartInputAudio' + - $ref: '#/components/schemas/ContentPartInputVideo' + - $ref: '#/components/schemas/ContentPartInputFile' type: array required: - content @@ -14295,6 +20383,28 @@ paths: description: Number of tokens in the input example: 8 type: integer + prompt_tokens_details: + description: >- + Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included. + properties: + audio_tokens: + description: Number of audio tokens in the input + type: integer + file_tokens: + description: Number of file/document tokens in the input + type: integer + image_tokens: + description: Number of image tokens in the input + example: 258 + type: integer + text_tokens: + description: Number of text tokens in the input + example: 8 + type: integer + video_tokens: + description: Number of video tokens in the input + type: integer + type: object total_tokens: description: Total number of tokens used example: 8 @@ -14459,6 +20569,7 @@ paths: prompt: '0.00000002' request: '0' supported_parameters: [] + supported_voices: null top_provider: context_length: 8192 is_moderated: false @@ -14618,15 +20729,15 @@ paths: application/json: example: data: - api_type: null + api_type: completions app_id: 12345 - cache_discount: 0.0002 + cache_discount: null cancelled: false created_at: '2024-07-15T23:33:19.433273+00:00' external_user: user-123 finish_reason: stop generation_time: 1200 - http_referer: null + http_referer: https://openrouter.ai/ id: gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG is_byok: false latency: 1250 @@ -14646,7 +20757,8 @@ paths: provider_name: Infermatic provider_responses: null request_id: req-1727282430-aBcDeFgHiJkLmNoPqRsT - router: null + router: openrouter/auto + session_id: null streamed: true tokens_completion: 25 tokens_prompt: 10 @@ -14654,248 +20766,9 @@ paths: upstream_id: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 upstream_inference_cost: 0.0012 usage: 0.0015 - user_agent: null + user_agent: Mozilla/5.0 schema: - description: Generation response - properties: - data: - description: Generation data - properties: - api_type: - description: Type of API used for the generation - enum: - - completions - - embeddings - - rerank - - video - - null - nullable: true - type: string - x-speakeasy-unknown-values: allow - app_id: - description: ID of the app that made the request - example: 12345 - nullable: true - type: integer - cache_discount: - description: Discount applied due to caching - example: 0.0002 - format: double - nullable: true - type: number - cancelled: - description: Whether the generation was cancelled - example: false - nullable: true - type: boolean - created_at: - description: ISO 8601 timestamp of when the generation was created - example: '2024-07-15T23:33:19.433273+00:00' - type: string - external_user: - description: External user identifier - example: user-123 - nullable: true - type: string - finish_reason: - description: Reason the generation finished - example: stop - nullable: true - type: string - generation_time: - description: Time taken for generation in milliseconds - example: 1200 - format: double - nullable: true - type: number - http_referer: - description: Referer header from the request - nullable: true - type: string - id: - description: Unique identifier for the generation - example: gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG - type: string - is_byok: - description: Whether this used bring-your-own-key - example: false - type: boolean - latency: - description: Total latency in milliseconds - example: 1250 - format: double - nullable: true - type: number - model: - description: Model used for the generation - example: sao10k/l3-stheno-8b - type: string - moderation_latency: - description: Moderation latency in milliseconds - example: 50 - format: double - nullable: true - type: number - native_finish_reason: - description: Native finish reason as reported by provider - example: stop - nullable: true - type: string - native_tokens_cached: - description: Native cached tokens as reported by provider - example: 3 - nullable: true - type: integer - native_tokens_completion: - description: Native completion tokens as reported by provider - example: 25 - nullable: true - type: integer - native_tokens_completion_images: - description: Native completion image tokens as reported by provider - example: 0 - nullable: true - type: integer - native_tokens_prompt: - description: Native prompt tokens as reported by provider - example: 10 - nullable: true - type: integer - native_tokens_reasoning: - description: Native reasoning tokens as reported by provider - example: 5 - nullable: true - type: integer - num_input_audio_prompt: - description: Number of audio inputs in the prompt - example: 0 - nullable: true - type: integer - num_media_completion: - description: Number of media items in the completion - example: 0 - nullable: true - type: integer - num_media_prompt: - description: Number of media items in the prompt - example: 1 - nullable: true - type: integer - num_search_results: - description: Number of search results included - example: 5 - nullable: true - type: integer - origin: - description: Origin URL of the request - example: https://openrouter.ai/ - type: string - provider_name: - description: Name of the provider that served the request - example: Infermatic - nullable: true - type: string - provider_responses: - description: List of provider responses for this generation, including fallback attempts - items: - $ref: '#/components/schemas/ProviderResponse' - nullable: true - type: array - request_id: - description: Unique identifier grouping all generations from a single API request - example: req-1727282430-aBcDeFgHiJkLmNoPqRsT - nullable: true - type: string - router: - description: Router used for the request (e.g., openrouter/auto) - example: openrouter/auto - nullable: true - type: string - session_id: - description: Session identifier grouping multiple generations in the same session - nullable: true - type: string - streamed: - description: Whether the response was streamed - example: true - nullable: true - type: boolean - tokens_completion: - description: Number of tokens in the completion - example: 25 - nullable: true - type: integer - tokens_prompt: - description: Number of tokens in the prompt - example: 10 - nullable: true - type: integer - total_cost: - description: Total cost of the generation in USD - example: 0.0015 - format: double - type: number - upstream_id: - description: Upstream provider's identifier for this generation - example: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 - nullable: true - type: string - upstream_inference_cost: - description: Cost charged by the upstream provider - example: 0.0012 - format: double - nullable: true - type: number - usage: - description: Usage amount in USD - example: 0.0015 - format: double - type: number - user_agent: - description: User-Agent header from the request - nullable: true - type: string - required: - - id - - upstream_id - - total_cost - - cache_discount - - upstream_inference_cost - - created_at - - model - - app_id - - streamed - - cancelled - - provider_name - - latency - - moderation_latency - - generation_time - - finish_reason - - tokens_prompt - - tokens_completion - - native_tokens_prompt - - native_tokens_completion - - native_tokens_completion_images - - native_tokens_reasoning - - native_tokens_cached - - num_media_prompt - - num_input_audio_prompt - - num_media_completion - - num_search_results - - origin - - usage - - is_byok - - native_finish_reason - - external_user - - api_type - - router - - provider_responses - - user_agent - - http_referer - type: object - required: - - data - type: object + $ref: '#/components/schemas/GenerationResponse' description: Returns the request metadata for this generation '401': content: @@ -14984,6 +20857,122 @@ paths: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" + /generation/content: + get: + operationId: listGenerationContent + parameters: + - description: The generation ID + in: query + name: id + required: true + schema: + description: The generation ID + example: gen-1234567890 + minLength: 1 + type: string + responses: + '200': + content: + application/json: + example: + data: + input: + messages: + - content: What is the meaning of life? + role: user + output: + completion: The meaning of life is a philosophical question... + reasoning: null + schema: + $ref: '#/components/schemas/GenerationContentResponse' + description: Returns the stored prompt and completion content + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '403': + content: + application/json: + example: + error: + code: 403 + message: Only management keys can perform this operation + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + '502': + content: + application/json: + example: + error: + code: 502 + message: Provider returned error + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: Bad Gateway - Provider/upstream API failure + '524': + content: + application/json: + example: + error: + code: 524 + message: Request timed out. Please try again later. + schema: + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + description: Infrastructure Timeout - Provider request timed out at edge network + '529': + content: + application/json: + example: + error: + code: 529 + message: Provider returned error + schema: + $ref: '#/components/schemas/ProviderOverloadedResponse' + description: Provider Overloaded - Provider is temporarily overloaded + summary: Get stored prompt and completion content for a generation + tags: + - Generations + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails: get: description: >- @@ -15010,6 +20999,15 @@ paths: maximum: 100 minimum: 1 type: integer + - description: Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned. + in: query + name: workspace_id + required: false + schema: + description: Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned. + example: 0df9e665-d932-5740-b2c7-b52af166bc11 + format: uuid + type: string responses: '200': content: @@ -15031,6 +21029,7 @@ paths: name: Production Guardrail reset_interval: monthly updated_at: '2025-08-24T15:45:00Z' + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 total_count: 1 schema: $ref: '#/components/schemas/ListGuardrailsResponse' @@ -15084,7 +21083,10 @@ paths: - anthropic - deepseek description: A guardrail for limiting API usage - enforce_zdr: false + enforce_zdr_anthropic: true + enforce_zdr_google: false + enforce_zdr_openai: true + enforce_zdr_other: false ignored_models: null ignored_providers: null limit_usd: 50 @@ -15106,7 +21108,11 @@ paths: - google created_at: '2025-08-24T10:30:00Z' description: A guardrail for limiting API usage - enforce_zdr: false + enforce_zdr: null + enforce_zdr_anthropic: true + enforce_zdr_google: false + enforce_zdr_openai: true + enforce_zdr_other: false id: 550e8400-e29b-41d4-a716-446655440000 ignored_models: null ignored_providers: null @@ -15114,6 +21120,7 @@ paths: name: My New Guardrail reset_interval: monthly updated_at: null + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 schema: $ref: '#/components/schemas/CreateGuardrailResponse' description: Guardrail created successfully @@ -15137,6 +21144,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: Unauthorized - Authentication required or invalid credentials + '403': + content: + application/json: + example: + error: + code: 403 + message: Only management keys can perform this operation + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions '500': content: application/json: @@ -15246,6 +21263,7 @@ paths: name: Production Guardrail reset_interval: monthly updated_at: '2025-08-24T15:45:00Z' + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 schema: $ref: '#/components/schemas/GetGuardrailResponse' description: Guardrail details @@ -15318,7 +21336,11 @@ paths: - openai created_at: '2025-08-24T10:30:00Z' description: Updated description - enforce_zdr: true + enforce_zdr: null + enforce_zdr_anthropic: true + enforce_zdr_google: true + enforce_zdr_openai: true + enforce_zdr_other: true id: 550e8400-e29b-41d4-a716-446655440000 ignored_models: null ignored_providers: null @@ -15326,6 +21348,7 @@ paths: name: Updated Guardrail Name reset_interval: weekly updated_at: '2025-08-24T16:00:00Z' + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 schema: $ref: '#/components/schemas/UpdateGuardrailResponse' description: Guardrail updated successfully @@ -16333,6 +22356,15 @@ paths: minimum: 0 nullable: false type: integer + - description: Filter API keys by workspace ID. By default, keys in the default workspace are returned. + in: query + name: workspace_id + required: false + schema: + description: Filter API keys by workspace ID. By default, keys in the default workspace are returned. + example: 0df9e665-d932-5740-b2c7-b52af166bc11 + format: uuid + type: string responses: '200': content: @@ -16359,6 +22391,7 @@ paths: usage_daily: 25.5 usage_monthly: 25.5 usage_weekly: 25.5 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 schema: example: data: @@ -16382,6 +22415,7 @@ paths: usage_daily: 25.5 usage_monthly: 25.5 usage_weekly: 25.5 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 properties: data: description: List of API keys @@ -16407,6 +22441,7 @@ paths: usage_daily: 25.5 usage_monthly: 25.5 usage_weekly: 25.5 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 properties: byok_usage: description: Total external BYOK usage (in USD) for the API key @@ -16506,6 +22541,10 @@ paths: example: 25.5 format: double type: number + workspace_id: + description: The workspace ID this API key belongs to. + example: 0df9e665-d932-5740-b2c7-b52af166bc11 + type: string required: - hash - name @@ -16526,6 +22565,7 @@ paths: - created_at - updated_at - creator_user_id + - workspace_id type: object type: array required: @@ -16628,6 +22668,11 @@ paths: example: My New API Key minLength: 1 type: string + workspace_id: + description: The workspace to create the API key in. Defaults to the default workspace if not provided. + example: 0df9e665-d932-5740-b2c7-b52af166bc11 + format: uuid + type: string required: - name type: object @@ -16658,6 +22703,7 @@ paths: usage_daily: 0 usage_monthly: 0 usage_weekly: 0 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 key: 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 schema: example: @@ -16682,6 +22728,7 @@ paths: usage_daily: 0 usage_monthly: 0 usage_weekly: 0 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 key: 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 properties: data: @@ -16707,6 +22754,7 @@ paths: usage_daily: 25.5 usage_monthly: 25.5 usage_weekly: 25.5 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 properties: byok_usage: description: Total external BYOK usage (in USD) for the API key @@ -16806,6 +22854,10 @@ paths: example: 25.5 format: double type: number + workspace_id: + description: The workspace ID this API key belongs to. + example: 0df9e665-d932-5740-b2c7-b52af166bc11 + type: string required: - hash - name @@ -16826,6 +22878,7 @@ paths: - created_at - updated_at - creator_user_id + - workspace_id type: object key: description: The actual API key string (only shown once) @@ -16856,6 +22909,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: Unauthorized - Authentication required or invalid credentials + '403': + content: + application/json: + example: + error: + code: 403 + message: Only management keys can perform this operation + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions '429': content: application/json: @@ -16998,6 +23061,7 @@ paths: usage_daily: 25.5 usage_monthly: 25.5 usage_weekly: 25.5 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 schema: example: data: @@ -17021,6 +23085,7 @@ paths: usage_daily: 25.5 usage_monthly: 25.5 usage_weekly: 25.5 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 properties: data: description: The API key information @@ -17045,6 +23110,7 @@ paths: usage_daily: 25.5 usage_monthly: 25.5 usage_weekly: 25.5 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 properties: byok_usage: description: Total external BYOK usage (in USD) for the API key @@ -17144,6 +23210,10 @@ paths: example: 25.5 format: double type: number + workspace_id: + description: The workspace ID this API key belongs to. + example: 0df9e665-d932-5740-b2c7-b52af166bc11 + type: string required: - hash - name @@ -17164,6 +23234,7 @@ paths: - created_at - updated_at - creator_user_id + - workspace_id type: object required: - data @@ -17300,6 +23371,7 @@ paths: usage_daily: 25.5 usage_monthly: 25.5 usage_weekly: 25.5 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 schema: example: data: @@ -17323,6 +23395,7 @@ paths: usage_daily: 25.5 usage_monthly: 25.5 usage_weekly: 25.5 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 properties: data: description: The updated API key information @@ -17347,6 +23420,7 @@ paths: usage_daily: 25.5 usage_monthly: 25.5 usage_weekly: 25.5 + workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11 properties: byok_usage: description: Total external BYOK usage (in USD) for the API key @@ -17446,6 +23520,10 @@ paths: example: 25.5 format: double type: number + workspace_id: + description: The workspace ID this API key belongs to. + example: 0df9e665-d932-5740-b2c7-b52af166bc11 + type: string required: - hash - name @@ -17466,6 +23544,7 @@ paths: - created_at - updated_at - creator_user_id + - workspace_id type: object required: - data @@ -17534,6 +23613,14 @@ paths: description: >- Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking. operationId: createMessages + parameters: + - description: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. + example: enabled + in: header + name: X-OpenRouter-Experimental-Metadata + required: false + schema: + $ref: '#/components/schemas/MetadataLevel' requestBody: content: application/json: @@ -17574,15 +23661,7 @@ paths: type: content_block_delta event: content_block_delta schema: - properties: - data: - $ref: '#/components/schemas/MessagesStreamEvents' - event: - type: string - required: - - event - - data - type: object + $ref: '#/components/schemas/MessagesStreamingResponse' x-speakeasy-sse-sentinel: '[DONE]' description: Successful response '400': @@ -17610,14 +23689,52 @@ paths: '403': content: application/json: - example: - error: - message: Permission denied - type: permission_error - type: error + examples: + guardrail-blocked: + summary: Guardrail blocked the request + value: + error: + code: 403 + message: 'Request blocked: prompt injection patterns detected' + metadata: + patterns: + - ignore all previous instructions + openrouter_metadata: + attempt: 1 + endpoints: + available: + - model: openai/gpt-4o + provider: OpenAI + selected: false + total: 1 + is_byok: false + pipeline: + - data: + action: blocked + detected: true + engines: + - regex + patterns: + - ignore all previous instructions + guardrail_id: grd_abc123 + guardrail_scope: api-key + name: regex_pi_detection + summary: 'Blocked: prompt injection detected (1 pattern matched)' + type: guardrail + region: iad + requested: openai/gpt-4o + strategy: direct + summary: available=1 + insufficient-permissions: + summary: Insufficient permissions + value: + error: + code: 403 + message: Only management keys can perform this operation schema: - $ref: '#/components/schemas/MessagesErrorResponse' - description: Permission denied error + $ref: '#/components/schemas/ForbiddenResponse' + description: >- + Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details. '404': content: application/json: @@ -17762,6 +23879,7 @@ paths: - temperature - top_p - max_tokens + supported_voices: null top_provider: context_length: 8192 is_moderated: true @@ -18012,6 +24130,7 @@ paths: - temperature - top_p - max_tokens + supported_voices: null top_provider: context_length: 8192 is_moderated: true @@ -18059,6 +24178,182 @@ paths: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" + /observability/destinations: + get: + description: >- + List the observability destinations configured for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace. Only destinations with stable release status are surfaced — destinations of other types are excluded. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: listObservabilityDestinations + parameters: + - description: Number of records to skip for pagination + in: query + name: offset + required: false + schema: + description: Number of records to skip for pagination + example: 0 + minimum: 0 + nullable: false + type: integer + - description: Maximum number of records to return (max 100) + in: query + name: limit + required: false + schema: + description: Maximum number of records to return (max 100) + example: 50 + maximum: 100 + minimum: 1 + type: integer + - description: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace. + in: query + name: workspace_id + required: false + schema: + description: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace. + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string + responses: + '200': + content: + application/json: + example: + data: + - api_key_hashes: null + config: + baseUrl: https://us.cloud.langfuse.com + publicKey: pk-l...EfGh + secretKey: sk-l...AbCd + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Langfuse + privacy_mode: false + sampling_rate: 1 + type: langfuse + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + total_count: 1 + schema: + $ref: '#/components/schemas/ListObservabilityDestinationsResponse' + description: List of observability destinations + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: List observability destinations + tags: + - Observability + x-speakeasy-name-override: list + x-speakeasy-pagination: + inputs: + - in: parameters + name: offset + type: offset + - in: parameters + name: limit + type: limit + outputs: + results: $.data + type: offsetLimit + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /observability/destinations/{id}: + get: + description: >- + Fetch a single observability destination by its UUID. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: getObservabilityDestination + parameters: + - description: The destination ID (UUID). + in: path + name: id + required: true + schema: + description: The destination ID (UUID). + example: 99999999-aaaa-bbbb-cccc-dddddddddddd + format: uuid + type: string + responses: + '200': + content: + application/json: + example: + data: + api_key_hashes: null + config: + baseUrl: https://us.cloud.langfuse.com + publicKey: pk-l...EfGh + secretKey: sk-l...AbCd + created_at: '2025-08-24T10:30:00Z' + enabled: true + filter_rules: null + id: 99999999-aaaa-bbbb-cccc-dddddddddddd + name: Production Langfuse + privacy_mode: false + sampling_rate: 1 + type: langfuse + updated_at: '2025-08-24T15:45:00Z' + workspace_id: 550e8400-e29b-41d4-a716-446655440000 + schema: + $ref: '#/components/schemas/GetObservabilityDestinationResponse' + description: The observability destination + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: Get an observability destination + tags: + - Observability + x-speakeasy-name-override: get + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /organization/members: get: description: >- @@ -18780,15 +25075,674 @@ paths: nullable: true type: string required: - - name - - slug - - privacy_policy_url + - name + - slug + - privacy_policy_url + type: object + type: array + required: + - data + type: object + description: Returns a list of providers + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: List all providers + tags: + - Providers + x-speakeasy-name-override: list + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /rerank: + post: + description: Submits a rerank request to the rerank router + operationId: createRerank + requestBody: + content: + application/json: + schema: + description: Rerank request input + example: + documents: + - Paris is the capital of France. + - Berlin is the capital of Germany. + model: cohere/rerank-v3.5 + query: What is the capital of France? + top_n: 3 + properties: + documents: + description: The list of documents to rerank + example: + - Paris is the capital of France. + - Berlin is the capital of Germany. + items: + type: string + type: array + model: + description: The rerank model to use + example: cohere/rerank-v3.5 + type: string + provider: + allOf: + - $ref: '#/components/schemas/ProviderPreferences' + - description: Provider routing preferences for the request. + query: + description: The search query to rerank documents against + example: What is the capital of France? + type: string + top_n: + description: Number of most relevant documents to return + example: 3 + minimum: 1 + type: integer + required: + - model + - query + - documents + type: object + required: true + responses: + '200': + content: + application/json: + schema: + description: Rerank response containing ranked results + example: + id: gen-rerank-1234567890-abc + model: cohere/rerank-v3.5 + results: + - document: + text: Paris is the capital of France. + index: 0 + relevance_score: 0.98 + usage: + search_units: 1 + total_tokens: 150 + properties: + id: + description: Unique identifier for the rerank response (ORID format) + example: gen-rerank-1234567890-abc + type: string + model: + description: The model used for reranking + example: cohere/rerank-v3.5 + type: string + provider: + description: The provider that served the rerank request + example: Cohere + type: string + results: + description: List of rerank results sorted by relevance + example: + - document: + text: Paris is the capital of France. + index: 0 + relevance_score: 0.98 + items: + description: A single rerank result + example: + document: + text: Paris is the capital of France. + index: 0 + relevance_score: 0.98 + properties: + document: + description: The document object containing the original text + properties: + text: + description: The document text + example: Paris is the capital of France. + type: string + required: + - text + type: object + index: + description: Index of the document in the original input list + example: 0 + type: integer + relevance_score: + description: Relevance score of the document to the query + example: 0.98 + format: double + type: number + required: + - index + - relevance_score + - document type: object type: array + usage: + description: Usage statistics + example: + search_units: 1 + total_tokens: 150 + properties: + cost: + description: Cost of the request in credits + example: 0.001 + format: double + type: number + search_units: + description: Number of search units consumed (Cohere billing) + example: 1 + type: integer + total_tokens: + description: Total number of tokens used + example: 150 + type: integer + type: object required: - - data + - model + - results type: object - description: Returns a list of providers + text/event-stream: + example: 'data: [DONE]' + schema: + description: Not used for rerank - rerank does not support streaming + type: string + x-speakeasy-sse-sentinel: '[DONE]' + description: Rerank response + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '402': + content: + application/json: + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits + schema: + $ref: '#/components/schemas/PaymentRequiredResponse' + description: Payment Required - Insufficient credits or quota to complete request + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + '502': + content: + application/json: + example: + error: + code: 502 + message: Provider returned error + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: Bad Gateway - Provider/upstream API failure + '503': + content: + application/json: + example: + error: + code: 503 + message: Service temporarily unavailable + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: Service Unavailable - Service temporarily unavailable + '524': + content: + application/json: + example: + error: + code: 524 + message: Request timed out. Please try again later. + schema: + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + description: Infrastructure Timeout - Provider request timed out at edge network + '529': + content: + application/json: + example: + error: + code: 529 + message: Provider returned error + schema: + $ref: '#/components/schemas/ProviderOverloadedResponse' + description: Provider Overloaded - Provider is temporarily overloaded + summary: Submit a rerank request + tags: + - Rerank + x-speakeasy-name-override: rerank + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /responses: + post: + description: Creates a streaming or non-streaming response using OpenResponses API format + operationId: createResponses + parameters: + - description: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. + example: enabled + in: header + name: X-OpenRouter-Experimental-Metadata + required: false + schema: + $ref: '#/components/schemas/MetadataLevel' + requestBody: + content: + application/json: + example: + input: Tell me a joke + model: openai/gpt-4o + schema: + $ref: '#/components/schemas/ResponsesRequest' + required: true + responses: + '200': + content: + application/json: + example: + created_at: 1700000000 + id: resp_abc123 + model: openai/gpt-4o + object: response + output: + - content: + - text: Why did the chicken cross the road? To get to the other side! + type: output_text + role: assistant + type: message + status: completed + usage: + completion_tokens: 20 + prompt_tokens: 10 + total_tokens: 30 + schema: + $ref: '#/components/schemas/OpenResponsesResult' + text/event-stream: + example: + data: + delta: Hello + type: response.output_text.delta + schema: + $ref: '#/components/schemas/ResponsesStreamingResponse' + x-speakeasy-sse-sentinel: '[DONE]' + description: Successful response + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '402': + content: + application/json: + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits + schema: + $ref: '#/components/schemas/PaymentRequiredResponse' + description: Payment Required - Insufficient credits or quota to complete request + '403': + content: + application/json: + examples: + guardrail-blocked: + summary: Guardrail blocked the request + value: + error: + code: 403 + message: 'Request blocked: prompt injection patterns detected' + metadata: + patterns: + - ignore all previous instructions + openrouter_metadata: + attempt: 1 + endpoints: + available: + - model: openai/gpt-4o + provider: OpenAI + selected: false + total: 1 + is_byok: false + pipeline: + - data: + action: blocked + detected: true + engines: + - regex + patterns: + - ignore all previous instructions + guardrail_id: grd_abc123 + guardrail_scope: api-key + name: regex_pi_detection + summary: 'Blocked: prompt injection detected (1 pattern matched)' + type: guardrail + region: iad + requested: openai/gpt-4o + strategy: direct + summary: available=1 + insufficient-permissions: + summary: Insufficient permissions + value: + error: + code: 403 + message: Only management keys can perform this operation + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: >- + Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details. + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '408': + content: + application/json: + example: + error: + code: 408 + message: Operation timed out. Please try again later. + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: Request Timeout - Operation exceeded time limit + '413': + content: + application/json: + example: + error: + code: 413 + message: Request payload too large + schema: + $ref: '#/components/schemas/PayloadTooLargeResponse' + description: Payload Too Large - Request payload exceeds size limits + '422': + content: + application/json: + example: + error: + code: 422 + message: Invalid argument + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + description: Unprocessable Entity - Semantic validation failure + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + '502': + content: + application/json: + example: + error: + code: 502 + message: Provider returned error + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: Bad Gateway - Provider/upstream API failure + '503': + content: + application/json: + example: + error: + code: 503 + message: Service temporarily unavailable + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: Service Unavailable - Service temporarily unavailable + '524': + content: + application/json: + example: + error: + code: 524 + message: Request timed out. Please try again later. + schema: + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + description: Infrastructure Timeout - Provider request timed out at edge network + '529': + content: + application/json: + example: + error: + code: 529 + message: Provider returned error + schema: + $ref: '#/components/schemas/ProviderOverloadedResponse' + description: Provider Overloaded - Provider is temporarily overloaded + summary: Create a response + tags: + - beta.responses + x-speakeasy-name-override: send + x-speakeasy-stream-request-field: stream + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /videos: + post: + description: Submits a video generation request and returns a polling URL to check status + operationId: createVideos + requestBody: + content: + application/json: + example: + aspect_ratio: '16:9' + duration: 8 + model: google/veo-3.1 + prompt: A serene mountain landscape at sunset + resolution: 720p + schema: + $ref: '#/components/schemas/VideoGenerationRequest' + required: true + responses: + '202': + content: + application/json: + example: + generation_id: gen-xyz789 + id: job-abc123 + polling_url: /api/v1/videos/job-abc123 + status: pending + schema: + $ref: '#/components/schemas/VideoGenerationResponse' + description: Video generation request accepted + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '402': + content: + application/json: + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits + schema: + $ref: '#/components/schemas/PaymentRequiredResponse' + description: Payment Required - Insufficient credits or quota to complete request + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: Submit a video generation request + tags: + - Video Generation + x-speakeasy-name-override: generate + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /videos/{jobId}: + get: + description: Returns job status and content URLs when completed + operationId: getVideos + parameters: + - in: path + name: jobId + required: true + schema: + example: job-abc123 + minLength: 1 + type: string + responses: + '200': + content: + application/json: + example: + generation_id: gen-xyz789 + id: job-abc123 + polling_url: /api/v1/videos/job-abc123 + status: completed + unsigned_urls: + - https://storage.example.com/video.mp4 + usage: + cost: 0.5 + schema: + $ref: '#/components/schemas/VideoGenerationResponse' + description: Video generation status + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist '500': content: application/json: @@ -18799,163 +25753,44 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - summary: List all providers + summary: Poll video generation status tags: - - Providers - x-speakeasy-name-override: list + - Video Generation + x-speakeasy-name-override: getGeneration parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /rerank: - post: - description: Submits a rerank request to the rerank router - operationId: createRerank - requestBody: - content: - application/json: - schema: - description: Rerank request input - example: - documents: - - Paris is the capital of France. - - Berlin is the capital of Germany. - model: cohere/rerank-v3.5 - query: What is the capital of France? - top_n: 3 - properties: - documents: - description: The list of documents to rerank - example: - - Paris is the capital of France. - - Berlin is the capital of Germany. - items: - type: string - type: array - model: - description: The rerank model to use - example: cohere/rerank-v3.5 - type: string - provider: - allOf: - - $ref: '#/components/schemas/ProviderPreferences' - - description: Provider routing preferences for the request. - query: - description: The search query to rerank documents against - example: What is the capital of France? - type: string - top_n: - description: Number of most relevant documents to return - example: 3 - minimum: 1 - type: integer - required: - - model - - query - - documents - type: object - required: true + /videos/{jobId}/content: + get: + description: Streams the generated video content from the upstream provider + operationId: listVideosContent + parameters: + - in: path + name: jobId + required: true + schema: + example: job-abc123 + minLength: 1 + type: string + - in: query + name: index + required: false + schema: + default: 0 + example: 0 + minimum: 0 + nullable: true + type: integer responses: '200': content: - application/json: - schema: - description: Rerank response containing ranked results - example: - id: gen-rerank-1234567890-abc - model: cohere/rerank-v3.5 - results: - - document: - text: Paris is the capital of France. - index: 0 - relevance_score: 0.98 - usage: - search_units: 1 - total_tokens: 150 - properties: - id: - description: Unique identifier for the rerank response (ORID format) - example: gen-rerank-1234567890-abc - type: string - model: - description: The model used for reranking - example: cohere/rerank-v3.5 - type: string - provider: - description: The provider that served the rerank request - example: Cohere - type: string - results: - description: List of rerank results sorted by relevance - example: - - document: - text: Paris is the capital of France. - index: 0 - relevance_score: 0.98 - items: - description: A single rerank result - example: - document: - text: Paris is the capital of France. - index: 0 - relevance_score: 0.98 - properties: - document: - description: The document object containing the original text - properties: - text: - description: The document text - example: Paris is the capital of France. - type: string - required: - - text - type: object - index: - description: Index of the document in the original input list - example: 0 - type: integer - relevance_score: - description: Relevance score of the document to the query - example: 0.98 - format: double - type: number - required: - - index - - relevance_score - - document - type: object - type: array - usage: - description: Usage statistics - example: - search_units: 1 - total_tokens: 150 - properties: - cost: - description: Cost of the request in credits - example: 0.001 - format: double - type: number - search_units: - description: Number of search units consumed (Cohere billing) - example: 1 - type: integer - total_tokens: - description: Total number of tokens used - example: 150 - type: integer - type: object - required: - - model - - results - type: object - text/event-stream: - example: 'data: [DONE]' + application/octet-stream: + example: schema: - description: Not used for rerank - rerank does not support streaming + format: binary type: string - x-speakeasy-sse-sentinel: '[DONE]' - description: Rerank response + description: Video content stream '400': content: application/json: @@ -18976,16 +25811,6 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: Unauthorized - Authentication required or invalid credentials - '402': - content: - application/json: - example: - error: - code: 402 - message: Insufficient credits. Add more using https://openrouter.ai/credits - schema: - $ref: '#/components/schemas/PaymentRequiredResponse' - description: Payment Required - Insufficient credits or quota to complete request '404': content: application/json: @@ -18996,16 +25821,78 @@ paths: schema: $ref: '#/components/schemas/NotFoundResponse' description: Not Found - Resource does not exist - '429': + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + '502': + content: + application/json: + example: + error: + code: 502 + message: Provider returned error + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: Bad Gateway - Provider/upstream API failure + summary: Download generated video content + tags: + - Video Generation + x-speakeasy-name-override: getVideoContent + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /videos/models: + get: + description: Returns a list of all available video generation models and their properties + operationId: listVideosModels + responses: + '200': + content: + application/json: + example: + data: + - allowed_passthrough_parameters: [] + canonical_slug: google/veo-3.1 + created: 1700000000 + description: Google video generation model + generate_audio: true + id: google/veo-3.1 + name: Veo 3.1 + pricing_skus: + generate: '0.50' + seed: null + supported_aspect_ratios: + - '16:9' + supported_durations: + - 5 + - 8 + supported_frame_images: + - first_frame + - last_frame + supported_resolutions: + - 720p + supported_sizes: null + schema: + $ref: '#/components/schemas/VideoModelsListResponse' + description: Returns a list of video generation models + '400': content: application/json: example: error: - code: 429 - message: Rate limit exceeded + code: 400 + message: Invalid request parameters schema: - $ref: '#/components/schemas/TooManyRequestsResponse' - description: Too Many Requests - Rate limit exceeded + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input '500': content: application/json: @@ -19016,103 +25903,140 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - '502': - content: - application/json: - example: - error: - code: 502 - message: Provider returned error - schema: - $ref: '#/components/schemas/BadGatewayResponse' - description: Bad Gateway - Provider/upstream API failure - '503': + summary: List all video generation models + tags: + - Video Generation + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /workspaces: + get: + description: >- + List all workspaces for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: listWorkspaces + parameters: + - description: Number of records to skip for pagination + in: query + name: offset + required: false + schema: + description: Number of records to skip for pagination + example: 0 + minimum: 0 + nullable: false + type: integer + - description: Maximum number of records to return (max 100) + in: query + name: limit + required: false + schema: + description: Maximum number of records to return (max 100) + example: 50 + maximum: 100 + minimum: 1 + type: integer + responses: + '200': content: application/json: example: - error: - code: 503 - message: Service temporarily unavailable + data: + - created_at: '2025-08-24T10:30:00Z' + created_by: user_abc123 + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + id: 550e8400-e29b-41d4-a716-446655440000 + io_logging_api_key_ids: null + io_logging_sampling_rate: 1 + is_data_discount_logging_enabled: true + is_observability_broadcast_enabled: false + is_observability_io_logging_enabled: false + name: Production + slug: production + updated_at: '2025-08-24T15:45:00Z' + total_count: 1 schema: - $ref: '#/components/schemas/ServiceUnavailableResponse' - description: Service Unavailable - Service temporarily unavailable - '524': + $ref: '#/components/schemas/ListWorkspacesResponse' + description: List of workspaces + '401': content: application/json: example: error: - code: 524 - message: Request timed out. Please try again later. + code: 401 + message: Missing Authentication header schema: - $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' - description: Infrastructure Timeout - Provider request timed out at edge network - '529': + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '500': content: application/json: example: error: - code: 529 - message: Provider returned error + code: 500 + message: Internal Server Error schema: - $ref: '#/components/schemas/ProviderOverloadedResponse' - description: Provider Overloaded - Provider is temporarily overloaded - summary: Submit a rerank request + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: List workspaces tags: - - Rerank - x-speakeasy-name-override: rerank - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /responses: + - Workspaces + x-speakeasy-name-override: list + x-speakeasy-pagination: + inputs: + - in: parameters + name: offset + type: offset + - in: parameters + name: limit + type: limit + outputs: + results: $.data + type: offsetLimit post: - description: Creates a streaming or non-streaming response using OpenResponses API format - operationId: createResponses + description: >- + Create a new workspace for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: createWorkspace requestBody: content: application/json: example: - input: Tell me a joke - model: openai/gpt-4o + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + name: Production + slug: production schema: - $ref: '#/components/schemas/ResponsesRequest' + $ref: '#/components/schemas/CreateWorkspaceRequest' required: true responses: - '200': + '201': content: application/json: - example: - created_at: 1700000000 - id: resp_abc123 - model: openai/gpt-4o - object: response - output: - - content: - - text: Why did the chicken cross the road? To get to the other side! - type: output_text - role: assistant - type: message - status: completed - usage: - completion_tokens: 20 - prompt_tokens: 10 - total_tokens: 30 - schema: - $ref: '#/components/schemas/OpenResponsesResult' - text/event-stream: example: data: - delta: Hello - type: response.output_text.delta + created_at: '2025-08-24T10:30:00Z' + created_by: user_abc123 + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + id: 550e8400-e29b-41d4-a716-446655440000 + io_logging_api_key_ids: null + io_logging_sampling_rate: 1 + is_data_discount_logging_enabled: true + is_observability_broadcast_enabled: false + is_observability_io_logging_enabled: false + name: Production + slug: production + updated_at: null schema: - properties: - data: - $ref: '#/components/schemas/StreamEvents' - required: - - data - type: object - x-speakeasy-sse-sentinel: '[DONE]' - description: Successful response + $ref: '#/components/schemas/CreateWorkspaceResponse' + description: Workspace created successfully '400': content: application/json: @@ -19133,66 +26057,98 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: Unauthorized - Authentication required or invalid credentials - '402': + '403': content: application/json: example: error: - code: 402 - message: Insufficient credits. Add more using https://openrouter.ai/credits + code: 403 + message: Only management keys can perform this operation schema: - $ref: '#/components/schemas/PaymentRequiredResponse' - description: Payment Required - Insufficient credits or quota to complete request - '404': + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions + '500': content: application/json: example: error: - code: 404 - message: Resource not found + code: 500 + message: Internal Server Error schema: - $ref: '#/components/schemas/NotFoundResponse' - description: Not Found - Resource does not exist - '408': + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: Create a workspace + tags: + - Workspaces + x-speakeasy-name-override: create + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /workspaces/{id}: + delete: + description: >- + Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: deleteWorkspace + parameters: + - description: The workspace ID (UUID) or slug + in: path + name: id + required: true + schema: + description: The workspace ID (UUID) or slug + example: production + minLength: 1 + type: string + responses: + '200': + content: + application/json: + example: + deleted: true + schema: + $ref: '#/components/schemas/DeleteWorkspaceResponse' + description: Workspace deleted successfully + '400': content: application/json: example: error: - code: 408 - message: Operation timed out. Please try again later. + code: 400 + message: Invalid request parameters schema: - $ref: '#/components/schemas/RequestTimeoutResponse' - description: Request Timeout - Operation exceeded time limit - '413': + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': content: application/json: example: error: - code: 413 - message: Request payload too large + code: 401 + message: Missing Authentication header schema: - $ref: '#/components/schemas/PayloadTooLargeResponse' - description: Payload Too Large - Request payload exceeds size limits - '422': + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '403': content: application/json: example: error: - code: 422 - message: Invalid argument + code: 403 + message: Only management keys can perform this operation schema: - $ref: '#/components/schemas/UnprocessableEntityResponse' - description: Unprocessable Entity - Semantic validation failure - '429': + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions + '404': content: application/json: example: error: - code: 429 - message: Rate limit exceeded + code: 404 + message: Resource not found schema: - $ref: '#/components/schemas/TooManyRequestsResponse' - description: Too Many Requests - Rate limit exceeded + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist '500': content: application/json: @@ -19203,83 +26159,128 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - '502': + summary: Delete a workspace + tags: + - Workspaces + x-speakeasy-name-override: delete + get: + description: Get a single workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: getWorkspace + parameters: + - description: The workspace ID (UUID) or slug + in: path + name: id + required: true + schema: + description: The workspace ID (UUID) or slug + example: production + minLength: 1 + type: string + responses: + '200': content: application/json: example: - error: - code: 502 - message: Provider returned error + data: + created_at: '2025-08-24T10:30:00Z' + created_by: user_abc123 + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + id: 550e8400-e29b-41d4-a716-446655440000 + io_logging_api_key_ids: null + io_logging_sampling_rate: 1 + is_data_discount_logging_enabled: true + is_observability_broadcast_enabled: false + is_observability_io_logging_enabled: false + name: Production + slug: production + updated_at: '2025-08-24T15:45:00Z' schema: - $ref: '#/components/schemas/BadGatewayResponse' - description: Bad Gateway - Provider/upstream API failure - '503': + $ref: '#/components/schemas/GetWorkspaceResponse' + description: Workspace details + '401': content: application/json: example: error: - code: 503 - message: Service temporarily unavailable + code: 401 + message: Missing Authentication header schema: - $ref: '#/components/schemas/ServiceUnavailableResponse' - description: Service Unavailable - Service temporarily unavailable - '524': + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '404': content: application/json: example: error: - code: 524 - message: Request timed out. Please try again later. + code: 404 + message: Resource not found schema: - $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' - description: Infrastructure Timeout - Provider request timed out at edge network - '529': + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '500': content: application/json: example: error: - code: 529 - message: Provider returned error + code: 500 + message: Internal Server Error schema: - $ref: '#/components/schemas/ProviderOverloadedResponse' - description: Provider Overloaded - Provider is temporarily overloaded - summary: Create a response + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: Get a workspace tags: - - beta.responses - x-speakeasy-name-override: send - x-speakeasy-stream-request-field: stream - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /videos: - post: - description: Submits a video generation request and returns a polling URL to check status - operationId: createVideos + - Workspaces + x-speakeasy-name-override: get + patch: + description: >- + Update an existing workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: updateWorkspace + parameters: + - description: The workspace ID (UUID) or slug + in: path + name: id + required: true + schema: + description: The workspace ID (UUID) or slug + example: production + minLength: 1 + type: string requestBody: content: application/json: example: - aspect_ratio: '16:9' - duration: 8 - model: google/veo-3.1 - prompt: A serene mountain landscape at sunset - resolution: 720p + name: Updated Workspace + slug: updated-workspace schema: - $ref: '#/components/schemas/VideoGenerationRequest' + $ref: '#/components/schemas/UpdateWorkspaceRequest' required: true responses: - '202': + '200': content: application/json: example: - generation_id: gen-xyz789 - id: job-abc123 - polling_url: /api/v1/videos/job-abc123 - status: pending + data: + created_at: '2025-08-24T10:30:00Z' + created_by: user_abc123 + default_image_model: openai/dall-e-3 + default_provider_sort: price + default_text_model: openai/gpt-4o + description: Production environment workspace + id: 550e8400-e29b-41d4-a716-446655440000 + io_logging_api_key_ids: null + io_logging_sampling_rate: 1 + is_data_discount_logging_enabled: true + is_observability_broadcast_enabled: false + is_observability_io_logging_enabled: false + name: Updated Workspace + slug: updated-workspace + updated_at: '2025-08-25T10:00:00Z' schema: - $ref: '#/components/schemas/VideoGenerationResponse' - description: Video generation request accepted + $ref: '#/components/schemas/UpdateWorkspaceResponse' + description: Workspace updated successfully '400': content: application/json: @@ -19300,16 +26301,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: Unauthorized - Authentication required or invalid credentials - '402': + '403': content: application/json: example: error: - code: 402 - message: Insufficient credits. Add more using https://openrouter.ai/credits + code: 403 + message: Only management keys can perform this operation schema: - $ref: '#/components/schemas/PaymentRequiredResponse' - description: Payment Required - Insufficient credits or quota to complete request + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions '404': content: application/json: @@ -19320,16 +26321,6 @@ paths: schema: $ref: '#/components/schemas/NotFoundResponse' description: Not Found - Resource does not exist - '429': - content: - application/json: - example: - error: - code: 429 - message: Rate limit exceeded - schema: - $ref: '#/components/schemas/TooManyRequestsResponse' - description: Too Many Requests - Rate limit exceeded '500': content: application/json: @@ -19340,42 +26331,64 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - summary: Submit a video generation request + summary: Update a workspace tags: - - Video Generation - x-speakeasy-name-override: generate + - Workspaces + x-speakeasy-name-override: update parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /videos/{jobId}: - get: - description: Returns job status and content URLs when completed - operationId: getVideos + /workspaces/{id}/members/add: + post: + description: >- + Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: bulkAddWorkspaceMembers parameters: - - in: path - name: jobId + - description: The workspace ID (UUID) or slug + in: path + name: id required: true schema: - example: job-abc123 + description: The workspace ID (UUID) or slug + example: production minLength: 1 type: string + requestBody: + content: + application/json: + example: + user_ids: + - user_abc123 + - user_def456 + schema: + $ref: '#/components/schemas/BulkAddWorkspaceMembersRequest' + required: true responses: '200': content: application/json: example: - generation_id: gen-xyz789 - id: job-abc123 - polling_url: /api/v1/videos/job-abc123 - status: complete - unsigned_urls: - - https://storage.example.com/video.mp4 - usage: - cost: 0.5 + added_count: 1 + data: + - created_at: '2025-08-24T10:30:00Z' + id: 660e8400-e29b-41d4-a716-446655440000 + role: member + user_id: user_abc123 + workspace_id: 550e8400-e29b-41d4-a716-446655440000 schema: - $ref: '#/components/schemas/VideoGenerationResponse' - description: Video generation status + $ref: '#/components/schemas/BulkAddWorkspaceMembersResponse' + description: Members added successfully + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input '401': content: application/json: @@ -19386,6 +26399,16 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: Unauthorized - Authentication required or invalid credentials + '403': + content: + application/json: + example: + error: + code: 403 + message: Only management keys can perform this operation + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions '404': content: application/json: @@ -19406,44 +26429,48 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - summary: Poll video generation status + summary: Bulk add members to a workspace tags: - - Video Generation - x-speakeasy-name-override: getGeneration + - Workspaces + x-speakeasy-name-override: bulkAddMembers parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /videos/{jobId}/content: - get: - description: Streams the generated video content from the upstream provider - operationId: listVideosContent + /workspaces/{id}/members/remove: + post: + description: >- + Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: bulkRemoveWorkspaceMembers parameters: - - in: path - name: jobId + - description: The workspace ID (UUID) or slug + in: path + name: id required: true schema: - example: job-abc123 + description: The workspace ID (UUID) or slug + example: production minLength: 1 type: string - - in: query - name: index - required: false - schema: - default: 0 - example: 0 - minimum: 0 - nullable: true - type: integer + requestBody: + content: + application/json: + example: + user_ids: + - user_abc123 + - user_def456 + schema: + $ref: '#/components/schemas/BulkRemoveWorkspaceMembersRequest' + required: true responses: '200': content: - application/octet-stream: - example: + application/json: + example: + removed_count: 2 schema: - format: binary - type: string - description: Video content stream + $ref: '#/components/schemas/BulkRemoveWorkspaceMembersResponse' + description: Members removed successfully '400': content: application/json: @@ -19464,88 +26491,26 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: Unauthorized - Authentication required or invalid credentials - '404': - content: - application/json: - example: - error: - code: 404 - message: Resource not found - schema: - $ref: '#/components/schemas/NotFoundResponse' - description: Not Found - Resource does not exist - '500': - content: - application/json: - example: - error: - code: 500 - message: Internal Server Error - schema: - $ref: '#/components/schemas/InternalServerResponse' - description: Internal Server Error - Unexpected server error - '502': + '403': content: application/json: example: error: - code: 502 - message: Provider returned error - schema: - $ref: '#/components/schemas/BadGatewayResponse' - description: Bad Gateway - Provider/upstream API failure - summary: Download generated video content - tags: - - Video Generation - x-speakeasy-name-override: getVideoContent - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /videos/models: - get: - description: Returns a list of all available video generation models and their properties - operationId: listVideosModels - responses: - '200': - content: - application/json: - example: - data: - - allowed_passthrough_parameters: [] - canonical_slug: google/veo-3.1 - created: 1700000000 - description: Google video generation model - generate_audio: true - id: google/veo-3.1 - name: Veo 3.1 - pricing_skus: - generate: '0.50' - seed: null - supported_aspect_ratios: - - '16:9' - supported_durations: - - 5 - - 8 - supported_frame_images: - - first_frame - - last_frame - supported_resolutions: - - 720p - supported_sizes: null + code: 403 + message: Only management keys can perform this operation schema: - $ref: '#/components/schemas/VideoModelsListResponse' - description: Returns a list of video generation models - '400': + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions + '404': content: application/json: example: error: - code: 400 - message: Invalid request parameters + code: 404 + message: Resource not found schema: - $ref: '#/components/schemas/BadRequestResponse' - description: Bad Request - Invalid request parameters or malformed input + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist '500': content: application/json: @@ -19556,9 +26521,10 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - summary: List all video generation models + summary: Bulk remove members from a workspace tags: - - Video Generation + - Workspaces + x-speakeasy-name-override: bulkRemoveMembers parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -19576,6 +26542,8 @@ tags: name: Analytics - description: Anthropic Messages endpoints name: Anthropic Messages + - description: BYOK endpoints + name: BYOK - description: Chat completion endpoints name: Chat - description: Credit management endpoints @@ -19592,17 +26560,26 @@ tags: name: Models - description: OAuth authentication endpoints name: OAuth + - description: Observability endpoints + name: Observability - description: Organization endpoints name: Organization - description: Provider information endpoints name: Providers - description: Rerank endpoints name: Rerank + - description: Speech-to-text endpoints + name: STT + x-displayName: Transcriptions + - description: Text-to-speech endpoints + name: TTS + x-displayName: Speech - description: Video Generation endpoints name: Video Generation + - description: Workspaces endpoints + name: Workspaces - description: beta.responses endpoints name: beta.responses -x-fern-base-path: / x-retry-strategy: initialDelay: 500 maxAttempts: 3 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index d4e0269..726d74d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,19 +2,20 @@ speakeasyVersion: 1.680.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:3982892b2b8f82bfc2a26a0f6fcc9512b665a1051dc240a9cfa29001b9453aa9 - sourceBlobDigest: sha256:727d3c1f7d36ffbf94c57b565536d8a16804eaef4c4043dd6c98152fc1629c8f + sourceRevisionDigest: sha256:5269a896dd6b307acbcbb16fc1f1d84981a4a33f3933e339253b2c3471d01e15 + sourceBlobDigest: sha256:b4d34a8a535384ebededc270a3835ff57110dc357ed6117908bf363b413da64f tags: - latest + - speakeasy-sdk-regen-1776991284 - 1.0.0 targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:3982892b2b8f82bfc2a26a0f6fcc9512b665a1051dc240a9cfa29001b9453aa9 - sourceBlobDigest: sha256:727d3c1f7d36ffbf94c57b565536d8a16804eaef4c4043dd6c98152fc1629c8f + sourceRevisionDigest: sha256:5269a896dd6b307acbcbb16fc1f1d84981a4a33f3933e339253b2c3471d01e15 + sourceBlobDigest: sha256:b4d34a8a535384ebededc270a3835ff57110dc357ed6117908bf363b413da64f codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:db86aed74d199f265e2e20442ef652dac0911c8a657ccb3e6614d56a26b8b44e + codeSamplesRevisionDigest: sha256:bb9def46512056f767853b8320671ff4ac6ad495a4c834c6b039d7acc3dff273 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.680.0 diff --git a/README-PYPI.md b/README-PYPI.md index 5f7e784..eb6cb3e 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -169,6 +169,36 @@ asyncio.run(main()) + +## Pagination + +Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the +returned response object will have a `Next` method that can be called to pull down the next group of results. If the +return value of `Next` is `None`, then there are no more pages to be fetched. + +Here's an example of one such pagination call: +```python +from openrouter import OpenRouter +import os + + +with OpenRouter( + http_referer="", + x_open_router_title="", + x_open_router_categories="", + api_key=os.getenv("OPENROUTER_API_KEY", ""), +) as open_router: + + res = open_router.byok.list() + + while res is not None: + # Handle items + + res = res.next() + +``` + + ## Resource Management diff --git a/README.md b/README.md index 35f11f1..eb6cb3e 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ with OpenRouter( api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: - res = open_router.guardrails.list() + res = open_router.byok.list() while res is not None: # Handle items diff --git a/RELEASES.md b/RELEASES.md index 0d0d01f..3a3cf84 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -8,4 +8,14 @@ Based on: ### Generated - [python v0.0.16] . ### Releases -- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - . \ No newline at end of file +- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - . + +## 2026-05-17 00:48:28 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.9.2] . +### Releases +- [PyPI v0.9.2] https://pypi.org/project/openrouter/0.9.2 - . \ No newline at end of file diff --git a/docs/components/costdetails.md b/docs/components/costdetails.md index ada009c..58a1aa8 100644 --- a/docs/components/costdetails.md +++ b/docs/components/costdetails.md @@ -1,10 +1,12 @@ # CostDetails +Breakdown of upstream inference costs + ## Fields -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `upstream_inference_input_cost` | *float* | :heavy_check_mark: | N/A | -| `upstream_inference_output_cost` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `upstream_inference_completions_cost` | *float* | :heavy_check_mark: | N/A | +| `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `upstream_inference_prompt_cost` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/data.md b/docs/components/data.md deleted file mode 100644 index 386321b..0000000 --- a/docs/components/data.md +++ /dev/null @@ -1,10 +0,0 @@ -# Data - -Model count data - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `count` | *int* | :heavy_check_mark: | Total number of available models | 150 | \ No newline at end of file diff --git a/docs/components/model.md b/docs/components/model.md index 106eb5c..55f6fe4 100644 --- a/docs/components/model.md +++ b/docs/components/model.md @@ -22,4 +22,5 @@ Information about an AI model available on OpenRouter | `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {
"completion_tokens": 1000,
"prompt_tokens": 1000
} | | `pricing` | [components.PublicPricing](../components/publicpricing.md) | :heavy_check_mark: | Pricing information for the model | {
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
} | | `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | | +| `supported_voices` | List[*str*] | :heavy_check_mark: | List of supported voice identifiers for TTS models. Null for non-TTS models. | | | `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
} | \ No newline at end of file diff --git a/docs/components/modelscountresponse.md b/docs/components/modelscountresponse.md index 84bbce8..4ad6e6a 100644 --- a/docs/components/modelscountresponse.md +++ b/docs/components/modelscountresponse.md @@ -5,6 +5,6 @@ Model count data ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `data` | [components.Data](../components/data.md) | :heavy_check_mark: | Model count data | {
"count": 150
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `data` | [components.ModelsCountResponseData](../components/modelscountresponsedata.md) | :heavy_check_mark: | Model count data | {
"count": 150
} | \ No newline at end of file diff --git a/docs/components/modelslistresponse.md b/docs/components/modelslistresponse.md index fb5d458..04b43f5 100644 --- a/docs/components/modelslistresponse.md +++ b/docs/components/modelslistresponse.md @@ -5,6 +5,6 @@ List of available models ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | List[[components.Model](../components/model.md)] | :heavy_check_mark: | List of available models | [
{
"architecture": {
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"expiration_date": null,
"id": "openai/gpt-4",
"knowledge_cutoff": null,
"links": {
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": {
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"top_provider": {
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `data` | List[[components.Model](../components/model.md)] | :heavy_check_mark: | List of available models | [
{
"architecture": {
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"expiration_date": null,
"id": "openai/gpt-4",
"knowledge_cutoff": null,
"links": {
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": {
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"supported_voices": null,
"top_provider": {
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
] | \ No newline at end of file diff --git a/docs/components/openairesponsestoolchoiceunion.md b/docs/components/openairesponsestoolchoiceunion.md index 7e503bb..15e1482 100644 --- a/docs/components/openairesponsestoolchoiceunion.md +++ b/docs/components/openairesponsestoolchoiceunion.md @@ -39,3 +39,15 @@ value: components.OpenAIResponsesToolChoice = /* values here */ value: components.ToolChoiceAllowed = /* values here */ ``` +### `components.OpenAIResponsesToolChoiceApplyPatch` + +```python +value: components.OpenAIResponsesToolChoiceApplyPatch = /* values here */ +``` + +### `components.OpenAIResponsesToolChoiceShell` + +```python +value: components.OpenAIResponsesToolChoiceShell = /* values here */ +``` + diff --git a/docs/components/outputmodality.md b/docs/components/outputmodality.md index 7b8edcf..2e0633e 100644 --- a/docs/components/outputmodality.md +++ b/docs/components/outputmodality.md @@ -3,11 +3,13 @@ ## Values -| Name | Value | -| ------------ | ------------ | -| `TEXT` | text | -| `IMAGE` | image | -| `EMBEDDINGS` | embeddings | -| `AUDIO` | audio | -| `VIDEO` | video | -| `RERANK` | rerank | \ No newline at end of file +| Name | Value | +| --------------- | --------------- | +| `TEXT` | text | +| `IMAGE` | image | +| `EMBEDDINGS` | embeddings | +| `AUDIO` | audio | +| `VIDEO` | video | +| `RERANK` | rerank | +| `SPEECH` | speech | +| `TRANSCRIPTION` | transcription | \ No newline at end of file diff --git a/docs/components/providername.md b/docs/components/providername.md index 22effdd..dec1573 100644 --- a/docs/components/providername.md +++ b/docs/components/providername.md @@ -10,6 +10,7 @@ | `AION_LABS` | AionLabs | | `ALIBABA` | Alibaba | | `AMBIENT` | Ambient | +| `BAIDU` | Baidu | | `AMAZON_BEDROCK` | Amazon Bedrock | | `AMAZON_NOVA` | Amazon Nova | | `ANTHROPIC` | Anthropic | @@ -26,6 +27,7 @@ | `CLARIFAI` | Clarifai | | `CLOUDFLARE` | Cloudflare | | `COHERE` | Cohere | +| `CRUCIBLE` | Crucible | | `CRUSOE` | Crusoe | | `DEEP_INFRA` | DeepInfra | | `DEEP_SEEK` | DeepSeek | @@ -56,12 +58,15 @@ | `MORPH` | Morph | | `N_COMPASS` | NCompass | | `NEBIUS` | Nebius | +| `NEX_AGI` | Nex AGI | | `NEXT_BIT` | NextBit | | `NOVITA` | Novita | | `NVIDIA` | Nvidia | | `OPEN_AI` | OpenAI | | `OPEN_INFERENCE` | OpenInference | | `PARASAIL` | Parasail | +| `POOLSIDE` | Poolside | +| `PERCEPTRON` | Perceptron | | `PERPLEXITY` | Perplexity | | `PHALA` | Phala | | `RECRAFT` | Recraft | diff --git a/docs/errors/badgatewayresponseerror.md b/docs/errors/badgatewayresponseerror.md index 54c51b9..5bd359e 100644 --- a/docs/errors/badgatewayresponseerror.md +++ b/docs/errors/badgatewayresponseerror.md @@ -8,4 +8,5 @@ Bad Gateway - Provider/upstream API failure | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `error` | [components.BadGatewayResponseErrorData](../components/badgatewayresponseerrordata.md) | :heavy_check_mark: | Error data for BadGatewayResponse | {
"code": 502,
"message": "Provider returned error"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/badrequestresponseerror.md b/docs/errors/badrequestresponseerror.md index b7ca5ac..6bb5d84 100644 --- a/docs/errors/badrequestresponseerror.md +++ b/docs/errors/badrequestresponseerror.md @@ -8,4 +8,5 @@ Bad Request - Invalid request parameters or malformed input | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `error` | [components.BadRequestResponseErrorData](../components/badrequestresponseerrordata.md) | :heavy_check_mark: | Error data for BadRequestResponse | {
"code": 400,
"message": "Invalid request parameters"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/edgenetworktimeoutresponseerror.md b/docs/errors/edgenetworktimeoutresponseerror.md index b12eb06..3720bcc 100644 --- a/docs/errors/edgenetworktimeoutresponseerror.md +++ b/docs/errors/edgenetworktimeoutresponseerror.md @@ -8,4 +8,5 @@ Infrastructure Timeout - Provider request timed out at edge network | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `error` | [components.EdgeNetworkTimeoutResponseErrorData](../components/edgenetworktimeoutresponseerrordata.md) | :heavy_check_mark: | Error data for EdgeNetworkTimeoutResponse | {
"code": 524,
"message": "Request timed out. Please try again later."
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/forbiddenresponseerror.md b/docs/errors/forbiddenresponseerror.md index 290d3a4..8015439 100644 --- a/docs/errors/forbiddenresponseerror.md +++ b/docs/errors/forbiddenresponseerror.md @@ -8,4 +8,5 @@ Forbidden - Authentication successful but insufficient permissions | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | | `error` | [components.ForbiddenResponseErrorData](../components/forbiddenresponseerrordata.md) | :heavy_check_mark: | Error data for ForbiddenResponse | {
"code": 403,
"message": "Only management keys can perform this operation"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/internalserverresponseerror.md b/docs/errors/internalserverresponseerror.md index b625175..5db18a9 100644 --- a/docs/errors/internalserverresponseerror.md +++ b/docs/errors/internalserverresponseerror.md @@ -8,4 +8,5 @@ Internal Server Error - Unexpected server error | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `error` | [components.InternalServerResponseErrorData](../components/internalserverresponseerrordata.md) | :heavy_check_mark: | Error data for InternalServerResponse | {
"code": 500,
"message": "Internal Server Error"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/notfoundresponseerror.md b/docs/errors/notfoundresponseerror.md index 80d0191..3f37747 100644 --- a/docs/errors/notfoundresponseerror.md +++ b/docs/errors/notfoundresponseerror.md @@ -8,4 +8,5 @@ Not Found - Resource does not exist | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | `error` | [components.NotFoundResponseErrorData](../components/notfoundresponseerrordata.md) | :heavy_check_mark: | Error data for NotFoundResponse | {
"code": 404,
"message": "Resource not found"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/payloadtoolargeresponseerror.md b/docs/errors/payloadtoolargeresponseerror.md index 322cefe..5027338 100644 --- a/docs/errors/payloadtoolargeresponseerror.md +++ b/docs/errors/payloadtoolargeresponseerror.md @@ -8,4 +8,5 @@ Payload Too Large - Request payload exceeds size limits | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `error` | [components.PayloadTooLargeResponseErrorData](../components/payloadtoolargeresponseerrordata.md) | :heavy_check_mark: | Error data for PayloadTooLargeResponse | {
"code": 413,
"message": "Request payload too large"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/paymentrequiredresponseerror.md b/docs/errors/paymentrequiredresponseerror.md index 1cf4c3f..9743189 100644 --- a/docs/errors/paymentrequiredresponseerror.md +++ b/docs/errors/paymentrequiredresponseerror.md @@ -8,4 +8,5 @@ Payment Required - Insufficient credits or quota to complete request | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `error` | [components.PaymentRequiredResponseErrorData](../components/paymentrequiredresponseerrordata.md) | :heavy_check_mark: | Error data for PaymentRequiredResponse | {
"code": 402,
"message": "Insufficient credits. Add more using https://openrouter.ai/credits"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/provideroverloadedresponseerror.md b/docs/errors/provideroverloadedresponseerror.md index 9eff488..7a2e578 100644 --- a/docs/errors/provideroverloadedresponseerror.md +++ b/docs/errors/provideroverloadedresponseerror.md @@ -8,4 +8,5 @@ Provider Overloaded - Provider is temporarily overloaded | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `error` | [components.ProviderOverloadedResponseErrorData](../components/provideroverloadedresponseerrordata.md) | :heavy_check_mark: | Error data for ProviderOverloadedResponse | {
"code": 529,
"message": "Provider returned error"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/requesttimeoutresponseerror.md b/docs/errors/requesttimeoutresponseerror.md index 4f5d8f7..4029799 100644 --- a/docs/errors/requesttimeoutresponseerror.md +++ b/docs/errors/requesttimeoutresponseerror.md @@ -8,4 +8,5 @@ Request Timeout - Operation exceeded time limit | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `error` | [components.RequestTimeoutResponseErrorData](../components/requesttimeoutresponseerrordata.md) | :heavy_check_mark: | Error data for RequestTimeoutResponse | {
"code": 408,
"message": "Operation timed out. Please try again later."
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/serviceunavailableresponseerror.md b/docs/errors/serviceunavailableresponseerror.md index ecd703a..ac2fed9 100644 --- a/docs/errors/serviceunavailableresponseerror.md +++ b/docs/errors/serviceunavailableresponseerror.md @@ -8,4 +8,5 @@ Service Unavailable - Service temporarily unavailable | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `error` | [components.ServiceUnavailableResponseErrorData](../components/serviceunavailableresponseerrordata.md) | :heavy_check_mark: | Error data for ServiceUnavailableResponse | {
"code": 503,
"message": "Service temporarily unavailable"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/toomanyrequestsresponseerror.md b/docs/errors/toomanyrequestsresponseerror.md index d03ed75..294f695 100644 --- a/docs/errors/toomanyrequestsresponseerror.md +++ b/docs/errors/toomanyrequestsresponseerror.md @@ -8,4 +8,5 @@ Too Many Requests - Rate limit exceeded | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `error` | [components.TooManyRequestsResponseErrorData](../components/toomanyrequestsresponseerrordata.md) | :heavy_check_mark: | Error data for TooManyRequestsResponse | {
"code": 429,
"message": "Rate limit exceeded"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/unauthorizedresponseerror.md b/docs/errors/unauthorizedresponseerror.md index 7dd7744..50d78da 100644 --- a/docs/errors/unauthorizedresponseerror.md +++ b/docs/errors/unauthorizedresponseerror.md @@ -8,4 +8,5 @@ Unauthorized - Authentication required or invalid credentials | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `error` | [components.UnauthorizedResponseErrorData](../components/unauthorizedresponseerrordata.md) | :heavy_check_mark: | Error data for UnauthorizedResponse | {
"code": 401,
"message": "Missing Authentication header"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/errors/unprocessableentityresponseerror.md b/docs/errors/unprocessableentityresponseerror.md index 33f001c..77b5572 100644 --- a/docs/errors/unprocessableentityresponseerror.md +++ b/docs/errors/unprocessableentityresponseerror.md @@ -8,4 +8,5 @@ Unprocessable Entity - Semantic validation failure | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `error` | [components.UnprocessableEntityResponseErrorData](../components/unprocessableentityresponseerrordata.md) | :heavy_check_mark: | Error data for UnprocessableEntityResponse | {
"code": 422,
"message": "Invalid argument"
} | +| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/operations/apitype.md b/docs/operations/apitype.md deleted file mode 100644 index ffff0b9..0000000 --- a/docs/operations/apitype.md +++ /dev/null @@ -1,13 +0,0 @@ -# APIType - -Type of API used for the generation - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `COMPLETIONS` | completions | -| `EMBEDDINGS` | embeddings | -| `RERANK` | rerank | -| `VIDEO` | video | \ No newline at end of file diff --git a/docs/operations/content.md b/docs/operations/content.md index 727997f..22aef15 100644 --- a/docs/operations/content.md +++ b/docs/operations/content.md @@ -15,3 +15,21 @@ value: operations.ContentText = /* values here */ value: operations.ContentImageURL = /* values here */ ``` +### `components.ContentPartInputAudio` + +```python +value: components.ContentPartInputAudio = /* values here */ +``` + +### `components.ContentPartInputVideo` + +```python +value: components.ContentPartInputVideo = /* values here */ +``` + +### `components.ContentPartInputFile` + +```python +value: components.ContentPartInputFile = /* values here */ +``` + diff --git a/docs/operations/createguardrailrequest.md b/docs/operations/createguardrailrequest.md index 5a414e2..74958a2 100644 --- a/docs/operations/createguardrailrequest.md +++ b/docs/operations/createguardrailrequest.md @@ -3,9 +3,9 @@ ## 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_guardrail_request` | [components.CreateGuardrailRequest](../components/createguardrailrequest.md) | :heavy_check_mark: | N/A | {
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"description": "A guardrail for limiting API usage",
"enforce_zdr": false,
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 50,
"name": "My New Guardrail",
"reset_interval": "monthly"
} | \ No newline at end of file +| 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_guardrail_request` | [components.CreateGuardrailRequest](../components/createguardrailrequest.md) | :heavy_check_mark: | N/A | {
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"content_filter_builtins": [
{
"action": "block",
"slug": "regex-prompt-injection"
}
],
"content_filters": null,
"description": "A guardrail for limiting API usage",
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 50,
"name": "My New Guardrail",
"reset_interval": "monthly"
} | \ No newline at end of file diff --git a/docs/operations/createkeysdata.md b/docs/operations/createkeysdata.md index f51f201..e60eaf9 100644 --- a/docs/operations/createkeysdata.md +++ b/docs/operations/createkeysdata.md @@ -26,4 +26,5 @@ The created API key information | `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | | `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | | `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | \ No newline at end of file +| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | +| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this API key belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 | \ No newline at end of file diff --git a/docs/operations/createkeysrequestbody.md b/docs/operations/createkeysrequestbody.md index a384fab..e63e997 100644 --- a/docs/operations/createkeysrequestbody.md +++ b/docs/operations/createkeysrequestbody.md @@ -10,4 +10,5 @@ | `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true | | `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | Optional spending limit for the API key in USD | 50 | | `limit_reset` | [OptionalNullable[operations.CreateKeysLimitReset]](../operations/createkeyslimitreset.md) | :heavy_minus_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly | -| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key | \ No newline at end of file +| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key | +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the API key in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 | \ No newline at end of file diff --git a/docs/operations/createkeysresponse.md b/docs/operations/createkeysresponse.md index e749075..91744f3 100644 --- a/docs/operations/createkeysresponse.md +++ b/docs/operations/createkeysresponse.md @@ -5,7 +5,7 @@ API key created successfully ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.CreateKeysData](../operations/createkeysdata.md) | :heavy_check_mark: | The created API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5
} | -| `key` | *str* | :heavy_check_mark: | The actual API key string (only shown once) | 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 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `data` | [operations.CreateKeysData](../operations/createkeysdata.md) | :heavy_check_mark: | The created API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5,
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} | +| `key` | *str* | :heavy_check_mark: | The actual API key string (only shown once) | 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 | \ No newline at end of file diff --git a/docs/operations/createresponsesrequest.md b/docs/operations/createresponsesrequest.md index 479750c..0552d25 100644 --- a/docs/operations/createresponsesrequest.md +++ b/docs/operations/createresponsesrequest.md @@ -8,4 +8,5 @@ | `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.
| | +| `x_open_router_experimental_metadata` | [Optional[components.MetadataLevel]](../components/metadatalevel.md) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. | enabled | | `responses_request` | [components.ResponsesRequest](../components/responsesrequest.md) | :heavy_check_mark: | N/A | {
"input": [
{
"content": "Hello, how are you?",
"role": "user",
"type": "message"
}
],
"model": "anthropic/claude-4.5-sonnet-20250929",
"temperature": 0.7,
"tools": [
{
"description": "Get the current weather in a given location",
"name": "get_current_weather",
"parameters": {
"properties": {
"location": {
"type": "string"
}
},
"type": "object"
},
"type": "function"
}
],
"top_p": 0.9
} | \ No newline at end of file diff --git a/docs/operations/createresponsesresponsebody.md b/docs/operations/createresponsesresponsebody.md deleted file mode 100644 index b6dddbc..0000000 --- a/docs/operations/createresponsesresponsebody.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateResponsesResponseBody - -Successful response - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [components.StreamEvents](../components/streamevents.md) | :heavy_check_mark: | Union of all possible event types emitted during response streaming | {
"response": {
"created_at": 1704067200,
"error": null,
"id": "resp-abc123",
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"metadata": null,
"model": "gpt-4",
"object": "response",
"output": [],
"parallel_tool_calls": true,
"status": "in_progress",
"temperature": null,
"tool_choice": "auto",
"tools": [],
"top_p": null
},
"sequence_number": 0,
"type": "response.created"
} | \ No newline at end of file diff --git a/docs/operations/getgenerationdata.md b/docs/operations/getgenerationdata.md deleted file mode 100644 index 7be5766..0000000 --- a/docs/operations/getgenerationdata.md +++ /dev/null @@ -1,47 +0,0 @@ -# GetGenerationData - -Generation data - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `api_type` | [Nullable[operations.APIType]](../operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | | -| `app_id` | *Nullable[int]* | :heavy_check_mark: | ID of the app that made the request | 12345 | -| `cache_discount` | *Nullable[float]* | :heavy_check_mark: | Discount applied due to caching | 0.0002 | -| `cancelled` | *Nullable[bool]* | :heavy_check_mark: | Whether the generation was cancelled | false | -| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the generation was created | 2024-07-15T23:33:19.433273+00:00 | -| `external_user` | *Nullable[str]* | :heavy_check_mark: | External user identifier | user-123 | -| `finish_reason` | *Nullable[str]* | :heavy_check_mark: | Reason the generation finished | stop | -| `generation_time` | *Nullable[float]* | :heavy_check_mark: | Time taken for generation in milliseconds | 1200 | -| `http_referer` | *Nullable[str]* | :heavy_check_mark: | Referer header from the request | | -| `id` | *str* | :heavy_check_mark: | Unique identifier for the generation | gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG | -| `is_byok` | *bool* | :heavy_check_mark: | Whether this used bring-your-own-key | false | -| `latency` | *Nullable[float]* | :heavy_check_mark: | Total latency in milliseconds | 1250 | -| `model` | *str* | :heavy_check_mark: | Model used for the generation | sao10k/l3-stheno-8b | -| `moderation_latency` | *Nullable[float]* | :heavy_check_mark: | Moderation latency in milliseconds | 50 | -| `native_finish_reason` | *Nullable[str]* | :heavy_check_mark: | Native finish reason as reported by provider | stop | -| `native_tokens_cached` | *Nullable[int]* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 | -| `native_tokens_completion` | *Nullable[int]* | :heavy_check_mark: | Native completion tokens as reported by provider | 25 | -| `native_tokens_completion_images` | *Nullable[int]* | :heavy_check_mark: | Native completion image tokens as reported by provider | 0 | -| `native_tokens_prompt` | *Nullable[int]* | :heavy_check_mark: | Native prompt tokens as reported by provider | 10 | -| `native_tokens_reasoning` | *Nullable[int]* | :heavy_check_mark: | Native reasoning tokens as reported by provider | 5 | -| `num_input_audio_prompt` | *Nullable[int]* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 | -| `num_media_completion` | *Nullable[int]* | :heavy_check_mark: | Number of media items in the completion | 0 | -| `num_media_prompt` | *Nullable[int]* | :heavy_check_mark: | Number of media items in the prompt | 1 | -| `num_search_results` | *Nullable[int]* | :heavy_check_mark: | Number of search results included | 5 | -| `origin` | *str* | :heavy_check_mark: | Origin URL of the request | https://openrouter.ai/ | -| `provider_name` | *Nullable[str]* | :heavy_check_mark: | Name of the provider that served the request | Infermatic | -| `provider_responses` | List[[components.ProviderResponse](../components/providerresponse.md)] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | | -| `request_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier grouping all generations from a single API request | req-1727282430-aBcDeFgHiJkLmNoPqRsT | -| `router` | *Nullable[str]* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto | -| `session_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Session identifier grouping multiple generations in the same session | | -| `streamed` | *Nullable[bool]* | :heavy_check_mark: | Whether the response was streamed | true | -| `tokens_completion` | *Nullable[int]* | :heavy_check_mark: | Number of tokens in the completion | 25 | -| `tokens_prompt` | *Nullable[int]* | :heavy_check_mark: | Number of tokens in the prompt | 10 | -| `total_cost` | *float* | :heavy_check_mark: | Total cost of the generation in USD | 0.0015 | -| `upstream_id` | *Nullable[str]* | :heavy_check_mark: | Upstream provider's identifier for this generation | chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 | -| `upstream_inference_cost` | *Nullable[float]* | :heavy_check_mark: | Cost charged by the upstream provider | 0.0012 | -| `usage` | *float* | :heavy_check_mark: | Usage amount in USD | 0.0015 | -| `user_agent` | *Nullable[str]* | :heavy_check_mark: | User-Agent header from the request | | \ No newline at end of file diff --git a/docs/operations/getgenerationresponse.md b/docs/operations/getgenerationresponse.md deleted file mode 100644 index 989c19a..0000000 --- a/docs/operations/getgenerationresponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetGenerationResponse - -Generation response - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `data` | [operations.GetGenerationData](../operations/getgenerationdata.md) | :heavy_check_mark: | Generation data | \ No newline at end of file diff --git a/docs/operations/getkeydata.md b/docs/operations/getkeydata.md index 5ba4a1f..c5a3db6 100644 --- a/docs/operations/getkeydata.md +++ b/docs/operations/getkeydata.md @@ -26,4 +26,5 @@ The API key information | `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | | `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | | `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | \ No newline at end of file +| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | +| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this API key belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 | \ No newline at end of file diff --git a/docs/operations/getkeyresponse.md b/docs/operations/getkeyresponse.md index 7959a40..72e8055 100644 --- a/docs/operations/getkeyresponse.md +++ b/docs/operations/getkeyresponse.md @@ -5,6 +5,6 @@ API key details ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.GetKeyData](../operations/getkeydata.md) | :heavy_check_mark: | The API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `data` | [operations.GetKeyData](../operations/getkeydata.md) | :heavy_check_mark: | The API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5,
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} | \ No newline at end of file diff --git a/docs/operations/listdata.md b/docs/operations/listdata.md index d8fcbe3..d2a0b36 100644 --- a/docs/operations/listdata.md +++ b/docs/operations/listdata.md @@ -24,4 +24,5 @@ | `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | | `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | | `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | \ No newline at end of file +| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | +| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this API key belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 | \ No newline at end of file diff --git a/docs/operations/listguardrailsrequest.md b/docs/operations/listguardrailsrequest.md index 65946b1..e6f8126 100644 --- a/docs/operations/listguardrailsrequest.md +++ b/docs/operations/listguardrailsrequest.md @@ -9,4 +9,5 @@ | `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.
| | | `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned. | 0df9e665-d932-5740-b2c7-b52af166bc11 | \ No newline at end of file diff --git a/docs/operations/listguardrailsresponse.md b/docs/operations/listguardrailsresponse.md index 3046aeb..a45543b 100644 --- a/docs/operations/listguardrailsresponse.md +++ b/docs/operations/listguardrailsresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `result` | [components.ListGuardrailsResponse](../components/listguardrailsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z"
}
],
"total_count": 1
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `result` | [components.ListGuardrailsResponse](../components/listguardrailsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"content_filter_builtins": [
{
"action": "block",
"label": "[PROMPT_INJECTION]",
"slug": "regex-prompt-injection"
}
],
"content_filters": null,
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": null,
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
}
],
"total_count": 1
} | \ No newline at end of file diff --git a/docs/operations/listrequest.md b/docs/operations/listrequest.md index 5507b0a..a5646bd 100644 --- a/docs/operations/listrequest.md +++ b/docs/operations/listrequest.md @@ -9,4 +9,5 @@ | `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.
| | | `include_disabled` | *Optional[bool]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false | -| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 | \ No newline at end of file +| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 | +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Filter API keys by workspace ID. By default, keys in the default workspace are returned. | 0df9e665-d932-5740-b2c7-b52af166bc11 | \ No newline at end of file diff --git a/docs/operations/sendchatcompletionrequestrequest.md b/docs/operations/sendchatcompletionrequestrequest.md index f0a096f..c274edb 100644 --- a/docs/operations/sendchatcompletionrequestrequest.md +++ b/docs/operations/sendchatcompletionrequestrequest.md @@ -8,4 +8,5 @@ | `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.
| | +| `x_open_router_experimental_metadata` | [Optional[components.MetadataLevel]](../components/metadatalevel.md) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. | enabled | | `chat_request` | [components.ChatRequest](../components/chatrequest.md) | :heavy_check_mark: | N/A | {
"max_tokens": 150,
"messages": [
{
"content": "You are a helpful assistant.",
"role": "system"
},
{
"content": "What is the capital of France?",
"role": "user"
}
],
"model": "openai/gpt-4",
"temperature": 0.7
} | \ No newline at end of file diff --git a/docs/operations/sendchatcompletionrequestresponsebody.md b/docs/operations/sendchatcompletionrequestresponsebody.md deleted file mode 100644 index ff4ce98..0000000 --- a/docs/operations/sendchatcompletionrequestresponsebody.md +++ /dev/null @@ -1,10 +0,0 @@ -# SendChatCompletionRequestResponseBody - -Successful chat completion response - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [components.ChatStreamChunk](../components/chatstreamchunk.md) | :heavy_check_mark: | Streaming chat completion chunk | {
"choices": [
{
"delta": {
"content": "Hello",
"role": "assistant"
},
"finish_reason": null,
"index": 0
}
],
"created": 1677652288,
"id": "chatcmpl-123",
"model": "openai/gpt-4",
"object": "chat.completion.chunk"
} | \ No newline at end of file diff --git a/docs/operations/updatekeysdata.md b/docs/operations/updatekeysdata.md index 499598c..f1ef382 100644 --- a/docs/operations/updatekeysdata.md +++ b/docs/operations/updatekeysdata.md @@ -26,4 +26,5 @@ The updated API key information | `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | | `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | | `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | \ No newline at end of file +| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | +| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this API key belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 | \ No newline at end of file diff --git a/docs/operations/updatekeysresponse.md b/docs/operations/updatekeysresponse.md index c1dde7c..8b5ef1f 100644 --- a/docs/operations/updatekeysresponse.md +++ b/docs/operations/updatekeysresponse.md @@ -5,6 +5,6 @@ API key updated successfully ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.UpdateKeysData](../operations/updatekeysdata.md) | :heavy_check_mark: | The updated API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `data` | [operations.UpdateKeysData](../operations/updatekeysdata.md) | :heavy_check_mark: | The updated API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5,
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} | \ No newline at end of file diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md index 0e6da85..6e72f51 100644 --- a/docs/sdks/apikeys/README.md +++ b/docs/sdks/apikeys/README.md @@ -95,6 +95,7 @@ with OpenRouter( | `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.
| | | `include_disabled` | *Optional[bool]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false | | `offset` | *Optional[int]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 | +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Filter API keys by workspace ID. By default, keys in the default workspace are returned. | 0df9e665-d932-5740-b2c7-b52af166bc11 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -150,6 +151,7 @@ with OpenRouter( | `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true | | `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | Optional spending limit for the API key in USD | 50 | | `limit_reset` | [OptionalNullable[operations.CreateKeysLimitReset]](../../operations/createkeyslimitreset.md) | :heavy_minus_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly | +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the API key in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -162,6 +164,7 @@ with OpenRouter( | ----------------------------------- | ----------------------------------- | ----------------------------------- | | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.TooManyRequestsResponseError | 429 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index 03d623c..fee1721 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -34,7 +34,7 @@ with OpenRouter( "content": "What is the capital of France?", "role": "user", }, - ], max_tokens=150, model="openai/gpt-4", stream=False, temperature=0.7) + ], x_open_router_experimental_metadata="enabled", max_tokens=150, model="openai/gpt-4", stream=False, temperature=0.7) with res as event_stream: for event in event_stream: @@ -51,7 +51,8 @@ with OpenRouter( | `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.
| | -| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.md) | :heavy_minus_sign: | N/A | {
"type": "ephemeral"
} | +| `x_open_router_experimental_metadata` | [Optional[components.MetadataLevel]](../../components/metadatalevel.md) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. | enabled | +| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.md) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | {
"type": "ephemeral"
} | | `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.md) | :heavy_minus_sign: | Debug options for inspecting request transformations (streaming only) | {
"echo_upstream_body": true
} | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | 0 | | `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.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",
"quality": "high"
} | @@ -95,6 +96,7 @@ with OpenRouter( | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | | errors.PaymentRequiredResponseError | 402 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.RequestTimeoutResponseError | 408 | application/json | | errors.PayloadTooLargeResponseError | 413 | application/json | diff --git a/docs/sdks/generations/README.md b/docs/sdks/generations/README.md index 332b568..7fd647d 100644 --- a/docs/sdks/generations/README.md +++ b/docs/sdks/generations/README.md @@ -7,6 +7,7 @@ Generation history endpoints ### Available Operations * [get_generation](#get_generation) - Get request & usage metadata for a generation +* [list_generation_content](#list_generation_content) - Get stored prompt and completion content for a generation ## get_generation @@ -46,7 +47,7 @@ with OpenRouter( ### Response -**[operations.GetGenerationResponse](../../operations/getgenerationresponse.md)** +**[components.GenerationResponse](../../components/generationresponse.md)** ### Errors @@ -60,4 +61,58 @@ with OpenRouter( | errors.BadGatewayResponseError | 502 | application/json | | errors.EdgeNetworkTimeoutResponseError | 524 | application/json | | errors.ProviderOverloadedResponseError | 529 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## list_generation_content + +Get stored prompt and completion content for a generation + +### Example Usage + + +```python +from openrouter import OpenRouter +import os + + +with OpenRouter( + http_referer="", + x_open_router_title="", + x_open_router_categories="", + api_key=os.getenv("OPENROUTER_API_KEY", ""), +) as open_router: + + res = open_router.generations.list_generation_content(id="gen-1234567890") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The generation ID | gen-1234567890 | +| `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 + +**[components.GenerationContentResponse](../../components/generationcontentresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.TooManyRequestsResponseError | 429 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.BadGatewayResponseError | 502 | application/json | +| errors.EdgeNetworkTimeoutResponseError | 524 | application/json | +| errors.ProviderOverloadedResponseError | 529 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/guardrails/README.md b/docs/sdks/guardrails/README.md index 7bcdbb6..280cd58 100644 --- a/docs/sdks/guardrails/README.md +++ b/docs/sdks/guardrails/README.md @@ -57,6 +57,7 @@ with OpenRouter( | `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.
| | | `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned. | 0df9e665-d932-5740-b2c7-b52af166bc11 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -94,7 +95,7 @@ with OpenRouter( "openai", "anthropic", "deepseek", - ], description="A guardrail for limiting API usage", enforce_zdr=False, ignored_models=None, ignored_providers=None, limit_usd=50, reset_interval="monthly") + ], description="A guardrail for limiting API usage", enforce_zdr_anthropic=True, enforce_zdr_google=False, enforce_zdr_openai=True, enforce_zdr_other=False, ignored_models=None, ignored_providers=None, limit_usd=50, reset_interval="monthly") # Handle response print(res) @@ -103,21 +104,28 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail | -| `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.
| | -| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | -| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage | -| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false | -| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] | -| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 | -| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail | +| `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.
| | +| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | +| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | +| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntry](../../components/contentfilterbuiltinentry.md)] | :heavy_minus_sign: | Builtin content filters to apply. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
{
"action": "block",
"slug": "regex-prompt-injection"
}
] | +| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.md)] | :heavy_minus_sign: | Custom regex content filters to apply to request messages | [
{
"action": "redact",
"label": "[API_KEY]",
"pattern": "\\b(sk-[a-zA-Z0-9]{48})\\b"
}
] | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage | +| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | false | +| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | false | +| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | false | +| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | false | +| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. | false | +| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] | +| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | +| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 | +| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | +| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the guardrail in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -129,6 +137,7 @@ with OpenRouter( | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -258,22 +267,28 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 | -| `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.
| | -| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] | -| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description | -| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | true | -| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] | -| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 | -| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name | -| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 | +| `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.
| | +| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] | +| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | +| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntry](../../components/contentfilterbuiltinentry.md)] | :heavy_minus_sign: | Builtin content filters to apply. Set to null to remove. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
{
"action": "block",
"slug": "regex-prompt-injection"
}
] | +| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.md)] | :heavy_minus_sign: | Custom regex content filters to apply. Set to null to remove. | | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description | +| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | true | +| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | true | +| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | true | +| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | true | +| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. | true | +| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] | +| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | +| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 | +| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name | +| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/responses/README.md b/docs/sdks/responses/README.md index a38d2b1..b4bfca3 100644 --- a/docs/sdks/responses/README.md +++ b/docs/sdks/responses/README.md @@ -27,7 +27,7 @@ with OpenRouter( api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: - res = open_router.beta.responses.send(input="Tell me a joke", model="openai/gpt-4o", service_tier="auto", stream=False) + res = open_router.beta.responses.send(x_open_router_experimental_metadata="enabled", input="Tell me a joke", model="openai/gpt-4o", service_tier="auto", stream=False) with res as event_stream: for event in event_stream: @@ -43,7 +43,9 @@ with OpenRouter( | `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.
| | +| `x_open_router_experimental_metadata` | [Optional[components.MetadataLevel]](../../components/metadatalevel.md) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. | enabled | | `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.md) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | {
"type": "ephemeral"
} | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.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",
"quality": "high"
} | | `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.md)] | :heavy_minus_sign: | N/A | | @@ -90,6 +92,7 @@ with OpenRouter( | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | | errors.PaymentRequiredResponseError | 402 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | | errors.NotFoundResponseError | 404 | application/json | | errors.RequestTimeoutResponseError | 408 | application/json | | errors.PayloadTooLargeResponseError | 413 | application/json | diff --git a/pyproject.toml b/pyproject.toml index c678027..9e4606d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [project] name = "openrouter" -version = "0.9.1" +version = "0.9.2" description = "Official Python Client SDK for OpenRouter." authors = [{ name = "OpenRouter" },] -readme = "README.md" +readme = "README-PYPI.md" requires-python = ">=3.9.2" dependencies = [ "httpcore >=1.0.9", @@ -11,6 +11,7 @@ dependencies = [ "jsonpath-python >=1.0.6", "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 ef28dc1..c35748f 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,4 +1,6 @@ #!/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 4d43d33..fcebde3 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "0.9.1" +__version__: str = "0.9.2" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.788.4" -__user_agent__: str = "speakeasy-sdk/python 0.9.1 2.788.4 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 0.9.2 2.788.4 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/api_keys.py b/src/openrouter/api_keys.py index 923a5f8..e4a30e1 100644 --- a/src/openrouter/api_keys.py +++ b/src/openrouter/api_keys.py @@ -257,6 +257,7 @@ def list( x_open_router_categories: Optional[str] = None, include_disabled: Optional[bool] = None, offset: Optional[int] = None, + workspace_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -275,6 +276,7 @@ def list( :param include_disabled: Whether to include disabled API keys in the response :param offset: Number of API keys to skip for pagination + :param workspace_id: Filter API keys by workspace ID. By default, keys in the default workspace are returned. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -296,6 +298,7 @@ def list( x_open_router_categories=x_open_router_categories, include_disabled=include_disabled, offset=offset, + workspace_id=workspace_id, ) req = self._build_request( @@ -386,6 +389,7 @@ async def list_async( x_open_router_categories: Optional[str] = None, include_disabled: Optional[bool] = None, offset: Optional[int] = None, + workspace_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -404,6 +408,7 @@ async def list_async( :param include_disabled: Whether to include disabled API keys in the response :param offset: Number of API keys to skip for pagination + :param workspace_id: Filter API keys by workspace ID. By default, keys in the default workspace are returned. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -425,6 +430,7 @@ async def list_async( x_open_router_categories=x_open_router_categories, include_disabled=include_disabled, offset=offset, + workspace_id=workspace_id, ) req = self._build_request_async( @@ -519,6 +525,7 @@ def create( include_byok_in_limit: Optional[bool] = None, limit: OptionalNullable[float] = UNSET, limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET, + workspace_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -541,6 +548,7 @@ def create( :param include_byok_in_limit: Whether to include BYOK usage in the limit :param limit: Optional spending limit for the API key in USD :param limit_reset: Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. + :param workspace_id: The workspace to create the API key in. Defaults to the default workspace if not provided. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -567,6 +575,7 @@ def create( limit=limit, limit_reset=limit_reset, name=name, + workspace_id=workspace_id, ), ) @@ -622,7 +631,7 @@ def create( ), ), request=req, - error_status_codes=["400", "401", "429", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "403", "429", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -639,6 +648,11 @@ def create( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "429", "application/json"): response_data = unmarshal_json_response( errors.TooManyRequestsResponseErrorData, http_res @@ -674,6 +688,7 @@ async def create_async( include_byok_in_limit: Optional[bool] = None, limit: OptionalNullable[float] = UNSET, limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET, + workspace_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -696,6 +711,7 @@ async def create_async( :param include_byok_in_limit: Whether to include BYOK usage in the limit :param limit: Optional spending limit for the API key in USD :param limit_reset: Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. + :param workspace_id: The workspace to create the API key in. Defaults to the default workspace if not provided. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -722,6 +738,7 @@ async def create_async( limit=limit, limit_reset=limit_reset, name=name, + workspace_id=workspace_id, ), ) @@ -777,7 +794,7 @@ async def create_async( ), ), request=req, - error_status_codes=["400", "401", "429", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "403", "429", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -794,6 +811,11 @@ async def create_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "429", "application/json"): response_data = unmarshal_json_response( errors.TooManyRequestsResponseErrorData, http_res diff --git a/src/openrouter/byok.py b/src/openrouter/byok.py new file mode 100644 index 0000000..6a1408c --- /dev/null +++ b/src/openrouter/byok.py @@ -0,0 +1,591 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from jsonpath import JSONPath +from openrouter import components, errors, operations, utils +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, Awaitable, Dict, List, Mapping, Optional, Union + + +class Byok(BaseSDK): + r"""BYOK endpoints""" + + def list( + self, + *, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + offset: Optional[int] = None, + limit: Optional[int] = None, + workspace_id: Optional[str] = None, + provider: Optional[operations.Provider] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[operations.ListBYOKKeysResponse]: + r"""List BYOK provider credentials + + List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param offset: Number of records to skip for pagination + :param limit: Maximum number of records to return (max 100) + :param workspace_id: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace. + :param provider: Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`). + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.ListBYOKKeysRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=offset, + limit=limit, + workspace_id=workspace_id, + provider=provider, + ) + + req = self._build_request( + method="GET", + path="/byok", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.ListBYOKKeysGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="listBYOKKeys", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[operations.ListBYOKKeysResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + offset = request.offset if not request.offset is None else 0 + + if not http_res.text: + return None + results = JSONPath("$.data").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return None + limit = request.limit if not request.limit is None else 0 + if len(results[0]) < limit: + return None + next_offset = offset + len(results[0]) + + return self.list( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=next_offset, + limit=limit, + workspace_id=workspace_id, + provider=provider, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.ListBYOKKeysResponse( + result=unmarshal_json_response( + components.ListBYOKKeysResponse, http_res + ), + next=next_func, + ) + 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, "500", "application/json"): + response_data = unmarshal_json_response( + errors.InternalServerResponseErrorData, http_res + ) + raise errors.InternalServerResponseError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def list_async( + self, + *, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + offset: Optional[int] = None, + limit: Optional[int] = None, + workspace_id: Optional[str] = None, + provider: Optional[operations.Provider] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[operations.ListBYOKKeysResponse]: + r"""List BYOK provider credentials + + List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param offset: Number of records to skip for pagination + :param limit: Maximum number of records to return (max 100) + :param workspace_id: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace. + :param provider: Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`). + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.ListBYOKKeysRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=offset, + limit=limit, + workspace_id=workspace_id, + provider=provider, + ) + + req = self._build_request_async( + method="GET", + path="/byok", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.ListBYOKKeysGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="listBYOKKeys", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Awaitable[Optional[operations.ListBYOKKeysResponse]]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + async def empty_result(): + return None + + offset = request.offset if not request.offset is None else 0 + + if not http_res.text: + return empty_result() + results = JSONPath("$.data").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return empty_result() + limit = request.limit if not request.limit is None else 0 + if len(results[0]) < limit: + return empty_result() + next_offset = offset + len(results[0]) + + return self.list_async( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=next_offset, + limit=limit, + workspace_id=workspace_id, + provider=provider, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.ListBYOKKeysResponse( + result=unmarshal_json_response( + components.ListBYOKKeysResponse, http_res + ), + next=next_func, + ) + 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, "500", "application/json"): + response_data = unmarshal_json_response( + errors.InternalServerResponseErrorData, http_res + ) + raise errors.InternalServerResponseError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + def get( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.GetBYOKKeyResponse: + r"""Get a BYOK provider credential + + Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The BYOK credential ID (UUID). + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.GetBYOKKeyRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + ) + + req = self._build_request( + method="GET", + path="/byok/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.GetBYOKKeyGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getBYOKKey", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(components.GetBYOKKeyResponse, 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, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def get_async( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.GetBYOKKeyResponse: + r"""Get a BYOK provider credential + + Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The BYOK credential ID (UUID). + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.GetBYOKKeyRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + ) + + req = self._build_request_async( + method="GET", + path="/byok/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.GetBYOKKeyGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getBYOKKey", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(components.GetBYOKKeyResponse, 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, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) diff --git a/src/openrouter/chat.py b/src/openrouter/chat.py index bfa078e..6a37ab6 100644 --- a/src/openrouter/chat.py +++ b/src/openrouter/chat.py @@ -26,6 +26,7 @@ def send( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, cache_control: Optional[ Union[ components.AnthropicCacheControlDirective, @@ -112,7 +113,8 @@ def send( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. - :param cache_control: + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param debug: Debug options for inspecting request transformations (streaming only) :param frequency_penalty: Frequency penalty (-2.0 to 2.0) :param image_config: 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. @@ -160,6 +162,7 @@ def send( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, cache_control: Optional[ Union[ components.AnthropicCacheControlDirective, @@ -246,7 +249,8 @@ def send( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. - :param cache_control: + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param debug: Debug options for inspecting request transformations (streaming only) :param frequency_penalty: Frequency penalty (-2.0 to 2.0) :param image_config: 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. @@ -293,6 +297,7 @@ def send( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, cache_control: Optional[ Union[ components.AnthropicCacheControlDirective, @@ -379,7 +384,8 @@ def send( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. - :param cache_control: + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param debug: Debug options for inspecting request transformations (streaming only) :param frequency_penalty: Frequency penalty (-2.0 to 2.0) :param image_config: 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. @@ -430,6 +436,7 @@ def send( http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, + x_open_router_experimental_metadata=x_open_router_experimental_metadata, chat_request=components.ChatRequest( cache_control=utils.get_pydantic_model( cache_control, Optional[components.AnthropicCacheControlDirective] @@ -538,6 +545,7 @@ def send( "400", "401", "402", + "403", "404", "408", "413", @@ -565,7 +573,7 @@ def send( return eventstreaming.EventStream( http_res, lambda raw: utils.unmarshal_json( - raw, operations.SendChatCompletionRequestResponseBody + raw, components.ChatStreamingResponse ).data, sentinel="[DONE]", client_ref=self, @@ -592,6 +600,12 @@ def send( raise errors.PaymentRequiredResponseError( response_data, http_res, http_res_text ) + if utils.match_response(http_res, "403", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res, http_res_text + ) + raise errors.ForbiddenResponseError(response_data, http_res, http_res_text) if utils.match_response(http_res, "404", "application/json"): http_res_text = utils.stream_to_text(http_res) response_data = unmarshal_json_response( @@ -694,6 +708,7 @@ async def send_async( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, cache_control: Optional[ Union[ components.AnthropicCacheControlDirective, @@ -780,7 +795,8 @@ async def send_async( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. - :param cache_control: + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param debug: Debug options for inspecting request transformations (streaming only) :param frequency_penalty: Frequency penalty (-2.0 to 2.0) :param image_config: 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. @@ -828,6 +844,7 @@ async def send_async( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, cache_control: Optional[ Union[ components.AnthropicCacheControlDirective, @@ -914,7 +931,8 @@ async def send_async( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. - :param cache_control: + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param debug: Debug options for inspecting request transformations (streaming only) :param frequency_penalty: Frequency penalty (-2.0 to 2.0) :param image_config: 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. @@ -961,6 +979,7 @@ async def send_async( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, cache_control: Optional[ Union[ components.AnthropicCacheControlDirective, @@ -1047,7 +1066,8 @@ async def send_async( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. - :param cache_control: + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param debug: Debug options for inspecting request transformations (streaming only) :param frequency_penalty: Frequency penalty (-2.0 to 2.0) :param image_config: 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. @@ -1098,6 +1118,7 @@ async def send_async( http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, + x_open_router_experimental_metadata=x_open_router_experimental_metadata, chat_request=components.ChatRequest( cache_control=utils.get_pydantic_model( cache_control, Optional[components.AnthropicCacheControlDirective] @@ -1206,6 +1227,7 @@ async def send_async( "400", "401", "402", + "403", "404", "408", "413", @@ -1233,7 +1255,7 @@ async def send_async( return eventstreaming.EventStreamAsync( http_res, lambda raw: utils.unmarshal_json( - raw, operations.SendChatCompletionRequestResponseBody + raw, components.ChatStreamingResponse ).data, sentinel="[DONE]", client_ref=self, @@ -1260,6 +1282,12 @@ async def send_async( raise errors.PaymentRequiredResponseError( response_data, http_res, http_res_text ) + if utils.match_response(http_res, "403", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res, http_res_text + ) + raise errors.ForbiddenResponseError(response_data, http_res, http_res_text) if utils.match_response(http_res, "404", "application/json"): http_res_text = await utils.stream_to_text_async(http_res) response_data = unmarshal_json_response( diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py index e41de29..beefbbb 100644 --- a/src/openrouter/components/__init__.py +++ b/src/openrouter/components/__init__.py @@ -19,11 +19,55 @@ AnthropicCacheControlDirectiveTypedDict, ) from .anthropiccachecontrolttl import AnthropicCacheControlTTL + from .applypatchcallitem import ( + ApplyPatchCallItem, + ApplyPatchCallItemType, + ApplyPatchCallItemTypedDict, + ) + from .applypatchcalloperation import ( + ApplyPatchCallOperation, + ApplyPatchCallOperationCreateFile, + ApplyPatchCallOperationCreateFileTypedDict, + ApplyPatchCallOperationDeleteFile, + ApplyPatchCallOperationDeleteFileTypedDict, + ApplyPatchCallOperationTypedDict, + ApplyPatchCallOperationUpdateFile, + ApplyPatchCallOperationUpdateFileTypedDict, + TypeCreateFile, + TypeDeleteFile, + TypeUpdateFile, + ) + from .applypatchcalloperationdiffdeltaevent import ( + ApplyPatchCallOperationDiffDeltaEvent, + ApplyPatchCallOperationDiffDeltaEventType, + ApplyPatchCallOperationDiffDeltaEventTypedDict, + ) + from .applypatchcalloperationdiffdoneevent import ( + ApplyPatchCallOperationDiffDoneEvent, + ApplyPatchCallOperationDiffDoneEventType, + ApplyPatchCallOperationDiffDoneEventTypedDict, + ) + from .applypatchcalloutputitem import ( + ApplyPatchCallOutputItem, + ApplyPatchCallOutputItemStatus, + ApplyPatchCallOutputItemType, + ApplyPatchCallOutputItemTypedDict, + ) + from .applypatchcallstatus import ApplyPatchCallStatus from .applypatchservertool import ( ApplyPatchServerTool, ApplyPatchServerToolType, ApplyPatchServerToolTypedDict, ) + from .applypatchservertool_openrouter import ( + ApplyPatchServerToolOpenRouter, + ApplyPatchServerToolOpenRouterType, + ApplyPatchServerToolOpenRouterTypedDict, + ) + from .applypatchservertoolconfig import ( + ApplyPatchServerToolConfig, + ApplyPatchServerToolConfigTypedDict, + ) from .autorouterplugin import ( AutoRouterPlugin, AutoRouterPluginID, @@ -61,6 +105,14 @@ BaseInputsUnionTypedDict, ) from .basereasoningconfig import BaseReasoningConfig, BaseReasoningConfigTypedDict + from .bulkaddworkspacemembersrequest import ( + BulkAddWorkspaceMembersRequest, + BulkAddWorkspaceMembersRequestTypedDict, + ) + from .bulkaddworkspacemembersresponse import ( + BulkAddWorkspaceMembersResponse, + BulkAddWorkspaceMembersResponseTypedDict, + ) from .bulkassignkeysrequest import ( BulkAssignKeysRequest, BulkAssignKeysRequestTypedDict, @@ -77,6 +129,14 @@ BulkAssignMembersResponse, BulkAssignMembersResponseTypedDict, ) + from .bulkremoveworkspacemembersrequest import ( + BulkRemoveWorkspaceMembersRequest, + BulkRemoveWorkspaceMembersRequestTypedDict, + ) + from .bulkremoveworkspacemembersresponse import ( + BulkRemoveWorkspaceMembersResponse, + BulkRemoveWorkspaceMembersResponseTypedDict, + ) from .bulkunassignkeysrequest import ( BulkUnassignKeysRequest, BulkUnassignKeysRequestTypedDict, @@ -93,6 +153,8 @@ BulkUnassignMembersResponse, BulkUnassignMembersResponseTypedDict, ) + from .byokkey import BYOKKey, BYOKKeyTypedDict + from .byokproviderslug import BYOKProviderSlug from .chatassistantimages import ( ChatAssistantImages, ChatAssistantImagesImageURL, @@ -235,6 +297,10 @@ ChatStreamDeltaRole, ChatStreamDeltaTypedDict, ) + from .chatstreamingresponse import ( + ChatStreamingResponse, + ChatStreamingResponseTypedDict, + ) from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict from .chatstreamtoolcall import ( ChatStreamToolCall, @@ -314,6 +380,11 @@ CodexLocalShellToolType, CodexLocalShellToolTypedDict, ) + from .compactionitem import ( + CompactionItem, + CompactionItemType, + CompactionItemTypedDict, + ) from .compoundfilter import ( CompoundFilter, CompoundFilterType, @@ -329,6 +400,14 @@ ConflictResponseErrorData, ConflictResponseErrorDataTypedDict, ) + from .contentfilteraction import ContentFilterAction + from .contentfilterbuiltinaction import ContentFilterBuiltinAction + from .contentfilterbuiltinentry import ( + ContentFilterBuiltinEntry, + ContentFilterBuiltinEntryTypedDict, + ) + from .contentfilterbuiltinslug import ContentFilterBuiltinSlug + from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict from .contentpartaddedevent import ( ContentPartAddedEvent, ContentPartAddedEventPart, @@ -350,12 +429,28 @@ ContentPartImageType, ContentPartImageTypedDict, ) + from .contentpartinputaudio import ( + ContentPartInputAudio, + ContentPartInputAudioType, + ContentPartInputAudioTypedDict, + ) + from .contentpartinputfile import ( + ContentPartInputFile, + ContentPartInputFileType, + ContentPartInputFileTypedDict, + ) + from .contentpartinputvideo import ( + ContentPartInputVideo, + ContentPartInputVideoType, + ContentPartInputVideoTypedDict, + ) from .contextcompressionengine import ContextCompressionEngine from .contextcompressionplugin import ( ContextCompressionPlugin, ContextCompressionPluginID, ContextCompressionPluginTypedDict, ) + from .costdetails import CostDetails, CostDetailsTypedDict from .createguardrailrequest import ( CreateGuardrailRequest, CreateGuardrailRequestTypedDict, @@ -364,6 +459,14 @@ CreateGuardrailResponse, CreateGuardrailResponseTypedDict, ) + from .createworkspacerequest import ( + CreateWorkspaceRequest, + CreateWorkspaceRequestTypedDict, + ) + from .createworkspaceresponse import ( + CreateWorkspaceResponse, + CreateWorkspaceResponseTypedDict, + ) from .customtool import ( CustomTool, CustomToolTypedDict, @@ -378,6 +481,34 @@ Syntax, TypeCustom, ) + from .customtoolcallinputdeltaevent import ( + CustomToolCallInputDeltaEvent, + CustomToolCallInputDeltaEventType, + CustomToolCallInputDeltaEventTypedDict, + ) + from .customtoolcallinputdoneevent import ( + CustomToolCallInputDoneEvent, + CustomToolCallInputDoneEventType, + CustomToolCallInputDoneEventTypedDict, + ) + from .customtoolcallitem import ( + CustomToolCallItem, + CustomToolCallItemType, + CustomToolCallItemTypedDict, + ) + from .customtoolcalloutputitem import ( + CustomToolCallOutputItem, + CustomToolCallOutputItemDetail, + CustomToolCallOutputItemOutputInputImage, + CustomToolCallOutputItemOutputInputImageTypedDict, + CustomToolCallOutputItemOutputType, + CustomToolCallOutputItemOutputUnion1, + CustomToolCallOutputItemOutputUnion1TypedDict, + CustomToolCallOutputItemOutputUnion2, + CustomToolCallOutputItemOutputUnion2TypedDict, + CustomToolCallOutputItemTypeCustomToolCallOutput, + CustomToolCallOutputItemTypedDict, + ) from .datetimeservertool import ( DatetimeServerTool, DatetimeServerToolType, @@ -392,6 +523,10 @@ DeleteGuardrailResponse, DeleteGuardrailResponseTypedDict, ) + from .deleteworkspaceresponse import ( + DeleteWorkspaceResponse, + DeleteWorkspaceResponseTypedDict, + ) from .easyinputmessage import ( EasyInputMessage, EasyInputMessageContentInputImage, @@ -419,6 +554,8 @@ EdgeNetworkTimeoutResponseErrorData, EdgeNetworkTimeoutResponseErrorDataTypedDict, ) + from .endpointinfo import EndpointInfo, EndpointInfoTypedDict + from .endpointsmetadata import EndpointsMetadata, EndpointsMetadataTypedDict from .endpointstatus import EndpointStatus from .errorevent import ErrorEvent, ErrorEventType, ErrorEventTypedDict from .filecitation import FileCitation, FileCitationType, FileCitationTypedDict @@ -431,6 +568,10 @@ from .filesearchservertool import ( FileSearchServerTool, FileSearchServerToolTypedDict, + FileSearchServerToolValue1, + FileSearchServerToolValue1TypedDict, + FileSearchServerToolValue2, + FileSearchServerToolValue2TypedDict, Filters, FiltersType, FiltersTypedDict, @@ -440,10 +581,6 @@ RankingOptions, RankingOptionsTypedDict, TypeFileSearch, - Value1, - Value1TypedDict, - Value2, - Value2TypedDict, ) from .forbiddenresponseerrordata import ( ForbiddenResponseErrorData, @@ -491,6 +628,8 @@ from .functioncalloutputitem import ( FunctionCallOutputItem, FunctionCallOutputItemDetail, + FunctionCallOutputItemOutputInputImage, + FunctionCallOutputItemOutputInputImageTypedDict, FunctionCallOutputItemOutputType, FunctionCallOutputItemOutputUnion1, FunctionCallOutputItemOutputUnion1TypedDict, @@ -499,13 +638,53 @@ FunctionCallOutputItemStatus, FunctionCallOutputItemTypeFunctionCallOutput, FunctionCallOutputItemTypedDict, - OutputInputImage, - OutputInputImageTypedDict, ) + from .fusionplugin import FusionPlugin, FusionPluginID, FusionPluginTypedDict + from .fusionservertool_openrouter import ( + FusionServerToolOpenRouter, + FusionServerToolOpenRouterType, + FusionServerToolOpenRouterTypedDict, + ) + from .fusionservertoolconfig import ( + FusionServerToolConfig, + FusionServerToolConfigTypedDict, + ) + from .generationcontentdata import ( + GenerationContentData, + GenerationContentDataOutput, + GenerationContentDataOutputTypedDict, + GenerationContentDataTypedDict, + Input1, + Input1TypedDict, + Input2, + Input2TypedDict, + InputUnion, + InputUnionTypedDict, + ) + from .generationcontentresponse import ( + GenerationContentResponse, + GenerationContentResponseTypedDict, + ) + from .generationresponse import ( + APIType, + GenerationResponse, + GenerationResponseData, + GenerationResponseDataTypedDict, + GenerationResponseTypedDict, + ) + from .getbyokkeyresponse import GetBYOKKeyResponse, GetBYOKKeyResponseTypedDict from .getguardrailresponse import ( GetGuardrailResponse, GetGuardrailResponseTypedDict, ) + from .getobservabilitydestinationresponse import ( + GetObservabilityDestinationResponse, + GetObservabilityDestinationResponseTypedDict, + ) + from .getworkspaceresponse import ( + GetWorkspaceResponse, + GetWorkspaceResponseTypedDict, + ) from .guardrail import Guardrail, GuardrailTypedDict from .guardrailinterval import GuardrailInterval from .imageconfig import ImageConfig, ImageConfigTypedDict @@ -628,6 +807,11 @@ InternalServerResponseErrorData, InternalServerResponseErrorDataTypedDict, ) + from .itemreferenceitem import ( + ItemReferenceItem, + ItemReferenceItemType, + ItemReferenceItemTypedDict, + ) from .keyassignment import KeyAssignment, KeyAssignmentTypedDict from .legacy_chatcontentvideo import ( LegacyChatContentVideo, @@ -639,6 +823,10 @@ LegacyWebSearchServerToolType, LegacyWebSearchServerToolTypedDict, ) + from .listbyokkeysresponse import ( + ListBYOKKeysResponse, + ListBYOKKeysResponseTypedDict, + ) from .listendpointsresponse import ( Architecture, ArchitectureTypedDict, @@ -658,6 +846,46 @@ ListMemberAssignmentsResponse, ListMemberAssignmentsResponseTypedDict, ) + from .listobservabilitydestinationsresponse import ( + ListObservabilityDestinationsResponse, + ListObservabilityDestinationsResponseTypedDict, + ) + from .listworkspacesresponse import ( + ListWorkspacesResponse, + ListWorkspacesResponseTypedDict, + ) + from .localshellcallitem import ( + LocalShellCallItem, + LocalShellCallItemAction, + LocalShellCallItemActionTypedDict, + LocalShellCallItemTypedDict, + TypeExec, + TypeLocalShellCall, + ) + from .localshellcalloutputitem import ( + LocalShellCallOutputItem, + LocalShellCallOutputItemStatus, + LocalShellCallOutputItemType, + LocalShellCallOutputItemTypedDict, + ) + from .mcpapprovalrequestitem import ( + McpApprovalRequestItem, + McpApprovalRequestItemType, + McpApprovalRequestItemTypedDict, + ) + from .mcpapprovalresponseitem import ( + McpApprovalResponseItem, + McpApprovalResponseItemType, + McpApprovalResponseItemTypedDict, + ) + from .mcpcallitem import McpCallItem, McpCallItemType, McpCallItemTypedDict + from .mcplisttoolsitem import ( + McpListToolsItem, + McpListToolsItemTool, + McpListToolsItemToolTypedDict, + McpListToolsItemType, + McpListToolsItemTypedDict, + ) from .mcpservertool import ( AllowedTools, AllowedToolsTypedDict, @@ -679,6 +907,7 @@ RequireApprovalUnionTypedDict, ) from .memberassignment import MemberAssignment, MemberAssignmentTypedDict + from .metadatalevel import MetadataLevel from .model import Model, ModelTypedDict from .modelarchitecture import ( ModelArchitecture, @@ -688,9 +917,9 @@ from .modelgroup import ModelGroup from .modellinks import ModelLinks, ModelLinksTypedDict from .modelscountresponse import ( - Data, - DataTypedDict, ModelsCountResponse, + ModelsCountResponseData, + ModelsCountResponseDataTypedDict, ModelsCountResponseTypedDict, ) from .modelslistresponse import ModelsListResponse, ModelsListResponseTypedDict @@ -699,10 +928,163 @@ ModerationPluginID, ModerationPluginTypedDict, ) + from .multimodalmedia import MultimodalMedia, MultimodalMediaTypedDict from .notfoundresponseerrordata import ( NotFoundResponseErrorData, NotFoundResponseErrorDataTypedDict, ) + from .observabilityarizedestination import ( + ObservabilityArizeDestination, + ObservabilityArizeDestinationConfig, + ObservabilityArizeDestinationConfigTypedDict, + ObservabilityArizeDestinationType, + ObservabilityArizeDestinationTypedDict, + ) + from .observabilitybraintrustdestination import ( + ObservabilityBraintrustDestination, + ObservabilityBraintrustDestinationConfig, + ObservabilityBraintrustDestinationConfigTypedDict, + ObservabilityBraintrustDestinationType, + ObservabilityBraintrustDestinationTypedDict, + ) + from .observabilityclickhousedestination import ( + ObservabilityClickhouseDestination, + ObservabilityClickhouseDestinationConfig, + ObservabilityClickhouseDestinationConfigTypedDict, + ObservabilityClickhouseDestinationType, + ObservabilityClickhouseDestinationTypedDict, + ) + from .observabilitydatadogdestination import ( + ObservabilityDatadogDestination, + ObservabilityDatadogDestinationConfig, + ObservabilityDatadogDestinationConfigTypedDict, + ObservabilityDatadogDestinationType, + ObservabilityDatadogDestinationTypedDict, + ) + from .observabilitydestination import ( + ObservabilityDestination, + ObservabilityDestinationTypedDict, + ) + from .observabilityfilterrulesconfig import ( + FieldT, + Group, + GroupTypedDict, + Logic, + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, + ObservabilityFilterRulesConfigValue, + ObservabilityFilterRulesConfigValueTypedDict, + Operator, + Rule, + RuleTypedDict, + ) + from .observabilitygrafanadestination import ( + ObservabilityGrafanaDestination, + ObservabilityGrafanaDestinationConfig, + ObservabilityGrafanaDestinationConfigTypedDict, + ObservabilityGrafanaDestinationType, + ObservabilityGrafanaDestinationTypedDict, + ) + from .observabilitylangfusedestination import ( + ObservabilityLangfuseDestination, + ObservabilityLangfuseDestinationConfig, + ObservabilityLangfuseDestinationConfigTypedDict, + ObservabilityLangfuseDestinationType, + ObservabilityLangfuseDestinationTypedDict, + ) + from .observabilitylangsmithdestination import ( + ObservabilityLangsmithDestination, + ObservabilityLangsmithDestinationConfig, + ObservabilityLangsmithDestinationConfigTypedDict, + ObservabilityLangsmithDestinationType, + ObservabilityLangsmithDestinationTypedDict, + ) + from .observabilitynewrelicdestination import ( + ObservabilityNewrelicDestination, + ObservabilityNewrelicDestinationConfig, + ObservabilityNewrelicDestinationConfigTypedDict, + ObservabilityNewrelicDestinationType, + ObservabilityNewrelicDestinationTypedDict, + Region, + ) + from .observabilityopikdestination import ( + ObservabilityOpikDestination, + ObservabilityOpikDestinationConfig, + ObservabilityOpikDestinationConfigTypedDict, + ObservabilityOpikDestinationType, + ObservabilityOpikDestinationTypedDict, + ) + from .observabilityotelcollectordestination import ( + ObservabilityOtelCollectorDestination, + ObservabilityOtelCollectorDestinationConfig, + ObservabilityOtelCollectorDestinationConfigTypedDict, + ObservabilityOtelCollectorDestinationType, + ObservabilityOtelCollectorDestinationTypedDict, + ) + from .observabilityposthogdestination import ( + ObservabilityPosthogDestination, + ObservabilityPosthogDestinationConfig, + ObservabilityPosthogDestinationConfigTypedDict, + ObservabilityPosthogDestinationType, + ObservabilityPosthogDestinationTypedDict, + ) + from .observabilityrampdestination import ( + ObservabilityRampDestination, + ObservabilityRampDestinationConfig, + ObservabilityRampDestinationConfigTypedDict, + ObservabilityRampDestinationType, + ObservabilityRampDestinationTypedDict, + ) + from .observabilitys3destination import ( + ObservabilityS3Destination, + ObservabilityS3DestinationConfig, + ObservabilityS3DestinationConfigTypedDict, + ObservabilityS3DestinationType, + ObservabilityS3DestinationTypedDict, + ) + from .observabilitysentrydestination import ( + ObservabilitySentryDestination, + ObservabilitySentryDestinationConfig, + ObservabilitySentryDestinationConfigTypedDict, + ObservabilitySentryDestinationType, + ObservabilitySentryDestinationTypedDict, + ) + from .observabilitysnowflakedestination import ( + ObservabilitySnowflakeDestination, + ObservabilitySnowflakeDestinationConfig, + ObservabilitySnowflakeDestinationConfigTypedDict, + ObservabilitySnowflakeDestinationType, + ObservabilitySnowflakeDestinationTypedDict, + ) + from .observabilityweavedestination import ( + ObservabilityWeaveDestination, + ObservabilityWeaveDestinationConfig, + ObservabilityWeaveDestinationConfigTypedDict, + ObservabilityWeaveDestinationType, + ObservabilityWeaveDestinationTypedDict, + ) + from .observabilitywebhookdestination import ( + Method, + ObservabilityWebhookDestination, + ObservabilityWebhookDestinationConfig, + ObservabilityWebhookDestinationConfigTypedDict, + ObservabilityWebhookDestinationType, + ObservabilityWebhookDestinationTypedDict, + ) + from .openairesponsecustomtoolcall import ( + OpenAIResponseCustomToolCall, + OpenAIResponseCustomToolCallType, + OpenAIResponseCustomToolCallTypedDict, + ) + from .openairesponsecustomtoolcalloutput import ( + OpenAIResponseCustomToolCallOutput, + OpenAIResponseCustomToolCallOutputOutput1, + OpenAIResponseCustomToolCallOutputOutput1TypedDict, + OpenAIResponseCustomToolCallOutputOutput2, + OpenAIResponseCustomToolCallOutputOutput2TypedDict, + OpenAIResponseCustomToolCallOutputType, + OpenAIResponseCustomToolCallOutputTypedDict, + ) from .openairesponsefunctiontoolcall import ( OpenAIResponseFunctionToolCall, OpenAIResponseFunctionToolCallType, @@ -742,12 +1124,18 @@ from .openairesponsesresponsestatus import OpenAIResponsesResponseStatus from .openairesponsestoolchoice_union import ( OpenAIResponsesToolChoice, + OpenAIResponsesToolChoiceApplyPatch, + OpenAIResponsesToolChoiceApplyPatchTypedDict, OpenAIResponsesToolChoiceAuto, OpenAIResponsesToolChoiceFunction, OpenAIResponsesToolChoiceFunctionTypedDict, OpenAIResponsesToolChoiceNone, OpenAIResponsesToolChoiceRequired, + OpenAIResponsesToolChoiceShell, + OpenAIResponsesToolChoiceShellTypedDict, + OpenAIResponsesToolChoiceTypeApplyPatch, OpenAIResponsesToolChoiceTypeFunction, + OpenAIResponsesToolChoiceTypeShell, OpenAIResponsesToolChoiceTypeWebSearchPreview, OpenAIResponsesToolChoiceTypeWebSearchPreview20250311, OpenAIResponsesToolChoiceTypedDict, @@ -777,11 +1165,17 @@ OpenResponsesResultType, OpenResponsesResultTypedDict, ) + from .openroutermetadata import OpenRouterMetadata, OpenRouterMetadataTypedDict from .openrouterwebsearchservertool import ( OpenRouterWebSearchServerTool, OpenRouterWebSearchServerToolType, OpenRouterWebSearchServerToolTypedDict, ) + from .outputapplypatchcallitem import ( + OutputApplyPatchCallItem, + OutputApplyPatchCallItemType, + OutputApplyPatchCallItemTypedDict, + ) from .outputapplypatchservertoolitem import ( OutputApplyPatchServerToolItem, OutputApplyPatchServerToolItemType, @@ -823,6 +1217,11 @@ PendingSafetyCheck, PendingSafetyCheckTypedDict, ) + from .outputcustomtoolcallitem import ( + OutputCustomToolCallItem, + OutputCustomToolCallItemType, + OutputCustomToolCallItemTypedDict, + ) from .outputdatetimeitem import ( OutputDatetimeItem, OutputDatetimeItemType, @@ -848,6 +1247,25 @@ OutputFunctionCallItemType, OutputFunctionCallItemTypedDict, ) + from .outputfusionservertoolitem import ( + Analysis, + AnalysisTypedDict, + Contradiction, + ContradictionTypedDict, + FailedModel, + FailedModelTypedDict, + OutputFusionServerToolItem, + OutputFusionServerToolItemType, + OutputFusionServerToolItemTypedDict, + PartialCoverage, + PartialCoverageTypedDict, + Response, + ResponseTypedDict, + Stance, + StanceTypedDict, + UniqueInsight, + UniqueInsightTypedDict, + ) from .outputimagegenerationcallitem import ( OutputImageGenerationCallItem, OutputImageGenerationCallItemType, @@ -921,6 +1339,11 @@ OutputReasoningItemType, OutputReasoningItemTypedDict, ) + from .outputsearchmodelsservertoolitem import ( + OutputSearchModelsServerToolItem, + OutputSearchModelsServerToolItemType, + OutputSearchModelsServerToolItemTypedDict, + ) from .outputtexteditorservertoolitem import ( Command, OutputTextEditorServerToolItem, @@ -943,22 +1366,33 @@ ActionFindInPageTypedDict, ActionOpenPage, ActionOpenPageTypedDict, - ActionSearch, - ActionSearchTypedDict, + ActionTypeSearch, ActionTypedDict, OutputWebSearchCallItem, + OutputWebSearchCallItemActionSearch, + OutputWebSearchCallItemActionSearchTypedDict, OutputWebSearchCallItemTypedDict, TypeFindInPage, TypeOpenPage, - TypeSearch, TypeWebSearchCall, ) from .outputwebsearchservertoolitem import ( OutputWebSearchServerToolItem, - OutputWebSearchServerToolItemType, + OutputWebSearchServerToolItemAction, + OutputWebSearchServerToolItemActionTypedDict, + OutputWebSearchServerToolItemTypeOpenrouterWebSearch, + OutputWebSearchServerToolItemTypeSearch, + OutputWebSearchServerToolItemTypeURL, OutputWebSearchServerToolItemTypedDict, + Source, + SourceTypedDict, ) from .parameter import Parameter + from .paretorouterplugin import ( + ParetoRouterPlugin, + ParetoRouterPluginID, + ParetoRouterPluginTypedDict, + ) from .payloadtoolargeresponseerrordata import ( PayloadTooLargeResponseErrorData, PayloadTooLargeResponseErrorDataTypedDict, @@ -984,6 +1418,8 @@ PercentileThroughputCutoffsTypedDict, ) from .perrequestlimits import PerRequestLimits, PerRequestLimitsTypedDict + from .pipelinestage import PipelineStage, PipelineStageTypedDict + from .pipelinestagetype import PipelineStageType from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict from .preferredminthroughput import ( PreferredMinThroughput, @@ -1005,6 +1441,7 @@ PreviewWebSearchUserLocationTypedDict, ) from .providername import ProviderName + from .provideroptions import ProviderOptions, ProviderOptionsTypedDict from .provideroverloadedresponseerrordata import ( ProviderOverloadedResponseErrorData, ProviderOverloadedResponseErrorDataTypedDict, @@ -1164,6 +1601,13 @@ ResponsesRequestType, ResponsesRequestTypedDict, ) + from .responsesstreamingresponse import ( + ResponsesStreamingResponse, + ResponsesStreamingResponseTypedDict, + ) + from .routerattempt import RouterAttempt, RouterAttemptTypedDict + from .routerparams import RouterParams, RouterParamsTypedDict + from .routingstrategy import RoutingStrategy from .searchcontextsizeenum import SearchContextSizeEnum from .searchmodelsservertoolconfig import ( SearchModelsServerToolConfig, @@ -1175,11 +1619,34 @@ ServiceUnavailableResponseErrorData, ServiceUnavailableResponseErrorDataTypedDict, ) + from .shellcallitem import ( + ShellCallItem, + ShellCallItemAction, + ShellCallItemActionTypedDict, + ShellCallItemStatus, + ShellCallItemType, + ShellCallItemTypedDict, + ) + from .shellcalloutputitem import ( + ShellCallOutputItem, + ShellCallOutputItemOutput, + ShellCallOutputItemOutputTypedDict, + ShellCallOutputItemStatus, + ShellCallOutputItemType, + ShellCallOutputItemTypedDict, + ) from .shellservertool import ( ShellServerTool, ShellServerToolType, ShellServerToolTypedDict, ) + from .speechrequest import ( + ResponseFormatEnum, + SpeechRequest, + SpeechRequestProvider, + SpeechRequestProviderTypedDict, + SpeechRequestTypedDict, + ) from .storedprompttemplate import ( StoredPromptTemplate, StoredPromptTemplateTypedDict, @@ -1217,7 +1684,15 @@ StreamLogprobTopLogprob, StreamLogprobTopLogprobTypedDict, ) - from .textconfig import TextConfig, TextConfigTypedDict, TextConfigVerbosity + from .sttinputaudio import STTInputAudio, STTInputAudioTypedDict + from .sttrequest import ( + STTRequest, + STTRequestProvider, + STTRequestProviderTypedDict, + STTRequestTypedDict, + ) + from .sttresponse import STTResponse, STTResponseTypedDict + from .sttusage import STTUsage, STTUsageTypedDict from .textdeltaevent import ( TextDeltaEvent, TextDeltaEventType, @@ -1227,7 +1702,7 @@ from .textextendedconfig import ( TextExtendedConfig, TextExtendedConfigTypedDict, - TextExtendedConfigVerbosity, + Verbosity, ) from .toolcallstatus import ToolCallStatus from .toolchoiceallowed import ( @@ -1262,25 +1737,33 @@ UpdateGuardrailResponse, UpdateGuardrailResponseTypedDict, ) + from .updateworkspacerequest import ( + UpdateWorkspaceRequest, + UpdateWorkspaceRequestTypedDict, + ) + from .updateworkspaceresponse import ( + UpdateWorkspaceResponse, + UpdateWorkspaceResponseTypedDict, + ) from .urlcitation import URLCitation, URLCitationType, URLCitationTypedDict from .usage import ( - CostDetails, - CostDetailsTypedDict, InputTokensDetails, InputTokensDetailsTypedDict, OutputTokensDetails, OutputTokensDetailsTypedDict, Usage, + UsageCostDetails, + UsageCostDetailsTypedDict, UsageTypedDict, ) from .videogenerationrequest import ( AspectRatio, Options, OptionsTypedDict, - Provider, - ProviderTypedDict, Resolution, VideoGenerationRequest, + VideoGenerationRequestProvider, + VideoGenerationRequestProviderTypedDict, VideoGenerationRequestTypedDict, ) from .videogenerationresponse import ( @@ -1304,6 +1787,16 @@ VideoModelsListResponse, VideoModelsListResponseTypedDict, ) + from .webfetchengineenum import WebFetchEngineEnum + from .webfetchservertool import ( + WebFetchServerTool, + WebFetchServerToolType, + WebFetchServerToolTypedDict, + ) + from .webfetchservertoolconfig import ( + WebFetchServerToolConfig, + WebFetchServerToolConfigTypedDict, + ) from .websearchcallcompletedevent import ( WebSearchCallCompletedEvent, WebSearchCallCompletedEventType, @@ -1327,8 +1820,11 @@ from .websearchengine import WebSearchEngine from .websearchengineenum import WebSearchEngineEnum from .websearchplugin import ( + UserLocation, + UserLocationTypedDict, WebSearchPlugin, WebSearchPluginID, + WebSearchPluginType, WebSearchPluginTypedDict, ) from .websearchservertool import ( @@ -1337,12 +1833,14 @@ WebSearchServerToolTypedDict, ) from .websearchservertool_openrouter import ( - Parameters, - ParametersTypedDict, WebSearchServerToolOpenRouter, WebSearchServerToolOpenRouterType, WebSearchServerToolOpenRouterTypedDict, ) + from .websearchservertoolconfig import ( + WebSearchServerToolConfig, + WebSearchServerToolConfigTypedDict, + ) from .websearchsource import ( WebSearchSource, WebSearchSourceType, @@ -1359,16 +1857,22 @@ WebSearchUserLocationServerToolType, WebSearchUserLocationServerToolTypedDict, ) + from .workspace import Workspace, WorkspaceTypedDict + from .workspacemember import ( + WorkspaceMember, + WorkspaceMemberRole, + WorkspaceMemberTypedDict, + ) __all__ = [ + "APIType", "Action", "ActionEnum", "ActionFindInPage", "ActionFindInPageTypedDict", "ActionOpenPage", "ActionOpenPageTypedDict", - "ActionSearch", - "ActionSearchTypedDict", + "ActionTypeSearch", "ActionTypedDict", "ActivityItem", "ActivityItemTypedDict", @@ -1380,6 +1884,8 @@ "AllowedToolsUnionTypedDict", "Always", "AlwaysTypedDict", + "Analysis", + "AnalysisTypedDict", "AnnotationAddedEvent", "AnnotationAddedEventType", "AnnotationAddedEventTypedDict", @@ -1387,7 +1893,34 @@ "AnthropicCacheControlDirectiveType", "AnthropicCacheControlDirectiveTypedDict", "AnthropicCacheControlTTL", + "ApplyPatchCallItem", + "ApplyPatchCallItemType", + "ApplyPatchCallItemTypedDict", + "ApplyPatchCallOperation", + "ApplyPatchCallOperationCreateFile", + "ApplyPatchCallOperationCreateFileTypedDict", + "ApplyPatchCallOperationDeleteFile", + "ApplyPatchCallOperationDeleteFileTypedDict", + "ApplyPatchCallOperationDiffDeltaEvent", + "ApplyPatchCallOperationDiffDeltaEventType", + "ApplyPatchCallOperationDiffDeltaEventTypedDict", + "ApplyPatchCallOperationDiffDoneEvent", + "ApplyPatchCallOperationDiffDoneEventType", + "ApplyPatchCallOperationDiffDoneEventTypedDict", + "ApplyPatchCallOperationTypedDict", + "ApplyPatchCallOperationUpdateFile", + "ApplyPatchCallOperationUpdateFileTypedDict", + "ApplyPatchCallOutputItem", + "ApplyPatchCallOutputItemStatus", + "ApplyPatchCallOutputItemType", + "ApplyPatchCallOutputItemTypedDict", + "ApplyPatchCallStatus", "ApplyPatchServerTool", + "ApplyPatchServerToolConfig", + "ApplyPatchServerToolConfigTypedDict", + "ApplyPatchServerToolOpenRouter", + "ApplyPatchServerToolOpenRouterType", + "ApplyPatchServerToolOpenRouterTypedDict", "ApplyPatchServerToolType", "ApplyPatchServerToolTypedDict", "Architecture", @@ -1396,6 +1929,9 @@ "AutoRouterPlugin", "AutoRouterPluginID", "AutoRouterPluginTypedDict", + "BYOKKey", + "BYOKKeyTypedDict", + "BYOKProviderSlug", "Background", "BadGatewayResponseErrorData", "BadGatewayResponseErrorDataTypedDict", @@ -1424,6 +1960,10 @@ "BaseInputsUnionTypedDict", "BaseReasoningConfig", "BaseReasoningConfigTypedDict", + "BulkAddWorkspaceMembersRequest", + "BulkAddWorkspaceMembersRequestTypedDict", + "BulkAddWorkspaceMembersResponse", + "BulkAddWorkspaceMembersResponseTypedDict", "BulkAssignKeysRequest", "BulkAssignKeysRequestTypedDict", "BulkAssignKeysResponse", @@ -1432,6 +1972,10 @@ "BulkAssignMembersRequestTypedDict", "BulkAssignMembersResponse", "BulkAssignMembersResponseTypedDict", + "BulkRemoveWorkspaceMembersRequest", + "BulkRemoveWorkspaceMembersRequestTypedDict", + "BulkRemoveWorkspaceMembersResponse", + "BulkRemoveWorkspaceMembersResponseTypedDict", "BulkUnassignKeysRequest", "BulkUnassignKeysRequestTypedDict", "BulkUnassignKeysResponse", @@ -1544,6 +2088,8 @@ "ChatStreamToolCallFunctionTypedDict", "ChatStreamToolCallType", "ChatStreamToolCallTypedDict", + "ChatStreamingResponse", + "ChatStreamingResponseTypedDict", "ChatSystemMessage", "ChatSystemMessageContent", "ChatSystemMessageContentTypedDict", @@ -1587,6 +2133,9 @@ "CodexLocalShellToolType", "CodexLocalShellToolTypedDict", "Command", + "CompactionItem", + "CompactionItemType", + "CompactionItemTypedDict", "CompletionTokensDetails", "CompletionTokensDetailsTypedDict", "CompoundFilter", @@ -1603,6 +2152,13 @@ "ContainerAutoTypedDict", "ContainerType", "ContainerTypedDict", + "ContentFilterAction", + "ContentFilterBuiltinAction", + "ContentFilterBuiltinEntry", + "ContentFilterBuiltinEntryTypedDict", + "ContentFilterBuiltinSlug", + "ContentFilterEntry", + "ContentFilterEntryTypedDict", "ContentPartAddedEvent", "ContentPartAddedEventPart", "ContentPartAddedEventPartTypedDict", @@ -1618,21 +2174,54 @@ "ContentPartImageImageURLTypedDict", "ContentPartImageType", "ContentPartImageTypedDict", + "ContentPartInputAudio", + "ContentPartInputAudioType", + "ContentPartInputAudioTypedDict", + "ContentPartInputFile", + "ContentPartInputFileType", + "ContentPartInputFileTypedDict", + "ContentPartInputVideo", + "ContentPartInputVideoType", + "ContentPartInputVideoTypedDict", "ContextCompressionEngine", "ContextCompressionPlugin", "ContextCompressionPluginID", "ContextCompressionPluginTypedDict", + "Contradiction", + "ContradictionTypedDict", "CostDetails", "CostDetailsTypedDict", "CreateGuardrailRequest", "CreateGuardrailRequestTypedDict", "CreateGuardrailResponse", "CreateGuardrailResponseTypedDict", + "CreateWorkspaceRequest", + "CreateWorkspaceRequestTypedDict", + "CreateWorkspaceResponse", + "CreateWorkspaceResponseTypedDict", "CustomTool", + "CustomToolCallInputDeltaEvent", + "CustomToolCallInputDeltaEventType", + "CustomToolCallInputDeltaEventTypedDict", + "CustomToolCallInputDoneEvent", + "CustomToolCallInputDoneEventType", + "CustomToolCallInputDoneEventTypedDict", + "CustomToolCallItem", + "CustomToolCallItemType", + "CustomToolCallItemTypedDict", + "CustomToolCallOutputItem", + "CustomToolCallOutputItemDetail", + "CustomToolCallOutputItemOutputInputImage", + "CustomToolCallOutputItemOutputInputImageTypedDict", + "CustomToolCallOutputItemOutputType", + "CustomToolCallOutputItemOutputUnion1", + "CustomToolCallOutputItemOutputUnion1TypedDict", + "CustomToolCallOutputItemOutputUnion2", + "CustomToolCallOutputItemOutputUnion2TypedDict", + "CustomToolCallOutputItemTypeCustomToolCallOutput", + "CustomToolCallOutputItemTypedDict", "CustomToolTypedDict", - "Data", "DataCollection", - "DataTypedDict", "DatetimeServerTool", "DatetimeServerToolConfig", "DatetimeServerToolConfigTypedDict", @@ -1642,6 +2231,8 @@ "DefaultParametersTypedDict", "DeleteGuardrailResponse", "DeleteGuardrailResponseTypedDict", + "DeleteWorkspaceResponse", + "DeleteWorkspaceResponseTypedDict", "EasyInputMessage", "EasyInputMessageContentInputImage", "EasyInputMessageContentInputImageTypedDict", @@ -1666,13 +2257,20 @@ "EdgeNetworkTimeoutResponseErrorData", "EdgeNetworkTimeoutResponseErrorDataTypedDict", "Effort", + "EndpointInfo", + "EndpointInfoTypedDict", "EndpointStatus", + "EndpointsMetadata", + "EndpointsMetadataTypedDict", "Environment", "Error", "ErrorEvent", "ErrorEventType", "ErrorEventTypedDict", "ErrorTypedDict", + "FailedModel", + "FailedModelTypedDict", + "FieldT", "File", "FileCitation", "FileCitationType", @@ -1685,6 +2283,10 @@ "FilePathTypedDict", "FileSearchServerTool", "FileSearchServerToolTypedDict", + "FileSearchServerToolValue1", + "FileSearchServerToolValue1TypedDict", + "FileSearchServerToolValue2", + "FileSearchServerToolValue2TypedDict", "FileTypedDict", "Filters", "FiltersType", @@ -1730,6 +2332,8 @@ "FunctionCallItemTypedDict", "FunctionCallOutputItem", "FunctionCallOutputItemDetail", + "FunctionCallOutputItemOutputInputImage", + "FunctionCallOutputItemOutputInputImageTypedDict", "FunctionCallOutputItemOutputType", "FunctionCallOutputItemOutputUnion1", "FunctionCallOutputItemOutputUnion1TypedDict", @@ -1738,8 +2342,34 @@ "FunctionCallOutputItemStatus", "FunctionCallOutputItemTypeFunctionCallOutput", "FunctionCallOutputItemTypedDict", + "FusionPlugin", + "FusionPluginID", + "FusionPluginTypedDict", + "FusionServerToolConfig", + "FusionServerToolConfigTypedDict", + "FusionServerToolOpenRouter", + "FusionServerToolOpenRouterType", + "FusionServerToolOpenRouterTypedDict", + "GenerationContentData", + "GenerationContentDataOutput", + "GenerationContentDataOutputTypedDict", + "GenerationContentDataTypedDict", + "GenerationContentResponse", + "GenerationContentResponseTypedDict", + "GenerationResponse", + "GenerationResponseData", + "GenerationResponseDataTypedDict", + "GenerationResponseTypedDict", + "GetBYOKKeyResponse", + "GetBYOKKeyResponseTypedDict", "GetGuardrailResponse", "GetGuardrailResponseTypedDict", + "GetObservabilityDestinationResponse", + "GetObservabilityDestinationResponseTypedDict", + "GetWorkspaceResponse", + "GetWorkspaceResponseTypedDict", + "Group", + "GroupTypedDict", "Guardrail", "GuardrailInterval", "GuardrailTypedDict", @@ -1772,6 +2402,10 @@ "ImageGenerationStatus", "IncompleteDetails", "IncompleteDetailsTypedDict", + "Input1", + "Input1TypedDict", + "Input2", + "Input2TypedDict", "InputAudio", "InputAudioInputAudio", "InputAudioInputAudioTypedDict", @@ -1807,6 +2441,8 @@ "InputTextTypedDict", "InputTokensDetails", "InputTokensDetailsTypedDict", + "InputUnion", + "InputUnionTypedDict", "InputVideo", "InputVideoType", "InputVideoTypedDict", @@ -1842,6 +2478,9 @@ "InstructType", "InternalServerResponseErrorData", "InternalServerResponseErrorDataTypedDict", + "ItemReferenceItem", + "ItemReferenceItemType", + "ItemReferenceItemTypedDict", "KeyAssignment", "KeyAssignmentTypedDict", "LegacyChatContentVideo", @@ -1850,6 +2489,8 @@ "LegacyWebSearchServerTool", "LegacyWebSearchServerToolType", "LegacyWebSearchServerToolTypedDict", + "ListBYOKKeysResponse", + "ListBYOKKeysResponseTypedDict", "ListEndpointsResponse", "ListEndpointsResponseTypedDict", "ListGuardrailsResponse", @@ -1858,16 +2499,45 @@ "ListKeyAssignmentsResponseTypedDict", "ListMemberAssignmentsResponse", "ListMemberAssignmentsResponseTypedDict", + "ListObservabilityDestinationsResponse", + "ListObservabilityDestinationsResponseTypedDict", + "ListWorkspacesResponse", + "ListWorkspacesResponseTypedDict", + "LocalShellCallItem", + "LocalShellCallItemAction", + "LocalShellCallItemActionTypedDict", + "LocalShellCallItemTypedDict", + "LocalShellCallOutputItem", + "LocalShellCallOutputItemStatus", + "LocalShellCallOutputItemType", + "LocalShellCallOutputItemTypedDict", + "Logic", "Logprob", "LogprobTypedDict", "MaxPrice", "MaxPriceTypedDict", + "McpApprovalRequestItem", + "McpApprovalRequestItemType", + "McpApprovalRequestItemTypedDict", + "McpApprovalResponseItem", + "McpApprovalResponseItemType", + "McpApprovalResponseItemTypedDict", + "McpCallItem", + "McpCallItemType", + "McpCallItemTypedDict", + "McpListToolsItem", + "McpListToolsItemTool", + "McpListToolsItemToolTypedDict", + "McpListToolsItemType", + "McpListToolsItemTypedDict", "McpServerTool", "McpServerToolType", "McpServerToolTypedDict", "MemberAssignment", "MemberAssignmentTypedDict", "MemoryLimit", + "MetadataLevel", + "Method", "Modality", "Mode", "ModeAuto", @@ -1883,6 +2553,8 @@ "ModelLinksTypedDict", "ModelTypedDict", "ModelsCountResponse", + "ModelsCountResponseData", + "ModelsCountResponseDataTypedDict", "ModelsCountResponseTypedDict", "ModelsListResponse", "ModelsListResponseTypedDict", @@ -1890,12 +2562,115 @@ "ModerationPlugin", "ModerationPluginID", "ModerationPluginTypedDict", + "MultimodalMedia", + "MultimodalMediaTypedDict", "Never", "NeverTypedDict", "NotFoundResponseErrorData", "NotFoundResponseErrorDataTypedDict", + "ObservabilityArizeDestination", + "ObservabilityArizeDestinationConfig", + "ObservabilityArizeDestinationConfigTypedDict", + "ObservabilityArizeDestinationType", + "ObservabilityArizeDestinationTypedDict", + "ObservabilityBraintrustDestination", + "ObservabilityBraintrustDestinationConfig", + "ObservabilityBraintrustDestinationConfigTypedDict", + "ObservabilityBraintrustDestinationType", + "ObservabilityBraintrustDestinationTypedDict", + "ObservabilityClickhouseDestination", + "ObservabilityClickhouseDestinationConfig", + "ObservabilityClickhouseDestinationConfigTypedDict", + "ObservabilityClickhouseDestinationType", + "ObservabilityClickhouseDestinationTypedDict", + "ObservabilityDatadogDestination", + "ObservabilityDatadogDestinationConfig", + "ObservabilityDatadogDestinationConfigTypedDict", + "ObservabilityDatadogDestinationType", + "ObservabilityDatadogDestinationTypedDict", + "ObservabilityDestination", + "ObservabilityDestinationTypedDict", + "ObservabilityFilterRulesConfig", + "ObservabilityFilterRulesConfigTypedDict", + "ObservabilityFilterRulesConfigValue", + "ObservabilityFilterRulesConfigValueTypedDict", + "ObservabilityGrafanaDestination", + "ObservabilityGrafanaDestinationConfig", + "ObservabilityGrafanaDestinationConfigTypedDict", + "ObservabilityGrafanaDestinationType", + "ObservabilityGrafanaDestinationTypedDict", + "ObservabilityLangfuseDestination", + "ObservabilityLangfuseDestinationConfig", + "ObservabilityLangfuseDestinationConfigTypedDict", + "ObservabilityLangfuseDestinationType", + "ObservabilityLangfuseDestinationTypedDict", + "ObservabilityLangsmithDestination", + "ObservabilityLangsmithDestinationConfig", + "ObservabilityLangsmithDestinationConfigTypedDict", + "ObservabilityLangsmithDestinationType", + "ObservabilityLangsmithDestinationTypedDict", + "ObservabilityNewrelicDestination", + "ObservabilityNewrelicDestinationConfig", + "ObservabilityNewrelicDestinationConfigTypedDict", + "ObservabilityNewrelicDestinationType", + "ObservabilityNewrelicDestinationTypedDict", + "ObservabilityOpikDestination", + "ObservabilityOpikDestinationConfig", + "ObservabilityOpikDestinationConfigTypedDict", + "ObservabilityOpikDestinationType", + "ObservabilityOpikDestinationTypedDict", + "ObservabilityOtelCollectorDestination", + "ObservabilityOtelCollectorDestinationConfig", + "ObservabilityOtelCollectorDestinationConfigTypedDict", + "ObservabilityOtelCollectorDestinationType", + "ObservabilityOtelCollectorDestinationTypedDict", + "ObservabilityPosthogDestination", + "ObservabilityPosthogDestinationConfig", + "ObservabilityPosthogDestinationConfigTypedDict", + "ObservabilityPosthogDestinationType", + "ObservabilityPosthogDestinationTypedDict", + "ObservabilityRampDestination", + "ObservabilityRampDestinationConfig", + "ObservabilityRampDestinationConfigTypedDict", + "ObservabilityRampDestinationType", + "ObservabilityRampDestinationTypedDict", + "ObservabilityS3Destination", + "ObservabilityS3DestinationConfig", + "ObservabilityS3DestinationConfigTypedDict", + "ObservabilityS3DestinationType", + "ObservabilityS3DestinationTypedDict", + "ObservabilitySentryDestination", + "ObservabilitySentryDestinationConfig", + "ObservabilitySentryDestinationConfigTypedDict", + "ObservabilitySentryDestinationType", + "ObservabilitySentryDestinationTypedDict", + "ObservabilitySnowflakeDestination", + "ObservabilitySnowflakeDestinationConfig", + "ObservabilitySnowflakeDestinationConfigTypedDict", + "ObservabilitySnowflakeDestinationType", + "ObservabilitySnowflakeDestinationTypedDict", + "ObservabilityWeaveDestination", + "ObservabilityWeaveDestinationConfig", + "ObservabilityWeaveDestinationConfigTypedDict", + "ObservabilityWeaveDestinationType", + "ObservabilityWeaveDestinationTypedDict", + "ObservabilityWebhookDestination", + "ObservabilityWebhookDestinationConfig", + "ObservabilityWebhookDestinationConfigTypedDict", + "ObservabilityWebhookDestinationType", + "ObservabilityWebhookDestinationTypedDict", "Only", "OnlyTypedDict", + "OpenAIResponseCustomToolCall", + "OpenAIResponseCustomToolCallOutput", + "OpenAIResponseCustomToolCallOutputOutput1", + "OpenAIResponseCustomToolCallOutputOutput1TypedDict", + "OpenAIResponseCustomToolCallOutputOutput2", + "OpenAIResponseCustomToolCallOutputOutput2TypedDict", + "OpenAIResponseCustomToolCallOutputType", + "OpenAIResponseCustomToolCallOutputTypedDict", + "OpenAIResponseCustomToolCallType", + "OpenAIResponseCustomToolCallTypedDict", "OpenAIResponseFunctionToolCall", "OpenAIResponseFunctionToolCallOutput", "OpenAIResponseFunctionToolCallOutputOutput1", @@ -1924,12 +2699,18 @@ "OpenAIResponsesRefusalContentTypedDict", "OpenAIResponsesResponseStatus", "OpenAIResponsesToolChoice", + "OpenAIResponsesToolChoiceApplyPatch", + "OpenAIResponsesToolChoiceApplyPatchTypedDict", "OpenAIResponsesToolChoiceAuto", "OpenAIResponsesToolChoiceFunction", "OpenAIResponsesToolChoiceFunctionTypedDict", "OpenAIResponsesToolChoiceNone", "OpenAIResponsesToolChoiceRequired", + "OpenAIResponsesToolChoiceShell", + "OpenAIResponsesToolChoiceShellTypedDict", + "OpenAIResponsesToolChoiceTypeApplyPatch", "OpenAIResponsesToolChoiceTypeFunction", + "OpenAIResponsesToolChoiceTypeShell", "OpenAIResponsesToolChoiceTypeWebSearchPreview", "OpenAIResponsesToolChoiceTypeWebSearchPreview20250311", "OpenAIResponsesToolChoiceTypedDict", @@ -1950,13 +2731,19 @@ "OpenResponsesResultToolUnionTypedDict", "OpenResponsesResultType", "OpenResponsesResultTypedDict", + "OpenRouterMetadata", + "OpenRouterMetadataTypedDict", "OpenRouterWebSearchServerTool", "OpenRouterWebSearchServerToolType", "OpenRouterWebSearchServerToolTypedDict", + "Operator", "Options", "OptionsTypedDict", "Order", "OrderTypedDict", + "OutputApplyPatchCallItem", + "OutputApplyPatchCallItemType", + "OutputApplyPatchCallItemTypedDict", "OutputApplyPatchServerToolItem", "OutputApplyPatchServerToolItemType", "OutputApplyPatchServerToolItemTypedDict", @@ -1977,6 +2764,9 @@ "OutputComputerCallItemStatus", "OutputComputerCallItemType", "OutputComputerCallItemTypedDict", + "OutputCustomToolCallItem", + "OutputCustomToolCallItemType", + "OutputCustomToolCallItemTypedDict", "OutputDatetimeItem", "OutputDatetimeItemType", "OutputDatetimeItemTypedDict", @@ -1995,6 +2785,9 @@ "OutputFunctionCallItemStatusUnionTypedDict", "OutputFunctionCallItemType", "OutputFunctionCallItemTypedDict", + "OutputFusionServerToolItem", + "OutputFusionServerToolItemType", + "OutputFusionServerToolItemTypedDict", "OutputImage", "OutputImageGenerationCallItem", "OutputImageGenerationCallItemType", @@ -2003,8 +2796,6 @@ "OutputImageGenerationServerToolItemType", "OutputImageGenerationServerToolItemTypedDict", "OutputImageTypedDict", - "OutputInputImage", - "OutputInputImageTypedDict", "OutputItemImageGenerationCall", "OutputItemImageGenerationCallType", "OutputItemImageGenerationCallTypedDict", @@ -2058,6 +2849,9 @@ "OutputReasoningItemStatusUnionTypedDict", "OutputReasoningItemType", "OutputReasoningItemTypedDict", + "OutputSearchModelsServerToolItem", + "OutputSearchModelsServerToolItemType", + "OutputSearchModelsServerToolItemTypedDict", "OutputTextEditorServerToolItem", "OutputTextEditorServerToolItemType", "OutputTextEditorServerToolItemTypedDict", @@ -2070,9 +2864,15 @@ "OutputWebFetchServerToolItemType", "OutputWebFetchServerToolItemTypedDict", "OutputWebSearchCallItem", + "OutputWebSearchCallItemActionSearch", + "OutputWebSearchCallItemActionSearchTypedDict", "OutputWebSearchCallItemTypedDict", "OutputWebSearchServerToolItem", - "OutputWebSearchServerToolItemType", + "OutputWebSearchServerToolItemAction", + "OutputWebSearchServerToolItemActionTypedDict", + "OutputWebSearchServerToolItemTypeOpenrouterWebSearch", + "OutputWebSearchServerToolItemTypeSearch", + "OutputWebSearchServerToolItemTypeURL", "OutputWebSearchServerToolItemTypedDict", "PDFParserEngine", "PDFParserEngineEnum", @@ -2081,8 +2881,11 @@ "PDFParserOptions", "PDFParserOptionsTypedDict", "Parameter", - "Parameters", - "ParametersTypedDict", + "ParetoRouterPlugin", + "ParetoRouterPluginID", + "ParetoRouterPluginTypedDict", + "PartialCoverage", + "PartialCoverageTypedDict", "Partition", "PayloadTooLargeResponseErrorData", "PayloadTooLargeResponseErrorDataTypedDict", @@ -2098,6 +2901,9 @@ "PercentileStatsTypedDict", "PercentileThroughputCutoffs", "PercentileThroughputCutoffsTypedDict", + "PipelineStage", + "PipelineStageType", + "PipelineStageTypedDict", "PreferredMaxLatency", "PreferredMaxLatencyTypedDict", "PreferredMinThroughput", @@ -2115,8 +2921,9 @@ "PricingTypedDict", "PromptTokensDetails", "PromptTokensDetailsTypedDict", - "Provider", "ProviderName", + "ProviderOptions", + "ProviderOptionsTypedDict", "ProviderOverloadedResponseErrorData", "ProviderOverloadedResponseErrorDataTypedDict", "ProviderPreferences", @@ -2127,7 +2934,6 @@ "ProviderSort", "ProviderSortConfig", "ProviderSortConfigTypedDict", - "ProviderTypedDict", "PublicEndpoint", "PublicEndpointQuantization", "PublicEndpointTypedDict", @@ -2195,6 +3001,7 @@ "RefusalDoneEvent", "RefusalDoneEventType", "RefusalDoneEventTypedDict", + "Region", "RequestTimeoutResponseErrorData", "RequestTimeoutResponseErrorDataTypedDict", "RequireApproval", @@ -2204,7 +3011,9 @@ "RequireApprovalUnion", "RequireApprovalUnionTypedDict", "Resolution", + "Response", "ResponseFormat", + "ResponseFormatEnum", "ResponseFormatTypedDict", "ResponseHealingPlugin", "ResponseHealingPluginID", @@ -2215,6 +3024,7 @@ "ResponseOutputTextTopLogprobTypedDict", "ResponseOutputTextType", "ResponseOutputTextTypedDict", + "ResponseTypedDict", "ResponsesErrorField", "ResponsesErrorFieldTypedDict", "ResponsesRequest", @@ -2227,6 +3037,25 @@ "ResponsesRequestToolUnionTypedDict", "ResponsesRequestType", "ResponsesRequestTypedDict", + "ResponsesStreamingResponse", + "ResponsesStreamingResponseTypedDict", + "RouterAttempt", + "RouterAttemptTypedDict", + "RouterParams", + "RouterParamsTypedDict", + "RoutingStrategy", + "Rule", + "RuleTypedDict", + "STTInputAudio", + "STTInputAudioTypedDict", + "STTRequest", + "STTRequestProvider", + "STTRequestProviderTypedDict", + "STTRequestTypedDict", + "STTResponse", + "STTResponseTypedDict", + "STTUsage", + "STTUsageTypedDict", "SearchContextSizeEnum", "SearchModelsServerToolConfig", "SearchModelsServerToolConfigTypedDict", @@ -2235,12 +3064,32 @@ "SecurityTypedDict", "ServiceUnavailableResponseErrorData", "ServiceUnavailableResponseErrorDataTypedDict", + "ShellCallItem", + "ShellCallItemAction", + "ShellCallItemActionTypedDict", + "ShellCallItemStatus", + "ShellCallItemType", + "ShellCallItemTypedDict", + "ShellCallOutputItem", + "ShellCallOutputItemOutput", + "ShellCallOutputItemOutputTypedDict", + "ShellCallOutputItemStatus", + "ShellCallOutputItemType", + "ShellCallOutputItemTypedDict", "ShellServerTool", "ShellServerToolType", "ShellServerToolTypedDict", "Size", "Sort", "SortTypedDict", + "Source", + "SourceTypedDict", + "SpeechRequest", + "SpeechRequestProvider", + "SpeechRequestProviderTypedDict", + "SpeechRequestTypedDict", + "Stance", + "StanceTypedDict", "Stop", "StopTypedDict", "StoredPromptTemplate", @@ -2271,9 +3120,6 @@ "SupportedResolution", "SupportedSize", "Syntax", - "TextConfig", - "TextConfigTypedDict", - "TextConfigVerbosity", "TextDeltaEvent", "TextDeltaEventType", "TextDeltaEventTypedDict", @@ -2282,7 +3128,6 @@ "TextDoneEventTypedDict", "TextExtendedConfig", "TextExtendedConfigTypedDict", - "TextExtendedConfigVerbosity", "Tokenizer", "TooManyRequestsResponseErrorData", "TooManyRequestsResponseErrorDataTypedDict", @@ -2298,35 +3143,48 @@ "Type", "TypeCodeInterpreter", "TypeCodeInterpreterCall", + "TypeCreateFile", "TypeCustom", + "TypeDeleteFile", + "TypeExec", "TypeFileSearch", "TypeFindInPage", "TypeImage", + "TypeLocalShellCall", "TypeLogs", "TypeOpenPage", - "TypeSearch", "TypeTypedDict", + "TypeUpdateFile", "TypeWebSearchCall", "URLCitation", "URLCitationType", "URLCitationTypedDict", "UnauthorizedResponseErrorData", "UnauthorizedResponseErrorDataTypedDict", + "UniqueInsight", + "UniqueInsightTypedDict", "UnprocessableEntityResponseErrorData", "UnprocessableEntityResponseErrorDataTypedDict", "UpdateGuardrailRequest", "UpdateGuardrailRequestTypedDict", "UpdateGuardrailResponse", "UpdateGuardrailResponseTypedDict", + "UpdateWorkspaceRequest", + "UpdateWorkspaceRequestTypedDict", + "UpdateWorkspaceResponse", + "UpdateWorkspaceResponseTypedDict", "Usage", + "UsageCostDetails", + "UsageCostDetailsTypedDict", "UsageTypedDict", - "Value1", - "Value1TypedDict", - "Value2", - "Value2TypedDict", + "UserLocation", + "UserLocationTypedDict", "Variables", "VariablesTypedDict", + "Verbosity", "VideoGenerationRequest", + "VideoGenerationRequestProvider", + "VideoGenerationRequestProviderTypedDict", "VideoGenerationRequestTypedDict", "VideoGenerationResponse", "VideoGenerationResponseStatus", @@ -2337,6 +3195,12 @@ "VideoModelTypedDict", "VideoModelsListResponse", "VideoModelsListResponseTypedDict", + "WebFetchEngineEnum", + "WebFetchServerTool", + "WebFetchServerToolConfig", + "WebFetchServerToolConfigTypedDict", + "WebFetchServerToolType", + "WebFetchServerToolTypedDict", "WebSearchCallCompletedEvent", "WebSearchCallCompletedEventType", "WebSearchCallCompletedEventTypedDict", @@ -2354,8 +3218,11 @@ "WebSearchEngineEnum", "WebSearchPlugin", "WebSearchPluginID", + "WebSearchPluginType", "WebSearchPluginTypedDict", "WebSearchServerTool", + "WebSearchServerToolConfig", + "WebSearchServerToolConfigTypedDict", "WebSearchServerToolOpenRouter", "WebSearchServerToolOpenRouterType", "WebSearchServerToolOpenRouterTypedDict", @@ -2371,6 +3238,11 @@ "WebSearchUserLocationServerToolTypedDict", "WebSearchUserLocationType", "WebSearchUserLocationTypedDict", + "Workspace", + "WorkspaceMember", + "WorkspaceMemberRole", + "WorkspaceMemberTypedDict", + "WorkspaceTypedDict", ] _dynamic_imports: dict[str, str] = { @@ -2385,9 +3257,39 @@ "AnthropicCacheControlDirectiveType": ".anthropiccachecontroldirective", "AnthropicCacheControlDirectiveTypedDict": ".anthropiccachecontroldirective", "AnthropicCacheControlTTL": ".anthropiccachecontrolttl", + "ApplyPatchCallItem": ".applypatchcallitem", + "ApplyPatchCallItemType": ".applypatchcallitem", + "ApplyPatchCallItemTypedDict": ".applypatchcallitem", + "ApplyPatchCallOperation": ".applypatchcalloperation", + "ApplyPatchCallOperationCreateFile": ".applypatchcalloperation", + "ApplyPatchCallOperationCreateFileTypedDict": ".applypatchcalloperation", + "ApplyPatchCallOperationDeleteFile": ".applypatchcalloperation", + "ApplyPatchCallOperationDeleteFileTypedDict": ".applypatchcalloperation", + "ApplyPatchCallOperationTypedDict": ".applypatchcalloperation", + "ApplyPatchCallOperationUpdateFile": ".applypatchcalloperation", + "ApplyPatchCallOperationUpdateFileTypedDict": ".applypatchcalloperation", + "TypeCreateFile": ".applypatchcalloperation", + "TypeDeleteFile": ".applypatchcalloperation", + "TypeUpdateFile": ".applypatchcalloperation", + "ApplyPatchCallOperationDiffDeltaEvent": ".applypatchcalloperationdiffdeltaevent", + "ApplyPatchCallOperationDiffDeltaEventType": ".applypatchcalloperationdiffdeltaevent", + "ApplyPatchCallOperationDiffDeltaEventTypedDict": ".applypatchcalloperationdiffdeltaevent", + "ApplyPatchCallOperationDiffDoneEvent": ".applypatchcalloperationdiffdoneevent", + "ApplyPatchCallOperationDiffDoneEventType": ".applypatchcalloperationdiffdoneevent", + "ApplyPatchCallOperationDiffDoneEventTypedDict": ".applypatchcalloperationdiffdoneevent", + "ApplyPatchCallOutputItem": ".applypatchcalloutputitem", + "ApplyPatchCallOutputItemStatus": ".applypatchcalloutputitem", + "ApplyPatchCallOutputItemType": ".applypatchcalloutputitem", + "ApplyPatchCallOutputItemTypedDict": ".applypatchcalloutputitem", + "ApplyPatchCallStatus": ".applypatchcallstatus", "ApplyPatchServerTool": ".applypatchservertool", "ApplyPatchServerToolType": ".applypatchservertool", "ApplyPatchServerToolTypedDict": ".applypatchservertool", + "ApplyPatchServerToolOpenRouter": ".applypatchservertool_openrouter", + "ApplyPatchServerToolOpenRouterType": ".applypatchservertool_openrouter", + "ApplyPatchServerToolOpenRouterTypedDict": ".applypatchservertool_openrouter", + "ApplyPatchServerToolConfig": ".applypatchservertoolconfig", + "ApplyPatchServerToolConfigTypedDict": ".applypatchservertoolconfig", "AutoRouterPlugin": ".autorouterplugin", "AutoRouterPluginID": ".autorouterplugin", "AutoRouterPluginTypedDict": ".autorouterplugin", @@ -2418,6 +3320,10 @@ "BaseInputsUnionTypedDict": ".baseinputs_union", "BaseReasoningConfig": ".basereasoningconfig", "BaseReasoningConfigTypedDict": ".basereasoningconfig", + "BulkAddWorkspaceMembersRequest": ".bulkaddworkspacemembersrequest", + "BulkAddWorkspaceMembersRequestTypedDict": ".bulkaddworkspacemembersrequest", + "BulkAddWorkspaceMembersResponse": ".bulkaddworkspacemembersresponse", + "BulkAddWorkspaceMembersResponseTypedDict": ".bulkaddworkspacemembersresponse", "BulkAssignKeysRequest": ".bulkassignkeysrequest", "BulkAssignKeysRequestTypedDict": ".bulkassignkeysrequest", "BulkAssignKeysResponse": ".bulkassignkeysresponse", @@ -2426,6 +3332,10 @@ "BulkAssignMembersRequestTypedDict": ".bulkassignmembersrequest", "BulkAssignMembersResponse": ".bulkassignmembersresponse", "BulkAssignMembersResponseTypedDict": ".bulkassignmembersresponse", + "BulkRemoveWorkspaceMembersRequest": ".bulkremoveworkspacemembersrequest", + "BulkRemoveWorkspaceMembersRequestTypedDict": ".bulkremoveworkspacemembersrequest", + "BulkRemoveWorkspaceMembersResponse": ".bulkremoveworkspacemembersresponse", + "BulkRemoveWorkspaceMembersResponseTypedDict": ".bulkremoveworkspacemembersresponse", "BulkUnassignKeysRequest": ".bulkunassignkeysrequest", "BulkUnassignKeysRequestTypedDict": ".bulkunassignkeysrequest", "BulkUnassignKeysResponse": ".bulkunassignkeysresponse", @@ -2434,6 +3344,9 @@ "BulkUnassignMembersRequestTypedDict": ".bulkunassignmembersrequest", "BulkUnassignMembersResponse": ".bulkunassignmembersresponse", "BulkUnassignMembersResponseTypedDict": ".bulkunassignmembersresponse", + "BYOKKey": ".byokkey", + "BYOKKeyTypedDict": ".byokkey", + "BYOKProviderSlug": ".byokproviderslug", "ChatAssistantImages": ".chatassistantimages", "ChatAssistantImagesImageURL": ".chatassistantimages", "ChatAssistantImagesImageURLTypedDict": ".chatassistantimages", @@ -2542,6 +3455,8 @@ "ChatStreamDelta": ".chatstreamdelta", "ChatStreamDeltaRole": ".chatstreamdelta", "ChatStreamDeltaTypedDict": ".chatstreamdelta", + "ChatStreamingResponse": ".chatstreamingresponse", + "ChatStreamingResponseTypedDict": ".chatstreamingresponse", "ChatStreamOptions": ".chatstreamoptions", "ChatStreamOptionsTypedDict": ".chatstreamoptions", "ChatStreamToolCall": ".chatstreamtoolcall", @@ -2601,6 +3516,9 @@ "CodexLocalShellTool": ".codexlocalshelltool", "CodexLocalShellToolType": ".codexlocalshelltool", "CodexLocalShellToolTypedDict": ".codexlocalshelltool", + "CompactionItem": ".compactionitem", + "CompactionItemType": ".compactionitem", + "CompactionItemTypedDict": ".compactionitem", "CompoundFilter": ".compoundfilter", "CompoundFilterType": ".compoundfilter", "CompoundFilterTypedDict": ".compoundfilter", @@ -2610,6 +3528,13 @@ "Environment": ".computeruseservertool", "ConflictResponseErrorData": ".conflictresponseerrordata", "ConflictResponseErrorDataTypedDict": ".conflictresponseerrordata", + "ContentFilterAction": ".contentfilteraction", + "ContentFilterBuiltinAction": ".contentfilterbuiltinaction", + "ContentFilterBuiltinEntry": ".contentfilterbuiltinentry", + "ContentFilterBuiltinEntryTypedDict": ".contentfilterbuiltinentry", + "ContentFilterBuiltinSlug": ".contentfilterbuiltinslug", + "ContentFilterEntry": ".contentfilterentry", + "ContentFilterEntryTypedDict": ".contentfilterentry", "ContentPartAddedEvent": ".contentpartaddedevent", "ContentPartAddedEventPart": ".contentpartaddedevent", "ContentPartAddedEventPartTypedDict": ".contentpartaddedevent", @@ -2625,14 +3550,29 @@ "ContentPartImageImageURLTypedDict": ".contentpartimage", "ContentPartImageType": ".contentpartimage", "ContentPartImageTypedDict": ".contentpartimage", + "ContentPartInputAudio": ".contentpartinputaudio", + "ContentPartInputAudioType": ".contentpartinputaudio", + "ContentPartInputAudioTypedDict": ".contentpartinputaudio", + "ContentPartInputFile": ".contentpartinputfile", + "ContentPartInputFileType": ".contentpartinputfile", + "ContentPartInputFileTypedDict": ".contentpartinputfile", + "ContentPartInputVideo": ".contentpartinputvideo", + "ContentPartInputVideoType": ".contentpartinputvideo", + "ContentPartInputVideoTypedDict": ".contentpartinputvideo", "ContextCompressionEngine": ".contextcompressionengine", "ContextCompressionPlugin": ".contextcompressionplugin", "ContextCompressionPluginID": ".contextcompressionplugin", "ContextCompressionPluginTypedDict": ".contextcompressionplugin", + "CostDetails": ".costdetails", + "CostDetailsTypedDict": ".costdetails", "CreateGuardrailRequest": ".createguardrailrequest", "CreateGuardrailRequestTypedDict": ".createguardrailrequest", "CreateGuardrailResponse": ".createguardrailresponse", "CreateGuardrailResponseTypedDict": ".createguardrailresponse", + "CreateWorkspaceRequest": ".createworkspacerequest", + "CreateWorkspaceRequestTypedDict": ".createworkspacerequest", + "CreateWorkspaceResponse": ".createworkspaceresponse", + "CreateWorkspaceResponseTypedDict": ".createworkspaceresponse", "CustomTool": ".customtool", "CustomToolTypedDict": ".customtool", "Format": ".customtool", @@ -2645,6 +3585,26 @@ "FormatTypedDict": ".customtool", "Syntax": ".customtool", "TypeCustom": ".customtool", + "CustomToolCallInputDeltaEvent": ".customtoolcallinputdeltaevent", + "CustomToolCallInputDeltaEventType": ".customtoolcallinputdeltaevent", + "CustomToolCallInputDeltaEventTypedDict": ".customtoolcallinputdeltaevent", + "CustomToolCallInputDoneEvent": ".customtoolcallinputdoneevent", + "CustomToolCallInputDoneEventType": ".customtoolcallinputdoneevent", + "CustomToolCallInputDoneEventTypedDict": ".customtoolcallinputdoneevent", + "CustomToolCallItem": ".customtoolcallitem", + "CustomToolCallItemType": ".customtoolcallitem", + "CustomToolCallItemTypedDict": ".customtoolcallitem", + "CustomToolCallOutputItem": ".customtoolcalloutputitem", + "CustomToolCallOutputItemDetail": ".customtoolcalloutputitem", + "CustomToolCallOutputItemOutputInputImage": ".customtoolcalloutputitem", + "CustomToolCallOutputItemOutputInputImageTypedDict": ".customtoolcalloutputitem", + "CustomToolCallOutputItemOutputType": ".customtoolcalloutputitem", + "CustomToolCallOutputItemOutputUnion1": ".customtoolcalloutputitem", + "CustomToolCallOutputItemOutputUnion1TypedDict": ".customtoolcalloutputitem", + "CustomToolCallOutputItemOutputUnion2": ".customtoolcalloutputitem", + "CustomToolCallOutputItemOutputUnion2TypedDict": ".customtoolcalloutputitem", + "CustomToolCallOutputItemTypeCustomToolCallOutput": ".customtoolcalloutputitem", + "CustomToolCallOutputItemTypedDict": ".customtoolcalloutputitem", "DatetimeServerTool": ".datetimeservertool", "DatetimeServerToolType": ".datetimeservertool", "DatetimeServerToolTypedDict": ".datetimeservertool", @@ -2654,6 +3614,8 @@ "DefaultParametersTypedDict": ".defaultparameters", "DeleteGuardrailResponse": ".deleteguardrailresponse", "DeleteGuardrailResponseTypedDict": ".deleteguardrailresponse", + "DeleteWorkspaceResponse": ".deleteworkspaceresponse", + "DeleteWorkspaceResponseTypedDict": ".deleteworkspaceresponse", "EasyInputMessage": ".easyinputmessage", "EasyInputMessageContentInputImage": ".easyinputmessage", "EasyInputMessageContentInputImageTypedDict": ".easyinputmessage", @@ -2677,6 +3639,10 @@ "EasyInputMessageTypedDict": ".easyinputmessage", "EdgeNetworkTimeoutResponseErrorData": ".edgenetworktimeoutresponseerrordata", "EdgeNetworkTimeoutResponseErrorDataTypedDict": ".edgenetworktimeoutresponseerrordata", + "EndpointInfo": ".endpointinfo", + "EndpointInfoTypedDict": ".endpointinfo", + "EndpointsMetadata": ".endpointsmetadata", + "EndpointsMetadataTypedDict": ".endpointsmetadata", "EndpointStatus": ".endpointstatus", "ErrorEvent": ".errorevent", "ErrorEventType": ".errorevent", @@ -2692,6 +3658,10 @@ "FilePathTypedDict": ".filepath", "FileSearchServerTool": ".filesearchservertool", "FileSearchServerToolTypedDict": ".filesearchservertool", + "FileSearchServerToolValue1": ".filesearchservertool", + "FileSearchServerToolValue1TypedDict": ".filesearchservertool", + "FileSearchServerToolValue2": ".filesearchservertool", + "FileSearchServerToolValue2TypedDict": ".filesearchservertool", "Filters": ".filesearchservertool", "FiltersType": ".filesearchservertool", "FiltersTypedDict": ".filesearchservertool", @@ -2701,10 +3671,6 @@ "RankingOptions": ".filesearchservertool", "RankingOptionsTypedDict": ".filesearchservertool", "TypeFileSearch": ".filesearchservertool", - "Value1": ".filesearchservertool", - "Value1TypedDict": ".filesearchservertool", - "Value2": ".filesearchservertool", - "Value2TypedDict": ".filesearchservertool", "ForbiddenResponseErrorData": ".forbiddenresponseerrordata", "ForbiddenResponseErrorDataTypedDict": ".forbiddenresponseerrordata", "FormatJSONObjectConfig": ".formatjsonobjectconfig", @@ -2735,6 +3701,8 @@ "FunctionCallItemTypedDict": ".functioncallitem", "FunctionCallOutputItem": ".functioncalloutputitem", "FunctionCallOutputItemDetail": ".functioncalloutputitem", + "FunctionCallOutputItemOutputInputImage": ".functioncalloutputitem", + "FunctionCallOutputItemOutputInputImageTypedDict": ".functioncalloutputitem", "FunctionCallOutputItemOutputType": ".functioncalloutputitem", "FunctionCallOutputItemOutputUnion1": ".functioncalloutputitem", "FunctionCallOutputItemOutputUnion1TypedDict": ".functioncalloutputitem", @@ -2743,10 +3711,39 @@ "FunctionCallOutputItemStatus": ".functioncalloutputitem", "FunctionCallOutputItemTypeFunctionCallOutput": ".functioncalloutputitem", "FunctionCallOutputItemTypedDict": ".functioncalloutputitem", - "OutputInputImage": ".functioncalloutputitem", - "OutputInputImageTypedDict": ".functioncalloutputitem", + "FusionPlugin": ".fusionplugin", + "FusionPluginID": ".fusionplugin", + "FusionPluginTypedDict": ".fusionplugin", + "FusionServerToolOpenRouter": ".fusionservertool_openrouter", + "FusionServerToolOpenRouterType": ".fusionservertool_openrouter", + "FusionServerToolOpenRouterTypedDict": ".fusionservertool_openrouter", + "FusionServerToolConfig": ".fusionservertoolconfig", + "FusionServerToolConfigTypedDict": ".fusionservertoolconfig", + "GenerationContentData": ".generationcontentdata", + "GenerationContentDataOutput": ".generationcontentdata", + "GenerationContentDataOutputTypedDict": ".generationcontentdata", + "GenerationContentDataTypedDict": ".generationcontentdata", + "Input1": ".generationcontentdata", + "Input1TypedDict": ".generationcontentdata", + "Input2": ".generationcontentdata", + "Input2TypedDict": ".generationcontentdata", + "InputUnion": ".generationcontentdata", + "InputUnionTypedDict": ".generationcontentdata", + "GenerationContentResponse": ".generationcontentresponse", + "GenerationContentResponseTypedDict": ".generationcontentresponse", + "APIType": ".generationresponse", + "GenerationResponse": ".generationresponse", + "GenerationResponseData": ".generationresponse", + "GenerationResponseDataTypedDict": ".generationresponse", + "GenerationResponseTypedDict": ".generationresponse", + "GetBYOKKeyResponse": ".getbyokkeyresponse", + "GetBYOKKeyResponseTypedDict": ".getbyokkeyresponse", "GetGuardrailResponse": ".getguardrailresponse", "GetGuardrailResponseTypedDict": ".getguardrailresponse", + "GetObservabilityDestinationResponse": ".getobservabilitydestinationresponse", + "GetObservabilityDestinationResponseTypedDict": ".getobservabilitydestinationresponse", + "GetWorkspaceResponse": ".getworkspaceresponse", + "GetWorkspaceResponseTypedDict": ".getworkspaceresponse", "Guardrail": ".guardrail", "GuardrailTypedDict": ".guardrail", "GuardrailInterval": ".guardrailinterval", @@ -2853,6 +3850,9 @@ "InstructType": ".instructtype", "InternalServerResponseErrorData": ".internalserverresponseerrordata", "InternalServerResponseErrorDataTypedDict": ".internalserverresponseerrordata", + "ItemReferenceItem": ".itemreferenceitem", + "ItemReferenceItemType": ".itemreferenceitem", + "ItemReferenceItemTypedDict": ".itemreferenceitem", "KeyAssignment": ".keyassignment", "KeyAssignmentTypedDict": ".keyassignment", "LegacyChatContentVideo": ".legacy_chatcontentvideo", @@ -2861,6 +3861,8 @@ "LegacyWebSearchServerTool": ".legacy_websearchservertool", "LegacyWebSearchServerToolType": ".legacy_websearchservertool", "LegacyWebSearchServerToolTypedDict": ".legacy_websearchservertool", + "ListBYOKKeysResponse": ".listbyokkeysresponse", + "ListBYOKKeysResponseTypedDict": ".listbyokkeysresponse", "Architecture": ".listendpointsresponse", "ArchitectureTypedDict": ".listendpointsresponse", "ListEndpointsResponse": ".listendpointsresponse", @@ -2872,6 +3874,34 @@ "ListKeyAssignmentsResponseTypedDict": ".listkeyassignmentsresponse", "ListMemberAssignmentsResponse": ".listmemberassignmentsresponse", "ListMemberAssignmentsResponseTypedDict": ".listmemberassignmentsresponse", + "ListObservabilityDestinationsResponse": ".listobservabilitydestinationsresponse", + "ListObservabilityDestinationsResponseTypedDict": ".listobservabilitydestinationsresponse", + "ListWorkspacesResponse": ".listworkspacesresponse", + "ListWorkspacesResponseTypedDict": ".listworkspacesresponse", + "LocalShellCallItem": ".localshellcallitem", + "LocalShellCallItemAction": ".localshellcallitem", + "LocalShellCallItemActionTypedDict": ".localshellcallitem", + "LocalShellCallItemTypedDict": ".localshellcallitem", + "TypeExec": ".localshellcallitem", + "TypeLocalShellCall": ".localshellcallitem", + "LocalShellCallOutputItem": ".localshellcalloutputitem", + "LocalShellCallOutputItemStatus": ".localshellcalloutputitem", + "LocalShellCallOutputItemType": ".localshellcalloutputitem", + "LocalShellCallOutputItemTypedDict": ".localshellcalloutputitem", + "McpApprovalRequestItem": ".mcpapprovalrequestitem", + "McpApprovalRequestItemType": ".mcpapprovalrequestitem", + "McpApprovalRequestItemTypedDict": ".mcpapprovalrequestitem", + "McpApprovalResponseItem": ".mcpapprovalresponseitem", + "McpApprovalResponseItemType": ".mcpapprovalresponseitem", + "McpApprovalResponseItemTypedDict": ".mcpapprovalresponseitem", + "McpCallItem": ".mcpcallitem", + "McpCallItemType": ".mcpcallitem", + "McpCallItemTypedDict": ".mcpcallitem", + "McpListToolsItem": ".mcplisttoolsitem", + "McpListToolsItemTool": ".mcplisttoolsitem", + "McpListToolsItemToolTypedDict": ".mcplisttoolsitem", + "McpListToolsItemType": ".mcplisttoolsitem", + "McpListToolsItemTypedDict": ".mcplisttoolsitem", "AllowedTools": ".mcpservertool", "AllowedToolsTypedDict": ".mcpservertool", "AllowedToolsUnion": ".mcpservertool", @@ -2892,6 +3922,7 @@ "RequireApprovalUnionTypedDict": ".mcpservertool", "MemberAssignment": ".memberassignment", "MemberAssignmentTypedDict": ".memberassignment", + "MetadataLevel": ".metadatalevel", "Model": ".model", "ModelTypedDict": ".model", "ModelArchitecture": ".modelarchitecture", @@ -2900,17 +3931,129 @@ "ModelGroup": ".modelgroup", "ModelLinks": ".modellinks", "ModelLinksTypedDict": ".modellinks", - "Data": ".modelscountresponse", - "DataTypedDict": ".modelscountresponse", "ModelsCountResponse": ".modelscountresponse", + "ModelsCountResponseData": ".modelscountresponse", + "ModelsCountResponseDataTypedDict": ".modelscountresponse", "ModelsCountResponseTypedDict": ".modelscountresponse", "ModelsListResponse": ".modelslistresponse", "ModelsListResponseTypedDict": ".modelslistresponse", "ModerationPlugin": ".moderationplugin", "ModerationPluginID": ".moderationplugin", "ModerationPluginTypedDict": ".moderationplugin", + "MultimodalMedia": ".multimodalmedia", + "MultimodalMediaTypedDict": ".multimodalmedia", "NotFoundResponseErrorData": ".notfoundresponseerrordata", "NotFoundResponseErrorDataTypedDict": ".notfoundresponseerrordata", + "ObservabilityArizeDestination": ".observabilityarizedestination", + "ObservabilityArizeDestinationConfig": ".observabilityarizedestination", + "ObservabilityArizeDestinationConfigTypedDict": ".observabilityarizedestination", + "ObservabilityArizeDestinationType": ".observabilityarizedestination", + "ObservabilityArizeDestinationTypedDict": ".observabilityarizedestination", + "ObservabilityBraintrustDestination": ".observabilitybraintrustdestination", + "ObservabilityBraintrustDestinationConfig": ".observabilitybraintrustdestination", + "ObservabilityBraintrustDestinationConfigTypedDict": ".observabilitybraintrustdestination", + "ObservabilityBraintrustDestinationType": ".observabilitybraintrustdestination", + "ObservabilityBraintrustDestinationTypedDict": ".observabilitybraintrustdestination", + "ObservabilityClickhouseDestination": ".observabilityclickhousedestination", + "ObservabilityClickhouseDestinationConfig": ".observabilityclickhousedestination", + "ObservabilityClickhouseDestinationConfigTypedDict": ".observabilityclickhousedestination", + "ObservabilityClickhouseDestinationType": ".observabilityclickhousedestination", + "ObservabilityClickhouseDestinationTypedDict": ".observabilityclickhousedestination", + "ObservabilityDatadogDestination": ".observabilitydatadogdestination", + "ObservabilityDatadogDestinationConfig": ".observabilitydatadogdestination", + "ObservabilityDatadogDestinationConfigTypedDict": ".observabilitydatadogdestination", + "ObservabilityDatadogDestinationType": ".observabilitydatadogdestination", + "ObservabilityDatadogDestinationTypedDict": ".observabilitydatadogdestination", + "ObservabilityDestination": ".observabilitydestination", + "ObservabilityDestinationTypedDict": ".observabilitydestination", + "FieldT": ".observabilityfilterrulesconfig", + "Group": ".observabilityfilterrulesconfig", + "GroupTypedDict": ".observabilityfilterrulesconfig", + "Logic": ".observabilityfilterrulesconfig", + "ObservabilityFilterRulesConfig": ".observabilityfilterrulesconfig", + "ObservabilityFilterRulesConfigTypedDict": ".observabilityfilterrulesconfig", + "ObservabilityFilterRulesConfigValue": ".observabilityfilterrulesconfig", + "ObservabilityFilterRulesConfigValueTypedDict": ".observabilityfilterrulesconfig", + "Operator": ".observabilityfilterrulesconfig", + "Rule": ".observabilityfilterrulesconfig", + "RuleTypedDict": ".observabilityfilterrulesconfig", + "ObservabilityGrafanaDestination": ".observabilitygrafanadestination", + "ObservabilityGrafanaDestinationConfig": ".observabilitygrafanadestination", + "ObservabilityGrafanaDestinationConfigTypedDict": ".observabilitygrafanadestination", + "ObservabilityGrafanaDestinationType": ".observabilitygrafanadestination", + "ObservabilityGrafanaDestinationTypedDict": ".observabilitygrafanadestination", + "ObservabilityLangfuseDestination": ".observabilitylangfusedestination", + "ObservabilityLangfuseDestinationConfig": ".observabilitylangfusedestination", + "ObservabilityLangfuseDestinationConfigTypedDict": ".observabilitylangfusedestination", + "ObservabilityLangfuseDestinationType": ".observabilitylangfusedestination", + "ObservabilityLangfuseDestinationTypedDict": ".observabilitylangfusedestination", + "ObservabilityLangsmithDestination": ".observabilitylangsmithdestination", + "ObservabilityLangsmithDestinationConfig": ".observabilitylangsmithdestination", + "ObservabilityLangsmithDestinationConfigTypedDict": ".observabilitylangsmithdestination", + "ObservabilityLangsmithDestinationType": ".observabilitylangsmithdestination", + "ObservabilityLangsmithDestinationTypedDict": ".observabilitylangsmithdestination", + "ObservabilityNewrelicDestination": ".observabilitynewrelicdestination", + "ObservabilityNewrelicDestinationConfig": ".observabilitynewrelicdestination", + "ObservabilityNewrelicDestinationConfigTypedDict": ".observabilitynewrelicdestination", + "ObservabilityNewrelicDestinationType": ".observabilitynewrelicdestination", + "ObservabilityNewrelicDestinationTypedDict": ".observabilitynewrelicdestination", + "Region": ".observabilitynewrelicdestination", + "ObservabilityOpikDestination": ".observabilityopikdestination", + "ObservabilityOpikDestinationConfig": ".observabilityopikdestination", + "ObservabilityOpikDestinationConfigTypedDict": ".observabilityopikdestination", + "ObservabilityOpikDestinationType": ".observabilityopikdestination", + "ObservabilityOpikDestinationTypedDict": ".observabilityopikdestination", + "ObservabilityOtelCollectorDestination": ".observabilityotelcollectordestination", + "ObservabilityOtelCollectorDestinationConfig": ".observabilityotelcollectordestination", + "ObservabilityOtelCollectorDestinationConfigTypedDict": ".observabilityotelcollectordestination", + "ObservabilityOtelCollectorDestinationType": ".observabilityotelcollectordestination", + "ObservabilityOtelCollectorDestinationTypedDict": ".observabilityotelcollectordestination", + "ObservabilityPosthogDestination": ".observabilityposthogdestination", + "ObservabilityPosthogDestinationConfig": ".observabilityposthogdestination", + "ObservabilityPosthogDestinationConfigTypedDict": ".observabilityposthogdestination", + "ObservabilityPosthogDestinationType": ".observabilityposthogdestination", + "ObservabilityPosthogDestinationTypedDict": ".observabilityposthogdestination", + "ObservabilityRampDestination": ".observabilityrampdestination", + "ObservabilityRampDestinationConfig": ".observabilityrampdestination", + "ObservabilityRampDestinationConfigTypedDict": ".observabilityrampdestination", + "ObservabilityRampDestinationType": ".observabilityrampdestination", + "ObservabilityRampDestinationTypedDict": ".observabilityrampdestination", + "ObservabilityS3Destination": ".observabilitys3destination", + "ObservabilityS3DestinationConfig": ".observabilitys3destination", + "ObservabilityS3DestinationConfigTypedDict": ".observabilitys3destination", + "ObservabilityS3DestinationType": ".observabilitys3destination", + "ObservabilityS3DestinationTypedDict": ".observabilitys3destination", + "ObservabilitySentryDestination": ".observabilitysentrydestination", + "ObservabilitySentryDestinationConfig": ".observabilitysentrydestination", + "ObservabilitySentryDestinationConfigTypedDict": ".observabilitysentrydestination", + "ObservabilitySentryDestinationType": ".observabilitysentrydestination", + "ObservabilitySentryDestinationTypedDict": ".observabilitysentrydestination", + "ObservabilitySnowflakeDestination": ".observabilitysnowflakedestination", + "ObservabilitySnowflakeDestinationConfig": ".observabilitysnowflakedestination", + "ObservabilitySnowflakeDestinationConfigTypedDict": ".observabilitysnowflakedestination", + "ObservabilitySnowflakeDestinationType": ".observabilitysnowflakedestination", + "ObservabilitySnowflakeDestinationTypedDict": ".observabilitysnowflakedestination", + "ObservabilityWeaveDestination": ".observabilityweavedestination", + "ObservabilityWeaveDestinationConfig": ".observabilityweavedestination", + "ObservabilityWeaveDestinationConfigTypedDict": ".observabilityweavedestination", + "ObservabilityWeaveDestinationType": ".observabilityweavedestination", + "ObservabilityWeaveDestinationTypedDict": ".observabilityweavedestination", + "Method": ".observabilitywebhookdestination", + "ObservabilityWebhookDestination": ".observabilitywebhookdestination", + "ObservabilityWebhookDestinationConfig": ".observabilitywebhookdestination", + "ObservabilityWebhookDestinationConfigTypedDict": ".observabilitywebhookdestination", + "ObservabilityWebhookDestinationType": ".observabilitywebhookdestination", + "ObservabilityWebhookDestinationTypedDict": ".observabilitywebhookdestination", + "OpenAIResponseCustomToolCall": ".openairesponsecustomtoolcall", + "OpenAIResponseCustomToolCallType": ".openairesponsecustomtoolcall", + "OpenAIResponseCustomToolCallTypedDict": ".openairesponsecustomtoolcall", + "OpenAIResponseCustomToolCallOutput": ".openairesponsecustomtoolcalloutput", + "OpenAIResponseCustomToolCallOutputOutput1": ".openairesponsecustomtoolcalloutput", + "OpenAIResponseCustomToolCallOutputOutput1TypedDict": ".openairesponsecustomtoolcalloutput", + "OpenAIResponseCustomToolCallOutputOutput2": ".openairesponsecustomtoolcalloutput", + "OpenAIResponseCustomToolCallOutputOutput2TypedDict": ".openairesponsecustomtoolcalloutput", + "OpenAIResponseCustomToolCallOutputType": ".openairesponsecustomtoolcalloutput", + "OpenAIResponseCustomToolCallOutputTypedDict": ".openairesponsecustomtoolcalloutput", "OpenAIResponseFunctionToolCall": ".openairesponsefunctiontoolcall", "OpenAIResponseFunctionToolCallType": ".openairesponsefunctiontoolcall", "OpenAIResponseFunctionToolCallTypedDict": ".openairesponsefunctiontoolcall", @@ -2939,12 +4082,18 @@ "OpenAIResponsesRefusalContentTypedDict": ".openairesponsesrefusalcontent", "OpenAIResponsesResponseStatus": ".openairesponsesresponsestatus", "OpenAIResponsesToolChoice": ".openairesponsestoolchoice_union", + "OpenAIResponsesToolChoiceApplyPatch": ".openairesponsestoolchoice_union", + "OpenAIResponsesToolChoiceApplyPatchTypedDict": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceAuto": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceFunction": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceFunctionTypedDict": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceNone": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceRequired": ".openairesponsestoolchoice_union", + "OpenAIResponsesToolChoiceShell": ".openairesponsestoolchoice_union", + "OpenAIResponsesToolChoiceShellTypedDict": ".openairesponsestoolchoice_union", + "OpenAIResponsesToolChoiceTypeApplyPatch": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceTypeFunction": ".openairesponsestoolchoice_union", + "OpenAIResponsesToolChoiceTypeShell": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceTypeWebSearchPreview": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceTypeWebSearchPreview20250311": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceTypedDict": ".openairesponsestoolchoice_union", @@ -2967,9 +4116,14 @@ "OpenResponsesResultToolUnionTypedDict": ".openresponsesresult", "OpenResponsesResultType": ".openresponsesresult", "OpenResponsesResultTypedDict": ".openresponsesresult", + "OpenRouterMetadata": ".openroutermetadata", + "OpenRouterMetadataTypedDict": ".openroutermetadata", "OpenRouterWebSearchServerTool": ".openrouterwebsearchservertool", "OpenRouterWebSearchServerToolType": ".openrouterwebsearchservertool", "OpenRouterWebSearchServerToolTypedDict": ".openrouterwebsearchservertool", + "OutputApplyPatchCallItem": ".outputapplypatchcallitem", + "OutputApplyPatchCallItemType": ".outputapplypatchcallitem", + "OutputApplyPatchCallItemTypedDict": ".outputapplypatchcallitem", "OutputApplyPatchServerToolItem": ".outputapplypatchservertoolitem", "OutputApplyPatchServerToolItemType": ".outputapplypatchservertoolitem", "OutputApplyPatchServerToolItemTypedDict": ".outputapplypatchservertoolitem", @@ -2999,6 +4153,9 @@ "OutputComputerCallItemTypedDict": ".outputcomputercallitem", "PendingSafetyCheck": ".outputcomputercallitem", "PendingSafetyCheckTypedDict": ".outputcomputercallitem", + "OutputCustomToolCallItem": ".outputcustomtoolcallitem", + "OutputCustomToolCallItemType": ".outputcustomtoolcallitem", + "OutputCustomToolCallItemTypedDict": ".outputcustomtoolcallitem", "OutputDatetimeItem": ".outputdatetimeitem", "OutputDatetimeItemType": ".outputdatetimeitem", "OutputDatetimeItemTypedDict": ".outputdatetimeitem", @@ -3016,6 +4173,23 @@ "OutputFunctionCallItemStatusUnionTypedDict": ".outputfunctioncallitem", "OutputFunctionCallItemType": ".outputfunctioncallitem", "OutputFunctionCallItemTypedDict": ".outputfunctioncallitem", + "Analysis": ".outputfusionservertoolitem", + "AnalysisTypedDict": ".outputfusionservertoolitem", + "Contradiction": ".outputfusionservertoolitem", + "ContradictionTypedDict": ".outputfusionservertoolitem", + "FailedModel": ".outputfusionservertoolitem", + "FailedModelTypedDict": ".outputfusionservertoolitem", + "OutputFusionServerToolItem": ".outputfusionservertoolitem", + "OutputFusionServerToolItemType": ".outputfusionservertoolitem", + "OutputFusionServerToolItemTypedDict": ".outputfusionservertoolitem", + "PartialCoverage": ".outputfusionservertoolitem", + "PartialCoverageTypedDict": ".outputfusionservertoolitem", + "Response": ".outputfusionservertoolitem", + "ResponseTypedDict": ".outputfusionservertoolitem", + "Stance": ".outputfusionservertoolitem", + "StanceTypedDict": ".outputfusionservertoolitem", + "UniqueInsight": ".outputfusionservertoolitem", + "UniqueInsightTypedDict": ".outputfusionservertoolitem", "OutputImageGenerationCallItem": ".outputimagegenerationcallitem", "OutputImageGenerationCallItemType": ".outputimagegenerationcallitem", "OutputImageGenerationCallItemTypedDict": ".outputimagegenerationcallitem", @@ -3074,6 +4248,9 @@ "OutputReasoningItemStatusUnionTypedDict": ".outputreasoningitem", "OutputReasoningItemType": ".outputreasoningitem", "OutputReasoningItemTypedDict": ".outputreasoningitem", + "OutputSearchModelsServerToolItem": ".outputsearchmodelsservertoolitem", + "OutputSearchModelsServerToolItemType": ".outputsearchmodelsservertoolitem", + "OutputSearchModelsServerToolItemTypedDict": ".outputsearchmodelsservertoolitem", "Command": ".outputtexteditorservertoolitem", "OutputTextEditorServerToolItem": ".outputtexteditorservertoolitem", "OutputTextEditorServerToolItemType": ".outputtexteditorservertoolitem", @@ -3089,19 +4266,28 @@ "ActionFindInPageTypedDict": ".outputwebsearchcallitem", "ActionOpenPage": ".outputwebsearchcallitem", "ActionOpenPageTypedDict": ".outputwebsearchcallitem", - "ActionSearch": ".outputwebsearchcallitem", - "ActionSearchTypedDict": ".outputwebsearchcallitem", + "ActionTypeSearch": ".outputwebsearchcallitem", "ActionTypedDict": ".outputwebsearchcallitem", "OutputWebSearchCallItem": ".outputwebsearchcallitem", + "OutputWebSearchCallItemActionSearch": ".outputwebsearchcallitem", + "OutputWebSearchCallItemActionSearchTypedDict": ".outputwebsearchcallitem", "OutputWebSearchCallItemTypedDict": ".outputwebsearchcallitem", "TypeFindInPage": ".outputwebsearchcallitem", "TypeOpenPage": ".outputwebsearchcallitem", - "TypeSearch": ".outputwebsearchcallitem", "TypeWebSearchCall": ".outputwebsearchcallitem", "OutputWebSearchServerToolItem": ".outputwebsearchservertoolitem", - "OutputWebSearchServerToolItemType": ".outputwebsearchservertoolitem", + "OutputWebSearchServerToolItemAction": ".outputwebsearchservertoolitem", + "OutputWebSearchServerToolItemActionTypedDict": ".outputwebsearchservertoolitem", + "OutputWebSearchServerToolItemTypeOpenrouterWebSearch": ".outputwebsearchservertoolitem", + "OutputWebSearchServerToolItemTypeSearch": ".outputwebsearchservertoolitem", + "OutputWebSearchServerToolItemTypeURL": ".outputwebsearchservertoolitem", "OutputWebSearchServerToolItemTypedDict": ".outputwebsearchservertoolitem", + "Source": ".outputwebsearchservertoolitem", + "SourceTypedDict": ".outputwebsearchservertoolitem", "Parameter": ".parameter", + "ParetoRouterPlugin": ".paretorouterplugin", + "ParetoRouterPluginID": ".paretorouterplugin", + "ParetoRouterPluginTypedDict": ".paretorouterplugin", "PayloadTooLargeResponseErrorData": ".payloadtoolargeresponseerrordata", "PayloadTooLargeResponseErrorDataTypedDict": ".payloadtoolargeresponseerrordata", "PaymentRequiredResponseErrorData": ".paymentrequiredresponseerrordata", @@ -3120,6 +4306,9 @@ "PercentileThroughputCutoffsTypedDict": ".percentilethroughputcutoffs", "PerRequestLimits": ".perrequestlimits", "PerRequestLimitsTypedDict": ".perrequestlimits", + "PipelineStage": ".pipelinestage", + "PipelineStageTypedDict": ".pipelinestage", + "PipelineStageType": ".pipelinestagetype", "PreferredMaxLatency": ".preferredmaxlatency", "PreferredMaxLatencyTypedDict": ".preferredmaxlatency", "PreferredMinThroughput": ".preferredminthroughput", @@ -3134,6 +4323,8 @@ "PreviewWebSearchUserLocationType": ".preview_websearchuserlocation", "PreviewWebSearchUserLocationTypedDict": ".preview_websearchuserlocation", "ProviderName": ".providername", + "ProviderOptions": ".provideroptions", + "ProviderOptionsTypedDict": ".provideroptions", "ProviderOverloadedResponseErrorData": ".provideroverloadedresponseerrordata", "ProviderOverloadedResponseErrorDataTypedDict": ".provideroverloadedresponseerrordata", "DataCollection": ".providerpreferences", @@ -3245,6 +4436,13 @@ "ResponsesRequestToolUnionTypedDict": ".responsesrequest", "ResponsesRequestType": ".responsesrequest", "ResponsesRequestTypedDict": ".responsesrequest", + "ResponsesStreamingResponse": ".responsesstreamingresponse", + "ResponsesStreamingResponseTypedDict": ".responsesstreamingresponse", + "RouterAttempt": ".routerattempt", + "RouterAttemptTypedDict": ".routerattempt", + "RouterParams": ".routerparams", + "RouterParamsTypedDict": ".routerparams", + "RoutingStrategy": ".routingstrategy", "SearchContextSizeEnum": ".searchcontextsizeenum", "SearchModelsServerToolConfig": ".searchmodelsservertoolconfig", "SearchModelsServerToolConfigTypedDict": ".searchmodelsservertoolconfig", @@ -3253,9 +4451,26 @@ "SecurityTypedDict": ".security", "ServiceUnavailableResponseErrorData": ".serviceunavailableresponseerrordata", "ServiceUnavailableResponseErrorDataTypedDict": ".serviceunavailableresponseerrordata", + "ShellCallItem": ".shellcallitem", + "ShellCallItemAction": ".shellcallitem", + "ShellCallItemActionTypedDict": ".shellcallitem", + "ShellCallItemStatus": ".shellcallitem", + "ShellCallItemType": ".shellcallitem", + "ShellCallItemTypedDict": ".shellcallitem", + "ShellCallOutputItem": ".shellcalloutputitem", + "ShellCallOutputItemOutput": ".shellcalloutputitem", + "ShellCallOutputItemOutputTypedDict": ".shellcalloutputitem", + "ShellCallOutputItemStatus": ".shellcalloutputitem", + "ShellCallOutputItemType": ".shellcalloutputitem", + "ShellCallOutputItemTypedDict": ".shellcalloutputitem", "ShellServerTool": ".shellservertool", "ShellServerToolType": ".shellservertool", "ShellServerToolTypedDict": ".shellservertool", + "ResponseFormatEnum": ".speechrequest", + "SpeechRequest": ".speechrequest", + "SpeechRequestProvider": ".speechrequest", + "SpeechRequestProviderTypedDict": ".speechrequest", + "SpeechRequestTypedDict": ".speechrequest", "StoredPromptTemplate": ".storedprompttemplate", "StoredPromptTemplateTypedDict": ".storedprompttemplate", "Variables": ".storedprompttemplate", @@ -3281,9 +4496,16 @@ "StreamLogprobTypedDict": ".streamlogprob", "StreamLogprobTopLogprob": ".streamlogprobtoplogprob", "StreamLogprobTopLogprobTypedDict": ".streamlogprobtoplogprob", - "TextConfig": ".textconfig", - "TextConfigTypedDict": ".textconfig", - "TextConfigVerbosity": ".textconfig", + "STTInputAudio": ".sttinputaudio", + "STTInputAudioTypedDict": ".sttinputaudio", + "STTRequest": ".sttrequest", + "STTRequestProvider": ".sttrequest", + "STTRequestProviderTypedDict": ".sttrequest", + "STTRequestTypedDict": ".sttrequest", + "STTResponse": ".sttresponse", + "STTResponseTypedDict": ".sttresponse", + "STTUsage": ".sttusage", + "STTUsageTypedDict": ".sttusage", "TextDeltaEvent": ".textdeltaevent", "TextDeltaEventType": ".textdeltaevent", "TextDeltaEventTypedDict": ".textdeltaevent", @@ -3292,7 +4514,7 @@ "TextDoneEventTypedDict": ".textdoneevent", "TextExtendedConfig": ".textextendedconfig", "TextExtendedConfigTypedDict": ".textextendedconfig", - "TextExtendedConfigVerbosity": ".textextendedconfig", + "Verbosity": ".textextendedconfig", "ToolCallStatus": ".toolcallstatus", "Mode": ".toolchoiceallowed", "ModeAuto": ".toolchoiceallowed", @@ -3316,24 +4538,28 @@ "UpdateGuardrailRequestTypedDict": ".updateguardrailrequest", "UpdateGuardrailResponse": ".updateguardrailresponse", "UpdateGuardrailResponseTypedDict": ".updateguardrailresponse", + "UpdateWorkspaceRequest": ".updateworkspacerequest", + "UpdateWorkspaceRequestTypedDict": ".updateworkspacerequest", + "UpdateWorkspaceResponse": ".updateworkspaceresponse", + "UpdateWorkspaceResponseTypedDict": ".updateworkspaceresponse", "URLCitation": ".urlcitation", "URLCitationType": ".urlcitation", "URLCitationTypedDict": ".urlcitation", - "CostDetails": ".usage", - "CostDetailsTypedDict": ".usage", "InputTokensDetails": ".usage", "InputTokensDetailsTypedDict": ".usage", "OutputTokensDetails": ".usage", "OutputTokensDetailsTypedDict": ".usage", "Usage": ".usage", + "UsageCostDetails": ".usage", + "UsageCostDetailsTypedDict": ".usage", "UsageTypedDict": ".usage", "AspectRatio": ".videogenerationrequest", "Options": ".videogenerationrequest", "OptionsTypedDict": ".videogenerationrequest", - "Provider": ".videogenerationrequest", - "ProviderTypedDict": ".videogenerationrequest", "Resolution": ".videogenerationrequest", "VideoGenerationRequest": ".videogenerationrequest", + "VideoGenerationRequestProvider": ".videogenerationrequest", + "VideoGenerationRequestProviderTypedDict": ".videogenerationrequest", "VideoGenerationRequestTypedDict": ".videogenerationrequest", "VideoGenerationResponse": ".videogenerationresponse", "VideoGenerationResponseStatus": ".videogenerationresponse", @@ -3348,6 +4574,12 @@ "VideoModelTypedDict": ".videomodel", "VideoModelsListResponse": ".videomodelslistresponse", "VideoModelsListResponseTypedDict": ".videomodelslistresponse", + "WebFetchEngineEnum": ".webfetchengineenum", + "WebFetchServerTool": ".webfetchservertool", + "WebFetchServerToolType": ".webfetchservertool", + "WebFetchServerToolTypedDict": ".webfetchservertool", + "WebFetchServerToolConfig": ".webfetchservertoolconfig", + "WebFetchServerToolConfigTypedDict": ".webfetchservertoolconfig", "WebSearchCallCompletedEvent": ".websearchcallcompletedevent", "WebSearchCallCompletedEventType": ".websearchcallcompletedevent", "WebSearchCallCompletedEventTypedDict": ".websearchcallcompletedevent", @@ -3363,17 +4595,20 @@ "WebSearchDomainFilterTypedDict": ".websearchdomainfilter", "WebSearchEngine": ".websearchengine", "WebSearchEngineEnum": ".websearchengineenum", + "UserLocation": ".websearchplugin", + "UserLocationTypedDict": ".websearchplugin", "WebSearchPlugin": ".websearchplugin", "WebSearchPluginID": ".websearchplugin", + "WebSearchPluginType": ".websearchplugin", "WebSearchPluginTypedDict": ".websearchplugin", "WebSearchServerTool": ".websearchservertool", "WebSearchServerToolType": ".websearchservertool", "WebSearchServerToolTypedDict": ".websearchservertool", - "Parameters": ".websearchservertool_openrouter", - "ParametersTypedDict": ".websearchservertool_openrouter", "WebSearchServerToolOpenRouter": ".websearchservertool_openrouter", "WebSearchServerToolOpenRouterType": ".websearchservertool_openrouter", "WebSearchServerToolOpenRouterTypedDict": ".websearchservertool_openrouter", + "WebSearchServerToolConfig": ".websearchservertoolconfig", + "WebSearchServerToolConfigTypedDict": ".websearchservertoolconfig", "WebSearchSource": ".websearchsource", "WebSearchSourceType": ".websearchsource", "WebSearchSourceTypedDict": ".websearchsource", @@ -3384,6 +4619,11 @@ "WebSearchUserLocationServerTool": ".websearchuserlocationservertool", "WebSearchUserLocationServerToolType": ".websearchuserlocationservertool", "WebSearchUserLocationServerToolTypedDict": ".websearchuserlocationservertool", + "Workspace": ".workspace", + "WorkspaceTypedDict": ".workspace", + "WorkspaceMember": ".workspacemember", + "WorkspaceMemberRole": ".workspacemember", + "WorkspaceMemberTypedDict": ".workspacemember", } diff --git a/src/openrouter/components/anthropiccachecontroldirective.py b/src/openrouter/components/anthropiccachecontroldirective.py index 67645f0..4b2567b 100644 --- a/src/openrouter/components/anthropiccachecontroldirective.py +++ b/src/openrouter/components/anthropiccachecontroldirective.py @@ -13,14 +13,14 @@ class AnthropicCacheControlDirectiveTypedDict(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.""" + r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" type: AnthropicCacheControlDirectiveType ttl: NotRequired[AnthropicCacheControlTTL] class AnthropicCacheControlDirective(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.""" + r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" type: AnthropicCacheControlDirectiveType diff --git a/src/openrouter/components/applypatchcallitem.py b/src/openrouter/components/applypatchcallitem.py new file mode 100644 index 0000000..1a5f1e0 --- /dev/null +++ b/src/openrouter/components/applypatchcallitem.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .applypatchcalloperation import ( + ApplyPatchCallOperation, + ApplyPatchCallOperationTypedDict, +) +from .applypatchcallstatus import ApplyPatchCallStatus +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 + + +ApplyPatchCallItemType = Literal["apply_patch_call",] + + +class ApplyPatchCallItemTypedDict(TypedDict): + r"""A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn.""" + + call_id: str + operation: ApplyPatchCallOperationTypedDict + r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.""" + status: ApplyPatchCallStatus + r"""Lifecycle state of an `apply_patch_call` output item.""" + type: ApplyPatchCallItemType + id: NotRequired[Nullable[str]] + + +class ApplyPatchCallItem(BaseModel): + r"""A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn.""" + + call_id: str + + operation: ApplyPatchCallOperation + r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.""" + + status: Annotated[ApplyPatchCallStatus, PlainValidator(validate_open_enum(False))] + r"""Lifecycle state of an `apply_patch_call` output item.""" + + type: ApplyPatchCallItemType + + id: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id"] + nullable_fields = ["id"] + 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/applypatchcalloperation.py b/src/openrouter/components/applypatchcalloperation.py new file mode 100644 index 0000000..8d940a2 --- /dev/null +++ b/src/openrouter/components/applypatchcalloperation.py @@ -0,0 +1,78 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +TypeDeleteFile = Literal["delete_file",] + + +class ApplyPatchCallOperationDeleteFileTypedDict(TypedDict): + path: str + type: TypeDeleteFile + + +class ApplyPatchCallOperationDeleteFile(BaseModel): + path: str + + type: TypeDeleteFile + + +TypeUpdateFile = Literal["update_file",] + + +class ApplyPatchCallOperationUpdateFileTypedDict(TypedDict): + diff: str + path: str + type: TypeUpdateFile + + +class ApplyPatchCallOperationUpdateFile(BaseModel): + diff: str + + path: str + + type: TypeUpdateFile + + +TypeCreateFile = Literal["create_file",] + + +class ApplyPatchCallOperationCreateFileTypedDict(TypedDict): + diff: str + path: str + type: TypeCreateFile + + +class ApplyPatchCallOperationCreateFile(BaseModel): + diff: str + + path: str + + type: TypeCreateFile + + +ApplyPatchCallOperationTypedDict = TypeAliasType( + "ApplyPatchCallOperationTypedDict", + Union[ + ApplyPatchCallOperationDeleteFileTypedDict, + ApplyPatchCallOperationCreateFileTypedDict, + ApplyPatchCallOperationUpdateFileTypedDict, + ], +) +r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.""" + + +ApplyPatchCallOperation = Annotated[ + Union[ + Annotated[ApplyPatchCallOperationCreateFile, Tag("create_file")], + Annotated[ApplyPatchCallOperationUpdateFile, Tag("update_file")], + Annotated[ApplyPatchCallOperationDeleteFile, Tag("delete_file")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] +r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.""" diff --git a/src/openrouter/components/applypatchcalloperationdiffdeltaevent.py b/src/openrouter/components/applypatchcalloperationdiffdeltaevent.py new file mode 100644 index 0000000..830de6c --- /dev/null +++ b/src/openrouter/components/applypatchcalloperationdiffdeltaevent.py @@ -0,0 +1,35 @@ +"""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 + + +ApplyPatchCallOperationDiffDeltaEventType = Literal[ + "response.apply_patch_call_operation_diff.delta", +] + + +class ApplyPatchCallOperationDiffDeltaEventTypedDict(TypedDict): + r"""Incremental chunk of `operation.diff` for an `apply_patch_call`. Matches OpenAI's streaming shape.""" + + delta: str + item_id: str + output_index: int + sequence_number: int + type: ApplyPatchCallOperationDiffDeltaEventType + + +class ApplyPatchCallOperationDiffDeltaEvent(BaseModel): + r"""Incremental chunk of `operation.diff` for an `apply_patch_call`. Matches OpenAI's streaming shape.""" + + delta: str + + item_id: str + + output_index: int + + sequence_number: int + + type: ApplyPatchCallOperationDiffDeltaEventType diff --git a/src/openrouter/components/applypatchcalloperationdiffdoneevent.py b/src/openrouter/components/applypatchcalloperationdiffdoneevent.py new file mode 100644 index 0000000..d03decf --- /dev/null +++ b/src/openrouter/components/applypatchcalloperationdiffdoneevent.py @@ -0,0 +1,35 @@ +"""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 + + +ApplyPatchCallOperationDiffDoneEventType = Literal[ + "response.apply_patch_call_operation_diff.done", +] + + +class ApplyPatchCallOperationDiffDoneEventTypedDict(TypedDict): + r"""Emitted when `operation.diff` streaming completes for an `apply_patch_call`.""" + + diff: str + item_id: str + output_index: int + sequence_number: int + type: ApplyPatchCallOperationDiffDoneEventType + + +class ApplyPatchCallOperationDiffDoneEvent(BaseModel): + r"""Emitted when `operation.diff` streaming completes for an `apply_patch_call`.""" + + diff: str + + item_id: str + + output_index: int + + sequence_number: int + + type: ApplyPatchCallOperationDiffDoneEventType diff --git a/src/openrouter/components/applypatchcalloutputitem.py b/src/openrouter/components/applypatchcalloutputitem.py new file mode 100644 index 0000000..1b768e6 --- /dev/null +++ b/src/openrouter/components/applypatchcalloutputitem.py @@ -0,0 +1,84 @@ +"""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 + + +ApplyPatchCallOutputItemStatus = Union[ + Literal[ + "completed", + "failed", + ], + UnrecognizedStr, +] + + +ApplyPatchCallOutputItemType = Literal["apply_patch_call_output",] + + +class ApplyPatchCallOutputItemTypedDict(TypedDict): + r"""The client's echo of an `apply_patch_call` after applying the patch. `output` is an optional human-readable log; `status` is `completed` when the patch was applied successfully, `failed` otherwise.""" + + call_id: str + status: ApplyPatchCallOutputItemStatus + type: ApplyPatchCallOutputItemType + id: NotRequired[Nullable[str]] + output: NotRequired[Nullable[str]] + + +class ApplyPatchCallOutputItem(BaseModel): + r"""The client's echo of an `apply_patch_call` after applying the patch. `output` is an optional human-readable log; `status` is `completed` when the patch was applied successfully, `failed` otherwise.""" + + call_id: str + + status: Annotated[ + ApplyPatchCallOutputItemStatus, PlainValidator(validate_open_enum(False)) + ] + + type: ApplyPatchCallOutputItemType + + id: OptionalNullable[str] = UNSET + + output: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "output"] + nullable_fields = ["id", "output"] + 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/applypatchcallstatus.py b/src/openrouter/components/applypatchcallstatus.py new file mode 100644 index 0000000..ae5ca58 --- /dev/null +++ b/src/openrouter/components/applypatchcallstatus.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +ApplyPatchCallStatus = Union[ + Literal[ + "in_progress", + "completed", + ], + UnrecognizedStr, +] +r"""Lifecycle state of an `apply_patch_call` output item.""" diff --git a/src/openrouter/components/applypatchservertool_openrouter.py b/src/openrouter/components/applypatchservertool_openrouter.py new file mode 100644 index 0000000..158c52b --- /dev/null +++ b/src/openrouter/components/applypatchservertool_openrouter.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .applypatchservertoolconfig import ( + ApplyPatchServerToolConfig, + ApplyPatchServerToolConfigTypedDict, +) +from openrouter.types import BaseModel +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +ApplyPatchServerToolOpenRouterType = Literal["openrouter:apply_patch",] + + +class ApplyPatchServerToolOpenRouterTypedDict(TypedDict): + r"""OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API.""" + + type: ApplyPatchServerToolOpenRouterType + parameters: NotRequired[ApplyPatchServerToolConfigTypedDict] + r"""Configuration for the openrouter:apply_patch server tool""" + + +class ApplyPatchServerToolOpenRouter(BaseModel): + r"""OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API.""" + + type: ApplyPatchServerToolOpenRouterType + + parameters: Optional[ApplyPatchServerToolConfig] = None + r"""Configuration for the openrouter:apply_patch server tool""" diff --git a/src/openrouter/components/applypatchservertoolconfig.py b/src/openrouter/components/applypatchservertoolconfig.py new file mode 100644 index 0000000..9ee0ffd --- /dev/null +++ b/src/openrouter/components/applypatchservertoolconfig.py @@ -0,0 +1,13 @@ +"""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 ApplyPatchServerToolConfigTypedDict(TypedDict): + r"""Configuration for the openrouter:apply_patch server tool""" + + +class ApplyPatchServerToolConfig(BaseModel): + r"""Configuration for the openrouter:apply_patch server tool""" diff --git a/src/openrouter/components/baseinputs_union.py b/src/openrouter/components/baseinputs_union.py index 7e50121..25128bd 100644 --- a/src/openrouter/components/baseinputs_union.py +++ b/src/openrouter/components/baseinputs_union.py @@ -1,10 +1,23 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .applypatchcallitem import ApplyPatchCallItem, ApplyPatchCallItemTypedDict +from .applypatchcalloutputitem import ( + ApplyPatchCallOutputItem, + ApplyPatchCallOutputItemTypedDict, +) from .inputaudio import InputAudio, InputAudioTypedDict from .inputfile import InputFile, InputFileTypedDict from .inputimage import InputImage, InputImageTypedDict from .inputtext import InputText, InputTextTypedDict +from .openairesponsecustomtoolcall import ( + OpenAIResponseCustomToolCall, + OpenAIResponseCustomToolCallTypedDict, +) +from .openairesponsecustomtoolcalloutput import ( + OpenAIResponseCustomToolCallOutput, + OpenAIResponseCustomToolCallOutputTypedDict, +) from .openairesponsefunctiontoolcall import ( OpenAIResponseFunctionToolCall, OpenAIResponseFunctionToolCallTypedDict, @@ -172,9 +185,13 @@ def serialize_model(self, handler): BaseInputsMessageTypedDict, OpenAIResponseInputMessageItemTypedDict, OutputItemImageGenerationCallTypedDict, + OpenAIResponseCustomToolCallOutputTypedDict, OpenAIResponseFunctionToolCallOutputTypedDict, - OpenAIResponseFunctionToolCallTypedDict, + ApplyPatchCallItemTypedDict, + ApplyPatchCallOutputItemTypedDict, OutputMessageTypedDict, + OpenAIResponseCustomToolCallTypedDict, + OpenAIResponseFunctionToolCallTypedDict, ], ) @@ -185,9 +202,13 @@ def serialize_model(self, handler): BaseInputsMessage, OpenAIResponseInputMessageItem, OutputItemImageGenerationCall, + OpenAIResponseCustomToolCallOutput, OpenAIResponseFunctionToolCallOutput, - OpenAIResponseFunctionToolCall, + ApplyPatchCallItem, + ApplyPatchCallOutputItem, OutputMessage, + OpenAIResponseCustomToolCall, + OpenAIResponseFunctionToolCall, ], ) diff --git a/src/openrouter/components/bulkaddworkspacemembersrequest.py b/src/openrouter/components/bulkaddworkspacemembersrequest.py new file mode 100644 index 0000000..c792725 --- /dev/null +++ b/src/openrouter/components/bulkaddworkspacemembersrequest.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class BulkAddWorkspaceMembersRequestTypedDict(TypedDict): + user_ids: List[str] + r"""List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization.""" + + +class BulkAddWorkspaceMembersRequest(BaseModel): + user_ids: List[str] + r"""List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization.""" diff --git a/src/openrouter/components/bulkaddworkspacemembersresponse.py b/src/openrouter/components/bulkaddworkspacemembersresponse.py new file mode 100644 index 0000000..f46030f --- /dev/null +++ b/src/openrouter/components/bulkaddworkspacemembersresponse.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .workspacemember import WorkspaceMember, WorkspaceMemberTypedDict +from openrouter.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class BulkAddWorkspaceMembersResponseTypedDict(TypedDict): + added_count: int + r"""Number of workspace memberships created or updated""" + data: List[WorkspaceMemberTypedDict] + r"""List of added workspace memberships""" + + +class BulkAddWorkspaceMembersResponse(BaseModel): + added_count: int + r"""Number of workspace memberships created or updated""" + + data: List[WorkspaceMember] + r"""List of added workspace memberships""" diff --git a/src/openrouter/components/bulkremoveworkspacemembersrequest.py b/src/openrouter/components/bulkremoveworkspacemembersrequest.py new file mode 100644 index 0000000..a02c46c --- /dev/null +++ b/src/openrouter/components/bulkremoveworkspacemembersrequest.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class BulkRemoveWorkspaceMembersRequestTypedDict(TypedDict): + user_ids: List[str] + r"""List of user IDs to remove from the workspace""" + + +class BulkRemoveWorkspaceMembersRequest(BaseModel): + user_ids: List[str] + r"""List of user IDs to remove from the workspace""" diff --git a/src/openrouter/components/bulkremoveworkspacemembersresponse.py b/src/openrouter/components/bulkremoveworkspacemembersresponse.py new file mode 100644 index 0000000..69082ff --- /dev/null +++ b/src/openrouter/components/bulkremoveworkspacemembersresponse.py @@ -0,0 +1,15 @@ +"""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 BulkRemoveWorkspaceMembersResponseTypedDict(TypedDict): + removed_count: int + r"""Number of members removed""" + + +class BulkRemoveWorkspaceMembersResponse(BaseModel): + removed_count: int + r"""Number of members removed""" diff --git a/src/openrouter/components/byokkey.py b/src/openrouter/components/byokkey.py new file mode 100644 index 0000000..033a6f3 --- /dev/null +++ b/src/openrouter/components/byokkey.py @@ -0,0 +1,116 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .byokproviderslug import BYOKProviderSlug +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 +from typing_extensions import Annotated, NotRequired, TypedDict + + +class BYOKKeyTypedDict(TypedDict): + allowed_api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction.""" + allowed_models: Nullable[List[str]] + r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction.""" + allowed_user_ids: Nullable[List[str]] + r"""Optional allowlist of user IDs that may use this credential. `null` means no restriction.""" + created_at: str + r"""ISO timestamp of when the credential was created.""" + disabled: bool + r"""Whether this credential is currently disabled.""" + id: str + r"""Stable public identifier for this BYOK credential.""" + is_fallback: bool + r"""Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried.""" + label: str + r"""Short masked snippet of the key (e.g. the first/last few characters) used to identify it in the UI.""" + provider: BYOKProviderSlug + r"""The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`).""" + sort_order: int + r"""Position within the provider — credentials are tried in ascending sort order.""" + workspace_id: str + r"""ID of the workspace this credential belongs to.""" + name: NotRequired[Nullable[str]] + r"""Optional human-readable name for the credential.""" + + +class BYOKKey(BaseModel): + allowed_api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction.""" + + allowed_models: Nullable[List[str]] + r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction.""" + + allowed_user_ids: Nullable[List[str]] + r"""Optional allowlist of user IDs that may use this credential. `null` means no restriction.""" + + created_at: str + r"""ISO timestamp of when the credential was created.""" + + disabled: bool + r"""Whether this credential is currently disabled.""" + + id: str + r"""Stable public identifier for this BYOK credential.""" + + is_fallback: bool + r"""Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried.""" + + label: str + r"""Short masked snippet of the key (e.g. the first/last few characters) used to identify it in the UI.""" + + provider: Annotated[BYOKProviderSlug, PlainValidator(validate_open_enum(False))] + r"""The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`).""" + + sort_order: int + r"""Position within the provider — credentials are tried in ascending sort order.""" + + workspace_id: str + r"""ID of the workspace this credential belongs to.""" + + name: OptionalNullable[str] = UNSET + r"""Optional human-readable name for the credential.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["name"] + nullable_fields = [ + "allowed_api_key_hashes", + "allowed_models", + "allowed_user_ids", + "name", + ] + 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/byokproviderslug.py b/src/openrouter/components/byokproviderslug.py new file mode 100644 index 0000000..5b24f83 --- /dev/null +++ b/src/openrouter/components/byokproviderslug.py @@ -0,0 +1,93 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +BYOKProviderSlug = Union[ + Literal[ + "ai21", + "aion-labs", + "akashml", + "alibaba", + "amazon-bedrock", + "amazon-nova", + "ambient", + "anthropic", + "arcee-ai", + "atlas-cloud", + "avian", + "azure", + "baidu", + "baseten", + "black-forest-labs", + "byteplus", + "cerebras", + "chutes", + "cirrascale", + "clarifai", + "cloudflare", + "cohere", + "crusoe", + "deepinfra", + "deepseek", + "dekallm", + "featherless", + "fireworks", + "friendli", + "gmicloud", + "google-ai-studio", + "google-vertex", + "groq", + "hyperbolic", + "inception", + "inceptron", + "inference-net", + "infermatic", + "inflection", + "io-net", + "ionstream", + "liquid", + "mancer", + "mara", + "minimax", + "mistral", + "modelrun", + "modular", + "moonshotai", + "morph", + "ncompass", + "nebius", + "nex-agi", + "nextbit", + "novita", + "nvidia", + "open-inference", + "openai", + "parasail", + "perceptron", + "perplexity", + "phala", + "poolside", + "recraft", + "reka", + "relace", + "sambanova", + "seed", + "siliconflow", + "sourceful", + "stepfun", + "streamlake", + "switchpoint", + "together", + "upstage", + "venice", + "wandb", + "xai", + "xiaomi", + "z-ai", + ], + UnrecognizedStr, +] +r"""The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`).""" diff --git a/src/openrouter/components/chatfunctiontool.py b/src/openrouter/components/chatfunctiontool.py index b0c0d43..90b069f 100644 --- a/src/openrouter/components/chatfunctiontool.py +++ b/src/openrouter/components/chatfunctiontool.py @@ -22,6 +22,7 @@ OpenRouterWebSearchServerTool, OpenRouterWebSearchServerToolTypedDict, ) +from .webfetchservertool import WebFetchServerTool, WebFetchServerToolTypedDict from openrouter.types import ( BaseModel, Nullable, @@ -121,6 +122,7 @@ class ChatFunctionToolFunction(BaseModel): DatetimeServerToolTypedDict, ImageGenerationServerToolOpenRouterTypedDict, ChatSearchModelsServerToolTypedDict, + WebFetchServerToolTypedDict, OpenRouterWebSearchServerToolTypedDict, ChatFunctionToolFunctionTypedDict, ChatWebSearchShorthandTypedDict, @@ -139,6 +141,7 @@ class ChatFunctionToolFunction(BaseModel): Annotated[ ChatSearchModelsServerTool, Tag("openrouter:experimental__search_models") ], + Annotated[WebFetchServerTool, Tag("openrouter:web_fetch")], Annotated[OpenRouterWebSearchServerTool, Tag("openrouter:web_search")], Annotated[ChatWebSearchShorthand, Tag("web_search")], Annotated[ChatWebSearchShorthand, Tag("web_search_preview")], diff --git a/src/openrouter/components/chatrequest.py b/src/openrouter/components/chatrequest.py index 7559c77..12a7bcd 100644 --- a/src/openrouter/components/chatrequest.py +++ b/src/openrouter/components/chatrequest.py @@ -34,8 +34,10 @@ FormatJSONObjectConfig, FormatJSONObjectConfigTypedDict, ) +from .fusionplugin import FusionPlugin, FusionPluginTypedDict from .imageconfig import ImageConfig, ImageConfigTypedDict from .moderationplugin import ModerationPlugin, ModerationPluginTypedDict +from .paretorouterplugin import ParetoRouterPlugin, ParetoRouterPluginTypedDict from .providerpreferences import ProviderPreferences, ProviderPreferencesTypedDict from .responsehealingplugin import ResponseHealingPlugin, ResponseHealingPluginTypedDict from .traceconfig import TraceConfig, TraceConfigTypedDict @@ -73,6 +75,8 @@ AutoRouterPluginTypedDict, FileParserPluginTypedDict, ContextCompressionPluginTypedDict, + ParetoRouterPluginTypedDict, + FusionPluginTypedDict, WebSearchPluginTypedDict, ], ) @@ -83,7 +87,9 @@ Annotated[AutoRouterPlugin, Tag("auto-router")], Annotated[ContextCompressionPlugin, Tag("context-compression")], Annotated[FileParserPlugin, Tag("file-parser")], + Annotated[FusionPlugin, Tag("fusion")], Annotated[ModerationPlugin, Tag("moderation")], + Annotated[ParetoRouterPlugin, Tag("pareto-router")], Annotated[ResponseHealingPlugin, Tag("response-healing")], Annotated[WebSearchPlugin, Tag("web")], ], @@ -210,6 +216,7 @@ class ChatRequestTypedDict(TypedDict): messages: List[ChatMessagesTypedDict] r"""List of messages for the conversation""" cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict] + r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" debug: NotRequired[ChatDebugOptionsTypedDict] r"""Debug options for inspecting request transformations (streaming only)""" frequency_penalty: NotRequired[Nullable[float]] @@ -279,6 +286,7 @@ class ChatRequest(BaseModel): r"""List of messages for the conversation""" cache_control: Optional[AnthropicCacheControlDirective] = None + r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" debug: Optional[ChatDebugOptions] = None r"""Debug options for inspecting request transformations (streaming only)""" diff --git a/src/openrouter/components/chatresult.py b/src/openrouter/components/chatresult.py index 35a7ea2..85bb6c1 100644 --- a/src/openrouter/components/chatresult.py +++ b/src/openrouter/components/chatresult.py @@ -3,6 +3,7 @@ from __future__ import annotations from .chatchoice import ChatChoice, ChatChoiceTypedDict from .chatusage import ChatUsage, ChatUsageTypedDict +from .openroutermetadata import OpenRouterMetadata, OpenRouterMetadataTypedDict from openrouter.types import ( BaseModel, Nullable, @@ -32,6 +33,7 @@ class ChatResultTypedDict(TypedDict): object: ChatResultObject system_fingerprint: Nullable[str] r"""System fingerprint""" + openrouter_metadata: NotRequired[OpenRouterMetadataTypedDict] service_tier: NotRequired[Nullable[str]] r"""The service tier used by the upstream provider for this request""" usage: NotRequired[ChatUsageTypedDict] @@ -58,6 +60,8 @@ class ChatResult(BaseModel): system_fingerprint: Nullable[str] r"""System fingerprint""" + openrouter_metadata: Optional[OpenRouterMetadata] = None + service_tier: OptionalNullable[str] = UNSET r"""The service tier used by the upstream provider for this request""" @@ -66,7 +70,7 @@ class ChatResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["service_tier", "usage"] + optional_fields = ["openrouter_metadata", "service_tier", "usage"] nullable_fields = ["service_tier", "system_fingerprint"] null_default_fields = [] diff --git a/src/openrouter/components/chatstreamchunk.py b/src/openrouter/components/chatstreamchunk.py index 24aa825..52c3776 100644 --- a/src/openrouter/components/chatstreamchunk.py +++ b/src/openrouter/components/chatstreamchunk.py @@ -3,6 +3,7 @@ from __future__ import annotations from .chatstreamchoice import ChatStreamChoice, ChatStreamChoiceTypedDict from .chatusage import ChatUsage, ChatUsageTypedDict +from .openroutermetadata import OpenRouterMetadata, OpenRouterMetadataTypedDict from openrouter.types import ( BaseModel, Nullable, @@ -51,6 +52,7 @@ class ChatStreamChunkTypedDict(TypedDict): object: ChatStreamChunkObject error: NotRequired[ErrorTypedDict] r"""Error information""" + openrouter_metadata: NotRequired[OpenRouterMetadataTypedDict] service_tier: NotRequired[Nullable[str]] r"""The service tier used by the upstream provider for this request""" system_fingerprint: NotRequired[str] @@ -79,6 +81,8 @@ class ChatStreamChunk(BaseModel): error: Optional[Error] = None r"""Error information""" + openrouter_metadata: Optional[OpenRouterMetadata] = None + service_tier: OptionalNullable[str] = UNSET r"""The service tier used by the upstream provider for this request""" @@ -90,7 +94,13 @@ class ChatStreamChunk(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["error", "service_tier", "system_fingerprint", "usage"] + optional_fields = [ + "error", + "openrouter_metadata", + "service_tier", + "system_fingerprint", + "usage", + ] nullable_fields = ["service_tier"] null_default_fields = [] diff --git a/src/openrouter/components/chatstreamingresponse.py b/src/openrouter/components/chatstreamingresponse.py new file mode 100644 index 0000000..cf5a90d --- /dev/null +++ b/src/openrouter/components/chatstreamingresponse.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatstreamchunk import ChatStreamChunk, ChatStreamChunkTypedDict +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class ChatStreamingResponseTypedDict(TypedDict): + data: ChatStreamChunkTypedDict + r"""Streaming chat completion chunk""" + + +class ChatStreamingResponse(BaseModel): + data: ChatStreamChunk + r"""Streaming chat completion chunk""" diff --git a/src/openrouter/components/chatusage.py b/src/openrouter/components/chatusage.py index 12b58ec..3a7357d 100644 --- a/src/openrouter/components/chatusage.py +++ b/src/openrouter/components/chatusage.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .costdetails import CostDetails, CostDetailsTypedDict from openrouter.types import ( BaseModel, Nullable, @@ -122,6 +123,12 @@ class ChatUsageTypedDict(TypedDict): r"""Total number of tokens""" completion_tokens_details: NotRequired[Nullable[CompletionTokensDetailsTypedDict]] r"""Detailed completion token usage""" + cost: NotRequired[Nullable[float]] + r"""Cost of the completion""" + cost_details: NotRequired[Nullable[CostDetailsTypedDict]] + r"""Breakdown of upstream inference costs""" + is_byok: NotRequired[bool] + r"""Whether a request was made using a Bring Your Own Key configuration""" prompt_tokens_details: NotRequired[Nullable[PromptTokensDetailsTypedDict]] r"""Detailed prompt token usage""" @@ -141,13 +148,33 @@ class ChatUsage(BaseModel): completion_tokens_details: OptionalNullable[CompletionTokensDetails] = UNSET r"""Detailed completion token usage""" + cost: OptionalNullable[float] = UNSET + r"""Cost of the completion""" + + cost_details: OptionalNullable[CostDetails] = UNSET + r"""Breakdown of upstream inference costs""" + + is_byok: Optional[bool] = None + r"""Whether a request was made using a Bring Your Own Key configuration""" + 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"] + optional_fields = [ + "completion_tokens_details", + "cost", + "cost_details", + "is_byok", + "prompt_tokens_details", + ] + nullable_fields = [ + "completion_tokens_details", + "cost", + "cost_details", + "prompt_tokens_details", + ] null_default_fields = [] serialized = handler(self) diff --git a/src/openrouter/components/chatwebsearchshorthand.py b/src/openrouter/components/chatwebsearchshorthand.py index 707f0cf..2f8dec5 100644 --- a/src/openrouter/components/chatwebsearchshorthand.py +++ b/src/openrouter/components/chatwebsearchshorthand.py @@ -31,18 +31,18 @@ class ChatWebSearchShorthandTypedDict(TypedDict): type: ChatWebSearchShorthandType allowed_domains: NotRequired[List[str]] - r"""Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity.""" + r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.""" engine: NotRequired[WebSearchEngineEnum] r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" excluded_domains: NotRequired[List[str]] - r"""Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity.""" + r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.""" max_results: NotRequired[int] r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" max_total_results: NotRequired[int] - r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.""" + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.""" parameters: NotRequired[WebSearchConfigTypedDict] search_context_size: NotRequired[SearchQualityLevel] - r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.""" user_location: NotRequired[WebSearchUserLocationServerToolTypedDict] r"""Approximate user location for location-biased results.""" @@ -55,7 +55,7 @@ class ChatWebSearchShorthand(BaseModel): ] allowed_domains: Optional[List[str]] = None - r"""Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity.""" + r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.""" engine: Annotated[ Optional[WebSearchEngineEnum], PlainValidator(validate_open_enum(False)) @@ -63,20 +63,20 @@ class ChatWebSearchShorthand(BaseModel): r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" excluded_domains: Optional[List[str]] = None - r"""Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity.""" + r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.""" max_results: Optional[int] = None r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" max_total_results: Optional[int] = None - r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.""" + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.""" parameters: Optional[WebSearchConfig] = None search_context_size: Annotated[ Optional[SearchQualityLevel], PlainValidator(validate_open_enum(False)) ] = None - r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.""" user_location: Optional[WebSearchUserLocationServerTool] = None r"""Approximate user location for location-biased results.""" diff --git a/src/openrouter/components/compactionitem.py b/src/openrouter/components/compactionitem.py new file mode 100644 index 0000000..eb9ac69 --- /dev/null +++ b/src/openrouter/components/compactionitem.py @@ -0,0 +1,64 @@ +"""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 + + +CompactionItemType = Literal["compaction",] + + +class CompactionItemTypedDict(TypedDict): + r"""A context compaction marker with encrypted summary""" + + encrypted_content: str + type: CompactionItemType + id: NotRequired[Nullable[str]] + + +class CompactionItem(BaseModel): + r"""A context compaction marker with encrypted summary""" + + encrypted_content: str + + type: CompactionItemType + + id: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id"] + nullable_fields = ["id"] + 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/contentfilteraction.py b/src/openrouter/components/contentfilteraction.py new file mode 100644 index 0000000..55c559e --- /dev/null +++ b/src/openrouter/components/contentfilteraction.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +ContentFilterAction = Union[ + Literal[ + "redact", + "block", + ], + UnrecognizedStr, +] +r"""Action taken when the pattern matches""" diff --git a/src/openrouter/components/contentfilterbuiltinaction.py b/src/openrouter/components/contentfilterbuiltinaction.py new file mode 100644 index 0000000..d5ba92a --- /dev/null +++ b/src/openrouter/components/contentfilterbuiltinaction.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +ContentFilterBuiltinAction = Union[ + Literal[ + "redact", + "block", + "flag", + ], + UnrecognizedStr, +] +r"""Action taken when the builtin filter triggers""" diff --git a/src/openrouter/components/contentfilterbuiltinentry.py b/src/openrouter/components/contentfilterbuiltinentry.py new file mode 100644 index 0000000..57eada2 --- /dev/null +++ b/src/openrouter/components/contentfilterbuiltinentry.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .contentfilterbuiltinaction import ContentFilterBuiltinAction +from .contentfilterbuiltinslug import ContentFilterBuiltinSlug +from openrouter.types import BaseModel +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ContentFilterBuiltinEntryTypedDict(TypedDict): + r"""A builtin content filter entry. Builtin filters include PII detectors and the regex-based prompt injection detector.""" + + action: ContentFilterBuiltinAction + r"""Action taken when the builtin filter triggers""" + slug: ContentFilterBuiltinSlug + r"""The builtin filter identifier""" + label: NotRequired[str] + r"""Optional label used in redaction placeholders (e.g. \"[PROMPT_INJECTION]\")""" + + +class ContentFilterBuiltinEntry(BaseModel): + r"""A builtin content filter entry. Builtin filters include PII detectors and the regex-based prompt injection detector.""" + + action: Annotated[ + ContentFilterBuiltinAction, PlainValidator(validate_open_enum(False)) + ] + r"""Action taken when the builtin filter triggers""" + + slug: Annotated[ContentFilterBuiltinSlug, PlainValidator(validate_open_enum(False))] + r"""The builtin filter identifier""" + + label: Optional[str] = None + r"""Optional label used in redaction placeholders (e.g. \"[PROMPT_INJECTION]\")""" diff --git a/src/openrouter/components/contentfilterbuiltinslug.py b/src/openrouter/components/contentfilterbuiltinslug.py new file mode 100644 index 0000000..bbc07e6 --- /dev/null +++ b/src/openrouter/components/contentfilterbuiltinslug.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +ContentFilterBuiltinSlug = Union[ + Literal[ + "email", + "phone", + "ssn", + "credit-card", + "ip-address", + "person-name", + "address", + "regex-prompt-injection", + ], + UnrecognizedStr, +] +r"""The builtin filter identifier""" diff --git a/src/openrouter/components/contentfilterentry.py b/src/openrouter/components/contentfilterentry.py new file mode 100644 index 0000000..856522d --- /dev/null +++ b/src/openrouter/components/contentfilterentry.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .contentfilteraction import ContentFilterAction +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 ContentFilterEntryTypedDict(TypedDict): + r"""A custom regex content filter that scans request messages for matching patterns.""" + + action: ContentFilterAction + r"""Action taken when the pattern matches""" + pattern: str + r"""A regex pattern to match against request content""" + label: NotRequired[Nullable[str]] + r"""Optional label used in redaction placeholders or error messages""" + + +class ContentFilterEntry(BaseModel): + r"""A custom regex content filter that scans request messages for matching patterns.""" + + action: Annotated[ContentFilterAction, PlainValidator(validate_open_enum(False))] + r"""Action taken when the pattern matches""" + + pattern: str + r"""A regex pattern to match against request content""" + + label: OptionalNullable[str] = UNSET + r"""Optional label used in redaction placeholders or error messages""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["label"] + nullable_fields = ["label"] + 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/contentpartinputaudio.py b/src/openrouter/components/contentpartinputaudio.py new file mode 100644 index 0000000..99da9ad --- /dev/null +++ b/src/openrouter/components/contentpartinputaudio.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .multimodalmedia import MultimodalMedia, MultimodalMediaTypedDict +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ContentPartInputAudioType = Literal["input_audio",] + + +class ContentPartInputAudioTypedDict(TypedDict): + input_audio: MultimodalMediaTypedDict + type: ContentPartInputAudioType + + +class ContentPartInputAudio(BaseModel): + input_audio: MultimodalMedia + + type: ContentPartInputAudioType diff --git a/src/openrouter/components/contentpartinputfile.py b/src/openrouter/components/contentpartinputfile.py new file mode 100644 index 0000000..1adf8a7 --- /dev/null +++ b/src/openrouter/components/contentpartinputfile.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .multimodalmedia import MultimodalMedia, MultimodalMediaTypedDict +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ContentPartInputFileType = Literal["input_file",] + + +class ContentPartInputFileTypedDict(TypedDict): + input_file: MultimodalMediaTypedDict + type: ContentPartInputFileType + + +class ContentPartInputFile(BaseModel): + input_file: MultimodalMedia + + type: ContentPartInputFileType diff --git a/src/openrouter/components/contentpartinputvideo.py b/src/openrouter/components/contentpartinputvideo.py new file mode 100644 index 0000000..6c6f819 --- /dev/null +++ b/src/openrouter/components/contentpartinputvideo.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .multimodalmedia import MultimodalMedia, MultimodalMediaTypedDict +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ContentPartInputVideoType = Literal["input_video",] + + +class ContentPartInputVideoTypedDict(TypedDict): + input_video: MultimodalMediaTypedDict + type: ContentPartInputVideoType + + +class ContentPartInputVideo(BaseModel): + input_video: MultimodalMedia + + type: ContentPartInputVideoType diff --git a/src/openrouter/components/costdetails.py b/src/openrouter/components/costdetails.py new file mode 100644 index 0000000..7880cdc --- /dev/null +++ b/src/openrouter/components/costdetails.py @@ -0,0 +1,60 @@ +"""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_extensions import NotRequired, TypedDict + + +class CostDetailsTypedDict(TypedDict): + r"""Breakdown of upstream inference costs""" + + upstream_inference_completions_cost: float + upstream_inference_prompt_cost: float + upstream_inference_cost: NotRequired[Nullable[float]] + + +class CostDetails(BaseModel): + r"""Breakdown of upstream inference costs""" + + upstream_inference_completions_cost: float + + upstream_inference_prompt_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 diff --git a/src/openrouter/components/createguardrailrequest.py b/src/openrouter/components/createguardrailrequest.py index c6dd6d6..36caca7 100644 --- a/src/openrouter/components/createguardrailrequest.py +++ b/src/openrouter/components/createguardrailrequest.py @@ -1,6 +1,11 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .contentfilterbuiltinentry import ( + ContentFilterBuiltinEntry, + ContentFilterBuiltinEntryTypedDict, +) +from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict from .guardrailinterval import GuardrailInterval from openrouter.types import ( BaseModel, @@ -10,9 +15,10 @@ UNSET_SENTINEL, ) from openrouter.utils import validate_open_enum +import pydantic from pydantic import model_serializer from pydantic.functional_validators import PlainValidator -from typing import List +from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -23,10 +29,24 @@ class CreateGuardrailRequestTypedDict(TypedDict): r"""Array of model identifiers (slug or canonical_slug accepted)""" allowed_providers: NotRequired[Nullable[List[str]]] r"""List of allowed provider IDs""" + content_filter_builtins: NotRequired[ + Nullable[List[ContentFilterBuiltinEntryTypedDict]] + ] + r"""Builtin content filters to apply. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.""" + content_filters: NotRequired[Nullable[List[ContentFilterEntryTypedDict]]] + r"""Custom regex content filters to apply to request messages""" description: NotRequired[Nullable[str]] r"""Description of the guardrail""" enforce_zdr: NotRequired[Nullable[bool]] - r"""Whether to enforce zero data retention""" + r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.""" + enforce_zdr_anthropic: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.""" + enforce_zdr_google: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.""" + enforce_zdr_openai: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.""" + enforce_zdr_other: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.""" ignored_models: NotRequired[Nullable[List[str]]] r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)""" ignored_providers: NotRequired[Nullable[List[str]]] @@ -35,6 +55,8 @@ class CreateGuardrailRequestTypedDict(TypedDict): r"""Spending limit in USD""" reset_interval: NotRequired[Nullable[GuardrailInterval]] r"""Interval at which the limit resets (daily, weekly, monthly)""" + workspace_id: NotRequired[str] + r"""The workspace to create the guardrail in. Defaults to the default workspace if not provided.""" class CreateGuardrailRequest(BaseModel): @@ -47,11 +69,34 @@ class CreateGuardrailRequest(BaseModel): allowed_providers: OptionalNullable[List[str]] = UNSET r"""List of allowed provider IDs""" + content_filter_builtins: OptionalNullable[List[ContentFilterBuiltinEntry]] = UNSET + r"""Builtin content filters to apply. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.""" + + content_filters: OptionalNullable[List[ContentFilterEntry]] = UNSET + r"""Custom regex content filters to apply to request messages""" + description: OptionalNullable[str] = UNSET r"""Description of the guardrail""" - enforce_zdr: OptionalNullable[bool] = UNSET - r"""Whether to enforce zero data retention""" + enforce_zdr: Annotated[ + OptionalNullable[bool], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET + r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.""" + + enforce_zdr_anthropic: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.""" + + enforce_zdr_google: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.""" + + enforce_zdr_openai: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.""" + + enforce_zdr_other: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.""" ignored_models: OptionalNullable[List[str]] = UNSET r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)""" @@ -67,23 +112,39 @@ class CreateGuardrailRequest(BaseModel): ] = UNSET r"""Interval at which the limit resets (daily, weekly, monthly)""" + workspace_id: Optional[str] = None + r"""The workspace to create the guardrail in. Defaults to the default workspace if not provided.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ "allowed_models", "allowed_providers", + "content_filter_builtins", + "content_filters", "description", "enforce_zdr", + "enforce_zdr_anthropic", + "enforce_zdr_google", + "enforce_zdr_openai", + "enforce_zdr_other", "ignored_models", "ignored_providers", "limit_usd", "reset_interval", + "workspace_id", ] nullable_fields = [ "allowed_models", "allowed_providers", + "content_filter_builtins", + "content_filters", "description", "enforce_zdr", + "enforce_zdr_anthropic", + "enforce_zdr_google", + "enforce_zdr_openai", + "enforce_zdr_other", "ignored_models", "ignored_providers", "limit_usd", diff --git a/src/openrouter/components/createworkspacerequest.py b/src/openrouter/components/createworkspacerequest.py new file mode 100644 index 0000000..e068f80 --- /dev/null +++ b/src/openrouter/components/createworkspacerequest.py @@ -0,0 +1,119 @@ +"""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 List, Optional +from typing_extensions import NotRequired, TypedDict + + +class CreateWorkspaceRequestTypedDict(TypedDict): + name: str + r"""Name for the new workspace""" + slug: str + r"""URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)""" + default_image_model: NotRequired[Nullable[str]] + r"""Default image model for this workspace""" + default_provider_sort: NotRequired[Nullable[str]] + r"""Default provider sort preference (price, throughput, latency, exacto)""" + default_text_model: NotRequired[Nullable[str]] + r"""Default text model for this workspace""" + description: NotRequired[Nullable[str]] + r"""Description of the workspace""" + io_logging_api_key_ids: NotRequired[Nullable[List[int]]] + r"""Optional array of API key IDs to filter I/O logging""" + io_logging_sampling_rate: NotRequired[float] + r"""Sampling rate for I/O logging (0.0001-1)""" + is_data_discount_logging_enabled: NotRequired[bool] + r"""Whether data discount logging is enabled""" + is_observability_broadcast_enabled: NotRequired[bool] + r"""Whether broadcast is enabled""" + is_observability_io_logging_enabled: NotRequired[bool] + r"""Whether private logging is enabled""" + + +class CreateWorkspaceRequest(BaseModel): + name: str + r"""Name for the new workspace""" + + slug: str + r"""URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)""" + + default_image_model: OptionalNullable[str] = UNSET + r"""Default image model for this workspace""" + + default_provider_sort: OptionalNullable[str] = UNSET + r"""Default provider sort preference (price, throughput, latency, exacto)""" + + default_text_model: OptionalNullable[str] = UNSET + r"""Default text model for this workspace""" + + description: OptionalNullable[str] = UNSET + r"""Description of the workspace""" + + io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET + r"""Optional array of API key IDs to filter I/O logging""" + + io_logging_sampling_rate: Optional[float] = None + r"""Sampling rate for I/O logging (0.0001-1)""" + + is_data_discount_logging_enabled: Optional[bool] = None + r"""Whether data discount logging is enabled""" + + is_observability_broadcast_enabled: Optional[bool] = None + r"""Whether broadcast is enabled""" + + is_observability_io_logging_enabled: Optional[bool] = None + r"""Whether private logging is enabled""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "default_image_model", + "default_provider_sort", + "default_text_model", + "description", + "io_logging_api_key_ids", + "io_logging_sampling_rate", + "is_data_discount_logging_enabled", + "is_observability_broadcast_enabled", + "is_observability_io_logging_enabled", + ] + nullable_fields = [ + "default_image_model", + "default_provider_sort", + "default_text_model", + "description", + "io_logging_api_key_ids", + ] + 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/createworkspaceresponse.py b/src/openrouter/components/createworkspaceresponse.py new file mode 100644 index 0000000..54c7b43 --- /dev/null +++ b/src/openrouter/components/createworkspaceresponse.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .workspace import Workspace, WorkspaceTypedDict +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class CreateWorkspaceResponseTypedDict(TypedDict): + data: WorkspaceTypedDict + + +class CreateWorkspaceResponse(BaseModel): + data: Workspace diff --git a/src/openrouter/components/customtoolcallinputdeltaevent.py b/src/openrouter/components/customtoolcallinputdeltaevent.py new file mode 100644 index 0000000..bb8eacd --- /dev/null +++ b/src/openrouter/components/customtoolcallinputdeltaevent.py @@ -0,0 +1,33 @@ +"""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 + + +CustomToolCallInputDeltaEventType = Literal["response.custom_tool_call_input.delta",] + + +class CustomToolCallInputDeltaEventTypedDict(TypedDict): + r"""Event emitted when a custom tool call's freeform input is being streamed. Mirrors `response.function_call_arguments.delta` but for `custom` tools whose input is opaque text rather than JSON arguments.""" + + delta: str + item_id: str + output_index: int + sequence_number: int + type: CustomToolCallInputDeltaEventType + + +class CustomToolCallInputDeltaEvent(BaseModel): + r"""Event emitted when a custom tool call's freeform input is being streamed. Mirrors `response.function_call_arguments.delta` but for `custom` tools whose input is opaque text rather than JSON arguments.""" + + delta: str + + item_id: str + + output_index: int + + sequence_number: int + + type: CustomToolCallInputDeltaEventType diff --git a/src/openrouter/components/customtoolcallinputdoneevent.py b/src/openrouter/components/customtoolcallinputdoneevent.py new file mode 100644 index 0000000..308a296 --- /dev/null +++ b/src/openrouter/components/customtoolcallinputdoneevent.py @@ -0,0 +1,33 @@ +"""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 + + +CustomToolCallInputDoneEventType = Literal["response.custom_tool_call_input.done",] + + +class CustomToolCallInputDoneEventTypedDict(TypedDict): + r"""Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools.""" + + input: str + item_id: str + output_index: int + sequence_number: int + type: CustomToolCallInputDoneEventType + + +class CustomToolCallInputDoneEvent(BaseModel): + r"""Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools.""" + + input: str + + item_id: str + + output_index: int + + sequence_number: int + + type: CustomToolCallInputDoneEventType diff --git a/src/openrouter/components/customtoolcallitem.py b/src/openrouter/components/customtoolcallitem.py new file mode 100644 index 0000000..486f76d --- /dev/null +++ b/src/openrouter/components/customtoolcallitem.py @@ -0,0 +1,38 @@ +"""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 + + +CustomToolCallItemType = Literal["custom_tool_call",] + + +class CustomToolCallItemTypedDict(TypedDict): + r"""A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments.""" + + call_id: str + input: str + name: str + type: CustomToolCallItemType + id: NotRequired[str] + namespace: NotRequired[str] + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" + + +class CustomToolCallItem(BaseModel): + r"""A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments.""" + + call_id: str + + input: str + + name: str + + type: CustomToolCallItemType + + id: Optional[str] = None + + namespace: Optional[str] = None + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" diff --git a/src/openrouter/components/customtoolcalloutputitem.py b/src/openrouter/components/customtoolcalloutputitem.py new file mode 100644 index 0000000..dd9af83 --- /dev/null +++ b/src/openrouter/components/customtoolcalloutputitem.py @@ -0,0 +1,138 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .inputfile import InputFile, InputFileTypedDict +from .inputtext import InputText, InputTextTypedDict +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 + + +CustomToolCallOutputItemDetail = Union[ + Literal[ + "auto", + "high", + "low", + "original", + ], + UnrecognizedStr, +] + + +CustomToolCallOutputItemOutputType = Literal["input_image",] + + +class CustomToolCallOutputItemOutputInputImageTypedDict(TypedDict): + r"""Image input content item""" + + detail: CustomToolCallOutputItemDetail + type: CustomToolCallOutputItemOutputType + image_url: NotRequired[Nullable[str]] + + +class CustomToolCallOutputItemOutputInputImage(BaseModel): + r"""Image input content item""" + + detail: Annotated[ + CustomToolCallOutputItemDetail, PlainValidator(validate_open_enum(False)) + ] + + type: CustomToolCallOutputItemOutputType + + 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 + + +CustomToolCallOutputItemOutputUnion1TypedDict = TypeAliasType( + "CustomToolCallOutputItemOutputUnion1TypedDict", + Union[ + InputTextTypedDict, + CustomToolCallOutputItemOutputInputImageTypedDict, + InputFileTypedDict, + ], +) + + +CustomToolCallOutputItemOutputUnion1 = Annotated[ + Union[ + Annotated[InputText, Tag("input_text")], + Annotated[CustomToolCallOutputItemOutputInputImage, Tag("input_image")], + Annotated[InputFile, Tag("input_file")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +CustomToolCallOutputItemOutputUnion2TypedDict = TypeAliasType( + "CustomToolCallOutputItemOutputUnion2TypedDict", + Union[str, List[CustomToolCallOutputItemOutputUnion1TypedDict]], +) + + +CustomToolCallOutputItemOutputUnion2 = TypeAliasType( + "CustomToolCallOutputItemOutputUnion2", + Union[str, List[CustomToolCallOutputItemOutputUnion1]], +) + + +CustomToolCallOutputItemTypeCustomToolCallOutput = Literal["custom_tool_call_output",] + + +class CustomToolCallOutputItemTypedDict(TypedDict): + r"""The output from a custom (freeform-grammar) tool call execution. Mirrors `function_call_output` but is matched to a `custom_tool_call` rather than a `function_call`.""" + + call_id: str + output: CustomToolCallOutputItemOutputUnion2TypedDict + type: CustomToolCallOutputItemTypeCustomToolCallOutput + id: NotRequired[str] + + +class CustomToolCallOutputItem(BaseModel): + r"""The output from a custom (freeform-grammar) tool call execution. Mirrors `function_call_output` but is matched to a `custom_tool_call` rather than a `function_call`.""" + + call_id: str + + output: CustomToolCallOutputItemOutputUnion2 + + type: CustomToolCallOutputItemTypeCustomToolCallOutput + + id: Optional[str] = None diff --git a/src/openrouter/components/deleteworkspaceresponse.py b/src/openrouter/components/deleteworkspaceresponse.py new file mode 100644 index 0000000..bed4595 --- /dev/null +++ b/src/openrouter/components/deleteworkspaceresponse.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from openrouter.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class DeleteWorkspaceResponseTypedDict(TypedDict): + deleted: Literal[True] + r"""Confirmation that the workspace was deleted""" + + +class DeleteWorkspaceResponse(BaseModel): + DELETED: Annotated[ + Annotated[Literal[True], AfterValidator(validate_const(True))], + pydantic.Field(alias="deleted"), + ] = True + r"""Confirmation that the workspace was deleted""" diff --git a/src/openrouter/components/easyinputmessage.py b/src/openrouter/components/easyinputmessage.py index 7566167..7c35393 100644 --- a/src/openrouter/components/easyinputmessage.py +++ b/src/openrouter/components/easyinputmessage.py @@ -25,6 +25,7 @@ "auto", "high", "low", + "original", ], UnrecognizedStr, ] diff --git a/src/openrouter/components/endpointinfo.py b/src/openrouter/components/endpointinfo.py new file mode 100644 index 0000000..cac5d92 --- /dev/null +++ b/src/openrouter/components/endpointinfo.py @@ -0,0 +1,19 @@ +"""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 EndpointInfoTypedDict(TypedDict): + model: str + provider: str + selected: bool + + +class EndpointInfo(BaseModel): + model: str + + provider: str + + selected: bool diff --git a/src/openrouter/components/endpointsmetadata.py b/src/openrouter/components/endpointsmetadata.py new file mode 100644 index 0000000..5234443 --- /dev/null +++ b/src/openrouter/components/endpointsmetadata.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .endpointinfo import EndpointInfo, EndpointInfoTypedDict +from openrouter.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class EndpointsMetadataTypedDict(TypedDict): + available: List[EndpointInfoTypedDict] + total: int + + +class EndpointsMetadata(BaseModel): + available: List[EndpointInfo] + + total: int diff --git a/src/openrouter/components/filesearchservertool.py b/src/openrouter/components/filesearchservertool.py index 54e3cfb..974ee97 100644 --- a/src/openrouter/components/filesearchservertool.py +++ b/src/openrouter/components/filesearchservertool.py @@ -30,24 +30,32 @@ ] -Value1TypedDict = TypeAliasType("Value1TypedDict", Union[str, float]) +FileSearchServerToolValue1TypedDict = TypeAliasType( + "FileSearchServerToolValue1TypedDict", Union[str, float] +) -Value1 = TypeAliasType("Value1", Union[str, float]) +FileSearchServerToolValue1 = TypeAliasType( + "FileSearchServerToolValue1", Union[str, float] +) -Value2TypedDict = TypeAliasType( - "Value2TypedDict", Union[str, float, bool, List[Value1TypedDict]] +FileSearchServerToolValue2TypedDict = TypeAliasType( + "FileSearchServerToolValue2TypedDict", + Union[str, float, bool, List[FileSearchServerToolValue1TypedDict]], ) -Value2 = TypeAliasType("Value2", Union[str, float, bool, List[Value1]]) +FileSearchServerToolValue2 = TypeAliasType( + "FileSearchServerToolValue2", + Union[str, float, bool, List[FileSearchServerToolValue1]], +) class FiltersTypedDict(TypedDict): key: str type: FiltersType - value: Value2TypedDict + value: FileSearchServerToolValue2TypedDict class Filters(BaseModel): @@ -55,7 +63,7 @@ class Filters(BaseModel): type: Annotated[FiltersType, PlainValidator(validate_open_enum(False))] - value: Value2 + value: FileSearchServerToolValue2 FiltersUnionTypedDict = TypeAliasType( diff --git a/src/openrouter/components/functioncallitem.py b/src/openrouter/components/functioncallitem.py index 5f04a05..82a1e63 100644 --- a/src/openrouter/components/functioncallitem.py +++ b/src/openrouter/components/functioncallitem.py @@ -20,6 +20,8 @@ class FunctionCallItemTypedDict(TypedDict): id: str name: str type: FunctionCallItemType + namespace: NotRequired[str] + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" status: NotRequired[ToolCallStatus] @@ -36,6 +38,9 @@ class FunctionCallItem(BaseModel): type: FunctionCallItemType + namespace: Optional[str] = None + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" + status: Annotated[ Optional[ToolCallStatus], PlainValidator(validate_open_enum(False)) ] = None diff --git a/src/openrouter/components/functioncalloutputitem.py b/src/openrouter/components/functioncalloutputitem.py index 239f67d..e38d12f 100644 --- a/src/openrouter/components/functioncalloutputitem.py +++ b/src/openrouter/components/functioncalloutputitem.py @@ -23,6 +23,7 @@ "auto", "high", "low", + "original", ], UnrecognizedStr, ] @@ -31,7 +32,7 @@ FunctionCallOutputItemOutputType = Literal["input_image",] -class OutputInputImageTypedDict(TypedDict): +class FunctionCallOutputItemOutputInputImageTypedDict(TypedDict): r"""Image input content item""" detail: FunctionCallOutputItemDetail @@ -39,7 +40,7 @@ class OutputInputImageTypedDict(TypedDict): image_url: NotRequired[Nullable[str]] -class OutputInputImage(BaseModel): +class FunctionCallOutputItemOutputInputImage(BaseModel): r"""Image input content item""" detail: Annotated[ @@ -83,14 +84,18 @@ def serialize_model(self, handler): FunctionCallOutputItemOutputUnion1TypedDict = TypeAliasType( "FunctionCallOutputItemOutputUnion1TypedDict", - Union[InputTextTypedDict, OutputInputImageTypedDict, InputFileTypedDict], + Union[ + InputTextTypedDict, + FunctionCallOutputItemOutputInputImageTypedDict, + InputFileTypedDict, + ], ) FunctionCallOutputItemOutputUnion1 = Annotated[ Union[ Annotated[InputText, Tag("input_text")], - Annotated[OutputInputImage, Tag("input_image")], + Annotated[FunctionCallOutputItemOutputInputImage, Tag("input_image")], Annotated[InputFile, Tag("input_file")], ], Discriminator(lambda m: get_discriminator(m, "type", "type")), diff --git a/src/openrouter/components/fusionplugin.py b/src/openrouter/components/fusionplugin.py new file mode 100644 index 0000000..3cc9d74 --- /dev/null +++ b/src/openrouter/components/fusionplugin.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import List, Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +FusionPluginID = Literal["fusion",] + + +class FusionPluginTypedDict(TypedDict): + id: FusionPluginID + analysis_models: NotRequired[List[str]] + r"""Slugs of models to run in parallel as the \"expert panel\" the judge analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).""" + enabled: NotRequired[bool] + r"""Set to false to disable the fusion plugin for this request. Defaults to true.""" + max_tool_calls: NotRequired[int] + r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16.""" + model: NotRequired[str] + r"""Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.""" + + +class FusionPlugin(BaseModel): + id: FusionPluginID + + analysis_models: Optional[List[str]] = None + r"""Slugs of models to run in parallel as the \"expert panel\" the judge analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).""" + + enabled: Optional[bool] = None + r"""Set to false to disable the fusion plugin for this request. Defaults to true.""" + + max_tool_calls: Optional[int] = None + r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16.""" + + model: Optional[str] = None + r"""Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.""" diff --git a/src/openrouter/components/fusionservertool_openrouter.py b/src/openrouter/components/fusionservertool_openrouter.py new file mode 100644 index 0000000..5729ea0 --- /dev/null +++ b/src/openrouter/components/fusionservertool_openrouter.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .fusionservertoolconfig import ( + FusionServerToolConfig, + FusionServerToolConfigTypedDict, +) +from openrouter.types import BaseModel +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +FusionServerToolOpenRouterType = Literal["openrouter:fusion",] + + +class FusionServerToolOpenRouterTypedDict(TypedDict): + r"""OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks a judge model to summarize their collective output as structured JSON the outer model can synthesize from.""" + + type: FusionServerToolOpenRouterType + parameters: NotRequired[FusionServerToolConfigTypedDict] + r"""Configuration for the openrouter:fusion server tool.""" + + +class FusionServerToolOpenRouter(BaseModel): + r"""OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks a judge model to summarize their collective output as structured JSON the outer model can synthesize from.""" + + type: FusionServerToolOpenRouterType + + parameters: Optional[FusionServerToolConfig] = None + r"""Configuration for the openrouter:fusion server tool.""" diff --git a/src/openrouter/components/fusionservertoolconfig.py b/src/openrouter/components/fusionservertoolconfig.py new file mode 100644 index 0000000..aea5920 --- /dev/null +++ b/src/openrouter/components/fusionservertoolconfig.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class FusionServerToolConfigTypedDict(TypedDict): + r"""Configuration for the openrouter:fusion server tool.""" + + analysis_models: NotRequired[List[str]] + r"""Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.""" + max_tool_calls: NotRequired[int] + r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16.""" + model: NotRequired[str] + r"""Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request.""" + + +class FusionServerToolConfig(BaseModel): + r"""Configuration for the openrouter:fusion server tool.""" + + analysis_models: Optional[List[str]] = None + r"""Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.""" + + max_tool_calls: Optional[int] = None + r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16.""" + + model: Optional[str] = None + r"""Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request.""" diff --git a/src/openrouter/components/generationcontentdata.py b/src/openrouter/components/generationcontentdata.py new file mode 100644 index 0000000..065679a --- /dev/null +++ b/src/openrouter/components/generationcontentdata.py @@ -0,0 +1,101 @@ +"""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 Any, List, Union +from typing_extensions import TypeAliasType, TypedDict + + +class Input2TypedDict(TypedDict): + messages: List[Nullable[Any]] + + +class Input2(BaseModel): + messages: List[Nullable[Any]] + + +class Input1TypedDict(TypedDict): + prompt: str + + +class Input1(BaseModel): + prompt: str + + +InputUnionTypedDict = TypeAliasType( + "InputUnionTypedDict", Union[Input1TypedDict, Input2TypedDict] +) +r"""The input to the generation — either a prompt string or an array of messages""" + + +InputUnion = TypeAliasType("InputUnion", Union[Input1, Input2]) +r"""The input to the generation — either a prompt string or an array of messages""" + + +class GenerationContentDataOutputTypedDict(TypedDict): + r"""The output from the generation""" + + completion: Nullable[str] + r"""The completion output""" + reasoning: Nullable[str] + r"""Reasoning/thinking output, if any""" + + +class GenerationContentDataOutput(BaseModel): + r"""The output from the generation""" + + completion: Nullable[str] + r"""The completion output""" + + reasoning: Nullable[str] + r"""Reasoning/thinking output, if any""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["completion", "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 + + +class GenerationContentDataTypedDict(TypedDict): + r"""Stored prompt and completion content""" + + input: InputUnionTypedDict + r"""The input to the generation — either a prompt string or an array of messages""" + output: GenerationContentDataOutputTypedDict + r"""The output from the generation""" + + +class GenerationContentData(BaseModel): + r"""Stored prompt and completion content""" + + input: InputUnion + r"""The input to the generation — either a prompt string or an array of messages""" + + output: GenerationContentDataOutput + r"""The output from the generation""" diff --git a/src/openrouter/components/generationcontentresponse.py b/src/openrouter/components/generationcontentresponse.py new file mode 100644 index 0000000..b762f65 --- /dev/null +++ b/src/openrouter/components/generationcontentresponse.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .generationcontentdata import GenerationContentData, GenerationContentDataTypedDict +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class GenerationContentResponseTypedDict(TypedDict): + r"""Stored prompt and completion content for a generation""" + + data: GenerationContentDataTypedDict + r"""Stored prompt and completion content""" + + +class GenerationContentResponse(BaseModel): + r"""Stored prompt and completion content for a generation""" + + data: GenerationContentData + r"""Stored prompt and completion content""" diff --git a/src/openrouter/components/generationresponse.py b/src/openrouter/components/generationresponse.py new file mode 100644 index 0000000..99a84fb --- /dev/null +++ b/src/openrouter/components/generationresponse.py @@ -0,0 +1,330 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .providerresponse import ProviderResponse, ProviderResponseTypedDict +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, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +APIType = Union[ + Literal[ + "completions", + "embeddings", + "rerank", + "tts", + "stt", + "video", + ], + UnrecognizedStr, +] +r"""Type of API used for the generation""" + + +class GenerationResponseDataTypedDict(TypedDict): + r"""Generation data""" + + api_type: Nullable[APIType] + r"""Type of API used for the generation""" + app_id: Nullable[int] + r"""ID of the app that made the request""" + cache_discount: Nullable[float] + r"""Discount applied due to caching""" + cancelled: Nullable[bool] + r"""Whether the generation was cancelled""" + created_at: str + r"""ISO 8601 timestamp of when the generation was created""" + external_user: Nullable[str] + r"""External user identifier""" + finish_reason: Nullable[str] + r"""Reason the generation finished""" + generation_time: Nullable[float] + r"""Time taken for generation in milliseconds""" + http_referer: Nullable[str] + r"""Referer header from the request""" + id: str + r"""Unique identifier for the generation""" + is_byok: bool + r"""Whether this used bring-your-own-key""" + latency: Nullable[float] + r"""Total latency in milliseconds""" + model: str + r"""Model used for the generation""" + moderation_latency: Nullable[float] + r"""Moderation latency in milliseconds""" + native_finish_reason: Nullable[str] + r"""Native finish reason as reported by provider""" + native_tokens_cached: Nullable[int] + r"""Native cached tokens as reported by provider""" + native_tokens_completion: Nullable[int] + r"""Native completion tokens as reported by provider""" + native_tokens_completion_images: Nullable[int] + r"""Native completion image tokens as reported by provider""" + native_tokens_prompt: Nullable[int] + r"""Native prompt tokens as reported by provider""" + native_tokens_reasoning: Nullable[int] + r"""Native reasoning tokens as reported by provider""" + num_fetches: Nullable[int] + r"""Number of web fetches performed""" + num_input_audio_prompt: Nullable[int] + r"""Number of audio inputs in the prompt""" + num_media_completion: Nullable[int] + r"""Number of media items in the completion""" + num_media_prompt: Nullable[int] + r"""Number of media items in the prompt""" + num_search_results: Nullable[int] + r"""Number of search results included""" + origin: str + r"""Origin URL of the request""" + provider_name: Nullable[str] + r"""Name of the provider that served the request""" + provider_responses: Nullable[List[ProviderResponseTypedDict]] + r"""List of provider responses for this generation, including fallback attempts""" + router: Nullable[str] + r"""Router used for the request (e.g., openrouter/auto)""" + service_tier: Nullable[str] + r"""Service tier the upstream provider reported running this request on, or null if it did not report one.""" + streamed: Nullable[bool] + r"""Whether the response was streamed""" + tokens_completion: Nullable[int] + r"""Number of tokens in the completion""" + tokens_prompt: Nullable[int] + r"""Number of tokens in the prompt""" + total_cost: float + r"""Total cost of the generation in USD""" + upstream_id: Nullable[str] + r"""Upstream provider's identifier for this generation""" + upstream_inference_cost: Nullable[float] + r"""Cost charged by the upstream provider""" + usage: float + r"""Usage amount in USD""" + user_agent: Nullable[str] + r"""User-Agent header from the request""" + web_search_engine: Nullable[str] + r"""The resolved web search engine used for this generation (e.g. exa, firecrawl, parallel)""" + request_id: NotRequired[Nullable[str]] + r"""Unique identifier grouping all generations from a single API request""" + response_cache_source_id: NotRequired[Nullable[str]] + r"""If this generation was served from response cache, contains the original generation ID. Null otherwise.""" + session_id: NotRequired[Nullable[str]] + r"""Session identifier grouping multiple generations in the same session""" + + +class GenerationResponseData(BaseModel): + r"""Generation data""" + + api_type: Annotated[Nullable[APIType], PlainValidator(validate_open_enum(False))] + r"""Type of API used for the generation""" + + app_id: Nullable[int] + r"""ID of the app that made the request""" + + cache_discount: Nullable[float] + r"""Discount applied due to caching""" + + cancelled: Nullable[bool] + r"""Whether the generation was cancelled""" + + created_at: str + r"""ISO 8601 timestamp of when the generation was created""" + + external_user: Nullable[str] + r"""External user identifier""" + + finish_reason: Nullable[str] + r"""Reason the generation finished""" + + generation_time: Nullable[float] + r"""Time taken for generation in milliseconds""" + + http_referer: Nullable[str] + r"""Referer header from the request""" + + id: str + r"""Unique identifier for the generation""" + + is_byok: bool + r"""Whether this used bring-your-own-key""" + + latency: Nullable[float] + r"""Total latency in milliseconds""" + + model: str + r"""Model used for the generation""" + + moderation_latency: Nullable[float] + r"""Moderation latency in milliseconds""" + + native_finish_reason: Nullable[str] + r"""Native finish reason as reported by provider""" + + native_tokens_cached: Nullable[int] + r"""Native cached tokens as reported by provider""" + + native_tokens_completion: Nullable[int] + r"""Native completion tokens as reported by provider""" + + native_tokens_completion_images: Nullable[int] + r"""Native completion image tokens as reported by provider""" + + native_tokens_prompt: Nullable[int] + r"""Native prompt tokens as reported by provider""" + + native_tokens_reasoning: Nullable[int] + r"""Native reasoning tokens as reported by provider""" + + num_fetches: Nullable[int] + r"""Number of web fetches performed""" + + num_input_audio_prompt: Nullable[int] + r"""Number of audio inputs in the prompt""" + + num_media_completion: Nullable[int] + r"""Number of media items in the completion""" + + num_media_prompt: Nullable[int] + r"""Number of media items in the prompt""" + + num_search_results: Nullable[int] + r"""Number of search results included""" + + origin: str + r"""Origin URL of the request""" + + provider_name: Nullable[str] + r"""Name of the provider that served the request""" + + provider_responses: Nullable[List[ProviderResponse]] + r"""List of provider responses for this generation, including fallback attempts""" + + router: Nullable[str] + r"""Router used for the request (e.g., openrouter/auto)""" + + service_tier: Nullable[str] + r"""Service tier the upstream provider reported running this request on, or null if it did not report one.""" + + streamed: Nullable[bool] + r"""Whether the response was streamed""" + + tokens_completion: Nullable[int] + r"""Number of tokens in the completion""" + + tokens_prompt: Nullable[int] + r"""Number of tokens in the prompt""" + + total_cost: float + r"""Total cost of the generation in USD""" + + upstream_id: Nullable[str] + r"""Upstream provider's identifier for this generation""" + + upstream_inference_cost: Nullable[float] + r"""Cost charged by the upstream provider""" + + usage: float + r"""Usage amount in USD""" + + user_agent: Nullable[str] + r"""User-Agent header from the request""" + + web_search_engine: Nullable[str] + r"""The resolved web search engine used for this generation (e.g. exa, firecrawl, parallel)""" + + request_id: OptionalNullable[str] = UNSET + r"""Unique identifier grouping all generations from a single API request""" + + response_cache_source_id: OptionalNullable[str] = UNSET + r"""If this generation was served from response cache, contains the original generation ID. Null otherwise.""" + + session_id: OptionalNullable[str] = UNSET + r"""Session identifier grouping multiple generations in the same session""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["request_id", "response_cache_source_id", "session_id"] + nullable_fields = [ + "api_type", + "app_id", + "cache_discount", + "cancelled", + "external_user", + "finish_reason", + "generation_time", + "http_referer", + "latency", + "moderation_latency", + "native_finish_reason", + "native_tokens_cached", + "native_tokens_completion", + "native_tokens_completion_images", + "native_tokens_prompt", + "native_tokens_reasoning", + "num_fetches", + "num_input_audio_prompt", + "num_media_completion", + "num_media_prompt", + "num_search_results", + "provider_name", + "provider_responses", + "request_id", + "response_cache_source_id", + "router", + "service_tier", + "session_id", + "streamed", + "tokens_completion", + "tokens_prompt", + "upstream_id", + "upstream_inference_cost", + "user_agent", + "web_search_engine", + ] + 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 GenerationResponseTypedDict(TypedDict): + r"""Generation response""" + + data: GenerationResponseDataTypedDict + r"""Generation data""" + + +class GenerationResponse(BaseModel): + r"""Generation response""" + + data: GenerationResponseData + r"""Generation data""" diff --git a/src/openrouter/components/getbyokkeyresponse.py b/src/openrouter/components/getbyokkeyresponse.py new file mode 100644 index 0000000..a9f5994 --- /dev/null +++ b/src/openrouter/components/getbyokkeyresponse.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .byokkey import BYOKKey, BYOKKeyTypedDict +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class GetBYOKKeyResponseTypedDict(TypedDict): + data: BYOKKeyTypedDict + + +class GetBYOKKeyResponse(BaseModel): + data: BYOKKey diff --git a/src/openrouter/components/getobservabilitydestinationresponse.py b/src/openrouter/components/getobservabilitydestinationresponse.py new file mode 100644 index 0000000..8cab91d --- /dev/null +++ b/src/openrouter/components/getobservabilitydestinationresponse.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilitydestination import ( + ObservabilityDestination, + ObservabilityDestinationTypedDict, +) +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class GetObservabilityDestinationResponseTypedDict(TypedDict): + data: ObservabilityDestinationTypedDict + + +class GetObservabilityDestinationResponse(BaseModel): + data: ObservabilityDestination diff --git a/src/openrouter/components/getworkspaceresponse.py b/src/openrouter/components/getworkspaceresponse.py new file mode 100644 index 0000000..acda534 --- /dev/null +++ b/src/openrouter/components/getworkspaceresponse.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .workspace import Workspace, WorkspaceTypedDict +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class GetWorkspaceResponseTypedDict(TypedDict): + data: WorkspaceTypedDict + + +class GetWorkspaceResponse(BaseModel): + data: Workspace diff --git a/src/openrouter/components/guardrail.py b/src/openrouter/components/guardrail.py index afc25c7..ec0d139 100644 --- a/src/openrouter/components/guardrail.py +++ b/src/openrouter/components/guardrail.py @@ -1,6 +1,11 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .contentfilterbuiltinentry import ( + ContentFilterBuiltinEntry, + ContentFilterBuiltinEntryTypedDict, +) +from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict from .guardrailinterval import GuardrailInterval from openrouter.types import ( BaseModel, @@ -10,6 +15,7 @@ UNSET_SENTINEL, ) from openrouter.utils import validate_open_enum +import pydantic from pydantic import model_serializer from pydantic.functional_validators import PlainValidator from typing import List @@ -23,14 +29,30 @@ class GuardrailTypedDict(TypedDict): r"""Unique identifier for the guardrail""" name: str r"""Name of the guardrail""" + workspace_id: str + r"""The workspace ID this guardrail belongs to.""" allowed_models: NotRequired[Nullable[List[str]]] r"""Array of model canonical_slugs (immutable identifiers)""" allowed_providers: NotRequired[Nullable[List[str]]] r"""List of allowed provider IDs""" + content_filter_builtins: NotRequired[ + Nullable[List[ContentFilterBuiltinEntryTypedDict]] + ] + r"""Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector.""" + content_filters: NotRequired[Nullable[List[ContentFilterEntryTypedDict]]] + r"""Custom regex content filters applied to request messages""" description: NotRequired[Nullable[str]] r"""Description of the guardrail""" enforce_zdr: NotRequired[Nullable[bool]] - r"""Whether to enforce zero data retention""" + r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.""" + enforce_zdr_anthropic: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.""" + enforce_zdr_google: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.""" + enforce_zdr_openai: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.""" + enforce_zdr_other: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.""" ignored_models: NotRequired[Nullable[List[str]]] r"""Array of model canonical_slugs to exclude from routing""" ignored_providers: NotRequired[Nullable[List[str]]] @@ -53,17 +75,43 @@ class Guardrail(BaseModel): name: str r"""Name of the guardrail""" + workspace_id: str + r"""The workspace ID this guardrail belongs to.""" + allowed_models: OptionalNullable[List[str]] = UNSET r"""Array of model canonical_slugs (immutable identifiers)""" allowed_providers: OptionalNullable[List[str]] = UNSET r"""List of allowed provider IDs""" + content_filter_builtins: OptionalNullable[List[ContentFilterBuiltinEntry]] = UNSET + r"""Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector.""" + + content_filters: OptionalNullable[List[ContentFilterEntry]] = UNSET + r"""Custom regex content filters applied to request messages""" + description: OptionalNullable[str] = UNSET r"""Description of the guardrail""" - enforce_zdr: OptionalNullable[bool] = UNSET - r"""Whether to enforce zero data retention""" + enforce_zdr: Annotated[ + OptionalNullable[bool], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET + r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.""" + + enforce_zdr_anthropic: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.""" + + enforce_zdr_google: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.""" + + enforce_zdr_openai: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.""" + + enforce_zdr_other: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.""" ignored_models: OptionalNullable[List[str]] = UNSET r"""Array of model canonical_slugs to exclude from routing""" @@ -87,8 +135,14 @@ def serialize_model(self, handler): optional_fields = [ "allowed_models", "allowed_providers", + "content_filter_builtins", + "content_filters", "description", "enforce_zdr", + "enforce_zdr_anthropic", + "enforce_zdr_google", + "enforce_zdr_openai", + "enforce_zdr_other", "ignored_models", "ignored_providers", "limit_usd", @@ -98,8 +152,14 @@ def serialize_model(self, handler): nullable_fields = [ "allowed_models", "allowed_providers", + "content_filter_builtins", + "content_filters", "description", "enforce_zdr", + "enforce_zdr_anthropic", + "enforce_zdr_google", + "enforce_zdr_openai", + "enforce_zdr_other", "ignored_models", "ignored_providers", "limit_usd", diff --git a/src/openrouter/components/imagegenerationservertoolconfig.py b/src/openrouter/components/imagegenerationservertoolconfig.py index 7b7010a..0fdc8f6 100644 --- a/src/openrouter/components/imagegenerationservertoolconfig.py +++ b/src/openrouter/components/imagegenerationservertoolconfig.py @@ -13,7 +13,7 @@ class ImageGenerationServerToolConfigTypedDict(TypedDict): r"""Configuration for the openrouter:image_generation server tool. Accepts all image_config params (aspect_ratio, quality, size, background, output_format, output_compression, moderation, etc.) plus a model field.""" model: NotRequired[str] - r"""Which image generation model to use (e.g. \"openai/gpt-image-1\"). Defaults to \"openai/gpt-image-1\".""" + r"""Which image generation model to use (e.g. \"openai/gpt-5-image\"). Defaults to \"openai/gpt-5-image\".""" class ImageGenerationServerToolConfig(BaseModel): @@ -27,7 +27,7 @@ class ImageGenerationServerToolConfig(BaseModel): ) model: Optional[str] = None - r"""Which image generation model to use (e.g. \"openai/gpt-image-1\"). Defaults to \"openai/gpt-image-1\".""" + r"""Which image generation model to use (e.g. \"openai/gpt-5-image\"). Defaults to \"openai/gpt-5-image\".""" @property def additional_properties(self): diff --git a/src/openrouter/components/inputimage.py b/src/openrouter/components/inputimage.py index 279f76b..c249efe 100644 --- a/src/openrouter/components/inputimage.py +++ b/src/openrouter/components/inputimage.py @@ -21,6 +21,7 @@ "auto", "high", "low", + "original", ], UnrecognizedStr, ] diff --git a/src/openrouter/components/inputmessageitem.py b/src/openrouter/components/inputmessageitem.py index 9ee8aab..399b1b0 100644 --- a/src/openrouter/components/inputmessageitem.py +++ b/src/openrouter/components/inputmessageitem.py @@ -25,6 +25,7 @@ "auto", "high", "low", + "original", ], UnrecognizedStr, ] diff --git a/src/openrouter/components/inputs_union.py b/src/openrouter/components/inputs_union.py index 723f035..152d21e 100644 --- a/src/openrouter/components/inputs_union.py +++ b/src/openrouter/components/inputs_union.py @@ -1,6 +1,17 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .applypatchcallitem import ApplyPatchCallItem, ApplyPatchCallItemTypedDict +from .applypatchcalloutputitem import ( + ApplyPatchCallOutputItem, + ApplyPatchCallOutputItemTypedDict, +) +from .compactionitem import CompactionItem, CompactionItemTypedDict +from .customtoolcallitem import CustomToolCallItem, CustomToolCallItemTypedDict +from .customtoolcalloutputitem import ( + CustomToolCallOutputItem, + CustomToolCallOutputItemTypedDict, +) from .easyinputmessage import EasyInputMessage, EasyInputMessageTypedDict from .functioncallitem import FunctionCallItem, FunctionCallItemTypedDict from .functioncalloutputitem import ( @@ -8,15 +19,63 @@ FunctionCallOutputItemTypedDict, ) from .inputmessageitem import InputMessageItem, InputMessageItemTypedDict +from .itemreferenceitem import ItemReferenceItem, ItemReferenceItemTypedDict +from .localshellcallitem import LocalShellCallItem, LocalShellCallItemTypedDict +from .localshellcalloutputitem import ( + LocalShellCallOutputItem, + LocalShellCallOutputItemTypedDict, +) +from .mcpapprovalrequestitem import ( + McpApprovalRequestItem, + McpApprovalRequestItemTypedDict, +) +from .mcpapprovalresponseitem import ( + McpApprovalResponseItem, + McpApprovalResponseItemTypedDict, +) +from .mcpcallitem import McpCallItem, McpCallItemTypedDict +from .mcplisttoolsitem import McpListToolsItem, McpListToolsItemTypedDict from .openairesponsesrefusalcontent import ( OpenAIResponsesRefusalContent, OpenAIResponsesRefusalContentTypedDict, ) +from .outputapplypatchservertoolitem import ( + OutputApplyPatchServerToolItem, + OutputApplyPatchServerToolItemTypedDict, +) +from .outputbashservertoolitem import ( + OutputBashServerToolItem, + OutputBashServerToolItemTypedDict, +) +from .outputbrowseruseservertoolitem import ( + OutputBrowserUseServerToolItem, + OutputBrowserUseServerToolItemTypedDict, +) +from .outputcodeinterpretercallitem import ( + OutputCodeInterpreterCallItem, + OutputCodeInterpreterCallItemTypedDict, +) +from .outputcodeinterpreterservertoolitem import ( + OutputCodeInterpreterServerToolItem, + OutputCodeInterpreterServerToolItemTypedDict, +) +from .outputcomputercallitem import ( + OutputComputerCallItem, + OutputComputerCallItemTypedDict, +) +from .outputcustomtoolcallitem import ( + OutputCustomToolCallItem, + OutputCustomToolCallItemTypedDict, +) from .outputdatetimeitem import OutputDatetimeItem, OutputDatetimeItemTypedDict from .outputfilesearchcallitem import ( OutputFileSearchCallItem, OutputFileSearchCallItemTypedDict, ) +from .outputfilesearchservertoolitem import ( + OutputFileSearchServerToolItem, + OutputFileSearchServerToolItemTypedDict, +) from .outputfunctioncallitem import ( OutputFunctionCallItem, OutputFunctionCallItemTypedDict, @@ -25,6 +84,34 @@ OutputImageGenerationCallItem, OutputImageGenerationCallItemTypedDict, ) +from .outputimagegenerationservertoolitem import ( + OutputImageGenerationServerToolItem, + OutputImageGenerationServerToolItemTypedDict, +) +from .outputmcpservertoolitem import ( + OutputMcpServerToolItem, + OutputMcpServerToolItemTypedDict, +) +from .outputmemoryservertoolitem import ( + OutputMemoryServerToolItem, + OutputMemoryServerToolItemTypedDict, +) +from .outputsearchmodelsservertoolitem import ( + OutputSearchModelsServerToolItem, + OutputSearchModelsServerToolItemTypedDict, +) +from .outputtexteditorservertoolitem import ( + OutputTextEditorServerToolItem, + OutputTextEditorServerToolItemTypedDict, +) +from .outputtoolsearchservertoolitem import ( + OutputToolSearchServerToolItem, + OutputToolSearchServerToolItemTypedDict, +) +from .outputwebfetchservertoolitem import ( + OutputWebFetchServerToolItem, + OutputWebFetchServerToolItemTypedDict, +) from .outputwebsearchcallitem import ( OutputWebSearchCallItem, OutputWebSearchCallItemTypedDict, @@ -38,6 +125,8 @@ from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict +from .shellcallitem import ShellCallItem, ShellCallItemTypedDict +from .shellcalloutputitem import ShellCallOutputItem, ShellCallOutputItemTypedDict from openrouter.types import ( BaseModel, Nullable, @@ -290,19 +379,48 @@ def serialize_model(self, handler): InputsUnion1TypedDict = TypeAliasType( "InputsUnion1TypedDict", Union[ - OutputWebSearchServerToolItemTypedDict, - OutputWebSearchCallItemTypedDict, + ItemReferenceItemTypedDict, + CompactionItemTypedDict, + OutputFileSearchCallItemTypedDict, EasyInputMessageTypedDict, InputMessageItemTypedDict, + OutputFileSearchServerToolItemTypedDict, + OutputWebSearchServerToolItemTypedDict, + OutputToolSearchServerToolItemTypedDict, + CustomToolCallOutputItemTypedDict, + LocalShellCallOutputItemTypedDict, OutputImageGenerationCallItemTypedDict, - OutputFileSearchCallItemTypedDict, - FunctionCallOutputItemTypedDict, + OutputWebSearchCallItemTypedDict, + ApplyPatchCallOutputItemTypedDict, + McpApprovalRequestItemTypedDict, + McpListToolsItemTypedDict, + McpApprovalResponseItemTypedDict, OutputDatetimeItemTypedDict, - FunctionCallItemTypedDict, - OutputFunctionCallItemTypedDict, + ApplyPatchCallItemTypedDict, + LocalShellCallItemTypedDict, + FunctionCallOutputItemTypedDict, + OutputSearchModelsServerToolItemTypedDict, + OutputBrowserUseServerToolItemTypedDict, + OutputMcpServerToolItemTypedDict, + OutputTextEditorServerToolItemTypedDict, + OutputApplyPatchServerToolItemTypedDict, + OutputCustomToolCallItemTypedDict, + CustomToolCallItemTypedDict, + OutputMemoryServerToolItemTypedDict, InputsMessageTypedDict, - InputsReasoningTypedDict, + OutputCodeInterpreterCallItemTypedDict, + ShellCallOutputItemTypedDict, + OutputComputerCallItemTypedDict, + ShellCallItemTypedDict, + OutputImageGenerationServerToolItemTypedDict, + OutputFunctionCallItemTypedDict, + McpCallItemTypedDict, + OutputBashServerToolItemTypedDict, + FunctionCallItemTypedDict, + OutputCodeInterpreterServerToolItemTypedDict, ReasoningItemTypedDict, + OutputWebFetchServerToolItemTypedDict, + InputsReasoningTypedDict, ], ) @@ -310,19 +428,48 @@ def serialize_model(self, handler): InputsUnion1 = TypeAliasType( "InputsUnion1", Union[ - OutputWebSearchServerToolItem, - OutputWebSearchCallItem, + ItemReferenceItem, + CompactionItem, + OutputFileSearchCallItem, EasyInputMessage, InputMessageItem, + OutputFileSearchServerToolItem, + OutputWebSearchServerToolItem, + OutputToolSearchServerToolItem, + CustomToolCallOutputItem, + LocalShellCallOutputItem, OutputImageGenerationCallItem, - OutputFileSearchCallItem, - FunctionCallOutputItem, + OutputWebSearchCallItem, + ApplyPatchCallOutputItem, + McpApprovalRequestItem, + McpListToolsItem, + McpApprovalResponseItem, OutputDatetimeItem, - FunctionCallItem, - OutputFunctionCallItem, + ApplyPatchCallItem, + LocalShellCallItem, + FunctionCallOutputItem, + OutputSearchModelsServerToolItem, + OutputBrowserUseServerToolItem, + OutputMcpServerToolItem, + OutputTextEditorServerToolItem, + OutputApplyPatchServerToolItem, + OutputCustomToolCallItem, + CustomToolCallItem, + OutputMemoryServerToolItem, InputsMessage, - InputsReasoning, + OutputCodeInterpreterCallItem, + ShellCallOutputItem, + OutputComputerCallItem, + ShellCallItem, + OutputImageGenerationServerToolItem, + OutputFunctionCallItem, + McpCallItem, + OutputBashServerToolItem, + FunctionCallItem, + OutputCodeInterpreterServerToolItem, ReasoningItem, + OutputWebFetchServerToolItem, + InputsReasoning, ], ) diff --git a/src/openrouter/components/itemreferenceitem.py b/src/openrouter/components/itemreferenceitem.py new file mode 100644 index 0000000..b5a0bc1 --- /dev/null +++ b/src/openrouter/components/itemreferenceitem.py @@ -0,0 +1,24 @@ +"""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 + + +ItemReferenceItemType = Literal["item_reference",] + + +class ItemReferenceItemTypedDict(TypedDict): + r"""A reference to a previous response item by ID""" + + id: str + type: ItemReferenceItemType + + +class ItemReferenceItem(BaseModel): + r"""A reference to a previous response item by ID""" + + id: str + + type: ItemReferenceItemType diff --git a/src/openrouter/components/listbyokkeysresponse.py b/src/openrouter/components/listbyokkeysresponse.py new file mode 100644 index 0000000..3cbde84 --- /dev/null +++ b/src/openrouter/components/listbyokkeysresponse.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .byokkey import BYOKKey, BYOKKeyTypedDict +from openrouter.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ListBYOKKeysResponseTypedDict(TypedDict): + data: List[BYOKKeyTypedDict] + r"""List of BYOK credentials.""" + total_count: int + r"""Total number of BYOK credentials matching the filters.""" + + +class ListBYOKKeysResponse(BaseModel): + data: List[BYOKKey] + r"""List of BYOK credentials.""" + + total_count: int + r"""Total number of BYOK credentials matching the filters.""" diff --git a/src/openrouter/components/listobservabilitydestinationsresponse.py b/src/openrouter/components/listobservabilitydestinationsresponse.py new file mode 100644 index 0000000..181236d --- /dev/null +++ b/src/openrouter/components/listobservabilitydestinationsresponse.py @@ -0,0 +1,25 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilitydestination import ( + ObservabilityDestination, + ObservabilityDestinationTypedDict, +) +from openrouter.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ListObservabilityDestinationsResponseTypedDict(TypedDict): + data: List[ObservabilityDestinationTypedDict] + r"""List of observability destinations.""" + total_count: int + r"""Total number of destinations matching the filters.""" + + +class ListObservabilityDestinationsResponse(BaseModel): + data: List[ObservabilityDestination] + r"""List of observability destinations.""" + + total_count: int + r"""Total number of destinations matching the filters.""" diff --git a/src/openrouter/components/listworkspacesresponse.py b/src/openrouter/components/listworkspacesresponse.py new file mode 100644 index 0000000..b70d4bb --- /dev/null +++ b/src/openrouter/components/listworkspacesresponse.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .workspace import Workspace, WorkspaceTypedDict +from openrouter.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ListWorkspacesResponseTypedDict(TypedDict): + data: List[WorkspaceTypedDict] + r"""List of workspaces""" + total_count: int + r"""Total number of workspaces""" + + +class ListWorkspacesResponse(BaseModel): + data: List[Workspace] + r"""List of workspaces""" + + total_count: int + r"""Total number of workspaces""" diff --git a/src/openrouter/components/localshellcallitem.py b/src/openrouter/components/localshellcallitem.py new file mode 100644 index 0000000..00560d6 --- /dev/null +++ b/src/openrouter/components/localshellcallitem.py @@ -0,0 +1,99 @@ +"""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 Dict, List, Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +TypeExec = Literal["exec",] + + +class LocalShellCallItemActionTypedDict(TypedDict): + command: List[str] + env: Dict[str, str] + type: TypeExec + timeout_ms: NotRequired[Nullable[int]] + user: NotRequired[Nullable[str]] + working_directory: NotRequired[Nullable[str]] + + +class LocalShellCallItemAction(BaseModel): + command: List[str] + + env: Dict[str, str] + + type: TypeExec + + timeout_ms: OptionalNullable[int] = UNSET + + user: OptionalNullable[str] = UNSET + + working_directory: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["timeout_ms", "user", "working_directory"] + nullable_fields = ["timeout_ms", "user", "working_directory"] + 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 + + +TypeLocalShellCall = Literal["local_shell_call",] + + +class LocalShellCallItemTypedDict(TypedDict): + r"""A local shell command execution call""" + + action: LocalShellCallItemActionTypedDict + call_id: str + id: str + status: ToolCallStatus + type: TypeLocalShellCall + + +class LocalShellCallItem(BaseModel): + r"""A local shell command execution call""" + + action: LocalShellCallItemAction + + call_id: str + + id: str + + status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))] + + type: TypeLocalShellCall diff --git a/src/openrouter/components/textconfig.py b/src/openrouter/components/localshellcalloutputitem.py similarity index 60% rename from src/openrouter/components/textconfig.py rename to src/openrouter/components/localshellcalloutputitem.py index cf8fa53..c1fc179 100644 --- a/src/openrouter/components/textconfig.py +++ b/src/openrouter/components/localshellcalloutputitem.py @@ -1,7 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .formats import Formats, FormatsTypedDict from openrouter.types import ( BaseModel, Nullable, @@ -11,45 +10,52 @@ 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 import Literal, Union from typing_extensions import Annotated, NotRequired, TypedDict -TextConfigVerbosity = Union[ +LocalShellCallOutputItemStatus = Union[ Literal[ - "high", - "low", - "medium", + "in_progress", + "completed", + "incomplete", ], UnrecognizedStr, ] -class TextConfigTypedDict(TypedDict): - r"""Text output configuration including format and verbosity""" +LocalShellCallOutputItemType = Literal["local_shell_call_output",] - format_: NotRequired[FormatsTypedDict] - r"""Text response format configuration""" - verbosity: NotRequired[Nullable[TextConfigVerbosity]] +class LocalShellCallOutputItemTypedDict(TypedDict): + r"""Output from a local shell command execution""" -class TextConfig(BaseModel): - r"""Text output configuration including format and verbosity""" + id: str + output: str + type: LocalShellCallOutputItemType + status: NotRequired[Nullable[LocalShellCallOutputItemStatus]] - format_: Annotated[Optional[Formats], pydantic.Field(alias="format")] = None - r"""Text response format configuration""" - verbosity: Annotated[ - OptionalNullable[TextConfigVerbosity], PlainValidator(validate_open_enum(False)) +class LocalShellCallOutputItem(BaseModel): + r"""Output from a local shell command execution""" + + id: str + + output: str + + type: LocalShellCallOutputItemType + + status: Annotated[ + OptionalNullable[LocalShellCallOutputItemStatus], + PlainValidator(validate_open_enum(False)), ] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["format", "verbosity"] - nullable_fields = ["verbosity"] + optional_fields = ["status"] + nullable_fields = ["status"] null_default_fields = [] serialized = handler(self) diff --git a/src/openrouter/components/mcpapprovalrequestitem.py b/src/openrouter/components/mcpapprovalrequestitem.py new file mode 100644 index 0000000..3c56ace --- /dev/null +++ b/src/openrouter/components/mcpapprovalrequestitem.py @@ -0,0 +1,33 @@ +"""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 + + +McpApprovalRequestItemType = Literal["mcp_approval_request",] + + +class McpApprovalRequestItemTypedDict(TypedDict): + r"""Request for approval to execute an MCP tool""" + + arguments: str + id: str + name: str + server_label: str + type: McpApprovalRequestItemType + + +class McpApprovalRequestItem(BaseModel): + r"""Request for approval to execute an MCP tool""" + + arguments: str + + id: str + + name: str + + server_label: str + + type: McpApprovalRequestItemType diff --git a/src/openrouter/components/mcpapprovalresponseitem.py b/src/openrouter/components/mcpapprovalresponseitem.py new file mode 100644 index 0000000..3231df9 --- /dev/null +++ b/src/openrouter/components/mcpapprovalresponseitem.py @@ -0,0 +1,70 @@ +"""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 + + +McpApprovalResponseItemType = Literal["mcp_approval_response",] + + +class McpApprovalResponseItemTypedDict(TypedDict): + r"""User response to an MCP tool approval request""" + + approval_request_id: str + approve: bool + type: McpApprovalResponseItemType + id: NotRequired[Nullable[str]] + reason: NotRequired[Nullable[str]] + + +class McpApprovalResponseItem(BaseModel): + r"""User response to an MCP tool approval request""" + + approval_request_id: str + + approve: bool + + type: McpApprovalResponseItemType + + id: OptionalNullable[str] = UNSET + + reason: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "reason"] + nullable_fields = ["id", "reason"] + 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/mcpcallitem.py b/src/openrouter/components/mcpcallitem.py new file mode 100644 index 0000000..d593dd4 --- /dev/null +++ b/src/openrouter/components/mcpcallitem.py @@ -0,0 +1,76 @@ +"""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 + + +McpCallItemType = Literal["mcp_call",] + + +class McpCallItemTypedDict(TypedDict): + r"""An MCP tool call with its output or error""" + + arguments: str + id: str + name: str + server_label: str + type: McpCallItemType + error: NotRequired[Nullable[str]] + output: NotRequired[Nullable[str]] + + +class McpCallItem(BaseModel): + r"""An MCP tool call with its output or error""" + + arguments: str + + id: str + + name: str + + server_label: str + + type: McpCallItemType + + error: OptionalNullable[str] = UNSET + + output: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["error", "output"] + nullable_fields = ["error", "output"] + 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/mcplisttoolsitem.py b/src/openrouter/components/mcplisttoolsitem.py new file mode 100644 index 0000000..305621b --- /dev/null +++ b/src/openrouter/components/mcplisttoolsitem.py @@ -0,0 +1,117 @@ +"""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 Any, Dict, List, Literal +from typing_extensions import NotRequired, TypedDict + + +class McpListToolsItemToolTypedDict(TypedDict): + input_schema: Dict[str, Nullable[Any]] + name: str + annotations: NotRequired[Nullable[Any]] + description: NotRequired[Nullable[str]] + + +class McpListToolsItemTool(BaseModel): + input_schema: Dict[str, Nullable[Any]] + + name: str + + annotations: OptionalNullable[Any] = UNSET + + description: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["annotations", "description"] + nullable_fields = ["annotations", "description"] + 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 + + +McpListToolsItemType = Literal["mcp_list_tools",] + + +class McpListToolsItemTypedDict(TypedDict): + r"""List of available MCP tools from a server""" + + id: str + server_label: str + tools: List[McpListToolsItemToolTypedDict] + type: McpListToolsItemType + error: NotRequired[Nullable[str]] + + +class McpListToolsItem(BaseModel): + r"""List of available MCP tools from a server""" + + id: str + + server_label: str + + tools: List[McpListToolsItemTool] + + type: McpListToolsItemType + + error: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["error"] + nullable_fields = ["error"] + 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/metadatalevel.py b/src/openrouter/components/metadatalevel.py new file mode 100644 index 0000000..1257b38 --- /dev/null +++ b/src/openrouter/components/metadatalevel.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +MetadataLevel = Union[ + Literal[ + "disabled", + "enabled", + ], + UnrecognizedStr, +] +r"""Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.""" diff --git a/src/openrouter/components/model.py b/src/openrouter/components/model.py index 14dc4b9..53fc430 100644 --- a/src/openrouter/components/model.py +++ b/src/openrouter/components/model.py @@ -47,6 +47,8 @@ class ModelTypedDict(TypedDict): r"""Pricing information for the model""" supported_parameters: List[Parameter] r"""List of supported parameters for this model""" + supported_voices: Nullable[List[str]] + r"""List of supported voice identifiers for TTS models. Null for non-TTS models.""" top_provider: TopProviderInfoTypedDict r"""Information about the top provider for this model""" description: NotRequired[str] @@ -97,6 +99,9 @@ class Model(BaseModel): ] r"""List of supported parameters for this model""" + supported_voices: Nullable[List[str]] + r"""List of supported voice identifiers for TTS models. Null for non-TTS models.""" + top_provider: TopProviderInfo r"""Information about the top provider for this model""" @@ -127,6 +132,7 @@ def serialize_model(self, handler): "hugging_face_id", "knowledge_cutoff", "per_request_limits", + "supported_voices", ] null_default_fields = [] diff --git a/src/openrouter/components/modelscountresponse.py b/src/openrouter/components/modelscountresponse.py index 86bb27c..8d68ee4 100644 --- a/src/openrouter/components/modelscountresponse.py +++ b/src/openrouter/components/modelscountresponse.py @@ -5,14 +5,14 @@ from typing_extensions import TypedDict -class DataTypedDict(TypedDict): +class ModelsCountResponseDataTypedDict(TypedDict): r"""Model count data""" count: int r"""Total number of available models""" -class Data(BaseModel): +class ModelsCountResponseData(BaseModel): r"""Model count data""" count: int @@ -22,12 +22,12 @@ class Data(BaseModel): class ModelsCountResponseTypedDict(TypedDict): r"""Model count data""" - data: DataTypedDict + data: ModelsCountResponseDataTypedDict r"""Model count data""" class ModelsCountResponse(BaseModel): r"""Model count data""" - data: Data + data: ModelsCountResponseData r"""Model count data""" diff --git a/src/openrouter/components/multimodalmedia.py b/src/openrouter/components/multimodalmedia.py new file mode 100644 index 0000000..2cd306c --- /dev/null +++ b/src/openrouter/components/multimodalmedia.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class MultimodalMediaTypedDict(TypedDict): + data: str + format_: NotRequired[str] + + +class MultimodalMedia(BaseModel): + data: str + + format_: Annotated[Optional[str], pydantic.Field(alias="format")] = None diff --git a/src/openrouter/components/observabilityarizedestination.py b/src/openrouter/components/observabilityarizedestination.py new file mode 100644 index 0000000..abc4aeb --- /dev/null +++ b/src/openrouter/components/observabilityarizedestination.py @@ -0,0 +1,130 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityArizeDestinationConfigTypedDict(TypedDict): + api_key: str + model_id: str + space_key: str + base_url: NotRequired[str] + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + + +class ObservabilityArizeDestinationConfig(BaseModel): + api_key: Annotated[str, pydantic.Field(alias="apiKey")] + + model_id: Annotated[str, pydantic.Field(alias="modelId")] + + space_key: Annotated[str, pydantic.Field(alias="spaceKey")] + + base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = ( + "https://otlp.arize.com" + ) + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + +ObservabilityArizeDestinationType = Literal["arize",] + + +class ObservabilityArizeDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityArizeDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityArizeDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityArizeDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityArizeDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityArizeDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilitybraintrustdestination.py b/src/openrouter/components/observabilitybraintrustdestination.py new file mode 100644 index 0000000..133c789 --- /dev/null +++ b/src/openrouter/components/observabilitybraintrustdestination.py @@ -0,0 +1,127 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityBraintrustDestinationConfigTypedDict(TypedDict): + api_key: str + project_id: str + base_url: NotRequired[str] + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + + +class ObservabilityBraintrustDestinationConfig(BaseModel): + api_key: Annotated[str, pydantic.Field(alias="apiKey")] + + project_id: Annotated[str, pydantic.Field(alias="projectId")] + + base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = ( + "https://api.braintrust.dev" + ) + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + +ObservabilityBraintrustDestinationType = Literal["braintrust",] + + +class ObservabilityBraintrustDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityBraintrustDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityBraintrustDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityBraintrustDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityBraintrustDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityBraintrustDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilityclickhousedestination.py b/src/openrouter/components/observabilityclickhousedestination.py new file mode 100644 index 0000000..b3ae76d --- /dev/null +++ b/src/openrouter/components/observabilityclickhousedestination.py @@ -0,0 +1,132 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +class ObservabilityClickhouseDestinationConfigTypedDict(TypedDict): + database: str + host: str + password: str + username: str + r"""If you have not set a specific username in ClickHouse, simply type in 'default' below.""" + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + table: NotRequired[str] + + +class ObservabilityClickhouseDestinationConfig(BaseModel): + database: str + + host: str + + password: str + + username: str + r"""If you have not set a specific username in ClickHouse, simply type in 'default' below.""" + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + table: Optional[str] = "OPENROUTER_TRACES" + + +ObservabilityClickhouseDestinationType = Literal["clickhouse",] + + +class ObservabilityClickhouseDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityClickhouseDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityClickhouseDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityClickhouseDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityClickhouseDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityClickhouseDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilitydatadogdestination.py b/src/openrouter/components/observabilitydatadogdestination.py new file mode 100644 index 0000000..293de2b --- /dev/null +++ b/src/openrouter/components/observabilitydatadogdestination.py @@ -0,0 +1,131 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityDatadogDestinationConfigTypedDict(TypedDict): + api_key: str + r"""Datadog API key must have LLM Observability permissions. Create at:""" + ml_app: str + r"""Name to identify your application in Datadog LLM Observability""" + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + url: NotRequired[str] + r"""Datadog API URL for your region (e.g., https://api.datadoghq.com, https://api.us3.datadoghq.com, https://api.datadoghq.eu)""" + + +class ObservabilityDatadogDestinationConfig(BaseModel): + api_key: Annotated[str, pydantic.Field(alias="apiKey")] + r"""Datadog API key must have LLM Observability permissions. Create at:""" + + ml_app: Annotated[str, pydantic.Field(alias="mlApp")] + r"""Name to identify your application in Datadog LLM Observability""" + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + url: Optional[str] = "https://api.us5.datadoghq.com" + r"""Datadog API URL for your region (e.g., https://api.datadoghq.com, https://api.us3.datadoghq.com, https://api.datadoghq.eu)""" + + +ObservabilityDatadogDestinationType = Literal["datadog",] + + +class ObservabilityDatadogDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityDatadogDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityDatadogDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityDatadogDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityDatadogDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityDatadogDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilitydestination.py b/src/openrouter/components/observabilitydestination.py new file mode 100644 index 0000000..340a94c --- /dev/null +++ b/src/openrouter/components/observabilitydestination.py @@ -0,0 +1,123 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityarizedestination import ( + ObservabilityArizeDestination, + ObservabilityArizeDestinationTypedDict, +) +from .observabilitybraintrustdestination import ( + ObservabilityBraintrustDestination, + ObservabilityBraintrustDestinationTypedDict, +) +from .observabilityclickhousedestination import ( + ObservabilityClickhouseDestination, + ObservabilityClickhouseDestinationTypedDict, +) +from .observabilitydatadogdestination import ( + ObservabilityDatadogDestination, + ObservabilityDatadogDestinationTypedDict, +) +from .observabilitygrafanadestination import ( + ObservabilityGrafanaDestination, + ObservabilityGrafanaDestinationTypedDict, +) +from .observabilitylangfusedestination import ( + ObservabilityLangfuseDestination, + ObservabilityLangfuseDestinationTypedDict, +) +from .observabilitylangsmithdestination import ( + ObservabilityLangsmithDestination, + ObservabilityLangsmithDestinationTypedDict, +) +from .observabilitynewrelicdestination import ( + ObservabilityNewrelicDestination, + ObservabilityNewrelicDestinationTypedDict, +) +from .observabilityopikdestination import ( + ObservabilityOpikDestination, + ObservabilityOpikDestinationTypedDict, +) +from .observabilityotelcollectordestination import ( + ObservabilityOtelCollectorDestination, + ObservabilityOtelCollectorDestinationTypedDict, +) +from .observabilityposthogdestination import ( + ObservabilityPosthogDestination, + ObservabilityPosthogDestinationTypedDict, +) +from .observabilityrampdestination import ( + ObservabilityRampDestination, + ObservabilityRampDestinationTypedDict, +) +from .observabilitys3destination import ( + ObservabilityS3Destination, + ObservabilityS3DestinationTypedDict, +) +from .observabilitysentrydestination import ( + ObservabilitySentryDestination, + ObservabilitySentryDestinationTypedDict, +) +from .observabilitysnowflakedestination import ( + ObservabilitySnowflakeDestination, + ObservabilitySnowflakeDestinationTypedDict, +) +from .observabilityweavedestination import ( + ObservabilityWeaveDestination, + ObservabilityWeaveDestinationTypedDict, +) +from .observabilitywebhookdestination import ( + ObservabilityWebhookDestination, + ObservabilityWebhookDestinationTypedDict, +) +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Union +from typing_extensions import Annotated, TypeAliasType + + +ObservabilityDestinationTypedDict = TypeAliasType( + "ObservabilityDestinationTypedDict", + Union[ + ObservabilityArizeDestinationTypedDict, + ObservabilityBraintrustDestinationTypedDict, + ObservabilityClickhouseDestinationTypedDict, + ObservabilityDatadogDestinationTypedDict, + ObservabilityGrafanaDestinationTypedDict, + ObservabilityLangfuseDestinationTypedDict, + ObservabilityLangsmithDestinationTypedDict, + ObservabilityNewrelicDestinationTypedDict, + ObservabilityOpikDestinationTypedDict, + ObservabilityOtelCollectorDestinationTypedDict, + ObservabilityPosthogDestinationTypedDict, + ObservabilityRampDestinationTypedDict, + ObservabilityS3DestinationTypedDict, + ObservabilitySentryDestinationTypedDict, + ObservabilitySnowflakeDestinationTypedDict, + ObservabilityWeaveDestinationTypedDict, + ObservabilityWebhookDestinationTypedDict, + ], +) + + +ObservabilityDestination = Annotated[ + Union[ + Annotated[ObservabilityArizeDestination, Tag("arize")], + Annotated[ObservabilityBraintrustDestination, Tag("braintrust")], + Annotated[ObservabilityClickhouseDestination, Tag("clickhouse")], + Annotated[ObservabilityDatadogDestination, Tag("datadog")], + Annotated[ObservabilityGrafanaDestination, Tag("grafana")], + Annotated[ObservabilityLangfuseDestination, Tag("langfuse")], + Annotated[ObservabilityLangsmithDestination, Tag("langsmith")], + Annotated[ObservabilityNewrelicDestination, Tag("newrelic")], + Annotated[ObservabilityOpikDestination, Tag("opik")], + Annotated[ObservabilityOtelCollectorDestination, Tag("otel-collector")], + Annotated[ObservabilityPosthogDestination, Tag("posthog")], + Annotated[ObservabilityRampDestination, Tag("ramp")], + Annotated[ObservabilityS3Destination, Tag("s3")], + Annotated[ObservabilitySentryDestination, Tag("sentry")], + Annotated[ObservabilitySnowflakeDestination, Tag("snowflake")], + Annotated[ObservabilityWeaveDestination, Tag("weave")], + Annotated[ObservabilityWebhookDestination, Tag("webhook")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] diff --git a/src/openrouter/components/observabilityfilterrulesconfig.py b/src/openrouter/components/observabilityfilterrulesconfig.py new file mode 100644 index 0000000..25fc9cf --- /dev/null +++ b/src/openrouter/components/observabilityfilterrulesconfig.py @@ -0,0 +1,106 @@ +"""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 List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +Logic = Union[ + Literal[ + "and", + "or", + ], + UnrecognizedStr, +] + + +FieldT = Union[ + Literal[ + "model", + "provider", + "session_id", + "user_id", + "api_key_name", + "finish_reason", + "input", + "output", + "total_cost", + "total_tokens", + "prompt_tokens", + "completion_tokens", + ], + UnrecognizedStr, +] + + +Operator = Union[ + Literal[ + "equals", + "not_equals", + "contains", + "not_contains", + "regex", + "starts_with", + "ends_with", + "gt", + "lt", + "gte", + "lte", + "exists", + "not_exists", + ], + UnrecognizedStr, +] + + +ObservabilityFilterRulesConfigValueTypedDict = TypeAliasType( + "ObservabilityFilterRulesConfigValueTypedDict", Union[str, float] +) + + +ObservabilityFilterRulesConfigValue = TypeAliasType( + "ObservabilityFilterRulesConfigValue", Union[str, float] +) + + +class RuleTypedDict(TypedDict): + field: FieldT + operator: Operator + value: NotRequired[ObservabilityFilterRulesConfigValueTypedDict] + + +class Rule(BaseModel): + field: Annotated[FieldT, PlainValidator(validate_open_enum(False))] + + operator: Annotated[Operator, PlainValidator(validate_open_enum(False))] + + value: Optional[ObservabilityFilterRulesConfigValue] = None + + +class GroupTypedDict(TypedDict): + rules: List[RuleTypedDict] + logic: NotRequired[Logic] + + +class Group(BaseModel): + rules: List[Rule] + + logic: Annotated[Optional[Logic], PlainValidator(validate_open_enum(False))] = "and" + + +class ObservabilityFilterRulesConfigTypedDict(TypedDict): + r"""Optional structured filter rules controlling which events are forwarded.""" + + groups: List[GroupTypedDict] + enabled: NotRequired[bool] + + +class ObservabilityFilterRulesConfig(BaseModel): + r"""Optional structured filter rules controlling which events are forwarded.""" + + groups: List[Group] + + enabled: Optional[bool] = True diff --git a/src/openrouter/components/observabilitygrafanadestination.py b/src/openrouter/components/observabilitygrafanadestination.py new file mode 100644 index 0000000..3311adc --- /dev/null +++ b/src/openrouter/components/observabilitygrafanadestination.py @@ -0,0 +1,127 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityGrafanaDestinationConfigTypedDict(TypedDict): + api_key: str + instance_id: str + base_url: NotRequired[str] + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + + +class ObservabilityGrafanaDestinationConfig(BaseModel): + api_key: Annotated[str, pydantic.Field(alias="apiKey")] + + instance_id: Annotated[str, pydantic.Field(alias="instanceId")] + + base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = ( + "https://otlp-gateway-prod-us-west-0.grafana.net" + ) + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + +ObservabilityGrafanaDestinationType = Literal["grafana",] + + +class ObservabilityGrafanaDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityGrafanaDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityGrafanaDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityGrafanaDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityGrafanaDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityGrafanaDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilitylangfusedestination.py b/src/openrouter/components/observabilitylangfusedestination.py new file mode 100644 index 0000000..862fbd1 --- /dev/null +++ b/src/openrouter/components/observabilitylangfusedestination.py @@ -0,0 +1,127 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityLangfuseDestinationConfigTypedDict(TypedDict): + public_key: str + secret_key: str + base_url: NotRequired[str] + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + + +class ObservabilityLangfuseDestinationConfig(BaseModel): + public_key: Annotated[str, pydantic.Field(alias="publicKey")] + + secret_key: Annotated[str, pydantic.Field(alias="secretKey")] + + base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = ( + "https://us.cloud.langfuse.com" + ) + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + +ObservabilityLangfuseDestinationType = Literal["langfuse",] + + +class ObservabilityLangfuseDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityLangfuseDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityLangfuseDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityLangfuseDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityLangfuseDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityLangfuseDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilitylangsmithdestination.py b/src/openrouter/components/observabilitylangsmithdestination.py new file mode 100644 index 0000000..7b7a9a8 --- /dev/null +++ b/src/openrouter/components/observabilitylangsmithdestination.py @@ -0,0 +1,132 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityLangsmithDestinationConfigTypedDict(TypedDict): + api_key: str + endpoint: NotRequired[str] + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + project: NotRequired[str] + r"""The name for this project, such as pr-openrouter-demo. Defaults to \"main\" if not set.""" + workspace_id: NotRequired[str] + r"""Required for org-scoped API keys. Find this in your LangSmith workspace settings.""" + + +class ObservabilityLangsmithDestinationConfig(BaseModel): + api_key: Annotated[str, pydantic.Field(alias="apiKey")] + + endpoint: Optional[str] = "https://api.smith.langchain.com" + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + project: Optional[str] = "main" + r"""The name for this project, such as pr-openrouter-demo. Defaults to \"main\" if not set.""" + + workspace_id: Annotated[Optional[str], pydantic.Field(alias="workspaceId")] = None + r"""Required for org-scoped API keys. Find this in your LangSmith workspace settings.""" + + +ObservabilityLangsmithDestinationType = Literal["langsmith",] + + +class ObservabilityLangsmithDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityLangsmithDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityLangsmithDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityLangsmithDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityLangsmithDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityLangsmithDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilitynewrelicdestination.py b/src/openrouter/components/observabilitynewrelicdestination.py new file mode 100644 index 0000000..44bc782 --- /dev/null +++ b/src/openrouter/components/observabilitynewrelicdestination.py @@ -0,0 +1,135 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, 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 Dict, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +Region = Union[ + Literal[ + "us", + "eu", + ], + UnrecognizedStr, +] + + +class ObservabilityNewrelicDestinationConfigTypedDict(TypedDict): + license_key: str + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + region: NotRequired[Region] + + +class ObservabilityNewrelicDestinationConfig(BaseModel): + license_key: Annotated[str, pydantic.Field(alias="licenseKey")] + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + region: Annotated[Optional[Region], PlainValidator(validate_open_enum(False))] = ( + "us" + ) + + +ObservabilityNewrelicDestinationType = Literal["newrelic",] + + +class ObservabilityNewrelicDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityNewrelicDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityNewrelicDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityNewrelicDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityNewrelicDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityNewrelicDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilityopikdestination.py b/src/openrouter/components/observabilityopikdestination.py new file mode 100644 index 0000000..69beb9d --- /dev/null +++ b/src/openrouter/components/observabilityopikdestination.py @@ -0,0 +1,125 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityOpikDestinationConfigTypedDict(TypedDict): + api_key: str + project_name: str + workspace: str + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + + +class ObservabilityOpikDestinationConfig(BaseModel): + api_key: Annotated[str, pydantic.Field(alias="apiKey")] + + project_name: Annotated[str, pydantic.Field(alias="projectName")] + + workspace: str + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + +ObservabilityOpikDestinationType = Literal["opik",] + + +class ObservabilityOpikDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityOpikDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityOpikDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityOpikDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityOpikDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityOpikDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilityotelcollectordestination.py b/src/openrouter/components/observabilityotelcollectordestination.py new file mode 100644 index 0000000..74e1997 --- /dev/null +++ b/src/openrouter/components/observabilityotelcollectordestination.py @@ -0,0 +1,118 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +class ObservabilityOtelCollectorDestinationConfigTypedDict(TypedDict): + endpoint: str + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers as a JSON object. For Axiom, use {\"Authorization\": \"Bearer xaat-xxx\", \"X-Axiom-Dataset\": \"your-dataset\"}""" + + +class ObservabilityOtelCollectorDestinationConfig(BaseModel): + endpoint: str + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers as a JSON object. For Axiom, use {\"Authorization\": \"Bearer xaat-xxx\", \"X-Axiom-Dataset\": \"your-dataset\"}""" + + +ObservabilityOtelCollectorDestinationType = Literal["otel-collector",] + + +class ObservabilityOtelCollectorDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityOtelCollectorDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityOtelCollectorDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityOtelCollectorDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityOtelCollectorDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityOtelCollectorDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilityposthogdestination.py b/src/openrouter/components/observabilityposthogdestination.py new file mode 100644 index 0000000..96cdf30 --- /dev/null +++ b/src/openrouter/components/observabilityposthogdestination.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityPosthogDestinationConfigTypedDict(TypedDict): + api_key: str + endpoint: NotRequired[str] + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + + +class ObservabilityPosthogDestinationConfig(BaseModel): + api_key: Annotated[str, pydantic.Field(alias="apiKey")] + + endpoint: Optional[str] = "https://us.i.posthog.com" + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + +ObservabilityPosthogDestinationType = Literal["posthog",] + + +class ObservabilityPosthogDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityPosthogDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityPosthogDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityPosthogDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityPosthogDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityPosthogDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilityrampdestination.py b/src/openrouter/components/observabilityrampdestination.py new file mode 100644 index 0000000..e6f42b3 --- /dev/null +++ b/src/openrouter/components/observabilityrampdestination.py @@ -0,0 +1,126 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityRampDestinationConfigTypedDict(TypedDict): + api_key: str + r"""Generate this in your Ramp integration settings.""" + base_url: NotRequired[str] + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to Ramp.""" + + +class ObservabilityRampDestinationConfig(BaseModel): + api_key: Annotated[str, pydantic.Field(alias="apiKey")] + r"""Generate this in your Ramp integration settings.""" + + base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = ( + "https://api.ramp.com/developer/v1/ai-usage/openrouter" + ) + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to Ramp.""" + + +ObservabilityRampDestinationType = Literal["ramp",] + + +class ObservabilityRampDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityRampDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityRampDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityRampDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityRampDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityRampDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilitys3destination.py b/src/openrouter/components/observabilitys3destination.py new file mode 100644 index 0000000..e21037f --- /dev/null +++ b/src/openrouter/components/observabilitys3destination.py @@ -0,0 +1,146 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityS3DestinationConfigTypedDict(TypedDict): + access_key_id: str + bucket_name: str + secret_access_key: str + endpoint: NotRequired[str] + r"""Only for S3-compatible services like Cloudflare R2 (https://account-id.r2.cloudflarestorage.com) or MinIO. Leave blank for standard AWS S3.""" + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + path_template: NotRequired[str] + r"""Template for S3 object path. The filename ({traceId}-{timestamp}.json) is automatically appended. Available variables: {prefix}, {date}, {year}, {month}, {day}, {apiKeyName}""" + prefix: NotRequired[str] + region: NotRequired[str] + session_token: NotRequired[str] + + +class ObservabilityS3DestinationConfig(BaseModel): + access_key_id: Annotated[str, pydantic.Field(alias="accessKeyId")] + + bucket_name: Annotated[str, pydantic.Field(alias="bucketName")] + + secret_access_key: Annotated[str, pydantic.Field(alias="secretAccessKey")] + + endpoint: Optional[str] = None + r"""Only for S3-compatible services like Cloudflare R2 (https://account-id.r2.cloudflarestorage.com) or MinIO. Leave blank for standard AWS S3.""" + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + path_template: Annotated[Optional[str], pydantic.Field(alias="pathTemplate")] = ( + "{prefix}/{date}" + ) + r"""Template for S3 object path. The filename ({traceId}-{timestamp}.json) is automatically appended. Available variables: {prefix}, {date}, {year}, {month}, {day}, {apiKeyName}""" + + prefix: Optional[str] = "openrouter-traces" + + region: Optional[str] = None + + session_token: Annotated[Optional[str], pydantic.Field(alias="sessionToken")] = None + + +ObservabilityS3DestinationType = Literal["s3",] + + +class ObservabilityS3DestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityS3DestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityS3DestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityS3Destination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityS3DestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityS3DestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilitysentrydestination.py b/src/openrouter/components/observabilitysentrydestination.py new file mode 100644 index 0000000..a0db130 --- /dev/null +++ b/src/openrouter/components/observabilitysentrydestination.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilitySentryDestinationConfigTypedDict(TypedDict): + dsn: str + otlp_endpoint: str + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + + +class ObservabilitySentryDestinationConfig(BaseModel): + dsn: str + + otlp_endpoint: Annotated[str, pydantic.Field(alias="otlpEndpoint")] + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + +ObservabilitySentryDestinationType = Literal["sentry",] + + +class ObservabilitySentryDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilitySentryDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilitySentryDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilitySentryDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilitySentryDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilitySentryDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilitysnowflakedestination.py b/src/openrouter/components/observabilitysnowflakedestination.py new file mode 100644 index 0000000..0e36624 --- /dev/null +++ b/src/openrouter/components/observabilitysnowflakedestination.py @@ -0,0 +1,134 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilitySnowflakeDestinationConfigTypedDict(TypedDict): + account: str + token: str + database: NotRequired[str] + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + schema_: NotRequired[str] + table: NotRequired[str] + warehouse: NotRequired[str] + + +class ObservabilitySnowflakeDestinationConfig(BaseModel): + account: str + + token: str + + database: Optional[str] = "SNOWFLAKE_LEARNING_DB" + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + schema_: Annotated[Optional[str], pydantic.Field(alias="schema")] = "PUBLIC" + + table: Optional[str] = "OPENROUTER_TRACES" + + warehouse: Optional[str] = "COMPUTE_WH" + + +ObservabilitySnowflakeDestinationType = Literal["snowflake",] + + +class ObservabilitySnowflakeDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilitySnowflakeDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilitySnowflakeDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilitySnowflakeDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilitySnowflakeDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilitySnowflakeDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilityweavedestination.py b/src/openrouter/components/observabilityweavedestination.py new file mode 100644 index 0000000..b1f48cd --- /dev/null +++ b/src/openrouter/components/observabilityweavedestination.py @@ -0,0 +1,130 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ObservabilityWeaveDestinationConfigTypedDict(TypedDict): + api_key: str + entity: str + project: str + base_url: NotRequired[str] + headers: NotRequired[Dict[str, str]] + r"""Custom HTTP headers to include in requests to this destination.""" + + +class ObservabilityWeaveDestinationConfig(BaseModel): + api_key: Annotated[str, pydantic.Field(alias="apiKey")] + + entity: str + + project: str + + base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = ( + "https://trace.wandb.ai" + ) + + headers: Optional[Dict[str, str]] = None + r"""Custom HTTP headers to include in requests to this destination.""" + + +ObservabilityWeaveDestinationType = Literal["weave",] + + +class ObservabilityWeaveDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityWeaveDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityWeaveDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityWeaveDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityWeaveDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityWeaveDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/observabilitywebhookdestination.py b/src/openrouter/components/observabilitywebhookdestination.py new file mode 100644 index 0000000..c31fe80 --- /dev/null +++ b/src/openrouter/components/observabilitywebhookdestination.py @@ -0,0 +1,132 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .observabilityfilterrulesconfig import ( + ObservabilityFilterRulesConfig, + ObservabilityFilterRulesConfigTypedDict, +) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Dict, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +Method = Union[ + Literal[ + "POST", + "PUT", + ], + UnrecognizedStr, +] + + +class ObservabilityWebhookDestinationConfigTypedDict(TypedDict): + url: str + headers: NotRequired[Dict[str, str]] + method: NotRequired[Method] + + +class ObservabilityWebhookDestinationConfig(BaseModel): + url: str + + headers: Optional[Dict[str, str]] = None + + method: Annotated[Optional[Method], PlainValidator(validate_open_enum(False))] = ( + "POST" + ) + + +ObservabilityWebhookDestinationType = Literal["webhook",] + + +class ObservabilityWebhookDestinationTypedDict(TypedDict): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + config: ObservabilityWebhookDestinationConfigTypedDict + created_at: str + r"""ISO timestamp of when the destination was created.""" + enabled: bool + r"""Whether this destination is currently enabled.""" + filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict] + r"""Optional structured filter rules controlling which events are forwarded.""" + id: str + r"""Stable public identifier for this destination.""" + name: Nullable[str] + r"""Human-readable name for the destination.""" + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + type: ObservabilityWebhookDestinationType + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + +class ObservabilityWebhookDestination(BaseModel): + api_key_hashes: Nullable[List[str]] + r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.""" + + config: ObservabilityWebhookDestinationConfig + + created_at: str + r"""ISO timestamp of when the destination was created.""" + + enabled: bool + r"""Whether this destination is currently enabled.""" + + filter_rules: Nullable[ObservabilityFilterRulesConfig] + r"""Optional structured filter rules controlling which events are forwarded.""" + + id: str + r"""Stable public identifier for this destination.""" + + name: Nullable[str] + r"""Human-readable name for the destination.""" + + privacy_mode: bool + r"""When true, request/response bodies are not forwarded to this destination — only metadata.""" + + sampling_rate: float + r"""Sampling rate for events sent to this destination, between 0 and 1 (1 = 100%).""" + + type: ObservabilityWebhookDestinationType + + updated_at: str + r"""ISO timestamp of when the destination was last updated.""" + + workspace_id: str + r"""ID of the workspace this destination belongs to.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["api_key_hashes", "filter_rules", "name"] + 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/openairesponsecustomtoolcall.py b/src/openrouter/components/openairesponsecustomtoolcall.py new file mode 100644 index 0000000..a7c4d28 --- /dev/null +++ b/src/openrouter/components/openairesponsecustomtoolcall.py @@ -0,0 +1,34 @@ +"""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 + + +OpenAIResponseCustomToolCallType = Literal["custom_tool_call",] + + +class OpenAIResponseCustomToolCallTypedDict(TypedDict): + call_id: str + input: str + name: str + type: OpenAIResponseCustomToolCallType + id: NotRequired[str] + namespace: NotRequired[str] + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" + + +class OpenAIResponseCustomToolCall(BaseModel): + call_id: str + + input: str + + name: str + + type: OpenAIResponseCustomToolCallType + + id: Optional[str] = None + + namespace: Optional[str] = None + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" diff --git a/src/openrouter/components/openairesponsecustomtoolcalloutput.py b/src/openrouter/components/openairesponsecustomtoolcalloutput.py new file mode 100644 index 0000000..1fdfc55 --- /dev/null +++ b/src/openrouter/components/openairesponsecustomtoolcalloutput.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .inputfile import InputFile, InputFileTypedDict +from .inputimage import InputImage, InputImageTypedDict +from .inputtext import InputText, InputTextTypedDict +from openrouter.types import BaseModel +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +OpenAIResponseCustomToolCallOutputOutput1TypedDict = TypeAliasType( + "OpenAIResponseCustomToolCallOutputOutput1TypedDict", + Union[InputTextTypedDict, InputImageTypedDict, InputFileTypedDict], +) + + +OpenAIResponseCustomToolCallOutputOutput1 = Annotated[ + Union[ + Annotated[InputFile, Tag("input_file")], + Annotated[InputImage, Tag("input_image")], + Annotated[InputText, Tag("input_text")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +OpenAIResponseCustomToolCallOutputOutput2TypedDict = TypeAliasType( + "OpenAIResponseCustomToolCallOutputOutput2TypedDict", + Union[str, List[OpenAIResponseCustomToolCallOutputOutput1TypedDict]], +) + + +OpenAIResponseCustomToolCallOutputOutput2 = TypeAliasType( + "OpenAIResponseCustomToolCallOutputOutput2", + Union[str, List[OpenAIResponseCustomToolCallOutputOutput1]], +) + + +OpenAIResponseCustomToolCallOutputType = Literal["custom_tool_call_output",] + + +class OpenAIResponseCustomToolCallOutputTypedDict(TypedDict): + call_id: str + output: OpenAIResponseCustomToolCallOutputOutput2TypedDict + type: OpenAIResponseCustomToolCallOutputType + id: NotRequired[str] + + +class OpenAIResponseCustomToolCallOutput(BaseModel): + call_id: str + + output: OpenAIResponseCustomToolCallOutputOutput2 + + type: OpenAIResponseCustomToolCallOutputType + + id: Optional[str] = None diff --git a/src/openrouter/components/openairesponsefunctiontoolcall.py b/src/openrouter/components/openairesponsefunctiontoolcall.py index f3a4cf7..2c0fa25 100644 --- a/src/openrouter/components/openairesponsefunctiontoolcall.py +++ b/src/openrouter/components/openairesponsefunctiontoolcall.py @@ -18,6 +18,8 @@ class OpenAIResponseFunctionToolCallTypedDict(TypedDict): name: str type: OpenAIResponseFunctionToolCallType id: NotRequired[str] + namespace: NotRequired[str] + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" status: NotRequired[ToolCallStatus] @@ -32,6 +34,9 @@ class OpenAIResponseFunctionToolCall(BaseModel): id: Optional[str] = None + namespace: Optional[str] = None + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" + status: Annotated[ Optional[ToolCallStatus], PlainValidator(validate_open_enum(False)) ] = None diff --git a/src/openrouter/components/openairesponsestoolchoice_union.py b/src/openrouter/components/openairesponsestoolchoice_union.py index cca8c5f..edcd5ae 100644 --- a/src/openrouter/components/openairesponsestoolchoice_union.py +++ b/src/openrouter/components/openairesponsestoolchoice_union.py @@ -7,6 +7,28 @@ from typing_extensions import TypeAliasType, TypedDict +OpenAIResponsesToolChoiceTypeShell = Literal["shell",] + + +class OpenAIResponsesToolChoiceShellTypedDict(TypedDict): + type: OpenAIResponsesToolChoiceTypeShell + + +class OpenAIResponsesToolChoiceShell(BaseModel): + type: OpenAIResponsesToolChoiceTypeShell + + +OpenAIResponsesToolChoiceTypeApplyPatch = Literal["apply_patch",] + + +class OpenAIResponsesToolChoiceApplyPatchTypedDict(TypedDict): + type: OpenAIResponsesToolChoiceTypeApplyPatch + + +class OpenAIResponsesToolChoiceApplyPatch(BaseModel): + type: OpenAIResponsesToolChoiceTypeApplyPatch + + OpenAIResponsesToolChoiceTypeWebSearchPreview = Literal["web_search_preview",] @@ -68,6 +90,8 @@ class OpenAIResponsesToolChoiceFunction(BaseModel): "OpenAIResponsesToolChoiceUnionTypedDict", Union[ OpenAIResponsesToolChoiceTypedDict, + OpenAIResponsesToolChoiceApplyPatchTypedDict, + OpenAIResponsesToolChoiceShellTypedDict, OpenAIResponsesToolChoiceFunctionTypedDict, ToolChoiceAllowedTypedDict, OpenAIResponsesToolChoiceAuto, @@ -81,6 +105,8 @@ class OpenAIResponsesToolChoiceFunction(BaseModel): "OpenAIResponsesToolChoiceUnion", Union[ OpenAIResponsesToolChoice, + OpenAIResponsesToolChoiceApplyPatch, + OpenAIResponsesToolChoiceShell, OpenAIResponsesToolChoiceFunction, ToolChoiceAllowed, OpenAIResponsesToolChoiceAuto, diff --git a/src/openrouter/components/openresponsesresult.py b/src/openrouter/components/openresponsesresult.py index fa04955..60eaf9f 100644 --- a/src/openrouter/components/openresponsesresult.py +++ b/src/openrouter/components/openresponsesresult.py @@ -27,6 +27,7 @@ OpenAIResponsesToolChoiceUnion, OpenAIResponsesToolChoiceUnionTypedDict, ) +from .openroutermetadata import OpenRouterMetadata, OpenRouterMetadataTypedDict from .outputitems import OutputItems, OutputItemsTypedDict from .preview_20250311_websearchservertool import ( Preview20250311WebSearchServerTool, @@ -39,7 +40,7 @@ from .responseserrorfield import ResponsesErrorField, ResponsesErrorFieldTypedDict from .shellservertool import ShellServerTool, ShellServerToolTypedDict from .storedprompttemplate import StoredPromptTemplate, StoredPromptTemplateTypedDict -from .textconfig import TextConfig, TextConfigTypedDict +from .textextendedconfig import TextExtendedConfig, TextExtendedConfigTypedDict from .truncation import Truncation from .usage import Usage, UsageTypedDict from .websearchservertool import WebSearchServerTool, WebSearchServerToolTypedDict @@ -195,13 +196,14 @@ class OpenResponsesResultTypedDict(TypedDict): safety_identifier: NotRequired[Nullable[str]] service_tier: NotRequired[Nullable[str]] store: NotRequired[bool] - text: NotRequired[TextConfigTypedDict] + text: NotRequired[TextExtendedConfigTypedDict] r"""Text output configuration including format and verbosity""" top_logprobs: NotRequired[int] truncation: NotRequired[Nullable[Truncation]] usage: NotRequired[Nullable[UsageTypedDict]] r"""Token usage information for the response""" user: NotRequired[Nullable[str]] + openrouter_metadata: NotRequired[OpenRouterMetadataTypedDict] class OpenResponsesResult(BaseModel): @@ -269,7 +271,7 @@ class OpenResponsesResult(BaseModel): store: Optional[bool] = None - text: Optional[TextConfig] = None + text: Optional[TextExtendedConfig] = None r"""Text output configuration including format and verbosity""" top_logprobs: Optional[int] = None @@ -283,6 +285,8 @@ class OpenResponsesResult(BaseModel): user: OptionalNullable[str] = UNSET + openrouter_metadata: Optional[OpenRouterMetadata] = None + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -302,6 +306,7 @@ def serialize_model(self, handler): "truncation", "usage", "user", + "openrouter_metadata", ] nullable_fields = [ "background", diff --git a/src/openrouter/components/openroutermetadata.py b/src/openrouter/components/openroutermetadata.py new file mode 100644 index 0000000..bc1d7f3 --- /dev/null +++ b/src/openrouter/components/openroutermetadata.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .endpointsmetadata import EndpointsMetadata, EndpointsMetadataTypedDict +from .pipelinestage import PipelineStage, PipelineStageTypedDict +from .routerattempt import RouterAttempt, RouterAttemptTypedDict +from .routerparams import RouterParams, RouterParamsTypedDict +from .routingstrategy import RoutingStrategy +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OpenRouterMetadataTypedDict(TypedDict): + attempt: int + endpoints: EndpointsMetadataTypedDict + is_byok: bool + region: Nullable[str] + requested: str + strategy: RoutingStrategy + summary: str + attempts: NotRequired[List[RouterAttemptTypedDict]] + params: NotRequired[RouterParamsTypedDict] + pipeline: NotRequired[List[PipelineStageTypedDict]] + + +class OpenRouterMetadata(BaseModel): + attempt: int + + endpoints: EndpointsMetadata + + is_byok: bool + + region: Nullable[str] + + requested: str + + strategy: Annotated[RoutingStrategy, PlainValidator(validate_open_enum(False))] + + summary: str + + attempts: Optional[List[RouterAttempt]] = None + + params: Optional[RouterParams] = None + + pipeline: Optional[List[PipelineStage]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["attempts", "params", "pipeline"] + nullable_fields = ["region"] + 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/outputapplypatchcallitem.py b/src/openrouter/components/outputapplypatchcallitem.py new file mode 100644 index 0000000..14c0201 --- /dev/null +++ b/src/openrouter/components/outputapplypatchcallitem.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .applypatchcalloperation import ( + ApplyPatchCallOperation, + ApplyPatchCallOperationTypedDict, +) +from .applypatchcallstatus import ApplyPatchCallStatus +from openrouter.types import BaseModel +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +OutputApplyPatchCallItemType = Literal["apply_patch_call",] + + +class OutputApplyPatchCallItemTypedDict(TypedDict): + r"""A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand.""" + + call_id: str + id: str + operation: ApplyPatchCallOperationTypedDict + r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.""" + status: ApplyPatchCallStatus + r"""Lifecycle state of an `apply_patch_call` output item.""" + type: OutputApplyPatchCallItemType + + +class OutputApplyPatchCallItem(BaseModel): + r"""A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand.""" + + call_id: str + + id: str + + operation: ApplyPatchCallOperation + r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.""" + + status: Annotated[ApplyPatchCallStatus, PlainValidator(validate_open_enum(False))] + r"""Lifecycle state of an `apply_patch_call` output item.""" + + type: OutputApplyPatchCallItemType diff --git a/src/openrouter/components/outputapplypatchservertoolitem.py b/src/openrouter/components/outputapplypatchservertoolitem.py index 5b2be1e..96d4dac 100644 --- a/src/openrouter/components/outputapplypatchservertoolitem.py +++ b/src/openrouter/components/outputapplypatchservertoolitem.py @@ -1,10 +1,13 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .applypatchcalloperation import ( + ApplyPatchCallOperation, + ApplyPatchCallOperationTypedDict, +) from .toolcallstatus import ToolCallStatus from openrouter.types import BaseModel from openrouter.utils import validate_open_enum -import pydantic from pydantic.functional_validators import PlainValidator from typing import Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -14,24 +17,26 @@ class OutputApplyPatchServerToolItemTypedDict(TypedDict): - r"""An openrouter:apply_patch server tool output item""" + r"""An openrouter:apply_patch server tool output item. The turn halts when validation succeeds so the client can apply the patch and echo an `apply_patch_call_output` on the next turn.""" status: ToolCallStatus type: OutputApplyPatchServerToolItemType - file_path: NotRequired[str] + call_id: NotRequired[str] id: NotRequired[str] - patch: NotRequired[str] + operation: NotRequired[ApplyPatchCallOperationTypedDict] + r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.""" class OutputApplyPatchServerToolItem(BaseModel): - r"""An openrouter:apply_patch server tool output item""" + r"""An openrouter:apply_patch server tool output item. The turn halts when validation succeeds so the client can apply the patch and echo an `apply_patch_call_output` on the next turn.""" status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))] type: OutputApplyPatchServerToolItemType - file_path: Annotated[Optional[str], pydantic.Field(alias="filePath")] = None + call_id: Optional[str] = None id: Optional[str] = None - patch: Optional[str] = None + operation: Optional[ApplyPatchCallOperation] = None + r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.""" diff --git a/src/openrouter/components/outputcustomtoolcallitem.py b/src/openrouter/components/outputcustomtoolcallitem.py new file mode 100644 index 0000000..5c3049d --- /dev/null +++ b/src/openrouter/components/outputcustomtoolcallitem.py @@ -0,0 +1,38 @@ +"""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 + + +OutputCustomToolCallItemType = Literal["custom_tool_call",] + + +class OutputCustomToolCallItemTypedDict(TypedDict): + r"""A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments.""" + + call_id: str + input: str + name: str + type: OutputCustomToolCallItemType + id: NotRequired[str] + namespace: NotRequired[str] + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" + + +class OutputCustomToolCallItem(BaseModel): + r"""A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments.""" + + call_id: str + + input: str + + name: str + + type: OutputCustomToolCallItemType + + id: Optional[str] = None + + namespace: Optional[str] = None + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" diff --git a/src/openrouter/components/outputfunctioncallitem.py b/src/openrouter/components/outputfunctioncallitem.py index 9df0afe..dcfc7a8 100644 --- a/src/openrouter/components/outputfunctioncallitem.py +++ b/src/openrouter/components/outputfunctioncallitem.py @@ -44,6 +44,8 @@ class OutputFunctionCallItemTypedDict(TypedDict): name: str type: OutputFunctionCallItemType id: NotRequired[str] + namespace: NotRequired[str] + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" status: NotRequired[OutputFunctionCallItemStatusUnionTypedDict] @@ -58,4 +60,7 @@ class OutputFunctionCallItem(BaseModel): id: Optional[str] = None + namespace: Optional[str] = None + r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)""" + status: Optional[OutputFunctionCallItemStatusUnion] = None diff --git a/src/openrouter/components/outputfusionservertoolitem.py b/src/openrouter/components/outputfusionservertoolitem.py new file mode 100644 index 0000000..a8b22b6 --- /dev/null +++ b/src/openrouter/components/outputfusionservertoolitem.py @@ -0,0 +1,141 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolcallstatus import ToolCallStatus +from openrouter.types import BaseModel +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class StanceTypedDict(TypedDict): + model: str + stance: str + + +class Stance(BaseModel): + model: str + + stance: str + + +class ContradictionTypedDict(TypedDict): + stances: List[StanceTypedDict] + topic: str + + +class Contradiction(BaseModel): + stances: List[Stance] + + topic: str + + +class PartialCoverageTypedDict(TypedDict): + models: List[str] + point: str + + +class PartialCoverage(BaseModel): + models: List[str] + + point: str + + +class UniqueInsightTypedDict(TypedDict): + insight: str + model: str + + +class UniqueInsight(BaseModel): + insight: str + + model: str + + +class AnalysisTypedDict(TypedDict): + r"""Structured analysis produced by the fusion judge model.""" + + blind_spots: List[str] + consensus: List[str] + contradictions: List[ContradictionTypedDict] + partial_coverage: List[PartialCoverageTypedDict] + unique_insights: List[UniqueInsightTypedDict] + + +class Analysis(BaseModel): + r"""Structured analysis produced by the fusion judge model.""" + + blind_spots: List[str] + + consensus: List[str] + + contradictions: List[Contradiction] + + partial_coverage: List[PartialCoverage] + + unique_insights: List[UniqueInsight] + + +class FailedModelTypedDict(TypedDict): + error: str + r"""Error message describing why the model failed.""" + model: str + r"""Slug of the analysis model that failed.""" + + +class FailedModel(BaseModel): + error: str + r"""Error message describing why the model failed.""" + + model: str + r"""Slug of the analysis model that failed.""" + + +class ResponseTypedDict(TypedDict): + model: str + + +class Response(BaseModel): + model: str + + +OutputFusionServerToolItemType = Literal["openrouter:fusion",] + + +class OutputFusionServerToolItemTypedDict(TypedDict): + r"""An openrouter:fusion server tool output item""" + + status: ToolCallStatus + type: OutputFusionServerToolItemType + analysis: NotRequired[AnalysisTypedDict] + r"""Structured analysis produced by the fusion judge model.""" + error: NotRequired[str] + r"""Error message when the fusion run did not produce an analysis result.""" + failed_models: NotRequired[List[FailedModelTypedDict]] + r"""Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. The fusion result is still usable but was produced from a degraded panel.""" + id: NotRequired[str] + responses: NotRequired[List[ResponseTypedDict]] + r"""Slugs of the analysis models that produced a response in this fusion run.""" + + +class OutputFusionServerToolItem(BaseModel): + r"""An openrouter:fusion server tool output item""" + + status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))] + + type: OutputFusionServerToolItemType + + analysis: Optional[Analysis] = None + r"""Structured analysis produced by the fusion judge model.""" + + error: Optional[str] = None + r"""Error message when the fusion run did not produce an analysis result.""" + + failed_models: Optional[List[FailedModel]] = None + r"""Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. The fusion result is still usable but was produced from a degraded panel.""" + + id: Optional[str] = None + + responses: Optional[List[Response]] = None + r"""Slugs of the analysis models that produced a response in this fusion run.""" diff --git a/src/openrouter/components/outputimagegenerationservertoolitem.py b/src/openrouter/components/outputimagegenerationservertoolitem.py index e91756b..a94bd09 100644 --- a/src/openrouter/components/outputimagegenerationservertoolitem.py +++ b/src/openrouter/components/outputimagegenerationservertoolitem.py @@ -2,9 +2,16 @@ from __future__ import annotations from .toolcallstatus import ToolCallStatus -from openrouter.types import BaseModel +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) 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 from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +28,8 @@ class OutputImageGenerationServerToolItemTypedDict(TypedDict): id: NotRequired[str] image_b64: NotRequired[str] image_url: NotRequired[str] + result: NotRequired[Nullable[str]] + r"""The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format""" revised_prompt: NotRequired[str] @@ -37,6 +46,39 @@ class OutputImageGenerationServerToolItem(BaseModel): image_url: Annotated[Optional[str], pydantic.Field(alias="imageUrl")] = None + result: OptionalNullable[str] = UNSET + r"""The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format""" + revised_prompt: Annotated[Optional[str], pydantic.Field(alias="revisedPrompt")] = ( None ) + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "imageB64", "imageUrl", "result", "revisedPrompt"] + nullable_fields = ["result"] + 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/outputitems.py b/src/openrouter/components/outputitems.py index 4457f80..9b0b74d 100644 --- a/src/openrouter/components/outputitems.py +++ b/src/openrouter/components/outputitems.py @@ -1,6 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .outputapplypatchcallitem import ( + OutputApplyPatchCallItem, + OutputApplyPatchCallItemTypedDict, +) from .outputapplypatchservertoolitem import ( OutputApplyPatchServerToolItem, OutputApplyPatchServerToolItemTypedDict, @@ -25,6 +29,10 @@ OutputComputerCallItem, OutputComputerCallItemTypedDict, ) +from .outputcustomtoolcallitem import ( + OutputCustomToolCallItem, + OutputCustomToolCallItemTypedDict, +) from .outputdatetimeitem import OutputDatetimeItem, OutputDatetimeItemTypedDict from .outputfilesearchcallitem import ( OutputFileSearchCallItem, @@ -38,6 +46,10 @@ OutputFunctionCallItem, OutputFunctionCallItemTypedDict, ) +from .outputfusionservertoolitem import ( + OutputFusionServerToolItem, + OutputFusionServerToolItemTypedDict, +) from .outputimagegenerationcallitem import ( OutputImageGenerationCallItem, OutputImageGenerationCallItemTypedDict, @@ -56,6 +68,10 @@ ) from .outputmessageitem import OutputMessageItem, OutputMessageItemTypedDict from .outputreasoningitem import OutputReasoningItem, OutputReasoningItemTypedDict +from .outputsearchmodelsservertoolitem import ( + OutputSearchModelsServerToolItem, + OutputSearchModelsServerToolItemTypedDict, +) from .outputtexteditorservertoolitem import ( OutputTextEditorServerToolItem, OutputTextEditorServerToolItemTypedDict, @@ -85,25 +101,29 @@ OutputItemsTypedDict = TypeAliasType( "OutputItemsTypedDict", Union[ - OutputWebSearchServerToolItemTypedDict, OutputToolSearchServerToolItemTypedDict, OutputFileSearchServerToolItemTypedDict, + OutputWebSearchServerToolItemTypedDict, OutputWebSearchCallItemTypedDict, OutputFileSearchCallItemTypedDict, OutputImageGenerationCallItemTypedDict, - OutputTextEditorServerToolItemTypedDict, - OutputApplyPatchServerToolItemTypedDict, OutputDatetimeItemTypedDict, + OutputSearchModelsServerToolItemTypedDict, OutputMcpServerToolItemTypedDict, OutputBrowserUseServerToolItemTypedDict, - OutputFunctionCallItemTypedDict, - OutputImageGenerationServerToolItemTypedDict, - OutputMessageItemTypedDict, + OutputTextEditorServerToolItemTypedDict, + OutputApplyPatchServerToolItemTypedDict, + OutputApplyPatchCallItemTypedDict, OutputComputerCallItemTypedDict, - OutputWebFetchServerToolItemTypedDict, - OutputMemoryServerToolItemTypedDict, OutputCodeInterpreterCallItemTypedDict, + OutputCustomToolCallItemTypedDict, + OutputMessageItemTypedDict, + OutputMemoryServerToolItemTypedDict, + OutputImageGenerationServerToolItemTypedDict, OutputBashServerToolItemTypedDict, + OutputFunctionCallItemTypedDict, + OutputFusionServerToolItemTypedDict, + OutputWebFetchServerToolItemTypedDict, OutputCodeInterpreterServerToolItemTypedDict, OutputReasoningItemTypedDict, ], @@ -113,8 +133,10 @@ OutputItems = Annotated[ Union[ + Annotated[OutputApplyPatchCallItem, Tag("apply_patch_call")], Annotated[OutputCodeInterpreterCallItem, Tag("code_interpreter_call")], Annotated[OutputComputerCallItem, Tag("computer_call")], + Annotated[OutputCustomToolCallItem, Tag("custom_tool_call")], Annotated[OutputFileSearchCallItem, Tag("file_search_call")], Annotated[OutputFunctionCallItem, Tag("function_call")], Annotated[OutputImageGenerationCallItem, Tag("image_generation_call")], @@ -126,7 +148,12 @@ OutputCodeInterpreterServerToolItem, Tag("openrouter:code_interpreter") ], Annotated[OutputDatetimeItem, Tag("openrouter:datetime")], + Annotated[ + OutputSearchModelsServerToolItem, + Tag("openrouter:experimental__search_models"), + ], Annotated[OutputFileSearchServerToolItem, Tag("openrouter:file_search")], + Annotated[OutputFusionServerToolItem, Tag("openrouter:fusion")], Annotated[ OutputImageGenerationServerToolItem, Tag("openrouter:image_generation") ], diff --git a/src/openrouter/components/outputmodality.py b/src/openrouter/components/outputmodality.py index c926bb6..08bfb22 100644 --- a/src/openrouter/components/outputmodality.py +++ b/src/openrouter/components/outputmodality.py @@ -13,6 +13,8 @@ "audio", "video", "rerank", + "speech", + "transcription", ], UnrecognizedStr, ] diff --git a/src/openrouter/components/outputsearchmodelsservertoolitem.py b/src/openrouter/components/outputsearchmodelsservertoolitem.py new file mode 100644 index 0000000..f94949d --- /dev/null +++ b/src/openrouter/components/outputsearchmodelsservertoolitem.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolcallstatus import ToolCallStatus +from openrouter.types import BaseModel +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +OutputSearchModelsServerToolItemType = Literal[ + "openrouter:experimental__search_models", +] + + +class OutputSearchModelsServerToolItemTypedDict(TypedDict): + r"""An openrouter:experimental__search_models server tool output item""" + + status: ToolCallStatus + type: OutputSearchModelsServerToolItemType + arguments: NotRequired[str] + r"""The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})""" + id: NotRequired[str] + query: NotRequired[str] + + +class OutputSearchModelsServerToolItem(BaseModel): + r"""An openrouter:experimental__search_models server tool output item""" + + status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))] + + type: OutputSearchModelsServerToolItemType + + arguments: Optional[str] = None + r"""The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})""" + + id: Optional[str] = None + + query: Optional[str] = None diff --git a/src/openrouter/components/outputwebfetchservertoolitem.py b/src/openrouter/components/outputwebfetchservertoolitem.py index f443472..71c97ae 100644 --- a/src/openrouter/components/outputwebfetchservertoolitem.py +++ b/src/openrouter/components/outputwebfetchservertoolitem.py @@ -4,6 +4,7 @@ from .toolcallstatus import ToolCallStatus from openrouter.types import BaseModel from openrouter.utils import validate_open_enum +import pydantic from pydantic.functional_validators import PlainValidator from typing import Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -18,6 +19,10 @@ class OutputWebFetchServerToolItemTypedDict(TypedDict): status: ToolCallStatus type: OutputWebFetchServerToolItemType content: NotRequired[str] + error: NotRequired[str] + r"""The error message if the fetch failed.""" + http_status: NotRequired[int] + r"""The HTTP status code returned by the upstream URL fetch.""" id: NotRequired[str] title: NotRequired[str] url: NotRequired[str] @@ -32,6 +37,12 @@ class OutputWebFetchServerToolItem(BaseModel): content: Optional[str] = None + error: Optional[str] = None + r"""The error message if the fetch failed.""" + + http_status: Annotated[Optional[int], pydantic.Field(alias="httpStatus")] = None + r"""The HTTP status code returned by the upstream URL fetch.""" + id: Optional[str] = None title: Optional[str] = None diff --git a/src/openrouter/components/outputwebsearchcallitem.py b/src/openrouter/components/outputwebsearchcallitem.py index 706303d..c0c8f1b 100644 --- a/src/openrouter/components/outputwebsearchcallitem.py +++ b/src/openrouter/components/outputwebsearchcallitem.py @@ -78,20 +78,20 @@ def serialize_model(self, handler): return m -TypeSearch = Literal["search",] +ActionTypeSearch = Literal["search",] -class ActionSearchTypedDict(TypedDict): +class OutputWebSearchCallItemActionSearchTypedDict(TypedDict): query: str - type: TypeSearch + type: ActionTypeSearch queries: NotRequired[List[str]] sources: NotRequired[List[WebSearchSourceTypedDict]] -class ActionSearch(BaseModel): +class OutputWebSearchCallItemActionSearch(BaseModel): query: str - type: TypeSearch + type: ActionTypeSearch queries: Optional[List[str]] = None @@ -100,13 +100,17 @@ class ActionSearch(BaseModel): ActionTypedDict = TypeAliasType( "ActionTypedDict", - Union[ActionOpenPageTypedDict, ActionFindInPageTypedDict, ActionSearchTypedDict], + Union[ + ActionOpenPageTypedDict, + ActionFindInPageTypedDict, + OutputWebSearchCallItemActionSearchTypedDict, + ], ) Action = Annotated[ Union[ - Annotated[ActionSearch, Tag("search")], + Annotated[OutputWebSearchCallItemActionSearch, Tag("search")], Annotated[ActionOpenPage, Tag("open_page")], Annotated[ActionFindInPage, Tag("find_in_page")], ], diff --git a/src/openrouter/components/outputwebsearchservertoolitem.py b/src/openrouter/components/outputwebsearchservertoolitem.py index 304cab5..cdb0485 100644 --- a/src/openrouter/components/outputwebsearchservertoolitem.py +++ b/src/openrouter/components/outputwebsearchservertoolitem.py @@ -5,18 +5,55 @@ from openrouter.types import BaseModel from openrouter.utils import validate_open_enum from pydantic.functional_validators import PlainValidator -from typing import Literal, Optional +from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict -OutputWebSearchServerToolItemType = Literal["openrouter:web_search",] +OutputWebSearchServerToolItemTypeURL = Literal["url",] + + +class SourceTypedDict(TypedDict): + type: OutputWebSearchServerToolItemTypeURL + url: str + + +class Source(BaseModel): + type: OutputWebSearchServerToolItemTypeURL + + url: str + + +OutputWebSearchServerToolItemTypeSearch = Literal["search",] + + +class OutputWebSearchServerToolItemActionTypedDict(TypedDict): + r"""The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider.""" + + query: str + type: OutputWebSearchServerToolItemTypeSearch + sources: NotRequired[List[SourceTypedDict]] + + +class OutputWebSearchServerToolItemAction(BaseModel): + r"""The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider.""" + + query: str + + type: OutputWebSearchServerToolItemTypeSearch + + sources: Optional[List[Source]] = None + + +OutputWebSearchServerToolItemTypeOpenrouterWebSearch = Literal["openrouter:web_search",] class OutputWebSearchServerToolItemTypedDict(TypedDict): r"""An openrouter:web_search server tool output item""" status: ToolCallStatus - type: OutputWebSearchServerToolItemType + type: OutputWebSearchServerToolItemTypeOpenrouterWebSearch + action: NotRequired[OutputWebSearchServerToolItemActionTypedDict] + r"""The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider.""" id: NotRequired[str] @@ -25,6 +62,9 @@ class OutputWebSearchServerToolItem(BaseModel): status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))] - type: OutputWebSearchServerToolItemType + type: OutputWebSearchServerToolItemTypeOpenrouterWebSearch + + action: Optional[OutputWebSearchServerToolItemAction] = None + r"""The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider.""" id: Optional[str] = None diff --git a/src/openrouter/components/paretorouterplugin.py b/src/openrouter/components/paretorouterplugin.py new file mode 100644 index 0000000..6b12a70 --- /dev/null +++ b/src/openrouter/components/paretorouterplugin.py @@ -0,0 +1,27 @@ +"""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 + + +ParetoRouterPluginID = Literal["pareto-router",] + + +class ParetoRouterPluginTypedDict(TypedDict): + id: ParetoRouterPluginID + enabled: NotRequired[bool] + r"""Set to false to disable the pareto-router plugin for this request. Defaults to true.""" + min_coding_score: NotRequired[float] + r"""Minimum desired coding score between 0 and 1, where 1 is best. Higher values select from stronger coding models (sourced from Artificial Analysis coding percentiles). Maps internally to one of three tiers (low, medium, high). Omit to use the router default tier.""" + + +class ParetoRouterPlugin(BaseModel): + id: ParetoRouterPluginID + + enabled: Optional[bool] = None + r"""Set to false to disable the pareto-router plugin for this request. Defaults to true.""" + + min_coding_score: Optional[float] = None + r"""Minimum desired coding score between 0 and 1, where 1 is best. Higher values select from stronger coding models (sourced from Artificial Analysis coding percentiles). Maps internally to one of three tiers (low, medium, high). Omit to use the router default tier.""" diff --git a/src/openrouter/components/pipelinestage.py b/src/openrouter/components/pipelinestage.py new file mode 100644 index 0000000..a5a763d --- /dev/null +++ b/src/openrouter/components/pipelinestage.py @@ -0,0 +1,80 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .pipelinestagetype import PipelineStageType +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 Any, Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PipelineStageTypedDict(TypedDict): + name: str + type: PipelineStageType + r"""Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it.""" + cost_usd: NotRequired[Nullable[float]] + data: NotRequired[Dict[str, Nullable[Any]]] + guardrail_id: NotRequired[str] + guardrail_scope: NotRequired[str] + summary: NotRequired[str] + + +class PipelineStage(BaseModel): + name: str + + type: Annotated[PipelineStageType, PlainValidator(validate_open_enum(False))] + r"""Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it.""" + + cost_usd: OptionalNullable[float] = UNSET + + data: Optional[Dict[str, Nullable[Any]]] = None + + guardrail_id: Optional[str] = None + + guardrail_scope: Optional[str] = None + + summary: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "cost_usd", + "data", + "guardrail_id", + "guardrail_scope", + "summary", + ] + nullable_fields = ["cost_usd"] + 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/pipelinestagetype.py b/src/openrouter/components/pipelinestagetype.py new file mode 100644 index 0000000..1cc72ac --- /dev/null +++ b/src/openrouter/components/pipelinestagetype.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +PipelineStageType = Union[ + Literal[ + "guardrail", + "plugin", + "server_tools", + "response_healing", + "context_compression", + ], + UnrecognizedStr, +] +r"""Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it.""" diff --git a/src/openrouter/components/providername.py b/src/openrouter/components/providername.py index 7764a12..eefad3f 100644 --- a/src/openrouter/components/providername.py +++ b/src/openrouter/components/providername.py @@ -12,6 +12,7 @@ "AionLabs", "Alibaba", "Ambient", + "Baidu", "Amazon Bedrock", "Amazon Nova", "Anthropic", @@ -28,6 +29,7 @@ "Clarifai", "Cloudflare", "Cohere", + "Crucible", "Crusoe", "DeepInfra", "DeepSeek", @@ -58,12 +60,15 @@ "Morph", "NCompass", "Nebius", + "Nex AGI", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", + "Poolside", + "Perceptron", "Perplexity", "Phala", "Recraft", diff --git a/src/openrouter/components/provideroptions.py b/src/openrouter/components/provideroptions.py new file mode 100644 index 0000000..78f582c --- /dev/null +++ b/src/openrouter/components/provideroptions.py @@ -0,0 +1,393 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, Nullable +import pydantic +from typing import Any, Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ProviderOptionsTypedDict(TypedDict): + r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.""" + + oneai: NotRequired[Dict[str, Nullable[Any]]] + ai21: NotRequired[Dict[str, Nullable[Any]]] + aion_labs: NotRequired[Dict[str, Nullable[Any]]] + akashml: NotRequired[Dict[str, Nullable[Any]]] + alibaba: NotRequired[Dict[str, Nullable[Any]]] + amazon_bedrock: NotRequired[Dict[str, Nullable[Any]]] + amazon_nova: NotRequired[Dict[str, Nullable[Any]]] + ambient: NotRequired[Dict[str, Nullable[Any]]] + anthropic: NotRequired[Dict[str, Nullable[Any]]] + anyscale: NotRequired[Dict[str, Nullable[Any]]] + arcee_ai: NotRequired[Dict[str, Nullable[Any]]] + atlas_cloud: NotRequired[Dict[str, Nullable[Any]]] + atoma: NotRequired[Dict[str, Nullable[Any]]] + avian: NotRequired[Dict[str, Nullable[Any]]] + azure: NotRequired[Dict[str, Nullable[Any]]] + baidu: NotRequired[Dict[str, Nullable[Any]]] + baseten: NotRequired[Dict[str, Nullable[Any]]] + black_forest_labs: NotRequired[Dict[str, Nullable[Any]]] + byteplus: NotRequired[Dict[str, Nullable[Any]]] + centml: NotRequired[Dict[str, Nullable[Any]]] + cerebras: NotRequired[Dict[str, Nullable[Any]]] + chutes: NotRequired[Dict[str, Nullable[Any]]] + cirrascale: NotRequired[Dict[str, Nullable[Any]]] + clarifai: NotRequired[Dict[str, Nullable[Any]]] + cloudflare: NotRequired[Dict[str, Nullable[Any]]] + cohere: NotRequired[Dict[str, Nullable[Any]]] + crofai: NotRequired[Dict[str, Nullable[Any]]] + crucible: NotRequired[Dict[str, Nullable[Any]]] + crusoe: NotRequired[Dict[str, Nullable[Any]]] + deepinfra: NotRequired[Dict[str, Nullable[Any]]] + deepseek: NotRequired[Dict[str, Nullable[Any]]] + dekallm: NotRequired[Dict[str, Nullable[Any]]] + enfer: NotRequired[Dict[str, Nullable[Any]]] + fake_provider: NotRequired[Dict[str, Nullable[Any]]] + featherless: NotRequired[Dict[str, Nullable[Any]]] + fireworks: NotRequired[Dict[str, Nullable[Any]]] + friendli: NotRequired[Dict[str, Nullable[Any]]] + gmicloud: NotRequired[Dict[str, Nullable[Any]]] + google_ai_studio: NotRequired[Dict[str, Nullable[Any]]] + google_vertex: NotRequired[Dict[str, Nullable[Any]]] + gopomelo: NotRequired[Dict[str, Nullable[Any]]] + groq: NotRequired[Dict[str, Nullable[Any]]] + huggingface: NotRequired[Dict[str, Nullable[Any]]] + hyperbolic: NotRequired[Dict[str, Nullable[Any]]] + hyperbolic_quantized: NotRequired[Dict[str, Nullable[Any]]] + inception: NotRequired[Dict[str, Nullable[Any]]] + inceptron: NotRequired[Dict[str, Nullable[Any]]] + inference_net: NotRequired[Dict[str, Nullable[Any]]] + infermatic: NotRequired[Dict[str, Nullable[Any]]] + inflection: NotRequired[Dict[str, Nullable[Any]]] + inocloud: NotRequired[Dict[str, Nullable[Any]]] + io_net: NotRequired[Dict[str, Nullable[Any]]] + ionstream: NotRequired[Dict[str, Nullable[Any]]] + klusterai: NotRequired[Dict[str, Nullable[Any]]] + lambda_: NotRequired[Dict[str, Nullable[Any]]] + lepton: NotRequired[Dict[str, Nullable[Any]]] + liquid: NotRequired[Dict[str, Nullable[Any]]] + lynn: NotRequired[Dict[str, Nullable[Any]]] + lynn_private: NotRequired[Dict[str, Nullable[Any]]] + mancer: NotRequired[Dict[str, Nullable[Any]]] + mancer_old: NotRequired[Dict[str, Nullable[Any]]] + mara: NotRequired[Dict[str, Nullable[Any]]] + meta: NotRequired[Dict[str, Nullable[Any]]] + minimax: NotRequired[Dict[str, Nullable[Any]]] + mistral: NotRequired[Dict[str, Nullable[Any]]] + modal: NotRequired[Dict[str, Nullable[Any]]] + modelrun: NotRequired[Dict[str, Nullable[Any]]] + modular: NotRequired[Dict[str, Nullable[Any]]] + moonshotai: NotRequired[Dict[str, Nullable[Any]]] + morph: NotRequired[Dict[str, Nullable[Any]]] + ncompass: NotRequired[Dict[str, Nullable[Any]]] + nebius: NotRequired[Dict[str, Nullable[Any]]] + nex_agi: NotRequired[Dict[str, Nullable[Any]]] + nextbit: NotRequired[Dict[str, Nullable[Any]]] + nineteen: NotRequired[Dict[str, Nullable[Any]]] + novita: NotRequired[Dict[str, Nullable[Any]]] + nvidia: NotRequired[Dict[str, Nullable[Any]]] + octoai: NotRequired[Dict[str, Nullable[Any]]] + open_inference: NotRequired[Dict[str, Nullable[Any]]] + openai: NotRequired[Dict[str, Nullable[Any]]] + parasail: NotRequired[Dict[str, Nullable[Any]]] + perceptron: NotRequired[Dict[str, Nullable[Any]]] + perplexity: NotRequired[Dict[str, Nullable[Any]]] + phala: NotRequired[Dict[str, Nullable[Any]]] + poolside: NotRequired[Dict[str, Nullable[Any]]] + recraft: NotRequired[Dict[str, Nullable[Any]]] + recursal: NotRequired[Dict[str, Nullable[Any]]] + reflection: NotRequired[Dict[str, Nullable[Any]]] + reka: NotRequired[Dict[str, Nullable[Any]]] + relace: NotRequired[Dict[str, Nullable[Any]]] + replicate: NotRequired[Dict[str, Nullable[Any]]] + sambanova: NotRequired[Dict[str, Nullable[Any]]] + sambanova_cloaked: NotRequired[Dict[str, Nullable[Any]]] + seed: NotRequired[Dict[str, Nullable[Any]]] + sf_compute: NotRequired[Dict[str, Nullable[Any]]] + siliconflow: NotRequired[Dict[str, Nullable[Any]]] + sourceful: NotRequired[Dict[str, Nullable[Any]]] + stealth: NotRequired[Dict[str, Nullable[Any]]] + stepfun: NotRequired[Dict[str, Nullable[Any]]] + streamlake: NotRequired[Dict[str, Nullable[Any]]] + switchpoint: NotRequired[Dict[str, Nullable[Any]]] + targon: NotRequired[Dict[str, Nullable[Any]]] + together: NotRequired[Dict[str, Nullable[Any]]] + together_lite: NotRequired[Dict[str, Nullable[Any]]] + ubicloud: NotRequired[Dict[str, Nullable[Any]]] + upstage: NotRequired[Dict[str, Nullable[Any]]] + venice: NotRequired[Dict[str, Nullable[Any]]] + wandb: NotRequired[Dict[str, Nullable[Any]]] + xai: NotRequired[Dict[str, Nullable[Any]]] + xiaomi: NotRequired[Dict[str, Nullable[Any]]] + z_ai: NotRequired[Dict[str, Nullable[Any]]] + + +class ProviderOptions(BaseModel): + r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.""" + + oneai: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="01ai") + ] = None + + ai21: Optional[Dict[str, Nullable[Any]]] = None + + aion_labs: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="aion-labs") + ] = None + + akashml: Optional[Dict[str, Nullable[Any]]] = None + + alibaba: Optional[Dict[str, Nullable[Any]]] = None + + amazon_bedrock: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="amazon-bedrock") + ] = None + + amazon_nova: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="amazon-nova") + ] = None + + ambient: Optional[Dict[str, Nullable[Any]]] = None + + anthropic: Optional[Dict[str, Nullable[Any]]] = None + + anyscale: Optional[Dict[str, Nullable[Any]]] = None + + arcee_ai: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="arcee-ai") + ] = None + + atlas_cloud: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="atlas-cloud") + ] = None + + atoma: Optional[Dict[str, Nullable[Any]]] = None + + avian: Optional[Dict[str, Nullable[Any]]] = None + + azure: Optional[Dict[str, Nullable[Any]]] = None + + baidu: Optional[Dict[str, Nullable[Any]]] = None + + baseten: Optional[Dict[str, Nullable[Any]]] = None + + black_forest_labs: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="black-forest-labs") + ] = None + + byteplus: Optional[Dict[str, Nullable[Any]]] = None + + centml: Optional[Dict[str, Nullable[Any]]] = None + + cerebras: Optional[Dict[str, Nullable[Any]]] = None + + chutes: Optional[Dict[str, Nullable[Any]]] = None + + cirrascale: Optional[Dict[str, Nullable[Any]]] = None + + clarifai: Optional[Dict[str, Nullable[Any]]] = None + + cloudflare: Optional[Dict[str, Nullable[Any]]] = None + + cohere: Optional[Dict[str, Nullable[Any]]] = None + + crofai: Optional[Dict[str, Nullable[Any]]] = None + + crucible: Optional[Dict[str, Nullable[Any]]] = None + + crusoe: Optional[Dict[str, Nullable[Any]]] = None + + deepinfra: Optional[Dict[str, Nullable[Any]]] = None + + deepseek: Optional[Dict[str, Nullable[Any]]] = None + + dekallm: Optional[Dict[str, Nullable[Any]]] = None + + enfer: Optional[Dict[str, Nullable[Any]]] = None + + fake_provider: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="fake-provider") + ] = None + + featherless: Optional[Dict[str, Nullable[Any]]] = None + + fireworks: Optional[Dict[str, Nullable[Any]]] = None + + friendli: Optional[Dict[str, Nullable[Any]]] = None + + gmicloud: Optional[Dict[str, Nullable[Any]]] = None + + google_ai_studio: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="google-ai-studio") + ] = None + + google_vertex: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="google-vertex") + ] = None + + gopomelo: Optional[Dict[str, Nullable[Any]]] = None + + groq: Optional[Dict[str, Nullable[Any]]] = None + + huggingface: Optional[Dict[str, Nullable[Any]]] = None + + hyperbolic: Optional[Dict[str, Nullable[Any]]] = None + + hyperbolic_quantized: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="hyperbolic-quantized") + ] = None + + inception: Optional[Dict[str, Nullable[Any]]] = None + + inceptron: Optional[Dict[str, Nullable[Any]]] = None + + inference_net: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="inference-net") + ] = None + + infermatic: Optional[Dict[str, Nullable[Any]]] = None + + inflection: Optional[Dict[str, Nullable[Any]]] = None + + inocloud: Optional[Dict[str, Nullable[Any]]] = None + + io_net: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="io-net") + ] = None + + ionstream: Optional[Dict[str, Nullable[Any]]] = None + + klusterai: Optional[Dict[str, Nullable[Any]]] = None + + lambda_: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="lambda") + ] = None + + lepton: Optional[Dict[str, Nullable[Any]]] = None + + liquid: Optional[Dict[str, Nullable[Any]]] = None + + lynn: Optional[Dict[str, Nullable[Any]]] = None + + lynn_private: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="lynn-private") + ] = None + + mancer: Optional[Dict[str, Nullable[Any]]] = None + + mancer_old: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="mancer-old") + ] = None + + mara: Optional[Dict[str, Nullable[Any]]] = None + + meta: Optional[Dict[str, Nullable[Any]]] = None + + minimax: Optional[Dict[str, Nullable[Any]]] = None + + mistral: Optional[Dict[str, Nullable[Any]]] = None + + modal: Optional[Dict[str, Nullable[Any]]] = None + + modelrun: Optional[Dict[str, Nullable[Any]]] = None + + modular: Optional[Dict[str, Nullable[Any]]] = None + + moonshotai: Optional[Dict[str, Nullable[Any]]] = None + + morph: Optional[Dict[str, Nullable[Any]]] = None + + ncompass: Optional[Dict[str, Nullable[Any]]] = None + + nebius: Optional[Dict[str, Nullable[Any]]] = None + + nex_agi: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="nex-agi") + ] = None + + nextbit: Optional[Dict[str, Nullable[Any]]] = None + + nineteen: Optional[Dict[str, Nullable[Any]]] = None + + novita: Optional[Dict[str, Nullable[Any]]] = None + + nvidia: Optional[Dict[str, Nullable[Any]]] = None + + octoai: Optional[Dict[str, Nullable[Any]]] = None + + open_inference: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="open-inference") + ] = None + + openai: Optional[Dict[str, Nullable[Any]]] = None + + parasail: Optional[Dict[str, Nullable[Any]]] = None + + perceptron: Optional[Dict[str, Nullable[Any]]] = None + + perplexity: Optional[Dict[str, Nullable[Any]]] = None + + phala: Optional[Dict[str, Nullable[Any]]] = None + + poolside: Optional[Dict[str, Nullable[Any]]] = None + + recraft: Optional[Dict[str, Nullable[Any]]] = None + + recursal: Optional[Dict[str, Nullable[Any]]] = None + + reflection: Optional[Dict[str, Nullable[Any]]] = None + + reka: Optional[Dict[str, Nullable[Any]]] = None + + relace: Optional[Dict[str, Nullable[Any]]] = None + + replicate: Optional[Dict[str, Nullable[Any]]] = None + + sambanova: Optional[Dict[str, Nullable[Any]]] = None + + sambanova_cloaked: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="sambanova-cloaked") + ] = None + + seed: Optional[Dict[str, Nullable[Any]]] = None + + sf_compute: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="sf-compute") + ] = None + + siliconflow: Optional[Dict[str, Nullable[Any]]] = None + + sourceful: Optional[Dict[str, Nullable[Any]]] = None + + stealth: Optional[Dict[str, Nullable[Any]]] = None + + stepfun: Optional[Dict[str, Nullable[Any]]] = None + + streamlake: Optional[Dict[str, Nullable[Any]]] = None + + switchpoint: Optional[Dict[str, Nullable[Any]]] = None + + targon: Optional[Dict[str, Nullable[Any]]] = None + + together: Optional[Dict[str, Nullable[Any]]] = None + + together_lite: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="together-lite") + ] = None + + ubicloud: Optional[Dict[str, Nullable[Any]]] = None + + upstage: Optional[Dict[str, Nullable[Any]]] = None + + venice: Optional[Dict[str, Nullable[Any]]] = None + + wandb: Optional[Dict[str, Nullable[Any]]] = None + + xai: Optional[Dict[str, Nullable[Any]]] = None + + xiaomi: Optional[Dict[str, Nullable[Any]]] = None + + z_ai: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="z-ai") + ] = None diff --git a/src/openrouter/components/providerresponse.py b/src/openrouter/components/providerresponse.py index 4856eee..b771178 100644 --- a/src/openrouter/components/providerresponse.py +++ b/src/openrouter/components/providerresponse.py @@ -44,6 +44,7 @@ "AionLabs", "Alibaba", "Ambient", + "Baidu", "Amazon Bedrock", "Amazon Nova", "Anthropic", @@ -60,6 +61,7 @@ "Clarifai", "Cloudflare", "Cohere", + "Crucible", "Crusoe", "DeepInfra", "DeepSeek", @@ -90,12 +92,15 @@ "Morph", "NCompass", "Nebius", + "Nex AGI", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", + "Poolside", + "Perceptron", "Perplexity", "Phala", "Recraft", diff --git a/src/openrouter/components/responsesrequest.py b/src/openrouter/components/responsesrequest.py index 357c19a..2a17314 100644 --- a/src/openrouter/components/responsesrequest.py +++ b/src/openrouter/components/responsesrequest.py @@ -1,7 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .anthropiccachecontroldirective import ( + AnthropicCacheControlDirective, + AnthropicCacheControlDirectiveTypedDict, +) from .applypatchservertool import ApplyPatchServerTool, ApplyPatchServerToolTypedDict +from .applypatchservertool_openrouter import ( + ApplyPatchServerToolOpenRouter, + ApplyPatchServerToolOpenRouterTypedDict, +) from .autorouterplugin import AutoRouterPlugin, AutoRouterPluginTypedDict from .chatsearchmodelsservertool import ( ChatSearchModelsServerTool, @@ -21,6 +29,11 @@ from .datetimeservertool import DatetimeServerTool, DatetimeServerToolTypedDict from .fileparserplugin import FileParserPlugin, FileParserPluginTypedDict from .filesearchservertool import FileSearchServerTool, FileSearchServerToolTypedDict +from .fusionplugin import FusionPlugin, FusionPluginTypedDict +from .fusionservertool_openrouter import ( + FusionServerToolOpenRouter, + FusionServerToolOpenRouterTypedDict, +) from .imageconfig import ImageConfig, ImageConfigTypedDict from .imagegenerationservertool import ( ImageGenerationServerTool, @@ -43,6 +56,7 @@ ) from .openairesponsestruncation import OpenAIResponsesTruncation from .outputmodalityenum import OutputModalityEnum +from .paretorouterplugin import ParetoRouterPlugin, ParetoRouterPluginTypedDict from .preview_20250311_websearchservertool import ( Preview20250311WebSearchServerTool, Preview20250311WebSearchServerToolTypedDict, @@ -59,6 +73,7 @@ from .storedprompttemplate import StoredPromptTemplate, StoredPromptTemplateTypedDict from .textextendedconfig import TextExtendedConfig, TextExtendedConfigTypedDict from .traceconfig import TraceConfig, TraceConfigTypedDict +from .webfetchservertool import WebFetchServerTool, WebFetchServerToolTypedDict from .websearchplugin import WebSearchPlugin, WebSearchPluginTypedDict from .websearchservertool import WebSearchServerTool, WebSearchServerToolTypedDict from .websearchservertool_openrouter import ( @@ -89,6 +104,8 @@ AutoRouterPluginTypedDict, FileParserPluginTypedDict, ContextCompressionPluginTypedDict, + ParetoRouterPluginTypedDict, + FusionPluginTypedDict, WebSearchPluginTypedDict, ], ) @@ -99,7 +116,9 @@ Annotated[AutoRouterPlugin, Tag("auto-router")], Annotated[ContextCompressionPlugin, Tag("context-compression")], Annotated[FileParserPlugin, Tag("file-parser")], + Annotated[FusionPlugin, Tag("fusion")], Annotated[ModerationPlugin, Tag("moderation")], + Annotated[ParetoRouterPlugin, Tag("pareto-router")], Annotated[ResponseHealingPlugin, Tag("response-healing")], Annotated[WebSearchPlugin, Tag("web")], ], @@ -179,22 +198,25 @@ def serialize_model(self, handler): ResponsesRequestToolUnionTypedDict = TypeAliasType( "ResponsesRequestToolUnionTypedDict", Union[ - ApplyPatchServerToolTypedDict, CodexLocalShellToolTypedDict, + ApplyPatchServerToolTypedDict, ShellServerToolTypedDict, + FusionServerToolOpenRouterTypedDict, + CodeInterpreterServerToolTypedDict, + ApplyPatchServerToolOpenRouterTypedDict, WebSearchServerToolOpenRouterTypedDict, + WebFetchServerToolTypedDict, ChatSearchModelsServerToolTypedDict, ImageGenerationServerToolOpenRouterTypedDict, - CodeInterpreterServerToolTypedDict, DatetimeServerToolTypedDict, ComputerUseServerToolTypedDict, CustomToolTypedDict, ResponsesRequestToolFunctionTypedDict, FileSearchServerToolTypedDict, + PreviewWebSearchServerToolTypedDict, WebSearchServerToolTypedDict, - LegacyWebSearchServerToolTypedDict, Preview20250311WebSearchServerToolTypedDict, - PreviewWebSearchServerToolTypedDict, + LegacyWebSearchServerToolTypedDict, McpServerToolTypedDict, ImageGenerationServerToolTypedDict, ], @@ -220,13 +242,16 @@ def serialize_model(self, handler): Annotated[ApplyPatchServerTool, Tag("apply_patch")], Annotated[CustomTool, Tag("custom")], Annotated[DatetimeServerTool, Tag("openrouter:datetime")], + Annotated[FusionServerToolOpenRouter, Tag("openrouter:fusion")], Annotated[ ImageGenerationServerToolOpenRouter, Tag("openrouter:image_generation") ], Annotated[ ChatSearchModelsServerTool, Tag("openrouter:experimental__search_models") ], + Annotated[WebFetchServerTool, Tag("openrouter:web_fetch")], Annotated[WebSearchServerToolOpenRouter, Tag("openrouter:web_search")], + Annotated[ApplyPatchServerToolOpenRouter, Tag("openrouter:apply_patch")], ], Discriminator(lambda m: get_discriminator(m, "type", "type")), ] @@ -236,6 +261,8 @@ class ResponsesRequestTypedDict(TypedDict): r"""Request schema for Responses endpoint""" background: NotRequired[Nullable[bool]] + cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict] + r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" frequency_penalty: NotRequired[Nullable[float]] image_config: NotRequired[Dict[str, ImageConfigTypedDict]] 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.""" @@ -288,6 +315,9 @@ class ResponsesRequest(BaseModel): background: OptionalNullable[bool] = UNSET + cache_control: Optional[AnthropicCacheControlDirective] = None + r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" + frequency_penalty: OptionalNullable[float] = UNSET image_config: Optional[Dict[str, ImageConfig]] = None @@ -384,6 +414,7 @@ class ResponsesRequest(BaseModel): def serialize_model(self, handler): optional_fields = [ "background", + "cache_control", "frequency_penalty", "image_config", "include", diff --git a/src/openrouter/components/responsesstreamingresponse.py b/src/openrouter/components/responsesstreamingresponse.py new file mode 100644 index 0000000..f42e733 --- /dev/null +++ b/src/openrouter/components/responsesstreamingresponse.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .streamevents import StreamEvents, StreamEventsTypedDict +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class ResponsesStreamingResponseTypedDict(TypedDict): + data: StreamEventsTypedDict + r"""Union of all possible event types emitted during response streaming""" + + +class ResponsesStreamingResponse(BaseModel): + data: StreamEvents + r"""Union of all possible event types emitted during response streaming""" diff --git a/src/openrouter/components/routerattempt.py b/src/openrouter/components/routerattempt.py new file mode 100644 index 0000000..d47bd37 --- /dev/null +++ b/src/openrouter/components/routerattempt.py @@ -0,0 +1,19 @@ +"""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 RouterAttemptTypedDict(TypedDict): + model: str + provider: str + status: int + + +class RouterAttempt(BaseModel): + model: str + + provider: str + + status: int diff --git a/src/openrouter/components/routerparams.py b/src/openrouter/components/routerparams.py new file mode 100644 index 0000000..ae952a3 --- /dev/null +++ b/src/openrouter/components/routerparams.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, Nullable +import pydantic +from pydantic import ConfigDict +from typing import Any, Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class RouterParamsTypedDict(TypedDict): + quality_floor: NotRequired[float] + throughput_floor: NotRequired[float] + version_group: NotRequired[str] + + +class RouterParams(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) + + quality_floor: Optional[float] = None + + throughput_floor: Optional[float] = None + + version_group: 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] diff --git a/src/openrouter/components/routingstrategy.py b/src/openrouter/components/routingstrategy.py new file mode 100644 index 0000000..2f0e24f --- /dev/null +++ b/src/openrouter/components/routingstrategy.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +RoutingStrategy = Union[ + Literal[ + "direct", + "auto", + "free", + "latest", + "alias", + "fallback", + "pareto", + "bodybuilder", + "fusion", + ], + UnrecognizedStr, +] diff --git a/src/openrouter/components/searchqualitylevel.py b/src/openrouter/components/searchqualitylevel.py index 36eba03..cb18824 100644 --- a/src/openrouter/components/searchqualitylevel.py +++ b/src/openrouter/components/searchqualitylevel.py @@ -13,4 +13,4 @@ ], UnrecognizedStr, ] -r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" +r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.""" diff --git a/src/openrouter/components/shellcallitem.py b/src/openrouter/components/shellcallitem.py new file mode 100644 index 0000000..892539b --- /dev/null +++ b/src/openrouter/components/shellcallitem.py @@ -0,0 +1,132 @@ +"""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, List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ShellCallItemActionTypedDict(TypedDict): + commands: List[str] + max_output_length: NotRequired[Nullable[int]] + timeout_ms: NotRequired[Nullable[int]] + + +class ShellCallItemAction(BaseModel): + commands: List[str] + + max_output_length: OptionalNullable[int] = UNSET + + timeout_ms: OptionalNullable[int] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["max_output_length", "timeout_ms"] + nullable_fields = ["max_output_length", "timeout_ms"] + 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 + + +ShellCallItemStatus = Union[ + Literal[ + "in_progress", + "completed", + "incomplete", + ], + UnrecognizedStr, +] + + +ShellCallItemType = Literal["shell_call",] + + +class ShellCallItemTypedDict(TypedDict): + r"""A shell command execution call (newer variant)""" + + action: ShellCallItemActionTypedDict + call_id: str + type: ShellCallItemType + environment: NotRequired[Nullable[Any]] + id: NotRequired[Nullable[str]] + status: NotRequired[Nullable[ShellCallItemStatus]] + + +class ShellCallItem(BaseModel): + r"""A shell command execution call (newer variant)""" + + action: ShellCallItemAction + + call_id: str + + type: ShellCallItemType + + environment: OptionalNullable[Any] = UNSET + + id: OptionalNullable[str] = UNSET + + status: Annotated[ + OptionalNullable[ShellCallItemStatus], PlainValidator(validate_open_enum(False)) + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["environment", "id", "status"] + nullable_fields = ["environment", "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/shellcalloutputitem.py b/src/openrouter/components/shellcalloutputitem.py new file mode 100644 index 0000000..fb4b300 --- /dev/null +++ b/src/openrouter/components/shellcalloutputitem.py @@ -0,0 +1,150 @@ +"""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 +import pydantic +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ShellCallOutputItemOutputTypedDict(TypedDict): + type: str + content: NotRequired[Nullable[str]] + exit_code: NotRequired[Nullable[int]] + + +class ShellCallOutputItemOutput(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) + + type: str + + content: OptionalNullable[str] = UNSET + + exit_code: OptionalNullable[int] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["content", "exit_code"] + nullable_fields = ["content", "exit_code"] + 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 + + for k, v in serialized.items(): + m[k] = v + + return m + + +ShellCallOutputItemStatus = Union[ + Literal[ + "in_progress", + "completed", + "incomplete", + ], + UnrecognizedStr, +] + + +ShellCallOutputItemType = Literal["shell_call_output",] + + +class ShellCallOutputItemTypedDict(TypedDict): + r"""Output from a shell command execution (newer variant)""" + + call_id: str + output: List[ShellCallOutputItemOutputTypedDict] + type: ShellCallOutputItemType + id: NotRequired[Nullable[str]] + max_output_length: NotRequired[Nullable[int]] + status: NotRequired[Nullable[ShellCallOutputItemStatus]] + + +class ShellCallOutputItem(BaseModel): + r"""Output from a shell command execution (newer variant)""" + + call_id: str + + output: List[ShellCallOutputItemOutput] + + type: ShellCallOutputItemType + + id: OptionalNullable[str] = UNSET + + max_output_length: OptionalNullable[int] = UNSET + + status: Annotated[ + OptionalNullable[ShellCallOutputItemStatus], + PlainValidator(validate_open_enum(False)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "max_output_length", "status"] + nullable_fields = ["id", "max_output_length", "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/speechrequest.py b/src/openrouter/components/speechrequest.py new file mode 100644 index 0000000..aebab1a --- /dev/null +++ b/src/openrouter/components/speechrequest.py @@ -0,0 +1,74 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .provideroptions import ProviderOptions, ProviderOptionsTypedDict +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 + + +class SpeechRequestProviderTypedDict(TypedDict): + r"""Provider-specific passthrough configuration""" + + options: NotRequired[ProviderOptionsTypedDict] + r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.""" + + +class SpeechRequestProvider(BaseModel): + r"""Provider-specific passthrough configuration""" + + options: Optional[ProviderOptions] = None + r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.""" + + +ResponseFormatEnum = Union[ + Literal[ + "mp3", + "pcm", + ], + UnrecognizedStr, +] +r"""Audio output format""" + + +class SpeechRequestTypedDict(TypedDict): + r"""Text-to-speech request input""" + + input: str + r"""Text to synthesize""" + model: str + r"""TTS model identifier""" + voice: str + r"""Voice identifier (provider-specific).""" + provider: NotRequired[SpeechRequestProviderTypedDict] + r"""Provider-specific passthrough configuration""" + response_format: NotRequired[ResponseFormatEnum] + r"""Audio output format""" + speed: NotRequired[float] + r"""Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.""" + + +class SpeechRequest(BaseModel): + r"""Text-to-speech request input""" + + input: str + r"""Text to synthesize""" + + model: str + r"""TTS model identifier""" + + voice: str + r"""Voice identifier (provider-specific).""" + + provider: Optional[SpeechRequestProvider] = None + r"""Provider-specific passthrough configuration""" + + response_format: Annotated[ + Optional[ResponseFormatEnum], PlainValidator(validate_open_enum(False)) + ] = "pcm" + r"""Audio output format""" + + speed: Optional[float] = None + r"""Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.""" diff --git a/src/openrouter/components/streamevents.py b/src/openrouter/components/streamevents.py index c663877..bae92a3 100644 --- a/src/openrouter/components/streamevents.py +++ b/src/openrouter/components/streamevents.py @@ -2,8 +2,24 @@ from __future__ import annotations from .annotationaddedevent import AnnotationAddedEvent, AnnotationAddedEventTypedDict +from .applypatchcalloperationdiffdeltaevent import ( + ApplyPatchCallOperationDiffDeltaEvent, + ApplyPatchCallOperationDiffDeltaEventTypedDict, +) +from .applypatchcalloperationdiffdoneevent import ( + ApplyPatchCallOperationDiffDoneEvent, + ApplyPatchCallOperationDiffDoneEventTypedDict, +) from .contentpartaddedevent import ContentPartAddedEvent, ContentPartAddedEventTypedDict from .contentpartdoneevent import ContentPartDoneEvent, ContentPartDoneEventTypedDict +from .customtoolcallinputdeltaevent import ( + CustomToolCallInputDeltaEvent, + CustomToolCallInputDeltaEventTypedDict, +) +from .customtoolcallinputdoneevent import ( + CustomToolCallInputDoneEvent, + CustomToolCallInputDoneEventTypedDict, +) from .errorevent import ErrorEvent, ErrorEventTypedDict from .functioncallargsdeltaevent import ( FunctionCallArgsDeltaEvent, @@ -101,34 +117,38 @@ "StreamEventsTypedDict", Union[ OpenResponsesCreatedEventTypedDict, - OpenResponsesInProgressEventTypedDict, StreamEventsResponseCompletedTypedDict, - StreamEventsResponseIncompleteTypedDict, StreamEventsResponseFailedTypedDict, - StreamEventsResponseOutputItemAddedTypedDict, - StreamEventsResponseOutputItemDoneTypedDict, + OpenResponsesInProgressEventTypedDict, + StreamEventsResponseIncompleteTypedDict, WebSearchCallCompletedEventTypedDict, - WebSearchCallSearchingEventTypedDict, - WebSearchCallInProgressEventTypedDict, - ImageGenCallCompletedEventTypedDict, ImageGenCallGeneratingEventTypedDict, ImageGenCallInProgressEventTypedDict, - FunctionCallArgsDeltaEventTypedDict, + StreamEventsResponseOutputItemAddedTypedDict, + StreamEventsResponseOutputItemDoneTypedDict, + ImageGenCallCompletedEventTypedDict, + WebSearchCallInProgressEventTypedDict, + WebSearchCallSearchingEventTypedDict, ErrorEventTypedDict, + CustomToolCallInputDeltaEventTypedDict, + FunctionCallArgsDeltaEventTypedDict, + CustomToolCallInputDoneEventTypedDict, + ApplyPatchCallOperationDiffDeltaEventTypedDict, + ApplyPatchCallOperationDiffDoneEventTypedDict, + ContentPartAddedEventTypedDict, + ReasoningDeltaEventTypedDict, ReasoningSummaryTextDeltaEventTypedDict, ReasoningSummaryTextDoneEventTypedDict, - ReasoningDeltaEventTypedDict, - ReasoningDoneEventTypedDict, ReasoningSummaryPartAddedEventTypedDict, + ReasoningDoneEventTypedDict, + ImageGenCallPartialImageEventTypedDict, ReasoningSummaryPartDoneEventTypedDict, - ContentPartAddedEventTypedDict, FunctionCallArgsDoneEventTypedDict, + ContentPartDoneEventTypedDict, RefusalDoneEventTypedDict, RefusalDeltaEventTypedDict, - ImageGenCallPartialImageEventTypedDict, - ContentPartDoneEventTypedDict, - TextDeltaEventTypedDict, TextDoneEventTypedDict, + TextDeltaEventTypedDict, AnnotationAddedEventTypedDict, ], ) @@ -138,10 +158,24 @@ StreamEvents = Annotated[ Union[ Annotated[ErrorEvent, Tag("error")], + Annotated[ + ApplyPatchCallOperationDiffDeltaEvent, + Tag("response.apply_patch_call_operation_diff.delta"), + ], + Annotated[ + ApplyPatchCallOperationDiffDoneEvent, + Tag("response.apply_patch_call_operation_diff.done"), + ], Annotated[StreamEventsResponseCompleted, Tag("response.completed")], Annotated[ContentPartAddedEvent, Tag("response.content_part.added")], Annotated[ContentPartDoneEvent, Tag("response.content_part.done")], Annotated[OpenResponsesCreatedEvent, Tag("response.created")], + Annotated[ + CustomToolCallInputDeltaEvent, Tag("response.custom_tool_call_input.delta") + ], + Annotated[ + CustomToolCallInputDoneEvent, Tag("response.custom_tool_call_input.done") + ], Annotated[StreamEventsResponseFailed, Tag("response.failed")], Annotated[ FunctionCallArgsDeltaEvent, Tag("response.function_call_arguments.delta") diff --git a/src/openrouter/components/sttinputaudio.py b/src/openrouter/components/sttinputaudio.py new file mode 100644 index 0000000..d1b15b4 --- /dev/null +++ b/src/openrouter/components/sttinputaudio.py @@ -0,0 +1,25 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class STTInputAudioTypedDict(TypedDict): + r"""Base64-encoded audio to transcribe""" + + data: str + r"""Base64-encoded audio data (raw bytes, not a data URI)""" + format_: str + r"""Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider.""" + + +class STTInputAudio(BaseModel): + r"""Base64-encoded audio to transcribe""" + + data: str + r"""Base64-encoded audio data (raw bytes, not a data URI)""" + + format_: Annotated[str, pydantic.Field(alias="format")] + r"""Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider.""" diff --git a/src/openrouter/components/sttrequest.py b/src/openrouter/components/sttrequest.py new file mode 100644 index 0000000..5ea932b --- /dev/null +++ b/src/openrouter/components/sttrequest.py @@ -0,0 +1,56 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .provideroptions import ProviderOptions, ProviderOptionsTypedDict +from .sttinputaudio import STTInputAudio, STTInputAudioTypedDict +from openrouter.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class STTRequestProviderTypedDict(TypedDict): + r"""Provider-specific passthrough configuration""" + + options: NotRequired[ProviderOptionsTypedDict] + r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.""" + + +class STTRequestProvider(BaseModel): + r"""Provider-specific passthrough configuration""" + + options: Optional[ProviderOptions] = None + r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.""" + + +class STTRequestTypedDict(TypedDict): + r"""Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio.""" + + input_audio: STTInputAudioTypedDict + r"""Base64-encoded audio to transcribe""" + model: str + r"""STT model identifier""" + language: NotRequired[str] + r"""ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted.""" + provider: NotRequired[STTRequestProviderTypedDict] + r"""Provider-specific passthrough configuration""" + temperature: NotRequired[float] + r"""Sampling temperature for transcription""" + + +class STTRequest(BaseModel): + r"""Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio.""" + + input_audio: STTInputAudio + r"""Base64-encoded audio to transcribe""" + + model: str + r"""STT model identifier""" + + language: Optional[str] = None + r"""ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted.""" + + provider: Optional[STTRequestProvider] = None + r"""Provider-specific passthrough configuration""" + + temperature: Optional[float] = None + r"""Sampling temperature for transcription""" diff --git a/src/openrouter/components/sttresponse.py b/src/openrouter/components/sttresponse.py new file mode 100644 index 0000000..d50a8c4 --- /dev/null +++ b/src/openrouter/components/sttresponse.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .sttusage import STTUsage, STTUsageTypedDict +from openrouter.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class STTResponseTypedDict(TypedDict): + r"""STT response containing transcribed text and optional usage statistics""" + + text: str + r"""The transcribed text""" + usage: NotRequired[STTUsageTypedDict] + r"""Aggregated usage statistics for the request""" + + +class STTResponse(BaseModel): + r"""STT response containing transcribed text and optional usage statistics""" + + text: str + r"""The transcribed text""" + + usage: Optional[STTUsage] = None + r"""Aggregated usage statistics for the request""" diff --git a/src/openrouter/components/sttusage.py b/src/openrouter/components/sttusage.py new file mode 100644 index 0000000..c7661d1 --- /dev/null +++ b/src/openrouter/components/sttusage.py @@ -0,0 +1,40 @@ +"""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 STTUsageTypedDict(TypedDict): + r"""Aggregated usage statistics for the request""" + + cost: NotRequired[float] + r"""Total cost of the request in USD""" + input_tokens: NotRequired[int] + r"""Number of input tokens billed for this request""" + output_tokens: NotRequired[int] + r"""Number of output tokens generated""" + seconds: NotRequired[float] + r"""Duration of the input audio in seconds""" + total_tokens: NotRequired[int] + r"""Total number of tokens used (input + output)""" + + +class STTUsage(BaseModel): + r"""Aggregated usage statistics for the request""" + + cost: Optional[float] = None + r"""Total cost of the request in USD""" + + input_tokens: Optional[int] = None + r"""Number of input tokens billed for this request""" + + output_tokens: Optional[int] = None + r"""Number of output tokens generated""" + + seconds: Optional[float] = None + r"""Duration of the input audio in seconds""" + + total_tokens: Optional[int] = None + r"""Total number of tokens used (input + output)""" diff --git a/src/openrouter/components/textextendedconfig.py b/src/openrouter/components/textextendedconfig.py index ee561b1..89224c7 100644 --- a/src/openrouter/components/textextendedconfig.py +++ b/src/openrouter/components/textextendedconfig.py @@ -18,11 +18,13 @@ from typing_extensions import Annotated, NotRequired, TypedDict -TextExtendedConfigVerbosity = Union[ +Verbosity = Union[ Literal[ - "high", "low", "medium", + "high", + "xhigh", + "max", ], UnrecognizedStr, ] @@ -33,7 +35,7 @@ class TextExtendedConfigTypedDict(TypedDict): format_: NotRequired[FormatsTypedDict] r"""Text response format configuration""" - verbosity: NotRequired[Nullable[TextExtendedConfigVerbosity]] + verbosity: NotRequired[Nullable[Verbosity]] class TextExtendedConfig(BaseModel): @@ -43,8 +45,7 @@ class TextExtendedConfig(BaseModel): r"""Text response format configuration""" verbosity: Annotated[ - OptionalNullable[TextExtendedConfigVerbosity], - PlainValidator(validate_open_enum(False)), + OptionalNullable[Verbosity], PlainValidator(validate_open_enum(False)) ] = UNSET @model_serializer(mode="wrap") diff --git a/src/openrouter/components/updateguardrailrequest.py b/src/openrouter/components/updateguardrailrequest.py index c400077..c4f4dc4 100644 --- a/src/openrouter/components/updateguardrailrequest.py +++ b/src/openrouter/components/updateguardrailrequest.py @@ -1,6 +1,11 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .contentfilterbuiltinentry import ( + ContentFilterBuiltinEntry, + ContentFilterBuiltinEntryTypedDict, +) +from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict from .guardrailinterval import GuardrailInterval from openrouter.types import ( BaseModel, @@ -10,6 +15,7 @@ UNSET_SENTINEL, ) from openrouter.utils import validate_open_enum +import pydantic from pydantic import model_serializer from pydantic.functional_validators import PlainValidator from typing import List, Optional @@ -21,10 +27,24 @@ class UpdateGuardrailRequestTypedDict(TypedDict): r"""Array of model identifiers (slug or canonical_slug accepted)""" allowed_providers: NotRequired[Nullable[List[str]]] r"""New list of allowed provider IDs""" + content_filter_builtins: NotRequired[ + Nullable[List[ContentFilterBuiltinEntryTypedDict]] + ] + r"""Builtin content filters to apply. Set to null to remove. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.""" + content_filters: NotRequired[Nullable[List[ContentFilterEntryTypedDict]]] + r"""Custom regex content filters to apply. Set to null to remove.""" description: NotRequired[Nullable[str]] r"""New description for the guardrail""" enforce_zdr: NotRequired[Nullable[bool]] - r"""Whether to enforce zero data retention""" + r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.""" + enforce_zdr_anthropic: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.""" + enforce_zdr_google: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.""" + enforce_zdr_openai: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.""" + enforce_zdr_other: NotRequired[Nullable[bool]] + r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.""" ignored_models: NotRequired[Nullable[List[str]]] r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)""" ignored_providers: NotRequired[Nullable[List[str]]] @@ -44,11 +64,34 @@ class UpdateGuardrailRequest(BaseModel): allowed_providers: OptionalNullable[List[str]] = UNSET r"""New list of allowed provider IDs""" + content_filter_builtins: OptionalNullable[List[ContentFilterBuiltinEntry]] = UNSET + r"""Builtin content filters to apply. Set to null to remove. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.""" + + content_filters: OptionalNullable[List[ContentFilterEntry]] = UNSET + r"""Custom regex content filters to apply. Set to null to remove.""" + description: OptionalNullable[str] = UNSET r"""New description for the guardrail""" - enforce_zdr: OptionalNullable[bool] = UNSET - r"""Whether to enforce zero data retention""" + enforce_zdr: Annotated[ + OptionalNullable[bool], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET + r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.""" + + enforce_zdr_anthropic: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.""" + + enforce_zdr_google: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.""" + + enforce_zdr_openai: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.""" + + enforce_zdr_other: OptionalNullable[bool] = UNSET + r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.""" ignored_models: OptionalNullable[List[str]] = UNSET r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)""" @@ -72,8 +115,14 @@ def serialize_model(self, handler): optional_fields = [ "allowed_models", "allowed_providers", + "content_filter_builtins", + "content_filters", "description", "enforce_zdr", + "enforce_zdr_anthropic", + "enforce_zdr_google", + "enforce_zdr_openai", + "enforce_zdr_other", "ignored_models", "ignored_providers", "limit_usd", @@ -83,8 +132,14 @@ def serialize_model(self, handler): nullable_fields = [ "allowed_models", "allowed_providers", + "content_filter_builtins", + "content_filters", "description", "enforce_zdr", + "enforce_zdr_anthropic", + "enforce_zdr_google", + "enforce_zdr_openai", + "enforce_zdr_other", "ignored_models", "ignored_providers", "limit_usd", diff --git a/src/openrouter/components/updateworkspacerequest.py b/src/openrouter/components/updateworkspacerequest.py new file mode 100644 index 0000000..8271be1 --- /dev/null +++ b/src/openrouter/components/updateworkspacerequest.py @@ -0,0 +1,121 @@ +"""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 List, Optional +from typing_extensions import NotRequired, TypedDict + + +class UpdateWorkspaceRequestTypedDict(TypedDict): + default_image_model: NotRequired[Nullable[str]] + r"""Default image model for this workspace""" + default_provider_sort: NotRequired[Nullable[str]] + r"""Default provider sort preference (price, throughput, latency, exacto)""" + default_text_model: NotRequired[Nullable[str]] + r"""Default text model for this workspace""" + description: NotRequired[Nullable[str]] + r"""New description for the workspace""" + io_logging_api_key_ids: NotRequired[Nullable[List[int]]] + r"""Optional array of API key IDs to filter I/O logging""" + io_logging_sampling_rate: NotRequired[float] + r"""Sampling rate for I/O logging (0.0001-1)""" + is_data_discount_logging_enabled: NotRequired[bool] + r"""Whether data discount logging is enabled""" + is_observability_broadcast_enabled: NotRequired[bool] + r"""Whether broadcast is enabled""" + is_observability_io_logging_enabled: NotRequired[bool] + r"""Whether private logging is enabled""" + name: NotRequired[str] + r"""New name for the workspace""" + slug: NotRequired[str] + r"""New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)""" + + +class UpdateWorkspaceRequest(BaseModel): + default_image_model: OptionalNullable[str] = UNSET + r"""Default image model for this workspace""" + + default_provider_sort: OptionalNullable[str] = UNSET + r"""Default provider sort preference (price, throughput, latency, exacto)""" + + default_text_model: OptionalNullable[str] = UNSET + r"""Default text model for this workspace""" + + description: OptionalNullable[str] = UNSET + r"""New description for the workspace""" + + io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET + r"""Optional array of API key IDs to filter I/O logging""" + + io_logging_sampling_rate: Optional[float] = None + r"""Sampling rate for I/O logging (0.0001-1)""" + + is_data_discount_logging_enabled: Optional[bool] = None + r"""Whether data discount logging is enabled""" + + is_observability_broadcast_enabled: Optional[bool] = None + r"""Whether broadcast is enabled""" + + is_observability_io_logging_enabled: Optional[bool] = None + r"""Whether private logging is enabled""" + + name: Optional[str] = None + r"""New name for the workspace""" + + slug: Optional[str] = None + r"""New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "default_image_model", + "default_provider_sort", + "default_text_model", + "description", + "io_logging_api_key_ids", + "io_logging_sampling_rate", + "is_data_discount_logging_enabled", + "is_observability_broadcast_enabled", + "is_observability_io_logging_enabled", + "name", + "slug", + ] + nullable_fields = [ + "default_image_model", + "default_provider_sort", + "default_text_model", + "description", + "io_logging_api_key_ids", + ] + 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/updateworkspaceresponse.py b/src/openrouter/components/updateworkspaceresponse.py new file mode 100644 index 0000000..35d7ad3 --- /dev/null +++ b/src/openrouter/components/updateworkspaceresponse.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .workspace import Workspace, WorkspaceTypedDict +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class UpdateWorkspaceResponseTypedDict(TypedDict): + data: WorkspaceTypedDict + + +class UpdateWorkspaceResponse(BaseModel): + data: Workspace diff --git a/src/openrouter/components/usage.py b/src/openrouter/components/usage.py index 3ff415b..b140a02 100644 --- a/src/openrouter/components/usage.py +++ b/src/openrouter/components/usage.py @@ -29,13 +29,13 @@ class OutputTokensDetails(BaseModel): reasoning_tokens: int -class CostDetailsTypedDict(TypedDict): +class UsageCostDetailsTypedDict(TypedDict): upstream_inference_input_cost: float upstream_inference_output_cost: float upstream_inference_cost: NotRequired[Nullable[float]] -class CostDetails(BaseModel): +class UsageCostDetails(BaseModel): upstream_inference_input_cost: float upstream_inference_output_cost: float @@ -83,7 +83,7 @@ class UsageTypedDict(TypedDict): total_tokens: int cost: NotRequired[Nullable[float]] r"""Cost of the completion""" - cost_details: NotRequired[CostDetailsTypedDict] + cost_details: NotRequired[UsageCostDetailsTypedDict] is_byok: NotRequired[bool] r"""Whether a request was made using a Bring Your Own Key configuration""" @@ -104,7 +104,7 @@ class Usage(BaseModel): cost: OptionalNullable[float] = UNSET r"""Cost of the completion""" - cost_details: Optional[CostDetails] = None + cost_details: Optional[UsageCostDetails] = None is_byok: Optional[bool] = None r"""Whether a request was made using a Bring Your Own Key configuration""" diff --git a/src/openrouter/components/videogenerationrequest.py b/src/openrouter/components/videogenerationrequest.py index db54f12..a9bdef4 100644 --- a/src/openrouter/components/videogenerationrequest.py +++ b/src/openrouter/components/videogenerationrequest.py @@ -18,6 +18,8 @@ "1:1", "4:3", "3:4", + "3:2", + "2:3", "21:9", "9:21", ], @@ -44,6 +46,7 @@ class OptionsTypedDict(TypedDict): atoma: NotRequired[Dict[str, Nullable[Any]]] avian: NotRequired[Dict[str, Nullable[Any]]] azure: NotRequired[Dict[str, Nullable[Any]]] + baidu: NotRequired[Dict[str, Nullable[Any]]] baseten: NotRequired[Dict[str, Nullable[Any]]] black_forest_labs: NotRequired[Dict[str, Nullable[Any]]] byteplus: NotRequired[Dict[str, Nullable[Any]]] @@ -55,6 +58,7 @@ class OptionsTypedDict(TypedDict): cloudflare: NotRequired[Dict[str, Nullable[Any]]] cohere: NotRequired[Dict[str, Nullable[Any]]] crofai: NotRequired[Dict[str, Nullable[Any]]] + crucible: NotRequired[Dict[str, Nullable[Any]]] crusoe: NotRequired[Dict[str, Nullable[Any]]] deepinfra: NotRequired[Dict[str, Nullable[Any]]] deepseek: NotRequired[Dict[str, Nullable[Any]]] @@ -99,6 +103,7 @@ class OptionsTypedDict(TypedDict): morph: NotRequired[Dict[str, Nullable[Any]]] ncompass: NotRequired[Dict[str, Nullable[Any]]] nebius: NotRequired[Dict[str, Nullable[Any]]] + nex_agi: NotRequired[Dict[str, Nullable[Any]]] nextbit: NotRequired[Dict[str, Nullable[Any]]] nineteen: NotRequired[Dict[str, Nullable[Any]]] novita: NotRequired[Dict[str, Nullable[Any]]] @@ -107,8 +112,10 @@ class OptionsTypedDict(TypedDict): open_inference: NotRequired[Dict[str, Nullable[Any]]] openai: NotRequired[Dict[str, Nullable[Any]]] parasail: NotRequired[Dict[str, Nullable[Any]]] + perceptron: NotRequired[Dict[str, Nullable[Any]]] perplexity: NotRequired[Dict[str, Nullable[Any]]] phala: NotRequired[Dict[str, Nullable[Any]]] + poolside: NotRequired[Dict[str, Nullable[Any]]] recraft: NotRequired[Dict[str, Nullable[Any]]] recursal: NotRequired[Dict[str, Nullable[Any]]] reflection: NotRequired[Dict[str, Nullable[Any]]] @@ -182,6 +189,8 @@ class Options(BaseModel): azure: Optional[Dict[str, Nullable[Any]]] = None + baidu: Optional[Dict[str, Nullable[Any]]] = None + baseten: Optional[Dict[str, Nullable[Any]]] = None black_forest_labs: Annotated[ @@ -206,6 +215,8 @@ class Options(BaseModel): crofai: Optional[Dict[str, Nullable[Any]]] = None + crucible: Optional[Dict[str, Nullable[Any]]] = None + crusoe: Optional[Dict[str, Nullable[Any]]] = None deepinfra: Optional[Dict[str, Nullable[Any]]] = None @@ -312,6 +323,10 @@ class Options(BaseModel): nebius: Optional[Dict[str, Nullable[Any]]] = None + nex_agi: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="nex-agi") + ] = None + nextbit: Optional[Dict[str, Nullable[Any]]] = None nineteen: Optional[Dict[str, Nullable[Any]]] = None @@ -330,10 +345,14 @@ class Options(BaseModel): parasail: Optional[Dict[str, Nullable[Any]]] = None + perceptron: Optional[Dict[str, Nullable[Any]]] = None + perplexity: Optional[Dict[str, Nullable[Any]]] = None phala: Optional[Dict[str, Nullable[Any]]] = None + poolside: Optional[Dict[str, Nullable[Any]]] = None + recraft: Optional[Dict[str, Nullable[Any]]] = None recursal: Optional[Dict[str, Nullable[Any]]] = None @@ -395,18 +414,16 @@ class Options(BaseModel): ] = None -class ProviderTypedDict(TypedDict): +class VideoGenerationRequestProviderTypedDict(TypedDict): r"""Provider-specific passthrough configuration""" options: NotRequired[OptionsTypedDict] - r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.""" -class Provider(BaseModel): +class VideoGenerationRequestProvider(BaseModel): r"""Provider-specific passthrough configuration""" options: Optional[Options] = None - r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.""" Resolution = Union[ @@ -428,6 +445,8 @@ class VideoGenerationRequestTypedDict(TypedDict): prompt: str aspect_ratio: NotRequired[AspectRatio] r"""Aspect ratio of the generated video""" + callback_url: NotRequired[str] + r"""URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.""" duration: NotRequired[int] r"""Duration of the generated video in seconds""" frame_images: NotRequired[List[FrameImageTypedDict]] @@ -436,7 +455,7 @@ class VideoGenerationRequestTypedDict(TypedDict): r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.""" input_references: NotRequired[List[ContentPartImageTypedDict]] r"""Reference images to guide video generation""" - provider: NotRequired[ProviderTypedDict] + provider: NotRequired[VideoGenerationRequestProviderTypedDict] r"""Provider-specific passthrough configuration""" resolution: NotRequired[Resolution] r"""Resolution of the generated video""" @@ -456,6 +475,9 @@ class VideoGenerationRequest(BaseModel): ] = None r"""Aspect ratio of the generated video""" + callback_url: Optional[str] = None + r"""URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.""" + duration: Optional[int] = None r"""Duration of the generated video in seconds""" @@ -468,7 +490,7 @@ class VideoGenerationRequest(BaseModel): input_references: Optional[List[ContentPartImage]] = None r"""Reference images to guide video generation""" - provider: Optional[Provider] = None + provider: Optional[VideoGenerationRequestProvider] = None r"""Provider-specific passthrough configuration""" resolution: Annotated[ diff --git a/src/openrouter/components/videomodel.py b/src/openrouter/components/videomodel.py index f313821..04170e1 100644 --- a/src/openrouter/components/videomodel.py +++ b/src/openrouter/components/videomodel.py @@ -23,6 +23,8 @@ "1:1", "4:3", "3:4", + "3:2", + "2:3", "21:9", "9:21", ], @@ -56,30 +58,38 @@ Literal[ "480x480", "480x640", + "480x720", "480x854", "480x1120", "640x480", + "720x480", "720x720", "720x960", + "720x1080", "720x1280", "720x1680", "854x480", "960x720", + "1080x720", "1080x1080", "1080x1440", + "1080x1620", "1080x1920", "1080x2520", "1120x480", "1280x720", "1440x1080", + "1620x1080", "1680x720", "1920x1080", "2160x2160", "2160x2880", + "2160x3240", "2160x3840", "2160x5040", "2520x1080", "2880x2160", + "3240x2160", "3840x2160", "5040x2160", ], diff --git a/src/openrouter/components/webfetchengineenum.py b/src/openrouter/components/webfetchengineenum.py new file mode 100644 index 0000000..d5a9a26 --- /dev/null +++ b/src/openrouter/components/webfetchengineenum.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +WebFetchEngineEnum = Union[ + Literal[ + "auto", + "native", + "openrouter", + "firecrawl", + "exa", + ], + UnrecognizedStr, +] +r"""Which fetch engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in fetch. \"exa\" uses Exa Contents API. \"openrouter\" uses direct HTTP fetch. \"firecrawl\" uses Firecrawl scrape (requires BYOK).""" diff --git a/src/openrouter/components/webfetchservertool.py b/src/openrouter/components/webfetchservertool.py new file mode 100644 index 0000000..cbd34b3 --- /dev/null +++ b/src/openrouter/components/webfetchservertool.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .webfetchservertoolconfig import ( + WebFetchServerToolConfig, + WebFetchServerToolConfigTypedDict, +) +from openrouter.types import BaseModel +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +WebFetchServerToolType = Literal["openrouter:web_fetch",] + + +class WebFetchServerToolTypedDict(TypedDict): + r"""OpenRouter built-in server tool: fetches full content from a URL (web page or PDF)""" + + type: WebFetchServerToolType + parameters: NotRequired[WebFetchServerToolConfigTypedDict] + r"""Configuration for the openrouter:web_fetch server tool""" + + +class WebFetchServerTool(BaseModel): + r"""OpenRouter built-in server tool: fetches full content from a URL (web page or PDF)""" + + type: WebFetchServerToolType + + parameters: Optional[WebFetchServerToolConfig] = None + r"""Configuration for the openrouter:web_fetch server tool""" diff --git a/src/openrouter/components/webfetchservertoolconfig.py b/src/openrouter/components/webfetchservertoolconfig.py new file mode 100644 index 0000000..4dae2c4 --- /dev/null +++ b/src/openrouter/components/webfetchservertoolconfig.py @@ -0,0 +1,45 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .webfetchengineenum import WebFetchEngineEnum +from openrouter.types import BaseModel +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WebFetchServerToolConfigTypedDict(TypedDict): + r"""Configuration for the openrouter:web_fetch server tool""" + + allowed_domains: NotRequired[List[str]] + r"""Only fetch from these domains.""" + blocked_domains: NotRequired[List[str]] + r"""Never fetch from these domains.""" + engine: NotRequired[WebFetchEngineEnum] + r"""Which fetch engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in fetch. \"exa\" uses Exa Contents API. \"openrouter\" uses direct HTTP fetch. \"firecrawl\" uses Firecrawl scrape (requires BYOK).""" + max_content_tokens: NotRequired[int] + r"""Maximum content length in approximate tokens. Content exceeding this limit is truncated.""" + max_uses: NotRequired[int] + r"""Maximum number of web fetches per request. Once exceeded, the tool returns an error.""" + + +class WebFetchServerToolConfig(BaseModel): + r"""Configuration for the openrouter:web_fetch server tool""" + + allowed_domains: Optional[List[str]] = None + r"""Only fetch from these domains.""" + + blocked_domains: Optional[List[str]] = None + r"""Never fetch from these domains.""" + + engine: Annotated[ + Optional[WebFetchEngineEnum], PlainValidator(validate_open_enum(False)) + ] = None + r"""Which fetch engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in fetch. \"exa\" uses Exa Contents API. \"openrouter\" uses direct HTTP fetch. \"firecrawl\" uses Firecrawl scrape (requires BYOK).""" + + max_content_tokens: Optional[int] = None + r"""Maximum content length in approximate tokens. Content exceeding this limit is truncated.""" + + max_uses: Optional[int] = None + r"""Maximum number of web fetches per request. Once exceeded, the tool returns an error.""" diff --git a/src/openrouter/components/websearchconfig.py b/src/openrouter/components/websearchconfig.py index dfe9115..610465d 100644 --- a/src/openrouter/components/websearchconfig.py +++ b/src/openrouter/components/websearchconfig.py @@ -16,24 +16,24 @@ class WebSearchConfigTypedDict(TypedDict): allowed_domains: NotRequired[List[str]] - r"""Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity.""" + r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.""" engine: NotRequired[WebSearchEngineEnum] r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" excluded_domains: NotRequired[List[str]] - r"""Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity.""" + r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.""" max_results: NotRequired[int] r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" max_total_results: NotRequired[int] - r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.""" + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.""" search_context_size: NotRequired[SearchQualityLevel] - r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.""" user_location: NotRequired[WebSearchUserLocationServerToolTypedDict] r"""Approximate user location for location-biased results.""" class WebSearchConfig(BaseModel): allowed_domains: Optional[List[str]] = None - r"""Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity.""" + r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.""" engine: Annotated[ Optional[WebSearchEngineEnum], PlainValidator(validate_open_enum(False)) @@ -41,18 +41,18 @@ class WebSearchConfig(BaseModel): r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" excluded_domains: Optional[List[str]] = None - r"""Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity.""" + r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.""" max_results: Optional[int] = None r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" max_total_results: Optional[int] = None - r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.""" + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.""" search_context_size: Annotated[ Optional[SearchQualityLevel], PlainValidator(validate_open_enum(False)) ] = None - r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.""" user_location: Optional[WebSearchUserLocationServerTool] = None r"""Approximate user location for location-biased results.""" diff --git a/src/openrouter/components/websearchplugin.py b/src/openrouter/components/websearchplugin.py index 93c8f70..3c8e46d 100644 --- a/src/openrouter/components/websearchplugin.py +++ b/src/openrouter/components/websearchplugin.py @@ -2,8 +2,15 @@ from __future__ import annotations from .websearchengine import WebSearchEngine -from openrouter.types import BaseModel +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 @@ -12,6 +19,63 @@ WebSearchPluginID = Literal["web",] +WebSearchPluginType = Literal["approximate",] + + +class UserLocationTypedDict(TypedDict): + r"""Approximate user location for location-biased search results. Passed through to native providers that support it (e.g. Anthropic).""" + + type: WebSearchPluginType + city: NotRequired[Nullable[str]] + country: NotRequired[Nullable[str]] + region: NotRequired[Nullable[str]] + timezone: NotRequired[Nullable[str]] + + +class UserLocation(BaseModel): + r"""Approximate user location for location-biased search results. Passed through to native providers that support it (e.g. Anthropic).""" + + type: WebSearchPluginType + + 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 + + class WebSearchPluginTypedDict(TypedDict): id: WebSearchPluginID enabled: NotRequired[bool] @@ -23,7 +87,10 @@ class WebSearchPluginTypedDict(TypedDict): 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\").""" max_results: NotRequired[int] + max_uses: NotRequired[int] + r"""Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic).""" search_prompt: NotRequired[str] + user_location: NotRequired[Nullable[UserLocationTypedDict]] class WebSearchPlugin(BaseModel): @@ -45,4 +112,48 @@ class WebSearchPlugin(BaseModel): max_results: Optional[int] = None + max_uses: Optional[int] = None + r"""Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic).""" + search_prompt: Optional[str] = None + + user_location: OptionalNullable[UserLocation] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "enabled", + "engine", + "exclude_domains", + "include_domains", + "max_results", + "max_uses", + "search_prompt", + "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/websearchservertool_openrouter.py b/src/openrouter/components/websearchservertool_openrouter.py index 29b8262..c5717ed 100644 --- a/src/openrouter/components/websearchservertool_openrouter.py +++ b/src/openrouter/components/websearchservertool_openrouter.py @@ -1,26 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .websearchservertoolconfig import ( + WebSearchServerToolConfig, + WebSearchServerToolConfigTypedDict, +) from openrouter.types import BaseModel from typing import Literal, Optional from typing_extensions import NotRequired, TypedDict -class ParametersTypedDict(TypedDict): - max_results: NotRequired[int] - r"""Maximum number of search results to return per search call. Defaults to 5.""" - max_total_results: NotRequired[int] - r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results.""" - - -class Parameters(BaseModel): - max_results: Optional[int] = None - r"""Maximum number of search results to return per search call. Defaults to 5.""" - - max_total_results: Optional[int] = None - r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results.""" - - WebSearchServerToolOpenRouterType = Literal["openrouter:web_search",] @@ -28,7 +17,8 @@ class WebSearchServerToolOpenRouterTypedDict(TypedDict): r"""OpenRouter built-in server tool: searches the web for current information""" type: WebSearchServerToolOpenRouterType - parameters: NotRequired[ParametersTypedDict] + parameters: NotRequired[WebSearchServerToolConfigTypedDict] + r"""Configuration for the openrouter:web_search server tool""" class WebSearchServerToolOpenRouter(BaseModel): @@ -36,4 +26,5 @@ class WebSearchServerToolOpenRouter(BaseModel): type: WebSearchServerToolOpenRouterType - parameters: Optional[Parameters] = None + parameters: Optional[WebSearchServerToolConfig] = None + r"""Configuration for the openrouter:web_search server tool""" diff --git a/src/openrouter/components/websearchservertoolconfig.py b/src/openrouter/components/websearchservertoolconfig.py new file mode 100644 index 0000000..754bb61 --- /dev/null +++ b/src/openrouter/components/websearchservertoolconfig.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .searchqualitylevel import SearchQualityLevel +from .websearchengineenum import WebSearchEngineEnum +from .websearchuserlocationservertool import ( + WebSearchUserLocationServerTool, + WebSearchUserLocationServerToolTypedDict, +) +from openrouter.types import BaseModel +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WebSearchServerToolConfigTypedDict(TypedDict): + r"""Configuration for the openrouter:web_search server tool""" + + allowed_domains: NotRequired[List[str]] + r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.""" + engine: NotRequired[WebSearchEngineEnum] + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + excluded_domains: NotRequired[List[str]] + r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.""" + max_results: NotRequired[int] + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + max_total_results: NotRequired[int] + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.""" + search_context_size: NotRequired[SearchQualityLevel] + r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.""" + user_location: NotRequired[WebSearchUserLocationServerToolTypedDict] + r"""Approximate user location for location-biased results.""" + + +class WebSearchServerToolConfig(BaseModel): + r"""Configuration for the openrouter:web_search server tool""" + + allowed_domains: Optional[List[str]] = None + r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.""" + + engine: Annotated[ + Optional[WebSearchEngineEnum], PlainValidator(validate_open_enum(False)) + ] = None + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + excluded_domains: Optional[List[str]] = None + r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.""" + + max_results: Optional[int] = None + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + + max_total_results: Optional[int] = None + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.""" + + search_context_size: Annotated[ + Optional[SearchQualityLevel], PlainValidator(validate_open_enum(False)) + ] = None + r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.""" + + user_location: Optional[WebSearchUserLocationServerTool] = None + r"""Approximate user location for location-biased results.""" diff --git a/src/openrouter/components/websearchuserlocationservertool.py b/src/openrouter/components/websearchuserlocationservertool.py index a716b87..bf4bb70 100644 --- a/src/openrouter/components/websearchuserlocationservertool.py +++ b/src/openrouter/components/websearchuserlocationservertool.py @@ -1,7 +1,14 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from openrouter.types import BaseModel +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 @@ -12,22 +19,52 @@ class WebSearchUserLocationServerToolTypedDict(TypedDict): r"""Approximate user location for location-biased results.""" - city: NotRequired[str] - country: NotRequired[str] - region: NotRequired[str] - timezone: NotRequired[str] + city: NotRequired[Nullable[str]] + country: NotRequired[Nullable[str]] + region: NotRequired[Nullable[str]] + timezone: NotRequired[Nullable[str]] type: NotRequired[WebSearchUserLocationServerToolType] class WebSearchUserLocationServerTool(BaseModel): r"""Approximate user location for location-biased results.""" - city: Optional[str] = None + city: OptionalNullable[str] = UNSET - country: Optional[str] = None + country: OptionalNullable[str] = UNSET - region: Optional[str] = None + region: OptionalNullable[str] = UNSET - timezone: Optional[str] = None + timezone: OptionalNullable[str] = UNSET type: Optional[WebSearchUserLocationServerToolType] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["city", "country", "region", "timezone", "type"] + 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/workspace.py b/src/openrouter/components/workspace.py new file mode 100644 index 0000000..583db0c --- /dev/null +++ b/src/openrouter/components/workspace.py @@ -0,0 +1,125 @@ +"""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 List +from typing_extensions import TypedDict + + +class WorkspaceTypedDict(TypedDict): + created_at: str + r"""ISO 8601 timestamp of when the workspace was created""" + created_by: Nullable[str] + r"""User ID of the workspace creator""" + default_image_model: Nullable[str] + r"""Default image model for this workspace""" + default_provider_sort: Nullable[str] + r"""Default provider sort preference (price, throughput, latency, exacto)""" + default_text_model: Nullable[str] + r"""Default text model for this workspace""" + description: Nullable[str] + r"""Description of the workspace""" + id: str + r"""Unique identifier for the workspace""" + io_logging_api_key_ids: Nullable[List[int]] + r"""Optional array of API key IDs to filter I/O logging. Null means all keys are logged.""" + io_logging_sampling_rate: float + r"""Sampling rate for I/O logging (0.0001-1). 1 means 100% of requests are logged.""" + is_data_discount_logging_enabled: bool + r"""Whether data discount logging is enabled for this workspace""" + is_observability_broadcast_enabled: bool + r"""Whether broadcast is enabled for this workspace""" + is_observability_io_logging_enabled: bool + r"""Whether private logging is enabled for this workspace""" + name: str + r"""Name of the workspace""" + slug: str + r"""URL-friendly slug for the workspace""" + updated_at: Nullable[str] + r"""ISO 8601 timestamp of when the workspace was last updated""" + + +class Workspace(BaseModel): + created_at: str + r"""ISO 8601 timestamp of when the workspace was created""" + + created_by: Nullable[str] + r"""User ID of the workspace creator""" + + default_image_model: Nullable[str] + r"""Default image model for this workspace""" + + default_provider_sort: Nullable[str] + r"""Default provider sort preference (price, throughput, latency, exacto)""" + + default_text_model: Nullable[str] + r"""Default text model for this workspace""" + + description: Nullable[str] + r"""Description of the workspace""" + + id: str + r"""Unique identifier for the workspace""" + + io_logging_api_key_ids: Nullable[List[int]] + r"""Optional array of API key IDs to filter I/O logging. Null means all keys are logged.""" + + io_logging_sampling_rate: float + r"""Sampling rate for I/O logging (0.0001-1). 1 means 100% of requests are logged.""" + + is_data_discount_logging_enabled: bool + r"""Whether data discount logging is enabled for this workspace""" + + is_observability_broadcast_enabled: bool + r"""Whether broadcast is enabled for this workspace""" + + is_observability_io_logging_enabled: bool + r"""Whether private logging is enabled for this workspace""" + + name: str + r"""Name of the workspace""" + + slug: str + r"""URL-friendly slug for the workspace""" + + updated_at: Nullable[str] + r"""ISO 8601 timestamp of when the workspace was last updated""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = [ + "created_by", + "default_image_model", + "default_provider_sort", + "default_text_model", + "description", + "io_logging_api_key_ids", + "updated_at", + ] + 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/workspacemember.py b/src/openrouter/components/workspacemember.py new file mode 100644 index 0000000..9ece878 --- /dev/null +++ b/src/openrouter/components/workspacemember.py @@ -0,0 +1,48 @@ +"""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 + + +WorkspaceMemberRole = Union[ + Literal[ + "admin", + "member", + ], + UnrecognizedStr, +] +r"""Role of the member in the workspace""" + + +class WorkspaceMemberTypedDict(TypedDict): + created_at: str + r"""ISO 8601 timestamp of when the membership was created""" + id: str + r"""Unique identifier for the workspace membership""" + role: WorkspaceMemberRole + r"""Role of the member in the workspace""" + user_id: str + r"""Clerk user ID of the member""" + workspace_id: str + r"""ID of the workspace""" + + +class WorkspaceMember(BaseModel): + created_at: str + r"""ISO 8601 timestamp of when the membership was created""" + + id: str + r"""Unique identifier for the workspace membership""" + + role: Annotated[WorkspaceMemberRole, PlainValidator(validate_open_enum(False))] + r"""Role of the member in the workspace""" + + user_id: str + r"""Clerk user ID of the member""" + + workspace_id: str + r"""ID of the workspace""" diff --git a/src/openrouter/errors/badgatewayresponse_error.py b/src/openrouter/errors/badgatewayresponse_error.py index b2138fd..28ce1d4 100644 --- a/src/openrouter/errors/badgatewayresponse_error.py +++ b/src/openrouter/errors/badgatewayresponse_error.py @@ -7,13 +7,14 @@ badgatewayresponseerrordata as components_badgatewayresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class BadGatewayResponseErrorData(BaseModel): error: components_badgatewayresponseerrordata.BadGatewayResponseErrorData r"""Error data for BadGatewayResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/badrequestresponse_error.py b/src/openrouter/errors/badrequestresponse_error.py index eb34f26..514a272 100644 --- a/src/openrouter/errors/badrequestresponse_error.py +++ b/src/openrouter/errors/badrequestresponse_error.py @@ -7,13 +7,14 @@ badrequestresponseerrordata as components_badrequestresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class BadRequestResponseErrorData(BaseModel): error: components_badrequestresponseerrordata.BadRequestResponseErrorData r"""Error data for BadRequestResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/conflictresponse_error.py b/src/openrouter/errors/conflictresponse_error.py index 4c23784..434f65c 100644 --- a/src/openrouter/errors/conflictresponse_error.py +++ b/src/openrouter/errors/conflictresponse_error.py @@ -7,13 +7,14 @@ conflictresponseerrordata as components_conflictresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class ConflictResponseErrorData(BaseModel): error: components_conflictresponseerrordata.ConflictResponseErrorData r"""Error data for ConflictResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/edgenetworktimeoutresponse_error.py b/src/openrouter/errors/edgenetworktimeoutresponse_error.py index c2881a5..4ba05c4 100644 --- a/src/openrouter/errors/edgenetworktimeoutresponse_error.py +++ b/src/openrouter/errors/edgenetworktimeoutresponse_error.py @@ -7,13 +7,14 @@ edgenetworktimeoutresponseerrordata as components_edgenetworktimeoutresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class EdgeNetworkTimeoutResponseErrorData(BaseModel): error: components_edgenetworktimeoutresponseerrordata.EdgeNetworkTimeoutResponseErrorData r"""Error data for EdgeNetworkTimeoutResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/forbiddenresponse_error.py b/src/openrouter/errors/forbiddenresponse_error.py index f9fd3e5..f6bd181 100644 --- a/src/openrouter/errors/forbiddenresponse_error.py +++ b/src/openrouter/errors/forbiddenresponse_error.py @@ -7,13 +7,14 @@ forbiddenresponseerrordata as components_forbiddenresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class ForbiddenResponseErrorData(BaseModel): error: components_forbiddenresponseerrordata.ForbiddenResponseErrorData r"""Error data for ForbiddenResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/internalserverresponse_error.py b/src/openrouter/errors/internalserverresponse_error.py index 2d8be82..207c80c 100644 --- a/src/openrouter/errors/internalserverresponse_error.py +++ b/src/openrouter/errors/internalserverresponse_error.py @@ -7,13 +7,14 @@ internalserverresponseerrordata as components_internalserverresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class InternalServerResponseErrorData(BaseModel): error: components_internalserverresponseerrordata.InternalServerResponseErrorData r"""Error data for InternalServerResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/notfoundresponse_error.py b/src/openrouter/errors/notfoundresponse_error.py index 99c3f9f..a79ff3c 100644 --- a/src/openrouter/errors/notfoundresponse_error.py +++ b/src/openrouter/errors/notfoundresponse_error.py @@ -7,13 +7,14 @@ notfoundresponseerrordata as components_notfoundresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class NotFoundResponseErrorData(BaseModel): error: components_notfoundresponseerrordata.NotFoundResponseErrorData r"""Error data for NotFoundResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/payloadtoolargeresponse_error.py b/src/openrouter/errors/payloadtoolargeresponse_error.py index 8b9daa2..2f11814 100644 --- a/src/openrouter/errors/payloadtoolargeresponse_error.py +++ b/src/openrouter/errors/payloadtoolargeresponse_error.py @@ -7,13 +7,14 @@ payloadtoolargeresponseerrordata as components_payloadtoolargeresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class PayloadTooLargeResponseErrorData(BaseModel): error: components_payloadtoolargeresponseerrordata.PayloadTooLargeResponseErrorData r"""Error data for PayloadTooLargeResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/paymentrequiredresponse_error.py b/src/openrouter/errors/paymentrequiredresponse_error.py index fe3b3c2..1bd7e6b 100644 --- a/src/openrouter/errors/paymentrequiredresponse_error.py +++ b/src/openrouter/errors/paymentrequiredresponse_error.py @@ -7,13 +7,14 @@ paymentrequiredresponseerrordata as components_paymentrequiredresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class PaymentRequiredResponseErrorData(BaseModel): error: components_paymentrequiredresponseerrordata.PaymentRequiredResponseErrorData r"""Error data for PaymentRequiredResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/provideroverloadedresponse_error.py b/src/openrouter/errors/provideroverloadedresponse_error.py index bdb7061..4594e43 100644 --- a/src/openrouter/errors/provideroverloadedresponse_error.py +++ b/src/openrouter/errors/provideroverloadedresponse_error.py @@ -7,13 +7,14 @@ provideroverloadedresponseerrordata as components_provideroverloadedresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class ProviderOverloadedResponseErrorData(BaseModel): error: components_provideroverloadedresponseerrordata.ProviderOverloadedResponseErrorData r"""Error data for ProviderOverloadedResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/requesttimeoutresponse_error.py b/src/openrouter/errors/requesttimeoutresponse_error.py index 4937892..eb403d9 100644 --- a/src/openrouter/errors/requesttimeoutresponse_error.py +++ b/src/openrouter/errors/requesttimeoutresponse_error.py @@ -7,13 +7,14 @@ requesttimeoutresponseerrordata as components_requesttimeoutresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class RequestTimeoutResponseErrorData(BaseModel): error: components_requesttimeoutresponseerrordata.RequestTimeoutResponseErrorData r"""Error data for RequestTimeoutResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/serviceunavailableresponse_error.py b/src/openrouter/errors/serviceunavailableresponse_error.py index b94cfc2..0c9c74b 100644 --- a/src/openrouter/errors/serviceunavailableresponse_error.py +++ b/src/openrouter/errors/serviceunavailableresponse_error.py @@ -7,13 +7,14 @@ serviceunavailableresponseerrordata as components_serviceunavailableresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class ServiceUnavailableResponseErrorData(BaseModel): error: components_serviceunavailableresponseerrordata.ServiceUnavailableResponseErrorData r"""Error data for ServiceUnavailableResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/toomanyrequestsresponse_error.py b/src/openrouter/errors/toomanyrequestsresponse_error.py index bdf7914..fbbad16 100644 --- a/src/openrouter/errors/toomanyrequestsresponse_error.py +++ b/src/openrouter/errors/toomanyrequestsresponse_error.py @@ -7,13 +7,14 @@ toomanyrequestsresponseerrordata as components_toomanyrequestsresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class TooManyRequestsResponseErrorData(BaseModel): error: components_toomanyrequestsresponseerrordata.TooManyRequestsResponseErrorData r"""Error data for TooManyRequestsResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/unauthorizedresponse_error.py b/src/openrouter/errors/unauthorizedresponse_error.py index 7f9c5a6..f70ea1c 100644 --- a/src/openrouter/errors/unauthorizedresponse_error.py +++ b/src/openrouter/errors/unauthorizedresponse_error.py @@ -7,13 +7,14 @@ unauthorizedresponseerrordata as components_unauthorizedresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class UnauthorizedResponseErrorData(BaseModel): error: components_unauthorizedresponseerrordata.UnauthorizedResponseErrorData r"""Error data for UnauthorizedResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/unprocessableentityresponse_error.py b/src/openrouter/errors/unprocessableentityresponse_error.py index 7304f75..d858f3b 100644 --- a/src/openrouter/errors/unprocessableentityresponse_error.py +++ b/src/openrouter/errors/unprocessableentityresponse_error.py @@ -7,13 +7,14 @@ unprocessableentityresponseerrordata as components_unprocessableentityresponseerrordata, ) from openrouter.errors import OpenRouterError -from openrouter.types import BaseModel, OptionalNullable, UNSET -from typing import Optional +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET +from typing import Any, Dict, Optional class UnprocessableEntityResponseErrorData(BaseModel): error: components_unprocessableentityresponseerrordata.UnprocessableEntityResponseErrorData r"""Error data for UnprocessableEntityResponse""" + openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/generations.py b/src/openrouter/generations.py index fddcce7..409e169 100644 --- a/src/openrouter/generations.py +++ b/src/openrouter/generations.py @@ -23,7 +23,7 @@ def get_generation( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> operations.GetGenerationResponse: + ) -> components.GenerationResponse: r"""Get request & usage metadata for a generation :param id: The generation ID @@ -118,7 +118,7 @@ def get_generation( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(operations.GetGenerationResponse, http_res) + return unmarshal_json_response(components.GenerationResponse, http_res) if utils.match_response(http_res, "401", "application/json"): response_data = unmarshal_json_response( errors.UnauthorizedResponseErrorData, http_res @@ -183,7 +183,7 @@ async def get_generation_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> operations.GetGenerationResponse: + ) -> components.GenerationResponse: r"""Get request & usage metadata for a generation :param id: The generation ID @@ -278,7 +278,7 @@ async def get_generation_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(operations.GetGenerationResponse, http_res) + return unmarshal_json_response(components.GenerationResponse, http_res) if utils.match_response(http_res, "401", "application/json"): response_data = unmarshal_json_response( errors.UnauthorizedResponseErrorData, http_res @@ -331,3 +331,327 @@ async def get_generation_async( ) raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + def list_generation_content( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.GenerationContentResponse: + r"""Get stored prompt and completion content for a generation + + :param id: The generation 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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.ListGenerationContentRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + ) + + req = self._build_request( + method="GET", + path="/generation/content", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.ListGenerationContentGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="listGenerationContent", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=[ + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "524", + "529", + "5XX", + ], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + components.GenerationContentResponse, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "502", "application/json"): + response_data = unmarshal_json_response( + errors.BadGatewayResponseErrorData, http_res + ) + raise errors.BadGatewayResponseError(response_data, http_res) + if utils.match_response(http_res, "524", "application/json"): + response_data = unmarshal_json_response( + errors.EdgeNetworkTimeoutResponseErrorData, http_res + ) + raise errors.EdgeNetworkTimeoutResponseError(response_data, http_res) + if utils.match_response(http_res, "529", "application/json"): + response_data = unmarshal_json_response( + errors.ProviderOverloadedResponseErrorData, http_res + ) + raise errors.ProviderOverloadedResponseError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def list_generation_content_async( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.GenerationContentResponse: + r"""Get stored prompt and completion content for a generation + + :param id: The generation 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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.ListGenerationContentRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + ) + + req = self._build_request_async( + method="GET", + path="/generation/content", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.ListGenerationContentGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="listGenerationContent", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=[ + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "524", + "529", + "5XX", + ], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + components.GenerationContentResponse, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "502", "application/json"): + response_data = unmarshal_json_response( + errors.BadGatewayResponseErrorData, http_res + ) + raise errors.BadGatewayResponseError(response_data, http_res) + if utils.match_response(http_res, "524", "application/json"): + response_data = unmarshal_json_response( + errors.EdgeNetworkTimeoutResponseErrorData, http_res + ) + raise errors.EdgeNetworkTimeoutResponseError(response_data, http_res) + if utils.match_response(http_res, "529", "application/json"): + response_data = unmarshal_json_response( + errors.ProviderOverloadedResponseErrorData, http_res + ) + raise errors.ProviderOverloadedResponseError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) diff --git a/src/openrouter/guardrails.py b/src/openrouter/guardrails.py index 7d1038d..0ac9846 100644 --- a/src/openrouter/guardrails.py +++ b/src/openrouter/guardrails.py @@ -21,6 +21,7 @@ def list( x_open_router_categories: Optional[str] = None, offset: Optional[int] = None, limit: Optional[int] = None, + workspace_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -39,6 +40,7 @@ def list( :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) + :param workspace_id: Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -60,6 +62,7 @@ def list( x_open_router_categories=x_open_router_categories, offset=offset, limit=limit, + workspace_id=workspace_id, ) req = self._build_request( @@ -132,6 +135,7 @@ def next_func() -> Optional[operations.ListGuardrailsResponse]: x_open_router_categories=x_open_router_categories, offset=next_offset, limit=limit, + workspace_id=workspace_id, retries=retries, ) @@ -174,6 +178,7 @@ async def list_async( x_open_router_categories: Optional[str] = None, offset: Optional[int] = None, limit: Optional[int] = None, + workspace_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -192,6 +197,7 @@ async def list_async( :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) + :param workspace_id: Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -213,6 +219,7 @@ async def list_async( x_open_router_categories=x_open_router_categories, offset=offset, limit=limit, + workspace_id=workspace_id, ) req = self._build_request_async( @@ -288,6 +295,7 @@ async def empty_result(): x_open_router_categories=x_open_router_categories, offset=next_offset, limit=limit, + workspace_id=workspace_id, retries=retries, ) @@ -331,12 +339,29 @@ def create( x_open_router_categories: Optional[str] = None, allowed_models: OptionalNullable[List[str]] = UNSET, allowed_providers: OptionalNullable[List[str]] = UNSET, + content_filter_builtins: OptionalNullable[ + Union[ + List[components.ContentFilterBuiltinEntry], + List[components.ContentFilterBuiltinEntryTypedDict], + ] + ] = UNSET, + content_filters: OptionalNullable[ + Union[ + List[components.ContentFilterEntry], + List[components.ContentFilterEntryTypedDict], + ] + ] = UNSET, description: OptionalNullable[str] = UNSET, enforce_zdr: OptionalNullable[bool] = UNSET, + enforce_zdr_anthropic: OptionalNullable[bool] = UNSET, + enforce_zdr_google: OptionalNullable[bool] = UNSET, + enforce_zdr_openai: OptionalNullable[bool] = UNSET, + enforce_zdr_other: OptionalNullable[bool] = UNSET, ignored_models: OptionalNullable[List[str]] = UNSET, ignored_providers: OptionalNullable[List[str]] = UNSET, limit_usd: OptionalNullable[float] = UNSET, reset_interval: OptionalNullable[components.GuardrailInterval] = UNSET, + workspace_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -356,12 +381,19 @@ def create( :param allowed_models: Array of model identifiers (slug or canonical_slug accepted) :param allowed_providers: List of allowed provider IDs + :param content_filter_builtins: Builtin content filters to apply. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only. + :param content_filters: Custom regex content filters to apply to request messages :param description: Description of the guardrail - :param enforce_zdr: Whether to enforce zero data retention + :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. + :param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. :param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted) :param ignored_providers: List of provider IDs to exclude from routing :param limit_usd: Spending limit in USD :param reset_interval: Interval at which the limit resets (daily, weekly, monthly) + :param workspace_id: The workspace to create the guardrail in. Defaults to the default workspace if not provided. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -384,13 +416,26 @@ def create( create_guardrail_request=components.CreateGuardrailRequest( allowed_models=allowed_models, allowed_providers=allowed_providers, + content_filter_builtins=utils.get_pydantic_model( + content_filter_builtins, + OptionalNullable[List[components.ContentFilterBuiltinEntry]], + ), + content_filters=utils.get_pydantic_model( + content_filters, + OptionalNullable[List[components.ContentFilterEntry]], + ), description=description, enforce_zdr=enforce_zdr, + enforce_zdr_anthropic=enforce_zdr_anthropic, + enforce_zdr_google=enforce_zdr_google, + enforce_zdr_openai=enforce_zdr_openai, + enforce_zdr_other=enforce_zdr_other, ignored_models=ignored_models, ignored_providers=ignored_providers, limit_usd=limit_usd, name=name, reset_interval=reset_interval, + workspace_id=workspace_id, ), ) @@ -446,7 +491,7 @@ def create( ), ), request=req, - error_status_codes=["400", "401", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -463,6 +508,11 @@ def create( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response( errors.InternalServerResponseErrorData, http_res @@ -490,12 +540,29 @@ async def create_async( x_open_router_categories: Optional[str] = None, allowed_models: OptionalNullable[List[str]] = UNSET, allowed_providers: OptionalNullable[List[str]] = UNSET, + content_filter_builtins: OptionalNullable[ + Union[ + List[components.ContentFilterBuiltinEntry], + List[components.ContentFilterBuiltinEntryTypedDict], + ] + ] = UNSET, + content_filters: OptionalNullable[ + Union[ + List[components.ContentFilterEntry], + List[components.ContentFilterEntryTypedDict], + ] + ] = UNSET, description: OptionalNullable[str] = UNSET, enforce_zdr: OptionalNullable[bool] = UNSET, + enforce_zdr_anthropic: OptionalNullable[bool] = UNSET, + enforce_zdr_google: OptionalNullable[bool] = UNSET, + enforce_zdr_openai: OptionalNullable[bool] = UNSET, + enforce_zdr_other: OptionalNullable[bool] = UNSET, ignored_models: OptionalNullable[List[str]] = UNSET, ignored_providers: OptionalNullable[List[str]] = UNSET, limit_usd: OptionalNullable[float] = UNSET, reset_interval: OptionalNullable[components.GuardrailInterval] = UNSET, + workspace_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -515,12 +582,19 @@ async def create_async( :param allowed_models: Array of model identifiers (slug or canonical_slug accepted) :param allowed_providers: List of allowed provider IDs + :param content_filter_builtins: Builtin content filters to apply. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only. + :param content_filters: Custom regex content filters to apply to request messages :param description: Description of the guardrail - :param enforce_zdr: Whether to enforce zero data retention + :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. + :param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. :param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted) :param ignored_providers: List of provider IDs to exclude from routing :param limit_usd: Spending limit in USD :param reset_interval: Interval at which the limit resets (daily, weekly, monthly) + :param workspace_id: The workspace to create the guardrail in. Defaults to the default workspace if not provided. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -543,13 +617,26 @@ async def create_async( create_guardrail_request=components.CreateGuardrailRequest( allowed_models=allowed_models, allowed_providers=allowed_providers, + content_filter_builtins=utils.get_pydantic_model( + content_filter_builtins, + OptionalNullable[List[components.ContentFilterBuiltinEntry]], + ), + content_filters=utils.get_pydantic_model( + content_filters, + OptionalNullable[List[components.ContentFilterEntry]], + ), description=description, enforce_zdr=enforce_zdr, + enforce_zdr_anthropic=enforce_zdr_anthropic, + enforce_zdr_google=enforce_zdr_google, + enforce_zdr_openai=enforce_zdr_openai, + enforce_zdr_other=enforce_zdr_other, ignored_models=ignored_models, ignored_providers=ignored_providers, limit_usd=limit_usd, name=name, reset_interval=reset_interval, + workspace_id=workspace_id, ), ) @@ -605,7 +692,7 @@ async def create_async( ), ), request=req, - error_status_codes=["400", "401", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -622,6 +709,11 @@ async def create_async( errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response( errors.InternalServerResponseErrorData, http_res @@ -1153,8 +1245,24 @@ def update( x_open_router_categories: Optional[str] = None, allowed_models: OptionalNullable[List[str]] = UNSET, allowed_providers: OptionalNullable[List[str]] = UNSET, + content_filter_builtins: OptionalNullable[ + Union[ + List[components.ContentFilterBuiltinEntry], + List[components.ContentFilterBuiltinEntryTypedDict], + ] + ] = UNSET, + content_filters: OptionalNullable[ + Union[ + List[components.ContentFilterEntry], + List[components.ContentFilterEntryTypedDict], + ] + ] = UNSET, description: OptionalNullable[str] = UNSET, enforce_zdr: OptionalNullable[bool] = UNSET, + enforce_zdr_anthropic: OptionalNullable[bool] = UNSET, + enforce_zdr_google: OptionalNullable[bool] = UNSET, + enforce_zdr_openai: OptionalNullable[bool] = UNSET, + enforce_zdr_other: OptionalNullable[bool] = UNSET, ignored_models: OptionalNullable[List[str]] = UNSET, ignored_providers: OptionalNullable[List[str]] = UNSET, limit_usd: OptionalNullable[float] = UNSET, @@ -1179,8 +1287,14 @@ def update( :param allowed_models: Array of model identifiers (slug or canonical_slug accepted) :param allowed_providers: New list of allowed provider IDs + :param content_filter_builtins: Builtin content filters to apply. Set to null to remove. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only. + :param content_filters: Custom regex content filters to apply. Set to null to remove. :param description: New description for the guardrail - :param enforce_zdr: Whether to enforce zero data retention + :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. + :param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. :param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted) :param ignored_providers: List of provider IDs to exclude from routing :param limit_usd: New spending limit in USD @@ -1209,8 +1323,20 @@ def update( update_guardrail_request=components.UpdateGuardrailRequest( allowed_models=allowed_models, allowed_providers=allowed_providers, + content_filter_builtins=utils.get_pydantic_model( + content_filter_builtins, + OptionalNullable[List[components.ContentFilterBuiltinEntry]], + ), + content_filters=utils.get_pydantic_model( + content_filters, + OptionalNullable[List[components.ContentFilterEntry]], + ), description=description, enforce_zdr=enforce_zdr, + enforce_zdr_anthropic=enforce_zdr_anthropic, + enforce_zdr_google=enforce_zdr_google, + enforce_zdr_openai=enforce_zdr_openai, + enforce_zdr_other=enforce_zdr_other, ignored_models=ignored_models, ignored_providers=ignored_providers, limit_usd=limit_usd, @@ -1320,8 +1446,24 @@ async def update_async( x_open_router_categories: Optional[str] = None, allowed_models: OptionalNullable[List[str]] = UNSET, allowed_providers: OptionalNullable[List[str]] = UNSET, + content_filter_builtins: OptionalNullable[ + Union[ + List[components.ContentFilterBuiltinEntry], + List[components.ContentFilterBuiltinEntryTypedDict], + ] + ] = UNSET, + content_filters: OptionalNullable[ + Union[ + List[components.ContentFilterEntry], + List[components.ContentFilterEntryTypedDict], + ] + ] = UNSET, description: OptionalNullable[str] = UNSET, enforce_zdr: OptionalNullable[bool] = UNSET, + enforce_zdr_anthropic: OptionalNullable[bool] = UNSET, + enforce_zdr_google: OptionalNullable[bool] = UNSET, + enforce_zdr_openai: OptionalNullable[bool] = UNSET, + enforce_zdr_other: OptionalNullable[bool] = UNSET, ignored_models: OptionalNullable[List[str]] = UNSET, ignored_providers: OptionalNullable[List[str]] = UNSET, limit_usd: OptionalNullable[float] = UNSET, @@ -1346,8 +1488,14 @@ async def update_async( :param allowed_models: Array of model identifiers (slug or canonical_slug accepted) :param allowed_providers: New list of allowed provider IDs + :param content_filter_builtins: Builtin content filters to apply. Set to null to remove. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only. + :param content_filters: Custom regex content filters to apply. Set to null to remove. :param description: New description for the guardrail - :param enforce_zdr: Whether to enforce zero data retention + :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. + :param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. + :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. :param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted) :param ignored_providers: List of provider IDs to exclude from routing :param limit_usd: New spending limit in USD @@ -1376,8 +1524,20 @@ async def update_async( update_guardrail_request=components.UpdateGuardrailRequest( allowed_models=allowed_models, allowed_providers=allowed_providers, + content_filter_builtins=utils.get_pydantic_model( + content_filter_builtins, + OptionalNullable[List[components.ContentFilterBuiltinEntry]], + ), + content_filters=utils.get_pydantic_model( + content_filters, + OptionalNullable[List[components.ContentFilterEntry]], + ), description=description, enforce_zdr=enforce_zdr, + enforce_zdr_anthropic=enforce_zdr_anthropic, + enforce_zdr_google=enforce_zdr_google, + enforce_zdr_openai=enforce_zdr_openai, + enforce_zdr_other=enforce_zdr_other, ignored_models=ignored_models, ignored_providers=ignored_providers, limit_usd=limit_usd, diff --git a/src/openrouter/observability.py b/src/openrouter/observability.py new file mode 100644 index 0000000..5d9daf6 --- /dev/null +++ b/src/openrouter/observability.py @@ -0,0 +1,589 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from jsonpath import JSONPath +from openrouter import components, errors, operations, utils +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, Awaitable, Dict, List, Mapping, Optional, Union + + +class Observability(BaseSDK): + r"""Observability endpoints""" + + def list( + self, + *, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + offset: Optional[int] = None, + limit: Optional[int] = None, + workspace_id: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[operations.ListObservabilityDestinationsResponse]: + r"""List observability destinations + + List the observability destinations configured for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace. Only destinations with stable release status are surfaced — destinations of other types are excluded. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param offset: Number of records to skip for pagination + :param limit: Maximum number of records to return (max 100) + :param workspace_id: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.ListObservabilityDestinationsRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=offset, + limit=limit, + workspace_id=workspace_id, + ) + + req = self._build_request( + method="GET", + path="/observability/destinations", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.ListObservabilityDestinationsGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="listObservabilityDestinations", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[operations.ListObservabilityDestinationsResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + offset = request.offset if not request.offset is None else 0 + + if not http_res.text: + return None + results = JSONPath("$.data").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return None + limit = request.limit if not request.limit is None else 0 + if len(results[0]) < limit: + return None + next_offset = offset + len(results[0]) + + return self.list( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=next_offset, + limit=limit, + workspace_id=workspace_id, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.ListObservabilityDestinationsResponse( + result=unmarshal_json_response( + components.ListObservabilityDestinationsResponse, http_res + ), + next=next_func, + ) + 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, "500", "application/json"): + response_data = unmarshal_json_response( + errors.InternalServerResponseErrorData, http_res + ) + raise errors.InternalServerResponseError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def list_async( + self, + *, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + offset: Optional[int] = None, + limit: Optional[int] = None, + workspace_id: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[operations.ListObservabilityDestinationsResponse]: + r"""List observability destinations + + List the observability destinations configured for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace. Only destinations with stable release status are surfaced — destinations of other types are excluded. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param offset: Number of records to skip for pagination + :param limit: Maximum number of records to return (max 100) + :param workspace_id: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.ListObservabilityDestinationsRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=offset, + limit=limit, + workspace_id=workspace_id, + ) + + req = self._build_request_async( + method="GET", + path="/observability/destinations", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.ListObservabilityDestinationsGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="listObservabilityDestinations", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> ( + Awaitable[Optional[operations.ListObservabilityDestinationsResponse]] + ): + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + async def empty_result(): + return None + + offset = request.offset if not request.offset is None else 0 + + if not http_res.text: + return empty_result() + results = JSONPath("$.data").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return empty_result() + limit = request.limit if not request.limit is None else 0 + if len(results[0]) < limit: + return empty_result() + next_offset = offset + len(results[0]) + + return self.list_async( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=next_offset, + limit=limit, + workspace_id=workspace_id, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.ListObservabilityDestinationsResponse( + result=unmarshal_json_response( + components.ListObservabilityDestinationsResponse, http_res + ), + next=next_func, + ) + 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, "500", "application/json"): + response_data = unmarshal_json_response( + errors.InternalServerResponseErrorData, http_res + ) + raise errors.InternalServerResponseError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + def get( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.GetObservabilityDestinationResponse: + r"""Get an observability destination + + Fetch a single observability destination by its UUID. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The destination ID (UUID). + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.GetObservabilityDestinationRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + ) + + req = self._build_request( + method="GET", + path="/observability/destinations/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.GetObservabilityDestinationGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getObservabilityDestination", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + components.GetObservabilityDestinationResponse, 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, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def get_async( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.GetObservabilityDestinationResponse: + r"""Get an observability destination + + Fetch a single observability destination by its UUID. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The destination ID (UUID). + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.GetObservabilityDestinationRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + ) + + req = self._build_request_async( + method="GET", + path="/observability/destinations/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.GetObservabilityDestinationGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getObservabilityDestination", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + components.GetObservabilityDestinationResponse, 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, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) diff --git a/src/openrouter/operations/__init__.py b/src/openrouter/operations/__init__.py index 8c2b319..4abcaa9 100644 --- a/src/openrouter/operations/__init__.py +++ b/src/openrouter/operations/__init__.py @@ -6,6 +6,12 @@ import sys if TYPE_CHECKING: + from .bulkaddworkspacemembers import ( + BulkAddWorkspaceMembersGlobals, + BulkAddWorkspaceMembersGlobalsTypedDict, + BulkAddWorkspaceMembersRequest, + BulkAddWorkspaceMembersRequestTypedDict, + ) from .bulkassignkeystoguardrail import ( BulkAssignKeysToGuardrailGlobals, BulkAssignKeysToGuardrailGlobalsTypedDict, @@ -18,6 +24,12 @@ BulkAssignMembersToGuardrailRequest, BulkAssignMembersToGuardrailRequestTypedDict, ) + from .bulkremoveworkspacemembers import ( + BulkRemoveWorkspaceMembersGlobals, + BulkRemoveWorkspaceMembersGlobalsTypedDict, + BulkRemoveWorkspaceMembersRequest, + BulkRemoveWorkspaceMembersRequestTypedDict, + ) from .bulkunassignkeysfromguardrail import ( BulkUnassignKeysFromGuardrailGlobals, BulkUnassignKeysFromGuardrailGlobalsTypedDict, @@ -30,6 +42,18 @@ BulkUnassignMembersFromGuardrailRequest, BulkUnassignMembersFromGuardrailRequestTypedDict, ) + from .createaudiospeech import ( + CreateAudioSpeechGlobals, + CreateAudioSpeechGlobalsTypedDict, + CreateAudioSpeechRequest, + CreateAudioSpeechRequestTypedDict, + ) + from .createaudiotranscriptions import ( + CreateAudioTranscriptionsGlobals, + CreateAudioTranscriptionsGlobalsTypedDict, + CreateAudioTranscriptionsRequest, + CreateAudioTranscriptionsRequestTypedDict, + ) from .createauthkeyscode import ( CreateAuthKeysCodeCodeChallengeMethod, CreateAuthKeysCodeData, @@ -76,6 +100,8 @@ InputUnionTypedDict, Object, ObjectEmbedding, + PromptTokensDetails, + PromptTokensDetailsTypedDict, TypeImageURL, TypeText, ) @@ -122,8 +148,6 @@ CreateResponsesRequest, CreateResponsesRequestTypedDict, CreateResponsesResponse, - CreateResponsesResponseBody, - CreateResponsesResponseBodyTypedDict, CreateResponsesResponseTypedDict, ) from .createvideos import ( @@ -132,6 +156,12 @@ CreateVideosRequest, CreateVideosRequestTypedDict, ) + from .createworkspace import ( + CreateWorkspaceGlobals, + CreateWorkspaceGlobalsTypedDict, + CreateWorkspaceRequest, + CreateWorkspaceRequestTypedDict, + ) from .deleteguardrail import ( DeleteGuardrailGlobals, DeleteGuardrailGlobalsTypedDict, @@ -146,6 +176,12 @@ DeleteKeysResponse, DeleteKeysResponseTypedDict, ) + from .deleteworkspace import ( + DeleteWorkspaceGlobals, + DeleteWorkspaceGlobalsTypedDict, + DeleteWorkspaceRequest, + DeleteWorkspaceRequestTypedDict, + ) from .exchangeauthcodeforapikey import ( ExchangeAuthCodeForAPIKeyCodeChallengeMethod, ExchangeAuthCodeForAPIKeyGlobals, @@ -157,6 +193,12 @@ ExchangeAuthCodeForAPIKeyResponse, ExchangeAuthCodeForAPIKeyResponseTypedDict, ) + from .getbyokkey import ( + GetBYOKKeyGlobals, + GetBYOKKeyGlobalsTypedDict, + GetBYOKKeyRequest, + GetBYOKKeyRequestTypedDict, + ) from .getcredits import ( GetCreditsData, GetCreditsDataTypedDict, @@ -180,15 +222,10 @@ RateLimitTypedDict, ) from .getgeneration import ( - APIType, - GetGenerationData, - GetGenerationDataTypedDict, GetGenerationGlobals, GetGenerationGlobalsTypedDict, GetGenerationRequest, GetGenerationRequestTypedDict, - GetGenerationResponse, - GetGenerationResponseTypedDict, ) from .getguardrail import ( GetGuardrailGlobals, @@ -213,6 +250,12 @@ GetModelsRequest, GetModelsRequestTypedDict, ) + from .getobservabilitydestination import ( + GetObservabilityDestinationGlobals, + GetObservabilityDestinationGlobalsTypedDict, + GetObservabilityDestinationRequest, + GetObservabilityDestinationRequestTypedDict, + ) from .getuseractivity import ( GetUserActivityGlobals, GetUserActivityGlobalsTypedDict, @@ -225,6 +268,12 @@ GetVideosRequest, GetVideosRequestTypedDict, ) + from .getworkspace import ( + GetWorkspaceGlobals, + GetWorkspaceGlobalsTypedDict, + GetWorkspaceRequest, + GetWorkspaceRequestTypedDict, + ) from .list import ( ListData, ListDataTypedDict, @@ -235,6 +284,15 @@ ListResponse, ListResponseTypedDict, ) + from .listbyokkeys import ( + ListBYOKKeysGlobals, + ListBYOKKeysGlobalsTypedDict, + ListBYOKKeysRequest, + ListBYOKKeysRequestTypedDict, + ListBYOKKeysResponse, + ListBYOKKeysResponseTypedDict, + Provider, + ) from .listembeddingsmodels import ( ListEmbeddingsModelsGlobals, ListEmbeddingsModelsGlobalsTypedDict, @@ -257,6 +315,12 @@ ListEndpointsZdrResponse, ListEndpointsZdrResponseTypedDict, ) + from .listgenerationcontent import ( + ListGenerationContentGlobals, + ListGenerationContentGlobalsTypedDict, + ListGenerationContentRequest, + ListGenerationContentRequestTypedDict, + ) from .listguardrailkeyassignments import ( ListGuardrailKeyAssignmentsGlobals, ListGuardrailKeyAssignmentsGlobalsTypedDict, @@ -311,6 +375,14 @@ ListModelsUserSecurity, ListModelsUserSecurityTypedDict, ) + from .listobservabilitydestinations import ( + ListObservabilityDestinationsGlobals, + ListObservabilityDestinationsGlobalsTypedDict, + ListObservabilityDestinationsRequest, + ListObservabilityDestinationsRequestTypedDict, + ListObservabilityDestinationsResponse, + ListObservabilityDestinationsResponseTypedDict, + ) from .listorganizationmembers import ( ListOrganizationMembersData, ListOrganizationMembersDataTypedDict, @@ -348,14 +420,20 @@ ListVideosModelsRequest, ListVideosModelsRequestTypedDict, ) + from .listworkspaces import ( + ListWorkspacesGlobals, + ListWorkspacesGlobalsTypedDict, + ListWorkspacesRequest, + ListWorkspacesRequestTypedDict, + ListWorkspacesResponse, + ListWorkspacesResponseTypedDict, + ) from .sendchatcompletionrequest import ( SendChatCompletionRequestGlobals, SendChatCompletionRequestGlobalsTypedDict, SendChatCompletionRequestRequest, SendChatCompletionRequestRequestTypedDict, SendChatCompletionRequestResponse, - SendChatCompletionRequestResponseBody, - SendChatCompletionRequestResponseBodyTypedDict, SendChatCompletionRequestResponseTypedDict, ) from .updateguardrail import ( @@ -377,9 +455,18 @@ UpdateKeysResponse, UpdateKeysResponseTypedDict, ) + from .updateworkspace import ( + UpdateWorkspaceGlobals, + UpdateWorkspaceGlobalsTypedDict, + UpdateWorkspaceRequest, + UpdateWorkspaceRequestTypedDict, + ) __all__ = [ - "APIType", + "BulkAddWorkspaceMembersGlobals", + "BulkAddWorkspaceMembersGlobalsTypedDict", + "BulkAddWorkspaceMembersRequest", + "BulkAddWorkspaceMembersRequestTypedDict", "BulkAssignKeysToGuardrailGlobals", "BulkAssignKeysToGuardrailGlobalsTypedDict", "BulkAssignKeysToGuardrailRequest", @@ -388,6 +475,10 @@ "BulkAssignMembersToGuardrailGlobalsTypedDict", "BulkAssignMembersToGuardrailRequest", "BulkAssignMembersToGuardrailRequestTypedDict", + "BulkRemoveWorkspaceMembersGlobals", + "BulkRemoveWorkspaceMembersGlobalsTypedDict", + "BulkRemoveWorkspaceMembersRequest", + "BulkRemoveWorkspaceMembersRequestTypedDict", "BulkUnassignKeysFromGuardrailGlobals", "BulkUnassignKeysFromGuardrailGlobalsTypedDict", "BulkUnassignKeysFromGuardrailRequest", @@ -403,6 +494,14 @@ "ContentText", "ContentTextTypedDict", "ContentTypedDict", + "CreateAudioSpeechGlobals", + "CreateAudioSpeechGlobalsTypedDict", + "CreateAudioSpeechRequest", + "CreateAudioSpeechRequestTypedDict", + "CreateAudioTranscriptionsGlobals", + "CreateAudioTranscriptionsGlobalsTypedDict", + "CreateAudioTranscriptionsRequest", + "CreateAudioTranscriptionsRequestTypedDict", "CreateAuthKeysCodeCodeChallengeMethod", "CreateAuthKeysCodeData", "CreateAuthKeysCodeDataTypedDict", @@ -460,13 +559,15 @@ "CreateResponsesRequest", "CreateResponsesRequestTypedDict", "CreateResponsesResponse", - "CreateResponsesResponseBody", - "CreateResponsesResponseBodyTypedDict", "CreateResponsesResponseTypedDict", "CreateVideosGlobals", "CreateVideosGlobalsTypedDict", "CreateVideosRequest", "CreateVideosRequestTypedDict", + "CreateWorkspaceGlobals", + "CreateWorkspaceGlobalsTypedDict", + "CreateWorkspaceRequest", + "CreateWorkspaceRequestTypedDict", "Datacenter", "DeleteGuardrailGlobals", "DeleteGuardrailGlobalsTypedDict", @@ -478,6 +579,10 @@ "DeleteKeysRequestTypedDict", "DeleteKeysResponse", "DeleteKeysResponseTypedDict", + "DeleteWorkspaceGlobals", + "DeleteWorkspaceGlobalsTypedDict", + "DeleteWorkspaceRequest", + "DeleteWorkspaceRequestTypedDict", "Document", "DocumentTypedDict", "Embedding", @@ -492,6 +597,10 @@ "ExchangeAuthCodeForAPIKeyRequestTypedDict", "ExchangeAuthCodeForAPIKeyResponse", "ExchangeAuthCodeForAPIKeyResponseTypedDict", + "GetBYOKKeyGlobals", + "GetBYOKKeyGlobalsTypedDict", + "GetBYOKKeyRequest", + "GetBYOKKeyRequestTypedDict", "GetCreditsData", "GetCreditsDataTypedDict", "GetCreditsGlobals", @@ -508,14 +617,10 @@ "GetCurrentKeyRequestTypedDict", "GetCurrentKeyResponse", "GetCurrentKeyResponseTypedDict", - "GetGenerationData", - "GetGenerationDataTypedDict", "GetGenerationGlobals", "GetGenerationGlobalsTypedDict", "GetGenerationRequest", "GetGenerationRequestTypedDict", - "GetGenerationResponse", - "GetGenerationResponseTypedDict", "GetGuardrailGlobals", "GetGuardrailGlobalsTypedDict", "GetGuardrailRequest", @@ -532,6 +637,10 @@ "GetModelsGlobalsTypedDict", "GetModelsRequest", "GetModelsRequestTypedDict", + "GetObservabilityDestinationGlobals", + "GetObservabilityDestinationGlobalsTypedDict", + "GetObservabilityDestinationRequest", + "GetObservabilityDestinationRequestTypedDict", "GetUserActivityGlobals", "GetUserActivityGlobalsTypedDict", "GetUserActivityRequest", @@ -540,6 +649,10 @@ "GetVideosGlobalsTypedDict", "GetVideosRequest", "GetVideosRequestTypedDict", + "GetWorkspaceGlobals", + "GetWorkspaceGlobalsTypedDict", + "GetWorkspaceRequest", + "GetWorkspaceRequestTypedDict", "Headquarters", "ImageURL", "ImageURLTypedDict", @@ -547,6 +660,12 @@ "InputTypedDict", "InputUnion", "InputUnionTypedDict", + "ListBYOKKeysGlobals", + "ListBYOKKeysGlobalsTypedDict", + "ListBYOKKeysRequest", + "ListBYOKKeysRequestTypedDict", + "ListBYOKKeysResponse", + "ListBYOKKeysResponseTypedDict", "ListData", "ListDataTypedDict", "ListEmbeddingsModelsGlobals", @@ -565,6 +684,10 @@ "ListEndpointsZdrRequestTypedDict", "ListEndpointsZdrResponse", "ListEndpointsZdrResponseTypedDict", + "ListGenerationContentGlobals", + "ListGenerationContentGlobalsTypedDict", + "ListGenerationContentRequest", + "ListGenerationContentRequestTypedDict", "ListGlobals", "ListGlobalsTypedDict", "ListGuardrailKeyAssignmentsGlobals", @@ -607,6 +730,12 @@ "ListModelsUserRequestTypedDict", "ListModelsUserSecurity", "ListModelsUserSecurityTypedDict", + "ListObservabilityDestinationsGlobals", + "ListObservabilityDestinationsGlobalsTypedDict", + "ListObservabilityDestinationsRequest", + "ListObservabilityDestinationsRequestTypedDict", + "ListObservabilityDestinationsResponse", + "ListObservabilityDestinationsResponseTypedDict", "ListOrganizationMembersData", "ListOrganizationMembersDataTypedDict", "ListOrganizationMembersGlobals", @@ -637,8 +766,17 @@ "ListVideosModelsGlobalsTypedDict", "ListVideosModelsRequest", "ListVideosModelsRequestTypedDict", + "ListWorkspacesGlobals", + "ListWorkspacesGlobalsTypedDict", + "ListWorkspacesRequest", + "ListWorkspacesRequestTypedDict", + "ListWorkspacesResponse", + "ListWorkspacesResponseTypedDict", "Object", "ObjectEmbedding", + "PromptTokensDetails", + "PromptTokensDetailsTypedDict", + "Provider", "RateLimit", "RateLimitTypedDict", "Result", @@ -649,8 +787,6 @@ "SendChatCompletionRequestRequest", "SendChatCompletionRequestRequestTypedDict", "SendChatCompletionRequestResponse", - "SendChatCompletionRequestResponseBody", - "SendChatCompletionRequestResponseBodyTypedDict", "SendChatCompletionRequestResponseTypedDict", "TypeImageURL", "TypeText", @@ -669,10 +805,18 @@ "UpdateKeysRequestTypedDict", "UpdateKeysResponse", "UpdateKeysResponseTypedDict", + "UpdateWorkspaceGlobals", + "UpdateWorkspaceGlobalsTypedDict", + "UpdateWorkspaceRequest", + "UpdateWorkspaceRequestTypedDict", "UsageLimitType", ] _dynamic_imports: dict[str, str] = { + "BulkAddWorkspaceMembersGlobals": ".bulkaddworkspacemembers", + "BulkAddWorkspaceMembersGlobalsTypedDict": ".bulkaddworkspacemembers", + "BulkAddWorkspaceMembersRequest": ".bulkaddworkspacemembers", + "BulkAddWorkspaceMembersRequestTypedDict": ".bulkaddworkspacemembers", "BulkAssignKeysToGuardrailGlobals": ".bulkassignkeystoguardrail", "BulkAssignKeysToGuardrailGlobalsTypedDict": ".bulkassignkeystoguardrail", "BulkAssignKeysToGuardrailRequest": ".bulkassignkeystoguardrail", @@ -681,6 +825,10 @@ "BulkAssignMembersToGuardrailGlobalsTypedDict": ".bulkassignmemberstoguardrail", "BulkAssignMembersToGuardrailRequest": ".bulkassignmemberstoguardrail", "BulkAssignMembersToGuardrailRequestTypedDict": ".bulkassignmemberstoguardrail", + "BulkRemoveWorkspaceMembersGlobals": ".bulkremoveworkspacemembers", + "BulkRemoveWorkspaceMembersGlobalsTypedDict": ".bulkremoveworkspacemembers", + "BulkRemoveWorkspaceMembersRequest": ".bulkremoveworkspacemembers", + "BulkRemoveWorkspaceMembersRequestTypedDict": ".bulkremoveworkspacemembers", "BulkUnassignKeysFromGuardrailGlobals": ".bulkunassignkeysfromguardrail", "BulkUnassignKeysFromGuardrailGlobalsTypedDict": ".bulkunassignkeysfromguardrail", "BulkUnassignKeysFromGuardrailRequest": ".bulkunassignkeysfromguardrail", @@ -689,6 +837,14 @@ "BulkUnassignMembersFromGuardrailGlobalsTypedDict": ".bulkunassignmembersfromguardrail", "BulkUnassignMembersFromGuardrailRequest": ".bulkunassignmembersfromguardrail", "BulkUnassignMembersFromGuardrailRequestTypedDict": ".bulkunassignmembersfromguardrail", + "CreateAudioSpeechGlobals": ".createaudiospeech", + "CreateAudioSpeechGlobalsTypedDict": ".createaudiospeech", + "CreateAudioSpeechRequest": ".createaudiospeech", + "CreateAudioSpeechRequestTypedDict": ".createaudiospeech", + "CreateAudioTranscriptionsGlobals": ".createaudiotranscriptions", + "CreateAudioTranscriptionsGlobalsTypedDict": ".createaudiotranscriptions", + "CreateAudioTranscriptionsRequest": ".createaudiotranscriptions", + "CreateAudioTranscriptionsRequestTypedDict": ".createaudiotranscriptions", "CreateAuthKeysCodeCodeChallengeMethod": ".createauthkeyscode", "CreateAuthKeysCodeData": ".createauthkeyscode", "CreateAuthKeysCodeDataTypedDict": ".createauthkeyscode", @@ -732,6 +888,8 @@ "InputUnionTypedDict": ".createembeddings", "Object": ".createembeddings", "ObjectEmbedding": ".createembeddings", + "PromptTokensDetails": ".createembeddings", + "PromptTokensDetailsTypedDict": ".createembeddings", "TypeImageURL": ".createembeddings", "TypeText": ".createembeddings", "CreateGuardrailGlobals": ".createguardrail", @@ -770,13 +928,15 @@ "CreateResponsesRequest": ".createresponses", "CreateResponsesRequestTypedDict": ".createresponses", "CreateResponsesResponse": ".createresponses", - "CreateResponsesResponseBody": ".createresponses", - "CreateResponsesResponseBodyTypedDict": ".createresponses", "CreateResponsesResponseTypedDict": ".createresponses", "CreateVideosGlobals": ".createvideos", "CreateVideosGlobalsTypedDict": ".createvideos", "CreateVideosRequest": ".createvideos", "CreateVideosRequestTypedDict": ".createvideos", + "CreateWorkspaceGlobals": ".createworkspace", + "CreateWorkspaceGlobalsTypedDict": ".createworkspace", + "CreateWorkspaceRequest": ".createworkspace", + "CreateWorkspaceRequestTypedDict": ".createworkspace", "DeleteGuardrailGlobals": ".deleteguardrail", "DeleteGuardrailGlobalsTypedDict": ".deleteguardrail", "DeleteGuardrailRequest": ".deleteguardrail", @@ -787,6 +947,10 @@ "DeleteKeysRequestTypedDict": ".deletekeys", "DeleteKeysResponse": ".deletekeys", "DeleteKeysResponseTypedDict": ".deletekeys", + "DeleteWorkspaceGlobals": ".deleteworkspace", + "DeleteWorkspaceGlobalsTypedDict": ".deleteworkspace", + "DeleteWorkspaceRequest": ".deleteworkspace", + "DeleteWorkspaceRequestTypedDict": ".deleteworkspace", "ExchangeAuthCodeForAPIKeyCodeChallengeMethod": ".exchangeauthcodeforapikey", "ExchangeAuthCodeForAPIKeyGlobals": ".exchangeauthcodeforapikey", "ExchangeAuthCodeForAPIKeyGlobalsTypedDict": ".exchangeauthcodeforapikey", @@ -796,6 +960,10 @@ "ExchangeAuthCodeForAPIKeyRequestTypedDict": ".exchangeauthcodeforapikey", "ExchangeAuthCodeForAPIKeyResponse": ".exchangeauthcodeforapikey", "ExchangeAuthCodeForAPIKeyResponseTypedDict": ".exchangeauthcodeforapikey", + "GetBYOKKeyGlobals": ".getbyokkey", + "GetBYOKKeyGlobalsTypedDict": ".getbyokkey", + "GetBYOKKeyRequest": ".getbyokkey", + "GetBYOKKeyRequestTypedDict": ".getbyokkey", "GetCreditsData": ".getcredits", "GetCreditsDataTypedDict": ".getcredits", "GetCreditsGlobals": ".getcredits", @@ -814,15 +982,10 @@ "GetCurrentKeyResponseTypedDict": ".getcurrentkey", "RateLimit": ".getcurrentkey", "RateLimitTypedDict": ".getcurrentkey", - "APIType": ".getgeneration", - "GetGenerationData": ".getgeneration", - "GetGenerationDataTypedDict": ".getgeneration", "GetGenerationGlobals": ".getgeneration", "GetGenerationGlobalsTypedDict": ".getgeneration", "GetGenerationRequest": ".getgeneration", "GetGenerationRequestTypedDict": ".getgeneration", - "GetGenerationResponse": ".getgeneration", - "GetGenerationResponseTypedDict": ".getgeneration", "GetGuardrailGlobals": ".getguardrail", "GetGuardrailGlobalsTypedDict": ".getguardrail", "GetGuardrailRequest": ".getguardrail", @@ -840,6 +1003,10 @@ "GetModelsGlobalsTypedDict": ".getmodels", "GetModelsRequest": ".getmodels", "GetModelsRequestTypedDict": ".getmodels", + "GetObservabilityDestinationGlobals": ".getobservabilitydestination", + "GetObservabilityDestinationGlobalsTypedDict": ".getobservabilitydestination", + "GetObservabilityDestinationRequest": ".getobservabilitydestination", + "GetObservabilityDestinationRequestTypedDict": ".getobservabilitydestination", "GetUserActivityGlobals": ".getuseractivity", "GetUserActivityGlobalsTypedDict": ".getuseractivity", "GetUserActivityRequest": ".getuseractivity", @@ -848,6 +1015,10 @@ "GetVideosGlobalsTypedDict": ".getvideos", "GetVideosRequest": ".getvideos", "GetVideosRequestTypedDict": ".getvideos", + "GetWorkspaceGlobals": ".getworkspace", + "GetWorkspaceGlobalsTypedDict": ".getworkspace", + "GetWorkspaceRequest": ".getworkspace", + "GetWorkspaceRequestTypedDict": ".getworkspace", "ListData": ".list", "ListDataTypedDict": ".list", "ListGlobals": ".list", @@ -856,6 +1027,13 @@ "ListRequestTypedDict": ".list", "ListResponse": ".list", "ListResponseTypedDict": ".list", + "ListBYOKKeysGlobals": ".listbyokkeys", + "ListBYOKKeysGlobalsTypedDict": ".listbyokkeys", + "ListBYOKKeysRequest": ".listbyokkeys", + "ListBYOKKeysRequestTypedDict": ".listbyokkeys", + "ListBYOKKeysResponse": ".listbyokkeys", + "ListBYOKKeysResponseTypedDict": ".listbyokkeys", + "Provider": ".listbyokkeys", "ListEmbeddingsModelsGlobals": ".listembeddingsmodels", "ListEmbeddingsModelsGlobalsTypedDict": ".listembeddingsmodels", "ListEmbeddingsModelsRequest": ".listembeddingsmodels", @@ -872,6 +1050,10 @@ "ListEndpointsZdrRequestTypedDict": ".listendpointszdr", "ListEndpointsZdrResponse": ".listendpointszdr", "ListEndpointsZdrResponseTypedDict": ".listendpointszdr", + "ListGenerationContentGlobals": ".listgenerationcontent", + "ListGenerationContentGlobalsTypedDict": ".listgenerationcontent", + "ListGenerationContentRequest": ".listgenerationcontent", + "ListGenerationContentRequestTypedDict": ".listgenerationcontent", "ListGuardrailKeyAssignmentsGlobals": ".listguardrailkeyassignments", "ListGuardrailKeyAssignmentsGlobalsTypedDict": ".listguardrailkeyassignments", "ListGuardrailKeyAssignmentsRequest": ".listguardrailkeyassignments", @@ -912,6 +1094,12 @@ "ListModelsUserRequestTypedDict": ".listmodelsuser", "ListModelsUserSecurity": ".listmodelsuser", "ListModelsUserSecurityTypedDict": ".listmodelsuser", + "ListObservabilityDestinationsGlobals": ".listobservabilitydestinations", + "ListObservabilityDestinationsGlobalsTypedDict": ".listobservabilitydestinations", + "ListObservabilityDestinationsRequest": ".listobservabilitydestinations", + "ListObservabilityDestinationsRequestTypedDict": ".listobservabilitydestinations", + "ListObservabilityDestinationsResponse": ".listobservabilitydestinations", + "ListObservabilityDestinationsResponseTypedDict": ".listobservabilitydestinations", "ListOrganizationMembersData": ".listorganizationmembers", "ListOrganizationMembersDataTypedDict": ".listorganizationmembers", "ListOrganizationMembersGlobals": ".listorganizationmembers", @@ -941,13 +1129,17 @@ "ListVideosModelsGlobalsTypedDict": ".listvideosmodels", "ListVideosModelsRequest": ".listvideosmodels", "ListVideosModelsRequestTypedDict": ".listvideosmodels", + "ListWorkspacesGlobals": ".listworkspaces", + "ListWorkspacesGlobalsTypedDict": ".listworkspaces", + "ListWorkspacesRequest": ".listworkspaces", + "ListWorkspacesRequestTypedDict": ".listworkspaces", + "ListWorkspacesResponse": ".listworkspaces", + "ListWorkspacesResponseTypedDict": ".listworkspaces", "SendChatCompletionRequestGlobals": ".sendchatcompletionrequest", "SendChatCompletionRequestGlobalsTypedDict": ".sendchatcompletionrequest", "SendChatCompletionRequestRequest": ".sendchatcompletionrequest", "SendChatCompletionRequestRequestTypedDict": ".sendchatcompletionrequest", "SendChatCompletionRequestResponse": ".sendchatcompletionrequest", - "SendChatCompletionRequestResponseBody": ".sendchatcompletionrequest", - "SendChatCompletionRequestResponseBodyTypedDict": ".sendchatcompletionrequest", "SendChatCompletionRequestResponseTypedDict": ".sendchatcompletionrequest", "UpdateGuardrailGlobals": ".updateguardrail", "UpdateGuardrailGlobalsTypedDict": ".updateguardrail", @@ -964,6 +1156,10 @@ "UpdateKeysRequestTypedDict": ".updatekeys", "UpdateKeysResponse": ".updatekeys", "UpdateKeysResponseTypedDict": ".updatekeys", + "UpdateWorkspaceGlobals": ".updateworkspace", + "UpdateWorkspaceGlobalsTypedDict": ".updateworkspace", + "UpdateWorkspaceRequest": ".updateworkspace", + "UpdateWorkspaceRequestTypedDict": ".updateworkspace", } diff --git a/src/openrouter/operations/bulkaddworkspacemembers.py b/src/openrouter/operations/bulkaddworkspacemembers.py new file mode 100644 index 0000000..32dcfea --- /dev/null +++ b/src/openrouter/operations/bulkaddworkspacemembers.py @@ -0,0 +1,121 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.components import ( + bulkaddworkspacemembersrequest as components_bulkaddworkspacemembersrequest, +) +from openrouter.types import BaseModel +from openrouter.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class BulkAddWorkspaceMembersGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class BulkAddWorkspaceMembersGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class BulkAddWorkspaceMembersRequestTypedDict(TypedDict): + id: str + r"""The workspace ID (UUID) or slug""" + bulk_add_workspace_members_request: components_bulkaddworkspacemembersrequest.BulkAddWorkspaceMembersRequestTypedDict + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class BulkAddWorkspaceMembersRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The workspace ID (UUID) or slug""" + + bulk_add_workspace_members_request: Annotated[ + components_bulkaddworkspacemembersrequest.BulkAddWorkspaceMembersRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/bulkremoveworkspacemembers.py b/src/openrouter/operations/bulkremoveworkspacemembers.py new file mode 100644 index 0000000..fe0ebfd --- /dev/null +++ b/src/openrouter/operations/bulkremoveworkspacemembers.py @@ -0,0 +1,121 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.components import ( + bulkremoveworkspacemembersrequest as components_bulkremoveworkspacemembersrequest, +) +from openrouter.types import BaseModel +from openrouter.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class BulkRemoveWorkspaceMembersGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class BulkRemoveWorkspaceMembersGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class BulkRemoveWorkspaceMembersRequestTypedDict(TypedDict): + id: str + r"""The workspace ID (UUID) or slug""" + bulk_remove_workspace_members_request: components_bulkremoveworkspacemembersrequest.BulkRemoveWorkspaceMembersRequestTypedDict + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class BulkRemoveWorkspaceMembersRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The workspace ID (UUID) or slug""" + + bulk_remove_workspace_members_request: Annotated[ + components_bulkremoveworkspacemembersrequest.BulkRemoveWorkspaceMembersRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/createaudiospeech.py b/src/openrouter/operations/createaudiospeech.py new file mode 100644 index 0000000..dae7b28 --- /dev/null +++ b/src/openrouter/operations/createaudiospeech.py @@ -0,0 +1,107 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.components import speechrequest as components_speechrequest +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateAudioSpeechGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class CreateAudioSpeechGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class CreateAudioSpeechRequestTypedDict(TypedDict): + speech_request: components_speechrequest.SpeechRequestTypedDict + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class CreateAudioSpeechRequest(BaseModel): + speech_request: Annotated[ + components_speechrequest.SpeechRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/createaudiotranscriptions.py b/src/openrouter/operations/createaudiotranscriptions.py new file mode 100644 index 0000000..0144114 --- /dev/null +++ b/src/openrouter/operations/createaudiotranscriptions.py @@ -0,0 +1,107 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.components import sttrequest as components_sttrequest +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateAudioTranscriptionsGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class CreateAudioTranscriptionsGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class CreateAudioTranscriptionsRequestTypedDict(TypedDict): + stt_request: components_sttrequest.STTRequestTypedDict + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class CreateAudioTranscriptionsRequest(BaseModel): + stt_request: Annotated[ + components_sttrequest.STTRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/createembeddings.py b/src/openrouter/operations/createembeddings.py index 3872d32..4cc4c5c 100644 --- a/src/openrouter/operations/createembeddings.py +++ b/src/openrouter/operations/createembeddings.py @@ -1,7 +1,12 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from openrouter.components import providerpreferences as components_providerpreferences +from openrouter.components import ( + contentpartinputaudio as components_contentpartinputaudio, + contentpartinputfile as components_contentpartinputfile, + contentpartinputvideo as components_contentpartinputvideo, + providerpreferences as components_providerpreferences, +) from openrouter.types import ( BaseModel, Nullable, @@ -117,7 +122,14 @@ class ContentText(BaseModel): ContentTypedDict = TypeAliasType( - "ContentTypedDict", Union[ContentTextTypedDict, ContentImageURLTypedDict] + "ContentTypedDict", + Union[ + ContentTextTypedDict, + ContentImageURLTypedDict, + components_contentpartinputaudio.ContentPartInputAudioTypedDict, + components_contentpartinputvideo.ContentPartInputVideoTypedDict, + components_contentpartinputfile.ContentPartInputFileTypedDict, + ], ) @@ -125,6 +137,15 @@ class ContentText(BaseModel): Union[ Annotated[ContentText, Tag("text")], Annotated[ContentImageURL, Tag("image_url")], + Annotated[ + components_contentpartinputaudio.ContentPartInputAudio, Tag("input_audio") + ], + Annotated[ + components_contentpartinputvideo.ContentPartInputVideo, Tag("input_video") + ], + Annotated[ + components_contentpartinputfile.ContentPartInputFile, Tag("input_file") + ], ], Discriminator(lambda m: get_discriminator(m, "type", "type")), ] @@ -323,6 +344,40 @@ class CreateEmbeddingsData(BaseModel): Object = Literal["list",] +class PromptTokensDetailsTypedDict(TypedDict): + r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.""" + + audio_tokens: NotRequired[int] + r"""Number of audio tokens in the input""" + file_tokens: NotRequired[int] + r"""Number of file/document tokens in the input""" + image_tokens: NotRequired[int] + r"""Number of image tokens in the input""" + text_tokens: NotRequired[int] + r"""Number of text tokens in the input""" + video_tokens: NotRequired[int] + r"""Number of video tokens in the input""" + + +class PromptTokensDetails(BaseModel): + r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.""" + + audio_tokens: Optional[int] = None + r"""Number of audio tokens in the input""" + + file_tokens: Optional[int] = None + r"""Number of file/document tokens in the input""" + + image_tokens: Optional[int] = None + r"""Number of image tokens in the input""" + + text_tokens: Optional[int] = None + r"""Number of text tokens in the input""" + + video_tokens: Optional[int] = None + r"""Number of video tokens in the input""" + + class CreateEmbeddingsUsageTypedDict(TypedDict): r"""Token usage statistics""" @@ -332,6 +387,8 @@ class CreateEmbeddingsUsageTypedDict(TypedDict): r"""Total number of tokens used""" cost: NotRequired[float] r"""Cost of the request in credits""" + prompt_tokens_details: NotRequired[PromptTokensDetailsTypedDict] + r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.""" class CreateEmbeddingsUsage(BaseModel): @@ -346,6 +403,9 @@ class CreateEmbeddingsUsage(BaseModel): cost: Optional[float] = None r"""Cost of the request in credits""" + prompt_tokens_details: Optional[PromptTokensDetails] = None + r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.""" + class CreateEmbeddingsResponseBodyTypedDict(TypedDict): r"""Embeddings response containing embedding vectors""" diff --git a/src/openrouter/operations/createkeys.py b/src/openrouter/operations/createkeys.py index 5ed218d..6d18cf7 100644 --- a/src/openrouter/operations/createkeys.py +++ b/src/openrouter/operations/createkeys.py @@ -93,6 +93,8 @@ class CreateKeysRequestBodyTypedDict(TypedDict): r"""Optional spending limit for the API key in USD""" limit_reset: NotRequired[Nullable[CreateKeysLimitReset]] r"""Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.""" + workspace_id: NotRequired[str] + r"""The workspace to create the API key in. Defaults to the default workspace if not provided.""" class CreateKeysRequestBody(BaseModel): @@ -117,6 +119,9 @@ class CreateKeysRequestBody(BaseModel): ] = UNSET r"""Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.""" + workspace_id: Optional[str] = None + r"""The workspace to create the API key in. Defaults to the default workspace if not provided.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -125,6 +130,7 @@ def serialize_model(self, handler): "include_byok_in_limit", "limit", "limit_reset", + "workspace_id", ] nullable_fields = ["creator_user_id", "expires_at", "limit", "limit_reset"] null_default_fields = [] @@ -247,6 +253,8 @@ class CreateKeysDataTypedDict(TypedDict): r"""OpenRouter credit usage (in USD) for the current UTC month""" usage_weekly: float r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)""" + workspace_id: str + r"""The workspace ID this API key belongs to.""" expires_at: NotRequired[Nullable[datetime]] r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -311,6 +319,9 @@ class CreateKeysData(BaseModel): usage_weekly: float r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)""" + workspace_id: str + r"""The workspace ID this API key belongs to.""" + expires_at: OptionalNullable[datetime] = UNSET r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" diff --git a/src/openrouter/operations/createresponses.py b/src/openrouter/operations/createresponses.py index e92bbc2..db9db18 100644 --- a/src/openrouter/operations/createresponses.py +++ b/src/openrouter/operations/createresponses.py @@ -2,6 +2,7 @@ from __future__ import annotations from openrouter.components import ( + metadatalevel as components_metadatalevel, openresponsesresult as components_openresponsesresult, responsesrequest as components_responsesrequest, streamevents as components_streamevents, @@ -12,8 +13,10 @@ HeaderMetadata, RequestMetadata, eventstreaming, + validate_open_enum, ) import pydantic +from pydantic.functional_validators import PlainValidator from typing import Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -79,6 +82,10 @@ class CreateResponsesRequestTypedDict(TypedDict): r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. """ + x_open_router_experimental_metadata: NotRequired[ + components_metadatalevel.MetadataLevel + ] + r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.""" class CreateResponsesRequest(BaseModel): @@ -115,19 +122,15 @@ class CreateResponsesRequest(BaseModel): """ - -class CreateResponsesResponseBodyTypedDict(TypedDict): - r"""Successful response""" - - data: components_streamevents.StreamEventsTypedDict - r"""Union of all possible event types emitted during response streaming""" - - -class CreateResponsesResponseBody(BaseModel): - r"""Successful response""" - - data: components_streamevents.StreamEvents - r"""Union of all possible event types emitted during response streaming""" + x_open_router_experimental_metadata: Annotated[ + Annotated[ + Optional[components_metadatalevel.MetadataLevel], + PlainValidator(validate_open_enum(False)), + ], + pydantic.Field(alias="X-OpenRouter-Experimental-Metadata"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.""" CreateResponsesResponseTypedDict = TypeAliasType( diff --git a/src/openrouter/operations/createworkspace.py b/src/openrouter/operations/createworkspace.py new file mode 100644 index 0000000..1757be8 --- /dev/null +++ b/src/openrouter/operations/createworkspace.py @@ -0,0 +1,111 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.components import ( + createworkspacerequest as components_createworkspacerequest, +) +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateWorkspaceGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class CreateWorkspaceGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class CreateWorkspaceRequestTypedDict(TypedDict): + create_workspace_request: ( + components_createworkspacerequest.CreateWorkspaceRequestTypedDict + ) + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class CreateWorkspaceRequest(BaseModel): + create_workspace_request: Annotated[ + components_createworkspacerequest.CreateWorkspaceRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/deleteworkspace.py b/src/openrouter/operations/deleteworkspace.py new file mode 100644 index 0000000..fbfef88 --- /dev/null +++ b/src/openrouter/operations/deleteworkspace.py @@ -0,0 +1,107 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DeleteWorkspaceGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class DeleteWorkspaceGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class DeleteWorkspaceRequestTypedDict(TypedDict): + id: str + r"""The workspace ID (UUID) or slug""" + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class DeleteWorkspaceRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The workspace ID (UUID) or slug""" + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/getbyokkey.py b/src/openrouter/operations/getbyokkey.py new file mode 100644 index 0000000..04945fd --- /dev/null +++ b/src/openrouter/operations/getbyokkey.py @@ -0,0 +1,107 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetBYOKKeyGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class GetBYOKKeyGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class GetBYOKKeyRequestTypedDict(TypedDict): + id: str + r"""The BYOK credential ID (UUID).""" + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class GetBYOKKeyRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The BYOK credential ID (UUID).""" + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/getgeneration.py b/src/openrouter/operations/getgeneration.py index 94dfcb7..bf21d05 100644 --- a/src/openrouter/operations/getgeneration.py +++ b/src/openrouter/operations/getgeneration.py @@ -1,25 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from openrouter.components import providerresponse as components_providerresponse -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from openrouter.utils import ( - FieldMetadata, - HeaderMetadata, - QueryParamMetadata, - validate_open_enum, -) +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import PlainValidator -from typing import List, Literal, Optional, Union +from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -120,292 +105,3 @@ class GetGenerationRequest(BaseModel): r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. """ - - -APIType = Union[ - Literal[ - "completions", - "embeddings", - "rerank", - "video", - ], - UnrecognizedStr, -] -r"""Type of API used for the generation""" - - -class GetGenerationDataTypedDict(TypedDict): - r"""Generation data""" - - api_type: Nullable[APIType] - r"""Type of API used for the generation""" - app_id: Nullable[int] - r"""ID of the app that made the request""" - cache_discount: Nullable[float] - r"""Discount applied due to caching""" - cancelled: Nullable[bool] - r"""Whether the generation was cancelled""" - created_at: str - r"""ISO 8601 timestamp of when the generation was created""" - external_user: Nullable[str] - r"""External user identifier""" - finish_reason: Nullable[str] - r"""Reason the generation finished""" - generation_time: Nullable[float] - r"""Time taken for generation in milliseconds""" - http_referer: Nullable[str] - r"""Referer header from the request""" - id: str - r"""Unique identifier for the generation""" - is_byok: bool - r"""Whether this used bring-your-own-key""" - latency: Nullable[float] - r"""Total latency in milliseconds""" - model: str - r"""Model used for the generation""" - moderation_latency: Nullable[float] - r"""Moderation latency in milliseconds""" - native_finish_reason: Nullable[str] - r"""Native finish reason as reported by provider""" - native_tokens_cached: Nullable[int] - r"""Native cached tokens as reported by provider""" - native_tokens_completion: Nullable[int] - r"""Native completion tokens as reported by provider""" - native_tokens_completion_images: Nullable[int] - r"""Native completion image tokens as reported by provider""" - native_tokens_prompt: Nullable[int] - r"""Native prompt tokens as reported by provider""" - native_tokens_reasoning: Nullable[int] - r"""Native reasoning tokens as reported by provider""" - num_input_audio_prompt: Nullable[int] - r"""Number of audio inputs in the prompt""" - num_media_completion: Nullable[int] - r"""Number of media items in the completion""" - num_media_prompt: Nullable[int] - r"""Number of media items in the prompt""" - num_search_results: Nullable[int] - r"""Number of search results included""" - origin: str - r"""Origin URL of the request""" - provider_name: Nullable[str] - r"""Name of the provider that served the request""" - provider_responses: Nullable[ - List[components_providerresponse.ProviderResponseTypedDict] - ] - r"""List of provider responses for this generation, including fallback attempts""" - router: Nullable[str] - r"""Router used for the request (e.g., openrouter/auto)""" - streamed: Nullable[bool] - r"""Whether the response was streamed""" - tokens_completion: Nullable[int] - r"""Number of tokens in the completion""" - tokens_prompt: Nullable[int] - r"""Number of tokens in the prompt""" - total_cost: float - r"""Total cost of the generation in USD""" - upstream_id: Nullable[str] - r"""Upstream provider's identifier for this generation""" - upstream_inference_cost: Nullable[float] - r"""Cost charged by the upstream provider""" - usage: float - r"""Usage amount in USD""" - user_agent: Nullable[str] - r"""User-Agent header from the request""" - request_id: NotRequired[Nullable[str]] - r"""Unique identifier grouping all generations from a single API request""" - session_id: NotRequired[Nullable[str]] - r"""Session identifier grouping multiple generations in the same session""" - - -class GetGenerationData(BaseModel): - r"""Generation data""" - - api_type: Annotated[Nullable[APIType], PlainValidator(validate_open_enum(False))] - r"""Type of API used for the generation""" - - app_id: Nullable[int] - r"""ID of the app that made the request""" - - cache_discount: Nullable[float] - r"""Discount applied due to caching""" - - cancelled: Nullable[bool] - r"""Whether the generation was cancelled""" - - created_at: str - r"""ISO 8601 timestamp of when the generation was created""" - - external_user: Nullable[str] - r"""External user identifier""" - - finish_reason: Nullable[str] - r"""Reason the generation finished""" - - generation_time: Nullable[float] - r"""Time taken for generation in milliseconds""" - - http_referer: Nullable[str] - r"""Referer header from the request""" - - id: str - r"""Unique identifier for the generation""" - - is_byok: bool - r"""Whether this used bring-your-own-key""" - - latency: Nullable[float] - r"""Total latency in milliseconds""" - - model: str - r"""Model used for the generation""" - - moderation_latency: Nullable[float] - r"""Moderation latency in milliseconds""" - - native_finish_reason: Nullable[str] - r"""Native finish reason as reported by provider""" - - native_tokens_cached: Nullable[int] - r"""Native cached tokens as reported by provider""" - - native_tokens_completion: Nullable[int] - r"""Native completion tokens as reported by provider""" - - native_tokens_completion_images: Nullable[int] - r"""Native completion image tokens as reported by provider""" - - native_tokens_prompt: Nullable[int] - r"""Native prompt tokens as reported by provider""" - - native_tokens_reasoning: Nullable[int] - r"""Native reasoning tokens as reported by provider""" - - num_input_audio_prompt: Nullable[int] - r"""Number of audio inputs in the prompt""" - - num_media_completion: Nullable[int] - r"""Number of media items in the completion""" - - num_media_prompt: Nullable[int] - r"""Number of media items in the prompt""" - - num_search_results: Nullable[int] - r"""Number of search results included""" - - origin: str - r"""Origin URL of the request""" - - provider_name: Nullable[str] - r"""Name of the provider that served the request""" - - provider_responses: Nullable[List[components_providerresponse.ProviderResponse]] - r"""List of provider responses for this generation, including fallback attempts""" - - router: Nullable[str] - r"""Router used for the request (e.g., openrouter/auto)""" - - streamed: Nullable[bool] - r"""Whether the response was streamed""" - - tokens_completion: Nullable[int] - r"""Number of tokens in the completion""" - - tokens_prompt: Nullable[int] - r"""Number of tokens in the prompt""" - - total_cost: float - r"""Total cost of the generation in USD""" - - upstream_id: Nullable[str] - r"""Upstream provider's identifier for this generation""" - - upstream_inference_cost: Nullable[float] - r"""Cost charged by the upstream provider""" - - usage: float - r"""Usage amount in USD""" - - user_agent: Nullable[str] - r"""User-Agent header from the request""" - - request_id: OptionalNullable[str] = UNSET - r"""Unique identifier grouping all generations from a single API request""" - - session_id: OptionalNullable[str] = UNSET - r"""Session identifier grouping multiple generations in the same session""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["request_id", "session_id"] - nullable_fields = [ - "api_type", - "app_id", - "cache_discount", - "cancelled", - "external_user", - "finish_reason", - "generation_time", - "http_referer", - "latency", - "moderation_latency", - "native_finish_reason", - "native_tokens_cached", - "native_tokens_completion", - "native_tokens_completion_images", - "native_tokens_prompt", - "native_tokens_reasoning", - "num_input_audio_prompt", - "num_media_completion", - "num_media_prompt", - "num_search_results", - "provider_name", - "provider_responses", - "request_id", - "router", - "session_id", - "streamed", - "tokens_completion", - "tokens_prompt", - "upstream_id", - "upstream_inference_cost", - "user_agent", - ] - 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 GetGenerationResponseTypedDict(TypedDict): - r"""Generation response""" - - data: GetGenerationDataTypedDict - r"""Generation data""" - - -class GetGenerationResponse(BaseModel): - r"""Generation response""" - - data: GetGenerationData - r"""Generation data""" diff --git a/src/openrouter/operations/getkey.py b/src/openrouter/operations/getkey.py index ec3948b..d2370a9 100644 --- a/src/openrouter/operations/getkey.py +++ b/src/openrouter/operations/getkey.py @@ -156,6 +156,8 @@ class GetKeyDataTypedDict(TypedDict): r"""OpenRouter credit usage (in USD) for the current UTC month""" usage_weekly: float r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)""" + workspace_id: str + r"""The workspace ID this API key belongs to.""" expires_at: NotRequired[Nullable[datetime]] r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -220,6 +222,9 @@ class GetKeyData(BaseModel): usage_weekly: float r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)""" + workspace_id: str + r"""The workspace ID this API key belongs to.""" + expires_at: OptionalNullable[datetime] = UNSET r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" diff --git a/src/openrouter/operations/getobservabilitydestination.py b/src/openrouter/operations/getobservabilitydestination.py new file mode 100644 index 0000000..3a79bcb --- /dev/null +++ b/src/openrouter/operations/getobservabilitydestination.py @@ -0,0 +1,107 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetObservabilityDestinationGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class GetObservabilityDestinationGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class GetObservabilityDestinationRequestTypedDict(TypedDict): + id: str + r"""The destination ID (UUID).""" + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class GetObservabilityDestinationRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The destination ID (UUID).""" + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/getworkspace.py b/src/openrouter/operations/getworkspace.py new file mode 100644 index 0000000..f4d279e --- /dev/null +++ b/src/openrouter/operations/getworkspace.py @@ -0,0 +1,107 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetWorkspaceGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class GetWorkspaceGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class GetWorkspaceRequestTypedDict(TypedDict): + id: str + r"""The workspace ID (UUID) or slug""" + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class GetWorkspaceRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The workspace ID (UUID) or slug""" + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/list.py b/src/openrouter/operations/list.py index e1d703c..bf9965a 100644 --- a/src/openrouter/operations/list.py +++ b/src/openrouter/operations/list.py @@ -80,6 +80,8 @@ class ListRequestTypedDict(TypedDict): r"""Whether to include disabled API keys in the response""" offset: NotRequired[int] r"""Number of API keys to skip for pagination""" + workspace_id: NotRequired[str] + r"""Filter API keys by workspace ID. By default, keys in the default workspace are returned.""" class ListRequest(BaseModel): @@ -123,6 +125,12 @@ class ListRequest(BaseModel): ] = None r"""Number of API keys to skip for pagination""" + workspace_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter API keys by workspace ID. By default, keys in the default workspace are returned.""" + class ListDataTypedDict(TypedDict): byok_usage: float @@ -163,6 +171,8 @@ class ListDataTypedDict(TypedDict): r"""OpenRouter credit usage (in USD) for the current UTC month""" usage_weekly: float r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)""" + workspace_id: str + r"""The workspace ID this API key belongs to.""" expires_at: NotRequired[Nullable[datetime]] r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -225,6 +235,9 @@ class ListData(BaseModel): usage_weekly: float r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)""" + workspace_id: str + r"""The workspace ID this API key belongs to.""" + expires_at: OptionalNullable[datetime] = UNSET r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" diff --git a/src/openrouter/operations/listbyokkeys.py b/src/openrouter/operations/listbyokkeys.py new file mode 100644 index 0000000..7b6580d --- /dev/null +++ b/src/openrouter/operations/listbyokkeys.py @@ -0,0 +1,242 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.components import ( + listbyokkeysresponse as components_listbyokkeysresponse, +) +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import ( + FieldMetadata, + HeaderMetadata, + QueryParamMetadata, + validate_open_enum, +) +import pydantic +from pydantic.functional_validators import PlainValidator +from typing import Awaitable, Callable, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ListBYOKKeysGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class ListBYOKKeysGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +Provider = Union[ + Literal[ + "ai21", + "aion-labs", + "akashml", + "alibaba", + "amazon-bedrock", + "amazon-nova", + "ambient", + "anthropic", + "arcee-ai", + "atlas-cloud", + "avian", + "azure", + "baidu", + "baseten", + "black-forest-labs", + "byteplus", + "cerebras", + "chutes", + "cirrascale", + "clarifai", + "cloudflare", + "cohere", + "crusoe", + "deepinfra", + "deepseek", + "dekallm", + "featherless", + "fireworks", + "friendli", + "gmicloud", + "google-ai-studio", + "google-vertex", + "groq", + "hyperbolic", + "inception", + "inceptron", + "inference-net", + "infermatic", + "inflection", + "io-net", + "ionstream", + "liquid", + "mancer", + "mara", + "minimax", + "mistral", + "modelrun", + "modular", + "moonshotai", + "morph", + "ncompass", + "nebius", + "nex-agi", + "nextbit", + "novita", + "nvidia", + "open-inference", + "openai", + "parasail", + "perceptron", + "perplexity", + "phala", + "poolside", + "recraft", + "reka", + "relace", + "sambanova", + "seed", + "siliconflow", + "sourceful", + "stepfun", + "streamlake", + "switchpoint", + "together", + "upstage", + "venice", + "wandb", + "xai", + "xiaomi", + "z-ai", + ], + UnrecognizedStr, +] +r"""Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).""" + + +class ListBYOKKeysRequestTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + offset: NotRequired[int] + r"""Number of records to skip for pagination""" + limit: NotRequired[int] + r"""Maximum number of records to return (max 100)""" + workspace_id: NotRequired[str] + r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.""" + provider: NotRequired[Provider] + r"""Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).""" + + +class ListBYOKKeysRequest(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + offset: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of records to skip for pagination""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Maximum number of records to return (max 100)""" + + workspace_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.""" + + provider: Annotated[ + Annotated[Optional[Provider], PlainValidator(validate_open_enum(False))], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).""" + + +class ListBYOKKeysResponseTypedDict(TypedDict): + result: components_listbyokkeysresponse.ListBYOKKeysResponseTypedDict + + +class ListBYOKKeysResponse(BaseModel): + next: Union[ + Callable[[], Optional[ListBYOKKeysResponse]], + Callable[[], Awaitable[Optional[ListBYOKKeysResponse]]], + ] + + result: components_listbyokkeysresponse.ListBYOKKeysResponse diff --git a/src/openrouter/operations/listgenerationcontent.py b/src/openrouter/operations/listgenerationcontent.py new file mode 100644 index 0000000..8d19500 --- /dev/null +++ b/src/openrouter/operations/listgenerationcontent.py @@ -0,0 +1,107 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ListGenerationContentGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class ListGenerationContentGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class ListGenerationContentRequestTypedDict(TypedDict): + id: str + r"""The generation ID""" + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class ListGenerationContentRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The generation ID""" + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/listguardrails.py b/src/openrouter/operations/listguardrails.py index 8345e0e..f91db9e 100644 --- a/src/openrouter/operations/listguardrails.py +++ b/src/openrouter/operations/listguardrails.py @@ -75,6 +75,8 @@ class ListGuardrailsRequestTypedDict(TypedDict): r"""Number of records to skip for pagination""" limit: NotRequired[int] r"""Maximum number of records to return (max 100)""" + workspace_id: NotRequired[str] + r"""Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.""" class ListGuardrailsRequest(BaseModel): @@ -118,6 +120,12 @@ class ListGuardrailsRequest(BaseModel): ] = None r"""Maximum number of records to return (max 100)""" + workspace_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.""" + class ListGuardrailsResponseTypedDict(TypedDict): result: components_listguardrailsresponse.ListGuardrailsResponseTypedDict diff --git a/src/openrouter/operations/listobservabilitydestinations.py b/src/openrouter/operations/listobservabilitydestinations.py new file mode 100644 index 0000000..02233af --- /dev/null +++ b/src/openrouter/operations/listobservabilitydestinations.py @@ -0,0 +1,140 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.components import ( + listobservabilitydestinationsresponse as components_listobservabilitydestinationsresponse, +) +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata +import pydantic +from typing import Awaitable, Callable, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ListObservabilityDestinationsGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class ListObservabilityDestinationsGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class ListObservabilityDestinationsRequestTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + offset: NotRequired[int] + r"""Number of records to skip for pagination""" + limit: NotRequired[int] + r"""Maximum number of records to return (max 100)""" + workspace_id: NotRequired[str] + r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.""" + + +class ListObservabilityDestinationsRequest(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + offset: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of records to skip for pagination""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Maximum number of records to return (max 100)""" + + workspace_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.""" + + +class ListObservabilityDestinationsResponseTypedDict(TypedDict): + result: components_listobservabilitydestinationsresponse.ListObservabilityDestinationsResponseTypedDict + + +class ListObservabilityDestinationsResponse(BaseModel): + next: Union[ + Callable[[], Optional[ListObservabilityDestinationsResponse]], + Callable[[], Awaitable[Optional[ListObservabilityDestinationsResponse]]], + ] + + result: components_listobservabilitydestinationsresponse.ListObservabilityDestinationsResponse diff --git a/src/openrouter/operations/listworkspaces.py b/src/openrouter/operations/listworkspaces.py new file mode 100644 index 0000000..236dc18 --- /dev/null +++ b/src/openrouter/operations/listworkspaces.py @@ -0,0 +1,132 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.components import ( + listworkspacesresponse as components_listworkspacesresponse, +) +from openrouter.types import BaseModel +from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata +import pydantic +from typing import Awaitable, Callable, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ListWorkspacesGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class ListWorkspacesGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class ListWorkspacesRequestTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + offset: NotRequired[int] + r"""Number of records to skip for pagination""" + limit: NotRequired[int] + r"""Maximum number of records to return (max 100)""" + + +class ListWorkspacesRequest(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + offset: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of records to skip for pagination""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Maximum number of records to return (max 100)""" + + +class ListWorkspacesResponseTypedDict(TypedDict): + result: components_listworkspacesresponse.ListWorkspacesResponseTypedDict + + +class ListWorkspacesResponse(BaseModel): + next: Union[ + Callable[[], Optional[ListWorkspacesResponse]], + Callable[[], Awaitable[Optional[ListWorkspacesResponse]]], + ] + + result: components_listworkspacesresponse.ListWorkspacesResponse diff --git a/src/openrouter/operations/sendchatcompletionrequest.py b/src/openrouter/operations/sendchatcompletionrequest.py index ef5ccb0..a5d2f96 100644 --- a/src/openrouter/operations/sendchatcompletionrequest.py +++ b/src/openrouter/operations/sendchatcompletionrequest.py @@ -5,6 +5,7 @@ chatrequest as components_chatrequest, chatresult as components_chatresult, chatstreamchunk as components_chatstreamchunk, + metadatalevel as components_metadatalevel, ) from openrouter.types import BaseModel from openrouter.utils import ( @@ -12,8 +13,10 @@ HeaderMetadata, RequestMetadata, eventstreaming, + validate_open_enum, ) import pydantic +from pydantic.functional_validators import PlainValidator from typing import Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -79,6 +82,10 @@ class SendChatCompletionRequestRequestTypedDict(TypedDict): r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. """ + x_open_router_experimental_metadata: NotRequired[ + components_metadatalevel.MetadataLevel + ] + r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.""" class SendChatCompletionRequestRequest(BaseModel): @@ -115,19 +122,15 @@ class SendChatCompletionRequestRequest(BaseModel): """ - -class SendChatCompletionRequestResponseBodyTypedDict(TypedDict): - r"""Successful chat completion response""" - - data: components_chatstreamchunk.ChatStreamChunkTypedDict - r"""Streaming chat completion chunk""" - - -class SendChatCompletionRequestResponseBody(BaseModel): - r"""Successful chat completion response""" - - data: components_chatstreamchunk.ChatStreamChunk - r"""Streaming chat completion chunk""" + x_open_router_experimental_metadata: Annotated[ + Annotated[ + Optional[components_metadatalevel.MetadataLevel], + PlainValidator(validate_open_enum(False)), + ], + pydantic.Field(alias="X-OpenRouter-Experimental-Metadata"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.""" SendChatCompletionRequestResponseTypedDict = TypeAliasType( diff --git a/src/openrouter/operations/updatekeys.py b/src/openrouter/operations/updatekeys.py index a8d2f86..8ea2365 100644 --- a/src/openrouter/operations/updatekeys.py +++ b/src/openrouter/operations/updatekeys.py @@ -250,6 +250,8 @@ class UpdateKeysDataTypedDict(TypedDict): r"""OpenRouter credit usage (in USD) for the current UTC month""" usage_weekly: float r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)""" + workspace_id: str + r"""The workspace ID this API key belongs to.""" expires_at: NotRequired[Nullable[datetime]] r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -314,6 +316,9 @@ class UpdateKeysData(BaseModel): usage_weekly: float r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)""" + workspace_id: str + r"""The workspace ID this API key belongs to.""" + expires_at: OptionalNullable[datetime] = UNSET r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" diff --git a/src/openrouter/operations/updateworkspace.py b/src/openrouter/operations/updateworkspace.py new file mode 100644 index 0000000..4ab7929 --- /dev/null +++ b/src/openrouter/operations/updateworkspace.py @@ -0,0 +1,123 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.components import ( + updateworkspacerequest as components_updateworkspacerequest, +) +from openrouter.types import BaseModel +from openrouter.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class UpdateWorkspaceGlobalsTypedDict(TypedDict): + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class UpdateWorkspaceGlobals(BaseModel): + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class UpdateWorkspaceRequestTypedDict(TypedDict): + id: str + r"""The workspace ID (UUID) or slug""" + update_workspace_request: ( + components_updateworkspacerequest.UpdateWorkspaceRequestTypedDict + ) + 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. + + """ + x_open_router_title: NotRequired[str] + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +class UpdateWorkspaceRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The workspace ID (UUID) or slug""" + + update_workspace_request: Annotated[ + components_updateworkspacerequest.UpdateWorkspaceRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + http_referer: Annotated[ + Optional[str], + pydantic.Field(alias="HTTP-Referer"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + 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. + + """ + + x_open_router_title: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Title"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/responses.py b/src/openrouter/responses.py index 4844bc0..1ceb71c 100644 --- a/src/openrouter/responses.py +++ b/src/openrouter/responses.py @@ -25,7 +25,14 @@ def send( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, background: OptionalNullable[bool] = UNSET, + cache_control: Optional[ + Union[ + components.AnthropicCacheControlDirective, + components.AnthropicCacheControlDirectiveTypedDict, + ] + ] = None, frequency_penalty: OptionalNullable[float] = UNSET, image_config: Optional[ Union[ @@ -112,7 +119,9 @@ def send( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. :param background: + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param frequency_penalty: :param image_config: 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. :param include: @@ -160,7 +169,14 @@ def send( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, background: OptionalNullable[bool] = UNSET, + cache_control: Optional[ + Union[ + components.AnthropicCacheControlDirective, + components.AnthropicCacheControlDirectiveTypedDict, + ] + ] = None, frequency_penalty: OptionalNullable[float] = UNSET, image_config: Optional[ Union[ @@ -247,7 +263,9 @@ def send( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. :param background: + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param frequency_penalty: :param image_config: 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. :param include: @@ -294,7 +312,14 @@ def send( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, background: OptionalNullable[bool] = UNSET, + cache_control: Optional[ + Union[ + components.AnthropicCacheControlDirective, + components.AnthropicCacheControlDirectiveTypedDict, + ] + ] = None, frequency_penalty: OptionalNullable[float] = UNSET, image_config: Optional[ Union[ @@ -381,7 +406,9 @@ def send( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. :param background: + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param frequency_penalty: :param image_config: 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. :param include: @@ -435,8 +462,12 @@ def send( http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, + x_open_router_experimental_metadata=x_open_router_experimental_metadata, responses_request=components.ResponsesRequest( background=background, + cache_control=utils.get_pydantic_model( + cache_control, Optional[components.AnthropicCacheControlDirective] + ), frequency_penalty=frequency_penalty, image_config=image_config, include=include, @@ -543,6 +574,7 @@ def send( "400", "401", "402", + "403", "404", "408", "413", @@ -570,7 +602,7 @@ def send( return eventstreaming.EventStream( http_res, lambda raw: utils.unmarshal_json( - raw, operations.CreateResponsesResponseBody + raw, components.ResponsesStreamingResponse ).data, sentinel="[DONE]", client_ref=self, @@ -597,6 +629,12 @@ def send( raise errors.PaymentRequiredResponseError( response_data, http_res, http_res_text ) + if utils.match_response(http_res, "403", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res, http_res_text + ) + raise errors.ForbiddenResponseError(response_data, http_res, http_res_text) if utils.match_response(http_res, "404", "application/json"): http_res_text = utils.stream_to_text(http_res) response_data = unmarshal_json_response( @@ -696,7 +734,14 @@ async def send_async( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, background: OptionalNullable[bool] = UNSET, + cache_control: Optional[ + Union[ + components.AnthropicCacheControlDirective, + components.AnthropicCacheControlDirectiveTypedDict, + ] + ] = None, frequency_penalty: OptionalNullable[float] = UNSET, image_config: Optional[ Union[ @@ -783,7 +828,9 @@ async def send_async( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. :param background: + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param frequency_penalty: :param image_config: 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. :param include: @@ -831,7 +878,14 @@ async def send_async( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, background: OptionalNullable[bool] = UNSET, + cache_control: Optional[ + Union[ + components.AnthropicCacheControlDirective, + components.AnthropicCacheControlDirectiveTypedDict, + ] + ] = None, frequency_penalty: OptionalNullable[float] = UNSET, image_config: Optional[ Union[ @@ -918,7 +972,9 @@ async def send_async( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. :param background: + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param frequency_penalty: :param image_config: 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. :param include: @@ -965,7 +1021,14 @@ async def send_async( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None, background: OptionalNullable[bool] = UNSET, + cache_control: Optional[ + Union[ + components.AnthropicCacheControlDirective, + components.AnthropicCacheControlDirectiveTypedDict, + ] + ] = None, frequency_penalty: OptionalNullable[float] = UNSET, image_config: Optional[ Union[ @@ -1052,7 +1115,9 @@ async def send_async( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + :param x_open_router_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. :param background: + :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. :param frequency_penalty: :param image_config: 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. :param include: @@ -1106,8 +1171,12 @@ async def send_async( http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, + x_open_router_experimental_metadata=x_open_router_experimental_metadata, responses_request=components.ResponsesRequest( background=background, + cache_control=utils.get_pydantic_model( + cache_control, Optional[components.AnthropicCacheControlDirective] + ), frequency_penalty=frequency_penalty, image_config=image_config, include=include, @@ -1214,6 +1283,7 @@ async def send_async( "400", "401", "402", + "403", "404", "408", "413", @@ -1241,7 +1311,7 @@ async def send_async( return eventstreaming.EventStreamAsync( http_res, lambda raw: utils.unmarshal_json( - raw, operations.CreateResponsesResponseBody + raw, components.ResponsesStreamingResponse ).data, sentinel="[DONE]", client_ref=self, @@ -1268,6 +1338,12 @@ async def send_async( raise errors.PaymentRequiredResponseError( response_data, http_res, http_res_text ) + if utils.match_response(http_res, "403", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res, http_res_text + ) + raise errors.ForbiddenResponseError(response_data, http_res, http_res_text) if utils.match_response(http_res, "404", "application/json"): http_res_text = await utils.stream_to_text_async(http_res) response_data = unmarshal_json_response( diff --git a/src/openrouter/sdk.py b/src/openrouter/sdk.py index 43d1636..c3d5d64 100644 --- a/src/openrouter/sdk.py +++ b/src/openrouter/sdk.py @@ -19,6 +19,7 @@ from openrouter.analytics import Analytics from openrouter.api_keys import APIKeys from openrouter.beta import Beta + from openrouter.byok import Byok from openrouter.chat import Chat from openrouter.credits import Credits from openrouter.embeddings import Embeddings @@ -27,10 +28,14 @@ from openrouter.guardrails import Guardrails from openrouter.models_ import Models from openrouter.oauth import OAuth + from openrouter.observability import Observability from openrouter.organization import Organization from openrouter.providers import Providers from openrouter.rerank import Rerank + from openrouter.stt import Stt + from openrouter.tts import Tts from openrouter.video_generation import VideoGeneration + from openrouter.workspaces import Workspaces class OpenRouter(BaseSDK): @@ -40,8 +45,14 @@ class OpenRouter(BaseSDK): analytics: "Analytics" r"""Analytics and usage endpoints""" + tts: "Tts" + r"""Text-to-speech endpoints""" + stt: "Stt" + r"""Speech-to-text endpoints""" o_auth: "OAuth" r"""OAuth authentication endpoints""" + byok: "Byok" + r"""BYOK endpoints""" chat: "Chat" credits: "Credits" r"""Credit management endpoints""" @@ -57,6 +68,8 @@ class OpenRouter(BaseSDK): r"""API key management endpoints""" models: "Models" r"""Model information endpoints""" + observability: "Observability" + r"""Observability endpoints""" organization: "Organization" r"""Organization endpoints""" providers: "Providers" @@ -66,9 +79,14 @@ class OpenRouter(BaseSDK): beta: "Beta" video_generation: "VideoGeneration" r"""Video Generation endpoints""" + workspaces: "Workspaces" + r"""Workspaces endpoints""" _sub_sdk_map = { "analytics": ("openrouter.analytics", "Analytics"), + "tts": ("openrouter.tts", "Tts"), + "stt": ("openrouter.stt", "Stt"), "o_auth": ("openrouter.oauth", "OAuth"), + "byok": ("openrouter.byok", "Byok"), "chat": ("openrouter.chat", "Chat"), "credits": ("openrouter.credits", "Credits"), "embeddings": ("openrouter.embeddings", "Embeddings"), @@ -77,11 +95,13 @@ class OpenRouter(BaseSDK): "guardrails": ("openrouter.guardrails", "Guardrails"), "api_keys": ("openrouter.api_keys", "APIKeys"), "models": ("openrouter.models_", "Models"), + "observability": ("openrouter.observability", "Observability"), "organization": ("openrouter.organization", "Organization"), "providers": ("openrouter.providers", "Providers"), "rerank": ("openrouter.rerank", "Rerank"), "beta": ("openrouter.beta", "Beta"), "video_generation": ("openrouter.video_generation", "VideoGeneration"), + "workspaces": ("openrouter.workspaces", "Workspaces"), } def __init__( diff --git a/src/openrouter/stt.py b/src/openrouter/stt.py new file mode 100644 index 0000000..3b12f69 --- /dev/null +++ b/src/openrouter/stt.py @@ -0,0 +1,407 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from openrouter import components, errors, operations, utils +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 + + +class Stt(BaseSDK): + r"""Speech-to-text endpoints""" + + def create_transcription( + self, + *, + input_audio: Union[components.STTInputAudio, components.STTInputAudioTypedDict], + model: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + language: Optional[str] = None, + provider: Optional[ + Union[components.STTRequestProvider, components.STTRequestProviderTypedDict] + ] = None, + temperature: Optional[float] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.STTResponse: + r"""Create transcription + + Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text. + + :param input_audio: Base64-encoded audio to transcribe + :param model: STT model identifier + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param language: ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted. + :param provider: Provider-specific passthrough configuration + :param temperature: Sampling temperature for transcription + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.CreateAudioTranscriptionsRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + stt_request=components.STTRequest( + input_audio=utils.get_pydantic_model( + input_audio, components.STTInputAudio + ), + language=language, + model=model, + provider=utils.get_pydantic_model( + provider, Optional[components.STTRequestProvider] + ), + temperature=temperature, + ), + ) + + req = self._build_request( + method="POST", + path="/audio/transcriptions", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.CreateAudioTranscriptionsGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.stt_request, False, False, "json", components.STTRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="createAudioTranscriptions", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=[ + "400", + "401", + "402", + "404", + "429", + "4XX", + "500", + "502", + "503", + "524", + "529", + "5XX", + ], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(components.STTResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "402", "application/json"): + response_data = unmarshal_json_response( + errors.PaymentRequiredResponseErrorData, http_res + ) + raise errors.PaymentRequiredResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "502", "application/json"): + response_data = unmarshal_json_response( + errors.BadGatewayResponseErrorData, http_res + ) + raise errors.BadGatewayResponseError(response_data, http_res) + if utils.match_response(http_res, "503", "application/json"): + response_data = unmarshal_json_response( + errors.ServiceUnavailableResponseErrorData, http_res + ) + raise errors.ServiceUnavailableResponseError(response_data, http_res) + if utils.match_response(http_res, "524", "application/json"): + response_data = unmarshal_json_response( + errors.EdgeNetworkTimeoutResponseErrorData, http_res + ) + raise errors.EdgeNetworkTimeoutResponseError(response_data, http_res) + if utils.match_response(http_res, "529", "application/json"): + response_data = unmarshal_json_response( + errors.ProviderOverloadedResponseErrorData, http_res + ) + raise errors.ProviderOverloadedResponseError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def create_transcription_async( + self, + *, + input_audio: Union[components.STTInputAudio, components.STTInputAudioTypedDict], + model: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + language: Optional[str] = None, + provider: Optional[ + Union[components.STTRequestProvider, components.STTRequestProviderTypedDict] + ] = None, + temperature: Optional[float] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.STTResponse: + r"""Create transcription + + Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text. + + :param input_audio: Base64-encoded audio to transcribe + :param model: STT model identifier + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param language: ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted. + :param provider: Provider-specific passthrough configuration + :param temperature: Sampling temperature for transcription + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.CreateAudioTranscriptionsRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + stt_request=components.STTRequest( + input_audio=utils.get_pydantic_model( + input_audio, components.STTInputAudio + ), + language=language, + model=model, + provider=utils.get_pydantic_model( + provider, Optional[components.STTRequestProvider] + ), + temperature=temperature, + ), + ) + + req = self._build_request_async( + method="POST", + path="/audio/transcriptions", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.CreateAudioTranscriptionsGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.stt_request, False, False, "json", components.STTRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="createAudioTranscriptions", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=[ + "400", + "401", + "402", + "404", + "429", + "4XX", + "500", + "502", + "503", + "524", + "529", + "5XX", + ], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(components.STTResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "402", "application/json"): + response_data = unmarshal_json_response( + errors.PaymentRequiredResponseErrorData, http_res + ) + raise errors.PaymentRequiredResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "502", "application/json"): + response_data = unmarshal_json_response( + errors.BadGatewayResponseErrorData, http_res + ) + raise errors.BadGatewayResponseError(response_data, http_res) + if utils.match_response(http_res, "503", "application/json"): + response_data = unmarshal_json_response( + errors.ServiceUnavailableResponseErrorData, http_res + ) + raise errors.ServiceUnavailableResponseError(response_data, http_res) + if utils.match_response(http_res, "524", "application/json"): + response_data = unmarshal_json_response( + errors.EdgeNetworkTimeoutResponseErrorData, http_res + ) + raise errors.EdgeNetworkTimeoutResponseError(response_data, http_res) + if utils.match_response(http_res, "529", "application/json"): + response_data = unmarshal_json_response( + errors.ProviderOverloadedResponseErrorData, http_res + ) + raise errors.ProviderOverloadedResponseError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) diff --git a/src/openrouter/tts.py b/src/openrouter/tts.py new file mode 100644 index 0000000..66886a4 --- /dev/null +++ b/src/openrouter/tts.py @@ -0,0 +1,472 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +import httpx +from openrouter import components, errors, operations, utils +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 + + +class Tts(BaseSDK): + r"""Text-to-speech endpoints""" + + def create_speech( + self, + *, + input: str, + model: str, + voice: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + provider: Optional[ + Union[ + components.SpeechRequestProvider, + components.SpeechRequestProviderTypedDict, + ] + ] = None, + response_format: Optional[components.ResponseFormatEnum] = "pcm", + speed: Optional[float] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> httpx.Response: + r"""Create speech + + Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav). + + :param input: Text to synthesize + :param model: TTS model identifier + :param voice: Voice identifier (provider-specific). + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param provider: Provider-specific passthrough configuration + :param response_format: Audio output format + :param speed: Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.CreateAudioSpeechRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + speech_request=components.SpeechRequest( + input=input, + model=model, + provider=utils.get_pydantic_model( + provider, Optional[components.SpeechRequestProvider] + ), + response_format=response_format, + speed=speed, + voice=voice, + ), + ) + + req = self._build_request( + method="POST", + path="/audio/speech", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="audio/*", + http_headers=http_headers, + _globals=operations.CreateAudioSpeechGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.speech_request, False, False, "json", components.SpeechRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="createAudioSpeech", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=[ + "400", + "401", + "402", + "404", + "429", + "4XX", + "500", + "502", + "503", + "524", + "529", + "5XX", + ], + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "audio/*"): + return http_res + if utils.match_response(http_res, "400", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, http_res, http_res_text + ) + raise errors.BadRequestResponseError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "401", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.UnauthorizedResponseErrorData, http_res, http_res_text + ) + raise errors.UnauthorizedResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "402", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.PaymentRequiredResponseErrorData, http_res, http_res_text + ) + raise errors.PaymentRequiredResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "404", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res, http_res_text + ) + raise errors.NotFoundResponseError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "429", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.TooManyRequestsResponseErrorData, http_res, http_res_text + ) + raise errors.TooManyRequestsResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "500", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.InternalServerResponseErrorData, http_res, http_res_text + ) + raise errors.InternalServerResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "502", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.BadGatewayResponseErrorData, http_res, http_res_text + ) + raise errors.BadGatewayResponseError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "503", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.ServiceUnavailableResponseErrorData, http_res, http_res_text + ) + raise errors.ServiceUnavailableResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "524", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.EdgeNetworkTimeoutResponseErrorData, http_res, http_res_text + ) + raise errors.EdgeNetworkTimeoutResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "529", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.ProviderOverloadedResponseErrorData, http_res, http_res_text + ) + raise errors.ProviderOverloadedResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "Unexpected response received", http_res, http_res_text + ) + + async def create_speech_async( + self, + *, + input: str, + model: str, + voice: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + provider: Optional[ + Union[ + components.SpeechRequestProvider, + components.SpeechRequestProviderTypedDict, + ] + ] = None, + response_format: Optional[components.ResponseFormatEnum] = "pcm", + speed: Optional[float] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> httpx.Response: + r"""Create speech + + Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav). + + :param input: Text to synthesize + :param model: TTS model identifier + :param voice: Voice identifier (provider-specific). + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param provider: Provider-specific passthrough configuration + :param response_format: Audio output format + :param speed: Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.CreateAudioSpeechRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + speech_request=components.SpeechRequest( + input=input, + model=model, + provider=utils.get_pydantic_model( + provider, Optional[components.SpeechRequestProvider] + ), + response_format=response_format, + speed=speed, + voice=voice, + ), + ) + + req = self._build_request_async( + method="POST", + path="/audio/speech", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="audio/*", + http_headers=http_headers, + _globals=operations.CreateAudioSpeechGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.speech_request, False, False, "json", components.SpeechRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="createAudioSpeech", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=[ + "400", + "401", + "402", + "404", + "429", + "4XX", + "500", + "502", + "503", + "524", + "529", + "5XX", + ], + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "audio/*"): + return http_res + if utils.match_response(http_res, "400", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, http_res, http_res_text + ) + raise errors.BadRequestResponseError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "401", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.UnauthorizedResponseErrorData, http_res, http_res_text + ) + raise errors.UnauthorizedResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "402", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.PaymentRequiredResponseErrorData, http_res, http_res_text + ) + raise errors.PaymentRequiredResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "404", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res, http_res_text + ) + raise errors.NotFoundResponseError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "429", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.TooManyRequestsResponseErrorData, http_res, http_res_text + ) + raise errors.TooManyRequestsResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "500", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.InternalServerResponseErrorData, http_res, http_res_text + ) + raise errors.InternalServerResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "502", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.BadGatewayResponseErrorData, http_res, http_res_text + ) + raise errors.BadGatewayResponseError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "503", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.ServiceUnavailableResponseErrorData, http_res, http_res_text + ) + raise errors.ServiceUnavailableResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "524", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.EdgeNetworkTimeoutResponseErrorData, http_res, http_res_text + ) + raise errors.EdgeNetworkTimeoutResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "529", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.ProviderOverloadedResponseErrorData, http_res, http_res_text + ) + raise errors.ProviderOverloadedResponseError( + response_data, http_res, http_res_text + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "Unexpected response received", http_res, http_res_text + ) diff --git a/src/openrouter/video_generation.py b/src/openrouter/video_generation.py index 238bbcc..d079f5a 100644 --- a/src/openrouter/video_generation.py +++ b/src/openrouter/video_generation.py @@ -22,6 +22,7 @@ def generate( x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, aspect_ratio: Optional[components.AspectRatio] = None, + callback_url: Optional[str] = None, duration: Optional[int] = None, frame_images: Optional[ Union[List[components.FrameImage], List[components.FrameImageTypedDict]] @@ -34,7 +35,10 @@ def generate( ] ] = None, provider: Optional[ - Union[components.Provider, components.ProviderTypedDict] + Union[ + components.VideoGenerationRequestProvider, + components.VideoGenerationRequestProviderTypedDict, + ] ] = None, resolution: Optional[components.Resolution] = None, seed: Optional[int] = None, @@ -58,6 +62,7 @@ def generate( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param aspect_ratio: Aspect ratio of the generated video + :param callback_url: URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. :param duration: Duration of the generated video in seconds :param frame_images: Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. :param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. @@ -87,6 +92,7 @@ def generate( x_open_router_categories=x_open_router_categories, video_generation_request=components.VideoGenerationRequest( aspect_ratio=aspect_ratio, + callback_url=callback_url, duration=duration, frame_images=utils.get_pydantic_model( frame_images, Optional[List[components.FrameImage]] @@ -98,7 +104,7 @@ def generate( model=model, prompt=prompt, provider=utils.get_pydantic_model( - provider, Optional[components.Provider] + provider, Optional[components.VideoGenerationRequestProvider] ), resolution=resolution, seed=seed, @@ -217,6 +223,7 @@ async def generate_async( x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, aspect_ratio: Optional[components.AspectRatio] = None, + callback_url: Optional[str] = None, duration: Optional[int] = None, frame_images: Optional[ Union[List[components.FrameImage], List[components.FrameImageTypedDict]] @@ -229,7 +236,10 @@ async def generate_async( ] ] = None, provider: Optional[ - Union[components.Provider, components.ProviderTypedDict] + Union[ + components.VideoGenerationRequestProvider, + components.VideoGenerationRequestProviderTypedDict, + ] ] = None, resolution: Optional[components.Resolution] = None, seed: Optional[int] = None, @@ -253,6 +263,7 @@ async def generate_async( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param aspect_ratio: Aspect ratio of the generated video + :param callback_url: URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. :param duration: Duration of the generated video in seconds :param frame_images: Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. :param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. @@ -282,6 +293,7 @@ async def generate_async( x_open_router_categories=x_open_router_categories, video_generation_request=components.VideoGenerationRequest( aspect_ratio=aspect_ratio, + callback_url=callback_url, duration=duration, frame_images=utils.get_pydantic_model( frame_images, Optional[List[components.FrameImage]] @@ -293,7 +305,7 @@ async def generate_async( model=model, prompt=prompt, provider=utils.get_pydantic_model( - provider, Optional[components.Provider] + provider, Optional[components.VideoGenerationRequestProvider] ), resolution=resolution, seed=seed, diff --git a/src/openrouter/workspaces.py b/src/openrouter/workspaces.py new file mode 100644 index 0000000..1330688 --- /dev/null +++ b/src/openrouter/workspaces.py @@ -0,0 +1,2143 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from jsonpath import JSONPath +from openrouter import components, errors, operations, utils +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, Awaitable, Dict, List, Mapping, Optional, Union + + +class Workspaces(BaseSDK): + r"""Workspaces endpoints""" + + def list( + self, + *, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + offset: Optional[int] = None, + limit: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[operations.ListWorkspacesResponse]: + r"""List workspaces + + List all workspaces for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param offset: Number of records to skip for pagination + :param limit: Maximum number of records to return (max 100) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.ListWorkspacesRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=offset, + limit=limit, + ) + + req = self._build_request( + method="GET", + path="/workspaces", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.ListWorkspacesGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="listWorkspaces", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[operations.ListWorkspacesResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + offset = request.offset if not request.offset is None else 0 + + if not http_res.text: + return None + results = JSONPath("$.data").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return None + limit = request.limit if not request.limit is None else 0 + if len(results[0]) < limit: + return None + next_offset = offset + len(results[0]) + + return self.list( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=next_offset, + limit=limit, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.ListWorkspacesResponse( + result=unmarshal_json_response( + components.ListWorkspacesResponse, http_res + ), + next=next_func, + ) + 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, "500", "application/json"): + response_data = unmarshal_json_response( + errors.InternalServerResponseErrorData, http_res + ) + raise errors.InternalServerResponseError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def list_async( + self, + *, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + offset: Optional[int] = None, + limit: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[operations.ListWorkspacesResponse]: + r"""List workspaces + + List all workspaces for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param offset: Number of records to skip for pagination + :param limit: Maximum number of records to return (max 100) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.ListWorkspacesRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=offset, + limit=limit, + ) + + req = self._build_request_async( + method="GET", + path="/workspaces", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.ListWorkspacesGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="listWorkspaces", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Awaitable[Optional[operations.ListWorkspacesResponse]]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + async def empty_result(): + return None + + offset = request.offset if not request.offset is None else 0 + + if not http_res.text: + return empty_result() + results = JSONPath("$.data").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return empty_result() + limit = request.limit if not request.limit is None else 0 + if len(results[0]) < limit: + return empty_result() + next_offset = offset + len(results[0]) + + return self.list_async( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + offset=next_offset, + limit=limit, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.ListWorkspacesResponse( + result=unmarshal_json_response( + components.ListWorkspacesResponse, http_res + ), + next=next_func, + ) + 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, "500", "application/json"): + response_data = unmarshal_json_response( + errors.InternalServerResponseErrorData, http_res + ) + raise errors.InternalServerResponseError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + def create( + self, + *, + name: str, + slug: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + default_image_model: OptionalNullable[str] = UNSET, + default_provider_sort: OptionalNullable[str] = UNSET, + default_text_model: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET, + io_logging_sampling_rate: Optional[float] = None, + is_data_discount_logging_enabled: Optional[bool] = None, + is_observability_broadcast_enabled: Optional[bool] = None, + is_observability_io_logging_enabled: Optional[bool] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.CreateWorkspaceResponse: + r"""Create a workspace + + Create a new workspace for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param name: Name for the new workspace + :param slug: URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens) + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param default_image_model: Default image model for this workspace + :param default_provider_sort: Default provider sort preference (price, throughput, latency, exacto) + :param default_text_model: Default text model for this workspace + :param description: Description of the workspace + :param io_logging_api_key_ids: Optional array of API key IDs to filter I/O logging + :param io_logging_sampling_rate: Sampling rate for I/O logging (0.0001-1) + :param is_data_discount_logging_enabled: Whether data discount logging is enabled + :param is_observability_broadcast_enabled: Whether broadcast is enabled + :param is_observability_io_logging_enabled: Whether private logging is enabled + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.CreateWorkspaceRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + create_workspace_request=components.CreateWorkspaceRequest( + default_image_model=default_image_model, + default_provider_sort=default_provider_sort, + default_text_model=default_text_model, + description=description, + io_logging_api_key_ids=io_logging_api_key_ids, + io_logging_sampling_rate=io_logging_sampling_rate, + is_data_discount_logging_enabled=is_data_discount_logging_enabled, + is_observability_broadcast_enabled=is_observability_broadcast_enabled, + is_observability_io_logging_enabled=is_observability_io_logging_enabled, + name=name, + slug=slug, + ), + ) + + req = self._build_request( + method="POST", + path="/workspaces", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.CreateWorkspaceGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.create_workspace_request, + False, + False, + "json", + components.CreateWorkspaceRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="createWorkspace", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(components.CreateWorkspaceResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def create_async( + self, + *, + name: str, + slug: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + default_image_model: OptionalNullable[str] = UNSET, + default_provider_sort: OptionalNullable[str] = UNSET, + default_text_model: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET, + io_logging_sampling_rate: Optional[float] = None, + is_data_discount_logging_enabled: Optional[bool] = None, + is_observability_broadcast_enabled: Optional[bool] = None, + is_observability_io_logging_enabled: Optional[bool] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.CreateWorkspaceResponse: + r"""Create a workspace + + Create a new workspace for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param name: Name for the new workspace + :param slug: URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens) + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param default_image_model: Default image model for this workspace + :param default_provider_sort: Default provider sort preference (price, throughput, latency, exacto) + :param default_text_model: Default text model for this workspace + :param description: Description of the workspace + :param io_logging_api_key_ids: Optional array of API key IDs to filter I/O logging + :param io_logging_sampling_rate: Sampling rate for I/O logging (0.0001-1) + :param is_data_discount_logging_enabled: Whether data discount logging is enabled + :param is_observability_broadcast_enabled: Whether broadcast is enabled + :param is_observability_io_logging_enabled: Whether private logging is enabled + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.CreateWorkspaceRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + create_workspace_request=components.CreateWorkspaceRequest( + default_image_model=default_image_model, + default_provider_sort=default_provider_sort, + default_text_model=default_text_model, + description=description, + io_logging_api_key_ids=io_logging_api_key_ids, + io_logging_sampling_rate=io_logging_sampling_rate, + is_data_discount_logging_enabled=is_data_discount_logging_enabled, + is_observability_broadcast_enabled=is_observability_broadcast_enabled, + is_observability_io_logging_enabled=is_observability_io_logging_enabled, + name=name, + slug=slug, + ), + ) + + req = self._build_request_async( + method="POST", + path="/workspaces", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.CreateWorkspaceGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.create_workspace_request, + False, + False, + "json", + components.CreateWorkspaceRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="createWorkspace", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(components.CreateWorkspaceResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + def delete( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.DeleteWorkspaceResponse: + r"""Delete a workspace + + Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The workspace ID (UUID) or slug + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.DeleteWorkspaceRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + ) + + req = self._build_request( + method="DELETE", + path="/workspaces/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.DeleteWorkspaceGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="deleteWorkspace", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(components.DeleteWorkspaceResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.DeleteWorkspaceResponse: + r"""Delete a workspace + + Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The workspace ID (UUID) or slug + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.DeleteWorkspaceRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + ) + + req = self._build_request_async( + method="DELETE", + path="/workspaces/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.DeleteWorkspaceGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="deleteWorkspace", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(components.DeleteWorkspaceResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + def get( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.GetWorkspaceResponse: + r"""Get a workspace + + Get a single workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The workspace ID (UUID) or slug + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.GetWorkspaceRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + ) + + req = self._build_request( + method="GET", + path="/workspaces/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.GetWorkspaceGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getWorkspace", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(components.GetWorkspaceResponse, 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, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def get_async( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.GetWorkspaceResponse: + r"""Get a workspace + + Get a single workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The workspace ID (UUID) or slug + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.GetWorkspaceRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + ) + + req = self._build_request_async( + method="GET", + path="/workspaces/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.GetWorkspaceGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getWorkspace", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["401", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(components.GetWorkspaceResponse, 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, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + def update( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + default_image_model: OptionalNullable[str] = UNSET, + default_provider_sort: OptionalNullable[str] = UNSET, + default_text_model: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET, + io_logging_sampling_rate: Optional[float] = None, + is_data_discount_logging_enabled: Optional[bool] = None, + is_observability_broadcast_enabled: Optional[bool] = None, + is_observability_io_logging_enabled: Optional[bool] = None, + name: Optional[str] = None, + slug: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.UpdateWorkspaceResponse: + r"""Update a workspace + + Update an existing workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The workspace ID (UUID) or slug + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param default_image_model: Default image model for this workspace + :param default_provider_sort: Default provider sort preference (price, throughput, latency, exacto) + :param default_text_model: Default text model for this workspace + :param description: New description for the workspace + :param io_logging_api_key_ids: Optional array of API key IDs to filter I/O logging + :param io_logging_sampling_rate: Sampling rate for I/O logging (0.0001-1) + :param is_data_discount_logging_enabled: Whether data discount logging is enabled + :param is_observability_broadcast_enabled: Whether broadcast is enabled + :param is_observability_io_logging_enabled: Whether private logging is enabled + :param name: New name for the workspace + :param slug: New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.UpdateWorkspaceRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + update_workspace_request=components.UpdateWorkspaceRequest( + default_image_model=default_image_model, + default_provider_sort=default_provider_sort, + default_text_model=default_text_model, + description=description, + io_logging_api_key_ids=io_logging_api_key_ids, + io_logging_sampling_rate=io_logging_sampling_rate, + is_data_discount_logging_enabled=is_data_discount_logging_enabled, + is_observability_broadcast_enabled=is_observability_broadcast_enabled, + is_observability_io_logging_enabled=is_observability_io_logging_enabled, + name=name, + slug=slug, + ), + ) + + req = self._build_request( + method="PATCH", + path="/workspaces/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.UpdateWorkspaceGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_workspace_request, + False, + False, + "json", + components.UpdateWorkspaceRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="updateWorkspace", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(components.UpdateWorkspaceResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def update_async( + self, + *, + id: str, + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + default_image_model: OptionalNullable[str] = UNSET, + default_provider_sort: OptionalNullable[str] = UNSET, + default_text_model: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET, + io_logging_sampling_rate: Optional[float] = None, + is_data_discount_logging_enabled: Optional[bool] = None, + is_observability_broadcast_enabled: Optional[bool] = None, + is_observability_io_logging_enabled: Optional[bool] = None, + name: Optional[str] = None, + slug: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.UpdateWorkspaceResponse: + r"""Update a workspace + + Update an existing workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The workspace ID (UUID) or slug + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param default_image_model: Default image model for this workspace + :param default_provider_sort: Default provider sort preference (price, throughput, latency, exacto) + :param default_text_model: Default text model for this workspace + :param description: New description for the workspace + :param io_logging_api_key_ids: Optional array of API key IDs to filter I/O logging + :param io_logging_sampling_rate: Sampling rate for I/O logging (0.0001-1) + :param is_data_discount_logging_enabled: Whether data discount logging is enabled + :param is_observability_broadcast_enabled: Whether broadcast is enabled + :param is_observability_io_logging_enabled: Whether private logging is enabled + :param name: New name for the workspace + :param slug: New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.UpdateWorkspaceRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + update_workspace_request=components.UpdateWorkspaceRequest( + default_image_model=default_image_model, + default_provider_sort=default_provider_sort, + default_text_model=default_text_model, + description=description, + io_logging_api_key_ids=io_logging_api_key_ids, + io_logging_sampling_rate=io_logging_sampling_rate, + is_data_discount_logging_enabled=is_data_discount_logging_enabled, + is_observability_broadcast_enabled=is_observability_broadcast_enabled, + is_observability_io_logging_enabled=is_observability_io_logging_enabled, + name=name, + slug=slug, + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/workspaces/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.UpdateWorkspaceGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_workspace_request, + False, + False, + "json", + components.UpdateWorkspaceRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="updateWorkspace", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(components.UpdateWorkspaceResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + def bulk_add_members( + self, + *, + id: str, + user_ids: List[str], + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.BulkAddWorkspaceMembersResponse: + r"""Bulk add members to a workspace + + Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The workspace ID (UUID) or slug + :param user_ids: List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization. + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.BulkAddWorkspaceMembersRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + bulk_add_workspace_members_request=components.BulkAddWorkspaceMembersRequest( + user_ids=user_ids, + ), + ) + + req = self._build_request( + method="POST", + path="/workspaces/{id}/members/add", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.BulkAddWorkspaceMembersGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bulk_add_workspace_members_request, + False, + False, + "json", + components.BulkAddWorkspaceMembersRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="bulkAddWorkspaceMembers", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + components.BulkAddWorkspaceMembersResponse, http_res + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def bulk_add_members_async( + self, + *, + id: str, + user_ids: List[str], + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.BulkAddWorkspaceMembersResponse: + r"""Bulk add members to a workspace + + Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The workspace ID (UUID) or slug + :param user_ids: List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization. + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.BulkAddWorkspaceMembersRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + bulk_add_workspace_members_request=components.BulkAddWorkspaceMembersRequest( + user_ids=user_ids, + ), + ) + + req = self._build_request_async( + method="POST", + path="/workspaces/{id}/members/add", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.BulkAddWorkspaceMembersGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bulk_add_workspace_members_request, + False, + False, + "json", + components.BulkAddWorkspaceMembersRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="bulkAddWorkspaceMembers", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + components.BulkAddWorkspaceMembersResponse, http_res + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + def bulk_remove_members( + self, + *, + id: str, + user_ids: List[str], + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.BulkRemoveWorkspaceMembersResponse: + r"""Bulk remove members from a workspace + + Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The workspace ID (UUID) or slug + :param user_ids: List of user IDs to remove from the workspace + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.BulkRemoveWorkspaceMembersRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + bulk_remove_workspace_members_request=components.BulkRemoveWorkspaceMembersRequest( + user_ids=user_ids, + ), + ) + + req = self._build_request( + method="POST", + path="/workspaces/{id}/members/remove", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.BulkRemoveWorkspaceMembersGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bulk_remove_workspace_members_request, + False, + False, + "json", + components.BulkRemoveWorkspaceMembersRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="bulkRemoveWorkspaceMembers", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + components.BulkRemoveWorkspaceMembersResponse, http_res + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) + + async def bulk_remove_members_async( + self, + *, + id: str, + user_ids: List[str], + http_referer: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> components.BulkRemoveWorkspaceMembersResponse: + r"""Bulk remove members from a workspace + + Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required. + + :param id: The workspace ID (UUID) or slug + :param user_ids: List of user IDs to remove from the workspace + :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. + + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = operations.BulkRemoveWorkspaceMembersRequest( + http_referer=http_referer, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + id=id, + bulk_remove_workspace_members_request=components.BulkRemoveWorkspaceMembersRequest( + user_ids=user_ids, + ), + ) + + req = self._build_request_async( + method="POST", + path="/workspaces/{id}/members/remove", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=operations.BulkRemoveWorkspaceMembersGlobals( + http_referer=self.sdk_configuration.globals.http_referer, + 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=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bulk_remove_workspace_members_request, + False, + False, + "json", + components.BulkRemoveWorkspaceMembersRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="bulkRemoveWorkspaceMembers", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, components.Security + ), + ), + request=req, + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + components.BulkRemoveWorkspaceMembersResponse, http_res + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, 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, "403", "application/json"): + response_data = unmarshal_json_response( + errors.ForbiddenResponseErrorData, http_res + ) + raise errors.ForbiddenResponseError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + errors.NotFoundResponseErrorData, http_res + ) + raise errors.NotFoundResponseError(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) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.OpenRouterDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.OpenRouterDefaultError("Unexpected response received", http_res) diff --git a/uv.lock b/uv.lock index f7af3d4..72f33e0 100644 --- a/uv.lock +++ b/uv.lock @@ -220,7 +220,7 @@ wheels = [ [[package]] name = "openrouter" -version = "0.9.1" +version = "0.9.2" source = { editable = "." } dependencies = [ { name = "httpcore" }, From f6de18e12da48d6b781405da04869e97ad1c5248 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 00:50:32 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow