pyfect-dev 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyfect/__init__.py +729 -0
- pyfect/_all.py +242 -0
- pyfect/_background.py +28 -0
- pyfect/_binary_codecs.py +124 -0
- pyfect/_cached.py +165 -0
- pyfect/_catch.py +128 -0
- pyfect/_catch_reason.py +574 -0
- pyfect/_concurrency.py +291 -0
- pyfect/_context_effects.py +163 -0
- pyfect/_context_managers.py +76 -0
- pyfect/_core.py +368 -0
- pyfect/_digits.py +71 -0
- pyfect/_effect_args.py +46 -0
- pyfect/_effect_base.py +71 -0
- pyfect/_effect_concurrency.py +133 -0
- pyfect/_effect_eager.py +103 -0
- pyfect/_effect_errors.py +344 -0
- pyfect/_effect_folding.py +110 -0
- pyfect/_effect_hash.py +140 -0
- pyfect/_effect_logging.py +57 -0
- pyfect/_effect_metrics.py +102 -0
- pyfect/_effect_resources.py +179 -0
- pyfect/_effect_services.py +25 -0
- pyfect/_effect_timing.py +199 -0
- pyfect/_effect_tracing.py +99 -0
- pyfect/_equal.py +195 -0
- pyfect/_extras.py +43 -0
- pyfect/_fiber.py +969 -0
- pyfect/_fiber_all.py +134 -0
- pyfect/_fiber_collections.py +106 -0
- pyfect/_fn.py +706 -0
- pyfect/_hamt.py +174 -0
- pyfect/_interrupt_reason.py +33 -0
- pyfect/_isaac.py +149 -0
- pyfect/_iterables.py +231 -0
- pyfect/_js.py +263 -0
- pyfect/_js_date.py +87 -0
- pyfect/_json_text.py +286 -0
- pyfect/_json_value.py +9 -0
- pyfect/_layer_core.py +403 -0
- pyfect/_layer_for_life.py +33 -0
- pyfect/_layer_tracing.py +70 -0
- pyfect/_locked_ref.py +147 -0
- pyfect/_loop_thread.py +152 -0
- pyfect/_metric_ref.py +29 -0
- pyfect/_one_or_many.py +14 -0
- pyfect/_os_wait.py +118 -0
- pyfect/_path_posix.py +129 -0
- pyfect/_primitives.py +434 -0
- pyfect/_public.py +36 -0
- pyfect/_reasons.py +64 -0
- pyfect/_released.py +67 -0
- pyfect/_root.py +87 -0
- pyfect/_round_robin.py +73 -0
- pyfect/_some.py +17 -0
- pyfect/_stack.py +52 -0
- pyfect/_stack_frame.py +114 -0
- pyfect/_string_hash.py +35 -0
- pyfect/_subscriber_queue.py +47 -0
- pyfect/_tags.py +14 -0
- pyfect/_tracer_ref.py +21 -0
- pyfect/_tx_ops.py +77 -0
- pyfect/_unsubscripted.py +23 -0
- pyfect/_url.py +54 -0
- pyfect/_waiters.py +127 -0
- pyfect/_wake_tracking.py +98 -0
- pyfect/_wire_codec.py +123 -0
- pyfect/ai/__init__.py +73 -0
- pyfect/ai/_approvals.py +249 -0
- pyfect/ai/_decision_answers.py +185 -0
- pyfect/ai/_generated_client.py +298 -0
- pyfect/ai/_generated_support.py +84 -0
- pyfect/ai/_mcp/__init__.py +1 -0
- pyfect/ai/_mcp/batch.py +68 -0
- pyfect/ai/_mcp/client_transport.py +412 -0
- pyfect/ai/_mcp/client_wire.py +284 -0
- pyfect/ai/_mcp/core.py +490 -0
- pyfect/ai/_mcp/dispatch.py +1048 -0
- pyfect/ai/_mcp/http.py +462 -0
- pyfect/ai/_mcp/http_admission.py +269 -0
- pyfect/ai/_mcp/http_status.py +27 -0
- pyfect/ai/_mcp/input_wire.py +226 -0
- pyfect/ai/_mcp/log_levels.py +55 -0
- pyfect/ai/_mcp/param_headers.py +63 -0
- pyfect/ai/_mcp/projection.py +248 -0
- pyfect/ai/_mcp/register.py +683 -0
- pyfect/ai/_mcp/reverse_policy.py +155 -0
- pyfect/ai/_mcp/routing_header.py +24 -0
- pyfect/ai/_mcp/sessions.py +114 -0
- pyfect/ai/_mcp/stdio.py +110 -0
- pyfect/ai/_mcp/subscriptions.py +134 -0
- pyfect/ai/_mcp/tool_schema.py +35 -0
- pyfect/ai/_noul_answers.py +64 -0
- pyfect/ai/_openai_all_of.py +137 -0
- pyfect/ai/_openai_errors.py +233 -0
- pyfect/ai/_provider.py +439 -0
- pyfect/ai/_provider_tools.py +129 -0
- pyfect/ai/_stream_resolution.py +231 -0
- pyfect/ai/_structured_output_checks.py +138 -0
- pyfect/ai/_structured_output_codec.py +229 -0
- pyfect/ai/_structured_output_json.py +109 -0
- pyfect/ai/_tool_call_ids.py +80 -0
- pyfect/ai/ai_error.py +785 -0
- pyfect/ai/anthropic/__init__.py +28 -0
- pyfect/ai/anthropic/_errors.py +164 -0
- pyfect/ai/anthropic/_prompt.py +375 -0
- pyfect/ai/anthropic/_response.py +443 -0
- pyfect/ai/anthropic/_schema.py +206 -0
- pyfect/ai/anthropic/_stream.py +377 -0
- pyfect/ai/anthropic/_tools.py +248 -0
- pyfect/ai/anthropic/client.py +289 -0
- pyfect/ai/anthropic/config.py +32 -0
- pyfect/ai/anthropic/error.py +27 -0
- pyfect/ai/anthropic/language_model.py +366 -0
- pyfect/ai/anthropic/telemetry.py +51 -0
- pyfect/ai/anthropic/tool.py +570 -0
- pyfect/ai/anthropic_structured_output.py +138 -0
- pyfect/ai/chat.py +548 -0
- pyfect/ai/cloudflare/__init__.py +15 -0
- pyfect/ai/cloudflare/_errors.py +108 -0
- pyfect/ai/cloudflare/client.py +174 -0
- pyfect/ai/cloudflare/decision_model.py +117 -0
- pyfect/ai/cloudflare/schema.py +144 -0
- pyfect/ai/decision.py +290 -0
- pyfect/ai/decision_model.py +283 -0
- pyfect/ai/embedding_model.py +177 -0
- pyfect/ai/id_generator.py +79 -0
- pyfect/ai/language_model.py +1077 -0
- pyfect/ai/mcp_client.py +682 -0
- pyfect/ai/mcp_client_error.py +223 -0
- pyfect/ai/mcp_protocol.py +205 -0
- pyfect/ai/mcp_schema.py +1300 -0
- pyfect/ai/mcp_server.py +404 -0
- pyfect/ai/model.py +56 -0
- pyfect/ai/openai/__init__.py +49 -0
- pyfect/ai/openai/_errors.py +89 -0
- pyfect/ai/openai/_prompt.py +527 -0
- pyfect/ai/openai/_requests.py +34 -0
- pyfect/ai/openai/_response.py +569 -0
- pyfect/ai/openai/_schema.py +769 -0
- pyfect/ai/openai/_stream.py +771 -0
- pyfect/ai/openai/_tools.py +128 -0
- pyfect/ai/openai/_web_socket.py +295 -0
- pyfect/ai/openai/client.py +296 -0
- pyfect/ai/openai/client_generated.py +123 -0
- pyfect/ai/openai/config.py +34 -0
- pyfect/ai/openai/decision_model.py +177 -0
- pyfect/ai/openai/embedding_model.py +116 -0
- pyfect/ai/openai/error.py +8 -0
- pyfect/ai/openai/generated/__init__.py +7213 -0
- pyfect/ai/openai/generated/_recursive.py +18 -0
- pyfect/ai/openai/generated/_schemas_0.py +1015 -0
- pyfect/ai/openai/generated/_schemas_1.py +1016 -0
- pyfect/ai/openai/generated/_schemas_2.py +1017 -0
- pyfect/ai/openai/generated/_schemas_3.py +615 -0
- pyfect/ai/openai/generated/client.py +5298 -0
- pyfect/ai/openai/generated/types.py +8123 -0
- pyfect/ai/openai/language_model.py +304 -0
- pyfect/ai/openai/telemetry.py +19 -0
- pyfect/ai/openai/tool.py +391 -0
- pyfect/ai/openai_compat/__init__.py +25 -0
- pyfect/ai/openai_compat/_prompt.py +191 -0
- pyfect/ai/openai_compat/_request.py +153 -0
- pyfect/ai/openai_compat/_response.py +407 -0
- pyfect/ai/openai_compat/_schema.py +97 -0
- pyfect/ai/openai_compat/client.py +234 -0
- pyfect/ai/openai_compat/config.py +32 -0
- pyfect/ai/openai_compat/embedding_model.py +139 -0
- pyfect/ai/openai_compat/error.py +7 -0
- pyfect/ai/openai_compat/language_model.py +245 -0
- pyfect/ai/openai_compat/telemetry.py +51 -0
- pyfect/ai/openai_structured_output.py +118 -0
- pyfect/ai/openrouter/__init__.py +36 -0
- pyfect/ai/openrouter/_errors.py +186 -0
- pyfect/ai/openrouter/_prompt.py +272 -0
- pyfect/ai/openrouter/_response.py +226 -0
- pyfect/ai/openrouter/_stream.py +320 -0
- pyfect/ai/openrouter/client.py +283 -0
- pyfect/ai/openrouter/config.py +36 -0
- pyfect/ai/openrouter/decision_model.py +161 -0
- pyfect/ai/openrouter/error.py +23 -0
- pyfect/ai/openrouter/generated/__init__.py +3029 -0
- pyfect/ai/openrouter/generated/_recursive.py +15 -0
- pyfect/ai/openrouter/generated/_schemas_0.py +1015 -0
- pyfect/ai/openrouter/generated/_schemas_1.py +522 -0
- pyfect/ai/openrouter/generated/client.py +1445 -0
- pyfect/ai/openrouter/generated/types.py +4769 -0
- pyfect/ai/openrouter/language_model.py +345 -0
- pyfect/ai/openrouter/schema.py +165 -0
- pyfect/ai/prompt.py +664 -0
- pyfect/ai/response.py +768 -0
- pyfect/ai/response_id_tracker.py +82 -0
- pyfect/ai/telemetry.py +126 -0
- pyfect/ai/tokenizer.py +61 -0
- pyfect/ai/tool.py +536 -0
- pyfect/ai/toolkit.py +490 -0
- pyfect/ai/typesafe/__init__.py +17 -0
- pyfect/ai/typesafe/_errors.py +120 -0
- pyfect/ai/typesafe/client.py +146 -0
- pyfect/ai/typesafe/config.py +34 -0
- pyfect/ai/typesafe/decision_model.py +90 -0
- pyfect/ai/typesafe/schema.py +140 -0
- pyfect/batching/__init__.py +58 -0
- pyfect/batching/_api.py +71 -0
- pyfect/batching/_engine.py +229 -0
- pyfect/batching/_from_effect.py +76 -0
- pyfect/batching/_persisted.py +98 -0
- pyfect/batching/_request.py +133 -0
- pyfect/batching/_resolver.py +477 -0
- pyfect/batching/_with_cache.py +90 -0
- pyfect/big_decimal.py +500 -0
- pyfect/brand.py +114 -0
- pyfect/byte_size.py +354 -0
- pyfect/cache/__init__.py +29 -0
- pyfect/cache/_cache.py +426 -0
- pyfect/cache/_expiry.py +69 -0
- pyfect/cache/_scoped_cache.py +546 -0
- pyfect/case.py +174 -0
- pyfect/cause.py +462 -0
- pyfect/channel/__init__.py +155 -0
- pyfect/channel/_base.py +92 -0
- pyfect/channel/_catch.py +158 -0
- pyfect/channel/_catch_reason.py +572 -0
- pyfect/channel/_channel.py +158 -0
- pyfect/channel/_combinators.py +220 -0
- pyfect/channel/_concurrency_methods.py +217 -0
- pyfect/channel/_concurrent_map.py +118 -0
- pyfect/channel/_constructors.py +349 -0
- pyfect/channel/_context.py +232 -0
- pyfect/channel/_error_methods.py +336 -0
- pyfect/channel/_errors.py +180 -0
- pyfect/channel/_filters.py +225 -0
- pyfect/channel/_lifecycle.py +71 -0
- pyfect/channel/_lifecycle_methods.py +206 -0
- pyfect/channel/_loop.py +100 -0
- pyfect/channel/_merge.py +246 -0
- pyfect/channel/_repeat.py +154 -0
- pyfect/channel/_run.py +149 -0
- pyfect/channel/_run_methods.py +341 -0
- pyfect/channel/_sinks.py +88 -0
- pyfect/channel/_sources.py +238 -0
- pyfect/channel/_text.py +176 -0
- pyfect/channel/_transform_methods.py +415 -0
- pyfect/channel/_upstream.py +67 -0
- pyfect/channel_schema.py +131 -0
- pyfect/cli/__init__.py +79 -0
- pyfect/cli/_ansi.py +82 -0
- pyfect/cli/_command.py +469 -0
- pyfect/cli/_config.py +164 -0
- pyfect/cli/_environment.py +10 -0
- pyfect/cli/_help.py +195 -0
- pyfect/cli/_lexer.py +81 -0
- pyfect/cli/_parser.py +465 -0
- pyfect/cli/_settings.py +85 -0
- pyfect/cli/_suggest.py +33 -0
- pyfect/cli/_width.py +134 -0
- pyfect/cli/_wizard.py +317 -0
- pyfect/cli/argument.py +212 -0
- pyfect/cli/cli_config.py +40 -0
- pyfect/cli/cli_error.py +242 -0
- pyfect/cli/cli_output.py +305 -0
- pyfect/cli/command.py +440 -0
- pyfect/cli/completions/__init__.py +50 -0
- pyfect/cli/completions/_completer.ps1 +190 -0
- pyfect/cli/completions/_descriptor.py +182 -0
- pyfect/cli/completions/bash.py +300 -0
- pyfect/cli/completions/fish.py +164 -0
- pyfect/cli/completions/powershell.py +156 -0
- pyfect/cli/completions/zsh.py +189 -0
- pyfect/cli/flag.py +246 -0
- pyfect/cli/global_flag.py +99 -0
- pyfect/cli/help_doc.py +63 -0
- pyfect/cli/param.py +789 -0
- pyfect/cli/primitive.py +308 -0
- pyfect/cli/prompt/__init__.py +75 -0
- pyfect/cli/prompt/_auto_complete.py +205 -0
- pyfect/cli/prompt/_choices.py +104 -0
- pyfect/cli/prompt/_confirm.py +195 -0
- pyfect/cli/prompt/_core.py +512 -0
- pyfect/cli/prompt/_date.py +173 -0
- pyfect/cli/prompt/_date_parts.py +387 -0
- pyfect/cli/prompt/_file.py +372 -0
- pyfect/cli/prompt/_multi_select.py +204 -0
- pyfect/cli/prompt/_number.py +257 -0
- pyfect/cli/prompt/_select.py +117 -0
- pyfect/cli/prompt/_text.py +239 -0
- pyfect/cli/terminal_capabilities.py +118 -0
- pyfect/clock.py +150 -0
- pyfect/cluster/__init__.py +155 -0
- pyfect/cluster/_cluster_abandon.py +36 -0
- pyfect/cluster/_cluster_layer.py +122 -0
- pyfect/cluster/_entity_activation.py +16 -0
- pyfect/cluster/_entity_manager/__init__.py +22 -0
- pyfect/cluster/_entity_manager/_activation.py +540 -0
- pyfect/cluster/_entity_manager/_core.py +186 -0
- pyfect/cluster/_entity_manager/_decode.py +60 -0
- pyfect/cluster/_entity_manager/_manager.py +423 -0
- pyfect/cluster/_entity_manager/_state.py +113 -0
- pyfect/cluster/_entity_reaper.py +94 -0
- pyfect/cluster/_hash.py +13 -0
- pyfect/cluster/_interruptors.py +88 -0
- pyfect/cluster/_resource_map.py +179 -0
- pyfect/cluster/_resource_ref.py +266 -0
- pyfect/cluster/_shard_lock.py +14 -0
- pyfect/cluster/cluster_cron.py +230 -0
- pyfect/cluster/cluster_error.py +81 -0
- pyfect/cluster/cluster_http.py +210 -0
- pyfect/cluster/cluster_metrics.py +54 -0
- pyfect/cluster/cluster_schema.py +137 -0
- pyfect/cluster/cluster_socket.py +197 -0
- pyfect/cluster/cluster_workflow_engine/__init__.py +24 -0
- pyfect/cluster/cluster_workflow_engine/_engine.py +1099 -0
- pyfect/cluster/cluster_workflow_engine/_entities.py +298 -0
- pyfect/cluster/deliver_at.py +31 -0
- pyfect/cluster/entity/__init__.py +39 -0
- pyfect/cluster/entity/_entity.py +332 -0
- pyfect/cluster/entity/_handlers.py +168 -0
- pyfect/cluster/entity/_keep_alive.py +74 -0
- pyfect/cluster/entity/_queue.py +103 -0
- pyfect/cluster/entity/_request.py +34 -0
- pyfect/cluster/entity/_services.py +23 -0
- pyfect/cluster/entity/_test_client.py +237 -0
- pyfect/cluster/entity_address.py +25 -0
- pyfect/cluster/entity_id.py +20 -0
- pyfect/cluster/entity_proxy.py +161 -0
- pyfect/cluster/entity_proxy_server.py +103 -0
- pyfect/cluster/entity_resource.py +122 -0
- pyfect/cluster/entity_type.py +20 -0
- pyfect/cluster/envelope.py +307 -0
- pyfect/cluster/http_runner.py +254 -0
- pyfect/cluster/k8s_http_client.py +281 -0
- pyfect/cluster/k8s_types.py +1394 -0
- pyfect/cluster/machine_id.py +21 -0
- pyfect/cluster/message.py +219 -0
- pyfect/cluster/message_storage/__init__.py +67 -0
- pyfect/cluster/message_storage/_encoded.py +393 -0
- pyfect/cluster/message_storage/_memory.py +386 -0
- pyfect/cluster/message_storage/_noop.py +109 -0
- pyfect/cluster/message_storage/_service.py +388 -0
- pyfect/cluster/reply.py +236 -0
- pyfect/cluster/runner.py +32 -0
- pyfect/cluster/runner_address.py +23 -0
- pyfect/cluster/runner_health.py +93 -0
- pyfect/cluster/runner_server.py +286 -0
- pyfect/cluster/runner_storage.py +212 -0
- pyfect/cluster/runners/__init__.py +55 -0
- pyfect/cluster/runners/_local.py +460 -0
- pyfect/cluster/runners/_noop.py +57 -0
- pyfect/cluster/runners/_rpc.py +290 -0
- pyfect/cluster/runners/_service.py +113 -0
- pyfect/cluster/shard_id.py +39 -0
- pyfect/cluster/sharding/__init__.py +12 -0
- pyfect/cluster/sharding/_acquisition.py +490 -0
- pyfect/cluster/sharding/_clients.py +271 -0
- pyfect/cluster/sharding/_make.py +388 -0
- pyfect/cluster/sharding/_routing.py +296 -0
- pyfect/cluster/sharding/_runners_sync.py +198 -0
- pyfect/cluster/sharding/_service.py +91 -0
- pyfect/cluster/sharding/_singletons.py +183 -0
- pyfect/cluster/sharding/_state.py +296 -0
- pyfect/cluster/sharding/_storage_loop.py +421 -0
- pyfect/cluster/sharding_config.py +230 -0
- pyfect/cluster/sharding_registration_event.py +28 -0
- pyfect/cluster/single_runner.py +49 -0
- pyfect/cluster/singleton.py +36 -0
- pyfect/cluster/singleton_address.py +20 -0
- pyfect/cluster/snowflake.py +133 -0
- pyfect/cluster/socket_runner.py +67 -0
- pyfect/cluster/sql_message_storage.py +1001 -0
- pyfect/cluster/sql_runner_storage.py +841 -0
- pyfect/cluster/test_runner.py +23 -0
- pyfect/config/__init__.py +93 -0
- pyfect/config/_all.py +96 -0
- pyfect/config/_collections.py +291 -0
- pyfect/config/_config.py +261 -0
- pyfect/config/_constructors.py +106 -0
- pyfect/config/_error.py +27 -0
- pyfect/config/_leaf.py +92 -0
- pyfect/config/_scalars.py +193 -0
- pyfect/config/_schema.py +340 -0
- pyfect/config_provider/__init__.py +60 -0
- pyfect/config_provider/_dir.py +84 -0
- pyfect/config_provider/_dotenv.py +127 -0
- pyfect/config_provider/_env.py +79 -0
- pyfect/config_provider/_layers.py +80 -0
- pyfect/config_provider/_node.py +90 -0
- pyfect/config_provider/_provider.py +118 -0
- pyfect/config_provider/_unknown.py +62 -0
- pyfect/console/__init__.py +63 -0
- pyfect/console/_effects.py +134 -0
- pyfect/console/_live.py +156 -0
- pyfect/console/_service.py +49 -0
- pyfect/console/_table.py +90 -0
- pyfect/context.py +414 -0
- pyfect/cron/__init__.py +30 -0
- pyfect/cron/_model.py +183 -0
- pyfect/cron/_search.py +268 -0
- pyfect/cron/_text.py +202 -0
- pyfect/cron/_wall.py +42 -0
- pyfect/crypto.py +257 -0
- pyfect/date_time/__init__.py +77 -0
- pyfect/date_time/_calendar.py +209 -0
- pyfect/date_time/_current.py +118 -0
- pyfect/date_time/_epoch.py +22 -0
- pyfect/date_time/_iso.py +80 -0
- pyfect/date_time/_zones.py +135 -0
- pyfect/date_time/intl.py +144 -0
- pyfect/deferred.py +145 -0
- pyfect/devtools/__init__.py +24 -0
- pyfect/devtools/client.py +323 -0
- pyfect/devtools/layers.py +32 -0
- pyfect/devtools/schema.py +301 -0
- pyfect/devtools/server.py +72 -0
- pyfect/duration.py +295 -0
- pyfect/effect.py +565 -0
- pyfect/effectable.py +37 -0
- pyfect/encoding/__init__.py +62 -0
- pyfect/encoding/_archive.py +197 -0
- pyfect/encoding/_json_array_scanner.py +477 -0
- pyfect/encoding/base64.py +23 -0
- pyfect/encoding/base64_url.py +19 -0
- pyfect/encoding/encoding_error.py +17 -0
- pyfect/encoding/hex.py +28 -0
- pyfect/encoding/ini.py +188 -0
- pyfect/encoding/json_array.py +246 -0
- pyfect/encoding/ndjson.py +461 -0
- pyfect/encoding/schema_binary/__init__.py +257 -0
- pyfect/encoding/schema_binary/_channels.py +173 -0
- pyfect/encoding/schema_binary/_compile.py +584 -0
- pyfect/encoding/schema_binary/_decode.py +848 -0
- pyfect/encoding/schema_binary/_dictionary.py +90 -0
- pyfect/encoding/schema_binary/_encode.py +838 -0
- pyfect/encoding/schema_binary/_fingerprint.py +168 -0
- pyfect/encoding/schema_binary/_layout.py +350 -0
- pyfect/encoding/schema_binary/_literals.py +47 -0
- pyfect/encoding/schema_binary/_parser.py +163 -0
- pyfect/encoding/schema_binary/_reader.py +148 -0
- pyfect/encoding/schema_binary/_target.py +310 -0
- pyfect/encoding/schema_binary/_values.py +133 -0
- pyfect/encoding/schema_binary/_wire.py +253 -0
- pyfect/encoding/sse.py +476 -0
- pyfect/encoding/tar/__init__.py +396 -0
- pyfect/encoding/tar/_decoder.py +220 -0
- pyfect/encoding/tar/_encoder.py +83 -0
- pyfect/encoding/tar/_header.py +494 -0
- pyfect/encoding/tar/_model.py +82 -0
- pyfect/encoding/toml.py +375 -0
- pyfect/encoding/xml/__init__.py +222 -0
- pyfect/encoding/xml/_chars.py +119 -0
- pyfect/encoding/xml/_collector.py +106 -0
- pyfect/encoding/xml/_inputs.py +126 -0
- pyfect/encoding/xml/_model.py +114 -0
- pyfect/encoding/xml/_parser.py +694 -0
- pyfect/encoding/xml/_scanner.py +180 -0
- pyfect/encoding/xml/_writer.py +238 -0
- pyfect/encoding/yaml.py +739 -0
- pyfect/encoding/zip/__init__.py +392 -0
- pyfect/encoding/zip/_decoder.py +378 -0
- pyfect/encoding/zip/_format.py +122 -0
- pyfect/encoding/zip/_inflate.py +65 -0
- pyfect/encoding/zip/_model.py +86 -0
- pyfect/encoding/zip/_writer.py +311 -0
- pyfect/error_reporter.py +240 -0
- pyfect/errors.py +321 -0
- pyfect/eventlog/__init__.py +77 -0
- pyfect/eventlog/_conflicts.py +94 -0
- pyfect/eventlog/_crypto.py +64 -0
- pyfect/eventlog/_identity.py +26 -0
- pyfect/eventlog/_identity_derivation.py +79 -0
- pyfect/eventlog/_transferable_bytes.py +55 -0
- pyfect/eventlog/_uuid.py +33 -0
- pyfect/eventlog/event.py +115 -0
- pyfect/eventlog/event_group.py +55 -0
- pyfect/eventlog/event_journal.py +630 -0
- pyfect/eventlog/event_log.py +1039 -0
- pyfect/eventlog/event_log_encryption.py +219 -0
- pyfect/eventlog/event_log_message.py +357 -0
- pyfect/eventlog/event_log_remote.py +465 -0
- pyfect/eventlog/event_log_server.py +442 -0
- pyfect/eventlog/event_log_server_encrypted.py +322 -0
- pyfect/eventlog/event_log_server_unencrypted.py +814 -0
- pyfect/eventlog/event_log_session_auth.py +250 -0
- pyfect/eventlog/event_row.py +423 -0
- pyfect/eventlog/sql_event_journal.py +692 -0
- pyfect/eventlog/sql_event_log_server_encrypted.py +440 -0
- pyfect/eventlog/sql_event_log_server_unencrypted.py +568 -0
- pyfect/execution_plan/__init__.py +42 -0
- pyfect/execution_plan/_events.py +128 -0
- pyfect/execution_plan/_model.py +108 -0
- pyfect/execution_plan/_run.py +176 -0
- pyfect/exit.py +205 -0
- pyfect/fiber_handle.py +305 -0
- pyfect/fiber_map.py +350 -0
- pyfect/fiber_set.py +232 -0
- pyfect/file_system/__init__.py +69 -0
- pyfect/file_system/_copy.py +116 -0
- pyfect/file_system/_errors.py +32 -0
- pyfect/file_system/_file.py +177 -0
- pyfect/file_system/_live.py +351 -0
- pyfect/file_system/_model.py +72 -0
- pyfect/file_system/_noop.py +189 -0
- pyfect/file_system/_service.py +336 -0
- pyfect/file_system/_stat.py +69 -0
- pyfect/file_system/_watch.py +107 -0
- pyfect/filters.py +245 -0
- pyfect/graph/__init__.py +101 -0
- pyfect/graph/_all_pairs.py +150 -0
- pyfect/graph/_combine.py +259 -0
- pyfect/graph/_compact.py +143 -0
- pyfect/graph/_components.py +200 -0
- pyfect/graph/_cycles.py +144 -0
- pyfect/graph/_enumerate.py +168 -0
- pyfect/graph/_errors.py +51 -0
- pyfect/graph/_flow.py +164 -0
- pyfect/graph/_forest.py +109 -0
- pyfect/graph/_graph.py +269 -0
- pyfect/graph/_lowlink.py +98 -0
- pyfect/graph/_matching.py +101 -0
- pyfect/graph/_mutate.py +211 -0
- pyfect/graph/_query.py +138 -0
- pyfect/graph/_records.py +119 -0
- pyfect/graph/_render.py +109 -0
- pyfect/graph/_shortest.py +274 -0
- pyfect/graph/_snapshot.py +50 -0
- pyfect/graph/_store.py +136 -0
- pyfect/graph/_traverse.py +289 -0
- pyfect/graph/_view.py +384 -0
- pyfect/graph/_walker.py +70 -0
- pyfect/graphql/__init__.py +87 -0
- pyfect/graphql/_codec.py +117 -0
- pyfect/graphql/_http.py +309 -0
- pyfect/graphql/_schemas.py +39 -0
- pyfect/graphql/_slices.py +110 -0
- pyfect/graphql/_template.py +111 -0
- pyfect/graphql/_types.py +115 -0
- pyfect/graphql/_ws.py +395 -0
- pyfect/graphql/_ws_messages.py +120 -0
- pyfect/graphql/client.py +428 -0
- pyfect/graphql/client_error.py +285 -0
- pyfect/graphql/group.py +142 -0
- pyfect/graphql/middleware.py +98 -0
- pyfect/graphql/operation.py +409 -0
- pyfect/graphql/protocol.py +119 -0
- pyfect/graphql/resolver.py +574 -0
- pyfect/graphql/template.py +61 -0
- pyfect/hash_map.py +317 -0
- pyfect/hash_ring.py +206 -0
- pyfect/hash_set.py +163 -0
- pyfect/http/__init__.py +125 -0
- pyfect/http/_asgi_listener.py +272 -0
- pyfect/http/_authority.py +63 -0
- pyfect/http/_brotli.py +27 -0
- pyfect/http/_compression.py +52 -0
- pyfect/http/_field.py +18 -0
- pyfect/http/_foreign_path.py +27 -0
- pyfect/http/_form_data.py +34 -0
- pyfect/http/_httpx_options.py +120 -0
- pyfect/http/_in_memory.py +76 -0
- pyfect/http/_request_state.py +59 -0
- pyfect/http/_vary.py +14 -0
- pyfect/http/abort.py +65 -0
- pyfect/http/asgi/__init__.py +59 -0
- pyfect/http/asgi/_app.py +155 -0
- pyfect/http/asgi/_http.py +201 -0
- pyfect/http/asgi/_mount.py +263 -0
- pyfect/http/asgi/_scope.py +86 -0
- pyfect/http/asgi/_serve.py +72 -0
- pyfect/http/asgi/_types.py +13 -0
- pyfect/http/asgi/_web_socket.py +325 -0
- pyfect/http/body.py +437 -0
- pyfect/http/client/__init__.py +111 -0
- pyfect/http/client/_circuit_breaker.py +113 -0
- pyfect/http/client/_cookie_jar.py +120 -0
- pyfect/http/client/_make.py +252 -0
- pyfect/http/client/_rate_limit.py +423 -0
- pyfect/http/client/_redirects.py +93 -0
- pyfect/http/client/_retry.py +115 -0
- pyfect/http/client/_service.py +497 -0
- pyfect/http/cookies.py +444 -0
- pyfect/http/error.py +188 -0
- pyfect/http/etag.py +96 -0
- pyfect/http/file_like.py +49 -0
- pyfect/http/find_my_way/__init__.py +10 -0
- pyfect/http/find_my_way/_nodes.py +186 -0
- pyfect/http/find_my_way/_paths.py +43 -0
- pyfect/http/find_my_way/_query_string.py +67 -0
- pyfect/http/find_my_way/_router.py +401 -0
- pyfect/http/headers.py +343 -0
- pyfect/http/http_effect.py +198 -0
- pyfect/http/httpx_client.py +291 -0
- pyfect/http/hypercorn_server.py +122 -0
- pyfect/http/incoming_message.py +140 -0
- pyfect/http/live_server/__init__.py +191 -0
- pyfect/http/live_server/_body.py +164 -0
- pyfect/http/live_server/_exchange.py +321 -0
- pyfect/http/live_server/_head.py +194 -0
- pyfect/http/live_server/_inbound.py +156 -0
- pyfect/http/live_server/_listener.py +211 -0
- pyfect/http/live_server/_serve.py +225 -0
- pyfect/http/live_server/_timers.py +20 -0
- pyfect/http/live_server/_upgrade.py +108 -0
- pyfect/http/live_server/_websocket.py +286 -0
- pyfect/http/live_server/_ws_frames.py +242 -0
- pyfect/http/method.py +30 -0
- pyfect/http/middleware/__init__.py +61 -0
- pyfect/http/middleware/_compression.py +156 -0
- pyfect/http/middleware/_cors.py +129 -0
- pyfect/http/middleware/_decompression.py +274 -0
- pyfect/http/middleware/_forwarded.py +113 -0
- pyfect/http/middleware/_logger.py +73 -0
- pyfect/http/middleware/_search_params.py +34 -0
- pyfect/http/middleware/_tracer.py +153 -0
- pyfect/http/middleware/_types.py +16 -0
- pyfect/http/mime/__init__.py +69 -0
- pyfect/http/mime/_types.py +361 -0
- pyfect/http/multipart.py +613 -0
- pyfect/http/multipart_parser/__init__.py +348 -0
- pyfect/http/multipart_parser/_content_type.py +109 -0
- pyfect/http/multipart_parser/_headers.py +206 -0
- pyfect/http/multipart_parser/_search.py +85 -0
- pyfect/http/origin.py +146 -0
- pyfect/http/platform.py +593 -0
- pyfect/http/prometheus.py +34 -0
- pyfect/http/request.py +384 -0
- pyfect/http/response.py +474 -0
- pyfect/http/router/__init__.py +82 -0
- pyfect/http/router/_api.py +462 -0
- pyfect/http/router/_in_memory.py +76 -0
- pyfect/http/router/_markers.py +47 -0
- pyfect/http/router/_middleware.py +181 -0
- pyfect/http/router/_middleware_stack.py +51 -0
- pyfect/http/router/_provided.py +31 -0
- pyfect/http/router/_route.py +114 -0
- pyfect/http/router/_router.py +308 -0
- pyfect/http/schema.py +276 -0
- pyfect/http/server.py +199 -0
- pyfect/http/server_error.py +261 -0
- pyfect/http/server_request.py +729 -0
- pyfect/http/server_respondable.py +77 -0
- pyfect/http/server_response.py +569 -0
- pyfect/http/static_server/__init__.py +257 -0
- pyfect/http/static_server/_conditional.py +72 -0
- pyfect/http/static_server/_mime.py +55 -0
- pyfect/http/static_server/_range.py +53 -0
- pyfect/http/status.py +51 -0
- pyfect/http/template.py +161 -0
- pyfect/http/trace_context.py +91 -0
- pyfect/http/url.py +442 -0
- pyfect/http/url_params.py +304 -0
- pyfect/http/uvicorn_server.py +119 -0
- pyfect/http/web.py +171 -0
- pyfect/http/web_handler.py +463 -0
- pyfect/http/wire.py +209 -0
- pyfect/http_api/__init__.py +83 -0
- pyfect/http_api/_assets/scalar.js +8 -0
- pyfect/http_api/_assets/swagger-ui.css +3 -0
- pyfect/http_api/_assets/swagger-ui.js +4 -0
- pyfect/http_api/_client_method.py +220 -0
- pyfect/http_api/_client_payload.py +144 -0
- pyfect/http_api/_client_response.py +377 -0
- pyfect/http_api/_handlers.py +282 -0
- pyfect/http_api/_html.py +38 -0
- pyfect/http_api/_media_type.py +6 -0
- pyfect/http_api/_openapi_responses.py +164 -0
- pyfect/http_api/_openapi_schemas.py +163 -0
- pyfect/http_api/_path.py +102 -0
- pyfect/http_api/_payload.py +260 -0
- pyfect/http_api/_response.py +363 -0
- pyfect/http_api/_security.py +174 -0
- pyfect/http_api/api.py +265 -0
- pyfect/http_api/builder.py +447 -0
- pyfect/http_api/client.py +474 -0
- pyfect/http_api/endpoint.py +969 -0
- pyfect/http_api/error.py +280 -0
- pyfect/http_api/group.py +215 -0
- pyfect/http_api/middleware.py +232 -0
- pyfect/http_api/openapi.py +396 -0
- pyfect/http_api/scalar.py +143 -0
- pyfect/http_api/schema.py +713 -0
- pyfect/http_api/security.py +91 -0
- pyfect/http_api/swagger.py +69 -0
- pyfect/http_api/test.py +105 -0
- pyfect/json_patch.py +255 -0
- pyfect/json_pointer.py +100 -0
- pyfect/json_schema/__init__.py +66 -0
- pyfect/json_schema/_api.py +96 -0
- pyfect/json_schema/_converter.py +258 -0
- pyfect/json_schema/_draft04.py +198 -0
- pyfect/json_schema/_draft07.py +203 -0
- pyfect/json_schema/_keywords.py +202 -0
- pyfect/json_schema/_model.py +201 -0
- pyfect/json_schema/_openapi.py +208 -0
- pyfect/latch.py +127 -0
- pyfect/layer.py +479 -0
- pyfect/layer_map.py +279 -0
- pyfect/layer_ref.py +208 -0
- pyfect/logger/__init__.py +91 -0
- pyfect/logger/_batched.py +49 -0
- pyfect/logger/_console.py +116 -0
- pyfect/logger/_file.py +31 -0
- pyfect/logger/_formats.py +104 -0
- pyfect/logger/_layer.py +50 -0
- pyfect/logger/_level.py +53 -0
- pyfect/logger/_log.py +142 -0
- pyfect/logger/_model.py +163 -0
- pyfect/logger/_refs.py +78 -0
- pyfect/logger/_stdlib.py +54 -0
- pyfect/logger/_text.py +263 -0
- pyfect/logger/_tracer.py +35 -0
- pyfect/managed_runtime.py +393 -0
- pyfect/metric/__init__.py +119 -0
- pyfect/metric/_boundaries.py +27 -0
- pyfect/metric/_kinds.py +417 -0
- pyfect/metric/_metric.py +302 -0
- pyfect/metric/_prometheus.py +150 -0
- pyfect/metric/_refs.py +78 -0
- pyfect/metric/_runtime.py +75 -0
- pyfect/metric/_snapshot.py +97 -0
- pyfect/metric/_state.py +74 -0
- pyfect/msgspec.py +98 -0
- pyfect/mutable_hash_map.py +140 -0
- pyfect/mutable_hash_set.py +95 -0
- pyfect/net/__init__.py +18 -0
- pyfect/net/_errors.py +29 -0
- pyfect/net/address_resolver.py +179 -0
- pyfect/net/dns/__init__.py +92 -0
- pyfect/net/dns/_error.py +43 -0
- pyfect/net/dns/_records.py +335 -0
- pyfect/net/dns/_service.py +287 -0
- pyfect/net/dns/_system.py +89 -0
- pyfect/net/host.py +311 -0
- pyfect/net/ip_interface.py +202 -0
- pyfect/net/ip_network.py +250 -0
- pyfect/net/net_address/__init__.py +245 -0
- pyfect/net/net_address/_inet.py +412 -0
- pyfect/net/net_address/_ip.py +348 -0
- pyfect/net/net_address/_mac.py +119 -0
- pyfect/optic/__init__.py +50 -0
- pyfect/optic/_builtins.py +90 -0
- pyfect/optic/_data.py +97 -0
- pyfect/optic/_optic.py +422 -0
- pyfect/optic/_steps.py +151 -0
- pyfect/option.py +362 -0
- pyfect/otel/__init__.py +22 -0
- pyfect/otel/_attributes.py +67 -0
- pyfect/otel/_producer.py +322 -0
- pyfect/otel/_shutdown.py +26 -0
- pyfect/otel/_span.py +292 -0
- pyfect/otel/_wrapper.py +92 -0
- pyfect/otel/logger.py +154 -0
- pyfect/otel/metrics.py +126 -0
- pyfect/otel/resource.py +111 -0
- pyfect/otel/sdk.py +195 -0
- pyfect/otel/tracer.py +157 -0
- pyfect/partitioned_semaphore.py +211 -0
- pyfect/path.py +304 -0
- pyfect/persistence/__init__.py +77 -0
- pyfect/persistence/_columns.py +32 -0
- pyfect/persistence/_error.py +14 -0
- pyfect/persistence/_seconds.py +68 -0
- pyfect/persistence/_sql_keys.py +47 -0
- pyfect/persistence/circuit_breaker/__init__.py +120 -0
- pyfect/persistence/circuit_breaker/_breaker.py +317 -0
- pyfect/persistence/circuit_breaker/_errors.py +67 -0
- pyfect/persistence/circuit_breaker/_memory.py +243 -0
- pyfect/persistence/circuit_breaker/_redis.py +509 -0
- pyfect/persistence/circuit_breaker/_store.py +60 -0
- pyfect/persistence/circuit_breaker/_types.py +191 -0
- pyfect/persistence/key_value_store/__init__.py +51 -0
- pyfect/persistence/key_value_store/_layers.py +216 -0
- pyfect/persistence/key_value_store/_schema_store.py +91 -0
- pyfect/persistence/key_value_store/_sql.py +197 -0
- pyfect/persistence/key_value_store/_store.py +212 -0
- pyfect/persistence/persistable.py +164 -0
- pyfect/persistence/persisted_cache.py +159 -0
- pyfect/persistence/persisted_queue/__init__.py +75 -0
- pyfect/persistence/persisted_queue/_error.py +42 -0
- pyfect/persistence/persisted_queue/_mailbox.py +101 -0
- pyfect/persistence/persisted_queue/_memory.py +182 -0
- pyfect/persistence/persisted_queue/_queue.py +272 -0
- pyfect/persistence/persisted_queue/_redis.py +455 -0
- pyfect/persistence/persisted_queue/_redis_scripts.py +395 -0
- pyfect/persistence/persisted_queue/_sql.py +334 -0
- pyfect/persistence/persisted_queue/_sql_migrations.py +319 -0
- pyfect/persistence/persisted_queue/_sql_statements.py +441 -0
- pyfect/persistence/persisted_queue/_store.py +147 -0
- pyfect/persistence/persistence/__init__.py +84 -0
- pyfect/persistence/persistence/_kvs.py +135 -0
- pyfect/persistence/persistence/_memory.py +62 -0
- pyfect/persistence/persistence/_redis.py +162 -0
- pyfect/persistence/persistence/_service.py +276 -0
- pyfect/persistence/persistence/_sql.py +499 -0
- pyfect/persistence/rate_limiter/__init__.py +82 -0
- pyfect/persistence/rate_limiter/_errors.py +59 -0
- pyfect/persistence/rate_limiter/_limiter.py +325 -0
- pyfect/persistence/rate_limiter/_memory.py +217 -0
- pyfect/persistence/rate_limiter/_redis.py +485 -0
- pyfect/persistence/rate_limiter/_store.py +89 -0
- pyfect/persistence/redis/__init__.py +52 -0
- pyfect/persistence/redis/_error.py +12 -0
- pyfect/persistence/redis/_make.py +234 -0
- pyfect/persistence/redis/_script.py +78 -0
- pyfect/persistence/redis/_service.py +104 -0
- pyfect/persistence/redis_py.py +303 -0
- pyfect/persistence/user_directories.py +195 -0
- pyfect/platform.py +26 -0
- pyfect/platform_error.py +256 -0
- pyfect/pool/__init__.py +36 -0
- pyfect/pool/_pool.py +707 -0
- pyfect/pool/_state.py +161 -0
- pyfect/pool/_ttl.py +105 -0
- pyfect/pool/_waiters.py +116 -0
- pyfect/primary_key.py +35 -0
- pyfect/process/__init__.py +82 -0
- pyfect/process/_child.py +213 -0
- pyfect/process/_command.py +358 -0
- pyfect/process/_handle.py +77 -0
- pyfect/process/_live.py +455 -0
- pyfect/process/_os.py +78 -0
- pyfect/process/_pipes.py +291 -0
- pyfect/process/_spawner.py +75 -0
- pyfect/pubsub/__init__.py +33 -0
- pyfect/pubsub/_atomic.py +181 -0
- pyfect/pubsub/_hub.py +214 -0
- pyfect/pubsub/_pubsub.py +214 -0
- pyfect/pubsub/_replay.py +107 -0
- pyfect/pubsub/_subscription.py +226 -0
- pyfect/pull.py +132 -0
- pyfect/py.typed +0 -0
- pyfect/pydantic.py +188 -0
- pyfect/queue/__init__.py +33 -0
- pyfect/queue/_queue.py +525 -0
- pyfect/queue/_state.py +111 -0
- pyfect/queue/_views.py +55 -0
- pyfect/random.py +146 -0
- pyfect/rc_map.py +363 -0
- pyfect/rc_ref.py +271 -0
- pyfect/reactivity/__init__.py +53 -0
- pyfect/reactivity/_async_result_schema.py +227 -0
- pyfect/reactivity/_hydration.py +18 -0
- pyfect/reactivity/_live.py +21 -0
- pyfect/reactivity/_reactivity.py +256 -0
- pyfect/reactivity/_result_effect.py +17 -0
- pyfect/reactivity/_time.py +11 -0
- pyfect/reactivity/async_result.py +679 -0
- pyfect/reactivity/atom/__init__.py +143 -0
- pyfect/reactivity/atom/_combinators.py +223 -0
- pyfect/reactivity/atom/_constructors.py +80 -0
- pyfect/reactivity/atom/_conversions.py +79 -0
- pyfect/reactivity/atom/_effect.py +252 -0
- pyfect/reactivity/atom/_fn.py +341 -0
- pyfect/reactivity/atom/_kvs.py +101 -0
- pyfect/reactivity/atom/_optimistic.py +162 -0
- pyfect/reactivity/atom/_runtime.py +323 -0
- pyfect/reactivity/atom/_serializable.py +65 -0
- pyfect/reactivity/atom/_subscription_ref.py +102 -0
- pyfect/reactivity/atom/_swr.py +69 -0
- pyfect/reactivity/atom/_types.py +435 -0
- pyfect/reactivity/atom_http_api.py +667 -0
- pyfect/reactivity/atom_ref.py +260 -0
- pyfect/reactivity/atom_registry/__init__.py +219 -0
- pyfect/reactivity/atom_registry/_batch.py +96 -0
- pyfect/reactivity/atom_registry/_dispatcher.py +60 -0
- pyfect/reactivity/atom_registry/_lifetime.py +202 -0
- pyfect/reactivity/atom_registry/_node.py +423 -0
- pyfect/reactivity/atom_registry/_registry.py +380 -0
- pyfect/reactivity/atom_rpc.py +283 -0
- pyfect/reactivity/hydration.py +200 -0
- pyfect/redacted.py +83 -0
- pyfect/ref.py +129 -0
- pyfect/resource.py +98 -0
- pyfect/result.py +306 -0
- pyfect/rpc/__init__.py +64 -0
- pyfect/rpc/_encoded_schema.py +86 -0
- pyfect/rpc/_json_rpc.py +246 -0
- pyfect/rpc/_methods.py +177 -0
- pyfect/rpc/_rpc.py +498 -0
- pyfect/rpc/client/__init__.py +100 -0
- pyfect/rpc/client/_core.py +449 -0
- pyfect/rpc/client/_http.py +257 -0
- pyfect/rpc/client/_protocol.py +171 -0
- pyfect/rpc/client/_serialized.py +321 -0
- pyfect/rpc/client/_transports.py +328 -0
- pyfect/rpc/client/_worker.py +283 -0
- pyfect/rpc/client_error.py +35 -0
- pyfect/rpc/group.py +296 -0
- pyfect/rpc/message.py +299 -0
- pyfect/rpc/middleware.py +182 -0
- pyfect/rpc/schema.py +89 -0
- pyfect/rpc/serialization.py +366 -0
- pyfect/rpc/server/__init__.py +181 -0
- pyfect/rpc/server/_core.py +549 -0
- pyfect/rpc/server/_protocol.py +123 -0
- pyfect/rpc/server/_serialized.py +363 -0
- pyfect/rpc/server/_stdio.py +101 -0
- pyfect/rpc/server/_transports.py +427 -0
- pyfect/rpc/server/_worker.py +108 -0
- pyfect/rpc/test.py +74 -0
- pyfect/rpc/worker.py +92 -0
- pyfect/run.py +393 -0
- pyfect/schedule/__init__.py +91 -0
- pyfect/schedule/_combinators.py +168 -0
- pyfect/schedule/_constructors.py +223 -0
- pyfect/schedule/_cron.py +49 -0
- pyfect/schedule/_drive.py +191 -0
- pyfect/schedule/_model.py +405 -0
- pyfect/scheduler.py +575 -0
- pyfect/schema/__init__.py +866 -0
- pyfect/schema/_adapters.py +39 -0
- pyfect/schema/_arbitrary_constraint.py +242 -0
- pyfect/schema/_arbitrary_graph.py +325 -0
- pyfect/schema/_arbitrary_links.py +179 -0
- pyfect/schema/_arbitrary_number.py +112 -0
- pyfect/schema/_arrays.py +287 -0
- pyfect/schema/_assignable.py +118 -0
- pyfect/schema/_boolean_literals.py +31 -0
- pyfect/schema/_checks_number.py +216 -0
- pyfect/schema/_checks_order.py +140 -0
- pyfect/schema/_checks_size.py +277 -0
- pyfect/schema/_checks_string.py +241 -0
- pyfect/schema/_class.py +569 -0
- pyfect/schema/_codec_derivation.py +227 -0
- pyfect/schema/_codec_links.py +221 -0
- pyfect/schema/_codecs.py +316 -0
- pyfect/schema/_collections.py +172 -0
- pyfect/schema/_constructor_default.py +89 -0
- pyfect/schema/_data.py +440 -0
- pyfect/schema/_data_codecs.py +145 -0
- pyfect/schema/_decimal_regexp.py +243 -0
- pyfect/schema/_declare.py +68 -0
- pyfect/schema/_derive.py +292 -0
- pyfect/schema/_duration_codecs.py +27 -0
- pyfect/schema/_ecma_pattern.py +416 -0
- pyfect/schema/_error.py +26 -0
- pyfect/schema/_error_instance.py +222 -0
- pyfect/schema/_graph.py +271 -0
- pyfect/schema/_instances.py +240 -0
- pyfect/schema/_jsonschema/__init__.py +90 -0
- pyfect/schema/_jsonschema/_annotations.py +114 -0
- pyfect/schema/_jsonschema/_checks.py +253 -0
- pyfect/schema/_jsonschema/_compile.py +346 -0
- pyfect/schema/_jsonschema/_exact.py +19 -0
- pyfect/schema/_jsonschema/_merge.py +211 -0
- pyfect/schema/_jsonschema/_objects.py +231 -0
- pyfect/schema/_jsonschema/_references.py +221 -0
- pyfect/schema/_jsonschema/_template.py +69 -0
- pyfect/schema/_literals.py +147 -0
- pyfect/schema/_middleware.py +209 -0
- pyfect/schema/_net.py +522 -0
- pyfect/schema/_options.py +49 -0
- pyfect/schema/_parse.py +351 -0
- pyfect/schema/_parsed_text.py +37 -0
- pyfect/schema/_primitives.py +48 -0
- pyfect/schema/_record.py +41 -0
- pyfect/schema/_refine.py +81 -0
- pyfect/schema/_schema.py +158 -0
- pyfect/schema/_semver.py +144 -0
- pyfect/schema/_strategy/__init__.py +258 -0
- pyfect/schema/_strategy/_big_decimal.py +203 -0
- pyfect/schema/_strategy/_composites.py +119 -0
- pyfect/schema/_strategy/_leaves.py +94 -0
- pyfect/schema/_strategy/_net.py +133 -0
- pyfect/schema/_struct.py +87 -0
- pyfect/schema/_struct_keys.py +128 -0
- pyfect/schema/_tagged.py +254 -0
- pyfect/schema/_template_literal.py +172 -0
- pyfect/schema/_to_codec_array_from_single.py +115 -0
- pyfect/schema/_to_codec_go_json.py +174 -0
- pyfect/schema/_to_codec_json.py +73 -0
- pyfect/schema/_to_codec_string_tree.py +115 -0
- pyfect/schema/_to_differ_json_patch.py +44 -0
- pyfect/schema/_to_encoder_xml.py +119 -0
- pyfect/schema/_to_equivalence.py +186 -0
- pyfect/schema/_to_formatter.py +180 -0
- pyfect/schema/_to_iso.py +73 -0
- pyfect/schema/_to_strategy.py +31 -0
- pyfect/schema/_transform.py +210 -0
- pyfect/schema/_tree.py +27 -0
- pyfect/schema/_type_walk.py +53 -0
- pyfect/schema/_undefined.py +58 -0
- pyfect/schema/_value_codecs.py +84 -0
- pyfect/schema/_values.py +123 -0
- pyfect/schema/_void.py +86 -0
- pyfect/schema/ast/__init__.py +227 -0
- pyfect/schema/ast/_annotations.py +43 -0
- pyfect/schema/ast/_arrays.py +210 -0
- pyfect/schema/ast/_base.py +295 -0
- pyfect/schema/ast/_candidates.py +309 -0
- pyfect/schema/ast/_check.py +181 -0
- pyfect/schema/ast/_class.py +159 -0
- pyfect/schema/ast/_constructors.py +65 -0
- pyfect/schema/ast/_declaration.py +97 -0
- pyfect/schema/ast/_encoding.py +111 -0
- pyfect/schema/ast/_json.py +129 -0
- pyfect/schema/ast/_keywords.py +125 -0
- pyfect/schema/ast/_literal.py +157 -0
- pyfect/schema/ast/_objects.py +356 -0
- pyfect/schema/ast/_record.py +36 -0
- pyfect/schema/ast/_result.py +116 -0
- pyfect/schema/ast/_steps.py +209 -0
- pyfect/schema/ast/_suspend.py +65 -0
- pyfect/schema/ast/_template_literal.py +256 -0
- pyfect/schema/ast/_union.py +172 -0
- pyfect/schema/getter/__init__.py +136 -0
- pyfect/schema/getter/_binary.py +104 -0
- pyfect/schema/getter/_coerce.py +196 -0
- pyfect/schema/getter/_getter.py +243 -0
- pyfect/schema/getter/_make.py +151 -0
- pyfect/schema/getter/_text.py +141 -0
- pyfect/schema/getter/_tree_record.py +170 -0
- pyfect/schema/issue.py +420 -0
- pyfect/schema/model/__init__.py +120 -0
- pyfect/schema/model/_class.py +245 -0
- pyfect/schema/model/_dates.py +103 -0
- pyfect/schema/model/_fields.py +77 -0
- pyfect/schema/model/_toolkit.py +114 -0
- pyfect/schema/model/_uuid.py +69 -0
- pyfect/schema/representation/__init__.py +424 -0
- pyfect/schema/representation/_builtin_revivers.py +331 -0
- pyfect/schema/representation/_code.py +106 -0
- pyfect/schema/representation/_code_builtins.py +281 -0
- pyfect/schema/representation/_code_document.py +563 -0
- pyfect/schema/representation/_code_sort.py +111 -0
- pyfect/schema/representation/_from.py +278 -0
- pyfect/schema/representation/_import/__init__.py +78 -0
- pyfect/schema/representation/_import/_finalize.py +121 -0
- pyfect/schema/representation/_import/_intersect.py +467 -0
- pyfect/schema/representation/_import/_js_order.py +66 -0
- pyfect/schema/representation/_import/_keywords.py +224 -0
- pyfect/schema/representation/_import/_nodes.py +199 -0
- pyfect/schema/representation/_import/_translate.py +455 -0
- pyfect/schema/representation/_json.py +520 -0
- pyfect/schema/representation/_json_schema.py +178 -0
- pyfect/schema/representation/_model.py +284 -0
- pyfect/schema/representation/_revivers.py +89 -0
- pyfect/schema/representation/_to.py +249 -0
- pyfect/schema/transformation/__init__.py +99 -0
- pyfect/schema/transformation/_builtins.py +314 -0
- pyfect/schema/transformation/_durations.py +150 -0
- pyfect/schema/transformation/_transformation.py +177 -0
- pyfect/schema/variant_schema/__init__.py +69 -0
- pyfect/schema/variant_schema/_class.py +188 -0
- pyfect/schema/variant_schema/_defaults.py +30 -0
- pyfect/schema/variant_schema/_field.py +32 -0
- pyfect/schema/variant_schema/_struct.py +130 -0
- pyfect/schema/variant_schema/_toolkit.py +160 -0
- pyfect/scope.py +374 -0
- pyfect/scoped_ref.py +124 -0
- pyfect/semaphore.py +276 -0
- pyfect/semver.py +403 -0
- pyfect/semver_range.py +420 -0
- pyfect/sink/__init__.py +131 -0
- pyfect/sink/_combinators.py +151 -0
- pyfect/sink/_constructors.py +187 -0
- pyfect/sink/_context.py +87 -0
- pyfect/sink/_folds.py +336 -0
- pyfect/sink/_for_each.py +87 -0
- pyfect/sink/_sink.py +265 -0
- pyfect/sink/_steps.py +34 -0
- pyfect/sink/_taking.py +183 -0
- pyfect/socket/__init__.py +146 -0
- pyfect/socket/_accepted.py +65 -0
- pyfect/socket/_connection.py +384 -0
- pyfect/socket/_errors.py +135 -0
- pyfect/socket/_loop.py +66 -0
- pyfect/socket/_net.py +281 -0
- pyfect/socket/_socket.py +245 -0
- pyfect/socket/_tls.py +88 -0
- pyfect/socket/_tls_session.py +117 -0
- pyfect/socket/_web_socket.py +555 -0
- pyfect/socket/datagram/__init__.py +110 -0
- pyfect/socket/datagram/_core.py +460 -0
- pyfect/socket/datagram/_errors.py +102 -0
- pyfect/socket/datagram/_live.py +675 -0
- pyfect/socket/datagram/_model.py +217 -0
- pyfect/socket/server.py +258 -0
- pyfect/socket/ws.py +484 -0
- pyfect/sql/__init__.py +60 -0
- pyfect/sql/_loop.py +134 -0
- pyfect/sql/clickhouse/__init__.py +74 -0
- pyfect/sql/clickhouse/_connection.py +237 -0
- pyfect/sql/clickhouse/_rows.py +87 -0
- pyfect/sql/clickhouse/client.py +322 -0
- pyfect/sql/clickhouse/config.py +241 -0
- pyfect/sql/clickhouse/driver.py +434 -0
- pyfect/sql/clickhouse/error.py +106 -0
- pyfect/sql/clickhouse/migrator.py +47 -0
- pyfect/sql/clickhouse/params.py +168 -0
- pyfect/sql/client/__init__.py +35 -0
- pyfect/sql/client/_client.py +309 -0
- pyfect/sql/client/_sqlite_acquirers.py +130 -0
- pyfect/sql/client/_transaction.py +410 -0
- pyfect/sql/connection.py +87 -0
- pyfect/sql/d1/__init__.py +48 -0
- pyfect/sql/d1/api.py +270 -0
- pyfect/sql/d1/client.py +344 -0
- pyfect/sql/d1/config.py +55 -0
- pyfect/sql/error.py +311 -0
- pyfect/sql/libsql/__init__.py +58 -0
- pyfect/sql/libsql/_connection.py +110 -0
- pyfect/sql/libsql/_hrana.py +258 -0
- pyfect/sql/libsql/_local.py +251 -0
- pyfect/sql/libsql/_targets.py +28 -0
- pyfect/sql/libsql/_values.py +46 -0
- pyfect/sql/libsql/client.py +225 -0
- pyfect/sql/libsql/config.py +170 -0
- pyfect/sql/libsql/migrator.py +43 -0
- pyfect/sql/libsql/sdk.py +123 -0
- pyfect/sql/migrator.py +434 -0
- pyfect/sql/model.py +324 -0
- pyfect/sql/mssql/__init__.py +79 -0
- pyfect/sql/mssql/_connection.py +169 -0
- pyfect/sql/mssql/_driver.py +103 -0
- pyfect/sql/mssql/_names.py +9 -0
- pyfect/sql/mssql/_pool.py +125 -0
- pyfect/sql/mssql/_tds.py +447 -0
- pyfect/sql/mssql/_tds_params.py +155 -0
- pyfect/sql/mssql/_worker.py +155 -0
- pyfect/sql/mssql/client.py +344 -0
- pyfect/sql/mssql/config.py +118 -0
- pyfect/sql/mssql/error.py +111 -0
- pyfect/sql/mssql/migrator.py +43 -0
- pyfect/sql/mssql/parameter.py +44 -0
- pyfect/sql/mssql/procedure.py +119 -0
- pyfect/sql/mssql/types.py +137 -0
- pyfect/sql/mysql/__init__.py +60 -0
- pyfect/sql/mysql/_asyncmy.py +168 -0
- pyfect/sql/mysql/_bind.py +76 -0
- pyfect/sql/mysql/_connection.py +156 -0
- pyfect/sql/mysql/_pool.py +63 -0
- pyfect/sql/mysql/_session.py +262 -0
- pyfect/sql/mysql/client.py +244 -0
- pyfect/sql/mysql/config.py +108 -0
- pyfect/sql/mysql/error.py +104 -0
- pyfect/sql/mysql/migrator.py +44 -0
- pyfect/sql/pg/__init__.py +82 -0
- pyfect/sql/pg/_resolve.py +284 -0
- pyfect/sql/pg/_session.py +380 -0
- pyfect/sql/pg/client.py +398 -0
- pyfect/sql/pg/config.py +142 -0
- pyfect/sql/pg/connection.py +585 -0
- pyfect/sql/pg/error.py +131 -0
- pyfect/sql/pg/migrator.py +139 -0
- pyfect/sql/pg/pool.py +265 -0
- pyfect/sql/resolver.py +294 -0
- pyfect/sql/result.py +24 -0
- pyfect/sql/schema.py +116 -0
- pyfect/sql/sqlite/__init__.py +26 -0
- pyfect/sql/sqlite/_connection.py +230 -0
- pyfect/sql/sqlite/_worker.py +71 -0
- pyfect/sql/sqlite/client.py +248 -0
- pyfect/sql/sqlite/migrator.py +43 -0
- pyfect/sql/statement/__init__.py +144 -0
- pyfect/sql/statement/_compiler.py +384 -0
- pyfect/sql/statement/_segments.py +487 -0
- pyfect/sql/statement/_statement.py +526 -0
- pyfect/sql/statement/_transforms.py +93 -0
- pyfect/sql/stream.py +88 -0
- pyfect/stdio.py +206 -0
- pyfect/stream/__init__.py +151 -0
- pyfect/stream/_async_iterable.py +129 -0
- pyfect/stream/_base.py +69 -0
- pyfect/stream/_bridge_methods.py +139 -0
- pyfect/stream/_catch.py +135 -0
- pyfect/stream/_catch_reason.py +558 -0
- pyfect/stream/_channel_methods.py +61 -0
- pyfect/stream/_chunk_methods.py +169 -0
- pyfect/stream/_chunking.py +310 -0
- pyfect/stream/_concat.py +65 -0
- pyfect/stream/_constructors.py +341 -0
- pyfect/stream/_context.py +147 -0
- pyfect/stream/_error_methods.py +254 -0
- pyfect/stream/_execution_plan.py +199 -0
- pyfect/stream/_fanout.py +154 -0
- pyfect/stream/_fanout_methods.py +183 -0
- pyfect/stream/_filter_methods.py +203 -0
- pyfect/stream/_grouping.py +168 -0
- pyfect/stream/_many.py +65 -0
- pyfect/stream/_map_methods.py +233 -0
- pyfect/stream/_mapping.py +126 -0
- pyfect/stream/_run.py +114 -0
- pyfect/stream/_run_methods.py +114 -0
- pyfect/stream/_service_methods.py +36 -0
- pyfect/stream/_sink_methods.py +151 -0
- pyfect/stream/_sinking.py +277 -0
- pyfect/stream/_sources.py +124 -0
- pyfect/stream/_stream.py +162 -0
- pyfect/stream/_taking.py +330 -0
- pyfect/stream/_text.py +43 -0
- pyfect/stream/_timing.py +294 -0
- pyfect/stream/_timing_methods.py +252 -0
- pyfect/stream/_zip_methods.py +279 -0
- pyfect/stream/_zipping.py +213 -0
- pyfect/subscription_ref.py +66 -0
- pyfect/synchronized_ref.py +38 -0
- pyfect/take.py +36 -0
- pyfect/terminal/__init__.py +41 -0
- pyfect/terminal/_keys.py +113 -0
- pyfect/terminal/_live.py +223 -0
- pyfect/terminal/_service.py +73 -0
- pyfect/testing/__init__.py +122 -0
- pyfect/testing/_assertions.py +92 -0
- pyfect/testing/_clock.py +309 -0
- pyfect/testing/_console.py +164 -0
- pyfect/testing/_crypto.py +44 -0
- pyfect/testing/_decorators.py +211 -0
- pyfect/testing/_flaky.py +34 -0
- pyfect/testing/_layers.py +153 -0
- pyfect/testing/_prop.py +255 -0
- pyfect/testing/_runners.py +84 -0
- pyfect/testing/_runtime.py +174 -0
- pyfect/testing/_schema.py +238 -0
- pyfect/testing/plugin.py +59 -0
- pyfect/tracer/__init__.py +107 -0
- pyfect/tracer/_model.py +176 -0
- pyfect/tracer/_native.py +172 -0
- pyfect/tracer/_refs.py +87 -0
- pyfect/tracer/_spans.py +269 -0
- pyfect/transaction.py +340 -0
- pyfect/trie.py +317 -0
- pyfect/tx_chunk.py +127 -0
- pyfect/tx_deferred.py +75 -0
- pyfect/tx_hash_map.py +265 -0
- pyfect/tx_hash_set.py +151 -0
- pyfect/tx_priority_queue.py +224 -0
- pyfect/tx_pubsub.py +194 -0
- pyfect/tx_queue/__init__.py +27 -0
- pyfect/tx_queue/_queue.py +359 -0
- pyfect/tx_queue/_views.py +60 -0
- pyfect/tx_reentrant_lock.py +201 -0
- pyfect/tx_ref.py +79 -0
- pyfect/tx_semaphore.py +136 -0
- pyfect/tx_subscription_ref.py +118 -0
- pyfect/workers/__init__.py +62 -0
- pyfect/workers/_frames.py +82 -0
- pyfect/workers/_mailbox.py +51 -0
- pyfect/workers/_port.py +106 -0
- pyfect/workers/_process.py +155 -0
- pyfect/workers/_thread.py +100 -0
- pyfect/workers/python_worker.py +133 -0
- pyfect/workers/python_worker_runner.py +112 -0
- pyfect/workers/transferable.py +103 -0
- pyfect/workers/worker.py +273 -0
- pyfect/workers/worker_error.py +86 -0
- pyfect/workers/worker_runner.py +85 -0
- pyfect/workflow/__init__.py +78 -0
- pyfect/workflow/_crypto.py +23 -0
- pyfect/workflow/_encoded.py +381 -0
- pyfect/workflow/_memory.py +424 -0
- pyfect/workflow/_result.py +43 -0
- pyfect/workflow/_services.py +241 -0
- pyfect/workflow/_suspension.py +153 -0
- pyfect/workflow/activity.py +427 -0
- pyfect/workflow/durable_clock.py +72 -0
- pyfect/workflow/durable_deferred.py +403 -0
- pyfect/workflow/durable_queue.py +259 -0
- pyfect/workflow/workflow.py +509 -0
- pyfect/workflow/workflow_engine.py +42 -0
- pyfect/workflow/workflow_proxy.py +161 -0
- pyfect/workflow/workflow_proxy_server.py +146 -0
- pyfect_dev-0.1.0.dist-info/METADATA +296 -0
- pyfect_dev-0.1.0.dist-info/RECORD +1265 -0
- pyfect_dev-0.1.0.dist-info/WHEEL +4 -0
- pyfect_dev-0.1.0.dist-info/entry_points.txt +3 -0
- pyfect_dev-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,1015 @@
|
|
|
1
|
+
"""Schemas generated by ``scripts/gen_ai_schemas.py``; do not edit.
|
|
2
|
+
Import them from ``pyfect.ai.openrouter.generated``."""
|
|
3
|
+
|
|
4
|
+
# pyright: reportPrivateUsage=false, reportUnusedImport=false
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import typing as _t
|
|
8
|
+
|
|
9
|
+
from pyfect import schema as _S
|
|
10
|
+
from pyfect.ai import _generated_support as _b
|
|
11
|
+
from pyfect.http.body import File as _File
|
|
12
|
+
from pyfect.ai.openrouter.generated import types as _T
|
|
13
|
+
from pyfect.schema._struct import StructSchema as _StructSchema
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
AABenchmarkEntry: _StructSchema[_T.AABenchmarkEntry, _t.Never, _t.Never] = _b.struct(_T.AABenchmarkEntry, {"agentic_index": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Artificial Analysis Agentic Index score", format="double"), "coding_index": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Artificial Analysis Coding Index score", format="double"), "intelligence_index": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Artificial Analysis Intelligence Index score", format="double")}).annotate(description="Artificial Analysis benchmark index scores.", identifier="AABenchmarkEntry")
|
|
17
|
+
ActivityItem: _StructSchema[_T.ActivityItem, _t.Never, _t.Never] = _b.struct(_T.ActivityItem, {"byok_usage_inference": _b.check(_S.Number.annotate(description="BYOK inference cost in USD (external credits spent)", format="double"), _S.is_finite().annotate(expected="a finite number")), "completion_tokens": _b.check(_S.Number.annotate(description="Total completion tokens generated"), _S.is_int().annotate(expected="an integer")), "date": _S.String.annotate(description="Date of the activity (YYYY-MM-DD format)"), "endpoint_id": _S.String.annotate(description="Unique identifier for the endpoint"), "model": _S.String.annotate(description="Model slug (e.g., \"openai/gpt-4.1\")"), "model_permaslug": _S.String.annotate(description="Model permaslug (e.g., \"openai/gpt-4.1-2025-04-14\")"), "prompt_tokens": _b.check(_S.Number.annotate(description="Total prompt tokens used"), _S.is_int().annotate(expected="an integer")), "provider_name": _S.String.annotate(description="Name of the provider serving this endpoint"), "reasoning_tokens": _b.check(_S.Number.annotate(description="Total reasoning tokens used"), _S.is_int().annotate(expected="an integer")), "requests": _b.check(_S.Number.annotate(description="Number of requests made"), _S.is_int().annotate(expected="an integer")), "usage": _b.check(_S.Number.annotate(description="Total cost in USD (OpenRouter credits spent)", format="double"), _S.is_finite().annotate(expected="a finite number"))}).annotate(identifier="ActivityItem")
|
|
18
|
+
AdvisorNestedTool: _StructSchema[_T.AdvisorNestedTool, _t.Never, _t.Never] = _b.struct(_T.AdvisorNestedTool, {"parameters": _b.struct(_T.AdvisorNestedTool__parameters, {}), "type": _S.String}, optional=("parameters",)).annotate(description="A tool made available to the advisor sub-agent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the advisor has no way to execute them. The advisor tool may not list itself.", identifier="AdvisorNestedTool")
|
|
19
|
+
AdvisorReasoning: _StructSchema[_T.AdvisorReasoning, _t.Never, _t.Never] = _b.struct(_T.AdvisorReasoning, {"effort": _b.literals(["max", "xhigh", "high", "medium", "low", "minimal", "none"]).annotate(description="Reasoning effort level for the advisor call."), "max_tokens": _b.check(_S.Number.annotate(description="Maximum number of reasoning tokens the advisor may use."), _S.is_int().annotate(expected="an integer"))}, optional=("effort", "max_tokens",)).annotate(description="Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking.", identifier="AdvisorReasoning")
|
|
20
|
+
AnthropicAdvisorToolResult: _StructSchema[_T.AnthropicAdvisorToolResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicAdvisorToolResult, {"content": _b.struct(_T.AnthropicAdvisorToolResult__content, {}), "tool_use_id": _S.String, "type": _b.literal("advisor_tool_result")}).annotate(identifier="AnthropicAdvisorToolResult")
|
|
21
|
+
AnthropicAllowedCallers: _S.Bottom[_T.AnthropicAllowedCallers, _t.Any] = _b.array(_b.literals(["direct", "code_execution_20250825", "code_execution_20260120"])).annotate(identifier="AnthropicAllowedCallers")
|
|
22
|
+
AnthropicBase64PdfSource: _StructSchema[_T.AnthropicBase64PdfSource, _t.Never, _t.Never] = _b.struct(_T.AnthropicBase64PdfSource, {"data": _S.String, "media_type": _b.literal("application/pdf"), "type": _b.literal("base64")}).annotate(identifier="AnthropicBase64PdfSource")
|
|
23
|
+
AnthropicBashCodeExecutionOutput: _StructSchema[_T.AnthropicBashCodeExecutionOutput, _t.Never, _t.Never] = _b.struct(_T.AnthropicBashCodeExecutionOutput, {"file_id": _S.String, "type": _b.literal("bash_code_execution_output")}).annotate(identifier="AnthropicBashCodeExecutionOutput")
|
|
24
|
+
AnthropicBashCodeExecutionToolResultError: _StructSchema[_T.AnthropicBashCodeExecutionToolResultError, _t.Never, _t.Never] = _b.struct(_T.AnthropicBashCodeExecutionToolResultError, {"error_code": _b.literals(["invalid_tool_input", "unavailable", "too_many_requests", "execution_time_exceeded", "output_file_too_large"]), "type": _b.literal("bash_code_execution_tool_result_error")}).annotate(identifier="AnthropicBashCodeExecutionToolResultError")
|
|
25
|
+
AnthropicCacheControlTtl: _S.Bottom[_T.AnthropicCacheControlTtl, _t.Any] = _b.literals(["5m", "1h"]).annotate(identifier="AnthropicCacheControlTtl")
|
|
26
|
+
Objects_: _S.Bottom[_T.Objects_, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
27
|
+
AnthropicCitationCharLocation: _StructSchema[_T.AnthropicCitationCharLocation, _t.Never, _t.Never] = _b.struct(_T.AnthropicCitationCharLocation, {"cited_text": _S.String, "document_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "document_title": _b.union(_S.String, _S.Null), "end_char_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "file_id": _b.union(_S.String, _S.Null), "start_char_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("char_location")}).annotate(identifier="AnthropicCitationCharLocation")
|
|
28
|
+
AnthropicCitationCharLocationParam: _StructSchema[_T.AnthropicCitationCharLocationParam, _t.Never, _t.Never] = _b.struct(_T.AnthropicCitationCharLocationParam, {"cited_text": _S.String, "document_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "document_title": _b.union(_S.String, _S.Null), "end_char_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_char_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("char_location")}).annotate(identifier="AnthropicCitationCharLocationParam")
|
|
29
|
+
AnthropicCitationContentBlockLocation: _StructSchema[_T.AnthropicCitationContentBlockLocation, _t.Never, _t.Never] = _b.struct(_T.AnthropicCitationContentBlockLocation, {"cited_text": _S.String, "document_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "document_title": _b.union(_S.String, _S.Null), "end_block_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "file_id": _b.union(_S.String, _S.Null), "start_block_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("content_block_location")}).annotate(identifier="AnthropicCitationContentBlockLocation")
|
|
30
|
+
AnthropicCitationContentBlockLocationParam: _StructSchema[_T.AnthropicCitationContentBlockLocationParam, _t.Never, _t.Never] = _b.struct(_T.AnthropicCitationContentBlockLocationParam, {"cited_text": _S.String, "document_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "document_title": _b.union(_S.String, _S.Null), "end_block_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_block_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("content_block_location")}).annotate(identifier="AnthropicCitationContentBlockLocationParam")
|
|
31
|
+
AnthropicCitationPageLocation: _StructSchema[_T.AnthropicCitationPageLocation, _t.Never, _t.Never] = _b.struct(_T.AnthropicCitationPageLocation, {"cited_text": _S.String, "document_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "document_title": _b.union(_S.String, _S.Null), "end_page_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "file_id": _b.union(_S.String, _S.Null), "start_page_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("page_location")}).annotate(identifier="AnthropicCitationPageLocation")
|
|
32
|
+
AnthropicCitationPageLocationParam: _StructSchema[_T.AnthropicCitationPageLocationParam, _t.Never, _t.Never] = _b.struct(_T.AnthropicCitationPageLocationParam, {"cited_text": _S.String, "document_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "document_title": _b.union(_S.String, _S.Null), "end_page_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_page_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("page_location")}).annotate(identifier="AnthropicCitationPageLocationParam")
|
|
33
|
+
Objects_1: _S.Bottom[_T.Objects_1, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_1, {"enabled": _S.Boolean}), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
34
|
+
AnthropicCitationSearchResultLocation: _StructSchema[_T.AnthropicCitationSearchResultLocation, _t.Never, _t.Never] = _b.struct(_T.AnthropicCitationSearchResultLocation, {"cited_text": _S.String, "end_block_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "search_result_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "source": _S.String, "start_block_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _b.union(_S.String, _S.Null), "type": _b.literal("search_result_location")}).annotate(identifier="AnthropicCitationSearchResultLocation")
|
|
35
|
+
AnthropicCitationSearchResultLocationParam: _StructSchema[_T.AnthropicCitationSearchResultLocationParam, _t.Never, _t.Never] = _b.struct(_T.AnthropicCitationSearchResultLocationParam, {"cited_text": _S.String, "end_block_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "search_result_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "source": _S.String, "start_block_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _b.union(_S.String, _S.Null), "type": _b.literal("search_result_location")}).annotate(identifier="AnthropicCitationSearchResultLocationParam")
|
|
36
|
+
AnthropicCitationWebSearchResultLocation: _StructSchema[_T.AnthropicCitationWebSearchResultLocation, _t.Never, _t.Never] = _b.struct(_T.AnthropicCitationWebSearchResultLocation, {"cited_text": _S.String, "encrypted_index": _S.String, "title": _b.union(_S.String, _S.Null), "type": _b.literal("web_search_result_location"), "url": _S.String}).annotate(identifier="AnthropicCitationWebSearchResultLocation")
|
|
37
|
+
AnthropicCitationWebSearchResultLocationParam: _StructSchema[_T.AnthropicCitationWebSearchResultLocationParam, _t.Never, _t.Never] = _b.struct(_T.AnthropicCitationWebSearchResultLocationParam, {"cited_text": _S.String, "encrypted_index": _S.String, "title": _b.union(_S.String, _S.Null), "type": _b.literal("web_search_result_location"), "url": _S.String}).annotate(identifier="AnthropicCitationWebSearchResultLocationParam")
|
|
38
|
+
AnthropicCodeExecution20250825Caller: _StructSchema[_T.AnthropicCodeExecution20250825Caller, _t.Never, _t.Never] = _b.struct(_T.AnthropicCodeExecution20250825Caller, {"tool_id": _S.String, "type": _b.literal("code_execution_20250825")}).annotate(identifier="AnthropicCodeExecution20250825Caller")
|
|
39
|
+
AnthropicCodeExecution20260120Caller: _StructSchema[_T.AnthropicCodeExecution20260120Caller, _t.Never, _t.Never] = _b.struct(_T.AnthropicCodeExecution20260120Caller, {"tool_id": _S.String, "type": _b.literal("code_execution_20260120")}).annotate(identifier="AnthropicCodeExecution20260120Caller")
|
|
40
|
+
AnthropicCodeExecutionOutput: _StructSchema[_T.AnthropicCodeExecutionOutput, _t.Never, _t.Never] = _b.struct(_T.AnthropicCodeExecutionOutput, {"file_id": _S.String, "type": _b.literal("code_execution_output")}).annotate(identifier="AnthropicCodeExecutionOutput")
|
|
41
|
+
AnthropicCompactionBlock: _StructSchema[_T.AnthropicCompactionBlock, _t.Never, _t.Never] = _b.struct(_T.AnthropicCompactionBlock, {"content": _b.union(_S.String, _S.Null), "type": _b.literal("compaction")}).annotate(identifier="AnthropicCompactionBlock")
|
|
42
|
+
AnthropicContainer: _S.Bottom[_T.AnthropicContainer, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.AnthropicContainer__0, {"expires_at": _S.String, "id": _S.String}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(identifier="AnthropicContainer")
|
|
43
|
+
AnthropicContainerUpload: _StructSchema[_T.AnthropicContainerUpload, _t.Never, _t.Never] = _b.struct(_T.AnthropicContainerUpload, {"file_id": _S.String, "type": _b.literal("container_upload")}).annotate(identifier="AnthropicContainerUpload")
|
|
44
|
+
AnthropicDirectCaller: _StructSchema[_T.AnthropicDirectCaller, _t.Never, _t.Never] = _b.struct(_T.AnthropicDirectCaller, {"type": _b.literal("direct")}).annotate(identifier="AnthropicDirectCaller")
|
|
45
|
+
AnthropicFileDocumentSource: _StructSchema[_T.AnthropicFileDocumentSource, _t.Never, _t.Never] = _b.struct(_T.AnthropicFileDocumentSource, {"file_id": _S.String, "type": _b.literal("file")}).annotate(identifier="AnthropicFileDocumentSource")
|
|
46
|
+
AnthropicImageMimeType: _S.Bottom[_T.AnthropicImageMimeType, _t.Any] = _b.literals(["image/jpeg", "image/png", "image/gif", "image/webp"]).annotate(identifier="AnthropicImageMimeType")
|
|
47
|
+
Objects_2: _S.Bottom[_T.Objects_2, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_2, {"type": _b.literal("input_tokens"), "value": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
48
|
+
AnthropicInputTokensTrigger: _StructSchema[_T.AnthropicInputTokensTrigger, _t.Never, _t.Never] = _b.struct(_T.AnthropicInputTokensTrigger, {"type": _b.literal("input_tokens"), "value": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(identifier="AnthropicInputTokensTrigger")
|
|
49
|
+
Objects_3: _S.Bottom[_T.Objects_3, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_3, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
50
|
+
AnthropicOutputTokensDetails: _S.Bottom[_T.AnthropicOutputTokensDetails, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.AnthropicOutputTokensDetails__0, {"thinking_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(identifier="AnthropicOutputTokensDetails")
|
|
51
|
+
AnthropicPlainTextSource: _StructSchema[_T.AnthropicPlainTextSource, _t.Never, _t.Never] = _b.struct(_T.AnthropicPlainTextSource, {"data": _S.String, "media_type": _b.literal("text/plain"), "type": _b.literal("text")}).annotate(identifier="AnthropicPlainTextSource")
|
|
52
|
+
AnthropicRedactedThinkingBlock: _StructSchema[_T.AnthropicRedactedThinkingBlock, _t.Never, _t.Never] = _b.struct(_T.AnthropicRedactedThinkingBlock, {"data": _S.String, "type": _b.literal("redacted_thinking")}).annotate(identifier="AnthropicRedactedThinkingBlock")
|
|
53
|
+
AnthropicRefusalStopDetails: _S.Bottom[_T.AnthropicRefusalStopDetails, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.AnthropicRefusalStopDetails__0, {"category": _b.union(_b.literal("cyber"), _b.literal("bio"), _S.Null), "explanation": _b.union(_S.String, _S.Null), "type": _b.literal("refusal")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Structured information about a refusal", identifier="AnthropicRefusalStopDetails")
|
|
54
|
+
AnthropicServerToolErrorCode: _S.Bottom[_T.AnthropicServerToolErrorCode, _t.Any] = _b.literals(["invalid_tool_input", "unavailable", "too_many_requests", "execution_time_exceeded"]).annotate(identifier="AnthropicServerToolErrorCode")
|
|
55
|
+
AnthropicServerToolUsage: _S.Bottom[_T.AnthropicServerToolUsage, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.AnthropicServerToolUsage__0, {"web_fetch_requests": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "web_search_requests": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(identifier="AnthropicServerToolUsage")
|
|
56
|
+
AnthropicServiceTier: _S.Bottom[_T.AnthropicServiceTier, _t.Any] = _b.union(_b.literal("standard"), _b.literal("priority"), _b.literal("batch"), _S.Null).annotate(identifier="AnthropicServiceTier")
|
|
57
|
+
AnthropicSpeed: _S.Bottom[_T.AnthropicSpeed, _t.Any] = _b.union(_b.literal("fast"), _b.literal("standard"), _S.Null).annotate(identifier="AnthropicSpeed")
|
|
58
|
+
AnthropicTextEditorCodeExecutionCreateResult: _StructSchema[_T.AnthropicTextEditorCodeExecutionCreateResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicTextEditorCodeExecutionCreateResult, {"is_file_update": _S.Boolean, "type": _b.literal("text_editor_code_execution_create_result")}).annotate(identifier="AnthropicTextEditorCodeExecutionCreateResult")
|
|
59
|
+
AnthropicTextEditorCodeExecutionStrReplaceResult: _StructSchema[_T.AnthropicTextEditorCodeExecutionStrReplaceResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicTextEditorCodeExecutionStrReplaceResult, {"lines": _b.union(_b.array(_S.String), _S.Null), "new_lines": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "new_start": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "old_lines": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "old_start": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "type": _b.literal("text_editor_code_execution_str_replace_result")}).annotate(identifier="AnthropicTextEditorCodeExecutionStrReplaceResult")
|
|
60
|
+
AnthropicTextEditorCodeExecutionToolResultError: _StructSchema[_T.AnthropicTextEditorCodeExecutionToolResultError, _t.Never, _t.Never] = _b.struct(_T.AnthropicTextEditorCodeExecutionToolResultError, {"error_code": _b.literals(["invalid_tool_input", "unavailable", "too_many_requests", "execution_time_exceeded", "file_not_found"]), "error_message": _b.union(_S.String, _S.Null), "type": _b.literal("text_editor_code_execution_tool_result_error")}).annotate(identifier="AnthropicTextEditorCodeExecutionToolResultError")
|
|
61
|
+
AnthropicTextEditorCodeExecutionViewResult: _StructSchema[_T.AnthropicTextEditorCodeExecutionViewResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicTextEditorCodeExecutionViewResult, {"content": _S.String, "file_type": _b.literals(["text", "image", "pdf"]), "num_lines": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "start_line": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "total_lines": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "type": _b.literal("text_editor_code_execution_view_result")}).annotate(identifier="AnthropicTextEditorCodeExecutionViewResult")
|
|
62
|
+
AnthropicThinkingBlock: _StructSchema[_T.AnthropicThinkingBlock, _t.Never, _t.Never] = _b.struct(_T.AnthropicThinkingBlock, {"signature": _S.String, "thinking": _S.String, "type": _b.literal("thinking")}).annotate(identifier="AnthropicThinkingBlock")
|
|
63
|
+
AnthropicThinkingDisplay: _S.Bottom[_T.AnthropicThinkingDisplay, _t.Any] = _b.union(_b.literal("summarized"), _b.literal("omitted"), _S.Null).annotate(identifier="AnthropicThinkingDisplay")
|
|
64
|
+
AnthropicThinkingTurns: _StructSchema[_T.AnthropicThinkingTurns, _t.Never, _t.Never] = _b.struct(_T.AnthropicThinkingTurns, {"type": _b.literal("thinking_turns"), "value": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(identifier="AnthropicThinkingTurns")
|
|
65
|
+
AnthropicToolReference: _StructSchema[_T.AnthropicToolReference, _t.Never, _t.Never] = _b.struct(_T.AnthropicToolReference, {"tool_name": _S.String, "type": _b.literal("tool_reference")}).annotate(identifier="AnthropicToolReference")
|
|
66
|
+
AnthropicToolUsesKeep: _StructSchema[_T.AnthropicToolUsesKeep, _t.Never, _t.Never] = _b.struct(_T.AnthropicToolUsesKeep, {"type": _b.literal("tool_uses"), "value": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(identifier="AnthropicToolUsesKeep")
|
|
67
|
+
AnthropicToolUsesTrigger: _StructSchema[_T.AnthropicToolUsesTrigger, _t.Never, _t.Never] = _b.struct(_T.AnthropicToolUsesTrigger, {"type": _b.literal("tool_uses"), "value": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(identifier="AnthropicToolUsesTrigger")
|
|
68
|
+
AnthropicUrlImageSource: _StructSchema[_T.AnthropicUrlImageSource, _t.Never, _t.Never] = _b.struct(_T.AnthropicUrlImageSource, {"type": _b.literal("url"), "url": _S.String}).annotate(identifier="AnthropicUrlImageSource")
|
|
69
|
+
AnthropicUrlPdfSource: _StructSchema[_T.AnthropicUrlPdfSource, _t.Never, _t.Never] = _b.struct(_T.AnthropicUrlPdfSource, {"type": _b.literal("url"), "url": _S.String}).annotate(identifier="AnthropicUrlPdfSource")
|
|
70
|
+
AnthropicWebFetchToolResultError: _StructSchema[_T.AnthropicWebFetchToolResultError, _t.Never, _t.Never] = _b.struct(_T.AnthropicWebFetchToolResultError, {"error_code": _b.literals(["invalid_tool_input", "url_too_long", "url_not_allowed", "url_not_accessible", "unsupported_content_type", "too_many_requests", "max_uses_exceeded", "unavailable"]), "type": _b.literal("web_fetch_tool_result_error")}).annotate(identifier="AnthropicWebFetchToolResultError")
|
|
71
|
+
AnthropicWebSearchResult: _StructSchema[_T.AnthropicWebSearchResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicWebSearchResult, {"encrypted_content": _S.String, "page_age": _b.union(_S.String, _S.Null), "title": _S.String, "type": _b.literal("web_search_result"), "url": _S.String}).annotate(identifier="AnthropicWebSearchResult")
|
|
72
|
+
AnthropicWebSearchResultBlockParam: _StructSchema[_T.AnthropicWebSearchResultBlockParam, _t.Never, _t.Never] = _b.struct(_T.AnthropicWebSearchResultBlockParam, {"encrypted_content": _S.String, "page_age": _b.union(_S.String, _S.Null), "title": _S.String, "type": _b.literal("web_search_result"), "url": _S.String}, optional=("page_age",)).annotate(identifier="AnthropicWebSearchResultBlockParam")
|
|
73
|
+
AnthropicWebSearchToolResultError: _StructSchema[_T.AnthropicWebSearchToolResultError, _t.Never, _t.Never] = _b.struct(_T.AnthropicWebSearchToolResultError, {"error_code": _b.literals(["invalid_tool_input", "unavailable", "max_uses_exceeded", "too_many_requests", "query_too_long", "request_too_large"]), "type": _b.literal("web_search_tool_result_error")}).annotate(identifier="AnthropicWebSearchToolResultError")
|
|
74
|
+
Objects_4: _S.Bottom[_T.Objects_4, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_4, {"city": _b.union(_S.String, _S.Null), "country": _b.union(_S.String, _S.Null), "region": _b.union(_S.String, _S.Null), "timezone": _b.union(_S.String, _S.Null), "type": _b.literal("approximate")}, optional=("city", "country", "region", "timezone",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
75
|
+
ApiErrorType: _S.Bottom[_T.ApiErrorType, _t.Any] = _b.literals(["context_length_exceeded", "max_tokens_exceeded", "token_limit_exceeded", "string_too_long", "authentication", "permission_denied", "payment_required", "rate_limit_exceeded", "provider_overloaded", "provider_unavailable", "invalid_request", "invalid_prompt", "not_found", "precondition_failed", "payload_too_large", "unprocessable", "content_policy_violation", "refusal", "invalid_image", "image_too_large", "image_too_small", "unsupported_image_format", "image_not_found", "image_download_failed", "server", "timeout", "unmapped"]).annotate(description="Canonical OpenRouter error type, stable across all API formats", identifier="ApiErrorType")
|
|
76
|
+
ApplyPatchCallOperationDiffDeltaEvent: _StructSchema[_T.ApplyPatchCallOperationDiffDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchCallOperationDiffDeltaEvent, {"delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.apply_patch_call_operation_diff.delta")}).annotate(description="Incremental chunk of `operation.diff` for an `apply_patch_call`. Matches OpenAI's streaming shape.", identifier="ApplyPatchCallOperationDiffDeltaEvent")
|
|
77
|
+
ApplyPatchCallOperationDiffDoneEvent: _StructSchema[_T.ApplyPatchCallOperationDiffDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchCallOperationDiffDoneEvent, {"diff": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.apply_patch_call_operation_diff.done")}).annotate(description="Emitted when `operation.diff` streaming completes for an `apply_patch_call`.", identifier="ApplyPatchCallOperationDiffDoneEvent")
|
|
78
|
+
ApplyPatchCallOutputItem: _StructSchema[_T.ApplyPatchCallOutputItem, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchCallOutputItem, {"call_id": _S.String, "id": _b.union(_S.String, _S.Null), "output": _b.union(_S.String, _S.Null), "status": _b.literals(["completed", "failed"]), "type": _b.literal("apply_patch_call_output")}, optional=("id", "output",)).annotate(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.", identifier="ApplyPatchCallOutputItem")
|
|
79
|
+
ApplyPatchCallStatus: _S.Bottom[_T.ApplyPatchCallStatus, _t.Any] = _b.literals(["in_progress", "completed"]).annotate(description="Lifecycle state of an `apply_patch_call` output item.", identifier="ApplyPatchCallStatus")
|
|
80
|
+
ApplyPatchCreateFileOperation: _StructSchema[_T.ApplyPatchCreateFileOperation, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchCreateFileOperation, {"diff": _S.String, "path": _S.String, "type": _b.literal("create_file")}).annotate(description="The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents.", identifier="ApplyPatchCreateFileOperation")
|
|
81
|
+
ApplyPatchDeleteFileOperation: _StructSchema[_T.ApplyPatchDeleteFileOperation, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchDeleteFileOperation, {"path": _S.String, "type": _b.literal("delete_file")}).annotate(description="The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required.", identifier="ApplyPatchDeleteFileOperation")
|
|
82
|
+
ApplyPatchEngineEnum: _S.Bottom[_T.ApplyPatchEngineEnum, _t.Any] = _b.literals(["auto", "native", "openrouter"]).annotate(description="Which apply_patch engine to use. \"auto\" (default) uses native passthrough when the endpoint advertises native apply_patch support, otherwise falls back to OpenRouter's HITL validator. \"native\" forces native passthrough — when the endpoint does not support native, the request falls back to HITL. \"openrouter\" always runs the HITL validator. Native passthrough streams the diff incrementally via `apply_patch_call_operation_diff.delta` events; HITL buffers the diff for atomic delivery as a single delta.", identifier="ApplyPatchEngineEnum")
|
|
83
|
+
ApplyPatchServerTool: _StructSchema[_T.ApplyPatchServerTool, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchServerTool, {"type": _b.literal("apply_patch")}).annotate(description="Apply patch tool configuration", identifier="ApplyPatchServerTool")
|
|
84
|
+
ApplyPatchUpdateFileOperation: _StructSchema[_T.ApplyPatchUpdateFileOperation, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchUpdateFileOperation, {"diff": _S.String, "path": _S.String, "type": _b.literal("update_file")}).annotate(description="The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file.", identifier="ApplyPatchUpdateFileOperation")
|
|
85
|
+
AppRankingsItem: _StructSchema[_T.AppRankingsItem, _t.Never, _t.Never] = _b.struct(_T.AppRankingsItem, {"app_id": _b.check(_S.Number.annotate(description="Stable numeric identifier of the app on OpenRouter."), _S.is_int().annotate(expected="an integer")), "app_name": _S.String.annotate(description="Public display name of the app."), "rank": _b.check(_S.Number.annotate(description="1-based position of the app within this response, per the requested `sort`."), _S.is_int().annotate(expected="an integer")), "total_requests": _b.check(_S.Number.annotate(description="Number of requests attributed to the app inside the date window."), _S.is_int().annotate(expected="an integer")), "total_tokens": _S.String.annotate(description="Sum of `prompt_tokens + completion_tokens` attributed to the app inside the date window, returned as a decimal string so 64-bit values are not truncated.")}).annotate(identifier="AppRankingsItem")
|
|
86
|
+
AutoBetaRouterPlugin: _StructSchema[_T.AutoBetaRouterPlugin, _t.Never, _t.Never] = _b.struct(_T.AutoBetaRouterPlugin, {"allowed_models": _b.array(_S.String).annotate(description="List of model patterns to filter which models the auto-beta-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."), "cost_quality_tradeoff": _b.check(_b.check(_b.check(_S.Number.annotate(description="Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(0).annotate(expected="a value greater than or equal to 0")), _S.is_less_than_or_equal_to(10).annotate(expected="a value less than or equal to 10")), "enabled": _S.Boolean.annotate(description="Set to false to disable the auto-beta-router plugin for this request. Defaults to true."), "id": _b.literal("auto-beta-router")}, optional=("allowed_models", "cost_quality_tradeoff", "enabled",)).annotate(identifier="AutoBetaRouterPlugin")
|
|
87
|
+
AutoRouterPlugin: _StructSchema[_T.AutoRouterPlugin, _t.Never, _t.Never] = _b.struct(_T.AutoRouterPlugin, {"allowed_models": _b.array(_S.String).annotate(description="List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."), "cost_quality_tradeoff": _b.check(_b.check(_b.check(_S.Number.annotate(description="Controls cost vs. quality routing tradeoff (0–10). 0 = pure quality (best model regardless of cost), 10 = maximize for cost (cheapest model wins). Intermediate values blend quality and cost signals continuously. Defaults to 7."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(0).annotate(expected="a value greater than or equal to 0")), _S.is_less_than_or_equal_to(10).annotate(expected="a value less than or equal to 10")), "enabled": _S.Boolean.annotate(description="Set to false to disable the auto-router plugin for this request. Defaults to true."), "id": _b.literal("auto-router"), "pin_model": _S.Boolean.annotate(description="When true, reuses the model from the most recent assistant message's `model` attribute for subsequent turns. Defaults to false.")}, optional=("allowed_models", "cost_quality_tradeoff", "enabled", "pin_model",)).annotate(identifier="AutoRouterPlugin")
|
|
88
|
+
BadGatewayResponseErrorData: _StructSchema[_T.BadGatewayResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.BadGatewayResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for BadGatewayResponse", identifier="BadGatewayResponseErrorData")
|
|
89
|
+
BadRequestResponseErrorData: _StructSchema[_T.BadRequestResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.BadRequestResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for BadRequestResponse", identifier="BadRequestResponseErrorData")
|
|
90
|
+
BaseCustomToolCallInputDeltaEvent: _StructSchema[_T.BaseCustomToolCallInputDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BaseCustomToolCallInputDeltaEvent, {"delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.custom_tool_call_input.delta")}).annotate(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.", identifier="BaseCustomToolCallInputDeltaEvent")
|
|
91
|
+
BaseCustomToolCallInputDoneEvent: _StructSchema[_T.BaseCustomToolCallInputDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BaseCustomToolCallInputDoneEvent, {"input": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.custom_tool_call_input.done")}).annotate(description="Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools.", identifier="BaseCustomToolCallInputDoneEvent")
|
|
92
|
+
BaseErrorEvent: _StructSchema[_T.BaseErrorEvent, _t.Never, _t.Never] = _b.struct(_T.BaseErrorEvent, {"code": _b.union(_S.String, _S.Null), "message": _S.String, "param": _b.union(_S.String, _S.Null), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("error")}).annotate(description="Event emitted when an error occurs during streaming", identifier="BaseErrorEvent")
|
|
93
|
+
BaseFunctionCallArgsDeltaEvent: _StructSchema[_T.BaseFunctionCallArgsDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BaseFunctionCallArgsDeltaEvent, {"delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.function_call_arguments.delta")}).annotate(description="Event emitted when function call arguments are being streamed", identifier="BaseFunctionCallArgsDeltaEvent")
|
|
94
|
+
BaseFunctionCallArgsDoneEvent: _StructSchema[_T.BaseFunctionCallArgsDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BaseFunctionCallArgsDoneEvent, {"arguments": _S.String, "item_id": _S.String, "name": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.function_call_arguments.done")}).annotate(description="Event emitted when function call arguments streaming is complete", identifier="BaseFunctionCallArgsDoneEvent")
|
|
95
|
+
BaseReasoningDeltaEvent: _StructSchema[_T.BaseReasoningDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BaseReasoningDeltaEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.reasoning_text.delta")}).annotate(description="Event emitted when reasoning text delta is streamed", identifier="BaseReasoningDeltaEvent")
|
|
96
|
+
BaseReasoningDoneEvent: _StructSchema[_T.BaseReasoningDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BaseReasoningDoneEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "text": _S.String, "type": _b.literal("response.reasoning_text.done")}).annotate(description="Event emitted when reasoning text streaming is complete", identifier="BaseReasoningDoneEvent")
|
|
97
|
+
BaseReasoningSummaryTextDeltaEvent: _StructSchema[_T.BaseReasoningSummaryTextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BaseReasoningSummaryTextDeltaEvent, {"delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.reasoning_summary_text.delta")}).annotate(description="Event emitted when reasoning summary text delta is streamed", identifier="BaseReasoningSummaryTextDeltaEvent")
|
|
98
|
+
BaseReasoningSummaryTextDoneEvent: _StructSchema[_T.BaseReasoningSummaryTextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BaseReasoningSummaryTextDoneEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "text": _S.String, "type": _b.literal("response.reasoning_summary_text.done")}).annotate(description="Event emitted when reasoning summary text streaming is complete", identifier="BaseReasoningSummaryTextDoneEvent")
|
|
99
|
+
BaseRefusalDeltaEvent: _StructSchema[_T.BaseRefusalDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BaseRefusalDeltaEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.refusal.delta")}).annotate(description="Event emitted when a refusal delta is streamed", identifier="BaseRefusalDeltaEvent")
|
|
100
|
+
BaseRefusalDoneEvent: _StructSchema[_T.BaseRefusalDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BaseRefusalDoneEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "refusal": _S.String, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.refusal.done")}).annotate(description="Event emitted when refusal streaming is complete", identifier="BaseRefusalDoneEvent")
|
|
101
|
+
BashServerToolEngine: _S.Bottom[_T.BashServerToolEngine, _t.Any] = _b.literals(["auto", "native", "openrouter"]).annotate(description="Which bash engine to use. \"openrouter\" runs commands server-side in the OpenRouter sandbox. \"auto\" (default) and \"native\" use native passthrough, returning the tool call to your application to run client-side; OpenRouter does not execute the commands.", identifier="BashServerToolEngine")
|
|
102
|
+
BooleanCapability: _StructSchema[_T.BooleanCapability, _t.Never, _t.Never] = _b.struct(_T.BooleanCapability, {"type": _b.literal("boolean")}).annotate(description="A supported-or-not flag. Present means the parameter is accepted.", identifier="BooleanCapability")
|
|
103
|
+
BulkAddWorkspaceMembersRequest: _StructSchema[_T.BulkAddWorkspaceMembersRequest, _t.Never, _t.Never] = _b.struct(_T.BulkAddWorkspaceMembersRequest, {"user_ids": _b.check(_b.check(_b.array(_S.String).annotate(description="List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(100).annotate(expected="a value with a length of at most 100"))}).annotate(identifier="BulkAddWorkspaceMembersRequest")
|
|
104
|
+
BulkAssignKeysRequest: _StructSchema[_T.BulkAssignKeysRequest, _t.Never, _t.Never] = _b.struct(_T.BulkAssignKeysRequest, {"key_hashes": _b.check(_b.array(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))).annotate(description="Array of API key hashes to assign to the guardrail"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(identifier="BulkAssignKeysRequest")
|
|
105
|
+
BulkAssignKeysResponse: _StructSchema[_T.BulkAssignKeysResponse, _t.Never, _t.Never] = _b.struct(_T.BulkAssignKeysResponse, {"assigned_count": _b.check(_S.Number.annotate(description="Number of keys successfully assigned"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="BulkAssignKeysResponse")
|
|
106
|
+
BulkAssignMembersRequest: _StructSchema[_T.BulkAssignMembersRequest, _t.Never, _t.Never] = _b.struct(_T.BulkAssignMembersRequest, {"member_user_ids": _b.check(_b.array(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))).annotate(description="Array of member user IDs to assign to the guardrail"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(identifier="BulkAssignMembersRequest")
|
|
107
|
+
BulkAssignMembersResponse: _StructSchema[_T.BulkAssignMembersResponse, _t.Never, _t.Never] = _b.struct(_T.BulkAssignMembersResponse, {"assigned_count": _b.check(_S.Number.annotate(description="Number of members successfully assigned"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="BulkAssignMembersResponse")
|
|
108
|
+
BulkRemoveWorkspaceMembersRequest: _StructSchema[_T.BulkRemoveWorkspaceMembersRequest, _t.Never, _t.Never] = _b.struct(_T.BulkRemoveWorkspaceMembersRequest, {"user_ids": _b.check(_b.check(_b.array(_S.String).annotate(description="List of user IDs to remove from the workspace"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(100).annotate(expected="a value with a length of at most 100"))}).annotate(identifier="BulkRemoveWorkspaceMembersRequest")
|
|
109
|
+
BulkRemoveWorkspaceMembersResponse: _StructSchema[_T.BulkRemoveWorkspaceMembersResponse, _t.Never, _t.Never] = _b.struct(_T.BulkRemoveWorkspaceMembersResponse, {"removed_count": _b.check(_S.Number.annotate(description="Number of members removed"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="BulkRemoveWorkspaceMembersResponse")
|
|
110
|
+
BulkUnassignKeysRequest: _StructSchema[_T.BulkUnassignKeysRequest, _t.Never, _t.Never] = _b.struct(_T.BulkUnassignKeysRequest, {"key_hashes": _b.check(_b.array(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))).annotate(description="Array of API key hashes to unassign from the guardrail"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(identifier="BulkUnassignKeysRequest")
|
|
111
|
+
BulkUnassignKeysResponse: _StructSchema[_T.BulkUnassignKeysResponse, _t.Never, _t.Never] = _b.struct(_T.BulkUnassignKeysResponse, {"unassigned_count": _b.check(_S.Number.annotate(description="Number of keys successfully unassigned"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="BulkUnassignKeysResponse")
|
|
112
|
+
BulkUnassignMembersRequest: _StructSchema[_T.BulkUnassignMembersRequest, _t.Never, _t.Never] = _b.struct(_T.BulkUnassignMembersRequest, {"member_user_ids": _b.check(_b.array(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))).annotate(description="Array of member user IDs to unassign from the guardrail"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(identifier="BulkUnassignMembersRequest")
|
|
113
|
+
BulkUnassignMembersResponse: _StructSchema[_T.BulkUnassignMembersResponse, _t.Never, _t.Never] = _b.struct(_T.BulkUnassignMembersResponse, {"unassigned_count": _b.check(_S.Number.annotate(description="Number of members successfully unassigned"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="BulkUnassignMembersResponse")
|
|
114
|
+
BYOKProviderSlug: _S.Bottom[_T.BYOKProviderSlug, _t.Any] = _b.literals(["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", "coreweave", "crusoe", "darkbloom", "decart", "deepgram", "deepinfra", "deepseek", "dekallm", "digitalocean", "featherless", "fireworks", "fish-audio", "friendli", "gmicloud", "google-ai-studio", "google-vertex", "groq", "heygen", "inception", "inceptron", "inferact-vllm", "inference-net", "infermatic", "inflection", "io-net", "ionstream", "krea", "liquid", "mancer", "mara", "meta", "minimax", "mistral", "modelrun", "modular", "moonshotai", "morph", "ncompass", "nebius", "nex-agi", "nextbit", "novita", "nvidia", "open-inference", "openai", "parasail", "perceptron", "perplexity", "phala", "poolside", "quiver", "recraft", "reka", "relace", "runway", "sail-research", "sakana", "sambanova", "seed", "siliconflow", "sourceful", "stepfun", "streamlake", "switchpoint", "tencent", "tenstorrent", "together", "upstage", "venice", "wafer", "wandb", "xai", "xiaomi", "z-ai"]).annotate(description="The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`).", identifier="BYOKProviderSlug")
|
|
115
|
+
ChatAssistantImages: _S.Bottom[_T.ChatAssistantImages, _t.Any] = _b.array(_b.struct(_T.ChatAssistantImages__item, {"image_url": _b.struct(_T.ChatAssistantImages__item__image_url, {"url": _S.String.annotate(description="URL or base64-encoded data of the generated image")})})).annotate(description="Generated images from image generation models", identifier="ChatAssistantImages")
|
|
116
|
+
ChatAudioOutput: _StructSchema[_T.ChatAudioOutput, _t.Never, _t.Never] = _b.struct(_T.ChatAudioOutput, {"data": _S.String.annotate(description="Base64 encoded audio data"), "expires_at": _b.check(_S.Number.annotate(description="Audio expiration timestamp"), _S.is_int().annotate(expected="an integer")), "id": _S.String.annotate(description="Audio output identifier"), "transcript": _S.String.annotate(description="Audio transcript")}, optional=("data", "expires_at", "id", "transcript",)).annotate(description="Audio output data or reference", identifier="ChatAudioOutput")
|
|
117
|
+
ChatContentAudio: _StructSchema[_T.ChatContentAudio, _t.Never, _t.Never] = _b.struct(_T.ChatContentAudio, {"input_audio": _b.struct(_T.ChatContentAudio__input_audio, {"data": _S.String.annotate(description="Base64 encoded audio data"), "format": _S.String.annotate(description="Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider.")}), "type": _b.literal("input_audio")}).annotate(description="Audio input content part. Supported audio formats vary by provider.", identifier="ChatContentAudio")
|
|
118
|
+
ChatContentFile: _StructSchema[_T.ChatContentFile, _t.Never, _t.Never] = _b.struct(_T.ChatContentFile, {"file": _b.struct(_T.ChatContentFile__file, {"file_data": _S.String.annotate(description="File content as base64 data URL or URL"), "file_id": _S.String.annotate(description="File ID for previously uploaded files"), "filename": _S.String.annotate(description="Original filename")}, optional=("file_data", "file_id", "filename",)), "type": _b.literal("file")}).annotate(description="File content part for document processing", identifier="ChatContentFile")
|
|
119
|
+
ChatContentImage: _StructSchema[_T.ChatContentImage, _t.Never, _t.Never] = _b.struct(_T.ChatContentImage, {"image_url": _b.struct(_T.ChatContentImage__image_url, {"detail": _b.literals(["auto", "low", "high", "original"]).annotate(description="Image detail level for vision models. `original` is an OpenRouter extension (not in the OpenAI Chat Completions spec) requesting true original-resolution media; it is downgraded to `high` for providers that lack an original-resolution tier."), "url": _S.String.annotate(description="URL of the image (data: URLs supported)")}, optional=("detail",)), "type": _b.literal("image_url")}).annotate(description="Image content part for vision models", identifier="ChatContentImage")
|
|
120
|
+
ChatContentVideoInput: _StructSchema[_T.ChatContentVideoInput, _t.Never, _t.Never] = _b.struct(_T.ChatContentVideoInput, {"url": _S.String.annotate(description="URL of the video (data: URLs supported)")}).annotate(description="Video input object", identifier="ChatContentVideoInput")
|
|
121
|
+
ChatDebugOptions: _StructSchema[_T.ChatDebugOptions, _t.Never, _t.Never] = _b.struct(_T.ChatDebugOptions, {"echo_upstream_body": _S.Boolean.annotate(description="If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode.")}, optional=("echo_upstream_body",)).annotate(description="Debug options for inspecting request transformations (streaming only)", identifier="ChatDebugOptions")
|
|
122
|
+
ChatFinishReasonEnum: _S.Bottom[_T.ChatFinishReasonEnum, _t.Any] = _b.union(_b.literal("tool_calls"), _b.literal("stop"), _b.literal("length"), _b.literal("content_filter"), _b.literal("error"), _S.Null).annotate(identifier="ChatFinishReasonEnum")
|
|
123
|
+
ChatFormatGrammarConfig: _StructSchema[_T.ChatFormatGrammarConfig, _t.Never, _t.Never] = _b.struct(_T.ChatFormatGrammarConfig, {"grammar": _S.String.annotate(description="Custom grammar for text generation"), "type": _b.literal("grammar")}).annotate(description="Custom grammar response format", identifier="ChatFormatGrammarConfig")
|
|
124
|
+
ChatFormatJsonObjectConfig: _StructSchema[_T.ChatFormatJsonObjectConfig, _t.Never, _t.Never] = _b.struct(_T.ChatFormatJsonObjectConfig, {"type": _b.literal("json_object")}).annotate(description="JSON object response format", identifier="ChatFormatJsonObjectConfig")
|
|
125
|
+
ChatFormatPythonConfig: _StructSchema[_T.ChatFormatPythonConfig, _t.Never, _t.Never] = _b.struct(_T.ChatFormatPythonConfig, {"type": _b.literal("python")}).annotate(description="Python code response format", identifier="ChatFormatPythonConfig")
|
|
126
|
+
ChatFormatTextConfig: _StructSchema[_T.ChatFormatTextConfig, _t.Never, _t.Never] = _b.struct(_T.ChatFormatTextConfig, {"type": _b.literal("text")}).annotate(description="Default text response format", identifier="ChatFormatTextConfig")
|
|
127
|
+
ChatJsonSchemaConfig: _StructSchema[_T.ChatJsonSchemaConfig, _t.Never, _t.Never] = _b.struct(_T.ChatJsonSchemaConfig, {"description": _S.String.annotate(description="Schema description for the model"), "name": _b.check(_S.String.annotate(description="Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)"), _S.is_max_length(64).annotate(expected="a value with a length of at most 64")), "schema": _b.struct(_T.ChatJsonSchemaConfig__schema, {}).annotate(description="JSON Schema object"), "strict": _b.union(_S.Boolean, _S.Null).annotate(description="Enable strict schema adherence")}, optional=("description", "schema", "strict",)).annotate(description="JSON Schema configuration object", identifier="ChatJsonSchemaConfig")
|
|
128
|
+
ChatNamedToolChoice: _StructSchema[_T.ChatNamedToolChoice, _t.Never, _t.Never] = _b.struct(_T.ChatNamedToolChoice, {"function": _b.struct(_T.ChatNamedToolChoice__function, {"name": _S.String.annotate(description="Function name to call")}), "type": _b.literal("function")}).annotate(description="Named tool choice for specific function", identifier="ChatNamedToolChoice")
|
|
129
|
+
ChatReasoningSummaryVerbosityEnum: _S.Bottom[_T.ChatReasoningSummaryVerbosityEnum, _t.Any] = _b.union(_b.literal("auto"), _b.literal("concise"), _b.literal("detailed"), _S.Null).annotate(identifier="ChatReasoningSummaryVerbosityEnum")
|
|
130
|
+
ChatServerToolChoice: _StructSchema[_T.ChatServerToolChoice, _t.Never, _t.Never] = _b.struct(_T.ChatServerToolChoice, {"type": _S.String.annotate(description="OpenRouter server-tool type to force (e.g. `openrouter:web_search`, `web_search`, `web_search_preview`).")}).annotate(description="OpenRouter extension: force a specific server tool by naming it directly in `tool_choice.type` instead of wrapping it in `{ type: \"function\", function: { name } }`.", identifier="ChatServerToolChoice")
|
|
131
|
+
Objects_6: _S.Bottom[_T.Objects_6, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_6, {"include_usage": _S.Boolean.annotate(description="Deprecated: This field has no effect. Full usage details are always included.")}, optional=("include_usage",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
132
|
+
ChatStreamToolCall: _StructSchema[_T.ChatStreamToolCall, _t.Never, _t.Never] = _b.struct(_T.ChatStreamToolCall, {"function": _b.struct(_T.ChatStreamToolCall__function, {"arguments": _S.String.annotate(description="Function arguments as JSON string"), "name": _b.union(_S.String, _S.Null)}, optional=("arguments", "name",)).annotate(description="Function call details"), "id": _b.union(_S.String, _S.Null), "index": _b.check(_S.Number.annotate(description="Tool call index in the array"), _S.is_int().annotate(expected="an integer")), "type": _b.union(_b.literal("function"), _S.Null)}, optional=("function", "id", "type",)).annotate(description="Tool call delta for streaming responses", identifier="ChatStreamToolCall")
|
|
133
|
+
ChatTokenLogprob: _StructSchema[_T.ChatTokenLogprob, _t.Never, _t.Never] = _b.struct(_T.ChatTokenLogprob, {"bytes": _b.union(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _S.Null).annotate(description="UTF-8 bytes of the token"), "logprob": _b.check(_S.Number.annotate(description="Log probability of the token", format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String.annotate(description="The token"), "top_logprobs": _b.array(_b.struct(_T.ChatTokenLogprob__top_logprobs__item, {"bytes": _b.union(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _S.Null), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String})).annotate(description="Top alternative tokens with probabilities")}).annotate(description="Token log probability information", identifier="ChatTokenLogprob")
|
|
134
|
+
ChatToolCall: _StructSchema[_T.ChatToolCall, _t.Never, _t.Never] = _b.struct(_T.ChatToolCall, {"function": _b.struct(_T.ChatToolCall__function, {"arguments": _S.String.annotate(description="Function arguments as JSON string"), "name": _S.String.annotate(description="Function name to call")}), "id": _S.String.annotate(description="Tool call identifier"), "type": _b.literal("function")}).annotate(description="Tool call made by the assistant", identifier="ChatToolCall")
|
|
135
|
+
Union_: _S.Bottom[_T.Union_, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.Union___0, {"accepted_prediction_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Accepted prediction tokens"), "audio_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Tokens used for audio output"), "reasoning_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Tokens used for reasoning"), "rejected_prediction_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Rejected prediction tokens")}, optional=("accepted_prediction_tokens", "audio_tokens", "reasoning_tokens", "rejected_prediction_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Detailed completion token usage")
|
|
136
|
+
Union_1: _S.Bottom[_T.Union_1, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.Union_1__0, {"audio_tokens": _b.check(_S.Number.annotate(description="Audio input tokens"), _S.is_int().annotate(expected="an integer")), "cache_write_tokens": _b.check(_S.Number.annotate(description="Tokens written to cache. Only returned for models with explicit caching and cache write pricing."), _S.is_int().annotate(expected="an integer")), "cached_tokens": _b.check(_S.Number.annotate(description="Cached prompt tokens"), _S.is_int().annotate(expected="an integer")), "video_tokens": _b.check(_S.Number.annotate(description="Video input tokens"), _S.is_int().annotate(expected="an integer"))}, optional=("audio_tokens", "cache_write_tokens", "cached_tokens", "video_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Detailed prompt token usage")
|
|
137
|
+
CodeInterpreterServerTool: _StructSchema[_T.CodeInterpreterServerTool, _t.Never, _t.Never] = _b.struct(_T.CodeInterpreterServerTool, {"container": _b.union(_S.String, _b.struct(_T.CodeInterpreterServerTool__container__1, {"file_ids": _b.array(_S.String), "memory_limit": _b.union(_b.literal("1g"), _b.literal("4g"), _b.literal("16g"), _b.literal("64g"), _S.Null), "type": _b.literal("auto")}, optional=("file_ids", "memory_limit",))), "type": _b.literal("code_interpreter")}).annotate(description="Code interpreter tool configuration", identifier="CodeInterpreterServerTool")
|
|
138
|
+
CodexLocalShellTool: _StructSchema[_T.CodexLocalShellTool, _t.Never, _t.Never] = _b.struct(_T.CodexLocalShellTool, {"type": _b.literal("local_shell")}).annotate(description="Local shell tool configuration", identifier="CodexLocalShellTool")
|
|
139
|
+
CompactionItem: _StructSchema[_T.CompactionItem, _t.Never, _t.Never] = _b.struct(_T.CompactionItem, {"encrypted_content": _S.String, "id": _b.union(_S.String, _S.Null), "type": _b.literal("compaction")}, optional=("id",)).annotate(description="A context compaction marker with encrypted summary", identifier="CompactionItem")
|
|
140
|
+
CompoundFilter: _StructSchema[_T.CompoundFilter, _t.Never, _t.Never] = _b.struct(_T.CompoundFilter, {"filters": _b.array(_b.struct(_T.CompoundFilter__filters__item, {})), "type": _b.literals(["and", "or"])}).annotate(description="A compound filter that combines multiple comparison or compound filters", identifier="CompoundFilter")
|
|
141
|
+
ComputerUseServerTool: _StructSchema[_T.ComputerUseServerTool, _t.Never, _t.Never] = _b.struct(_T.ComputerUseServerTool, {"display_height": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "display_width": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "environment": _b.literals(["windows", "mac", "linux", "ubuntu", "browser"]), "type": _b.literal("computer_use_preview")}).annotate(description="Computer use preview tool configuration", identifier="ComputerUseServerTool")
|
|
142
|
+
ConflictResponseErrorData: _StructSchema[_T.ConflictResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.ConflictResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for ConflictResponse", identifier="ConflictResponseErrorData")
|
|
143
|
+
ContainerAutoEnvironment: _StructSchema[_T.ContainerAutoEnvironment, _t.Never, _t.Never] = _b.struct(_T.ContainerAutoEnvironment, {"type": _b.literal("container_auto")}).annotate(description="An OpenRouter-managed, auto-provisioned ephemeral container.", identifier="ContainerAutoEnvironment")
|
|
144
|
+
ContainerReferenceEnvironment: _StructSchema[_T.ContainerReferenceEnvironment, _t.Never, _t.Never] = _b.struct(_T.ContainerReferenceEnvironment, {"container_id": _b.check(_b.check(_b.check(_S.String.annotate(description="Identifier of an existing container to reuse (max 20 characters)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(20).annotate(expected="a value with a length of at most 20")), _b.js_pattern('^[A-Za-z0-9_-]+\\Z', '^[\\w-]+$').annotate(expected="a string matching the RegExp ^[\\w-]+$")), "type": _b.literal("container_reference")}).annotate(description="Reference to a previously created container to reuse.", identifier="ContainerReferenceEnvironment")
|
|
145
|
+
ContentFilterAction: _S.Bottom[_T.ContentFilterAction, _t.Any] = _b.literals(["redact", "block", "flag"]).annotate(description="Action taken when the pattern matches", identifier="ContentFilterAction")
|
|
146
|
+
ContentFilterBuiltinAction: _S.Bottom[_T.ContentFilterBuiltinAction, _t.Any] = _b.literals(["redact", "block", "flag"]).annotate(description="Action taken when the builtin filter triggers", identifier="ContentFilterBuiltinAction")
|
|
147
|
+
ContentFilterBuiltinSlug: _S.Bottom[_T.ContentFilterBuiltinSlug, _t.Any] = _b.literals(["email", "phone", "ssn", "credit-card", "ip-address", "person-name", "address", "regex-prompt-injection"]).annotate(description="The builtin filter identifier", identifier="ContentFilterBuiltinSlug")
|
|
148
|
+
ContentPartAudio: _StructSchema[_T.ContentPartAudio, _t.Never, _t.Never] = _b.struct(_T.ContentPartAudio, {"audio_url": _b.struct(_T.ContentPartAudio__audio_url, {"url": _S.String}), "type": _b.literal("audio_url")}).annotate(identifier="ContentPartAudio")
|
|
149
|
+
ContentPartImage: _StructSchema[_T.ContentPartImage, _t.Never, _t.Never] = _b.struct(_T.ContentPartImage, {"image_url": _b.struct(_T.ContentPartImage__image_url, {"url": _S.String}), "type": _b.literal("image_url")}).annotate(identifier="ContentPartImage")
|
|
150
|
+
ContentPartVideo: _StructSchema[_T.ContentPartVideo, _t.Never, _t.Never] = _b.struct(_T.ContentPartVideo, {"type": _b.literal("video_url"), "video_url": _b.struct(_T.ContentPartVideo__video_url, {"url": _S.String})}).annotate(identifier="ContentPartVideo")
|
|
151
|
+
ContextCompactionItem: _StructSchema[_T.ContextCompactionItem, _t.Never, _t.Never] = _b.struct(_T.ContextCompactionItem, {"encrypted_content": _b.union(_S.String, _S.Null), "id": _b.union(_S.String, _S.Null), "type": _b.literal("context_compaction")}, optional=("encrypted_content", "id",)).annotate(description="A context compaction marker with an optional encrypted summary", identifier="ContextCompactionItem")
|
|
152
|
+
ContextCompressionEngine: _S.Bottom[_T.ContextCompressionEngine, _t.Any] = _b.literal("middle-out").annotate(description="The compression engine to use. Defaults to \"middle-out\".", identifier="ContextCompressionEngine")
|
|
153
|
+
Objects_8: _S.Bottom[_T.Objects_8, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_8, {"upstream_inference_completions_cost": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "upstream_inference_cost": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "upstream_inference_prompt_cost": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number"))}, optional=("upstream_inference_cost",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
154
|
+
CreateWorkspaceRequest: _StructSchema[_T.CreateWorkspaceRequest, _t.Never, _t.Never] = _b.struct(_T.CreateWorkspaceRequest, {"default_image_model": _b.union(_S.String, _S.Null).annotate(description="Default image model for this workspace"), "default_provider_sort": _b.union(_S.String, _S.Null).annotate(description="Default provider sort preference (price, throughput, latency, exacto)"), "default_text_model": _b.union(_S.String, _S.Null).annotate(description="Default text model for this workspace"), "description": _b.union(_b.check(_S.String, _S.is_max_length(500).annotate(expected="a value with a length of at most 500")), _S.Null).annotate(description="Description of the workspace"), "io_logging_api_key_ids": _b.union(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _S.Null).annotate(description="Optional array of API key IDs to filter I/O logging"), "io_logging_sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for I/O logging (0.0001-1)", format="double"), _S.is_finite().annotate(expected="a finite number")), "is_data_discount_logging_enabled": _S.Boolean.annotate(description="Whether data discount logging is enabled"), "is_observability_broadcast_enabled": _S.Boolean.annotate(description="Whether broadcast is enabled"), "is_observability_io_logging_enabled": _S.Boolean.annotate(description="Whether private logging is enabled"), "name": _b.check(_b.check(_S.String.annotate(description="Name for the new workspace"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), "slug": _b.check(_b.check(_b.check(_S.String.annotate(description="URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), _b.js_pattern('^[a-z0-9]+(?:-[a-z0-9]+)*\\Z', '^[a-z0-9]+(?:-[a-z0-9]+)*$').annotate(expected="a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$"))}, optional=("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",)).annotate(identifier="CreateWorkspaceRequest")
|
|
155
|
+
CustomTool: _StructSchema[_T.CustomTool, _t.Never, _t.Never] = _b.struct(_T.CustomTool, {"description": _S.String, "format": _b.union(_b.struct(_T.CustomTool__format__0, {"type": _b.literal("text")}), _b.struct(_T.CustomTool__format__1, {"definition": _S.String, "syntax": _b.literals(["lark", "regex"]), "type": _b.literal("grammar")})), "name": _S.String, "type": _b.literal("custom")}, optional=("description", "format",)).annotate(description="Custom tool configuration", identifier="CustomTool")
|
|
156
|
+
CustomToolCallInputDeltaEvent: _StructSchema[_T.CustomToolCallInputDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.CustomToolCallInputDeltaEvent, {"delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.custom_tool_call_input.delta")}).annotate(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.", identifier="CustomToolCallInputDeltaEvent")
|
|
157
|
+
CustomToolCallInputDoneEvent: _StructSchema[_T.CustomToolCallInputDoneEvent, _t.Never, _t.Never] = _b.struct(_T.CustomToolCallInputDoneEvent, {"input": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.custom_tool_call_input.done")}).annotate(description="Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools.", identifier="CustomToolCallInputDoneEvent")
|
|
158
|
+
CustomToolCallItem: _StructSchema[_T.CustomToolCallItem, _t.Never, _t.Never] = _b.struct(_T.CustomToolCallItem, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _b.literal("custom_tool_call")}, optional=("id", "namespace",)).annotate(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.", identifier="CustomToolCallItem")
|
|
159
|
+
DABenchmarkEntry: _StructSchema[_T.DABenchmarkEntry, _t.Never, _t.Never] = _b.struct(_T.DABenchmarkEntry, {"arena": _S.String.annotate(description="Arena type (e.g. models, builders, agents)"), "category": _S.String.annotate(description="Category within the arena (e.g. website, gamedev, uicomponent)"), "elo": _b.check(_S.Number.annotate(description="ELO rating from head-to-head arena battles", format="double"), _S.is_finite().annotate(expected="a finite number")), "rank": _b.check(_S.Number.annotate(description="Rank position within this arena+category among models available on OpenRouter (1 = highest ELO)"), _S.is_int().annotate(expected="an integer")), "win_rate": _b.check(_S.Number.annotate(description="Win rate percentage in arena battles", format="double"), _S.is_finite().annotate(expected="a finite number"))}).annotate(description="A single Design Arena benchmark entry for a specific arena+category", identifier="DABenchmarkEntry")
|
|
160
|
+
DatetimeServerToolConfig: _StructSchema[_T.DatetimeServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.DatetimeServerToolConfig, {"timezone": _S.String.annotate(description="IANA timezone name (e.g. \"America/New_York\"). Defaults to UTC.")}, optional=("timezone",)).annotate(description="Configuration for the openrouter:datetime server tool", identifier="DatetimeServerToolConfig")
|
|
161
|
+
DebugEvent: _StructSchema[_T.DebugEvent, _t.Never, _t.Never] = _b.struct(_T.DebugEvent, {"debug": _b.struct(_T.DebugEvent__debug, {"echo_upstream_body": _b.struct(_T.DebugEvent__debug__echo_upstream_body, {}), "timings": _b.struct(_T.DebugEvent__debug__timings, {"epoch_ms": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "event": _b.literals(["adapter_request", "upstream_headers_received", "first_token_received", "upstream_body_ended"]), "start_ms": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))})}, optional=("echo_upstream_body", "timings",)), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.debug")}).annotate(description="Debug event emitted when debug.echo_upstream_body is true. Contains the transformed upstream request body or timing milestones.", identifier="DebugEvent")
|
|
162
|
+
DefaultParameters: _S.Bottom[_T.DefaultParameters, _t.Any] = _b.union(_b.struct(_T.DefaultParameters__0, {"frequency_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "presence_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "repetition_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "temperature": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "top_k": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "top_p": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double")}, optional=("frequency_penalty", "presence_penalty", "repetition_penalty", "temperature", "top_k", "top_p",)), _S.Null).annotate(description="Default parameters for this model", identifier="DefaultParameters")
|
|
163
|
+
DeleteBYOKKeyResponse: _StructSchema[_T.DeleteBYOKKeyResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteBYOKKeyResponse, {"deleted": _b.literal(True).annotate(description="Confirmation that the BYOK credential was deleted.")}).annotate(identifier="DeleteBYOKKeyResponse")
|
|
164
|
+
DeleteGuardrailResponse: _StructSchema[_T.DeleteGuardrailResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteGuardrailResponse, {"deleted": _b.literal(True).annotate(description="Confirmation that the guardrail was deleted")}).annotate(identifier="DeleteGuardrailResponse")
|
|
165
|
+
DeleteObservabilityDestinationResponse: _StructSchema[_T.DeleteObservabilityDestinationResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteObservabilityDestinationResponse, {"deleted": _b.literal(True).annotate(description="Always `true` on success.")}).annotate(identifier="DeleteObservabilityDestinationResponse")
|
|
166
|
+
DeleteWorkspaceBudgetResponse: _StructSchema[_T.DeleteWorkspaceBudgetResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteWorkspaceBudgetResponse, {"deleted": _b.literal(True).annotate(description="Confirmation that the budget was deleted (or did not exist)")}).annotate(identifier="DeleteWorkspaceBudgetResponse")
|
|
167
|
+
DeleteWorkspaceResponse: _StructSchema[_T.DeleteWorkspaceResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteWorkspaceResponse, {"deleted": _b.literal(True).annotate(description="Confirmation that the workspace was deleted")}).annotate(identifier="DeleteWorkspaceResponse")
|
|
168
|
+
DeprecatedRoute: _S.Bottom[_T.DeprecatedRoute, _t.Any] = _b.union(_b.literal("fallback"), _b.literal("sort"), _S.Null).annotate(description="**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: \"fallback\" (maps to \"model\"), \"sort\" (maps to \"none\").", identifier="DeprecatedRoute")
|
|
169
|
+
EdgeNetworkTimeoutResponseErrorData: _StructSchema[_T.EdgeNetworkTimeoutResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.EdgeNetworkTimeoutResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for EdgeNetworkTimeoutResponse", identifier="EdgeNetworkTimeoutResponseErrorData")
|
|
170
|
+
EndpointInfo: _StructSchema[_T.EndpointInfo, _t.Never, _t.Never] = _b.struct(_T.EndpointInfo, {"model": _S.String, "provider": _S.String, "selected": _S.Boolean}).annotate(identifier="EndpointInfo")
|
|
171
|
+
EndpointStatus: _S.Bottom[_T.EndpointStatus, _t.Any] = _b.literals([0, -1, -2, -3, -5, -10]).annotate(identifier="EndpointStatus")
|
|
172
|
+
EnumCapability: _StructSchema[_T.EnumCapability, _t.Never, _t.Never] = _b.struct(_T.EnumCapability, {"type": _b.literal("enum"), "values": _b.array(_S.String)}).annotate(description="A parameter that accepts one of a discrete set of string values.", identifier="EnumCapability")
|
|
173
|
+
ErrorEvent: _StructSchema[_T.ErrorEvent, _t.Never, _t.Never] = _b.struct(_T.ErrorEvent, {"code": _b.union(_S.String, _S.Null), "message": _S.String, "param": _b.union(_S.String, _S.Null), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("error")}).annotate(description="Event emitted when an error occurs during streaming", identifier="ErrorEvent")
|
|
174
|
+
FileCitation: _StructSchema[_T.FileCitation, _t.Never, _t.Never] = _b.struct(_T.FileCitation, {"file_id": _S.String, "filename": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("file_citation")}).annotate(identifier="FileCitation")
|
|
175
|
+
FileDeleteResponse: _StructSchema[_T.FileDeleteResponse, _t.Never, _t.Never] = _b.struct(_T.FileDeleteResponse, {"id": _S.String, "type": _b.literal("file_deleted")}).annotate(description="Confirmation that a file was deleted.", identifier="FileDeleteResponse")
|
|
176
|
+
FileMetadata: _StructSchema[_T.FileMetadata, _t.Never, _t.Never] = _b.struct(_T.FileMetadata, {"created_at": _S.String, "downloadable": _S.Boolean, "filename": _S.String, "id": _S.String, "mime_type": _S.String, "size_bytes": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("file")}).annotate(description="Metadata describing a stored file.", identifier="FileMetadata")
|
|
177
|
+
FilePath: _StructSchema[_T.FilePath, _t.Never, _t.Never] = _b.struct(_T.FilePath, {"file_id": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("file_path")}).annotate(identifier="FilePath")
|
|
178
|
+
FilesServerToolConfig: _StructSchema[_T.FilesServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.FilesServerToolConfig, {}).annotate(description="Configuration for the openrouter:files server tool", identifier="FilesServerToolConfig")
|
|
179
|
+
ForbiddenResponseErrorData: _StructSchema[_T.ForbiddenResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.ForbiddenResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for ForbiddenResponse", identifier="ForbiddenResponseErrorData")
|
|
180
|
+
FormatJsonObjectConfig: _StructSchema[_T.FormatJsonObjectConfig, _t.Never, _t.Never] = _b.struct(_T.FormatJsonObjectConfig, {"type": _b.literal("json_object")}).annotate(description="JSON object response format", identifier="FormatJsonObjectConfig")
|
|
181
|
+
FormatJsonSchemaConfig: _StructSchema[_T.FormatJsonSchemaConfig, _t.Never, _t.Never] = _b.struct(_T.FormatJsonSchemaConfig, {"description": _S.String, "name": _S.String, "schema": _b.struct(_T.FormatJsonSchemaConfig__schema, {}), "strict": _b.union(_S.Boolean, _S.Null), "type": _b.literal("json_schema")}, optional=("description", "strict",)).annotate(description="JSON schema constrained response format", identifier="FormatJsonSchemaConfig")
|
|
182
|
+
FormatTextConfig: _StructSchema[_T.FormatTextConfig, _t.Never, _t.Never] = _b.struct(_T.FormatTextConfig, {"type": _b.literal("text")}).annotate(description="Plain text response format", identifier="FormatTextConfig")
|
|
183
|
+
FrameImage: _StructSchema[_T.FrameImage, _t.Never, _t.Never] = _b.struct(_T.FrameImage, {"image_url": _b.struct(_T.FrameImage__image_url, {"url": _S.String}), "type": _b.literal("image_url"), "frame_type": _b.literals(["first_frame", "last_frame"]).annotate(description="Whether this image represents the first or last frame of the video")}).annotate(identifier="FrameImage")
|
|
184
|
+
FunctionCallArgsDeltaEvent: _StructSchema[_T.FunctionCallArgsDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.FunctionCallArgsDeltaEvent, {"delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.function_call_arguments.delta")}).annotate(description="Event emitted when function call arguments are being streamed", identifier="FunctionCallArgsDeltaEvent")
|
|
185
|
+
FunctionCallArgsDoneEvent: _StructSchema[_T.FunctionCallArgsDoneEvent, _t.Never, _t.Never] = _b.struct(_T.FunctionCallArgsDoneEvent, {"arguments": _S.String, "item_id": _S.String, "name": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.function_call_arguments.done")}).annotate(description="Event emitted when function call arguments streaming is complete", identifier="FunctionCallArgsDoneEvent")
|
|
186
|
+
FunctionTool: _StructSchema[_T.FunctionTool, _t.Never, _t.Never] = _b.struct(_T.FunctionTool, {"description": _b.union(_S.String, _S.Null), "name": _S.String, "parameters": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "strict": _b.union(_S.Boolean, _S.Null), "type": _b.literal("function")}, optional=("description", "strict",)).annotate(description="Function tool definition", identifier="FunctionTool")
|
|
187
|
+
Arrays_1: _S.Bottom[_T.Arrays_1, _t.Any] = _b.array(_S.String)
|
|
188
|
+
Arrays_2: _S.Bottom[_T.Arrays_2, _t.Any] = _b.array(_S.String)
|
|
189
|
+
Arrays_3: _S.Bottom[_T.Arrays_3, _t.Any] = _b.array(_b.struct(_T.Arrays_3__item, {"stances": _b.array(_b.struct(_T.Arrays_3__item__stances__item, {"model": _S.String, "stance": _S.String})), "topic": _S.String}))
|
|
190
|
+
Arrays_4: _S.Bottom[_T.Arrays_4, _t.Any] = _b.array(_b.struct(_T.Arrays_4__item, {"models": _b.array(_S.String), "point": _S.String}))
|
|
191
|
+
Arrays_5: _S.Bottom[_T.Arrays_5, _t.Any] = _b.array(_b.struct(_T.Arrays_5__item, {"insight": _S.String, "model": _S.String}))
|
|
192
|
+
FusionCallAnalysisInProgressEvent: _StructSchema[_T.FusionCallAnalysisInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.FusionCallAnalysisInProgressEvent, {"item_id": _S.String, "judge_model": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.fusion_call.analysis.in_progress")}).annotate(description="Emitted when the fusion judge starts producing the structured analysis.", identifier="FusionCallAnalysisInProgressEvent")
|
|
193
|
+
FusionCallCompletedEvent: _StructSchema[_T.FusionCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.FusionCallCompletedEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.fusion_call.completed")}).annotate(description="Emitted when the openrouter:fusion tool call finishes.", identifier="FusionCallCompletedEvent")
|
|
194
|
+
FusionCallInProgressEvent: _StructSchema[_T.FusionCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.FusionCallInProgressEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.fusion_call.in_progress")}).annotate(description="Emitted when an openrouter:fusion tool call begins executing.", identifier="FusionCallInProgressEvent")
|
|
195
|
+
FusionCallPanelAddedEvent: _StructSchema[_T.FusionCallPanelAddedEvent, _t.Never, _t.Never] = _b.struct(_T.FusionCallPanelAddedEvent, {"item_id": _S.String, "model": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.fusion_call.panel.added")}).annotate(description="Emitted when a fusion analysis-panel model starts.", identifier="FusionCallPanelAddedEvent")
|
|
196
|
+
FusionCallPanelCompletedEvent: _StructSchema[_T.FusionCallPanelCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.FusionCallPanelCompletedEvent, {"content": _S.String, "item_id": _S.String, "model": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.fusion_call.panel.completed")}).annotate(description="Emitted when a fusion panel model finishes with its full content.", identifier="FusionCallPanelCompletedEvent")
|
|
197
|
+
FusionCallPanelDeltaEvent: _StructSchema[_T.FusionCallPanelDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.FusionCallPanelDeltaEvent, {"delta": _S.String, "item_id": _S.String, "model": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.fusion_call.panel.delta")}).annotate(description="Incremental content token from a fusion panel model.", identifier="FusionCallPanelDeltaEvent")
|
|
198
|
+
FusionCallPanelFailedEvent: _StructSchema[_T.FusionCallPanelFailedEvent, _t.Never, _t.Never] = _b.struct(_T.FusionCallPanelFailedEvent, {"error": _S.String, "item_id": _S.String, "model": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "status_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.fusion_call.panel.failed")}, optional=("status_code",)).annotate(description="Emitted when a fusion panel model fails.", identifier="FusionCallPanelFailedEvent")
|
|
199
|
+
FusionCallPanelReasoningDeltaEvent: _StructSchema[_T.FusionCallPanelReasoningDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.FusionCallPanelReasoningDeltaEvent, {"delta": _S.String, "item_id": _S.String, "model": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.fusion_call.panel.reasoning.delta")}).annotate(description="Incremental reasoning token from a fusion panel model.", identifier="FusionCallPanelReasoningDeltaEvent")
|
|
200
|
+
FusionPlugin: _StructSchema[_T.FusionPlugin, _t.Never, _t.Never] = _b.struct(_T.FusionPlugin, {"analysis_models": _b.check(_b.check(_b.array(_S.String).annotate(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)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(8).annotate(expected="a value with a length of at most 8")), "enabled": _S.Boolean.annotate(description="Set to false to disable the fusion plugin for this request. Defaults to true."), "id": _b.literal("fusion"), "max_tool_calls": _b.check(_b.check(_b.check(_S.Number.annotate(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."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1")), _S.is_less_than_or_equal_to(16).annotate(expected="a value less than or equal to 16")), "model": _S.String.annotate(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."), "preset": _b.literals(["general-high", "general-budget", "general-fast"]).annotate(description="A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence."), "tools": _b.check(_b.array(_b.struct(_T.FusionPlugin__tools__item, {"parameters": _b.struct(_T.FusionPlugin__tools__item__parameters, {}).annotate(description="Optional configuration forwarded as the tool's `parameters` object."), "type": _S.String.annotate(description="Server tool type identifier (e.g. \"openrouter:web_search\", \"openrouter:web_fetch\").")}, optional=("parameters",))).annotate(description="Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only)."), _S.is_max_length(8).annotate(expected="a value with a length of at most 8"))}, optional=("analysis_models", "enabled", "max_tool_calls", "model", "preset", "tools",)).annotate(identifier="FusionPlugin")
|
|
201
|
+
Arrays_6: _S.Bottom[_T.Arrays_6, _t.Any] = _b.check(_b.check(_b.array(_S.String).annotate(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."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(8).annotate(expected="a value with a length of at most 8"))
|
|
202
|
+
Objects_9: _StructSchema[_T.Objects_9, _t.Never, _t.Never] = _b.struct(_T.Objects_9, {"effort": _b.literals(["max", "xhigh", "high", "medium", "low", "minimal", "none"]).annotate(description="Reasoning effort level for panelist and judge inner calls."), "max_tokens": _b.check(_S.Number.annotate(description="Maximum number of reasoning tokens each panelist and judge model may use. Helps bound cost when models allocate too much budget to chain-of-thought."), _S.is_int().annotate(expected="an integer"))}, optional=("effort", "max_tokens",)).annotate(description="Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.")
|
|
203
|
+
Arrays_7: _S.Bottom[_T.Arrays_7, _t.Any] = _b.check(_b.array(_b.struct(_T.Arrays_7__item, {"parameters": _b.struct(_T.Arrays_7__item__parameters, {}).annotate(description="Optional configuration forwarded as the tool's `parameters` object."), "type": _S.String.annotate(description="Server tool type identifier (e.g. \"openrouter:web_search\", \"openrouter:web_fetch\").")}, optional=("parameters",))).annotate(description="Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only)."), _S.is_max_length(8).annotate(expected="a value with a length of at most 8"))
|
|
204
|
+
FusionSource: _StructSchema[_T.FusionSource, _t.Never, _t.Never] = _b.struct(_T.FusionSource, {"title": _S.String.annotate(description="Title of the retrieved web page."), "url": _S.String.annotate(description="URL of the web page a panel or the judge retrieved during the run.")}).annotate(description="A web page retrieved via web search during a fusion run.", identifier="FusionSource")
|
|
205
|
+
GenerationContentData: _StructSchema[_T.GenerationContentData, _t.Never, _t.Never] = _b.struct(_T.GenerationContentData, {"input": _b.union(_b.struct(_T.GenerationContentData__input__0, {"prompt": _S.String}), _b.struct(_T.GenerationContentData__input__1, {"messages": _b.array(_S.Json.annotate(expected="JSON value"))})).annotate(description="The input to the generation — either a prompt string or an array of messages"), "output": _b.struct(_T.GenerationContentData__output, {"completion": _b.union(_S.String, _S.Null).annotate(description="The completion output"), "reasoning": _b.union(_S.String, _S.Null).annotate(description="Reasoning/thinking output, if any")}).annotate(description="The output from the generation")}).annotate(description="Stored prompt and completion content", identifier="GenerationContentData")
|
|
206
|
+
GoneResponseErrorData: _StructSchema[_T.GoneResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.GoneResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for GoneResponse", identifier="GoneResponseErrorData")
|
|
207
|
+
GuardrailInterval: _S.Bottom[_T.GuardrailInterval, _t.Any] = _b.union(_b.literal("daily"), _b.literal("weekly"), _b.literal("monthly"), _S.Null).annotate(description="Interval at which the limit resets (daily, weekly, monthly)", identifier="GuardrailInterval")
|
|
208
|
+
ImageConfig: _StructSchema[_T.ImageConfig, _t.Never, _t.Never] = _b.struct(_T.ImageConfig, {}).annotate(description="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.", identifier="ImageConfig")
|
|
209
|
+
ImageGenCallCompletedEvent: _StructSchema[_T.ImageGenCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ImageGenCallCompletedEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.image_generation_call.completed")}).annotate(description="Image generation call completed", identifier="ImageGenCallCompletedEvent")
|
|
210
|
+
ImageGenCallGeneratingEvent: _StructSchema[_T.ImageGenCallGeneratingEvent, _t.Never, _t.Never] = _b.struct(_T.ImageGenCallGeneratingEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.image_generation_call.generating")}).annotate(description="Image generation call is generating", identifier="ImageGenCallGeneratingEvent")
|
|
211
|
+
ImageGenCallInProgressEvent: _StructSchema[_T.ImageGenCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.ImageGenCallInProgressEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.image_generation_call.in_progress")}).annotate(description="Image generation call in progress", identifier="ImageGenCallInProgressEvent")
|
|
212
|
+
ImageGenCallPartialImageEvent: _StructSchema[_T.ImageGenCallPartialImageEvent, _t.Never, _t.Never] = _b.struct(_T.ImageGenCallPartialImageEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "partial_image_b64": _S.String, "partial_image_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.image_generation_call.partial_image")}).annotate(description="Image generation call with partial image", identifier="ImageGenCallPartialImageEvent")
|
|
213
|
+
ImageGenerationServerTool: _StructSchema[_T.ImageGenerationServerTool, _t.Never, _t.Never] = _b.struct(_T.ImageGenerationServerTool, {"background": _b.literals(["transparent", "opaque", "auto"]), "input_fidelity": _b.union(_b.literal("high"), _b.literal("low"), _S.Null), "input_image_mask": _b.struct(_T.ImageGenerationServerTool__input_image_mask, {"file_id": _S.String, "image_url": _S.String}, optional=("file_id", "image_url",)), "model": _S.String, "moderation": _b.literals(["auto", "low"]), "output_compression": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_format": _b.literals(["png", "webp", "jpeg"]), "partial_images": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "quality": _b.literals(["low", "medium", "high", "auto"]), "size": _S.String, "type": _b.literal("image_generation")}, optional=("background", "input_fidelity", "input_image_mask", "model", "moderation", "output_compression", "output_format", "partial_images", "quality", "size",)).annotate(description="Image generation tool configuration", identifier="ImageGenerationServerTool")
|
|
214
|
+
ImageGenerationServerToolConfig: _StructSchema[_T.ImageGenerationServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.ImageGenerationServerToolConfig, {"model": _S.String.annotate(description="Which image generation model to use (e.g. \"openai/gpt-5-image\"). Defaults to \"openai/gpt-5-image\".")}, optional=("model",)).annotate(description="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.", identifier="ImageGenerationServerToolConfig")
|
|
215
|
+
ImageGenerationStatus: _S.Bottom[_T.ImageGenerationStatus, _t.Any] = _b.literals(["in_progress", "completed", "generating", "failed"]).annotate(identifier="ImageGenerationStatus")
|
|
216
|
+
Union_6: _S.Bottom[_T.Union_6, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.Union_6__0, {"audio_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Tokens generated by the model for audio output."), "image_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Tokens generated by the model for image output."), "reasoning_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Tokens generated by the model for reasoning.")}, optional=("audio_tokens", "image_tokens", "reasoning_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null)
|
|
217
|
+
Union_8: _S.Bottom[_T.Union_8, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.Union_8__0, {"audio_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Tokens used for input audio."), "cache_write_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Tokens written to cache. Only returned for models with explicit caching and cache write pricing."), "cached_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Tokens cached by the endpoint."), "file_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Tokens used for input files/documents."), "video_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Tokens used for input video.")}, optional=("audio_tokens", "cache_write_tokens", "cached_tokens", "file_tokens", "video_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Breakdown of tokens used in the prompt.")
|
|
218
|
+
Union_9: _S.Bottom[_T.Union_9, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.Union_9__0, {"tool_calls_executed": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of OpenRouter server tool calls that executed and produced a result."), "tool_calls_requested": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here."), "web_search_requests": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two.")}, optional=("tool_calls_executed", "tool_calls_requested", "web_search_requests",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Usage for server-side tool execution (e.g., web search)")
|
|
219
|
+
ImageGenPartialImageEvent: _StructSchema[_T.ImageGenPartialImageEvent, _t.Never, _t.Never] = _b.struct(_T.ImageGenPartialImageEvent, {"b64_json": _S.String.annotate(description="Base64-encoded partial image data"), "partial_image_index": _b.check(_S.Number.annotate(description="0-based index indicating which partial image this is in the sequence"), _S.is_int().annotate(expected="an integer")), "type": _b.literal("image_generation.partial_image").annotate(description="The event type")}).annotate(description="Emitted when a partial image becomes available during streaming generation", identifier="ImageGenPartialImageEvent")
|
|
220
|
+
ImageGenStreamErrorEvent: _StructSchema[_T.ImageGenStreamErrorEvent, _t.Never, _t.Never] = _b.struct(_T.ImageGenStreamErrorEvent, {"error": _b.struct(_T.ImageGenStreamErrorEvent__error, {"code": _b.union(_S.String, _S.Null).annotate(description="Provider error code, when supplied"), "message": _S.String.annotate(description="Provider error message"), "param": _b.union(_S.String, _S.Null).annotate(description="Request parameter associated with the error, when supplied"), "type": _b.union(_S.String, _S.Null).annotate(description="Provider error type, when supplied")}, optional=("code", "param", "type",)).annotate(description="Provider error details"), "type": _b.literal("error").annotate(description="The event type")}).annotate(description="Emitted when streaming generation fails after the SSE response starts", identifier="ImageGenStreamErrorEvent")
|
|
221
|
+
ImageGenTextChunkEvent: _StructSchema[_T.ImageGenTextChunkEvent, _t.Never, _t.Never] = _b.struct(_T.ImageGenTextChunkEvent, {"phase": _b.literals(["content", "reasoning", "draft"]).annotate(description="The generation phase this chunk belongs to. `content` is the renderable output; `reasoning` and `draft` are intermediate provider phases."), "text": _S.String.annotate(description="A text fragment of the image being generated (e.g. partial SVG markup)"), "type": _b.literal("image_generation.text_chunk").annotate(description="The event type")}).annotate(description="Emitted when a text chunk becomes available during streaming generation of text-based formats (e.g. SVG)", identifier="ImageGenTextChunkEvent")
|
|
222
|
+
ImageInputModality: _S.Bottom[_T.ImageInputModality, _t.Any] = _b.literals(["text", "image", "file", "audio", "video"]).annotate(identifier="ImageInputModality")
|
|
223
|
+
ImageOutputModality: _S.Bottom[_T.ImageOutputModality, _t.Any] = _b.literals(["text", "image", "embeddings", "audio", "video", "rerank", "speech", "transcription"]).annotate(identifier="ImageOutputModality")
|
|
224
|
+
ImagePricingEntry: _StructSchema[_T.ImagePricingEntry, _t.Never, _t.Never] = _b.struct(_T.ImagePricingEntry, {"billable": _b.literals(["output_image", "input_image", "input_font", "input_reference", "input_text"]), "cost_usd": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "unit": _b.literals(["image", "megapixel", "token"]), "variant": _S.String}, optional=("variant",)).annotate(description="One billable pricing line for an image provider.", identifier="ImagePricingEntry")
|
|
225
|
+
IncompleteDetails: _S.Bottom[_T.IncompleteDetails, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.IncompleteDetails__0, {"reason": _b.literals(["max_output_tokens", "content_filter"])}, optional=("reason",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(identifier="IncompleteDetails")
|
|
226
|
+
InputAudio: _StructSchema[_T.InputAudio, _t.Never, _t.Never] = _b.struct(_T.InputAudio, {"input_audio": _b.struct(_T.InputAudio__input_audio, {"data": _S.String, "format": _b.literals(["mp3", "wav"])}), "type": _b.literal("input_audio")}).annotate(description="Audio input content item", identifier="InputAudio")
|
|
227
|
+
InputFile: _StructSchema[_T.InputFile, _t.Never, _t.Never] = _b.struct(_T.InputFile, {"file_data": _S.String, "file_id": _b.union(_S.String, _S.Null), "file_url": _S.String, "filename": _S.String, "type": _b.literal("input_file")}, optional=("file_data", "file_id", "file_url", "filename",)).annotate(description="File input content item", identifier="InputFile")
|
|
228
|
+
InputImage: _StructSchema[_T.InputImage, _t.Never, _t.Never] = _b.struct(_T.InputImage, {"detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null), "type": _b.literal("input_image")}, optional=("image_url",)).annotate(description="Image input content item", identifier="InputImage")
|
|
229
|
+
InputModality: _S.Bottom[_T.InputModality, _t.Any] = _b.literals(["text", "image", "file", "audio", "video"]).annotate(identifier="InputModality")
|
|
230
|
+
InputVideo: _StructSchema[_T.InputVideo, _t.Never, _t.Never] = _b.struct(_T.InputVideo, {"type": _b.literal("input_video"), "video_url": _S.String.annotate(description="A base64 data URL or remote URL that resolves to a video file")}).annotate(description="Video input content item", identifier="InputVideo")
|
|
231
|
+
InstructType: _S.Bottom[_T.InstructType, _t.Any] = _b.union(_b.literal("none"), _b.literal("airoboros"), _b.literal("alpaca"), _b.literal("alpaca-modif"), _b.literal("chatml"), _b.literal("claude"), _b.literal("code-llama"), _b.literal("gemma"), _b.literal("llama2"), _b.literal("llama3"), _b.literal("mistral"), _b.literal("nemotron"), _b.literal("neural"), _b.literal("openchat"), _b.literal("phi3"), _b.literal("rwkv"), _b.literal("vicuna"), _b.literal("zephyr"), _b.literal("deepseek-r1"), _b.literal("deepseek-v3.1"), _b.literal("qwq"), _b.literal("qwen3"), _S.Null).annotate(description="Instruction format type", identifier="InstructType")
|
|
232
|
+
InternalServerResponseErrorData: _StructSchema[_T.InternalServerResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.InternalServerResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for InternalServerResponse", identifier="InternalServerResponseErrorData")
|
|
233
|
+
ItemReferenceItem: _StructSchema[_T.ItemReferenceItem, _t.Never, _t.Never] = _b.struct(_T.ItemReferenceItem, {"id": _S.String, "type": _b.literal("item_reference")}).annotate(description="A reference to a previous response item by ID", identifier="ItemReferenceItem")
|
|
234
|
+
KeyAssignment: _StructSchema[_T.KeyAssignment, _t.Never, _t.Never] = _b.struct(_T.KeyAssignment, {"assigned_by": _b.union(_S.String, _S.Null).annotate(description="User ID of who made the assignment"), "created_at": _S.String.annotate(description="ISO 8601 timestamp of when the assignment was created"), "guardrail_id": _S.String.annotate(description="ID of the guardrail", format="uuid"), "id": _S.String.annotate(description="Unique identifier for the assignment", format="uuid"), "key_hash": _S.String.annotate(description="Hash of the assigned API key"), "key_label": _S.String.annotate(description="Label of the API key"), "key_name": _S.String.annotate(description="Name of the API key")}).annotate(identifier="KeyAssignment")
|
|
235
|
+
Legacy_ChatContentVideoInput: _StructSchema[_T.Legacy_ChatContentVideoInput, _t.Never, _t.Never] = _b.struct(_T.Legacy_ChatContentVideoInput, {"url": _S.String.annotate(description="URL of the video (data: URLs supported)")}).annotate(description="Video input object", identifier="Legacy_ChatContentVideoInput")
|
|
236
|
+
McpApprovalRequestItem: _StructSchema[_T.McpApprovalRequestItem, _t.Never, _t.Never] = _b.struct(_T.McpApprovalRequestItem, {"arguments": _S.String, "id": _S.String, "name": _S.String, "server_label": _S.String, "type": _b.literal("mcp_approval_request")}).annotate(description="Request for approval to execute an MCP tool", identifier="McpApprovalRequestItem")
|
|
237
|
+
McpApprovalResponseItem: _StructSchema[_T.McpApprovalResponseItem, _t.Never, _t.Never] = _b.struct(_T.McpApprovalResponseItem, {"approval_request_id": _S.String, "approve": _S.Boolean, "id": _b.union(_S.String, _S.Null), "reason": _b.union(_S.String, _S.Null), "type": _b.literal("mcp_approval_response")}, optional=("id", "reason",)).annotate(description="User response to an MCP tool approval request", identifier="McpApprovalResponseItem")
|
|
238
|
+
McpCallItem: _StructSchema[_T.McpCallItem, _t.Never, _t.Never] = _b.struct(_T.McpCallItem, {"arguments": _S.String, "error": _b.union(_S.String, _S.Null), "id": _S.String, "name": _S.String, "output": _b.union(_S.String, _S.Null), "server_label": _S.String, "type": _b.literal("mcp_call")}, optional=("error", "output",)).annotate(description="An MCP tool call with its output or error", identifier="McpCallItem")
|
|
239
|
+
McpListToolsItem: _StructSchema[_T.McpListToolsItem, _t.Never, _t.Never] = _b.struct(_T.McpListToolsItem, {"error": _b.union(_S.String, _S.Null), "id": _S.String, "server_label": _S.String, "tools": _b.array(_b.struct(_T.McpListToolsItem__tools__item, {"annotations": _S.Json.annotate(expected="JSON value"), "description": _b.union(_S.String, _S.Null), "input_schema": _b.struct(_T.McpListToolsItem__tools__item__input_schema, {}), "name": _S.String}, optional=("annotations", "description",))), "type": _b.literal("mcp_list_tools")}, optional=("error",)).annotate(description="List of available MCP tools from a server", identifier="McpListToolsItem")
|
|
240
|
+
McpServerTool: _StructSchema[_T.McpServerTool, _t.Never, _t.Never] = _b.struct(_T.McpServerTool, {"allowed_tools": _b.union(_b.array(_S.String), _b.struct(_T.McpServerTool__allowed_tools__1, {"read_only": _S.Boolean, "tool_names": _b.array(_S.String)}, optional=("read_only", "tool_names",)), _S.Null), "authorization": _S.String, "connector_id": _b.literals(["connector_dropbox", "connector_gmail", "connector_googlecalendar", "connector_googledrive", "connector_microsoftteams", "connector_outlookcalendar", "connector_outlookemail", "connector_sharepoint"]), "headers": _b.union(_b.record(_S.String, _S.String), _S.Null), "require_approval": _b.union(_b.struct(_T.McpServerTool__require_approval__0, {"always": _b.struct(_T.McpServerTool__require_approval__0__always, {"tool_names": _b.array(_S.String)}, optional=("tool_names",)), "never": _b.struct(_T.McpServerTool__require_approval__0__never, {"tool_names": _b.array(_S.String)}, optional=("tool_names",))}, optional=("always", "never",)), _b.literal("always"), _b.literal("never"), _S.Null), "server_description": _S.String, "server_label": _S.String, "server_url": _S.String, "type": _b.literal("mcp")}, optional=("allowed_tools", "authorization", "connector_id", "headers", "require_approval", "server_description", "server_url",)).annotate(description="MCP (Model Context Protocol) tool configuration", identifier="McpServerTool")
|
|
241
|
+
MemberAssignment: _StructSchema[_T.MemberAssignment, _t.Never, _t.Never] = _b.struct(_T.MemberAssignment, {"assigned_by": _b.union(_S.String, _S.Null).annotate(description="User ID of who made the assignment"), "created_at": _S.String.annotate(description="ISO 8601 timestamp of when the assignment was created"), "guardrail_id": _S.String.annotate(description="ID of the guardrail", format="uuid"), "id": _S.String.annotate(description="Unique identifier for the assignment", format="uuid"), "organization_id": _S.String.annotate(description="Organization ID"), "user_id": _S.String.annotate(description="Clerk user ID of the assigned member")}).annotate(identifier="MemberAssignment")
|
|
242
|
+
MessagesAdvisorToolResultBlock: _StructSchema[_T.MessagesAdvisorToolResultBlock, _t.Never, _t.Never] = _b.struct(_T.MessagesAdvisorToolResultBlock, {"content": _b.struct(_T.MessagesAdvisorToolResultBlock__content, {}), "tool_use_id": _S.String, "type": _b.literal("advisor_tool_result")}).annotate(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.", identifier="MessagesAdvisorToolResultBlock")
|
|
243
|
+
MessagesContentBlockStopEvent: _StructSchema[_T.MessagesContentBlockStopEvent, _t.Never, _t.Never] = _b.struct(_T.MessagesContentBlockStopEvent, {"index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("content_block_stop")}).annotate(description="Event sent when a content block is complete", identifier="MessagesContentBlockStopEvent")
|
|
244
|
+
MessagesFallbackParam: _StructSchema[_T.MessagesFallbackParam, _t.Never, _t.Never] = _b.struct(_T.MessagesFallbackParam, {"model": _S.String}).annotate(description="Fallback model to try when the primary model fails or refuses. Only the `model` field is supported; per-attempt overrides are rejected.", identifier="MessagesFallbackParam")
|
|
245
|
+
Union_10: _S.Bottom[_T.Union_10, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.Union_10__0, {"schema": _b.struct(_T.Union_10__0__schema, {}), "type": _b.literal("json_schema")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs).")
|
|
246
|
+
Union_11: _S.Bottom[_T.Union_11, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.Union_11__0, {"remaining": _b.union(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(0).annotate(expected="a value greater than or equal to 0")), _S.Null), "total": _b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(20000).annotate(expected="a value greater than or equal to 20000")), "type": _b.literal("tokens")}, optional=("remaining",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(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.")
|
|
247
|
+
MessagesPingEvent: _StructSchema[_T.MessagesPingEvent, _t.Never, _t.Never] = _b.struct(_T.MessagesPingEvent, {"type": _b.literal("ping")}).annotate(description="Keep-alive ping event", identifier="MessagesPingEvent")
|
|
248
|
+
MetadataLevel: _S.Bottom[_T.MetadataLevel, _t.Any] = _b.literals(["disabled", "enabled"]).annotate(description="Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.", identifier="MetadataLevel")
|
|
249
|
+
ModelGroup: _S.Bottom[_T.ModelGroup, _t.Any] = _b.literals(["Router", "Media", "Other", "GPT", "Claude", "Gemini", "Gemma", "Grok", "Cohere", "Nova", "Qwen", "Yi", "DeepSeek", "Mistral", "Llama2", "Llama3", "Llama4", "PaLM", "RWKV", "Qwen3"]).annotate(description="Tokenizer type used by the model", identifier="ModelGroup")
|
|
250
|
+
ModelLinks: _StructSchema[_T.ModelLinks, _t.Never, _t.Never] = _b.struct(_T.ModelLinks, {"details": _S.String.annotate(description="URL for the model details/endpoints API")}).annotate(description="Related API endpoints and resources for this model.", identifier="ModelLinks")
|
|
251
|
+
ModelName: _S.Bottom[_T.ModelName, _t.Any] = _S.String.annotate(description="Model to use for completion", identifier="ModelName")
|
|
252
|
+
ModelsCountResponse: _StructSchema[_T.ModelsCountResponse, _t.Never, _t.Never] = _b.struct(_T.ModelsCountResponse, {"data": _b.struct(_T.ModelsCountResponse__data, {"count": _b.check(_S.Number.annotate(description="Total number of available models"), _S.is_int().annotate(expected="an integer"))}).annotate(description="Model count data")}).annotate(description="Model count data", identifier="ModelsCountResponse")
|
|
253
|
+
ModerationPlugin: _StructSchema[_T.ModerationPlugin, _t.Never, _t.Never] = _b.struct(_T.ModerationPlugin, {"id": _b.literal("moderation")}).annotate(identifier="ModerationPlugin")
|
|
254
|
+
MultimodalMedia: _StructSchema[_T.MultimodalMedia, _t.Never, _t.Never] = _b.struct(_T.MultimodalMedia, {"data": _S.String, "format": _S.String}, optional=("format",)).annotate(identifier="MultimodalMedia")
|
|
255
|
+
NamespaceFunctionTool: _StructSchema[_T.NamespaceFunctionTool, _t.Never, _t.Never] = _b.struct(_T.NamespaceFunctionTool, {"allowed_callers": _b.union(_b.array(_b.literals(["direct", "programmatic"])), _S.Null), "defer_loading": _S.Boolean, "description": _b.union(_S.String, _S.Null), "name": _S.String, "output_schema": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "parameters": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "strict": _b.union(_S.Boolean, _S.Null), "type": _b.literal("function")}, optional=("allowed_callers", "defer_loading", "description", "output_schema", "parameters", "strict",)).annotate(description="A function tool grouped inside a namespace tool", identifier="NamespaceFunctionTool")
|
|
256
|
+
NotFoundResponseErrorData: _StructSchema[_T.NotFoundResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.NotFoundResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for NotFoundResponse", identifier="NotFoundResponseErrorData")
|
|
257
|
+
ObservabilityFilterRuleGroup: _StructSchema[_T.ObservabilityFilterRuleGroup, _t.Never, _t.Never] = _b.struct(_T.ObservabilityFilterRuleGroup, {"logic": _b.literals(["and", "or"]), "rules": _b.array(_b.struct(_T.ObservabilityFilterRuleGroup__rules__item, {"field": _b.literals(["model", "provider", "session_id", "user_id", "api_key_name", "finish_reason", "input", "output", "total_cost", "total_tokens", "prompt_tokens", "completion_tokens"]), "operator": _b.literals(["equals", "not_equals", "contains", "not_contains", "regex", "starts_with", "ends_with", "gt", "lt", "gte", "lte", "exists", "not_exists"]), "value": _b.union(_S.String, _b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")))}, optional=("value",)))}, optional=("logic",)).annotate(identifier="ObservabilityFilterRuleGroup")
|
|
258
|
+
OpenAIResponseCustomToolCall: _StructSchema[_T.OpenAIResponseCustomToolCall, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponseCustomToolCall, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _b.literal("custom_tool_call")}, optional=("id", "namespace",)).annotate(identifier="OpenAIResponseCustomToolCall")
|
|
259
|
+
OpenAIResponsesImageGenCallCompleted: _StructSchema[_T.OpenAIResponsesImageGenCallCompleted, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponsesImageGenCallCompleted, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.image_generation_call.completed")}).annotate(identifier="OpenAIResponsesImageGenCallCompleted")
|
|
260
|
+
OpenAIResponsesImageGenCallGenerating: _StructSchema[_T.OpenAIResponsesImageGenCallGenerating, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponsesImageGenCallGenerating, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.image_generation_call.generating")}).annotate(identifier="OpenAIResponsesImageGenCallGenerating")
|
|
261
|
+
OpenAIResponsesImageGenCallInProgress: _StructSchema[_T.OpenAIResponsesImageGenCallInProgress, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponsesImageGenCallInProgress, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.image_generation_call.in_progress")}).annotate(identifier="OpenAIResponsesImageGenCallInProgress")
|
|
262
|
+
OpenAIResponsesImageGenCallPartialImage: _StructSchema[_T.OpenAIResponsesImageGenCallPartialImage, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponsesImageGenCallPartialImage, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "partial_image_b64": _S.String, "partial_image_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.image_generation_call.partial_image")}).annotate(identifier="OpenAIResponsesImageGenCallPartialImage")
|
|
263
|
+
OpenAIResponsesRefusalContent: _StructSchema[_T.OpenAIResponsesRefusalContent, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponsesRefusalContent, {"refusal": _S.String, "type": _b.literal("refusal")}).annotate(identifier="OpenAIResponsesRefusalContent")
|
|
264
|
+
OpenAIResponsesResponseStatus: _S.Bottom[_T.OpenAIResponsesResponseStatus, _t.Any] = _b.literals(["completed", "incomplete", "in_progress", "failed", "cancelled", "queued"]).annotate(identifier="OpenAIResponsesResponseStatus")
|
|
265
|
+
OpenAIResponsesSearchCompleted: _StructSchema[_T.OpenAIResponsesSearchCompleted, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponsesSearchCompleted, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.web_search_call.completed")}).annotate(identifier="OpenAIResponsesSearchCompleted")
|
|
266
|
+
Objects_11: _StructSchema[_T.Objects_11, _t.Never, _t.Never] = _b.struct(_T.Objects_11, {"name": _S.String, "type": _b.literal("function")})
|
|
267
|
+
Objects_12: _StructSchema[_T.Objects_12, _t.Never, _t.Never] = _b.struct(_T.Objects_12, {"type": _b.literals(["web_search_preview_2025_03_11", "web_search_preview"])})
|
|
268
|
+
Objects_13: _StructSchema[_T.Objects_13, _t.Never, _t.Never] = _b.struct(_T.Objects_13, {"type": _b.literal("apply_patch")})
|
|
269
|
+
Objects_14: _StructSchema[_T.Objects_14, _t.Never, _t.Never] = _b.struct(_T.Objects_14, {"type": _b.literal("shell")})
|
|
270
|
+
OpenAIResponsesTruncation: _S.Bottom[_T.OpenAIResponsesTruncation, _t.Any] = _b.union(_b.literal("auto"), _b.literal("disabled"), _S.Null).annotate(identifier="OpenAIResponsesTruncation")
|
|
271
|
+
Objects_15: _StructSchema[_T.Objects_15, _t.Never, _t.Never] = _b.struct(_T.Objects_15, {"cache_write_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "cached_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("cache_write_tokens",))
|
|
272
|
+
Objects_16: _StructSchema[_T.Objects_16, _t.Never, _t.Never] = _b.struct(_T.Objects_16, {"reasoning_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))})
|
|
273
|
+
OpenAIResponsesWebSearchCallInProgress: _StructSchema[_T.OpenAIResponsesWebSearchCallInProgress, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponsesWebSearchCallInProgress, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.web_search_call.in_progress")}).annotate(identifier="OpenAIResponsesWebSearchCallInProgress")
|
|
274
|
+
OpenAIResponsesWebSearchCallSearching: _StructSchema[_T.OpenAIResponsesWebSearchCallSearching, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponsesWebSearchCallSearching, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.web_search_call.searching")}).annotate(identifier="OpenAIResponsesWebSearchCallSearching")
|
|
275
|
+
OpenResponsesTopLogprobs: _StructSchema[_T.OpenResponsesTopLogprobs, _t.Never, _t.Never] = _b.struct(_T.OpenResponsesTopLogprobs, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}, optional=("bytes", "logprob", "token",)).annotate(description="Alternative token with its log probability", identifier="OpenResponsesTopLogprobs")
|
|
276
|
+
ORAnthropicStopReason: _S.Bottom[_T.ORAnthropicStopReason, _t.Any] = _b.union(_b.literal("end_turn"), _b.literal("max_tokens"), _b.literal("stop_sequence"), _b.literal("tool_use"), _b.literal("pause_turn"), _b.literal("refusal"), _b.literal("compaction"), _S.Null).annotate(identifier="ORAnthropicStopReason")
|
|
277
|
+
OutputComputerCallItem: _StructSchema[_T.OutputComputerCallItem, _t.Never, _t.Never] = _b.struct(_T.OutputComputerCallItem, {"action": _S.Json.annotate(expected="JSON value"), "call_id": _S.String, "id": _S.String, "pending_safety_checks": _b.array(_b.struct(_T.OutputComputerCallItem__pending_safety_checks__item, {"code": _S.String, "id": _S.String, "message": _S.String})), "status": _b.literals(["completed", "incomplete", "in_progress"]), "type": _b.literal("computer_call")}, optional=("action", "id",)).annotate(identifier="OutputComputerCallItem")
|
|
278
|
+
OutputCustomToolCallItem: _StructSchema[_T.OutputCustomToolCallItem, _t.Never, _t.Never] = _b.struct(_T.OutputCustomToolCallItem, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _b.literal("custom_tool_call")}, optional=("id", "namespace",)).annotate(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.", identifier="OutputCustomToolCallItem")
|
|
279
|
+
OutputFunctionCallItem: _StructSchema[_T.OutputFunctionCallItem, _t.Never, _t.Never] = _b.struct(_T.OutputFunctionCallItem, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": _b.literals(["completed", "incomplete", "in_progress"]), "type": _b.literal("function_call")}, optional=("id", "namespace", "status",)).annotate(identifier="OutputFunctionCallItem")
|
|
280
|
+
OutputItemCustomToolCall: _StructSchema[_T.OutputItemCustomToolCall, _t.Never, _t.Never] = _b.struct(_T.OutputItemCustomToolCall, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _b.literal("custom_tool_call")}, optional=("id", "namespace",)).annotate(identifier="OutputItemCustomToolCall")
|
|
281
|
+
OutputItemFunctionCall: _StructSchema[_T.OutputItemFunctionCall, _t.Never, _t.Never] = _b.struct(_T.OutputItemFunctionCall, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": _b.literals(["completed", "incomplete", "in_progress"]), "type": _b.literal("function_call")}, optional=("id", "namespace", "status",)).annotate(identifier="OutputItemFunctionCall")
|
|
282
|
+
OutputModality: _S.Bottom[_T.OutputModality, _t.Any] = _b.literals(["text", "image", "embeddings", "audio", "video", "rerank", "speech", "transcription"]).annotate(identifier="OutputModality")
|
|
283
|
+
OutputModalityEnum: _S.Bottom[_T.OutputModalityEnum, _t.Any] = _b.literals(["text", "image"]).annotate(identifier="OutputModalityEnum")
|
|
284
|
+
Parameter: _S.Bottom[_T.Parameter, _t.Any] = _b.literals(["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", "prediction", "seed", "response_format", "structured_outputs", "stop", "tools", "tool_choice", "parallel_tool_calls", "include_reasoning", "reasoning", "reasoning_effort", "web_search_options", "verbosity"]).annotate(identifier="Parameter")
|
|
285
|
+
ParetoRouterPlugin: _StructSchema[_T.ParetoRouterPlugin, _t.Never, _t.Never] = _b.struct(_T.ParetoRouterPlugin, {"enabled": _S.Boolean.annotate(description="Set to false to disable the pareto-router plugin for this request. Defaults to true."), "id": _b.literal("pareto-router"), "max_price": _b.check(_b.check(_S.Number.annotate(description="Maximum input price in USD per million tokens. When set, quality-tier selection (min_coding_score) is bypassed: the router computes the Pareto frontier over the top coding models and routes to the best-scoring frontier model priced at or below this cap, falling back through cheaper frontier models, then non-frontier models. Enforced against the price source given by price_source. Returns 404 when no candidate satisfies the cap.", format="double"), _S.is_finite().annotate(expected="a finite number")), _S.is_greater_than_or_equal_to(0).annotate(expected="a value greater than or equal to 0")), "min_coding_score": _b.check(_b.check(_b.check(_S.Number.annotate(description="Minimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= 0.66). Not used when max_price is set (price-based selection takes over).", format="double"), _S.is_finite().annotate(expected="a finite number")), _S.is_greater_than_or_equal_to(0).annotate(expected="a value greater than or equal to 0")), _S.is_less_than_or_equal_to(1).annotate(expected="a value less than or equal to 1")), "price_source": _b.literals(["prompt", "weighted_avg"]).annotate(description="Price source for the Pareto frontier cost axis and for enforcing max_price. \"prompt\" uses catalog list price (endpoint.pricing.prompt). \"weighted_avg\" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without traffic data. Defaults to \"prompt\".")}, optional=("enabled", "max_price", "min_coding_score", "price_source",)).annotate(identifier="ParetoRouterPlugin")
|
|
286
|
+
PayloadTooLargeResponseErrorData: _StructSchema[_T.PayloadTooLargeResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.PayloadTooLargeResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for PayloadTooLargeResponse", identifier="PayloadTooLargeResponseErrorData")
|
|
287
|
+
PaymentRequiredResponseErrorData: _StructSchema[_T.PaymentRequiredResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.PaymentRequiredResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for PaymentRequiredResponse", identifier="PaymentRequiredResponseErrorData")
|
|
288
|
+
PDFParserEngine: _S.Bottom[_T.PDFParserEngine, _t.Any] = _b.union(_b.literals(["mistral-ocr", "native", "cloudflare-ai"]), _b.literal("pdf-text")).annotate(description="The engine to use for parsing PDF files. \"pdf-text\" is deprecated and automatically redirected to \"cloudflare-ai\".", identifier="PDFParserEngine")
|
|
289
|
+
PercentileLatencyCutoffs: _StructSchema[_T.PercentileLatencyCutoffs, _t.Never, _t.Never] = _b.struct(_T.PercentileLatencyCutoffs, {"p50": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Maximum p50 latency (seconds)", format="double"), "p75": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Maximum p75 latency (seconds)", format="double"), "p90": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Maximum p90 latency (seconds)", format="double"), "p99": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Maximum p99 latency (seconds)", format="double")}, optional=("p50", "p75", "p90", "p99",)).annotate(description="Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.", identifier="PercentileLatencyCutoffs")
|
|
290
|
+
PercentileStats: _S.Bottom[_T.PercentileStats, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.PercentileStats__0, {"p50": _b.check(_S.Number.annotate(description="Median (50th percentile)", format="double"), _S.is_finite().annotate(expected="a finite number")), "p75": _b.check(_S.Number.annotate(description="75th percentile", format="double"), _S.is_finite().annotate(expected="a finite number")), "p90": _b.check(_S.Number.annotate(description="90th percentile", format="double"), _S.is_finite().annotate(expected="a finite number")), "p99": _b.check(_S.Number.annotate(description="99th percentile", format="double"), _S.is_finite().annotate(expected="a finite number"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(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.", identifier="PercentileStats")
|
|
291
|
+
PercentileThroughputCutoffs: _StructSchema[_T.PercentileThroughputCutoffs, _t.Never, _t.Never] = _b.struct(_T.PercentileThroughputCutoffs, {"p50": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Minimum p50 throughput (tokens/sec)", format="double"), "p75": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Minimum p75 throughput (tokens/sec)", format="double"), "p90": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Minimum p90 throughput (tokens/sec)", format="double"), "p99": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Minimum p99 throughput (tokens/sec)", format="double")}, optional=("p50", "p75", "p90", "p99",)).annotate(description="Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.", identifier="PercentileThroughputCutoffs")
|
|
292
|
+
PerRequestLimits: _S.Bottom[_T.PerRequestLimits, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.PerRequestLimits__0, {"completion_tokens": _b.check(_S.Number.annotate(description="Maximum completion tokens per request"), _S.is_finite().annotate(expected="a finite number")), "prompt_tokens": _b.check(_S.Number.annotate(description="Maximum prompt tokens per request"), _S.is_finite().annotate(expected="a finite number"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Per-request token limits", identifier="PerRequestLimits")
|
|
293
|
+
PipelineStageType: _S.Bottom[_T.PipelineStageType, _t.Any] = _b.literals(["guardrail", "plugin", "server_tools", "response_healing", "context_compression"]).annotate(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.", identifier="PipelineStageType")
|
|
294
|
+
PredictionContentText: _StructSchema[_T.PredictionContentText, _t.Never, _t.Never] = _b.struct(_T.PredictionContentText, {"text": _S.String, "type": _b.literal("text")}).annotate(description="Text content part for a predicted output.", identifier="PredictionContentText")
|
|
295
|
+
PresetDesignatedVersion: _S.Bottom[_T.PresetDesignatedVersion, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.PresetDesignatedVersion__0, {"config": _b.struct(_T.PresetDesignatedVersion__0__config, {}), "created_at": _S.String, "creator_id": _S.String, "id": _S.String, "preset_id": _S.String, "system_prompt": _b.union(_S.String, _S.Null), "updated_at": _S.String, "version": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="A specific version of a preset, containing config and optional system prompt.", identifier="PresetDesignatedVersion")
|
|
296
|
+
PresetStatus: _S.Bottom[_T.PresetStatus, _t.Any] = _b.literals(["active", "disabled", "archived"]).annotate(description="The status of a preset.", identifier="PresetStatus")
|
|
297
|
+
Objects_18: _S.Bottom[_T.Objects_18, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_18, {"city": _b.union(_S.String, _S.Null), "country": _b.union(_S.String, _S.Null), "region": _b.union(_S.String, _S.Null), "timezone": _b.union(_S.String, _S.Null), "type": _b.literal("approximate")}, optional=("city", "country", "region", "timezone",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
298
|
+
PricingOverride: _StructSchema[_T.PricingOverride, _t.Never, _t.Never] = _b.struct(_T.PricingOverride, {"audio": _S.String.annotate(description="Overridden price in USD per audio input token"), "completion": _S.String.annotate(description="Overridden price in USD per token for completion (output) generation"), "input_audio_cache": _S.String.annotate(description="Overridden price in USD per cached audio input token"), "input_cache_read": _S.String.annotate(description="Overridden price in USD per cached input token (read)"), "input_cache_write": _S.String.annotate(description="Overridden price in USD per cache-write token"), "input_cache_write_1h": _S.String.annotate(description="Overridden price in USD per 1-hour cache-write token"), "min_prompt_tokens": _b.check(_S.Number.annotate(description="Condition: the entry applies when the total prompt tokens of a request are strictly greater than this threshold", format="double"), _S.is_finite().annotate(expected="a finite number")), "prompt": _S.String.annotate(description="Overridden price in USD per token for prompt (input) processing"), "utc_end": _b.check(_S.Number.annotate(description="Condition: exclusive end of a daily UTC time window as an HHMM clock number (e.g. 400 = 04:00)", format="double"), _S.is_finite().annotate(expected="a finite number")), "utc_start": _b.check(_S.Number.annotate(description="Condition: inclusive start of a daily UTC time window as an HHMM clock number (e.g. 100 = 01:00, 1030 = 10:30). The entry applies while the current UTC time is inside the half-open window [utc_start, utc_end), which may wrap past midnight (utc_start > utc_end).", format="double"), _S.is_finite().annotate(expected="a finite number"))}, optional=("audio", "completion", "input_audio_cache", "input_cache_read", "input_cache_write", "input_cache_write_1h", "min_prompt_tokens", "prompt", "utc_end", "utc_start",)).annotate(description="A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price.", identifier="PricingOverride")
|
|
299
|
+
Objects_19: _S.Bottom[_T.Objects_19, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_19, {"mode": _b.literal("explicit")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
300
|
+
Objects_20: _S.Bottom[_T.Objects_20, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_20, {"mode": _b.literal("explicit"), "ttl": _b.union(_S.String, _S.Null)}, optional=("ttl",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
301
|
+
PromptInjectionScanScope: _S.Bottom[_T.PromptInjectionScanScope, _t.Any] = _b.literals(["user_only", "all_messages"]).annotate(description="Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages.", identifier="PromptInjectionScanScope")
|
|
302
|
+
ProviderName: _S.Bottom[_T.ProviderName, _t.Any] = _b.literals(["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", "CoreWeave", "Crucible", "Crusoe", "Darkbloom", "Decart", "Deepgram", "DeepInfra", "DeepSeek", "DekaLLM", "DigitalOcean", "Featherless", "Fireworks", "Fish Audio", "Friendli", "GMICloud", "Google", "Google AI Studio", "Groq", "HeyGen", "Inception", "Inceptron", "InferenceNet", "Ionstream", "Infermatic", "Io Net", "Inferact vLLM", "Inflection", "Liquid", "Mara", "Mancer 2", "Meta", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "Nex AGI", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Poolside", "Perceptron", "Perplexity", "Phala", "Recraft", "Reka", "Relace", "Sail Research", "Sakana AI", "SambaNova", "Seed", "SiliconFlow", "Sourceful", "StepFun", "Stealth", "StreamLake", "Switchpoint", "Tencent", "Tenstorrent", "Together", "Upstage", "Venice", "Wafer", "WandB", "Quiver", "Krea", "Runway", "Xiaomi", "xAI", "Z.AI", "FakeProvider"]).annotate(identifier="ProviderName")
|
|
303
|
+
Objects_21: _StructSchema[_T.Objects_21, _t.Never, _t.Never] = _b.struct(_T.Objects_21, {})
|
|
304
|
+
Objects_22: _StructSchema[_T.Objects_22, _t.Never, _t.Never] = _b.struct(_T.Objects_22, {})
|
|
305
|
+
Objects_23: _StructSchema[_T.Objects_23, _t.Never, _t.Never] = _b.struct(_T.Objects_23, {})
|
|
306
|
+
Objects_24: _StructSchema[_T.Objects_24, _t.Never, _t.Never] = _b.struct(_T.Objects_24, {})
|
|
307
|
+
Objects_25: _StructSchema[_T.Objects_25, _t.Never, _t.Never] = _b.struct(_T.Objects_25, {})
|
|
308
|
+
Objects_26: _StructSchema[_T.Objects_26, _t.Never, _t.Never] = _b.struct(_T.Objects_26, {})
|
|
309
|
+
Objects_27: _StructSchema[_T.Objects_27, _t.Never, _t.Never] = _b.struct(_T.Objects_27, {})
|
|
310
|
+
Objects_28: _StructSchema[_T.Objects_28, _t.Never, _t.Never] = _b.struct(_T.Objects_28, {})
|
|
311
|
+
Objects_29: _StructSchema[_T.Objects_29, _t.Never, _t.Never] = _b.struct(_T.Objects_29, {})
|
|
312
|
+
Objects_30: _StructSchema[_T.Objects_30, _t.Never, _t.Never] = _b.struct(_T.Objects_30, {})
|
|
313
|
+
Objects_31: _StructSchema[_T.Objects_31, _t.Never, _t.Never] = _b.struct(_T.Objects_31, {})
|
|
314
|
+
Objects_32: _StructSchema[_T.Objects_32, _t.Never, _t.Never] = _b.struct(_T.Objects_32, {})
|
|
315
|
+
Objects_33: _StructSchema[_T.Objects_33, _t.Never, _t.Never] = _b.struct(_T.Objects_33, {})
|
|
316
|
+
Objects_34: _StructSchema[_T.Objects_34, _t.Never, _t.Never] = _b.struct(_T.Objects_34, {})
|
|
317
|
+
Objects_35: _StructSchema[_T.Objects_35, _t.Never, _t.Never] = _b.struct(_T.Objects_35, {})
|
|
318
|
+
Objects_36: _StructSchema[_T.Objects_36, _t.Never, _t.Never] = _b.struct(_T.Objects_36, {})
|
|
319
|
+
Objects_37: _StructSchema[_T.Objects_37, _t.Never, _t.Never] = _b.struct(_T.Objects_37, {})
|
|
320
|
+
Objects_38: _StructSchema[_T.Objects_38, _t.Never, _t.Never] = _b.struct(_T.Objects_38, {})
|
|
321
|
+
Objects_39: _StructSchema[_T.Objects_39, _t.Never, _t.Never] = _b.struct(_T.Objects_39, {})
|
|
322
|
+
Objects_40: _StructSchema[_T.Objects_40, _t.Never, _t.Never] = _b.struct(_T.Objects_40, {})
|
|
323
|
+
Objects_41: _StructSchema[_T.Objects_41, _t.Never, _t.Never] = _b.struct(_T.Objects_41, {})
|
|
324
|
+
Objects_42: _StructSchema[_T.Objects_42, _t.Never, _t.Never] = _b.struct(_T.Objects_42, {})
|
|
325
|
+
Objects_43: _StructSchema[_T.Objects_43, _t.Never, _t.Never] = _b.struct(_T.Objects_43, {})
|
|
326
|
+
Objects_44: _StructSchema[_T.Objects_44, _t.Never, _t.Never] = _b.struct(_T.Objects_44, {})
|
|
327
|
+
Objects_45: _StructSchema[_T.Objects_45, _t.Never, _t.Never] = _b.struct(_T.Objects_45, {})
|
|
328
|
+
Objects_46: _StructSchema[_T.Objects_46, _t.Never, _t.Never] = _b.struct(_T.Objects_46, {})
|
|
329
|
+
Objects_47: _StructSchema[_T.Objects_47, _t.Never, _t.Never] = _b.struct(_T.Objects_47, {})
|
|
330
|
+
Objects_48: _StructSchema[_T.Objects_48, _t.Never, _t.Never] = _b.struct(_T.Objects_48, {})
|
|
331
|
+
Objects_49: _StructSchema[_T.Objects_49, _t.Never, _t.Never] = _b.struct(_T.Objects_49, {})
|
|
332
|
+
Objects_50: _StructSchema[_T.Objects_50, _t.Never, _t.Never] = _b.struct(_T.Objects_50, {})
|
|
333
|
+
Objects_51: _StructSchema[_T.Objects_51, _t.Never, _t.Never] = _b.struct(_T.Objects_51, {})
|
|
334
|
+
Objects_52: _StructSchema[_T.Objects_52, _t.Never, _t.Never] = _b.struct(_T.Objects_52, {})
|
|
335
|
+
Objects_53: _StructSchema[_T.Objects_53, _t.Never, _t.Never] = _b.struct(_T.Objects_53, {})
|
|
336
|
+
Objects_54: _StructSchema[_T.Objects_54, _t.Never, _t.Never] = _b.struct(_T.Objects_54, {})
|
|
337
|
+
Objects_55: _StructSchema[_T.Objects_55, _t.Never, _t.Never] = _b.struct(_T.Objects_55, {})
|
|
338
|
+
Objects_56: _StructSchema[_T.Objects_56, _t.Never, _t.Never] = _b.struct(_T.Objects_56, {})
|
|
339
|
+
Objects_57: _StructSchema[_T.Objects_57, _t.Never, _t.Never] = _b.struct(_T.Objects_57, {})
|
|
340
|
+
Objects_58: _StructSchema[_T.Objects_58, _t.Never, _t.Never] = _b.struct(_T.Objects_58, {})
|
|
341
|
+
Objects_59: _StructSchema[_T.Objects_59, _t.Never, _t.Never] = _b.struct(_T.Objects_59, {})
|
|
342
|
+
Objects_60: _StructSchema[_T.Objects_60, _t.Never, _t.Never] = _b.struct(_T.Objects_60, {})
|
|
343
|
+
Objects_61: _StructSchema[_T.Objects_61, _t.Never, _t.Never] = _b.struct(_T.Objects_61, {})
|
|
344
|
+
Objects_62: _StructSchema[_T.Objects_62, _t.Never, _t.Never] = _b.struct(_T.Objects_62, {})
|
|
345
|
+
Objects_63: _StructSchema[_T.Objects_63, _t.Never, _t.Never] = _b.struct(_T.Objects_63, {})
|
|
346
|
+
Objects_64: _StructSchema[_T.Objects_64, _t.Never, _t.Never] = _b.struct(_T.Objects_64, {})
|
|
347
|
+
Objects_65: _StructSchema[_T.Objects_65, _t.Never, _t.Never] = _b.struct(_T.Objects_65, {})
|
|
348
|
+
Objects_66: _StructSchema[_T.Objects_66, _t.Never, _t.Never] = _b.struct(_T.Objects_66, {})
|
|
349
|
+
Objects_67: _StructSchema[_T.Objects_67, _t.Never, _t.Never] = _b.struct(_T.Objects_67, {})
|
|
350
|
+
Objects_68: _StructSchema[_T.Objects_68, _t.Never, _t.Never] = _b.struct(_T.Objects_68, {})
|
|
351
|
+
Objects_69: _StructSchema[_T.Objects_69, _t.Never, _t.Never] = _b.struct(_T.Objects_69, {})
|
|
352
|
+
Objects_70: _StructSchema[_T.Objects_70, _t.Never, _t.Never] = _b.struct(_T.Objects_70, {})
|
|
353
|
+
Objects_71: _StructSchema[_T.Objects_71, _t.Never, _t.Never] = _b.struct(_T.Objects_71, {})
|
|
354
|
+
Objects_72: _StructSchema[_T.Objects_72, _t.Never, _t.Never] = _b.struct(_T.Objects_72, {})
|
|
355
|
+
Objects_73: _StructSchema[_T.Objects_73, _t.Never, _t.Never] = _b.struct(_T.Objects_73, {})
|
|
356
|
+
Objects_74: _StructSchema[_T.Objects_74, _t.Never, _t.Never] = _b.struct(_T.Objects_74, {})
|
|
357
|
+
Objects_75: _StructSchema[_T.Objects_75, _t.Never, _t.Never] = _b.struct(_T.Objects_75, {})
|
|
358
|
+
Objects_76: _StructSchema[_T.Objects_76, _t.Never, _t.Never] = _b.struct(_T.Objects_76, {})
|
|
359
|
+
Objects_77: _StructSchema[_T.Objects_77, _t.Never, _t.Never] = _b.struct(_T.Objects_77, {})
|
|
360
|
+
Objects_78: _StructSchema[_T.Objects_78, _t.Never, _t.Never] = _b.struct(_T.Objects_78, {})
|
|
361
|
+
Objects_79: _StructSchema[_T.Objects_79, _t.Never, _t.Never] = _b.struct(_T.Objects_79, {})
|
|
362
|
+
Objects_80: _StructSchema[_T.Objects_80, _t.Never, _t.Never] = _b.struct(_T.Objects_80, {})
|
|
363
|
+
Objects_81: _StructSchema[_T.Objects_81, _t.Never, _t.Never] = _b.struct(_T.Objects_81, {})
|
|
364
|
+
Objects_82: _StructSchema[_T.Objects_82, _t.Never, _t.Never] = _b.struct(_T.Objects_82, {})
|
|
365
|
+
Objects_83: _StructSchema[_T.Objects_83, _t.Never, _t.Never] = _b.struct(_T.Objects_83, {})
|
|
366
|
+
Objects_84: _StructSchema[_T.Objects_84, _t.Never, _t.Never] = _b.struct(_T.Objects_84, {})
|
|
367
|
+
Objects_85: _StructSchema[_T.Objects_85, _t.Never, _t.Never] = _b.struct(_T.Objects_85, {})
|
|
368
|
+
Objects_86: _StructSchema[_T.Objects_86, _t.Never, _t.Never] = _b.struct(_T.Objects_86, {})
|
|
369
|
+
Objects_87: _StructSchema[_T.Objects_87, _t.Never, _t.Never] = _b.struct(_T.Objects_87, {})
|
|
370
|
+
Objects_88: _StructSchema[_T.Objects_88, _t.Never, _t.Never] = _b.struct(_T.Objects_88, {})
|
|
371
|
+
Objects_89: _StructSchema[_T.Objects_89, _t.Never, _t.Never] = _b.struct(_T.Objects_89, {})
|
|
372
|
+
Objects_90: _StructSchema[_T.Objects_90, _t.Never, _t.Never] = _b.struct(_T.Objects_90, {})
|
|
373
|
+
Objects_91: _StructSchema[_T.Objects_91, _t.Never, _t.Never] = _b.struct(_T.Objects_91, {})
|
|
374
|
+
Objects_92: _StructSchema[_T.Objects_92, _t.Never, _t.Never] = _b.struct(_T.Objects_92, {})
|
|
375
|
+
Objects_93: _StructSchema[_T.Objects_93, _t.Never, _t.Never] = _b.struct(_T.Objects_93, {})
|
|
376
|
+
Objects_94: _StructSchema[_T.Objects_94, _t.Never, _t.Never] = _b.struct(_T.Objects_94, {})
|
|
377
|
+
Objects_95: _StructSchema[_T.Objects_95, _t.Never, _t.Never] = _b.struct(_T.Objects_95, {})
|
|
378
|
+
Objects_96: _StructSchema[_T.Objects_96, _t.Never, _t.Never] = _b.struct(_T.Objects_96, {})
|
|
379
|
+
Objects_97: _StructSchema[_T.Objects_97, _t.Never, _t.Never] = _b.struct(_T.Objects_97, {})
|
|
380
|
+
Objects_98: _StructSchema[_T.Objects_98, _t.Never, _t.Never] = _b.struct(_T.Objects_98, {})
|
|
381
|
+
Objects_99: _StructSchema[_T.Objects_99, _t.Never, _t.Never] = _b.struct(_T.Objects_99, {})
|
|
382
|
+
Objects_100: _StructSchema[_T.Objects_100, _t.Never, _t.Never] = _b.struct(_T.Objects_100, {})
|
|
383
|
+
Objects_101: _StructSchema[_T.Objects_101, _t.Never, _t.Never] = _b.struct(_T.Objects_101, {})
|
|
384
|
+
Objects_102: _StructSchema[_T.Objects_102, _t.Never, _t.Never] = _b.struct(_T.Objects_102, {})
|
|
385
|
+
Objects_103: _StructSchema[_T.Objects_103, _t.Never, _t.Never] = _b.struct(_T.Objects_103, {})
|
|
386
|
+
Objects_104: _StructSchema[_T.Objects_104, _t.Never, _t.Never] = _b.struct(_T.Objects_104, {})
|
|
387
|
+
Objects_105: _StructSchema[_T.Objects_105, _t.Never, _t.Never] = _b.struct(_T.Objects_105, {})
|
|
388
|
+
Objects_106: _StructSchema[_T.Objects_106, _t.Never, _t.Never] = _b.struct(_T.Objects_106, {})
|
|
389
|
+
Objects_107: _StructSchema[_T.Objects_107, _t.Never, _t.Never] = _b.struct(_T.Objects_107, {})
|
|
390
|
+
Objects_108: _StructSchema[_T.Objects_108, _t.Never, _t.Never] = _b.struct(_T.Objects_108, {})
|
|
391
|
+
Objects_109: _StructSchema[_T.Objects_109, _t.Never, _t.Never] = _b.struct(_T.Objects_109, {})
|
|
392
|
+
Objects_110: _StructSchema[_T.Objects_110, _t.Never, _t.Never] = _b.struct(_T.Objects_110, {})
|
|
393
|
+
Objects_111: _StructSchema[_T.Objects_111, _t.Never, _t.Never] = _b.struct(_T.Objects_111, {})
|
|
394
|
+
Objects_112: _StructSchema[_T.Objects_112, _t.Never, _t.Never] = _b.struct(_T.Objects_112, {})
|
|
395
|
+
Objects_113: _StructSchema[_T.Objects_113, _t.Never, _t.Never] = _b.struct(_T.Objects_113, {})
|
|
396
|
+
Objects_114: _StructSchema[_T.Objects_114, _t.Never, _t.Never] = _b.struct(_T.Objects_114, {})
|
|
397
|
+
Objects_115: _StructSchema[_T.Objects_115, _t.Never, _t.Never] = _b.struct(_T.Objects_115, {})
|
|
398
|
+
Objects_116: _StructSchema[_T.Objects_116, _t.Never, _t.Never] = _b.struct(_T.Objects_116, {})
|
|
399
|
+
Objects_117: _StructSchema[_T.Objects_117, _t.Never, _t.Never] = _b.struct(_T.Objects_117, {})
|
|
400
|
+
Objects_118: _StructSchema[_T.Objects_118, _t.Never, _t.Never] = _b.struct(_T.Objects_118, {})
|
|
401
|
+
Objects_119: _StructSchema[_T.Objects_119, _t.Never, _t.Never] = _b.struct(_T.Objects_119, {})
|
|
402
|
+
Objects_120: _StructSchema[_T.Objects_120, _t.Never, _t.Never] = _b.struct(_T.Objects_120, {})
|
|
403
|
+
Objects_121: _StructSchema[_T.Objects_121, _t.Never, _t.Never] = _b.struct(_T.Objects_121, {})
|
|
404
|
+
Objects_122: _StructSchema[_T.Objects_122, _t.Never, _t.Never] = _b.struct(_T.Objects_122, {})
|
|
405
|
+
Objects_123: _StructSchema[_T.Objects_123, _t.Never, _t.Never] = _b.struct(_T.Objects_123, {})
|
|
406
|
+
Objects_124: _StructSchema[_T.Objects_124, _t.Never, _t.Never] = _b.struct(_T.Objects_124, {})
|
|
407
|
+
Objects_125: _StructSchema[_T.Objects_125, _t.Never, _t.Never] = _b.struct(_T.Objects_125, {})
|
|
408
|
+
Objects_126: _StructSchema[_T.Objects_126, _t.Never, _t.Never] = _b.struct(_T.Objects_126, {})
|
|
409
|
+
Objects_127: _StructSchema[_T.Objects_127, _t.Never, _t.Never] = _b.struct(_T.Objects_127, {})
|
|
410
|
+
Objects_128: _StructSchema[_T.Objects_128, _t.Never, _t.Never] = _b.struct(_T.Objects_128, {})
|
|
411
|
+
Objects_129: _StructSchema[_T.Objects_129, _t.Never, _t.Never] = _b.struct(_T.Objects_129, {})
|
|
412
|
+
Objects_130: _StructSchema[_T.Objects_130, _t.Never, _t.Never] = _b.struct(_T.Objects_130, {})
|
|
413
|
+
Objects_131: _StructSchema[_T.Objects_131, _t.Never, _t.Never] = _b.struct(_T.Objects_131, {})
|
|
414
|
+
Objects_132: _StructSchema[_T.Objects_132, _t.Never, _t.Never] = _b.struct(_T.Objects_132, {})
|
|
415
|
+
Objects_133: _StructSchema[_T.Objects_133, _t.Never, _t.Never] = _b.struct(_T.Objects_133, {})
|
|
416
|
+
Objects_134: _StructSchema[_T.Objects_134, _t.Never, _t.Never] = _b.struct(_T.Objects_134, {})
|
|
417
|
+
Objects_135: _StructSchema[_T.Objects_135, _t.Never, _t.Never] = _b.struct(_T.Objects_135, {})
|
|
418
|
+
Objects_136: _StructSchema[_T.Objects_136, _t.Never, _t.Never] = _b.struct(_T.Objects_136, {})
|
|
419
|
+
Objects_137: _StructSchema[_T.Objects_137, _t.Never, _t.Never] = _b.struct(_T.Objects_137, {})
|
|
420
|
+
Objects_138: _StructSchema[_T.Objects_138, _t.Never, _t.Never] = _b.struct(_T.Objects_138, {})
|
|
421
|
+
Objects_139: _StructSchema[_T.Objects_139, _t.Never, _t.Never] = _b.struct(_T.Objects_139, {})
|
|
422
|
+
Objects_140: _StructSchema[_T.Objects_140, _t.Never, _t.Never] = _b.struct(_T.Objects_140, {})
|
|
423
|
+
Objects_141: _StructSchema[_T.Objects_141, _t.Never, _t.Never] = _b.struct(_T.Objects_141, {})
|
|
424
|
+
Objects_142: _StructSchema[_T.Objects_142, _t.Never, _t.Never] = _b.struct(_T.Objects_142, {})
|
|
425
|
+
Objects_143: _StructSchema[_T.Objects_143, _t.Never, _t.Never] = _b.struct(_T.Objects_143, {})
|
|
426
|
+
Objects_144: _StructSchema[_T.Objects_144, _t.Never, _t.Never] = _b.struct(_T.Objects_144, {})
|
|
427
|
+
Objects_145: _StructSchema[_T.Objects_145, _t.Never, _t.Never] = _b.struct(_T.Objects_145, {})
|
|
428
|
+
Objects_146: _StructSchema[_T.Objects_146, _t.Never, _t.Never] = _b.struct(_T.Objects_146, {})
|
|
429
|
+
Objects_147: _StructSchema[_T.Objects_147, _t.Never, _t.Never] = _b.struct(_T.Objects_147, {})
|
|
430
|
+
ProviderOverloadedResponseErrorData: _StructSchema[_T.ProviderOverloadedResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.ProviderOverloadedResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for ProviderOverloadedResponse", identifier="ProviderOverloadedResponseErrorData")
|
|
431
|
+
ProviderResponse: _StructSchema[_T.ProviderResponse, _t.Never, _t.Never] = _b.struct(_T.ProviderResponse, {"endpoint_id": _S.String.annotate(description="Internal endpoint identifier"), "id": _S.String.annotate(description="Upstream provider response identifier"), "is_byok": _S.Boolean.annotate(description="Whether the request used a bring-your-own-key"), "latency": _b.check(_S.Number.annotate(description="Response latency in milliseconds", format="double"), _S.is_finite().annotate(expected="a finite number")), "model_permaslug": _S.String.annotate(description="Canonical model slug"), "provider_name": _b.literals(["AnyScale", "Atoma", "Cent-ML", "CrofAI", "Enfer", "GoPomelo", "HuggingFace", "Hyperbolic", "Hyperbolic 2", "InoCloud", "Kluster", "Lambda", "Lepton", "Lynn 2", "Lynn", "Mancer", "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", "CoreWeave", "Crucible", "Crusoe", "Darkbloom", "Decart", "Deepgram", "DeepInfra", "DeepSeek", "DekaLLM", "DigitalOcean", "Featherless", "Fireworks", "Fish Audio", "Friendli", "GMICloud", "Google", "Google AI Studio", "Groq", "HeyGen", "Inception", "Inceptron", "InferenceNet", "Ionstream", "Infermatic", "Io Net", "Inferact vLLM", "Inflection", "Liquid", "Mara", "Mancer 2", "Meta", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "Nex AGI", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Poolside", "Perceptron", "Perplexity", "Phala", "Recraft", "Reka", "Relace", "Sail Research", "Sakana AI", "SambaNova", "Seed", "SiliconFlow", "Sourceful", "StepFun", "Stealth", "StreamLake", "Switchpoint", "Tencent", "Tenstorrent", "Together", "Upstage", "Venice", "Wafer", "WandB", "Quiver", "Krea", "Runway", "Xiaomi", "xAI", "Z.AI", "FakeProvider"]).annotate(description="Name of the provider"), "routed_service_tier": _b.literals(["flex", "priority"]).annotate(description="The service tier this request was routed to (e.g. flex, priority). The tier actually applied and billed is determined by the provider response and may differ."), "status": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="HTTP status code from the provider")}, optional=("endpoint_id", "id", "is_byok", "latency", "model_permaslug", "provider_name", "routed_service_tier",)).annotate(description="Details of a provider response for a generation attempt", identifier="ProviderResponse")
|
|
432
|
+
ProviderSort: _S.Bottom[_T.ProviderSort, _t.Any] = _b.literals(["price", "throughput", "latency", "exacto"]).annotate(description="The provider sorting strategy (price, throughput, latency)", identifier="ProviderSort")
|
|
433
|
+
ProviderSortConfig: _StructSchema[_T.ProviderSortConfig, _t.Never, _t.Never] = _b.struct(_T.ProviderSortConfig, {"by": _b.union(_b.literal("price"), _b.literal("throughput"), _b.literal("latency"), _b.literal("exacto"), _S.Null).annotate(description="The provider sorting strategy (price, throughput, latency)"), "partition": _b.union(_b.literal("model"), _b.literal("none"), _S.Null).annotate(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.")}, optional=("by", "partition",)).annotate(description="The provider sorting strategy (price, throughput, latency)", identifier="ProviderSortConfig")
|
|
434
|
+
Quantization: _S.Bottom[_T.Quantization, _t.Any] = _b.literals(["int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown"]).annotate(identifier="Quantization")
|
|
435
|
+
RangeCapability: _StructSchema[_T.RangeCapability, _t.Never, _t.Never] = _b.struct(_T.RangeCapability, {"max": _b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), "min": _b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("range")}).annotate(description="A parameter that accepts any value within an inclusive numeric range.", identifier="RangeCapability")
|
|
436
|
+
RankingsDailyItem: _StructSchema[_T.RankingsDailyItem, _t.Never, _t.Never] = _b.struct(_T.RankingsDailyItem, {"date": _S.String.annotate(description="UTC calendar date the row is aggregated over (YYYY-MM-DD)."), "model_permaslug": _S.String.annotate(description="Model variant permaslug (e.g. `openai/gpt-4o-2024-05-13`, `openai/gpt-4o-2024-05-13:free`). Non-default variants include a `:variant` suffix and are ranked as their own entry. The reserved value `other` denotes the aggregated row covering every model outside the daily top 50 for that date — always sorted last within its date."), "total_tokens": _S.String.annotate(description="Sum of `prompt_tokens + completion_tokens` for the day, returned as a decimal string so 64-bit values are not truncated.")}).annotate(identifier="RankingsDailyItem")
|
|
437
|
+
RankingsDailyMeta: _StructSchema[_T.RankingsDailyMeta, _t.Never, _t.Never] = _b.struct(_T.RankingsDailyMeta, {"as_of": _S.String.annotate(description="ISO-8601 timestamp of when the response was generated. Reflects data-freshness because the underlying materialized view continuously ingests upstream events."), "end_date": _S.String.annotate(description="Resolved end of the date window (UTC, inclusive)."), "start_date": _S.String.annotate(description="Resolved start of the date window (UTC, inclusive)."), "version": _b.literal("v1").annotate(description="Dataset version. Field names and grain are stable for the life of `v1`.")}).annotate(identifier="RankingsDailyMeta")
|
|
438
|
+
ReasoningContext: _S.Bottom[_T.ReasoningContext, _t.Any] = _b.union(_b.literal("auto"), _b.literal("all_turns"), _b.literal("current_turn"), _S.Null).annotate(description="Controls which reasoning is available to the model. `auto` uses the model default (same as omitting); `all_turns` includes reasoning from earlier turns passed in input; `current_turn` limits to the current turn only. Only supported by OpenAI GPT-5.6 and newer.", identifier="ReasoningContext")
|
|
439
|
+
ReasoningDeltaEvent: _StructSchema[_T.ReasoningDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ReasoningDeltaEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.reasoning_text.delta")}).annotate(description="Event emitted when reasoning text delta is streamed", identifier="ReasoningDeltaEvent")
|
|
440
|
+
ReasoningDoneEvent: _StructSchema[_T.ReasoningDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ReasoningDoneEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "text": _S.String, "type": _b.literal("response.reasoning_text.done")}).annotate(description="Event emitted when reasoning text streaming is complete", identifier="ReasoningDoneEvent")
|
|
441
|
+
ReasoningEffort: _S.Bottom[_T.ReasoningEffort, _t.Any] = _b.union(_b.literal("max"), _b.literal("xhigh"), _b.literal("high"), _b.literal("medium"), _b.literal("low"), _b.literal("minimal"), _b.literal("none"), _S.Null).annotate(identifier="ReasoningEffort")
|
|
442
|
+
ReasoningFormat: _S.Bottom[_T.ReasoningFormat, _t.Any] = _b.union(_b.literal("unknown"), _b.literal("openai-responses-v1"), _b.literal("azure-openai-responses-v1"), _b.literal("xai-responses-v1"), _b.literal("meta-responses-v1"), _b.literal("anthropic-claude-v1"), _b.literal("google-gemini-v1"), _S.Null).annotate(identifier="ReasoningFormat")
|
|
443
|
+
ReasoningMode: _S.Bottom[_T.ReasoningMode, _t.Any] = _b.union(_b.literal("standard"), _b.literal("pro"), _S.Null).annotate(description="Selects the reasoning mode. `standard` is the default; `pro` engages deeper reasoning on models that support it, billed at standard token rates. Only supported by OpenAI GPT-5.6 and newer.", identifier="ReasoningMode")
|
|
444
|
+
ReasoningSummaryText: _StructSchema[_T.ReasoningSummaryText, _t.Never, _t.Never] = _b.struct(_T.ReasoningSummaryText, {"text": _S.String, "type": _b.literal("summary_text")}).annotate(identifier="ReasoningSummaryText")
|
|
445
|
+
ReasoningSummaryTextDeltaEvent: _StructSchema[_T.ReasoningSummaryTextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ReasoningSummaryTextDeltaEvent, {"delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.reasoning_summary_text.delta")}).annotate(description="Event emitted when reasoning summary text delta is streamed", identifier="ReasoningSummaryTextDeltaEvent")
|
|
446
|
+
ReasoningSummaryTextDoneEvent: _StructSchema[_T.ReasoningSummaryTextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ReasoningSummaryTextDoneEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "text": _S.String, "type": _b.literal("response.reasoning_summary_text.done")}).annotate(description="Event emitted when reasoning summary text streaming is complete", identifier="ReasoningSummaryTextDoneEvent")
|
|
447
|
+
ReasoningSummaryVerbosity: _S.Bottom[_T.ReasoningSummaryVerbosity, _t.Any] = _b.union(_b.literal("auto"), _b.literal("concise"), _b.literal("detailed"), _S.Null).annotate(identifier="ReasoningSummaryVerbosity")
|
|
448
|
+
ReasoningTextContent: _StructSchema[_T.ReasoningTextContent, _t.Never, _t.Never] = _b.struct(_T.ReasoningTextContent, {"text": _S.String, "type": _b.literal("reasoning_text")}).annotate(identifier="ReasoningTextContent")
|
|
449
|
+
RefusalDeltaEvent: _StructSchema[_T.RefusalDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.RefusalDeltaEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "delta": _S.String, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.refusal.delta")}).annotate(description="Event emitted when a refusal delta is streamed", identifier="RefusalDeltaEvent")
|
|
450
|
+
RefusalDoneEvent: _StructSchema[_T.RefusalDoneEvent, _t.Never, _t.Never] = _b.struct(_T.RefusalDoneEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "refusal": _S.String, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.refusal.done")}).annotate(description="Event emitted when refusal streaming is complete", identifier="RefusalDoneEvent")
|
|
451
|
+
Objects_149: _S.Bottom[_T.Objects_149, _t.Any] = _b.record(_S.String, _b.check(_S.String, _S.is_max_length(512).annotate(expected="a value with a length of at most 512")))
|
|
452
|
+
RequestTimeoutResponseErrorData: _StructSchema[_T.RequestTimeoutResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.RequestTimeoutResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for RequestTimeoutResponse", identifier="RequestTimeoutResponseErrorData")
|
|
453
|
+
ResponseHealingPlugin: _StructSchema[_T.ResponseHealingPlugin, _t.Never, _t.Never] = _b.struct(_T.ResponseHealingPlugin, {"enabled": _S.Boolean.annotate(description="Set to false to disable the response-healing plugin for this request. Defaults to true."), "id": _b.literal("response-healing")}, optional=("enabled",)).annotate(identifier="ResponseHealingPlugin")
|
|
454
|
+
ResponseIncludesEnum: _S.Bottom[_T.ResponseIncludesEnum, _t.Any] = _b.literals(["file_search_call.results", "message.input_image.image_url", "computer_call_output.output.image_url", "reasoning.encrypted_content", "code_interpreter_call.outputs"]).annotate(identifier="ResponseIncludesEnum")
|
|
455
|
+
ResponsesErrorField: _S.Bottom[_T.ResponsesErrorField, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.ResponsesErrorField__0, {"code": _b.literals(["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", "bio_policy"]), "message": _S.String}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Error information returned from the API", identifier="ResponsesErrorField")
|
|
456
|
+
RouterAttempt: _StructSchema[_T.RouterAttempt, _t.Never, _t.Never] = _b.struct(_T.RouterAttempt, {"model": _S.String, "provider": _S.String, "status": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(identifier="RouterAttempt")
|
|
457
|
+
RouterParams: _StructSchema[_T.RouterParams, _t.Never, _t.Never] = _b.struct(_T.RouterParams, {"quality_floor": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "throughput_floor": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "version_group": _S.String}, optional=("quality_floor", "throughput_floor", "version_group",)).annotate(identifier="RouterParams")
|
|
458
|
+
RoutingStrategy: _S.Bottom[_T.RoutingStrategy, _t.Any] = _b.literals(["direct", "auto", "free", "latest", "alias", "fallback", "pareto", "bodybuilder", "fusion"]).annotate(identifier="RoutingStrategy")
|
|
459
|
+
SandboxSleepAfterSeconds: _S.Bottom[_T.SandboxSleepAfterSeconds, _t.Any] = _b.check(_S.Number.annotate(description="How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to 900 (15 minutes); capped at 2592000 (30 days)."), _S.is_int().annotate(expected="an integer", identifier="SandboxSleepAfterSeconds"))
|
|
460
|
+
SearchContextSizeEnum: _S.Bottom[_T.SearchContextSizeEnum, _t.Any] = _b.literals(["low", "medium", "high"]).annotate(description="Size of the search context for web search tools", identifier="SearchContextSizeEnum")
|
|
461
|
+
SearchModelsServerToolConfig: _StructSchema[_T.SearchModelsServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.SearchModelsServerToolConfig, {"max_results": _b.check(_S.Number.annotate(description="Maximum number of models to return. Defaults to 5, max 20."), _S.is_int().annotate(expected="an integer"))}, optional=("max_results",)).annotate(description="Configuration for the openrouter:experimental__search_models server tool", identifier="SearchModelsServerToolConfig")
|
|
462
|
+
SearchQualityLevel: _S.Bottom[_T.SearchQualityLevel, _t.Any] = _b.literals(["low", "medium", "high"]).annotate(description="How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity 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. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set.", identifier="SearchQualityLevel")
|
|
463
|
+
Objects_150: _S.Bottom[_T.Objects_150, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_150, {"tool_calls_executed": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of OpenRouter server tool calls that executed and produced a result."), "tool_calls_requested": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here."), "web_search_requests": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two.")}, optional=("tool_calls_executed", "tool_calls_requested", "web_search_requests",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
464
|
+
ServiceTier: _S.Bottom[_T.ServiceTier, _t.Any] = _b.union(_b.literal("auto"), _b.literal("default"), _b.literal("flex"), _b.literal("priority"), _b.literal("scale"), _S.Null).annotate(identifier="ServiceTier")
|
|
465
|
+
ServiceUnavailableResponseErrorData: _StructSchema[_T.ServiceUnavailableResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.ServiceUnavailableResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for ServiceUnavailableResponse", identifier="ServiceUnavailableResponseErrorData")
|
|
466
|
+
ShellCallStatus: _S.Bottom[_T.ShellCallStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="Status of a shell call or its output.", identifier="ShellCallStatus")
|
|
467
|
+
ShellServerTool: _StructSchema[_T.ShellServerTool, _t.Never, _t.Never] = _b.struct(_T.ShellServerTool, {"type": _b.literal("shell")}).annotate(description="Shell tool configuration", identifier="ShellServerTool")
|
|
468
|
+
ShellServerToolEngine: _S.Bottom[_T.ShellServerToolEngine, _t.Any] = _b.literals(["auto", "openrouter"]).annotate(description="Which shell engine to use. \"openrouter\" runs commands server-side in the OpenRouter sandbox. \"auto\" (default) keeps the provider's native hosted shell when available (OpenAI); on other providers the call is routed to the OpenRouter sandbox.", identifier="ShellServerToolEngine")
|
|
469
|
+
StopServerToolsWhenFinishReasonIs: _StructSchema[_T.StopServerToolsWhenFinishReasonIs, _t.Never, _t.Never] = _b.struct(_T.StopServerToolsWhenFinishReasonIs, {"reason": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "type": _b.literal("finish_reason_is")}).annotate(description="Stop when the upstream model emits this finish reason (e.g. `length`).", identifier="StopServerToolsWhenFinishReasonIs")
|
|
470
|
+
StopServerToolsWhenHasToolCall: _StructSchema[_T.StopServerToolsWhenHasToolCall, _t.Never, _t.Never] = _b.struct(_T.StopServerToolsWhenHasToolCall, {"tool_name": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "type": _b.literal("has_tool_call")}).annotate(description="Stop after a tool with this name has been called.", identifier="StopServerToolsWhenHasToolCall")
|
|
471
|
+
StopServerToolsWhenMaxCost: _StructSchema[_T.StopServerToolsWhenMaxCost, _t.Never, _t.Never] = _b.struct(_T.StopServerToolsWhenMaxCost, {"max_cost_in_dollars": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("max_cost")}).annotate(description="Stop once cumulative cost across the loop exceeds this dollar threshold.", identifier="StopServerToolsWhenMaxCost")
|
|
472
|
+
StopServerToolsWhenMaxTokensUsed: _StructSchema[_T.StopServerToolsWhenMaxTokensUsed, _t.Never, _t.Never] = _b.struct(_T.StopServerToolsWhenMaxTokensUsed, {"max_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("max_tokens_used")}).annotate(description="Stop once cumulative token usage across the loop exceeds this threshold.", identifier="StopServerToolsWhenMaxTokensUsed")
|
|
473
|
+
StopServerToolsWhenStepCountIs: _StructSchema[_T.StopServerToolsWhenStepCountIs, _t.Never, _t.Never] = _b.struct(_T.StopServerToolsWhenStepCountIs, {"step_count": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("step_count_is")}).annotate(description="Stop after the agent loop has executed this many steps.", identifier="StopServerToolsWhenStepCountIs")
|
|
474
|
+
StreamLogprob: _StructSchema[_T.StreamLogprob, _t.Never, _t.Never] = _b.struct(_T.StreamLogprob, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.StreamLogprob__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}, optional=("bytes", "logprob", "token",)).annotate(description="Alternative token with its log probability"))}, optional=("bytes", "top_logprobs",)).annotate(description="Log probability information for a token", identifier="StreamLogprob")
|
|
475
|
+
StreamLogprobTopLogprob: _StructSchema[_T.StreamLogprobTopLogprob, _t.Never, _t.Never] = _b.struct(_T.StreamLogprobTopLogprob, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}, optional=("bytes", "logprob", "token",)).annotate(description="Alternative token with its log probability", identifier="StreamLogprobTopLogprob")
|
|
476
|
+
STTInputAudio: _StructSchema[_T.STTInputAudio, _t.Never, _t.Never] = _b.struct(_T.STTInputAudio, {"data": _S.String.annotate(description="Base64-encoded audio data (raw bytes, not a data URI)"), "format": _S.String.annotate(description="Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider.")}).annotate(description="Base64-encoded audio to transcribe", identifier="STTInputAudio")
|
|
477
|
+
STTSegment: _StructSchema[_T.STTSegment, _t.Never, _t.Never] = _b.struct(_T.STTSegment, {"avg_logprob": _b.check(_S.Number.annotate(description="Average log probability of the segment", format="double"), _S.is_finite().annotate(expected="a finite number")), "compression_ratio": _b.check(_S.Number.annotate(description="Compression ratio of the segment", format="double"), _S.is_finite().annotate(expected="a finite number")), "end": _b.check(_S.Number.annotate(description="Segment end time in seconds", format="double"), _S.is_finite().annotate(expected="a finite number")), "id": _b.check(_S.Number.annotate(description="Segment index within the transcript"), _S.is_int().annotate(expected="an integer")), "no_speech_prob": _b.check(_S.Number.annotate(description="Probability the segment contains no speech", format="double"), _S.is_finite().annotate(expected="a finite number")), "seek": _b.check(_S.Number.annotate(description="Seek offset of the segment"), _S.is_int().annotate(expected="an integer")), "start": _b.check(_S.Number.annotate(description="Segment start time in seconds", format="double"), _S.is_finite().annotate(expected="a finite number")), "temperature": _b.check(_S.Number.annotate(description="Temperature used for the segment", format="double"), _S.is_finite().annotate(expected="a finite number")), "text": _S.String.annotate(description="Transcribed text of the segment"), "tokens": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))).annotate(description="Token IDs of the segment")}, optional=("avg_logprob", "compression_ratio", "no_speech_prob", "seek", "temperature", "tokens",)).annotate(description="A timestamped transcript segment, returned when response_format is verbose_json", identifier="STTSegment")
|
|
478
|
+
STTTimestampGranularity: _S.Bottom[_T.STTTimestampGranularity, _t.Any] = _b.literals(["word", "segment"]).annotate(description="A timestamp detail level for verbose_json transcription responses.", identifier="STTTimestampGranularity")
|
|
479
|
+
STTUsage: _StructSchema[_T.STTUsage, _t.Never, _t.Never] = _b.struct(_T.STTUsage, {"cost": _b.check(_S.Number.annotate(description="Total cost of the request in USD", format="double"), _S.is_finite().annotate(expected="a finite number")), "input_tokens": _b.check(_S.Number.annotate(description="Number of input tokens billed for this request"), _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number.annotate(description="Number of output tokens generated"), _S.is_int().annotate(expected="an integer")), "seconds": _b.check(_S.Number.annotate(description="Duration of the input audio in seconds", format="double"), _S.is_finite().annotate(expected="a finite number")), "total_tokens": _b.check(_S.Number.annotate(description="Total number of tokens used (input + output)"), _S.is_int().annotate(expected="an integer"))}, optional=("cost", "input_tokens", "output_tokens", "seconds", "total_tokens",)).annotate(description="Aggregated usage statistics for the request", identifier="STTUsage")
|
|
480
|
+
STTWord: _StructSchema[_T.STTWord, _t.Never, _t.Never] = _b.struct(_T.STTWord, {"end": _b.check(_S.Number.annotate(description="Word end time in seconds", format="double"), _S.is_finite().annotate(expected="a finite number")), "speaker": _b.check(_S.Number.annotate(description="Zero-based speaker index for the word, present when the provider returns speaker diarization"), _S.is_int().annotate(expected="an integer")), "start": _b.check(_S.Number.annotate(description="Word start time in seconds", format="double"), _S.is_finite().annotate(expected="a finite number")), "word": _S.String.annotate(description="The transcribed word")}, optional=("speaker",)).annotate(description="A timestamped word, returned when the provider includes word-level timestamps", identifier="STTWord")
|
|
481
|
+
SubagentNestedTool: _StructSchema[_T.SubagentNestedTool, _t.Never, _t.Never] = _b.struct(_T.SubagentNestedTool, {"parameters": _b.struct(_T.SubagentNestedTool__parameters, {}), "type": _S.String}, optional=("parameters",)).annotate(description="A tool made available to the subagent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the worker has no way to execute them. The subagent tool may not list itself.", identifier="SubagentNestedTool")
|
|
482
|
+
SubagentReasoning: _StructSchema[_T.SubagentReasoning, _t.Never, _t.Never] = _b.struct(_T.SubagentReasoning, {"effort": _b.literals(["max", "xhigh", "high", "medium", "low", "minimal", "none"]).annotate(description="Reasoning effort level for the subagent call."), "max_tokens": _b.check(_S.Number.annotate(description="Maximum number of reasoning tokens the subagent may use. Accepted and validated but not yet forwarded to the subagent call."), _S.is_int().annotate(expected="an integer"))}, optional=("effort", "max_tokens",)).annotate(description="Reasoning configuration forwarded to the subagent call. Use this to control reasoning effort and token budget for models that support extended thinking.", identifier="SubagentReasoning")
|
|
483
|
+
SubmitGenerationFeedbackRequest: _StructSchema[_T.SubmitGenerationFeedbackRequest, _t.Never, _t.Never] = _b.struct(_T.SubmitGenerationFeedbackRequest, {"category": _b.literals(["latency", "incoherence", "incorrect_response", "formatting", "billing", "api_error", "other"]).annotate(description="The category of feedback being reported"), "comment": _b.check(_S.String.annotate(description="An optional free-text comment describing the feedback"), _S.is_max_length(1000).annotate(expected="a value with a length of at most 1000")), "generation_id": _b.check(_S.String.annotate(description="The generation to submit feedback on"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("comment",)).annotate(description="Structured feedback about a specific generation", identifier="SubmitGenerationFeedbackRequest")
|
|
484
|
+
SubmitGenerationFeedbackResponse: _StructSchema[_T.SubmitGenerationFeedbackResponse, _t.Never, _t.Never] = _b.struct(_T.SubmitGenerationFeedbackResponse, {"data": _b.struct(_T.SubmitGenerationFeedbackResponse__data, {"success": _b.literal(True).annotate(description="Whether the feedback was recorded")})}).annotate(description="Confirmation that the feedback was recorded", identifier="SubmitGenerationFeedbackResponse")
|
|
485
|
+
SupportedParameters: _StructSchema[_T.SupportedParameters, _t.Never, _t.Never] = _b.struct(_T.SupportedParameters, {}).annotate(description="Union of supported parameters across every endpoint of this model. Coarse discovery aid; the definitive per-endpoint set is behind the endpoints URL.", identifier="SupportedParameters")
|
|
486
|
+
TaskClassificationMacroCategory: _StructSchema[_T.TaskClassificationMacroCategory, _t.Never, _t.Never] = _b.struct(_T.TaskClassificationMacroCategory, {"key": _S.String.annotate(description="Macro-category identifier."), "label": _S.String.annotate(description="Human-readable label for the macro-category."), "token_share": _b.check(_S.Number.annotate(description="Combined token share of all classifications in this macro-category (0–1).", format="double"), _S.is_finite().annotate(expected="a finite number")), "usage_share": _b.check(_S.Number.annotate(description="Combined usage share of all classifications in this macro-category (0–1).", format="double"), _S.is_finite().annotate(expected="a finite number"))}).annotate(identifier="TaskClassificationMacroCategory")
|
|
487
|
+
TaskClassificationModel: _StructSchema[_T.TaskClassificationModel, _t.Never, _t.Never] = _b.struct(_T.TaskClassificationModel, {"id": _S.String.annotate(description="Model identifier (permaslug)."), "tag_token_share": _b.check(_S.Number.annotate(description="Fraction of this classification's sampled token volume attributed to this model (0–1). Sums to ≤1 across the returned models (only top-N are included and unattributed requests are excluded).", format="double"), _S.is_finite().annotate(expected="a finite number")), "tag_usage_share": _b.check(_S.Number.annotate(description="Fraction of this classification's sampled requests attributed to this model (0–1). Sums to ≤1 across the returned models (only top-N are included and unattributed requests are excluded).", format="double"), _S.is_finite().annotate(expected="a finite number"))}).annotate(identifier="TaskClassificationModel")
|
|
488
|
+
TextDeltaEvent: _StructSchema[_T.TextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.TextDeltaEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "delta": _S.String, "item_id": _S.String, "logprobs": _b.array(_b.struct(_T.TextDeltaEvent__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.TextDeltaEvent__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}, optional=("bytes", "logprob", "token",)).annotate(description="Alternative token with its log probability"))}, optional=("bytes", "top_logprobs",)).annotate(description="Log probability information for a token")), "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.output_text.delta")}).annotate(description="Event emitted when a text delta is streamed", identifier="TextDeltaEvent")
|
|
489
|
+
TextDoneEvent: _StructSchema[_T.TextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.TextDoneEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "logprobs": _b.array(_b.struct(_T.TextDoneEvent__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.TextDoneEvent__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}, optional=("bytes", "logprob", "token",)).annotate(description="Alternative token with its log probability"))}, optional=("bytes", "top_logprobs",)).annotate(description="Log probability information for a token")), "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "text": _S.String, "type": _b.literal("response.output_text.done")}).annotate(description="Event emitted when text streaming is complete", identifier="TextDoneEvent")
|
|
490
|
+
ToolCallStatus: _S.Bottom[_T.ToolCallStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="ToolCallStatus")
|
|
491
|
+
ToolChoiceAllowed: _StructSchema[_T.ToolChoiceAllowed, _t.Never, _t.Never] = _b.struct(_T.ToolChoiceAllowed, {"mode": _b.literals(["auto", "required"]), "tools": _b.array(_b.struct(_T.ToolChoiceAllowed__tools__item, {})), "type": _b.literal("allowed_tools")}).annotate(description="Constrains the model to a pre-defined set of allowed tools", identifier="ToolChoiceAllowed")
|
|
492
|
+
TooManyRequestsResponseErrorData: _StructSchema[_T.TooManyRequestsResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.TooManyRequestsResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for TooManyRequestsResponse", identifier="TooManyRequestsResponseErrorData")
|
|
493
|
+
TopProviderInfo: _StructSchema[_T.TopProviderInfo, _t.Never, _t.Never] = _b.struct(_T.TopProviderInfo, {"context_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Context length from the top provider"), "is_moderated": _S.Boolean.annotate(description="Whether the top provider moderates content"), "max_completion_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Maximum completion tokens from the top provider")}, optional=("context_length", "max_completion_tokens",)).annotate(description="Information about the top provider for this model", identifier="TopProviderInfo")
|
|
494
|
+
TraceConfig: _StructSchema[_T.TraceConfig, _t.Never, _t.Never] = _b.struct(_T.TraceConfig, {"generation_name": _S.String, "parent_span_id": _S.String, "span_name": _S.String, "trace_id": _S.String, "trace_name": _S.String}, optional=("generation_name", "parent_span_id", "span_name", "trace_id", "trace_name",)).annotate(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.", identifier="TraceConfig")
|
|
495
|
+
Truncation: _S.Bottom[_T.Truncation, _t.Any] = _b.union(_b.literal("auto"), _b.literal("disabled"), _S.Null).annotate(identifier="Truncation")
|
|
496
|
+
UnauthorizedResponseErrorData: _StructSchema[_T.UnauthorizedResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.UnauthorizedResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for UnauthorizedResponse", identifier="UnauthorizedResponseErrorData")
|
|
497
|
+
UnifiedBenchmarkPricing: _S.Bottom[_T.UnifiedBenchmarkPricing, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.UnifiedBenchmarkPricing__0, {"completion": _S.String.annotate(description="Cost per output token (USD, decimal string)."), "prompt": _S.String.annotate(description="Cost per input token (USD, decimal string).")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="OpenRouter pricing per token for this model. Null if pricing is unavailable.", identifier="UnifiedBenchmarkPricing")
|
|
498
|
+
UnifiedBenchmarksMeta: _StructSchema[_T.UnifiedBenchmarksMeta, _t.Never, _t.Never] = _b.struct(_T.UnifiedBenchmarksMeta, {"as_of": _S.String.annotate(description="ISO-8601 timestamp of when this data was last updated."), "citation": _b.union(_S.String, _S.Null).annotate(description="Required attribution when republishing this data, or null when results span multiple sources (attribute each item individually by its `source` discriminator)."), "model_count": _b.check(_S.Number.annotate(description="Number of unique models in the response."), _S.is_int().annotate(expected="an integer")), "source": _b.union(_b.literal("artificial-analysis"), _b.literal("design-arena"), _S.Null).annotate(description="The source filter applied, or null when all sources are returned."), "source_url": _b.union(_S.String, _S.Null).annotate(description="URL of the upstream data source, or null when results span multiple sources."), "task_type": _b.union(_S.String, _S.Null).annotate(description="The task_type filter applied, or null if showing all."), "version": _b.literal("v1").annotate(description="Dataset version.")}).annotate(identifier="UnifiedBenchmarksMeta")
|
|
499
|
+
UnprocessableEntityResponseErrorData: _StructSchema[_T.UnprocessableEntityResponseErrorData, _t.Never, _t.Never] = _b.struct(_T.UnprocessableEntityResponseErrorData, {"code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String, "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null)}, optional=("metadata",)).annotate(description="Error data for UnprocessableEntityResponse", identifier="UnprocessableEntityResponseErrorData")
|
|
500
|
+
UpdateBYOKKeyRequest: _StructSchema[_T.UpdateBYOKKeyRequest, _t.Never, _t.Never] = _b.struct(_T.UpdateBYOKKeyRequest, {"allowed_models": _b.union(_b.check(_b.array(_S.String), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), _S.Null).annotate(description="Optional allowlist of model slugs this credential may be used for. `null` means no restriction."), "allowed_user_ids": _b.union(_b.check(_b.array(_S.String), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), _S.Null).annotate(description="Optional allowlist of user IDs that may use this credential. `null` means no restriction."), "disabled": _S.Boolean.annotate(description="Whether this credential is disabled."), "is_fallback": _S.Boolean.annotate(description="Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried."), "key": _b.check(_S.String.annotate(description="A new raw provider API key to rotate the credential in-place. The previous key material is overwritten and the masked label is regenerated. Encrypted at rest and never returned in API responses."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "name": _b.union(_b.check(_S.String, _S.is_max_length(255).annotate(expected="a value with a length of at most 255")), _S.Null).annotate(description="Optional human-readable name for the credential.")}, optional=("allowed_models", "allowed_user_ids", "disabled", "is_fallback", "key", "name",)).annotate(identifier="UpdateBYOKKeyRequest")
|
|
501
|
+
UpdateWorkspaceRequest: _StructSchema[_T.UpdateWorkspaceRequest, _t.Never, _t.Never] = _b.struct(_T.UpdateWorkspaceRequest, {"default_image_model": _b.union(_S.String, _S.Null).annotate(description="Default image model for this workspace"), "default_provider_sort": _b.union(_S.String, _S.Null).annotate(description="Default provider sort preference (price, throughput, latency, exacto)"), "default_text_model": _b.union(_S.String, _S.Null).annotate(description="Default text model for this workspace"), "description": _b.union(_b.check(_S.String, _S.is_max_length(500).annotate(expected="a value with a length of at most 500")), _S.Null).annotate(description="New description for the workspace"), "io_logging_api_key_ids": _b.union(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _S.Null).annotate(description="Optional array of API key IDs to filter I/O logging"), "io_logging_sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for I/O logging (0.0001-1)", format="double"), _S.is_finite().annotate(expected="a finite number")), "is_data_discount_logging_enabled": _S.Boolean.annotate(description="Whether data discount logging is enabled"), "is_observability_broadcast_enabled": _S.Boolean.annotate(description="Whether broadcast is enabled"), "is_observability_io_logging_enabled": _S.Boolean.annotate(description="Whether private logging is enabled"), "name": _b.check(_b.check(_S.String.annotate(description="New name for the workspace"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), "slug": _b.check(_b.check(_b.check(_S.String.annotate(description="New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), _b.js_pattern('^[a-z0-9]+(?:-[a-z0-9]+)*\\Z', '^[a-z0-9]+(?:-[a-z0-9]+)*$').annotate(expected="a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$"))}, optional=("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",)).annotate(identifier="UpdateWorkspaceRequest")
|
|
502
|
+
UpsertWorkspaceBudgetRequest: _StructSchema[_T.UpsertWorkspaceBudgetRequest, _t.Never, _t.Never] = _b.struct(_T.UpsertWorkspaceBudgetRequest, {"limit_usd": _b.check(_S.Number.annotate(description="Spending limit in USD. Must be greater than 0.", format="double"), _S.is_finite().annotate(expected="a finite number"))}).annotate(identifier="UpsertWorkspaceBudgetRequest")
|
|
503
|
+
URLCitation: _StructSchema[_T.URLCitation, _t.Never, _t.Never] = _b.struct(_T.URLCitation, {"content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "type": _b.literal("url_citation"), "url": _S.String}, optional=("content",)).annotate(identifier="URLCitation")
|
|
504
|
+
VideoGenerationUsage: _StructSchema[_T.VideoGenerationUsage, _t.Never, _t.Never] = _b.struct(_T.VideoGenerationUsage, {"cost": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="The cost of the video generation in USD.", format="double"), "is_byok": _S.Boolean.annotate(description="Whether the request was made using a Bring Your Own Key configuration.")}, optional=("cost", "is_byok",)).annotate(description="Usage and cost information for the video generation. Available once the job has completed.", identifier="VideoGenerationUsage")
|
|
505
|
+
VideoModel: _StructSchema[_T.VideoModel, _t.Never, _t.Never] = _b.struct(_T.VideoModel, {"allowed_passthrough_parameters": _b.array(_S.String).annotate(description="List of parameters that are allowed to be passed through to the provider"), "canonical_slug": _S.String.annotate(description="Canonical slug for the model"), "created": _b.check(_S.Number.annotate(description="Unix timestamp of when the model was created"), _S.is_int().annotate(expected="an integer")), "description": _S.String.annotate(description="Description of the model"), "generate_audio": _b.union(_S.Boolean, _S.Null).annotate(description="Whether the model supports generating audio alongside video"), "hugging_face_id": _b.union(_S.String, _S.Null).annotate(description="Hugging Face model identifier, if applicable"), "id": _S.String.annotate(description="Unique identifier for the model"), "name": _S.String.annotate(description="Display name of the model"), "pricing_skus": _b.union(_b.record(_S.String, _S.String), _S.Null).annotate(description="Pricing SKUs with provider prefix stripped, values as strings"), "seed": _b.union(_S.Boolean, _S.Null).annotate(description="Whether the model supports deterministic generation via seed parameter"), "supported_aspect_ratios": _b.union(_b.array(_b.literals(["16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9", "9:21"])), _S.Null).annotate(description="Supported output aspect ratios"), "supported_durations": _b.union(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _S.Null).annotate(description="Supported video durations in seconds"), "supported_frame_images": _b.union(_b.array(_b.literals(["first_frame", "last_frame"])), _S.Null).annotate(description="Supported frame image types (e.g. first_frame, last_frame)"), "supported_resolutions": _b.union(_b.array(_b.literals(["480p", "720p", "1080p", "1K", "2K", "4K"])), _S.Null).annotate(description="Supported output resolutions"), "supported_sizes": _b.union(_b.array(_b.literals(["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"])), _S.Null).annotate(description="Supported output sizes (width x height)")}, optional=("description", "hugging_face_id", "pricing_skus",)).annotate(identifier="VideoModel")
|
|
506
|
+
WebFetchEngineEnum: _S.Bottom[_T.WebFetchEngineEnum, _t.Any] = _b.literals(["auto", "native", "openrouter", "exa", "parallel", "firecrawl"]).annotate(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). \"parallel\" uses the Parallel extract API.", identifier="WebFetchEngineEnum")
|
|
507
|
+
WebFetchPlugin: _StructSchema[_T.WebFetchPlugin, _t.Never, _t.Never] = _b.struct(_T.WebFetchPlugin, {"allowed_domains": _b.array(_S.String).annotate(description="Only fetch from these domains."), "blocked_domains": _b.array(_S.String).annotate(description="Never fetch from these domains."), "id": _b.literal("web-fetch"), "max_content_tokens": _b.check(_S.Number.annotate(description="Maximum content length in approximate tokens. Content exceeding this limit is truncated."), _S.is_int().annotate(expected="an integer")), "max_uses": _b.check(_S.Number.annotate(description="Maximum number of web fetches per request. Once exceeded, the tool returns an error."), _S.is_int().annotate(expected="an integer"))}, optional=("allowed_domains", "blocked_domains", "max_content_tokens", "max_uses",)).annotate(identifier="WebFetchPlugin")
|
|
508
|
+
Arrays_13: _S.Bottom[_T.Arrays_13, _t.Any] = _b.array(_S.String).annotate(description="Only fetch from these domains.")
|
|
509
|
+
Arrays_14: _S.Bottom[_T.Arrays_14, _t.Any] = _b.array(_S.String).annotate(description="Never fetch from these domains.")
|
|
510
|
+
WebSearchCallCompletedEvent: _StructSchema[_T.WebSearchCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.WebSearchCallCompletedEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.web_search_call.completed")}).annotate(description="Web search call completed", identifier="WebSearchCallCompletedEvent")
|
|
511
|
+
WebSearchCallInProgressEvent: _StructSchema[_T.WebSearchCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.WebSearchCallInProgressEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.web_search_call.in_progress")}).annotate(description="Web search call in progress", identifier="WebSearchCallInProgressEvent")
|
|
512
|
+
WebSearchCallSearchingEvent: _StructSchema[_T.WebSearchCallSearchingEvent, _t.Never, _t.Never] = _b.struct(_T.WebSearchCallSearchingEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.web_search_call.searching")}).annotate(description="Web search call is searching", identifier="WebSearchCallSearchingEvent")
|
|
513
|
+
Arrays_15: _S.Bottom[_T.Arrays_15, _t.Any] = _b.array(_S.String).annotate(description="Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, xAI). Cannot be used with excluded_domains.")
|
|
514
|
+
Arrays_16: _S.Bottom[_T.Arrays_16, _t.Any] = _b.array(_S.String).annotate(description="Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, and xAI. Not supported with OpenAI (silently ignored). Cannot be used with allowed_domains.")
|
|
515
|
+
Objects_152: _S.Bottom[_T.Objects_152, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_152, {"allowed_domains": _b.union(_b.array(_S.String), _S.Null), "excluded_domains": _b.union(_b.array(_S.String), _S.Null)}, optional=("allowed_domains", "excluded_domains",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
516
|
+
WebSearchEngine: _S.Bottom[_T.WebSearchEngine, _t.Any] = _b.literals(["native", "exa", "firecrawl", "parallel", "perplexity"]).annotate(description="The search engine to use for web search.", identifier="WebSearchEngine")
|
|
517
|
+
WebSearchEngineEnum: _S.Bottom[_T.WebSearchEngineEnum, _t.Any] = _b.literals(["native", "exa", "parallel", "firecrawl", "perplexity", "auto"]).annotate(description="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. \"perplexity\" uses the Perplexity Search API (raw ranked results).", identifier="WebSearchEngineEnum")
|
|
518
|
+
Arrays_17: _S.Bottom[_T.Arrays_17, _t.Any] = _b.array(_S.String).annotate(description="Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, xAI). Cannot be used with excluded_domains.")
|
|
519
|
+
Arrays_18: _S.Bottom[_T.Arrays_18, _t.Any] = _b.array(_S.String).annotate(description="Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, and xAI. Not supported with OpenAI (silently ignored). Cannot be used with allowed_domains.")
|
|
520
|
+
WebSearchSource: _StructSchema[_T.WebSearchSource, _t.Never, _t.Never] = _b.struct(_T.WebSearchSource, {"type": _b.literal("url"), "url": _S.String}).annotate(identifier="WebSearchSource")
|
|
521
|
+
WebSearchStatus: _S.Bottom[_T.WebSearchStatus, _t.Any] = _b.literals(["completed", "searching", "in_progress", "failed"]).annotate(identifier="WebSearchStatus")
|
|
522
|
+
Objects_153: _S.Bottom[_T.Objects_153, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_153, {"city": _b.union(_S.String, _S.Null), "country": _b.union(_S.String, _S.Null), "region": _b.union(_S.String, _S.Null), "timezone": _b.union(_S.String, _S.Null), "type": _b.literal("approximate")}, optional=("city", "country", "region", "timezone", "type",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
523
|
+
WebSearchUserLocationServerTool: _StructSchema[_T.WebSearchUserLocationServerTool, _t.Never, _t.Never] = _b.struct(_T.WebSearchUserLocationServerTool, {"city": _b.union(_S.String, _S.Null), "country": _b.union(_S.String, _S.Null), "region": _b.union(_S.String, _S.Null), "timezone": _b.union(_S.String, _S.Null), "type": _b.literal("approximate")}, optional=("city", "country", "region", "timezone", "type",)).annotate(description="Approximate user location for location-biased results.", identifier="WebSearchUserLocationServerTool")
|
|
524
|
+
Workspace: _StructSchema[_T.Workspace, _t.Never, _t.Never] = _b.struct(_T.Workspace, {"created_at": _S.String.annotate(description="ISO 8601 timestamp of when the workspace was created"), "created_by": _b.union(_S.String, _S.Null).annotate(description="User ID of the workspace creator"), "default_guardrail_id": _S.String.annotate(description="Deterministic ID of the workspace's implicitly-created default guardrail", format="uuid"), "default_image_model": _b.union(_S.String, _S.Null).annotate(description="Default image model for this workspace"), "default_provider_sort": _b.union(_S.String, _S.Null).annotate(description="Default provider sort preference (price, throughput, latency, exacto)"), "default_text_model": _b.union(_S.String, _S.Null).annotate(description="Default text model for this workspace"), "description": _b.union(_S.String, _S.Null).annotate(description="Description of the workspace"), "id": _S.String.annotate(description="Unique identifier for the workspace", format="uuid"), "io_logging_api_key_ids": _b.union(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _S.Null).annotate(description="Optional array of API key IDs to filter I/O logging. Null means all keys are logged."), "io_logging_sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for I/O logging (0.0001-1). 1 means 100% of requests are logged.", format="double"), _S.is_finite().annotate(expected="a finite number")), "is_data_discount_logging_enabled": _S.Boolean.annotate(description="Whether data discount logging is enabled for this workspace"), "is_observability_broadcast_enabled": _S.Boolean.annotate(description="Whether broadcast is enabled for this workspace"), "is_observability_io_logging_enabled": _S.Boolean.annotate(description="Whether private logging is enabled for this workspace"), "name": _S.String.annotate(description="Name of the workspace"), "slug": _S.String.annotate(description="URL-friendly slug for the workspace"), "updated_at": _b.union(_S.String, _S.Null).annotate(description="ISO 8601 timestamp of when the workspace was last updated")}).annotate(identifier="Workspace")
|
|
525
|
+
WorkspaceBudget: _StructSchema[_T.WorkspaceBudget, _t.Never, _t.Never] = _b.struct(_T.WorkspaceBudget, {"created_at": _S.String.annotate(description="ISO 8601 timestamp of when the budget was created"), "id": _S.String.annotate(description="Unique identifier for the budget", format="uuid"), "limit_usd": _b.check(_S.Number.annotate(description="Spending limit in USD for this interval", format="double"), _S.is_finite().annotate(expected="a finite number")), "reset_interval": _b.union(_b.literal("daily"), _b.literal("weekly"), _b.literal("monthly"), _S.Null).annotate(description="Interval at which spend resets. Null means a lifetime (one-time) budget."), "updated_at": _S.String.annotate(description="ISO 8601 timestamp of when the budget was last updated"), "workspace_id": _S.String.annotate(description="ID of the workspace the budget belongs to", format="uuid")}).annotate(identifier="WorkspaceBudget")
|
|
526
|
+
WorkspaceBudgetInterval: _S.Bottom[_T.WorkspaceBudgetInterval, _t.Any] = _b.literals(["daily", "weekly", "monthly", "lifetime"]).annotate(description="Budget reset interval. Use \"lifetime\" for a one-time budget that never resets.", identifier="WorkspaceBudgetInterval")
|
|
527
|
+
WorkspaceMember: _StructSchema[_T.WorkspaceMember, _t.Never, _t.Never] = _b.struct(_T.WorkspaceMember, {"created_at": _S.String.annotate(description="ISO 8601 timestamp of when the membership was created"), "id": _S.String.annotate(description="Unique identifier for the workspace membership", format="uuid"), "role": _b.literals(["admin", "member"]).annotate(description="Role of the member in the workspace"), "user_id": _S.String.annotate(description="Clerk user ID of the member"), "workspace_id": _S.String.annotate(description="ID of the workspace", format="uuid")}).annotate(identifier="WorkspaceMember")
|
|
528
|
+
ActivityResponse: _StructSchema[_T.ActivityResponse, _t.Never, _t.Never] = _b.struct(_T.ActivityResponse, {"data": _b.array(ActivityItem).annotate(description="List of activity items")}).annotate(identifier="ActivityResponse")
|
|
529
|
+
Arrays_: _S.Bottom[_T.Arrays_, _t.Any] = _b.array(AdvisorNestedTool).annotate(description="Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the advisor tool itself.")
|
|
530
|
+
AnthropicBashCodeExecutionResult: _StructSchema[_T.AnthropicBashCodeExecutionResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicBashCodeExecutionResult, {"content": _b.array(AnthropicBashCodeExecutionOutput), "return_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "stderr": _S.String, "stdout": _S.String, "type": _b.literal("bash_code_execution_result")}).annotate(identifier="AnthropicBashCodeExecutionResult")
|
|
531
|
+
AnthropicCacheControlDirective: _StructSchema[_T.AnthropicCacheControlDirective, _t.Never, _t.Never] = _b.struct(_T.AnthropicCacheControlDirective, {"ttl": AnthropicCacheControlTtl, "type": _b.literal("ephemeral")}, optional=("ttl",)).annotate(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. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.", identifier="AnthropicCacheControlDirective")
|
|
532
|
+
ChatContentCacheControl: _StructSchema[_T.ChatContentCacheControl, _t.Never, _t.Never] = _b.struct(_T.ChatContentCacheControl, {"ttl": AnthropicCacheControlTtl, "type": _b.literal("ephemeral")}, optional=("ttl",)).annotate(description="Anthropic-style cache breakpoint for the content part. Interchangeable with the OpenAI-style `prompt_cache_breakpoint` marker: OpenRouter converts between the two based on the provider serving the request.", identifier="ChatContentCacheControl")
|
|
533
|
+
AnthropicCacheCreation: _S.Bottom[_T.AnthropicCacheCreation, _t.Any] = _b.union(Objects_, _S.Null).annotate(identifier="AnthropicCacheCreation")
|
|
534
|
+
AnthropicCitationsConfig: _S.Bottom[_T.AnthropicCitationsConfig, _t.Any] = _b.union(Objects_1, _S.Null).annotate(identifier="AnthropicCitationsConfig")
|
|
535
|
+
AnthropicTextCitation: _S.Bottom[_T.AnthropicTextCitation, _t.Any] = _b.union(AnthropicCitationCharLocation, AnthropicCitationPageLocation, AnthropicCitationContentBlockLocation, AnthropicCitationWebSearchResultLocation, AnthropicCitationSearchResultLocation, mode="one_of").annotate(identifier="AnthropicTextCitation")
|
|
536
|
+
MessagesContentBlockDeltaEvent: _StructSchema[_T.MessagesContentBlockDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.MessagesContentBlockDeltaEvent, {"delta": _b.union(_b.struct(_T.MessagesContentBlockDeltaEvent__delta__0, {"text": _S.String, "type": _b.literal("text_delta")}), _b.struct(_T.MessagesContentBlockDeltaEvent__delta__1, {"partial_json": _S.String, "type": _b.literal("input_json_delta")}), _b.struct(_T.MessagesContentBlockDeltaEvent__delta__2, {"thinking": _S.String, "type": _b.literal("thinking_delta")}), _b.struct(_T.MessagesContentBlockDeltaEvent__delta__3, {"signature": _S.String, "type": _b.literal("signature_delta")}), _b.struct(_T.MessagesContentBlockDeltaEvent__delta__4, {"citation": _b.union(AnthropicCitationCharLocation, AnthropicCitationPageLocation, AnthropicCitationContentBlockLocation, AnthropicCitationWebSearchResultLocation, AnthropicCitationSearchResultLocation, mode="one_of"), "type": _b.literal("citations_delta")}), _b.struct(_T.MessagesContentBlockDeltaEvent__delta__5, {"content": _b.union(_S.String, _S.Null), "type": _b.literal("compaction_delta")}), mode="one_of"), "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("content_block_delta")}).annotate(description="Event sent when content is added to a content block", identifier="MessagesContentBlockDeltaEvent")
|
|
537
|
+
AnthropicCodeExecutionResult: _StructSchema[_T.AnthropicCodeExecutionResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicCodeExecutionResult, {"content": _b.array(AnthropicCodeExecutionOutput), "return_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "stderr": _S.String, "stdout": _S.String, "type": _b.literal("code_execution_result")}).annotate(identifier="AnthropicCodeExecutionResult")
|
|
538
|
+
AnthropicEncryptedCodeExecutionResult: _StructSchema[_T.AnthropicEncryptedCodeExecutionResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicEncryptedCodeExecutionResult, {"content": _b.array(AnthropicCodeExecutionOutput), "encrypted_stdout": _S.String, "return_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "stderr": _S.String, "type": _b.literal("encrypted_code_execution_result")}).annotate(identifier="AnthropicEncryptedCodeExecutionResult")
|
|
539
|
+
AnthropicCaller: _S.Bottom[_T.AnthropicCaller, _t.Any] = _b.union(AnthropicDirectCaller, AnthropicCodeExecution20250825Caller, AnthropicCodeExecution20260120Caller, mode="one_of").annotate(identifier="AnthropicCaller")
|
|
540
|
+
ORAnthropicNullableCaller: _S.Bottom[_T.ORAnthropicNullableCaller, _t.Any] = _b.union(AnthropicDirectCaller, AnthropicCodeExecution20250825Caller, AnthropicCodeExecution20260120Caller, _S.Null, mode="one_of").annotate(identifier="ORAnthropicNullableCaller")
|
|
541
|
+
AnthropicBase64ImageSource: _StructSchema[_T.AnthropicBase64ImageSource, _t.Never, _t.Never] = _b.struct(_T.AnthropicBase64ImageSource, {"data": _S.String, "media_type": AnthropicImageMimeType, "type": _b.literal("base64")}).annotate(identifier="AnthropicBase64ImageSource")
|
|
542
|
+
AnthropicInputTokensClearAtLeast: _S.Bottom[_T.AnthropicInputTokensClearAtLeast, _t.Any] = _b.union(Objects_2, _S.Null).annotate(identifier="AnthropicInputTokensClearAtLeast")
|
|
543
|
+
AnthropicIterationCacheCreation: _S.Bottom[_T.AnthropicIterationCacheCreation, _t.Any] = _b.union(Objects_3, _S.Null).annotate(identifier="AnthropicIterationCacheCreation")
|
|
544
|
+
AnthropicCodeExecutionToolResultError: _StructSchema[_T.AnthropicCodeExecutionToolResultError, _t.Never, _t.Never] = _b.struct(_T.AnthropicCodeExecutionToolResultError, {"error_code": AnthropicServerToolErrorCode, "type": _b.literal("code_execution_tool_result_error")}).annotate(identifier="AnthropicCodeExecutionToolResultError")
|
|
545
|
+
AnthropicToolSearchResultError: _StructSchema[_T.AnthropicToolSearchResultError, _t.Never, _t.Never] = _b.struct(_T.AnthropicToolSearchResultError, {"error_code": AnthropicServerToolErrorCode, "error_message": _b.union(_S.String, _S.Null), "type": _b.literal("tool_search_tool_result_error")}).annotate(identifier="AnthropicToolSearchResultError")
|
|
546
|
+
AnthropicTextEditorCodeExecutionContent: _S.Bottom[_T.AnthropicTextEditorCodeExecutionContent, _t.Any] = _b.union(AnthropicTextEditorCodeExecutionToolResultError, AnthropicTextEditorCodeExecutionViewResult, AnthropicTextEditorCodeExecutionCreateResult, AnthropicTextEditorCodeExecutionStrReplaceResult, mode="one_of").annotate(identifier="AnthropicTextEditorCodeExecutionContent")
|
|
547
|
+
AnthropicToolSearchResult: _StructSchema[_T.AnthropicToolSearchResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicToolSearchResult, {"tool_references": _b.array(AnthropicToolReference), "type": _b.literal("tool_search_tool_search_result")}).annotate(identifier="AnthropicToolSearchResult")
|
|
548
|
+
AnthropicWebSearchToolUserLocation: _S.Bottom[_T.AnthropicWebSearchToolUserLocation, _t.Any] = _b.union(Objects_4, _S.Null).annotate(identifier="AnthropicWebSearchToolUserLocation")
|
|
549
|
+
MessagesErrorDetail: _StructSchema[_T.MessagesErrorDetail, _t.Never, _t.Never] = _b.struct(_T.MessagesErrorDetail, {"error_type": ApiErrorType, "message": _S.String, "type": _S.String}, optional=("error_type",)).annotate(identifier="MessagesErrorDetail")
|
|
550
|
+
ApplyPatchServerToolConfig: _StructSchema[_T.ApplyPatchServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchServerToolConfig, {"engine": ApplyPatchEngineEnum}, optional=("engine",)).annotate(description="Configuration for the openrouter:apply_patch server tool", identifier="ApplyPatchServerToolConfig")
|
|
551
|
+
ApplyPatchCallOperation: _S.Bottom[_T.ApplyPatchCallOperation, _t.Any] = _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of").annotate(description="The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.", identifier="ApplyPatchCallOperation")
|
|
552
|
+
OutputItemApplyPatchCall: _StructSchema[_T.OutputItemApplyPatchCall, _t.Never, _t.Never] = _b.struct(_T.OutputItemApplyPatchCall, {"call_id": _S.String, "created_by": _S.String, "id": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of"), "status": _b.literals(["in_progress", "completed"]), "type": _b.literal("apply_patch_call")}, optional=("created_by",)).annotate(identifier="OutputItemApplyPatchCall")
|
|
553
|
+
BadGatewayResponse: _StructSchema[_T.BadGatewayResponse, _t.Never, _t.Never] = _b.struct(_T.BadGatewayResponse, {"error": BadGatewayResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Bad Gateway - Provider/upstream API failure", identifier="BadGatewayResponse")
|
|
554
|
+
BadRequestResponse: _StructSchema[_T.BadRequestResponse, _t.Never, _t.Never] = _b.struct(_T.BadRequestResponse, {"error": BadRequestResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Bad Request - Invalid request parameters or malformed input", identifier="BadRequestResponse")
|
|
555
|
+
BYOKKey: _StructSchema[_T.BYOKKey, _t.Never, _t.Never] = _b.struct(_T.BYOKKey, {"allowed_api_key_hashes": _b.union(_b.check(_b.array(_S.String), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction."), "allowed_models": _b.union(_b.check(_b.array(_S.String), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), _S.Null).annotate(description="Optional allowlist of model slugs this credential may be used for. `null` means no restriction."), "allowed_user_ids": _b.union(_b.check(_b.array(_S.String), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), _S.Null).annotate(description="Optional allowlist of user IDs that may use this credential. `null` means no restriction."), "created_at": _S.String.annotate(description="ISO timestamp of when the credential was created."), "disabled": _S.Boolean.annotate(description="Whether this credential is currently disabled."), "id": _S.String.annotate(description="Stable public identifier for this BYOK credential.", format="uuid"), "is_fallback": _S.Boolean.annotate(description="Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried."), "label": _S.String.annotate(description="Short masked snippet of the key (e.g. the first/last few characters) used to identify it in the UI."), "name": _b.union(_S.String, _S.Null).annotate(description="Optional human-readable name for the credential."), "provider": BYOKProviderSlug, "sort_order": _b.check(_S.Number.annotate(description="Position within the provider — credentials are tried in ascending sort order."), _S.is_int().annotate(expected="an integer")), "workspace_id": _S.String.annotate(description="ID of the workspace this credential belongs to.", format="uuid")}, optional=("name",)).annotate(identifier="BYOKKey")
|
|
556
|
+
CreateBYOKKeyRequest: _StructSchema[_T.CreateBYOKKeyRequest, _t.Never, _t.Never] = _b.struct(_T.CreateBYOKKeyRequest, {"allowed_models": _b.union(_b.check(_b.array(_S.String), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), _S.Null).annotate(description="Optional allowlist of model slugs this credential may be used for. `null` means no restriction."), "allowed_user_ids": _b.union(_b.check(_b.array(_S.String), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), _S.Null).annotate(description="Optional allowlist of user IDs that may use this credential. `null` means no restriction."), "disabled": _S.Boolean.annotate(description="Whether this credential should be created in a disabled state."), "is_fallback": _S.Boolean.annotate(description="Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried."), "key": _b.check(_S.String.annotate(description="The raw provider API key or credential. This value is encrypted at rest and never returned in API responses."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "name": _b.union(_b.check(_S.String, _S.is_max_length(255).annotate(expected="a value with a length of at most 255")), _S.Null).annotate(description="Optional human-readable name for the credential."), "provider": BYOKProviderSlug, "workspace_id": _S.String.annotate(description="Optional workspace ID. Defaults to the authenticated entity's default workspace.", format="uuid")}, optional=("allowed_models", "allowed_user_ids", "disabled", "is_fallback", "name", "workspace_id",)).annotate(identifier="CreateBYOKKeyRequest")
|
|
557
|
+
ChatContentVideo: _StructSchema[_T.ChatContentVideo, _t.Never, _t.Never] = _b.struct(_T.ChatContentVideo, {"type": _b.literal("video_url"), "video_url": ChatContentVideoInput}).annotate(description="Video input content part", identifier="ChatContentVideo")
|
|
558
|
+
ChatFormatJsonSchemaConfig: _StructSchema[_T.ChatFormatJsonSchemaConfig, _t.Never, _t.Never] = _b.struct(_T.ChatFormatJsonSchemaConfig, {"json_schema": ChatJsonSchemaConfig, "type": _b.literal("json_schema")}).annotate(description="JSON Schema response format for structured outputs", identifier="ChatFormatJsonSchemaConfig")
|
|
559
|
+
ChatToolChoice: _S.Bottom[_T.ChatToolChoice, _t.Any] = _b.union(_b.literal("none"), _b.literal("auto"), _b.literal("required"), ChatNamedToolChoice, ChatServerToolChoice).annotate(description="Tool choice configuration", identifier="ChatToolChoice")
|
|
560
|
+
ChatStreamOptions: _S.Bottom[_T.ChatStreamOptions, _t.Any] = _b.union(Objects_6, _S.Null).annotate(description="Streaming configuration options", identifier="ChatStreamOptions")
|
|
561
|
+
Objects_7: _S.Bottom[_T.Objects_7, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_7, {"content": _b.union(_b.array(ChatTokenLogprob), _S.Null).annotate(description="Log probabilities for content tokens"), "refusal": _b.union(_b.array(ChatTokenLogprob), _S.Null).annotate(description="Log probabilities for refusal tokens")}, optional=("refusal",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
562
|
+
FileSearchServerTool: _StructSchema[_T.FileSearchServerTool, _t.Never, _t.Never] = _b.struct(_T.FileSearchServerTool, {"filters": _b.union(_b.struct(_T.FileSearchServerTool__filters__0, {"key": _S.String, "type": _b.literals(["eq", "ne", "gt", "gte", "lt", "lte"]), "value": _b.union(_S.String, _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), _S.Boolean, _b.array(_b.union(_S.String, _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")))))}), CompoundFilter, _S.Null), "max_num_results": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ranking_options": _b.struct(_T.FileSearchServerTool__ranking_options, {"ranker": _b.literals(["auto", "default-2024-11-15"]), "score_threshold": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number"))}, optional=("ranker", "score_threshold",)), "type": _b.literal("file_search"), "vector_store_ids": _b.array(_S.String)}, optional=("filters", "max_num_results", "ranking_options",)).annotate(description="File search tool configuration", identifier="FileSearchServerTool")
|
|
563
|
+
ConflictResponse: _StructSchema[_T.ConflictResponse, _t.Never, _t.Never] = _b.struct(_T.ConflictResponse, {"error": ConflictResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Conflict - Resource conflict or concurrent modification", identifier="ConflictResponse")
|
|
564
|
+
BashServerToolEnvironment: _S.Bottom[_T.BashServerToolEnvironment, _t.Any] = _b.union(ContainerAutoEnvironment, ContainerReferenceEnvironment, mode="one_of").annotate(description="Execution environment for the bash server tool.", identifier="BashServerToolEnvironment")
|
|
565
|
+
ShellServerToolEnvironment: _S.Bottom[_T.ShellServerToolEnvironment, _t.Any] = _b.union(ContainerAutoEnvironment, ContainerReferenceEnvironment, mode="one_of").annotate(description="Server-side execution environment for the shell tool. Only container-backed environments are supported; \"local\" shells are not.", identifier="ShellServerToolEnvironment")
|
|
566
|
+
ContentFilterEntry: _StructSchema[_T.ContentFilterEntry, _t.Never, _t.Never] = _b.struct(_T.ContentFilterEntry, {"action": ContentFilterAction, "label": _b.union(_b.check(_S.String, _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), _S.Null).annotate(description="Optional label used in redaction placeholders or error messages"), "pattern": _b.check(_S.String.annotate(description="A regex pattern to match against request content"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("label",)).annotate(description="A custom regex content filter that scans request messages for matching patterns.", identifier="ContentFilterEntry")
|
|
567
|
+
InputReference: _S.Bottom[_T.InputReference, _t.Any] = _b.union(ContentPartImage, ContentPartAudio, ContentPartVideo, mode="one_of").annotate(description="A reference asset used to guide video generation. Image references are supported by all providers; audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0).", identifier="InputReference")
|
|
568
|
+
ContextCompressionPlugin: _StructSchema[_T.ContextCompressionPlugin, _t.Never, _t.Never] = _b.struct(_T.ContextCompressionPlugin, {"enabled": _S.Boolean.annotate(description="Set to false to disable the context-compression plugin for this request. Defaults to true."), "engine": ContextCompressionEngine, "id": _b.literal("context-compression")}, optional=("enabled", "engine",)).annotate(identifier="ContextCompressionPlugin")
|
|
569
|
+
CostDetails: _S.Bottom[_T.CostDetails, _t.Any] = _b.union(Objects_8, _S.Null).annotate(description="Breakdown of upstream inference costs", identifier="CostDetails")
|
|
570
|
+
Arrays_9: _S.Bottom[_T.Arrays_9, _t.Any] = _b.array(DABenchmarkEntry).annotate(description="Design Arena ELO rankings across arena+category pairs.")
|
|
571
|
+
DatetimeServerTool: _StructSchema[_T.DatetimeServerTool, _t.Never, _t.Never] = _b.struct(_T.DatetimeServerTool, {"parameters": DatetimeServerToolConfig, "type": _b.literal("openrouter:datetime")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: returns the current date and time", identifier="DatetimeServerTool")
|
|
572
|
+
EdgeNetworkTimeoutResponse: _StructSchema[_T.EdgeNetworkTimeoutResponse, _t.Never, _t.Never] = _b.struct(_T.EdgeNetworkTimeoutResponse, {"error": EdgeNetworkTimeoutResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Infrastructure Timeout - Provider request timed out at edge network", identifier="EdgeNetworkTimeoutResponse")
|
|
573
|
+
EndpointsMetadata: _StructSchema[_T.EndpointsMetadata, _t.Never, _t.Never] = _b.struct(_T.EndpointsMetadata, {"available": _b.array(EndpointInfo), "total": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(identifier="EndpointsMetadata")
|
|
574
|
+
FileListResponse: _StructSchema[_T.FileListResponse, _t.Never, _t.Never] = _b.struct(_T.FileListResponse, {"cursor": _b.union(_S.String, _S.Null).annotate(description="Opaque cursor for the next page; null when there are no more results."), "data": _b.array(FileMetadata), "first_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean, "last_id": _b.union(_S.String, _S.Null)}).annotate(description="A page of files belonging to the requesting workspace.", identifier="FileListResponse")
|
|
575
|
+
FilesServerTool: _StructSchema[_T.FilesServerTool, _t.Never, _t.Never] = _b.struct(_T.FilesServerTool, {"parameters": FilesServerToolConfig, "type": _b.literal("openrouter:files")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: read, write, edit, and list workspace files via the Files API. Requires the `x-openrouter-file-ids: openrouter` request header.", identifier="FilesServerTool")
|
|
576
|
+
ForbiddenResponse: _StructSchema[_T.ForbiddenResponse, _t.Never, _t.Never] = _b.struct(_T.ForbiddenResponse, {"error": ForbiddenResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Forbidden - Authentication successful but insufficient permissions", identifier="ForbiddenResponse")
|
|
577
|
+
Formats: _S.Bottom[_T.Formats, _t.Any] = _b.union(FormatTextConfig, FormatJsonObjectConfig, FormatJsonSchemaConfig).annotate(description="Text response format configuration", identifier="Formats")
|
|
578
|
+
FusionAnalysisResult: _StructSchema[_T.FusionAnalysisResult, _t.Never, _t.Never] = _b.struct(_T.FusionAnalysisResult, {"blind_spots": Arrays_1, "consensus": Arrays_2, "contradictions": Arrays_3, "partial_coverage": Arrays_4, "unique_insights": Arrays_5}).annotate(description="Structured analysis produced by the fusion judge model.", identifier="FusionAnalysisResult")
|
|
579
|
+
GenerationContentResponse: _StructSchema[_T.GenerationContentResponse, _t.Never, _t.Never] = _b.struct(_T.GenerationContentResponse, {"data": GenerationContentData}).annotate(description="Stored prompt and completion content for a generation", identifier="GenerationContentResponse")
|
|
580
|
+
GoneResponse: _StructSchema[_T.GoneResponse, _t.Never, _t.Never] = _b.struct(_T.GoneResponse, {"error": GoneResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Gone - Endpoint has been permanently removed or deprecated", identifier="GoneResponse")
|
|
581
|
+
ImageGenerationServerTool_OpenRouter: _StructSchema[_T.ImageGenerationServerTool_OpenRouter, _t.Never, _t.Never] = _b.struct(_T.ImageGenerationServerTool_OpenRouter, {"parameters": ImageGenerationServerToolConfig, "type": _b.literal("openrouter:image_generation")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: generates images from text prompts using an image generation model", identifier="ImageGenerationServerTool_OpenRouter")
|
|
582
|
+
OutputImageGenerationCallItem: _StructSchema[_T.OutputImageGenerationCallItem, _t.Never, _t.Never] = _b.struct(_T.OutputImageGenerationCallItem, {"id": _S.String, "result": _b.union(_S.String, _S.Null), "status": ImageGenerationStatus, "type": _b.literal("image_generation_call"), "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from.")}, optional=("result", "prompt",)).annotate(identifier="OutputImageGenerationCallItem")
|
|
583
|
+
OutputItemImageGenerationCall: _StructSchema[_T.OutputItemImageGenerationCall, _t.Never, _t.Never] = _b.struct(_T.OutputItemImageGenerationCall, {"id": _S.String, "result": _b.union(_S.String, _S.Null), "status": ImageGenerationStatus, "type": _b.literal("image_generation_call")}, optional=("result",)).annotate(identifier="OutputItemImageGenerationCall")
|
|
584
|
+
ImageModelArchitecture: _StructSchema[_T.ImageModelArchitecture, _t.Never, _t.Never] = _b.struct(_T.ImageModelArchitecture, {"input_modalities": _b.array(ImageInputModality).annotate(description="Supported input modalities"), "output_modalities": _b.array(ImageOutputModality).annotate(description="Supported output modalities")}).annotate(identifier="ImageModelArchitecture")
|
|
585
|
+
InternalServerResponse: _StructSchema[_T.InternalServerResponse, _t.Never, _t.Never] = _b.struct(_T.InternalServerResponse, {"error": InternalServerResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Internal Server Error - Unexpected server error", identifier="InternalServerResponse")
|
|
586
|
+
ListKeyAssignmentsResponse: _StructSchema[_T.ListKeyAssignmentsResponse, _t.Never, _t.Never] = _b.struct(_T.ListKeyAssignmentsResponse, {"data": _b.array(KeyAssignment).annotate(description="List of key assignments"), "total_count": _b.check(_S.Number.annotate(description="Total number of key assignments for this guardrail"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="ListKeyAssignmentsResponse")
|
|
587
|
+
Legacy_ChatContentVideo: _StructSchema[_T.Legacy_ChatContentVideo, _t.Never, _t.Never] = _b.struct(_T.Legacy_ChatContentVideo, {"type": _b.literal("input_video"), "video_url": Legacy_ChatContentVideoInput}).annotate(description="Video input content part (legacy format - deprecated)", identifier="Legacy_ChatContentVideo")
|
|
588
|
+
ListMemberAssignmentsResponse: _StructSchema[_T.ListMemberAssignmentsResponse, _t.Never, _t.Never] = _b.struct(_T.ListMemberAssignmentsResponse, {"data": _b.array(MemberAssignment).annotate(description="List of member assignments"), "total_count": _b.check(_S.Number.annotate(description="Total number of member assignments"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="ListMemberAssignmentsResponse")
|
|
589
|
+
MessagesOutputConfig: _StructSchema[_T.MessagesOutputConfig, _t.Never, _t.Never] = _b.struct(_T.MessagesOutputConfig, {"effort": _b.union(_b.literal("low"), _b.literal("medium"), _b.literal("high"), _b.literal("xhigh"), _b.literal("max"), _S.Null).annotate(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`, `xhigh`, or `max`."), "format": Union_10, "task_budget": Union_11}, optional=("effort", "format", "task_budget",)).annotate(description="Configuration for controlling output behavior. Supports the effort parameter and structured output format.", identifier="MessagesOutputConfig")
|
|
590
|
+
ChatModelNames: _S.Bottom[_T.ChatModelNames, _t.Any] = _b.array(_b.suspend(lambda: ModelName).annotate(description="Available OpenRouter chat completion models")).annotate(description="Models to use for completion", identifier="ChatModelNames")
|
|
591
|
+
ContentPartInputAudio: _StructSchema[_T.ContentPartInputAudio, _t.Never, _t.Never] = _b.struct(_T.ContentPartInputAudio, {"input_audio": MultimodalMedia, "type": _b.literal("input_audio")}).annotate(identifier="ContentPartInputAudio")
|
|
592
|
+
ContentPartInputFile: _StructSchema[_T.ContentPartInputFile, _t.Never, _t.Never] = _b.struct(_T.ContentPartInputFile, {"input_file": MultimodalMedia, "type": _b.literal("input_file")}).annotate(identifier="ContentPartInputFile")
|
|
593
|
+
ContentPartInputVideo: _StructSchema[_T.ContentPartInputVideo, _t.Never, _t.Never] = _b.struct(_T.ContentPartInputVideo, {"input_video": MultimodalMedia, "type": _b.literal("input_video")}).annotate(identifier="ContentPartInputVideo")
|
|
594
|
+
NamespaceTool: _StructSchema[_T.NamespaceTool, _t.Never, _t.Never] = _b.struct(_T.NamespaceTool, {"description": _S.String, "name": _S.String, "tools": _b.array(_b.union(NamespaceFunctionTool, CustomTool)), "type": _b.literal("namespace")}).annotate(description="Groups function/custom tools under a shared namespace", identifier="NamespaceTool")
|
|
595
|
+
NotFoundResponse: _StructSchema[_T.NotFoundResponse, _t.Never, _t.Never] = _b.struct(_T.NotFoundResponse, {"error": NotFoundResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Not Found - Resource does not exist", identifier="NotFoundResponse")
|
|
596
|
+
ObservabilityFilterRulesConfig: _S.Bottom[_T.ObservabilityFilterRulesConfig, _t.Any] = _b.union(_b.struct_with_rest(_b.struct(_T.ObservabilityFilterRulesConfig__0, {"enabled": _S.Boolean, "groups": _b.array(ObservabilityFilterRuleGroup)}, optional=("enabled",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Optional structured filter rules controlling which events are forwarded.", identifier="ObservabilityFilterRulesConfig")
|
|
597
|
+
Objects_10: _S.Bottom[_T.Objects_10, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_10, {"enabled": _S.Boolean, "groups": _b.array(ObservabilityFilterRuleGroup)}, optional=("enabled",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
598
|
+
OpenAIResponsesUsage: _StructSchema[_T.OpenAIResponsesUsage, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponsesUsage, {"input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens_details": Objects_15, "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens_details": Objects_16, "total_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(identifier="OpenAIResponsesUsage")
|
|
599
|
+
OpenResponsesLogProbs: _StructSchema[_T.OpenResponsesLogProbs, _t.Never, _t.Never] = _b.struct(_T.OpenResponsesLogProbs, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(OpenResponsesTopLogprobs)}, optional=("bytes", "top_logprobs",)).annotate(description="Log probability information for a token", identifier="OpenResponsesLogProbs")
|
|
600
|
+
ModelArchitecture: _StructSchema[_T.ModelArchitecture, _t.Never, _t.Never] = _b.struct(_T.ModelArchitecture, {"input_modalities": _b.array(InputModality).annotate(description="Supported input modalities"), "instruct_type": InstructType, "modality": _b.union(_S.String, _S.Null).annotate(description="Primary modality of the model"), "output_modalities": _b.array(OutputModality).annotate(description="Supported output modalities"), "tokenizer": ModelGroup}, optional=("instruct_type", "tokenizer",)).annotate(description="Model architecture information", identifier="ModelArchitecture")
|
|
601
|
+
PayloadTooLargeResponse: _StructSchema[_T.PayloadTooLargeResponse, _t.Never, _t.Never] = _b.struct(_T.PayloadTooLargeResponse, {"error": PayloadTooLargeResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Payload Too Large - Request payload exceeds size limits", identifier="PayloadTooLargeResponse")
|
|
602
|
+
PaymentRequiredResponse: _StructSchema[_T.PaymentRequiredResponse, _t.Never, _t.Never] = _b.struct(_T.PaymentRequiredResponse, {"error": PaymentRequiredResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Payment Required - Insufficient credits or quota to complete request", identifier="PaymentRequiredResponse")
|
|
603
|
+
PDFParserOptions: _StructSchema[_T.PDFParserOptions, _t.Never, _t.Never] = _b.struct(_T.PDFParserOptions, {"engine": PDFParserEngine}, optional=("engine",)).annotate(description="Options for PDF parsing.", identifier="PDFParserOptions")
|
|
604
|
+
PreferredMaxLatency: _S.Bottom[_T.PreferredMaxLatency, _t.Any] = _b.union(_b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), PercentileLatencyCutoffs, _S.Null).annotate(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.", identifier="PreferredMaxLatency")
|
|
605
|
+
PreferredMinThroughput: _S.Bottom[_T.PreferredMinThroughput, _t.Any] = _b.union(_b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), PercentileThroughputCutoffs, _S.Null).annotate(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.", identifier="PreferredMinThroughput")
|
|
606
|
+
PipelineStage: _StructSchema[_T.PipelineStage, _t.Never, _t.Never] = _b.struct(_T.PipelineStage, {"cost_usd": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "data": _b.struct(_T.PipelineStage__data, {}), "guardrail_id": _S.String, "guardrail_scope": _S.String, "name": _S.String, "summary": _S.String, "type": PipelineStageType}, optional=("cost_usd", "data", "guardrail_id", "guardrail_scope", "summary",)).annotate(identifier="PipelineStage")
|
|
607
|
+
Objects_17: _S.Bottom[_T.Objects_17, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_17, {"content": _b.union(_S.String, _b.array(PredictionContentText)), "type": _b.literal("content")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
608
|
+
GetPresetVersionResponse: _StructSchema[_T.GetPresetVersionResponse, _t.Never, _t.Never] = _b.struct(_T.GetPresetVersionResponse, {"data": PresetDesignatedVersion}).annotate(description="A single version of a preset.", identifier="GetPresetVersionResponse")
|
|
609
|
+
ListPresetVersionsResponse: _StructSchema[_T.ListPresetVersionsResponse, _t.Never, _t.Never] = _b.struct(_T.ListPresetVersionsResponse, {"data": _b.array(PresetDesignatedVersion), "total_count": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(description="A paginated list of preset versions.", identifier="ListPresetVersionsResponse")
|
|
610
|
+
Preset: _StructSchema[_T.Preset, _t.Never, _t.Never] = _b.struct(_T.Preset, {"created_at": _S.String, "creator_user_id": _b.union(_S.String, _S.Null), "description": _b.union(_S.String, _S.Null), "designated_version_id": _b.union(_S.String, _S.Null), "id": _S.String, "name": _S.String, "slug": _S.String, "status": PresetStatus, "status_updated_at": _b.union(_S.String, _S.Null), "updated_at": _S.String, "workspace_id": _b.union(_S.String, _S.Null)}).annotate(description="A preset without version details.", identifier="Preset")
|
|
611
|
+
PresetWithDesignatedVersion: _StructSchema[_T.PresetWithDesignatedVersion, _t.Never, _t.Never] = _b.struct(_T.PresetWithDesignatedVersion, {"created_at": _S.String, "creator_user_id": _b.union(_S.String, _S.Null), "description": _b.union(_S.String, _S.Null), "designated_version_id": _b.union(_S.String, _S.Null), "id": _S.String, "name": _S.String, "slug": _S.String, "status": PresetStatus, "status_updated_at": _b.union(_S.String, _S.Null), "updated_at": _S.String, "workspace_id": _b.union(_S.String, _S.Null), "designated_version": PresetDesignatedVersion}).annotate(description="A preset with its currently designated version.", identifier="PresetWithDesignatedVersion")
|
|
612
|
+
Preview_WebSearchUserLocation: _S.Bottom[_T.Preview_WebSearchUserLocation, _t.Any] = _b.union(Objects_18, _S.Null).annotate(identifier="Preview_WebSearchUserLocation")
|
|
613
|
+
PublicPricing: _StructSchema[_T.PublicPricing, _t.Never, _t.Never] = _b.struct(_T.PublicPricing, {"audio": _S.String.annotate(description="Price in USD per audio input token"), "audio_output": _S.String.annotate(description="Price in USD per audio output token"), "completion": _S.String.annotate(description="Price in USD per token for completion (output) generation"), "discount": _b.check(_S.Number.annotate(description="Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)", format="double"), _S.is_finite().annotate(expected="a finite number")), "image": _S.String.annotate(description="Price in USD per input image"), "image_output": _S.String.annotate(description="Price in USD per output image"), "image_token": _S.String.annotate(description="Price in USD per image token"), "input_audio_cache": _S.String.annotate(description="Price in USD per cached audio input token"), "input_cache_read": _S.String.annotate(description="Price in USD per cached input token (read)"), "input_cache_write": _S.String.annotate(description="Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic), this is the default (5-minute) cache-write rate."), "input_cache_write_1h": _S.String.annotate(description="Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic."), "internal_reasoning": _S.String.annotate(description="Price in USD per internal reasoning token"), "overrides": _b.array(PricingOverride).annotate(description="Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions."), "prompt": _S.String.annotate(description="Price in USD per token for prompt (input) processing"), "request": _S.String.annotate(description="Price in USD per request"), "web_search": _S.String.annotate(description="Price in USD per web search")}, optional=("audio", "audio_output", "discount", "image", "image_output", "image_token", "input_audio_cache", "input_cache_read", "input_cache_write", "input_cache_write_1h", "internal_reasoning", "overrides", "request", "web_search",)).annotate(description="Pricing information for the model", identifier="PublicPricing")
|
|
614
|
+
PromptCacheBreakpoint: _S.Bottom[_T.PromptCacheBreakpoint, _t.Any] = _b.union(Objects_19, _S.Null).annotate(description="Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically.", identifier="PromptCacheBreakpoint")
|
|
615
|
+
PromptCacheOptions: _S.Bottom[_T.PromptCacheOptions, _t.Any] = _b.union(Objects_20, _S.Null).annotate(description="Request-level prompt-cache controls. `mode: \"explicit\"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. Only supported by OpenAI GPT-5.6 and newer.", identifier="PromptCacheOptions")
|
|
616
|
+
ContentFilterBuiltinEntry: _StructSchema[_T.ContentFilterBuiltinEntry, _t.Never, _t.Never] = _b.struct(_T.ContentFilterBuiltinEntry, {"action": ContentFilterBuiltinAction, "label": _b.check(_S.String.annotate(description="Read-only, system-assigned redaction placeholder derived from the slug (e.g. \"[EMAIL]\", \"[PHONE]\"). Not settable by the caller."), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), "scan_scope": PromptInjectionScanScope, "slug": ContentFilterBuiltinSlug}, optional=("label", "scan_scope",)).annotate(description="A builtin content filter entry. Builtin filters include PII detectors and the regex-based prompt injection detector.", identifier="ContentFilterBuiltinEntry")
|
|
617
|
+
ContentFilterBuiltinEntryInput: _StructSchema[_T.ContentFilterBuiltinEntryInput, _t.Never, _t.Never] = _b.struct(_T.ContentFilterBuiltinEntryInput, {"action": ContentFilterBuiltinAction, "label": _b.check(_S.String.annotate(description="Deprecated: labels are system-assigned and cannot be set by the caller. Accepted for backward compatibility but silently ignored."), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), "scan_scope": PromptInjectionScanScope, "slug": ContentFilterBuiltinSlug}, optional=("label", "scan_scope",)).annotate(description="A builtin content filter entry for create/update requests. Labels are system-assigned and cannot be set by the caller.", identifier="ContentFilterBuiltinEntryInput")
|
|
618
|
+
Union_2: _S.Bottom[_T.Union_2, _t.Any] = _b.union(_b.array(_b.union(ProviderName, _S.String)), _S.Null).annotate(description="List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.")
|
|
619
|
+
Union_3: _S.Bottom[_T.Union_3, _t.Any] = _b.union(_b.array(_b.union(ProviderName, _S.String)), _S.Null).annotate(description="List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.")
|
|
620
|
+
Union_4: _S.Bottom[_T.Union_4, _t.Any] = _b.union(_b.array(_b.union(ProviderName, _S.String)), _S.Null).annotate(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.")
|
|
621
|
+
ProviderOptions: _StructSchema[_T.ProviderOptions, _t.Never, _t.Never] = _b.struct(_T.ProviderOptions, {"01ai": Objects_21, "ai21": Objects_22, "aion-labs": Objects_23, "akashml": Objects_24, "alibaba": Objects_25, "amazon-bedrock": Objects_26, "amazon-nova": Objects_27, "ambient": Objects_28, "anthropic": Objects_29, "anyscale": Objects_30, "arcee-ai": Objects_31, "atlas-cloud": Objects_32, "atoma": Objects_33, "avian": Objects_34, "azure": Objects_35, "baidu": Objects_36, "baseten": Objects_37, "black-forest-labs": Objects_38, "byteplus": Objects_39, "centml": Objects_40, "cerebras": Objects_41, "chutes": Objects_42, "cirrascale": Objects_43, "clarifai": Objects_44, "cloudflare": Objects_45, "cohere": Objects_46, "coreweave": Objects_47, "crofai": Objects_48, "crucible": Objects_49, "crusoe": Objects_50, "darkbloom": Objects_51, "decart": Objects_52, "deepgram": Objects_53, "deepinfra": Objects_54, "deepseek": Objects_55, "dekallm": Objects_56, "digitalocean": Objects_57, "enfer": Objects_58, "fake-provider": Objects_59, "featherless": Objects_60, "fireworks": Objects_61, "fish-audio": Objects_62, "friendli": Objects_63, "gmicloud": Objects_64, "google-ai-studio": Objects_65, "google-vertex": Objects_66, "gopomelo": Objects_67, "groq": Objects_68, "heygen": Objects_69, "huggingface": Objects_70, "hyperbolic": Objects_71, "hyperbolic-quantized": Objects_72, "inception": Objects_73, "inceptron": Objects_74, "inferact-vllm": Objects_75, "inference-net": Objects_76, "infermatic": Objects_77, "inflection": Objects_78, "inocloud": Objects_79, "io-net": Objects_80, "ionstream": Objects_81, "klusterai": Objects_82, "krea": Objects_83, "lambda": Objects_84, "lepton": Objects_85, "liquid": Objects_86, "lynn": Objects_87, "lynn-private": Objects_88, "mancer": Objects_89, "mancer-old": Objects_90, "mara": Objects_91, "meta": Objects_92, "minimax": Objects_93, "mistral": Objects_94, "modal": Objects_95, "modelrun": Objects_96, "modular": Objects_97, "moonshotai": Objects_98, "morph": Objects_99, "ncompass": Objects_100, "nebius": Objects_101, "nex-agi": Objects_102, "nextbit": Objects_103, "nineteen": Objects_104, "novita": Objects_105, "nvidia": Objects_106, "octoai": Objects_107, "open-inference": Objects_108, "openai": Objects_109, "parasail": Objects_110, "perceptron": Objects_111, "perplexity": Objects_112, "phala": Objects_113, "poolside": Objects_114, "quiver": Objects_115, "recraft": Objects_116, "recursal": Objects_117, "reflection": Objects_118, "reka": Objects_119, "relace": Objects_120, "replicate": Objects_121, "runway": Objects_122, "sail-research": Objects_123, "sakana": Objects_124, "sambanova": Objects_125, "sambanova-cloaked": Objects_126, "seed": Objects_127, "sf-compute": Objects_128, "siliconflow": Objects_129, "sourceful": Objects_130, "stealth": Objects_131, "stepfun": Objects_132, "streamlake": Objects_133, "switchpoint": Objects_134, "targon": Objects_135, "tencent": Objects_136, "tenstorrent": Objects_137, "together": Objects_138, "together-lite": Objects_139, "ubicloud": Objects_140, "upstage": Objects_141, "venice": Objects_142, "wafer": Objects_143, "wandb": Objects_144, "xai": Objects_145, "xiaomi": Objects_146, "z-ai": Objects_147}, optional=("01ai", "ai21", "aion-labs", "akashml", "alibaba", "amazon-bedrock", "amazon-nova", "ambient", "anthropic", "anyscale", "arcee-ai", "atlas-cloud", "atoma", "avian", "azure", "baidu", "baseten", "black-forest-labs", "byteplus", "centml", "cerebras", "chutes", "cirrascale", "clarifai", "cloudflare", "cohere", "coreweave", "crofai", "crucible", "crusoe", "darkbloom", "decart", "deepgram", "deepinfra", "deepseek", "dekallm", "digitalocean", "enfer", "fake-provider", "featherless", "fireworks", "fish-audio", "friendli", "gmicloud", "google-ai-studio", "google-vertex", "gopomelo", "groq", "heygen", "huggingface", "hyperbolic", "hyperbolic-quantized", "inception", "inceptron", "inferact-vllm", "inference-net", "infermatic", "inflection", "inocloud", "io-net", "ionstream", "klusterai", "krea", "lambda", "lepton", "liquid", "lynn", "lynn-private", "mancer", "mancer-old", "mara", "meta", "minimax", "mistral", "modal", "modelrun", "modular", "moonshotai", "morph", "ncompass", "nebius", "nex-agi", "nextbit", "nineteen", "novita", "nvidia", "octoai", "open-inference", "openai", "parasail", "perceptron", "perplexity", "phala", "poolside", "quiver", "recraft", "recursal", "reflection", "reka", "relace", "replicate", "runway", "sail-research", "sakana", "sambanova", "sambanova-cloaked", "seed", "sf-compute", "siliconflow", "sourceful", "stealth", "stepfun", "streamlake", "switchpoint", "targon", "tencent", "tenstorrent", "together", "together-lite", "ubicloud", "upstage", "venice", "wafer", "wandb", "xai", "xiaomi", "z-ai",)).annotate(description="Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.", identifier="ProviderOptions")
|
|
622
|
+
ProviderOverloadedResponse: _StructSchema[_T.ProviderOverloadedResponse, _t.Never, _t.Never] = _b.struct(_T.ProviderOverloadedResponse, {"error": ProviderOverloadedResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Provider Overloaded - Provider is temporarily overloaded", identifier="ProviderOverloadedResponse")
|
|
623
|
+
GenerationResponse: _StructSchema[_T.GenerationResponse, _t.Never, _t.Never] = _b.struct(_T.GenerationResponse, {"data": _b.struct(_T.GenerationResponse__data, {"api_type": _b.union(_b.literal("completions"), _b.literal("embeddings"), _b.literal("rerank"), _b.literal("tts"), _b.literal("stt"), _b.literal("video"), _b.literal("image"), _S.Null).annotate(description="Type of API used for the generation"), "app_id": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="ID of the app that made the request"), "cache_discount": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Discount applied due to caching", format="double"), "cancelled": _b.union(_S.Boolean, _S.Null).annotate(description="Whether the generation was cancelled"), "created_at": _S.String.annotate(description="ISO 8601 timestamp of when the generation was created"), "data_region": _b.literals(["global", "europe"]).annotate(description="The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise."), "external_user": _b.union(_S.String, _S.Null).annotate(description="External user identifier"), "finish_reason": _b.union(_S.String, _S.Null).annotate(description="Reason the generation finished"), "generation_time": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Time taken for generation in milliseconds", format="double"), "http_referer": _b.union(_S.String, _S.Null).annotate(description="Referer header from the request"), "id": _S.String.annotate(description="Unique identifier for the generation"), "is_byok": _S.Boolean.annotate(description="Whether this used bring-your-own-key"), "latency": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Total latency in milliseconds", format="double"), "model": _S.String.annotate(description="Model used for the generation"), "moderation_latency": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Moderation latency in milliseconds", format="double"), "native_finish_reason": _b.union(_S.String, _S.Null).annotate(description="Native finish reason as reported by provider"), "native_tokens_cached": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Native cached tokens as reported by provider"), "native_tokens_completion": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Native completion tokens as reported by provider"), "native_tokens_completion_images": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Native completion image tokens as reported by provider"), "native_tokens_prompt": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Native prompt tokens as reported by provider"), "native_tokens_reasoning": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Native reasoning tokens as reported by provider"), "num_fetches": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of web fetches performed"), "num_input_audio_prompt": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of audio inputs in the prompt"), "num_media_completion": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of media items in the completion"), "num_media_prompt": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of media items in the prompt"), "num_search_results": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of search results included"), "origin": _S.String.annotate(description="Origin URL of the request"), "preset_id": _b.union(_S.String, _S.Null).annotate(description="ID of the preset used for this generation, null if no preset was used"), "provider_name": _b.union(_S.String, _S.Null).annotate(description="Name of the provider that served the request"), "provider_responses": _b.union(_b.array(ProviderResponse), _S.Null).annotate(description="List of provider responses for this generation, including fallback attempts"), "request_id": _b.union(_S.String, _S.Null).annotate(description="Unique identifier grouping all generations from a single API request"), "response_cache_source_id": _b.union(_S.String, _S.Null).annotate(description="If this generation was served from response cache, contains the original generation ID. Null otherwise."), "router": _b.union(_S.String, _S.Null).annotate(description="Router used for the request (e.g., openrouter/auto)"), "service_tier": _b.union(_S.String, _S.Null).annotate(description="Service tier the upstream provider reported running this request on, or null if it did not report one."), "session_id": _b.union(_S.String, _S.Null).annotate(description="Session identifier grouping multiple generations in the same session"), "streamed": _b.union(_S.Boolean, _S.Null).annotate(description="Whether the response was streamed"), "tokens_completion": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of tokens in the completion"), "tokens_prompt": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of tokens in the prompt"), "total_cost": _b.check(_S.Number.annotate(description="Total cost of the generation in USD", format="double"), _S.is_finite().annotate(expected="a finite number")), "upstream_id": _b.union(_S.String, _S.Null).annotate(description="Upstream provider's identifier for this generation"), "upstream_inference_cost": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Cost charged by the upstream provider", format="double"), "usage": _b.check(_S.Number.annotate(description="Usage amount in USD", format="double"), _S.is_finite().annotate(expected="a finite number")), "user_agent": _b.union(_S.String, _S.Null).annotate(description="User-Agent header from the request"), "web_search_engine": _b.union(_S.String, _S.Null).annotate(description="The resolved web search engine used for this generation (e.g. exa, firecrawl, parallel)")}, optional=("request_id", "response_cache_source_id", "session_id",)).annotate(description="Generation data")}).annotate(description="Generation response", identifier="GenerationResponse")
|
|
624
|
+
Union_5: _S.Bottom[_T.Union_5, _t.Any] = _b.union(ProviderSort, ProviderSortConfig, _S.Null).annotate(description="The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.")
|
|
625
|
+
PublicEndpoint: _StructSchema[_T.PublicEndpoint, _t.Never, _t.Never] = _b.struct(_T.PublicEndpoint, {"context_length": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "latency_last_30m": PercentileStats, "max_completion_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "max_prompt_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "model_id": _S.String.annotate(description="The unique identifier for the model (permaslug)"), "model_name": _S.String, "name": _S.String, "pricing": _b.struct(_T.PublicEndpoint__pricing, {"audio": _S.String.annotate(description="Price in USD per audio input token"), "audio_output": _S.String.annotate(description="Price in USD per audio output token"), "completion": _S.String.annotate(description="Price in USD per token for completion (output) generation"), "discount": _b.check(_S.Number.annotate(description="Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)", format="double"), _S.is_finite().annotate(expected="a finite number")), "image": _S.String.annotate(description="Price in USD per input image"), "image_output": _S.String.annotate(description="Price in USD per output image"), "image_token": _S.String.annotate(description="Price in USD per image token"), "input_audio_cache": _S.String.annotate(description="Price in USD per cached audio input token"), "input_cache_read": _S.String.annotate(description="Price in USD per cached input token (read)"), "input_cache_write": _S.String.annotate(description="Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic), this is the default (5-minute) cache-write rate."), "input_cache_write_1h": _S.String.annotate(description="Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic."), "internal_reasoning": _S.String.annotate(description="Price in USD per internal reasoning token"), "overrides": _b.array(PricingOverride).annotate(description="Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions."), "prompt": _S.String.annotate(description="Price in USD per token for prompt (input) processing"), "request": _S.String.annotate(description="Price in USD per request"), "web_search": _S.String.annotate(description="Price in USD per web search")}, optional=("audio", "audio_output", "discount", "image", "image_output", "image_token", "input_audio_cache", "input_cache_read", "input_cache_write", "input_cache_write_1h", "internal_reasoning", "overrides", "request", "web_search",)), "provider_name": ProviderName, "quantization": _b.union(Quantization, _S.Null), "status": EndpointStatus, "supported_parameters": _b.array(Parameter), "supports_implicit_caching": _S.Boolean, "tag": _S.String, "throughput_last_30m": _b.suspend(lambda: PercentileStats).annotate(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": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(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"), "uptime_last_30m": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "uptime_last_5m": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(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")}, optional=("status",)).annotate(description="Information about a specific model endpoint", identifier="PublicEndpoint")
|
|
626
|
+
CapabilityDescriptor: _S.Bottom[_T.CapabilityDescriptor, _t.Any] = _b.union(EnumCapability, RangeCapability, BooleanCapability, mode="one_of").annotate(description="A typed descriptor for one supported request parameter.", identifier="CapabilityDescriptor")
|
|
627
|
+
AppRankingsResponse: _StructSchema[_T.AppRankingsResponse, _t.Never, _t.Never] = _b.struct(_T.AppRankingsResponse, {"data": _b.array(AppRankingsItem).annotate(description="Apps ranked per the requested `sort`, re-numbered 1..N after category filtering. `popular` sorts by `total_tokens` descending; `trending` sorts by absolute excess token growth descending and may return fewer than `limit` rows when few apps are growing."), "meta": RankingsDailyMeta}).annotate(identifier="AppRankingsResponse")
|
|
628
|
+
RankingsDailyResponse: _StructSchema[_T.RankingsDailyResponse, _t.Never, _t.Never] = _b.struct(_T.RankingsDailyResponse, {"data": _b.array(RankingsDailyItem).annotate(description="Up to 51 rows per day — the top 50 public models by `total_tokens` for each UTC calendar date in the window, plus one aggregated `other` row summing every model outside that top 50 (omitted when the long tail is empty). Rows are sorted by `date` ascending, then by `total_tokens` descending, with `other` pinned last within its date. Ties between real models break alphabetically on `model_permaslug` so the order is stable across requests."), "meta": RankingsDailyMeta}).annotate(identifier="RankingsDailyResponse")
|
|
629
|
+
Union_12: _S.Bottom[_T.Union_12, _t.Any] = _b.union(_b.array(ReasoningEffort), _S.Null).annotate(description="Allowed reasoning effort values for this model, in descending effort order (highest first). Null means no allowlist — all gateway effort values are accepted.")
|
|
630
|
+
ReasoningDetailEncrypted: _StructSchema[_T.ReasoningDetailEncrypted, _t.Never, _t.Never] = _b.struct(_T.ReasoningDetailEncrypted, {"data": _S.String, "format": ReasoningFormat, "id": _b.union(_S.String, _S.Null), "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("reasoning.encrypted")}, optional=("format", "id", "index",)).annotate(description="Reasoning detail encrypted schema", identifier="ReasoningDetailEncrypted")
|
|
631
|
+
ReasoningDetailServerToolCall: _StructSchema[_T.ReasoningDetailServerToolCall, _t.Never, _t.Never] = _b.struct(_T.ReasoningDetailServerToolCall, {"arguments": _S.String, "format": ReasoningFormat, "id": _b.union(_S.String, _S.Null), "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "result": _S.String, "tool_call_id": _b.union(_S.String, _S.Null), "tool_name": _S.String, "type": _b.literal("reasoning.server_tool_call")}, optional=("format", "id", "index", "tool_call_id",)).annotate(description="Record of an OpenRouter server-tool invocation (e.g. openrouter:fusion), carried in reasoning_details so a prior tool call can be rehydrated into a later turn of the same conversation.", identifier="ReasoningDetailServerToolCall")
|
|
632
|
+
ReasoningDetailSummary: _StructSchema[_T.ReasoningDetailSummary, _t.Never, _t.Never] = _b.struct(_T.ReasoningDetailSummary, {"format": ReasoningFormat, "id": _b.union(_S.String, _S.Null), "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "summary": _S.String, "type": _b.literal("reasoning.summary")}, optional=("format", "id", "index",)).annotate(description="Reasoning detail summary schema", identifier="ReasoningDetailSummary")
|
|
633
|
+
ReasoningDetailText: _StructSchema[_T.ReasoningDetailText, _t.Never, _t.Never] = _b.struct(_T.ReasoningDetailText, {"format": ReasoningFormat, "id": _b.union(_S.String, _S.Null), "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "signature": _b.union(_S.String, _S.Null), "text": _b.union(_S.String, _S.Null), "type": _b.literal("reasoning.text")}, optional=("format", "id", "index", "signature", "text",)).annotate(description="Reasoning detail text schema", identifier="ReasoningDetailText")
|
|
634
|
+
BaseReasoningSummaryPartAddedEvent: _StructSchema[_T.BaseReasoningSummaryPartAddedEvent, _t.Never, _t.Never] = _b.struct(_T.BaseReasoningSummaryPartAddedEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "part": ReasoningSummaryText, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.reasoning_summary_part.added")}).annotate(description="Event emitted when a reasoning summary part is added", identifier="BaseReasoningSummaryPartAddedEvent")
|
|
635
|
+
BaseReasoningSummaryPartDoneEvent: _StructSchema[_T.BaseReasoningSummaryPartDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BaseReasoningSummaryPartDoneEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "part": ReasoningSummaryText, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.reasoning_summary_part.done")}).annotate(description="Event emitted when a reasoning summary part is complete", identifier="BaseReasoningSummaryPartDoneEvent")
|
|
636
|
+
OutputReasoningItem: _StructSchema[_T.OutputReasoningItem, _t.Never, _t.Never] = _b.struct(_T.OutputReasoningItem, {"content": _b.union(_b.array(_b.struct(_T.OutputReasoningItem__content__0__item, {"text": _S.String, "type": _b.literal("reasoning_text")}))), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.literals(["completed", "incomplete", "in_progress"]), "summary": _b.array(ReasoningSummaryText), "type": _b.literal("reasoning"), "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null).annotate(description="A signature for the reasoning content, used for verification")}, optional=("content", "encrypted_content", "status", "format", "signature",)).annotate(description="An output item containing reasoning", identifier="OutputReasoningItem")
|
|
637
|
+
ReasoningItem: _StructSchema[_T.ReasoningItem, _t.Never, _t.Never] = _b.struct(_T.ReasoningItem, {"content": _b.union(_b.array(_b.struct(_T.ReasoningItem__content__0__item, {"text": _S.String, "type": _b.literal("reasoning_text")}))), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.literals(["completed", "incomplete", "in_progress"]), "summary": _b.array(ReasoningSummaryText), "type": _b.literal("reasoning"), "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null)}, optional=("content", "encrypted_content", "status", "format", "signature",)).annotate(description="Reasoning output item with signature and format extensions", identifier="ReasoningItem")
|
|
638
|
+
ReasoningSummaryPartAddedEvent: _StructSchema[_T.ReasoningSummaryPartAddedEvent, _t.Never, _t.Never] = _b.struct(_T.ReasoningSummaryPartAddedEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "part": ReasoningSummaryText, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.reasoning_summary_part.added")}).annotate(description="Event emitted when a reasoning summary part is added", identifier="ReasoningSummaryPartAddedEvent")
|
|
639
|
+
ReasoningSummaryPartDoneEvent: _StructSchema[_T.ReasoningSummaryPartDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ReasoningSummaryPartDoneEvent, {"item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "part": ReasoningSummaryText, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.reasoning_summary_part.done")}).annotate(description="Event emitted when a reasoning summary part is complete", identifier="ReasoningSummaryPartDoneEvent")
|
|
640
|
+
Objects_5: _S.Bottom[_T.Objects_5, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_5, {"context": ReasoningContext, "effort": ReasoningEffort, "mode": ReasoningMode, "summary": ReasoningSummaryVerbosity}, optional=("context", "effort", "mode", "summary",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
641
|
+
Union_13: _S.Bottom[_T.Union_13, _t.Any] = _b.union(_b.struct(_T.Union_13__0, {"context": ReasoningContext, "effort": ReasoningEffort, "mode": ReasoningMode, "summary": ReasoningSummaryVerbosity, "enabled": _b.union(_S.Boolean, _S.Null), "max_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("context", "effort", "mode", "summary", "enabled", "max_tokens",)))
|
|
642
|
+
OutputItemReasoning: _StructSchema[_T.OutputItemReasoning, _t.Never, _t.Never] = _b.struct(_T.OutputItemReasoning, {"content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.literals(["completed", "incomplete", "in_progress"]), "summary": _b.array(ReasoningSummaryText), "type": _b.literal("reasoning")}, optional=("content", "encrypted_content", "status",)).annotate(identifier="OutputItemReasoning")
|
|
643
|
+
RequestMetadata: _S.Bottom[_T.RequestMetadata, _t.Any] = _b.union(Objects_149, _S.Null).annotate(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.", identifier="RequestMetadata")
|
|
644
|
+
RequestTimeoutResponse: _StructSchema[_T.RequestTimeoutResponse, _t.Never, _t.Never] = _b.struct(_T.RequestTimeoutResponse, {"error": RequestTimeoutResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Request Timeout - Operation exceeded time limit", identifier="RequestTimeoutResponse")
|
|
645
|
+
Arrays_10: _S.Bottom[_T.Arrays_10, _t.Any] = _b.array(RouterAttempt)
|
|
646
|
+
ChatSearchModelsServerTool: _StructSchema[_T.ChatSearchModelsServerTool, _t.Never, _t.Never] = _b.struct(_T.ChatSearchModelsServerTool, {"parameters": SearchModelsServerToolConfig, "type": _b.literal("openrouter:experimental__search_models")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: searches and filters AI models available on OpenRouter", identifier="ChatSearchModelsServerTool")
|
|
647
|
+
MessagesSearchModelsServerTool: _StructSchema[_T.MessagesSearchModelsServerTool, _t.Never, _t.Never] = _b.struct(_T.MessagesSearchModelsServerTool, {"parameters": SearchModelsServerToolConfig, "type": _b.literal("openrouter:experimental__search_models")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: searches and filters AI models available on OpenRouter", identifier="MessagesSearchModelsServerTool")
|
|
648
|
+
SearchModelsServerTool_OpenRouter: _StructSchema[_T.SearchModelsServerTool_OpenRouter, _t.Never, _t.Never] = _b.struct(_T.SearchModelsServerTool_OpenRouter, {"parameters": SearchModelsServerToolConfig, "type": _b.literal("openrouter:experimental__search_models")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: searches and filters AI models available on OpenRouter", identifier="SearchModelsServerTool_OpenRouter")
|
|
649
|
+
ServerToolUseDetails: _S.Bottom[_T.ServerToolUseDetails, _t.Any] = _b.union(Objects_150, _S.Null).annotate(description="Usage for server-side tool execution (e.g., web search)", identifier="ServerToolUseDetails")
|
|
650
|
+
ServiceUnavailableResponse: _StructSchema[_T.ServiceUnavailableResponse, _t.Never, _t.Never] = _b.struct(_T.ServiceUnavailableResponse, {"error": ServiceUnavailableResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Service Unavailable - Service temporarily unavailable", identifier="ServiceUnavailableResponse")
|
|
651
|
+
OutputShellCallItem: _StructSchema[_T.OutputShellCallItem, _t.Never, _t.Never] = _b.struct(_T.OutputShellCallItem, {"action": _b.struct(_T.OutputShellCallItem__action, {"commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}), "call_id": _S.String, "id": _S.String, "status": ShellCallStatus, "type": _b.literal("shell_call")}, optional=("action",)).annotate(description="A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool.", identifier="OutputShellCallItem")
|
|
652
|
+
OutputShellCallOutputItem: _StructSchema[_T.OutputShellCallOutputItem, _t.Never, _t.Never] = _b.struct(_T.OutputShellCallOutputItem, {"call_id": _S.String, "id": _S.String, "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "output": _b.array(_b.struct(_T.OutputShellCallOutputItem__output__item, {"outcome": _b.union(_b.struct(_T.OutputShellCallOutputItem__output__item__outcome__0, {"exit_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("exit")}), _b.struct(_T.OutputShellCallOutputItem__output__item__outcome__1, {"type": _b.literal("timeout")}), mode="one_of"), "stderr": _S.String, "stdout": _S.String})), "status": ShellCallStatus, "type": _b.literal("shell_call_output")}, optional=("max_output_length",)).annotate(description="A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome.", identifier="OutputShellCallOutputItem")
|
|
653
|
+
StopServerToolsWhenCondition: _S.Bottom[_T.StopServerToolsWhenCondition, _t.Any] = _b.union(StopServerToolsWhenStepCountIs, StopServerToolsWhenHasToolCall, StopServerToolsWhenMaxTokensUsed, StopServerToolsWhenMaxCost, StopServerToolsWhenFinishReasonIs, mode="one_of").annotate(description="A single condition that, when met, halts the server-tool agent loop.", identifier="StopServerToolsWhenCondition")
|
|
654
|
+
STTResponse: _StructSchema[_T.STTResponse, _t.Never, _t.Never] = _b.struct(_T.STTResponse, {"duration": _b.check(_S.Number.annotate(description="Duration of the input audio in seconds, present when response_format is verbose_json", format="double"), _S.is_finite().annotate(expected="a finite number")), "language": _S.String.annotate(description="Detected or forced language, present when response_format is verbose_json"), "segments": _b.array(STTSegment).annotate(description="Timestamped transcript segments, present when response_format is verbose_json"), "task": _S.String.annotate(description="The task performed, present when response_format is verbose_json"), "text": _S.String.annotate(description="The transcribed text"), "usage": STTUsage, "words": _b.array(STTWord).annotate(description="Timestamped words, present when the provider returns word-level timestamps")}, optional=("duration", "language", "segments", "task", "usage", "words",)).annotate(description="STT response containing transcribed text and optional usage statistics", identifier="STTResponse")
|
|
655
|
+
Arrays_12: _S.Bottom[_T.Arrays_12, _t.Any] = _b.array(SubagentNestedTool).annotate(description="Tools the subagent may use while executing a delegated task. The subagent runs as an agentic sub-agent over these tools, then returns its outcome. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the subagent tool itself.")
|
|
656
|
+
ImageEndpoint: _StructSchema[_T.ImageEndpoint, _t.Never, _t.Never] = _b.struct(_T.ImageEndpoint, {"allowed_passthrough_parameters": _b.array(_S.String).annotate(description="Provider-specific options accepted under provider.options[provider_slug]."), "pricing": _b.array(ImagePricingEntry).annotate(description="Billable pricing lines for this endpoint."), "provider_name": _S.String.annotate(description="Provider display name"), "provider_slug": _S.String.annotate(description="Provider slug"), "provider_tag": _b.union(_S.String, _S.Null).annotate(description="Provider tag for request-side selection"), "supported_parameters": _b.suspend(lambda: SupportedParameters).annotate(description="The definitive set of parameters this endpoint accepts for this model."), "supports_streaming": _S.Boolean.annotate(description="Whether this endpoint supports native SSE streaming (`stream: true` in the request).")}).annotate(description="An endpoint that serves a given image model.", identifier="ImageEndpoint")
|
|
657
|
+
TaskClassificationItem: _StructSchema[_T.TaskClassificationItem, _t.Never, _t.Never] = _b.struct(_T.TaskClassificationItem, {"category_token_share": _b.check(_S.Number.annotate(description="Fraction of this classification's token volume within its macro-category (0–1). Sums to 1 across all classifications sharing the same `macro_category`.", format="double"), _S.is_finite().annotate(expected="a finite number")), "category_usage_share": _b.check(_S.Number.annotate(description="Fraction of this classification's usage within its macro-category (0–1). Sums to 1 across all classifications sharing the same `macro_category`.", format="double"), _S.is_finite().annotate(expected="a finite number")), "display_name": _S.String.annotate(description="Human-readable label for the classification."), "macro_category": _S.String.annotate(description="Coarse grouping derived from the tag prefix: `code`, `data`, `agent`, or `general`."), "models": _b.array(TaskClassificationModel).annotate(description="Top models for this classification by request volume, sorted descending. Each entry reports the model's share of this classification's requests and tokens."), "tag": _S.String.annotate(description="Classification tag identifier (e.g. `code:general_impl`, `agent:web_search`)."), "token_share": _b.check(_S.Number.annotate(description="Fraction of classified sampled token volume (prompt + completion) attributed to this classification (0–1). The unclassified `other` bucket is excluded from the denominator.", format="double"), _S.is_finite().annotate(expected="a finite number")), "usage_share": _b.check(_S.Number.annotate(description="Fraction of classified sampled requests attributed to this classification (0–1). The unclassified `other` bucket is excluded from the denominator.", format="double"), _S.is_finite().annotate(expected="a finite number"))}).annotate(identifier="TaskClassificationItem")
|
|
658
|
+
CodeInterpreterCallItem: _StructSchema[_T.CodeInterpreterCallItem, _t.Never, _t.Never] = _b.struct(_T.CodeInterpreterCallItem, {"code": _b.union(_S.String, _S.Null), "container_id": _S.String, "id": _S.String, "outputs": _b.union(_b.array(_b.union(_b.struct(_T.CodeInterpreterCallItem__outputs__0__item__0, {"type": _b.literal("image"), "url": _S.String}), _b.struct(_T.CodeInterpreterCallItem__outputs__0__item__1, {"logs": _S.String, "type": _b.literal("logs")}))), _S.Null), "status": ToolCallStatus, "type": _b.literal("code_interpreter_call")}).annotate(description="A code interpreter execution call with outputs", identifier="CodeInterpreterCallItem")
|
|
659
|
+
FunctionCallItem: _StructSchema[_T.FunctionCallItem, _t.Never, _t.Never] = _b.struct(_T.FunctionCallItem, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": ToolCallStatus, "type": _b.literal("function_call")}, optional=("namespace", "status",)).annotate(description="A function call initiated by the model", identifier="FunctionCallItem")
|
|
660
|
+
LocalShellCallItem: _StructSchema[_T.LocalShellCallItem, _t.Never, _t.Never] = _b.struct(_T.LocalShellCallItem, {"action": _b.struct(_T.LocalShellCallItem__action, {"command": _b.array(_S.String), "env": _b.struct(_T.LocalShellCallItem__action__env, {}), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "type": _b.literal("exec"), "user": _b.union(_S.String, _S.Null), "working_directory": _b.union(_S.String, _S.Null)}, optional=("timeout_ms", "user", "working_directory",)), "call_id": _S.String, "id": _S.String, "status": ToolCallStatus, "type": _b.literal("local_shell_call")}).annotate(description="A local shell command execution call", identifier="LocalShellCallItem")
|
|
661
|
+
LocalShellCallOutputItem: _StructSchema[_T.LocalShellCallOutputItem, _t.Never, _t.Never] = _b.struct(_T.LocalShellCallOutputItem, {"id": _S.String, "output": _S.String, "status": _b.union(ToolCallStatus, _S.Null), "type": _b.literal("local_shell_call_output")}, optional=("status",)).annotate(description="Output from a local shell command execution", identifier="LocalShellCallOutputItem")
|
|
662
|
+
OpenAIResponseFunctionToolCall: _StructSchema[_T.OpenAIResponseFunctionToolCall, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponseFunctionToolCall, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": ToolCallStatus, "type": _b.literal("function_call")}, optional=("id", "namespace", "status",)).annotate(identifier="OpenAIResponseFunctionToolCall")
|
|
663
|
+
OutputAdvisorServerToolItem: _StructSchema[_T.OutputAdvisorServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputAdvisorServerToolItem, {"advice": _S.String.annotate(description="The advisor model's response (the advice text returned to the executor)."), "error": _S.String.annotate(description="Error message when the advisor call did not produce advice."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."), "model": _S.String.annotate(description="Slug of the advisor model that was consulted."), "prompt": _S.String.annotate(description="The prompt the executor sent to the advisor."), "status": ToolCallStatus, "type": _b.literal("openrouter:advisor")}, optional=("advice", "error", "id", "instance_name", "model", "prompt",)).annotate(description="An openrouter:advisor server tool output item", identifier="OutputAdvisorServerToolItem")
|
|
664
|
+
OutputBashServerToolItem: _StructSchema[_T.OutputBashServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputBashServerToolItem, {"arguments": _S.String.annotate(description="The raw tool-call arguments string as emitted by the model."), "call_id": _S.String.annotate(description="The model-generated tool call id from the originating turn."), "command": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": ToolCallStatus, "stderr": _S.String, "stdout": _S.String, "type": _b.literal("openrouter:bash")}, optional=("arguments", "call_id", "command", "exitCode", "id", "stderr", "stdout",)).annotate(description="An openrouter:bash server tool output item", identifier="OutputBashServerToolItem")
|
|
665
|
+
OutputBrowserUseServerToolItem: _StructSchema[_T.OutputBrowserUseServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputBrowserUseServerToolItem, {"action": _S.String, "id": _S.String, "screenshotB64": _S.String, "status": ToolCallStatus, "type": _b.literal("openrouter:browser_use")}, optional=("action", "id", "screenshotB64",)).annotate(description="An openrouter:browser_use server tool output item", identifier="OutputBrowserUseServerToolItem")
|
|
666
|
+
OutputCodeInterpreterCallItem: _StructSchema[_T.OutputCodeInterpreterCallItem, _t.Never, _t.Never] = _b.struct(_T.OutputCodeInterpreterCallItem, {"code": _b.union(_S.String, _S.Null), "container_id": _S.String, "id": _S.String, "outputs": _b.union(_b.array(_b.union(_b.struct(_T.OutputCodeInterpreterCallItem__outputs__0__item__0, {"type": _b.literal("image"), "url": _S.String}), _b.struct(_T.OutputCodeInterpreterCallItem__outputs__0__item__1, {"logs": _S.String, "type": _b.literal("logs")}))), _S.Null), "status": ToolCallStatus, "type": _b.literal("code_interpreter_call")}).annotate(description="A code interpreter execution call with outputs", identifier="OutputCodeInterpreterCallItem")
|
|
667
|
+
OutputCodeInterpreterServerToolItem: _StructSchema[_T.OutputCodeInterpreterServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputCodeInterpreterServerToolItem, {"code": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "language": _S.String, "status": ToolCallStatus, "stderr": _S.String, "stdout": _S.String, "type": _b.literal("openrouter:code_interpreter")}, optional=("code", "exitCode", "id", "language", "stderr", "stdout",)).annotate(description="An openrouter:code_interpreter server tool output item", identifier="OutputCodeInterpreterServerToolItem")
|
|
668
|
+
OutputDatetimeItem: _StructSchema[_T.OutputDatetimeItem, _t.Never, _t.Never] = _b.struct(_T.OutputDatetimeItem, {"datetime": _S.String.annotate(description="ISO 8601 datetime string"), "id": _S.String, "status": ToolCallStatus, "timezone": _S.String.annotate(description="IANA timezone name"), "type": _b.literal("openrouter:datetime")}, optional=("id",)).annotate(description="An openrouter:datetime server tool output item", identifier="OutputDatetimeItem")
|
|
669
|
+
OutputFileSearchServerToolItem: _StructSchema[_T.OutputFileSearchServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputFileSearchServerToolItem, {"id": _S.String, "queries": _b.array(_S.String), "status": ToolCallStatus, "type": _b.literal("openrouter:file_search")}, optional=("id", "queries",)).annotate(description="An openrouter:file_search server tool output item", identifier="OutputFileSearchServerToolItem")
|
|
670
|
+
OutputFilesServerToolItem: _StructSchema[_T.OutputFilesServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputFilesServerToolItem, {"error": _S.String.annotate(description="Error message when the file operation failed."), "file_id": _S.String.annotate(description="The target file id supplied in the tool-call arguments."), "filename": _S.String.annotate(description="The target filename supplied in the tool-call arguments."), "id": _S.String, "operation": _S.String.annotate(description="The file operation performed (list, read, write, or edit)."), "result": _S.String.annotate(description="JSON-serialized result of the file operation."), "status": ToolCallStatus, "type": _b.literal("openrouter:files")}, optional=("error", "file_id", "filename", "id", "operation", "result",)).annotate(description="An openrouter:files server tool output item", identifier="OutputFilesServerToolItem")
|
|
671
|
+
OutputImageGenerationServerToolItem: _StructSchema[_T.OutputImageGenerationServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputImageGenerationServerToolItem, {"id": _S.String, "imageB64": _S.String, "imageUrl": _S.String, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "result": _b.union(_S.String, _S.Null).annotate(description="The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"), "revisedPrompt": _S.String, "status": ToolCallStatus, "type": _b.literal("openrouter:image_generation")}, optional=("id", "imageB64", "imageUrl", "prompt", "result", "revisedPrompt",)).annotate(description="An openrouter:image_generation server tool output item", identifier="OutputImageGenerationServerToolItem")
|
|
672
|
+
OutputMcpServerToolItem: _StructSchema[_T.OutputMcpServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputMcpServerToolItem, {"id": _S.String, "serverLabel": _S.String, "status": ToolCallStatus, "toolName": _S.String, "type": _b.literal("openrouter:mcp")}, optional=("id", "serverLabel", "toolName",)).annotate(description="An openrouter:mcp server tool output item", identifier="OutputMcpServerToolItem")
|
|
673
|
+
OutputMemoryServerToolItem: _StructSchema[_T.OutputMemoryServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputMemoryServerToolItem, {"action": _b.literals(["read", "write", "delete"]), "id": _S.String, "key": _S.String, "status": ToolCallStatus, "type": _b.literal("openrouter:memory"), "value": _S.Json.annotate(expected="JSON value")}, optional=("action", "id", "key", "value",)).annotate(description="An openrouter:memory server tool output item", identifier="OutputMemoryServerToolItem")
|
|
674
|
+
OutputSearchModelsServerToolItem: _StructSchema[_T.OutputSearchModelsServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputSearchModelsServerToolItem, {"arguments": _S.String.annotate(description="The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"), "id": _S.String, "query": _S.String, "status": ToolCallStatus, "type": _b.literal("openrouter:experimental__search_models")}, optional=("arguments", "id", "query",)).annotate(description="An openrouter:experimental__search_models server tool output item", identifier="OutputSearchModelsServerToolItem")
|
|
675
|
+
OutputSubagentServerToolItem: _StructSchema[_T.OutputSubagentServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputSubagentServerToolItem, {"error": _S.String.annotate(description="Error message when the subagent task did not produce an outcome."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) instance omits it, even when multiple subagents are configured. When a replayed item echoes this field back, the transcript rehydrates the call under that instance's tool. This identity is positional: it is derived from the index of the subagent entry in the request `tools` array, so keep the order of subagent entries stable across requests in a conversation."), "model": _S.String.annotate(description="Slug of the worker model that executed the task."), "name": _S.String.annotate(description="Configured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent."), "outcome": _S.String.annotate(description="The worker model's result (the outcome text returned to the delegating model)."), "status": ToolCallStatus, "task_description": _S.String.annotate(description="The task description the delegating model sent to the worker."), "task_name": _S.String.annotate(description="The short task identifier the delegating model supplied."), "type": _b.literal("openrouter:subagent")}, optional=("error", "id", "instance_name", "model", "name", "outcome", "task_description", "task_name",)).annotate(description="An openrouter:subagent server tool output item", identifier="OutputSubagentServerToolItem")
|
|
676
|
+
OutputTextEditorServerToolItem: _StructSchema[_T.OutputTextEditorServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputTextEditorServerToolItem, {"command": _b.literals(["view", "create", "str_replace", "insert"]), "filePath": _S.String, "id": _S.String, "status": ToolCallStatus, "type": _b.literal("openrouter:text_editor")}, optional=("command", "filePath", "id",)).annotate(description="An openrouter:text_editor server tool output item", identifier="OutputTextEditorServerToolItem")
|
|
677
|
+
OutputToolSearchServerToolItem: _StructSchema[_T.OutputToolSearchServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputToolSearchServerToolItem, {"id": _S.String, "query": _S.String, "status": ToolCallStatus, "type": _b.literal("openrouter:tool_search")}, optional=("id", "query",)).annotate(description="An openrouter:tool_search server tool output item", identifier="OutputToolSearchServerToolItem")
|
|
678
|
+
OutputWebFetchServerToolItem: _StructSchema[_T.OutputWebFetchServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputWebFetchServerToolItem, {"content": _S.String, "error": _S.String.annotate(description="The error message if the fetch failed."), "httpStatus": _b.check(_S.Number.annotate(description="The HTTP status code returned by the upstream URL fetch."), _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": ToolCallStatus, "title": _S.String, "type": _b.literal("openrouter:web_fetch"), "url": _S.String}, optional=("content", "error", "httpStatus", "id", "title", "url",)).annotate(description="An openrouter:web_fetch server tool output item", identifier="OutputWebFetchServerToolItem")
|
|
679
|
+
OutputWebSearchServerToolItem: _StructSchema[_T.OutputWebSearchServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputWebSearchServerToolItem, {"action": _b.struct(_T.OutputWebSearchServerToolItem__action, {"query": _S.String, "sources": _b.array(_b.struct(_T.OutputWebSearchServerToolItem__action__sources__item, {"type": _b.literal("url"), "url": _S.String})), "type": _b.literal("search")}, optional=("sources",)).annotate(description="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": _S.String, "status": ToolCallStatus, "type": _b.literal("openrouter:web_search")}, optional=("action", "id",)).annotate(description="An openrouter:web_search server tool output item", identifier="OutputWebSearchServerToolItem")
|
|
680
|
+
ShellCallItem: _StructSchema[_T.ShellCallItem, _t.Never, _t.Never] = _b.struct(_T.ShellCallItem, {"action": _b.struct(_T.ShellCallItem__action, {"commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("max_output_length", "timeout_ms",)), "call_id": _S.String, "environment": _S.Json.annotate(expected="JSON value"), "id": _b.union(_S.String, _S.Null), "status": _b.union(ToolCallStatus, _S.Null), "type": _b.literal("shell_call")}, optional=("environment", "id", "status",)).annotate(description="A shell command execution call (newer variant)", identifier="ShellCallItem")
|
|
681
|
+
ShellCallOutputItem: _StructSchema[_T.ShellCallOutputItem, _t.Never, _t.Never] = _b.struct(_T.ShellCallOutputItem, {"call_id": _S.String, "id": _b.union(_S.String, _S.Null), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "output": _b.array(_b.struct(_T.ShellCallOutputItem__output__item, {"content": _b.union(_S.String, _S.Null), "exit_code": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "type": _S.String}, optional=("content", "exit_code",))), "status": _b.union(ToolCallStatus, _S.Null), "type": _b.literal("shell_call_output")}, optional=("id", "max_output_length", "status",)).annotate(description="Output from a shell command execution (newer variant)", identifier="ShellCallOutputItem")
|
|
682
|
+
OpenAIResponsesToolChoice: _S.Bottom[_T.OpenAIResponsesToolChoice, _t.Any] = _b.union(_b.literal("auto"), _b.literal("none"), _b.literal("required"), Objects_11, Objects_12, ToolChoiceAllowed, Objects_13, Objects_14).annotate(identifier="OpenAIResponsesToolChoice")
|
|
683
|
+
TooManyRequestsResponse: _StructSchema[_T.TooManyRequestsResponse, _t.Never, _t.Never] = _b.struct(_T.TooManyRequestsResponse, {"error": TooManyRequestsResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Too Many Requests - Rate limit exceeded", identifier="TooManyRequestsResponse")
|
|
684
|
+
UnauthorizedResponse: _StructSchema[_T.UnauthorizedResponse, _t.Never, _t.Never] = _b.struct(_T.UnauthorizedResponse, {"error": UnauthorizedResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Unauthorized - Authentication required or invalid credentials", identifier="UnauthorizedResponse")
|
|
685
|
+
UnifiedBenchmarksAAItem: _StructSchema[_T.UnifiedBenchmarksAAItem, _t.Never, _t.Never] = _b.struct(_T.UnifiedBenchmarksAAItem, {"agentic_index": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Artificial Analysis Agentic Index composite score. Higher is better.", format="double"), "coding_index": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Artificial Analysis Coding Index composite score. Higher is better.", format="double"), "display_name": _S.String.annotate(description="Model name as listed on Artificial Analysis."), "intelligence_index": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Artificial Analysis Intelligence Index composite score. Higher is better.", format="double"), "model_permaslug": _S.String.annotate(description="Stable OpenRouter model identifier."), "pricing": UnifiedBenchmarkPricing, "source": _b.literal("artificial-analysis").annotate(description="Benchmark source discriminator.")}).annotate(identifier="UnifiedBenchmarksAAItem")
|
|
686
|
+
UnifiedBenchmarksDAItem: _StructSchema[_T.UnifiedBenchmarksDAItem, _t.Never, _t.Never] = _b.struct(_T.UnifiedBenchmarksDAItem, {"arena": _S.String.annotate(description="Arena this ranking belongs to."), "avg_generation_time_ms": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Average generation time in milliseconds.", format="double"), "category": _S.String.annotate(description="Category within the arena."), "display_name": _S.String.annotate(description="Human-readable model name from Design Arena."), "elo": _b.check(_S.Number.annotate(description="ELO rating from head-to-head arena battles.", format="double"), _S.is_finite().annotate(expected="a finite number")), "model_permaslug": _S.String.annotate(description="Stable OpenRouter model identifier when mapped; otherwise the upstream Design Arena model id."), "pricing": UnifiedBenchmarkPricing, "source": _b.literal("design-arena").annotate(description="Benchmark source discriminator."), "tournament_stats": _b.struct(_T.UnifiedBenchmarksDAItem__tournament_stats, {"first_place": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "fourth_place": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "second_place": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "third_place": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "total": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}).annotate(description="Placement distribution from tournament matches."), "win_rate": _b.check(_S.Number.annotate(description="Win rate as a percentage (0–100).", format="double"), _S.is_finite().annotate(expected="a finite number"))}).annotate(identifier="UnifiedBenchmarksDAItem")
|
|
687
|
+
UnprocessableEntityResponse: _StructSchema[_T.UnprocessableEntityResponse, _t.Never, _t.Never] = _b.struct(_T.UnprocessableEntityResponse, {"error": UnprocessableEntityResponseErrorData, "openrouter_metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "user_id": _b.union(_S.String, _S.Null)}, optional=("openrouter_metadata", "user_id",)).annotate(description="Unprocessable Entity - Semantic validation failure", identifier="UnprocessableEntityResponse")
|
|
688
|
+
OpenAIResponsesAnnotation: _S.Bottom[_T.OpenAIResponsesAnnotation, _t.Any] = _b.union(FileCitation, URLCitation, FilePath).annotate(identifier="OpenAIResponsesAnnotation")
|
|
689
|
+
VideoGenerationResponse: _StructSchema[_T.VideoGenerationResponse, _t.Never, _t.Never] = _b.struct(_T.VideoGenerationResponse, {"error": _S.String, "generation_id": _S.String.annotate(description="The generation ID associated with this video generation job. Available once the job has been processed."), "id": _S.String, "polling_url": _S.String, "status": _b.literals(["pending", "in_progress", "completed", "failed", "cancelled", "expired"]), "unsigned_urls": _b.array(_S.String), "usage": VideoGenerationUsage}, optional=("error", "generation_id", "unsigned_urls", "usage",)).annotate(identifier="VideoGenerationResponse")
|
|
690
|
+
VideoModelsListResponse: _StructSchema[_T.VideoModelsListResponse, _t.Never, _t.Never] = _b.struct(_T.VideoModelsListResponse, {"data": _b.array(VideoModel)}).annotate(identifier="VideoModelsListResponse")
|
|
691
|
+
WebFetchServerToolConfig: _StructSchema[_T.WebFetchServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.WebFetchServerToolConfig, {"allowed_domains": Arrays_13, "blocked_domains": Arrays_14, "engine": WebFetchEngineEnum, "max_content_tokens": _b.check(_S.Number.annotate(description="Maximum content length in approximate tokens. Content exceeding this limit is truncated."), _S.is_int().annotate(expected="an integer")), "max_uses": _b.check(_S.Number.annotate(description="Maximum number of web fetches per request. Once exceeded, the tool returns an error."), _S.is_int().annotate(expected="an integer"))}, optional=("allowed_domains", "blocked_domains", "engine", "max_content_tokens", "max_uses",)).annotate(description="Configuration for the openrouter:web_fetch server tool", identifier="WebFetchServerToolConfig")
|
|
692
|
+
WebSearchDomainFilter: _S.Bottom[_T.WebSearchDomainFilter, _t.Any] = _b.union(Objects_152, _S.Null).annotate(identifier="WebSearchDomainFilter")
|
|
693
|
+
WebSearchPlugin: _StructSchema[_T.WebSearchPlugin, _t.Never, _t.Never] = _b.struct(_T.WebSearchPlugin, {"enabled": _S.Boolean.annotate(description="Set to false to disable the web-search plugin for this request. Defaults to true."), "engine": WebSearchEngine, "exclude_domains": _b.array(_S.String).annotate(description="A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\")."), "id": _b.literal("web"), "include_domains": _b.array(_S.String).annotate(description="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": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "max_uses": _b.check(_S.Number.annotate(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)."), _S.is_int().annotate(expected="an integer")), "search_prompt": _S.String, "user_location": _b.union(_b.struct_with_rest(_b.struct(_T.WebSearchPlugin__user_location__0, {"city": _b.union(_S.String, _S.Null), "country": _b.union(_S.String, _S.Null), "region": _b.union(_S.String, _S.Null), "timezone": _b.union(_S.String, _S.Null), "type": _b.literal("approximate")}, optional=("city", "country", "region", "timezone",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))).annotate(description="Approximate user location for location-biased search results. Passed through to native providers that support it (e.g. Anthropic).")).annotate(description="User location information for web search")}, optional=("enabled", "engine", "exclude_domains", "include_domains", "max_results", "max_uses", "search_prompt", "user_location",)).annotate(identifier="WebSearchPlugin")
|
|
694
|
+
OutputFileSearchCallItem: _StructSchema[_T.OutputFileSearchCallItem, _t.Never, _t.Never] = _b.struct(_T.OutputFileSearchCallItem, {"id": _S.String, "queries": _b.array(_S.String), "status": WebSearchStatus, "type": _b.literal("file_search_call")}).annotate(identifier="OutputFileSearchCallItem")
|
|
695
|
+
OutputItemFileSearchCall: _StructSchema[_T.OutputItemFileSearchCall, _t.Never, _t.Never] = _b.struct(_T.OutputItemFileSearchCall, {"id": _S.String, "queries": _b.array(_S.String), "status": WebSearchStatus, "type": _b.literal("file_search_call")}).annotate(identifier="OutputItemFileSearchCall")
|
|
696
|
+
OutputItemWebSearchCall: _StructSchema[_T.OutputItemWebSearchCall, _t.Never, _t.Never] = _b.struct(_T.OutputItemWebSearchCall, {"action": _b.union(_b.struct(_T.OutputItemWebSearchCall__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OutputItemWebSearchCall__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OutputItemWebSearchCall__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "id": _S.String, "status": WebSearchStatus, "type": _b.literal("web_search_call")}, optional=("action",)).annotate(identifier="OutputItemWebSearchCall")
|
|
697
|
+
OutputWebSearchCallItem: _StructSchema[_T.OutputWebSearchCallItem, _t.Never, _t.Never] = _b.struct(_T.OutputWebSearchCallItem, {"action": _b.union(_b.struct(_T.OutputWebSearchCallItem__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OutputWebSearchCallItem__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OutputWebSearchCallItem__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "id": _S.String, "status": WebSearchStatus, "type": _b.literal("web_search_call")}, optional=("action",)).annotate(identifier="OutputWebSearchCallItem")
|
|
698
|
+
WebSearchUserLocation: _S.Bottom[_T.WebSearchUserLocation, _t.Any] = _b.union(Objects_153, _S.Null).annotate(description="User location information for web search", identifier="WebSearchUserLocation")
|
|
699
|
+
WebSearchConfig: _StructSchema[_T.WebSearchConfig, _t.Never, _t.Never] = _b.struct(_T.WebSearchConfig, {"allowed_domains": Arrays_15, "engine": WebSearchEngineEnum, "excluded_domains": Arrays_16, "max_characters": _b.check(_S.Number.annotate(description="Exact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). For Perplexity, maps to the native `max_tokens_per_page` parameter (converted from characters to tokens) and trims the response to the exact character cap. When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel, Perplexity)."), _S.is_int().annotate(expected="an integer")), "max_results": _b.check(_S.Number.annotate(description="Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped."), _S.is_int().annotate(expected="an integer")), "max_total_results": _b.check(_S.Number.annotate(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."), _S.is_int().annotate(expected="an integer")), "search_context_size": SearchQualityLevel, "user_location": WebSearchUserLocationServerTool}, optional=("allowed_domains", "engine", "excluded_domains", "max_characters", "max_results", "max_total_results", "search_context_size", "user_location",)).annotate(identifier="WebSearchConfig")
|
|
700
|
+
WebSearchServerToolConfig: _StructSchema[_T.WebSearchServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.WebSearchServerToolConfig, {"allowed_domains": Arrays_17, "engine": WebSearchEngineEnum, "excluded_domains": Arrays_18, "max_characters": _b.check(_S.Number.annotate(description="Exact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). For Perplexity, maps to the native `max_tokens_per_page` parameter (converted from characters to tokens) and trims the response to the exact character cap. When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel, Perplexity)."), _S.is_int().annotate(expected="an integer")), "max_results": _b.check(_S.Number.annotate(description="Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped."), _S.is_int().annotate(expected="an integer")), "max_total_results": _b.check(_S.Number.annotate(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."), _S.is_int().annotate(expected="an integer")), "search_context_size": SearchQualityLevel, "user_location": WebSearchUserLocationServerTool}, optional=("allowed_domains", "engine", "excluded_domains", "max_characters", "max_results", "max_total_results", "search_context_size", "user_location",)).annotate(description="Configuration for the openrouter:web_search server tool", identifier="WebSearchServerToolConfig")
|
|
701
|
+
CreateWorkspaceResponse: _StructSchema[_T.CreateWorkspaceResponse, _t.Never, _t.Never] = _b.struct(_T.CreateWorkspaceResponse, {"data": _b.suspend(lambda: Workspace).annotate(description="The created workspace")}).annotate(identifier="CreateWorkspaceResponse")
|
|
702
|
+
GetWorkspaceResponse: _StructSchema[_T.GetWorkspaceResponse, _t.Never, _t.Never] = _b.struct(_T.GetWorkspaceResponse, {"data": _b.suspend(lambda: Workspace).annotate(description="The workspace")}).annotate(identifier="GetWorkspaceResponse")
|
|
703
|
+
ListWorkspacesResponse: _StructSchema[_T.ListWorkspacesResponse, _t.Never, _t.Never] = _b.struct(_T.ListWorkspacesResponse, {"data": _b.array(Workspace).annotate(description="List of workspaces"), "total_count": _b.check(_S.Number.annotate(description="Total number of workspaces"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="ListWorkspacesResponse")
|
|
704
|
+
UpdateWorkspaceResponse: _StructSchema[_T.UpdateWorkspaceResponse, _t.Never, _t.Never] = _b.struct(_T.UpdateWorkspaceResponse, {"data": _b.suspend(lambda: Workspace).annotate(description="The updated workspace")}).annotate(identifier="UpdateWorkspaceResponse")
|
|
705
|
+
ListWorkspaceBudgetsResponse: _StructSchema[_T.ListWorkspaceBudgetsResponse, _t.Never, _t.Never] = _b.struct(_T.ListWorkspaceBudgetsResponse, {"data": _b.array(WorkspaceBudget).annotate(description="List of budgets configured for the workspace")}).annotate(identifier="ListWorkspaceBudgetsResponse")
|
|
706
|
+
UpsertWorkspaceBudgetResponse: _StructSchema[_T.UpsertWorkspaceBudgetResponse, _t.Never, _t.Never] = _b.struct(_T.UpsertWorkspaceBudgetResponse, {"data": _b.suspend(lambda: WorkspaceBudget).annotate(description="The created or updated budget")}).annotate(identifier="UpsertWorkspaceBudgetResponse")
|
|
707
|
+
BulkAddWorkspaceMembersResponse: _StructSchema[_T.BulkAddWorkspaceMembersResponse, _t.Never, _t.Never] = _b.struct(_T.BulkAddWorkspaceMembersResponse, {"added_count": _b.check(_S.Number.annotate(description="Number of workspace memberships created or updated"), _S.is_int().annotate(expected="an integer")), "data": _b.array(WorkspaceMember).annotate(description="List of added workspace memberships")}).annotate(identifier="BulkAddWorkspaceMembersResponse")
|
|
708
|
+
ListWorkspaceMembersResponse: _StructSchema[_T.ListWorkspaceMembersResponse, _t.Never, _t.Never] = _b.struct(_T.ListWorkspaceMembersResponse, {"data": _b.array(WorkspaceMember).annotate(description="List of workspace members"), "total_count": _b.check(_S.Number.annotate(description="Total number of members in the workspace"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="ListWorkspaceMembersResponse")
|
|
709
|
+
AdvisorServerToolConfig: _StructSchema[_T.AdvisorServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.AdvisorServerToolConfig, {"forward_transcript": _S.Boolean.annotate(description="When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the advisor receives only the `prompt` the executor passes in the tool call."), "instructions": _S.String.annotate(description="System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own."), "max_completion_tokens": _b.check(_S.Number.annotate(description="Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies."), _S.is_int().annotate(expected="an integer")), "max_tool_calls": _b.check(_b.check(_b.check(_S.Number.annotate(description="Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1")), _S.is_less_than_or_equal_to(25).annotate(expected="a value less than or equal to 25")), "model": _S.String.annotate(description="Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model."), "name": _b.check(_b.check(_b.check(_S.String.annotate(description="Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(64).annotate(expected="a value with a length of at most 64")), _b.js_pattern('^[a-zA-Z0-9 _-]+\\Z', '^[a-zA-Z0-9 _-]+$').annotate(expected="a string matching the RegExp ^[a-zA-Z0-9 _-]+$")), "reasoning": AdvisorReasoning, "stream": _S.Boolean.annotate(description="When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final tool result). When false or omitted, the advice arrives only as the final result."), "temperature": _b.check(_S.Number.annotate(description="Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies.", format="double"), _S.is_finite().annotate(expected="a finite number")), "tools": Arrays_}, optional=("forward_transcript", "instructions", "max_completion_tokens", "max_tool_calls", "model", "name", "reasoning", "stream", "temperature", "tools",)).annotate(description="Configuration for one openrouter:advisor server tool entry.", identifier="AdvisorServerToolConfig")
|
|
710
|
+
AnthropicBashCodeExecutionContent: _S.Bottom[_T.AnthropicBashCodeExecutionContent, _t.Any] = _b.union(AnthropicBashCodeExecutionToolResultError, AnthropicBashCodeExecutionResult, mode="one_of").annotate(identifier="AnthropicBashCodeExecutionContent")
|
|
711
|
+
AnthropicTextBlockParam: _StructSchema[_T.AnthropicTextBlockParam, _t.Never, _t.Never] = _b.struct(_T.AnthropicTextBlockParam, {"cache_control": AnthropicCacheControlDirective, "citations": _b.union(_b.array(_b.union(AnthropicCitationCharLocationParam, AnthropicCitationPageLocationParam, AnthropicCitationContentBlockLocationParam, AnthropicCitationWebSearchResultLocationParam, AnthropicCitationSearchResultLocationParam, mode="one_of")), _S.Null), "text": _S.String, "type": _b.literal("text")}, optional=("cache_control", "citations",)).annotate(identifier="AnthropicTextBlockParam")
|
|
712
|
+
AnthropicToolSearchToolBm25: _StructSchema[_T.AnthropicToolSearchToolBm25, _t.Never, _t.Never] = _b.struct(_T.AnthropicToolSearchToolBm25, {"allowed_callers": AnthropicAllowedCallers, "cache_control": AnthropicCacheControlDirective, "defer_loading": _S.Boolean, "name": _b.literal("tool_search_tool_bm25"), "strict": _S.Boolean, "type": _b.literals(["tool_search_tool_bm25_20251119", "tool_search_tool_bm25"])}, optional=("allowed_callers", "cache_control", "defer_loading", "strict",)).annotate(identifier="AnthropicToolSearchToolBm25")
|
|
713
|
+
AnthropicToolSearchToolRegex: _StructSchema[_T.AnthropicToolSearchToolRegex, _t.Never, _t.Never] = _b.struct(_T.AnthropicToolSearchToolRegex, {"allowed_callers": AnthropicAllowedCallers, "cache_control": AnthropicCacheControlDirective, "defer_loading": _S.Boolean, "name": _b.literal("tool_search_tool_regex"), "strict": _S.Boolean, "type": _b.literals(["tool_search_tool_regex_20251119", "tool_search_tool_regex"])}, optional=("allowed_callers", "cache_control", "defer_loading", "strict",)).annotate(identifier="AnthropicToolSearchToolRegex")
|
|
714
|
+
FusionServerToolConfig: _StructSchema[_T.FusionServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.FusionServerToolConfig, {"analysis_models": Arrays_6, "cache_control": AnthropicCacheControlDirective, "max_completion_tokens": _b.check(_S.Number.annotate(description="Maximum number of output tokens (including reasoning tokens) each panelist and the judge model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, panelists default to 32000 and the judge to 20000."), _S.is_int().annotate(expected="an integer")), "max_tool_calls": _b.check(_b.check(_b.check(_S.Number.annotate(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."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1")), _S.is_less_than_or_equal_to(16).annotate(expected="a value less than or equal to 16")), "model": _S.String.annotate(description="Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request."), "reasoning": Objects_9, "temperature": _b.check(_S.Number.annotate(description="Temperature forwarded to panelist inner calls. The judge always runs at temperature 0 regardless of this value. When omitted, the provider's default applies.", format="double"), _S.is_finite().annotate(expected="a finite number")), "tools": Arrays_7}, optional=("analysis_models", "cache_control", "max_completion_tokens", "max_tool_calls", "model", "reasoning", "temperature", "tools",)).annotate(description="Configuration for the openrouter:fusion server tool.", identifier="FusionServerToolConfig")
|
|
715
|
+
AnthropicUsage: _StructSchema[_T.AnthropicUsage, _t.Never, _t.Never] = _b.struct(_T.AnthropicUsage, {"cache_creation": AnthropicCacheCreation, "cache_creation_input_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "cache_read_input_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "inference_geo": _b.union(_S.String, _S.Null), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens_details": AnthropicOutputTokensDetails, "server_tool_use": AnthropicServerToolUsage, "service_tier": AnthropicServiceTier}).annotate(identifier="AnthropicUsage")
|
|
716
|
+
AnthropicDocumentBlock: _StructSchema[_T.AnthropicDocumentBlock, _t.Never, _t.Never] = _b.struct(_T.AnthropicDocumentBlock, {"citations": AnthropicCitationsConfig, "source": _b.union(AnthropicBase64PdfSource, AnthropicPlainTextSource), "title": _b.union(_S.String, _S.Null), "type": _b.literal("document")}, optional=("citations",)).annotate(identifier="AnthropicDocumentBlock")
|
|
717
|
+
AnthropicTextBlock: _StructSchema[_T.AnthropicTextBlock, _t.Never, _t.Never] = _b.struct(_T.AnthropicTextBlock, {"citations": _b.union(_b.array(AnthropicTextCitation), _S.Null), "text": _S.String, "type": _b.literal("text")}).annotate(identifier="AnthropicTextBlock")
|
|
718
|
+
AnthropicToolUseBlock: _StructSchema[_T.AnthropicToolUseBlock, _t.Never, _t.Never] = _b.struct(_T.AnthropicToolUseBlock, {"caller": AnthropicCaller, "id": _S.String, "input": _S.Json.annotate(expected="JSON value"), "name": _S.String, "type": _b.literal("tool_use")}, optional=("input",)).annotate(identifier="AnthropicToolUseBlock")
|
|
719
|
+
AnthropicWebSearchToolResult: _StructSchema[_T.AnthropicWebSearchToolResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicWebSearchToolResult, {"caller": AnthropicCaller, "content": _b.union(_b.array(AnthropicWebSearchResult), AnthropicWebSearchToolResultError), "tool_use_id": _S.String, "type": _b.literal("web_search_tool_result")}).annotate(identifier="AnthropicWebSearchToolResult")
|
|
720
|
+
ORAnthropicServerToolUseBlock: _StructSchema[_T.ORAnthropicServerToolUseBlock, _t.Never, _t.Never] = _b.struct(_T.ORAnthropicServerToolUseBlock, {"caller": ORAnthropicNullableCaller, "id": _S.String, "input": _S.Json.annotate(expected="JSON value"), "name": _S.String, "type": _b.literal("server_tool_use")}, optional=("caller", "input",)).annotate(identifier="ORAnthropicServerToolUseBlock")
|
|
721
|
+
AnthropicImageBlockParam: _StructSchema[_T.AnthropicImageBlockParam, _t.Never, _t.Never] = _b.struct(_T.AnthropicImageBlockParam, {"cache_control": AnthropicCacheControlDirective, "source": _b.union(AnthropicBase64ImageSource, AnthropicUrlImageSource, mode="one_of"), "type": _b.literal("image")}, optional=("cache_control",)).annotate(identifier="AnthropicImageBlockParam")
|
|
722
|
+
AnthropicAdvisorMessageUsageIteration: _StructSchema[_T.AnthropicAdvisorMessageUsageIteration, _t.Never, _t.Never] = _b.struct(_T.AnthropicAdvisorMessageUsageIteration, {"cache_creation": AnthropicIterationCacheCreation, "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "type": _b.literal("advisor_message")}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)).annotate(identifier="AnthropicAdvisorMessageUsageIteration")
|
|
723
|
+
AnthropicBaseUsageIteration: _StructSchema[_T.AnthropicBaseUsageIteration, _t.Never, _t.Never] = _b.struct(_T.AnthropicBaseUsageIteration, {"cache_creation": AnthropicIterationCacheCreation, "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)).annotate(identifier="AnthropicBaseUsageIteration")
|
|
724
|
+
AnthropicCompactionUsageIteration: _StructSchema[_T.AnthropicCompactionUsageIteration, _t.Never, _t.Never] = _b.struct(_T.AnthropicCompactionUsageIteration, {"cache_creation": AnthropicIterationCacheCreation, "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("compaction")}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)).annotate(identifier="AnthropicCompactionUsageIteration")
|
|
725
|
+
AnthropicMessageUsageIteration: _StructSchema[_T.AnthropicMessageUsageIteration, _t.Never, _t.Never] = _b.struct(_T.AnthropicMessageUsageIteration, {"cache_creation": AnthropicIterationCacheCreation, "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "type": _b.literal("message")}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens", "model",)).annotate(identifier="AnthropicMessageUsageIteration")
|
|
726
|
+
AnthropicUnknownUsageIteration: _StructSchema[_T.AnthropicUnknownUsageIteration, _t.Never, _t.Never] = _b.struct(_T.AnthropicUnknownUsageIteration, {"cache_creation": AnthropicIterationCacheCreation, "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.String}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)).annotate(identifier="AnthropicUnknownUsageIteration")
|
|
727
|
+
AnthropicCodeExecutionContent: _S.Bottom[_T.AnthropicCodeExecutionContent, _t.Any] = _b.union(AnthropicCodeExecutionToolResultError, AnthropicCodeExecutionResult, AnthropicEncryptedCodeExecutionResult, mode="one_of").annotate(identifier="AnthropicCodeExecutionContent")
|
|
728
|
+
AnthropicTextEditorCodeExecutionToolResult: _StructSchema[_T.AnthropicTextEditorCodeExecutionToolResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicTextEditorCodeExecutionToolResult, {"content": AnthropicTextEditorCodeExecutionContent, "tool_use_id": _S.String, "type": _b.literal("text_editor_code_execution_tool_result")}).annotate(identifier="AnthropicTextEditorCodeExecutionToolResult")
|
|
729
|
+
AnthropicToolSearchContent: _S.Bottom[_T.AnthropicToolSearchContent, _t.Any] = _b.union(AnthropicToolSearchResultError, AnthropicToolSearchResult, mode="one_of").annotate(identifier="AnthropicToolSearchContent")
|
|
730
|
+
MessagesErrorResponse: _StructSchema[_T.MessagesErrorResponse, _t.Never, _t.Never] = _b.struct(_T.MessagesErrorResponse, {"error": MessagesErrorDetail, "type": _b.literal("error")}).annotate(identifier="MessagesErrorResponse")
|
|
731
|
+
ApplyPatchServerTool_OpenRouter: _StructSchema[_T.ApplyPatchServerTool_OpenRouter, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchServerTool_OpenRouter, {"parameters": ApplyPatchServerToolConfig, "type": _b.literal("openrouter:apply_patch")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API.", identifier="ApplyPatchServerTool_OpenRouter")
|
|
732
|
+
ApplyPatchCallItem: _StructSchema[_T.ApplyPatchCallItem, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchCallItem, {"call_id": _S.String, "id": _b.union(_S.String, _S.Null), "operation": ApplyPatchCallOperation, "status": ApplyPatchCallStatus, "type": _b.literal("apply_patch_call")}, optional=("id",)).annotate(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.", identifier="ApplyPatchCallItem")
|
|
733
|
+
OutputApplyPatchCallItem: _StructSchema[_T.OutputApplyPatchCallItem, _t.Never, _t.Never] = _b.struct(_T.OutputApplyPatchCallItem, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": ApplyPatchCallStatus, "type": _b.literal("apply_patch_call")}).annotate(description="A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand.", identifier="OutputApplyPatchCallItem")
|
|
734
|
+
OutputApplyPatchServerToolItem: _StructSchema[_T.OutputApplyPatchServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputApplyPatchServerToolItem, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": ToolCallStatus, "type": _b.literal("openrouter:apply_patch")}, optional=("call_id", "id", "operation",)).annotate(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.", identifier="OutputApplyPatchServerToolItem")
|
|
735
|
+
CreateBYOKKeyResponse: _StructSchema[_T.CreateBYOKKeyResponse, _t.Never, _t.Never] = _b.struct(_T.CreateBYOKKeyResponse, {"data": _b.suspend(lambda: BYOKKey).annotate(description="The created BYOK credential.")}).annotate(identifier="CreateBYOKKeyResponse")
|
|
736
|
+
GetBYOKKeyResponse: _StructSchema[_T.GetBYOKKeyResponse, _t.Never, _t.Never] = _b.struct(_T.GetBYOKKeyResponse, {"data": _b.suspend(lambda: BYOKKey).annotate(description="The BYOK credential.")}).annotate(identifier="GetBYOKKeyResponse")
|
|
737
|
+
ListBYOKKeysResponse: _StructSchema[_T.ListBYOKKeysResponse, _t.Never, _t.Never] = _b.struct(_T.ListBYOKKeysResponse, {"data": _b.array(BYOKKey).annotate(description="List of BYOK credentials."), "total_count": _b.check(_S.Number.annotate(description="Total number of BYOK credentials matching the filters."), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="ListBYOKKeysResponse")
|
|
738
|
+
UpdateBYOKKeyResponse: _StructSchema[_T.UpdateBYOKKeyResponse, _t.Never, _t.Never] = _b.struct(_T.UpdateBYOKKeyResponse, {"data": _b.suspend(lambda: BYOKKey).annotate(description="The updated BYOK credential.")}).annotate(identifier="UpdateBYOKKeyResponse")
|
|
739
|
+
ChatTokenLogprobs: _S.Bottom[_T.ChatTokenLogprobs, _t.Any] = _b.union(Objects_7, _S.Null).annotate(description="Log probabilities for the completion", identifier="ChatTokenLogprobs")
|
|
740
|
+
BashServerToolConfig: _StructSchema[_T.BashServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.BashServerToolConfig, {"engine": BashServerToolEngine, "environment": BashServerToolEnvironment, "sleep_after_seconds": SandboxSleepAfterSeconds}, optional=("engine", "environment", "sleep_after_seconds",)).annotate(description="Configuration for the openrouter:bash server tool", identifier="BashServerToolConfig")
|
|
741
|
+
ShellServerToolConfig: _StructSchema[_T.ShellServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.ShellServerToolConfig, {"engine": ShellServerToolEngine, "environment": ShellServerToolEnvironment, "sleep_after_seconds": SandboxSleepAfterSeconds}, optional=("engine", "environment", "sleep_after_seconds",)).annotate(description="Configuration for the openrouter:shell server tool", identifier="ShellServerToolConfig")
|
|
742
|
+
ModelBenchmarks: _StructSchema[_T.ModelBenchmarks, _t.Never, _t.Never] = _b.struct(_T.ModelBenchmarks, {"artificial_analysis": AABenchmarkEntry, "design_arena": Arrays_9}, optional=("artificial_analysis",)).annotate(description="Third-party benchmark rankings for this model. Omitted when no benchmark data is available.", identifier="ModelBenchmarks")
|
|
743
|
+
TextConfig: _StructSchema[_T.TextConfig, _t.Never, _t.Never] = _b.struct(_T.TextConfig, {"format": Formats, "verbosity": _b.union(_b.literal("high"), _b.literal("low"), _b.literal("medium"), _S.Null)}, optional=("format", "verbosity",)).annotate(description="Text output configuration including format and verbosity", identifier="TextConfig")
|
|
744
|
+
TextExtendedConfig: _StructSchema[_T.TextExtendedConfig, _t.Never, _t.Never] = _b.struct(_T.TextExtendedConfig, {"format": Formats, "verbosity": _b.union(_b.literal("high"), _b.literal("low"), _b.literal("medium"), _b.union(_S.Null))}, optional=("format", "verbosity",)).annotate(description="Text output configuration including format and verbosity", identifier="TextExtendedConfig")
|
|
745
|
+
FusionCallAnalysisCompletedEvent: _StructSchema[_T.FusionCallAnalysisCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.FusionCallAnalysisCompletedEvent, {"analysis": FusionAnalysisResult, "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.fusion_call.analysis.completed")}).annotate(description="Emitted when the fusion judge completes with the structured analysis.", identifier="FusionCallAnalysisCompletedEvent")
|
|
746
|
+
OutputFusionServerToolItem: _StructSchema[_T.OutputFusionServerToolItem, _t.Never, _t.Never] = _b.struct(_T.OutputFusionServerToolItem, {"analysis": FusionAnalysisResult, "error": _S.String.annotate(description="Error message when the fusion run did not produce an analysis result."), "failed_models": _b.array(_b.struct(_T.OutputFusionServerToolItem__failed_models__item, {"error": _S.String.annotate(description="Error message describing why the model failed."), "model": _S.String.annotate(description="Slug of the analysis model that failed."), "status_code": _b.check(_S.Number.annotate(description="HTTP status code from the upstream response, when available (e.g. 402, 429)."), _S.is_int().annotate(expected="an integer"))}, optional=("status_code",))).annotate(description="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."), "failure_reason": _S.String.annotate(description="Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."), "id": _S.String, "responses": _b.array(_b.struct(_T.OutputFusionServerToolItem__responses__item, {"content": _S.String, "model": _S.String}, optional=("content",))).annotate(description="Analysis models that produced a response in this fusion run, with each model's full panel content."), "sources": _b.array(FusionSource).annotate(description="Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source."), "status": ToolCallStatus, "type": _b.literal("openrouter:fusion")}, optional=("analysis", "error", "failed_models", "failure_reason", "id", "responses", "sources",)).annotate(description="An openrouter:fusion server tool output item", identifier="OutputFusionServerToolItem")
|
|
747
|
+
ImageModelListItem: _StructSchema[_T.ImageModelListItem, _t.Never, _t.Never] = _b.struct(_T.ImageModelListItem, {"architecture": ImageModelArchitecture, "created": _b.check(_S.Number.annotate(description="Unix timestamp (seconds) of when the model was created"), _S.is_int().annotate(expected="an integer")), "description": _S.String, "endpoints": _S.String.annotate(description="Relative URL to the full per-endpoint records for this model"), "id": _S.String.annotate(description="Model slug"), "name": _S.String.annotate(description="Display name"), "supported_parameters": SupportedParameters, "supports_streaming": _S.Boolean.annotate(description="Whether any endpoint of this model supports native SSE streaming on the dedicated Image API (i.e. `stream: true` in the request). OR across endpoints.")}).annotate(description="A single image model in the discovery listing.", identifier="ImageModelListItem")
|
|
748
|
+
ObservabilityArizeDestination: _StructSchema[_T.ObservabilityArizeDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityArizeDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityArizeDestination__config, {"apiKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "baseUrl": _S.String, "headers": _b.struct(_T.ObservabilityArizeDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "modelId": _b.check(_S.String.annotate(description="The name of the tracing project in Arize AX"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "spaceKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("baseUrl", "headers",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("arize"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityArizeDestination")
|
|
749
|
+
ObservabilityBraintrustDestination: _StructSchema[_T.ObservabilityBraintrustDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityBraintrustDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityBraintrustDestination__config, {"apiKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "baseUrl": _S.String, "headers": _b.struct(_T.ObservabilityBraintrustDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "projectId": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("baseUrl", "headers",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("braintrust"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityBraintrustDestination")
|
|
750
|
+
ObservabilityClickhouseDestination: _StructSchema[_T.ObservabilityClickhouseDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityClickhouseDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityClickhouseDestination__config, {"database": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "headers": _b.struct(_T.ObservabilityClickhouseDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "host": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "password": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "table": _S.String, "username": _b.check(_S.String.annotate(description="If you have not set a specific username in ClickHouse, simply type in 'default' below."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("headers", "table",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("clickhouse"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityClickhouseDestination")
|
|
751
|
+
ObservabilityDatadogDestination: _StructSchema[_T.ObservabilityDatadogDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityDatadogDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityDatadogDestination__config, {"apiKey": _b.check(_S.String.annotate(description="Datadog API key must have LLM Observability permissions. Create at: "), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "headers": _b.struct(_T.ObservabilityDatadogDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "mlApp": _b.check(_S.String.annotate(description="Name to identify your application in Datadog LLM Observability"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "url": _S.String.annotate(description="Datadog API URL for your region (e.g., https://api.datadoghq.com, https://api.us3.datadoghq.com, https://api.datadoghq.eu)")}, optional=("headers", "url",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("datadog"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityDatadogDestination")
|
|
752
|
+
ObservabilityGrafanaDestination: _StructSchema[_T.ObservabilityGrafanaDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityGrafanaDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityGrafanaDestination__config, {"apiKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "baseUrl": _S.String, "headers": _b.struct(_T.ObservabilityGrafanaDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "instanceId": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("baseUrl", "headers",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("grafana"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityGrafanaDestination")
|
|
753
|
+
ObservabilityLangfuseDestination: _StructSchema[_T.ObservabilityLangfuseDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityLangfuseDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityLangfuseDestination__config, {"baseUrl": _S.String, "headers": _b.struct(_T.ObservabilityLangfuseDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "publicKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "secretKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("baseUrl", "headers",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("langfuse"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityLangfuseDestination")
|
|
754
|
+
ObservabilityLangsmithDestination: _StructSchema[_T.ObservabilityLangsmithDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityLangsmithDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityLangsmithDestination__config, {"apiKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "endpoint": _S.String, "headers": _b.struct(_T.ObservabilityLangsmithDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "project": _b.check(_S.String.annotate(description="The name for this project, such as pr-openrouter-demo. Defaults to \"main\" if not set."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "workspaceId": _S.String.annotate(description="Required for org-scoped API keys. Find this in your LangSmith workspace settings.")}, optional=("endpoint", "headers", "project", "workspaceId",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("langsmith"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityLangsmithDestination")
|
|
755
|
+
ObservabilityNewrelicDestination: _StructSchema[_T.ObservabilityNewrelicDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityNewrelicDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityNewrelicDestination__config, {"headers": _b.struct(_T.ObservabilityNewrelicDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "licenseKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "region": _b.literals(["us", "eu"])}, optional=("headers", "region",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("newrelic"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityNewrelicDestination")
|
|
756
|
+
ObservabilityOpikDestination: _StructSchema[_T.ObservabilityOpikDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityOpikDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityOpikDestination__config, {"apiKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "headers": _b.struct(_T.ObservabilityOpikDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "projectName": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "workspace": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("headers",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("opik"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityOpikDestination")
|
|
757
|
+
ObservabilityOtelCollectorDestination: _StructSchema[_T.ObservabilityOtelCollectorDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityOtelCollectorDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityOtelCollectorDestination__config, {"endpoint": _S.String, "headers": _b.struct(_T.ObservabilityOtelCollectorDestination__config__headers, {}).annotate(description="Custom HTTP headers as a JSON object. For Axiom, use {\"Authorization\": \"Bearer xaat-xxx\", \"X-Axiom-Dataset\": \"your-dataset\"}")}, optional=("headers",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("otel-collector"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityOtelCollectorDestination")
|
|
758
|
+
ObservabilityPosthogDestination: _StructSchema[_T.ObservabilityPosthogDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityPosthogDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityPosthogDestination__config, {"apiKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "endpoint": _S.String, "headers": _b.struct(_T.ObservabilityPosthogDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination.")}, optional=("endpoint", "headers",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("posthog"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityPosthogDestination")
|
|
759
|
+
ObservabilityRampDestination: _StructSchema[_T.ObservabilityRampDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityRampDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityRampDestination__config, {"apiKey": _b.check(_S.String.annotate(description="Generate this in your Ramp integration settings."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "baseUrl": _S.String, "headers": _b.struct(_T.ObservabilityRampDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to Ramp.")}, optional=("baseUrl", "headers",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("ramp"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityRampDestination")
|
|
760
|
+
ObservabilityS3Destination: _StructSchema[_T.ObservabilityS3Destination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityS3Destination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityS3Destination__config, {"accessKeyId": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "bucketName": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "endpoint": _S.String.annotate(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"), "headers": _b.struct(_T.ObservabilityS3Destination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "pathTemplate": _S.String.annotate(description="Template for S3 object path. The filename ({traceId}-{timestamp}.json) is automatically appended. Available variables: {prefix}, {date}, {year}, {month}, {day}, {apiKeyName}"), "prefix": _S.String, "region": _S.String, "secretAccessKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "sessionToken": _S.String}, optional=("endpoint", "headers", "pathTemplate", "prefix", "region", "sessionToken",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("s3"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityS3Destination")
|
|
761
|
+
ObservabilitySentryDestination: _StructSchema[_T.ObservabilitySentryDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilitySentryDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilitySentryDestination__config, {"dsn": _b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _b.js_pattern('^https:\\/\\/([^:@]+)(?::[^@]*)?@([^/]+)(?:\\/[^/]+)*\\/([0-9]+)\\/?\\Z', '^https:\\/\\/([^:@]+)(?::[^@]*)?@([^/]+)(?:\\/[^/]+)*\\/(\\d+)\\/?$').annotate(expected="a string matching the RegExp ^https:\\/\\/([^:@]+)(?::[^@]*)?@([^/]+)(?:\\/[^/]+)*\\/(\\d+)\\/?$")), "headers": _b.struct(_T.ObservabilitySentryDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "otlpEndpoint": _S.String}, optional=("headers",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("sentry"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilitySentryDestination")
|
|
762
|
+
ObservabilitySnowflakeDestination: _StructSchema[_T.ObservabilitySnowflakeDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilitySnowflakeDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilitySnowflakeDestination__config, {"account": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "database": _S.String, "headers": _b.struct(_T.ObservabilitySnowflakeDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "schema": _S.String, "table": _S.String, "token": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "warehouse": _S.String}, optional=("database", "headers", "schema", "table", "warehouse",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("snowflake"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilitySnowflakeDestination")
|
|
763
|
+
ObservabilityWeaveDestination: _StructSchema[_T.ObservabilityWeaveDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityWeaveDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityWeaveDestination__config, {"apiKey": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "baseUrl": _S.String, "entity": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "headers": _b.struct(_T.ObservabilityWeaveDestination__config__headers, {}).annotate(description="Custom HTTP headers to include in requests to this destination."), "project": _b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("baseUrl", "headers",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("weave"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityWeaveDestination")
|
|
764
|
+
ObservabilityWebhookDestination: _StructSchema[_T.ObservabilityWebhookDestination, _t.Never, _t.Never] = _b.struct(_T.ObservabilityWebhookDestination, {"api_key_hashes": _b.union(_b.array(_S.String), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."), "config": _b.struct(_T.ObservabilityWebhookDestination__config, {"headers": _b.struct(_T.ObservabilityWebhookDestination__config__headers, {}), "method": _b.literals(["POST", "PUT"]), "url": _S.String}, optional=("headers", "method",)), "created_at": _S.String.annotate(description="ISO timestamp of when the destination was created."), "enabled": _S.Boolean.annotate(description="Whether this destination is currently enabled."), "filter_rules": ObservabilityFilterRulesConfig, "id": _S.String.annotate(description="Stable public identifier for this destination.", format="uuid"), "name": _b.union(_S.String, _S.Null).annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded to this destination — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literal("webhook"), "updated_at": _S.String.annotate(description="ISO timestamp of when the destination was last updated."), "workspace_id": _S.String.annotate(description="ID of the workspace this destination belongs to.", format="uuid")}).annotate(identifier="ObservabilityWebhookDestination")
|
|
765
|
+
ObservabilityFilterRulesConfigNullable: _S.Bottom[_T.ObservabilityFilterRulesConfigNullable, _t.Any] = _b.union(Objects_10, _S.Null).annotate(description="Optional structured filter rules controlling which events are forwarded.", identifier="ObservabilityFilterRulesConfigNullable")
|
|
766
|
+
BaseTextDeltaEvent: _StructSchema[_T.BaseTextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BaseTextDeltaEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "delta": _S.String, "item_id": _S.String, "logprobs": _b.array(OpenResponsesLogProbs), "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.output_text.delta")}).annotate(description="Event emitted when a text delta is streamed", identifier="BaseTextDeltaEvent")
|
|
767
|
+
BaseTextDoneEvent: _StructSchema[_T.BaseTextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BaseTextDoneEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "logprobs": _b.array(OpenResponsesLogProbs), "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "text": _S.String, "type": _b.literal("response.output_text.done")}).annotate(description="Event emitted when text streaming is complete", identifier="BaseTextDoneEvent")
|
|
768
|
+
FileParserPlugin: _StructSchema[_T.FileParserPlugin, _t.Never, _t.Never] = _b.struct(_T.FileParserPlugin, {"enabled": _S.Boolean.annotate(description="Set to false to disable the file-parser plugin for this request. Defaults to true."), "id": _b.literal("file-parser"), "pdf": PDFParserOptions}, optional=("enabled", "pdf",)).annotate(identifier="FileParserPlugin")
|
|
769
|
+
Objects_148: _StructSchema[_T.Objects_148, _t.Never, _t.Never] = _b.struct(_T.Objects_148, {"allow_fallbacks": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to allow backup providers to serve requests\n- true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider.\n- false: use only the primary/custom provider, and return the upstream error if it's unavailable.\n"), "data_collection": _b.union(_b.literal("deny"), _b.literal("allow"), _S.Null).annotate(description="Data collection setting. If no available model provider meets the requirement, your request will return an error.\n- allow: (default) allow providers which store user data non-transiently and may train on it\n\n- deny: use only providers which do not collect user data."), "enforce_distillable_text": _b.union(_S.Boolean, _S.Null).annotate(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."), "ignore": _b.union(_b.array(_b.union(ProviderName, _S.String)), _S.Null).annotate(description="List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."), "max_price": _b.struct(_T.Objects_148__max_price, {"audio": _S.String.annotate(description="Maximum price in USD per audio unit"), "completion": _S.String.annotate(description="Maximum price in USD per million completion tokens"), "image": _S.String.annotate(description="Maximum price in USD per image"), "prompt": _S.String.annotate(description="Maximum price in USD per million prompt tokens"), "request": _S.String.annotate(description="Maximum price in USD per request")}, optional=("audio", "completion", "image", "prompt", "request",)).annotate(description="The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."), "only": _b.union(_b.array(_b.union(ProviderName, _S.String)), _S.Null).annotate(description="List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."), "order": _b.union(_b.array(_b.union(ProviderName, _S.String)), _S.Null).annotate(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."), "preferred_max_latency": PreferredMaxLatency, "preferred_min_throughput": PreferredMinThroughput, "quantizations": _b.union(_b.array(Quantization), _S.Null).annotate(description="A list of quantization levels to filter the provider by."), "require_parameters": _b.union(_S.Boolean, _S.Null).annotate(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."), "sort": _b.union(ProviderSort, ProviderSortConfig, _S.Null).annotate(description="The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."), "zdr": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.")}, optional=("allow_fallbacks", "data_collection", "enforce_distillable_text", "ignore", "max_price", "only", "order", "preferred_max_latency", "preferred_min_throughput", "quantizations", "require_parameters", "sort", "zdr",))
|
|
770
|
+
Arrays_11: _S.Bottom[_T.Arrays_11, _t.Any] = _b.array(PipelineStage)
|
|
771
|
+
Prediction: _S.Bottom[_T.Prediction, _t.Any] = _b.union(Objects_17, _S.Null).annotate(description="Static predicted output content. Supported models can use this to reduce latency when much of the response is known in advance.", identifier="Prediction")
|
|
772
|
+
ListPresetsResponse: _StructSchema[_T.ListPresetsResponse, _t.Never, _t.Never] = _b.struct(_T.ListPresetsResponse, {"data": _b.array(Preset), "total_count": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(description="A paginated list of presets.", identifier="ListPresetsResponse")
|
|
773
|
+
CreatePresetFromInferenceResponse: _StructSchema[_T.CreatePresetFromInferenceResponse, _t.Never, _t.Never] = _b.struct(_T.CreatePresetFromInferenceResponse, {"data": PresetWithDesignatedVersion}).annotate(description="Response containing the created preset with its designated version.", identifier="CreatePresetFromInferenceResponse")
|
|
774
|
+
GetPresetResponse: _StructSchema[_T.GetPresetResponse, _t.Never, _t.Never] = _b.struct(_T.GetPresetResponse, {"data": PresetWithDesignatedVersion}).annotate(description="A preset with its currently designated version.", identifier="GetPresetResponse")
|
|
775
|
+
ChatContentText: _StructSchema[_T.ChatContentText, _t.Never, _t.Never] = _b.struct(_T.ChatContentText, {"cache_control": ChatContentCacheControl, "prompt_cache_breakpoint": PromptCacheBreakpoint, "text": _S.String, "type": _b.literal("text")}, optional=("cache_control", "prompt_cache_breakpoint",)).annotate(description="Text content part", identifier="ChatContentText")
|
|
776
|
+
CustomToolCallOutputItem: _StructSchema[_T.CustomToolCallOutputItem, _t.Never, _t.Never] = _b.struct(_T.CustomToolCallOutputItem, {"call_id": _S.String, "id": _S.String, "output": _b.union(_b.union(_S.String), _b.union(_b.array(_b.union(_b.union(_b.struct(_T.CustomToolCallOutputItem__output__1__0__item__0__0, {"prompt_cache_breakpoint": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.CustomToolCallOutputItem__output__1__0__item__0__0__prompt_cache_breakpoint__0__0, {"mode": _b.literal("explicit")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))).annotate(description="Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically."), _b.union(_S.Null).annotate(description="Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically.")).annotate(description="Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically."), "text": _S.String, "type": _b.literal("input_text")}, optional=("prompt_cache_breakpoint",)).annotate(description="Text input content item"), _b.struct(_T.CustomToolCallOutputItem__output__1__0__item__0__1, {"detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null), "type": _S.Never, "prompt_cache_breakpoint": PromptCacheBreakpoint, "text": _S.String}, optional=("image_url", "prompt_cache_breakpoint",)).annotate(description="Text input content item"), _b.struct(_T.CustomToolCallOutputItem__output__1__0__item__0__2, {"file_data": _S.String, "file_id": _b.union(_S.String, _S.Null), "file_url": _S.String, "filename": _S.String, "type": _S.Never, "prompt_cache_breakpoint": PromptCacheBreakpoint, "text": _S.String}, optional=("file_data", "file_id", "file_url", "filename", "prompt_cache_breakpoint",)).annotate(description="Text input content item"), mode="one_of"), _b.union(_b.struct(_T.CustomToolCallOutputItem__output__1__0__item__1__0, {"prompt_cache_breakpoint": PromptCacheBreakpoint, "text": _S.String, "type": _S.Never, "detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null)}, optional=("prompt_cache_breakpoint", "image_url",)).annotate(description="Image input content item"), _b.struct(_T.CustomToolCallOutputItem__output__1__0__item__1__1, {"detail": _b.union(_b.literal("auto"), _b.literal("high"), _b.literal("low"), _b.literal("original")), "image_url": _b.union(_b.union(_S.String), _b.union(_S.Null)), "type": _b.literal("input_image")}, optional=("image_url",)).annotate(description="Image input content item"), _b.struct(_T.CustomToolCallOutputItem__output__1__0__item__1__2, {"file_data": _S.String, "file_id": _b.union(_S.String, _S.Null), "file_url": _S.String, "filename": _S.String, "type": _S.Never, "detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null)}, optional=("file_data", "file_id", "file_url", "filename", "image_url",)).annotate(description="Image input content item"), mode="one_of"), _b.union(_b.struct(_T.CustomToolCallOutputItem__output__1__0__item__2__0, {"prompt_cache_breakpoint": PromptCacheBreakpoint, "text": _S.String, "type": _S.Never, "file_data": _S.String, "file_id": _b.union(_S.String, _S.Null), "file_url": _S.String, "filename": _S.String}, optional=("prompt_cache_breakpoint", "file_data", "file_id", "file_url", "filename",)).annotate(description="File input content item"), _b.struct(_T.CustomToolCallOutputItem__output__1__0__item__2__1, {"detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null), "type": _S.Never, "file_data": _S.String, "file_id": _b.union(_S.String, _S.Null), "file_url": _S.String, "filename": _S.String}, optional=("image_url", "file_data", "file_id", "file_url", "filename",)).annotate(description="File input content item"), _b.struct(_T.CustomToolCallOutputItem__output__1__0__item__2__2, {"file_data": _S.String, "file_id": _b.union(_b.union(_S.String), _b.union(_S.Null)), "file_url": _S.String, "filename": _S.String, "type": _b.literal("input_file")}, optional=("file_data", "file_id", "file_url", "filename",)).annotate(description="File input content item"), mode="one_of"), mode="one_of")))), "type": _b.literal("custom_tool_call_output")}, optional=("id",)).annotate(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`.", identifier="CustomToolCallOutputItem")
|
|
777
|
+
FunctionCallOutputItem: _StructSchema[_T.FunctionCallOutputItem, _t.Never, _t.Never] = _b.struct(_T.FunctionCallOutputItem, {"call_id": _S.String, "id": _b.union(_S.String, _S.Null), "output": _b.union(_b.union(_S.String), _b.union(_b.array(_b.union(_b.union(_b.struct(_T.FunctionCallOutputItem__output__1__0__item__0__0, {"prompt_cache_breakpoint": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.FunctionCallOutputItem__output__1__0__item__0__0__prompt_cache_breakpoint__0__0, {"mode": _b.literal("explicit")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))).annotate(description="Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically."), _b.union(_S.Null).annotate(description="Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically.")).annotate(description="Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically."), "text": _S.String, "type": _b.literal("input_text")}, optional=("prompt_cache_breakpoint",)).annotate(description="Text input content item"), _b.struct(_T.FunctionCallOutputItem__output__1__0__item__0__1, {"detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null), "type": _S.Never, "prompt_cache_breakpoint": PromptCacheBreakpoint, "text": _S.String}, optional=("image_url", "prompt_cache_breakpoint",)).annotate(description="Text input content item"), _b.struct(_T.FunctionCallOutputItem__output__1__0__item__0__2, {"file_data": _S.String, "file_id": _b.union(_S.String, _S.Null), "file_url": _S.String, "filename": _S.String, "type": _S.Never, "prompt_cache_breakpoint": PromptCacheBreakpoint, "text": _S.String}, optional=("file_data", "file_id", "file_url", "filename", "prompt_cache_breakpoint",)).annotate(description="Text input content item"), mode="one_of"), _b.union(_b.struct(_T.FunctionCallOutputItem__output__1__0__item__1__0, {"prompt_cache_breakpoint": PromptCacheBreakpoint, "text": _S.String, "type": _S.Never, "detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null)}, optional=("prompt_cache_breakpoint", "image_url",)).annotate(description="Image input content item"), _b.struct(_T.FunctionCallOutputItem__output__1__0__item__1__1, {"detail": _b.union(_b.literal("auto"), _b.literal("high"), _b.literal("low"), _b.literal("original")), "image_url": _b.union(_b.union(_S.String), _b.union(_S.Null)), "type": _b.literal("input_image")}, optional=("image_url",)).annotate(description="Image input content item"), _b.struct(_T.FunctionCallOutputItem__output__1__0__item__1__2, {"file_data": _S.String, "file_id": _b.union(_S.String, _S.Null), "file_url": _S.String, "filename": _S.String, "type": _S.Never, "detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null)}, optional=("file_data", "file_id", "file_url", "filename", "image_url",)).annotate(description="Image input content item"), mode="one_of"), _b.union(_b.struct(_T.FunctionCallOutputItem__output__1__0__item__2__0, {"prompt_cache_breakpoint": PromptCacheBreakpoint, "text": _S.String, "type": _S.Never, "file_data": _S.String, "file_id": _b.union(_S.String, _S.Null), "file_url": _S.String, "filename": _S.String}, optional=("prompt_cache_breakpoint", "file_data", "file_id", "file_url", "filename",)).annotate(description="File input content item"), _b.struct(_T.FunctionCallOutputItem__output__1__0__item__2__1, {"detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null), "type": _S.Never, "file_data": _S.String, "file_id": _b.union(_S.String, _S.Null), "file_url": _S.String, "filename": _S.String}, optional=("image_url", "file_data", "file_id", "file_url", "filename",)).annotate(description="File input content item"), _b.struct(_T.FunctionCallOutputItem__output__1__0__item__2__2, {"file_data": _S.String, "file_id": _b.union(_b.union(_S.String), _b.union(_S.Null)), "file_url": _S.String, "filename": _S.String, "type": _b.literal("input_file")}, optional=("file_data", "file_id", "file_url", "filename",)).annotate(description="File input content item"), mode="one_of"), mode="one_of")))), "status": _b.union(ToolCallStatus, _S.Null), "type": _b.literal("function_call_output")}, optional=("id", "status",)).annotate(description="The output from a function call execution", identifier="FunctionCallOutputItem")
|
|
778
|
+
InputText: _StructSchema[_T.InputText, _t.Never, _t.Never] = _b.struct(_T.InputText, {"prompt_cache_breakpoint": PromptCacheBreakpoint, "text": _S.String, "type": _b.literal("input_text")}, optional=("prompt_cache_breakpoint",)).annotate(description="Text input content item", identifier="InputText")
|
|
779
|
+
Guardrail: _StructSchema[_T.Guardrail, _t.Never, _t.Never] = _b.struct(_T.Guardrail, {"allowed_models": _b.union(_b.array(_S.String), _S.Null).annotate(description="Array of model canonical_slugs (immutable identifiers)"), "allowed_providers": _b.union(_b.array(_S.String), _S.Null).annotate(description="List of allowed provider IDs"), "content_filter_builtins": _b.union(_b.array(ContentFilterBuiltinEntry), _S.Null).annotate(description="Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector."), "content_filters": _b.union(_b.array(ContentFilterEntry), _S.Null).annotate(description="Custom regex content filters applied to request messages"), "created_at": _S.String.annotate(description="ISO 8601 timestamp of when the guardrail was created"), "description": _b.union(_S.String, _S.Null).annotate(description="Description of the guardrail"), "enforce_zdr": _b.union(_S.Boolean, _S.Null).annotate(description="Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, 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": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."), "enforce_zdr_google": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided."), "enforce_zdr_openai": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."), "enforce_zdr_other": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided."), "enforce_zdr_xai": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided."), "id": _S.String.annotate(description="Unique identifier for the guardrail", format="uuid"), "ignored_models": _b.union(_b.array(_S.String), _S.Null).annotate(description="Array of model canonical_slugs to exclude from routing"), "ignored_providers": _b.union(_b.array(_S.String), _S.Null).annotate(description="List of provider IDs to exclude from routing"), "limit_usd": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Spending limit in USD", format="double"), "name": _S.String.annotate(description="Name of the guardrail"), "reset_interval": GuardrailInterval, "updated_at": _b.union(_S.String, _S.Null).annotate(description="ISO 8601 timestamp of when the guardrail was last updated"), "workspace_id": _S.String.annotate(description="The workspace ID this guardrail belongs to.")}, optional=("allowed_models", "allowed_providers", "content_filter_builtins", "content_filters", "description", "enforce_zdr", "enforce_zdr_anthropic", "enforce_zdr_google", "enforce_zdr_openai", "enforce_zdr_other", "enforce_zdr_xai", "ignored_models", "ignored_providers", "limit_usd", "reset_interval", "updated_at",)).annotate(identifier="Guardrail")
|
|
780
|
+
CreateGuardrailRequest: _StructSchema[_T.CreateGuardrailRequest, _t.Never, _t.Never] = _b.struct(_T.CreateGuardrailRequest, {"allowed_models": _b.union(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null).annotate(description="Array of model identifiers (slug or canonical_slug accepted)"), "allowed_providers": _b.union(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null).annotate(description="List of allowed provider IDs"), "content_filter_builtins": _b.union(_b.array(ContentFilterBuiltinEntryInput), _S.Null).annotate(description="Builtin content filters to apply. Every builtin slug supports \"block\", \"redact\", and the detect-only \"flag\" action."), "content_filters": _b.union(_b.array(ContentFilterEntry), _S.Null).annotate(description="Custom regex content filters to apply to request messages"), "description": _b.union(_b.check(_S.String, _S.is_max_length(1000).annotate(expected="a value with a length of at most 1000")), _S.Null).annotate(description="Description of the guardrail"), "enforce_zdr": _b.union(_S.Boolean, _S.Null).annotate(description="Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, 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": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."), "enforce_zdr_google": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided."), "enforce_zdr_openai": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."), "enforce_zdr_other": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided."), "enforce_zdr_xai": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided."), "ignored_models": _b.union(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null).annotate(description="Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"), "ignored_providers": _b.union(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null).annotate(description="List of provider IDs to exclude from routing"), "limit_usd": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Spending limit in USD", format="double"), "name": _b.check(_b.check(_S.String.annotate(description="Name for the new guardrail"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(200).annotate(expected="a value with a length of at most 200")), "reset_interval": GuardrailInterval, "workspace_id": _S.String.annotate(description="The workspace to create the guardrail in. Defaults to the default workspace if not provided.", format="uuid")}, optional=("allowed_models", "allowed_providers", "content_filter_builtins", "content_filters", "description", "enforce_zdr", "enforce_zdr_anthropic", "enforce_zdr_google", "enforce_zdr_openai", "enforce_zdr_other", "enforce_zdr_xai", "ignored_models", "ignored_providers", "limit_usd", "reset_interval", "workspace_id",)).annotate(identifier="CreateGuardrailRequest")
|
|
781
|
+
UpdateGuardrailRequest: _StructSchema[_T.UpdateGuardrailRequest, _t.Never, _t.Never] = _b.struct(_T.UpdateGuardrailRequest, {"allowed_models": _b.union(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null).annotate(description="Array of model identifiers (slug or canonical_slug accepted)"), "allowed_providers": _b.union(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null).annotate(description="New list of allowed provider IDs"), "content_filter_builtins": _b.union(_b.array(ContentFilterBuiltinEntryInput), _S.Null).annotate(description="Builtin content filters to apply. Set to null to remove. Every builtin slug supports \"block\", \"redact\", and the detect-only \"flag\" action."), "content_filters": _b.union(_b.array(ContentFilterEntry), _S.Null).annotate(description="Custom regex content filters to apply. Set to null to remove."), "description": _b.union(_b.check(_S.String, _S.is_max_length(1000).annotate(expected="a value with a length of at most 1000")), _S.Null).annotate(description="New description for the guardrail"), "enforce_zdr": _b.union(_S.Boolean, _S.Null).annotate(description="Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, 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": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."), "enforce_zdr_google": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided."), "enforce_zdr_openai": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."), "enforce_zdr_other": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided."), "enforce_zdr_xai": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided."), "ignored_models": _b.union(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null).annotate(description="Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"), "ignored_providers": _b.union(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null).annotate(description="List of provider IDs to exclude from routing"), "limit_usd": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="New spending limit in USD", format="double"), "name": _b.check(_b.check(_S.String.annotate(description="New name for the guardrail"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(200).annotate(expected="a value with a length of at most 200")), "reset_interval": GuardrailInterval}, optional=("allowed_models", "allowed_providers", "content_filter_builtins", "content_filters", "description", "enforce_zdr", "enforce_zdr_anthropic", "enforce_zdr_google", "enforce_zdr_openai", "enforce_zdr_other", "enforce_zdr_xai", "ignored_models", "ignored_providers", "limit_usd", "name", "reset_interval",)).annotate(identifier="UpdateGuardrailRequest")
|
|
782
|
+
SpeechRequest: _StructSchema[_T.SpeechRequest, _t.Never, _t.Never] = _b.struct(_T.SpeechRequest, {"input": _S.String.annotate(description="Text to synthesize"), "model": _S.String.annotate(description="TTS model identifier"), "provider": _b.struct(_T.SpeechRequest__provider, {"options": ProviderOptions}, optional=("options",)).annotate(description="Provider-specific passthrough configuration"), "response_format": _b.literals(["mp3", "pcm"]).annotate(description="Audio output format"), "speed": _b.check(_S.Number.annotate(description="Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.", format="double"), _S.is_finite().annotate(expected="a finite number")), "voice": _S.String.annotate(description="Voice identifier (provider-specific).")}, optional=("provider", "response_format", "speed",)).annotate(description="Text-to-speech request input", identifier="SpeechRequest")
|
|
783
|
+
STTRequest: _StructSchema[_T.STTRequest, _t.Never, _t.Never] = _b.struct(_T.STTRequest, {"input_audio": STTInputAudio, "language": _S.String.annotate(description="ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted."), "model": _S.String.annotate(description="STT model identifier"), "provider": _b.struct(_T.STTRequest__provider, {"options": ProviderOptions}, optional=("options",)).annotate(description="Provider-specific passthrough configuration"), "response_format": _b.literals(["json", "verbose_json"]).annotate(description="Output format. \"json\" (default) returns { text, usage }. \"verbose_json\" additionally returns task, language, duration, and segment-level timestamps; only supported by OpenAI-compatible providers."), "temperature": _b.check(_S.Number.annotate(description="Sampling temperature for transcription", format="double"), _S.is_finite().annotate(expected="a finite number")), "timestamp_granularities": _b.array(STTTimestampGranularity).annotate(description="Timestamp detail levels to include when response_format is \"verbose_json\". \"segment\" returns segment-level timestamps; \"word\" additionally returns word-level timestamps in the words array. Ignored unless response_format is \"verbose_json\".")}, optional=("language", "provider", "response_format", "temperature", "timestamp_granularities",)).annotate(description="Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio.", identifier="STTRequest")
|
|
784
|
+
VideoGenerationRequest: _StructSchema[_T.VideoGenerationRequest, _t.Never, _t.Never] = _b.struct(_T.VideoGenerationRequest, {"aspect_ratio": _b.literals(["16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9", "9:21"]).annotate(description="Aspect ratio of the generated video"), "callback_url": _S.String.annotate(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.", format="uri"), "duration": _b.check(_b.check(_S.Number.annotate(description="Duration of the generated video in seconds"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1")), "frame_images": _b.array(FrameImage).annotate(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."), "generate_audio": _S.Boolean.annotate(description="Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set."), "input_references": _b.array(InputReference).annotate(description="Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest."), "model": _S.String, "prompt": _S.String.annotate(description="Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models."), "provider": _b.struct(_T.VideoGenerationRequest__provider, {"options": ProviderOptions}, optional=("options",)).annotate(description="Provider-specific passthrough configuration"), "resolution": _b.literals(["480p", "720p", "1080p", "1K", "2K", "4K"]).annotate(description="Resolution of the generated video"), "seed": _b.check(_S.Number.annotate(description="If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers."), _S.is_int().annotate(expected="an integer")), "size": _S.String.annotate(description="Exact pixel dimensions of the generated video in \"WIDTHxHEIGHT\" format (e.g. \"1280x720\"). Interchangeable with resolution + aspect_ratio.")}, optional=("aspect_ratio", "callback_url", "duration", "frame_images", "generate_audio", "input_references", "prompt", "provider", "resolution", "seed", "size",)).annotate(identifier="VideoGenerationRequest")
|
|
785
|
+
ImageGenerationProviderPreferences: _StructSchema[_T.ImageGenerationProviderPreferences, _t.Never, _t.Never] = _b.struct(_T.ImageGenerationProviderPreferences, {"allow_fallbacks": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to allow backup providers to serve requests\n- true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider.\n- false: use only the primary/custom provider, and return the upstream error if it's unavailable.\n"), "ignore": Union_2, "only": Union_3, "options": ProviderOptions, "order": Union_4, "sort": Union_5}, optional=("allow_fallbacks", "ignore", "only", "options", "order", "sort",)).annotate(description="Provider routing preferences and provider-specific passthrough configuration.", identifier="ImageGenerationProviderPreferences")
|
|
786
|
+
ListEndpointsResponse: _StructSchema[_T.ListEndpointsResponse, _t.Never, _t.Never] = _b.struct(_T.ListEndpointsResponse, {"architecture": _b.struct(_T.ListEndpointsResponse__architecture, {"input_modalities": _b.array(_b.union(_b.literal("text"), _b.literal("image"), _b.literal("file"), _b.literal("audio"), _b.literal("video"))).annotate(description="Supported input modalities"), "instruct_type": _b.union(_b.literal("none").annotate(description="Instruction format type"), _b.literal("airoboros").annotate(description="Instruction format type"), _b.literal("alpaca").annotate(description="Instruction format type"), _b.literal("alpaca-modif").annotate(description="Instruction format type"), _b.literal("chatml").annotate(description="Instruction format type"), _b.literal("claude").annotate(description="Instruction format type"), _b.literal("code-llama").annotate(description="Instruction format type"), _b.literal("gemma").annotate(description="Instruction format type"), _b.literal("llama2").annotate(description="Instruction format type"), _b.literal("llama3").annotate(description="Instruction format type"), _b.literal("mistral").annotate(description="Instruction format type"), _b.literal("nemotron").annotate(description="Instruction format type"), _b.literal("neural").annotate(description="Instruction format type"), _b.literal("openchat").annotate(description="Instruction format type"), _b.literal("phi3").annotate(description="Instruction format type"), _b.literal("rwkv").annotate(description="Instruction format type"), _b.literal("vicuna").annotate(description="Instruction format type"), _b.literal("zephyr").annotate(description="Instruction format type"), _b.literal("deepseek-r1").annotate(description="Instruction format type"), _b.literal("deepseek-v3.1").annotate(description="Instruction format type"), _b.literal("qwq").annotate(description="Instruction format type"), _b.literal("qwen3").annotate(description="Instruction format type"), _b.union(_S.Null).annotate(description="Instruction format type")).annotate(description="Instruction format type"), "modality": _b.union(_b.union(_S.String).annotate(description="Primary modality of the model"), _b.union(_S.Null).annotate(description="Primary modality of the model")).annotate(description="Primary modality of the model"), "output_modalities": _b.array(_b.union(_b.literal("text"), _b.literal("image"), _b.literal("embeddings"), _b.literal("audio"), _b.literal("video"), _b.literal("rerank"), _b.literal("speech"), _b.literal("transcription"))).annotate(description="Supported output modalities"), "tokenizer": _b.union(_b.union(_b.literal("Router").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Media").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Other").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("GPT").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Claude").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Gemini").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Gemma").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Grok").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Cohere").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Nova").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Qwen").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Yi").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("DeepSeek").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Mistral").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Llama2").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Llama3").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Llama4").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("PaLM").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("RWKV").annotate(description="Tokenizer type used by the model")), _b.union(_b.literal("Qwen3").annotate(description="Tokenizer type used by the model"))).annotate(description="Tokenizer type used by the model")}).annotate(description="Model architecture information"), "created": _b.check(_S.Number.annotate(description="Unix timestamp of when the model was created"), _S.is_int().annotate(expected="an integer")), "description": _S.String.annotate(description="Description of the model"), "endpoints": _b.array(PublicEndpoint).annotate(description="List of available endpoints for this model"), "id": _S.String.annotate(description="Unique identifier for the model"), "name": _S.String.annotate(description="Display name of the model")}).annotate(description="List of available endpoints for a model", identifier="ListEndpointsResponse")
|
|
787
|
+
ModelReasoning: _StructSchema[_T.ModelReasoning, _t.Never, _t.Never] = _b.struct(_T.ModelReasoning, {"default_effort": _b.suspend(lambda: ReasoningEffort).annotate(description="Default reasoning effort when the client enables reasoning without specifying effort. Maps to `reasoning.effort` in chat requests. When `\"none\"`, prefer omitting effort unless the user explicitly disables reasoning."), "default_enabled": _S.Boolean.annotate(description="Default reasoning enabled state when the client does not set `reasoning.enabled`."), "mandatory": _S.Boolean.annotate(description="When true, reasoning cannot be disabled and effort \"none\" is rejected."), "supported_efforts": Union_12, "supports_max_tokens": _S.Boolean.annotate(description="Present and `true` when the model accepts `reasoning.max_tokens` in requests (Anthropic-style) instead of or in addition to `reasoning.effort`. Omitted otherwise.")}, optional=("default_effort", "default_enabled", "supported_efforts", "supports_max_tokens",)).annotate(description="Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models.", identifier="ModelReasoning")
|
|
788
|
+
ReasoningDetailUnion: _S.Bottom[_T.ReasoningDetailUnion, _t.Any] = _b.union(ReasoningDetailSummary, ReasoningDetailEncrypted, ReasoningDetailText, ReasoningDetailServerToolCall, mode="one_of").annotate(description="Reasoning detail union schema", identifier="ReasoningDetailUnion")
|
|
789
|
+
BaseReasoningConfig: _S.Bottom[_T.BaseReasoningConfig, _t.Any] = _b.union(Objects_5, _S.Null).annotate(identifier="BaseReasoningConfig")
|
|
790
|
+
ReasoningConfig: _S.Bottom[_T.ReasoningConfig, _t.Any] = _b.union(Union_13, _S.Null).annotate(description="Configuration for reasoning mode in the response", identifier="ReasoningConfig")
|
|
791
|
+
ChatUsage: _StructSchema[_T.ChatUsage, _t.Never, _t.Never] = _b.struct(_T.ChatUsage, {"completion_tokens": _b.check(_S.Number.annotate(description="Number of tokens in the completion"), _S.is_int().annotate(expected="an integer")), "completion_tokens_details": Union_, "cost": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Cost of the completion", format="double"), "cost_details": CostDetails, "is_byok": _S.Boolean.annotate(description="Whether a request was made using a Bring Your Own Key configuration"), "prompt_tokens": _b.check(_S.Number.annotate(description="Number of tokens in the prompt"), _S.is_int().annotate(expected="an integer")), "prompt_tokens_details": Union_1, "server_tool_use_details": ServerToolUseDetails, "total_tokens": _b.check(_S.Number.annotate(description="Total number of tokens"), _S.is_int().annotate(expected="an integer"))}, optional=("completion_tokens_details", "cost", "cost_details", "is_byok", "prompt_tokens_details", "server_tool_use_details",)).annotate(description="Token usage statistics", identifier="ChatUsage")
|
|
792
|
+
Usage: _S.Bottom[_T.Usage, _t.Any] = _b.union(_b.struct(_T.Usage__0, {"input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens_details": _b.struct(_T.Usage__0__input_tokens_details, {"cache_write_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "cached_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("cache_write_tokens",)), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens_details": _b.struct(_T.Usage__0__output_tokens_details, {"reasoning_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), "total_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cost": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Cost of the completion", format="double"), "cost_details": _b.struct(_T.Usage__0__cost_details, {"upstream_inference_cost": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "upstream_inference_input_cost": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "upstream_inference_output_cost": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number"))}, optional=("upstream_inference_cost",)), "is_byok": _S.Boolean.annotate(description="Whether a request was made using a Bring Your Own Key configuration"), "server_tool_use_details": ServerToolUseDetails}, optional=("cost", "cost_details", "is_byok", "server_tool_use_details",)), _S.Null).annotate(description="Token usage information for the response", identifier="Usage")
|
|
793
|
+
StopServerToolsWhen: _S.Bottom[_T.StopServerToolsWhen, _t.Any] = _b.check(_b.array(StopServerToolsWhenCondition).annotate(description="Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1", identifier="StopServerToolsWhen"))
|
|
794
|
+
SubagentServerToolConfig: _StructSchema[_T.SubagentServerToolConfig, _t.Never, _t.Never] = _b.struct(_T.SubagentServerToolConfig, {"instructions": _S.String.annotate(description="System instructions for the subagent. When omitted, the subagent responds with no system prompt of its own."), "max_completion_tokens": _b.check(_S.Number.annotate(description="Maximum number of output tokens (including reasoning) the subagent may produce. When omitted, the provider's default applies."), _S.is_int().annotate(expected="an integer")), "max_tool_calls": _b.check(_b.check(_b.check(_S.Number.annotate(description="Maximum number of tool-calling steps the subagent may take during its agentic loop. Capped at 25. Only relevant when the subagent is given tools. Accepted and validated but not yet enforced on the subagent call."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1")), _S.is_less_than_or_equal_to(25).annotate(expected="a value less than or equal to 25")), "model": _S.String.annotate(description="Slug of the model that executes delegated tasks (any OpenRouter model). Typically a smaller, cheaper, faster model than the one delegating. When omitted, the model from the outer API request is used. The subagent tool itself cannot be the subagent model."), "name": _b.check(_b.check(_b.check(_S.String.annotate(description="Optional name for this subagent. The model sees one tool per named subagent (and one default for an unnamed entry). Names must be unique across subagent entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(64).annotate(expected="a value with a length of at most 64")), _b.js_pattern('^[a-zA-Z0-9 _-]+\\Z', '^[a-zA-Z0-9 _-]+$').annotate(expected="a string matching the RegExp ^[a-zA-Z0-9 _-]+$")), "reasoning": SubagentReasoning, "temperature": _b.check(_S.Number.annotate(description="Sampling temperature forwarded to the subagent call. When omitted, the provider's default applies.", format="double"), _S.is_finite().annotate(expected="a finite number")), "tools": Arrays_12}, optional=("instructions", "max_completion_tokens", "max_tool_calls", "model", "name", "reasoning", "temperature", "tools",)).annotate(description="Configuration for one openrouter:subagent server tool entry.", identifier="SubagentServerToolConfig")
|
|
795
|
+
ImageModelEndpointsResponse: _StructSchema[_T.ImageModelEndpointsResponse, _t.Never, _t.Never] = _b.struct(_T.ImageModelEndpointsResponse, {"endpoints": _b.array(ImageEndpoint), "id": _S.String.annotate(description="Model slug")}).annotate(description="The full per-endpoint records for an image model.", identifier="ImageModelEndpointsResponse")
|
|
796
|
+
TaskClassificationResponse: _StructSchema[_T.TaskClassificationResponse, _t.Never, _t.Never] = _b.struct(_T.TaskClassificationResponse, {"data": _b.struct(_T.TaskClassificationResponse__data, {"as_of": _S.String.annotate(description="UTC date (YYYY-MM-DD) of the window upper bound (yesterday). Data is exclusive of the current incomplete UTC day. This is the expected latest date in the snapshot; it does not confirm data presence for that date."), "classifications": _b.array(TaskClassificationItem).annotate(description="Per-task classification market-share data, sorted by usage_share descending."), "macro_categories": _b.array(TaskClassificationMacroCategory).annotate(description="Aggregate market-share data per macro-category (code, data, agent, general)."), "window_days": _b.check(_S.Number.annotate(description="Number of trailing days covered by this snapshot."), _S.is_int().annotate(expected="an integer"))})}).annotate(identifier="TaskClassificationResponse")
|
|
797
|
+
UnifiedBenchmarksResponse: _StructSchema[_T.UnifiedBenchmarksResponse, _t.Never, _t.Never] = _b.struct(_T.UnifiedBenchmarksResponse, {"data": _b.array(_b.union(UnifiedBenchmarksAAItem, UnifiedBenchmarksDAItem, mode="one_of")), "meta": UnifiedBenchmarksMeta}).annotate(identifier="UnifiedBenchmarksResponse")
|
|
798
|
+
AnnotationAddedEvent: _StructSchema[_T.AnnotationAddedEvent, _t.Never, _t.Never] = _b.struct(_T.AnnotationAddedEvent, {"annotation": OpenAIResponsesAnnotation, "annotation_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.output_text.annotation.added")}).annotate(description="Event emitted when a text annotation is added to output", identifier="AnnotationAddedEvent")
|
|
799
|
+
BaseAnnotationAddedEvent: _StructSchema[_T.BaseAnnotationAddedEvent, _t.Never, _t.Never] = _b.struct(_T.BaseAnnotationAddedEvent, {"annotation": OpenAIResponsesAnnotation, "annotation_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.output_text.annotation.added")}).annotate(description="Event emitted when a text annotation is added to output", identifier="BaseAnnotationAddedEvent")
|
|
800
|
+
ResponseOutputText: _StructSchema[_T.ResponseOutputText, _t.Never, _t.Never] = _b.struct(_T.ResponseOutputText, {"annotations": _b.array(OpenAIResponsesAnnotation), "logprobs": _b.array(_b.struct(_T.ResponseOutputText__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.ResponseOutputText__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}))})), "text": _S.String, "type": _b.literal("output_text")}, optional=("annotations", "logprobs",)).annotate(identifier="ResponseOutputText")
|
|
801
|
+
WebFetchServerTool: _StructSchema[_T.WebFetchServerTool, _t.Never, _t.Never] = _b.struct(_T.WebFetchServerTool, {"parameters": WebFetchServerToolConfig, "type": _b.literal("openrouter:web_fetch")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: fetches full content from a URL (web page or PDF)", identifier="WebFetchServerTool")
|
|
802
|
+
Preview_20250311_WebSearchServerTool: _StructSchema[_T.Preview_20250311_WebSearchServerTool, _t.Never, _t.Never] = _b.struct(_T.Preview_20250311_WebSearchServerTool, {"engine": WebSearchEngineEnum, "filters": WebSearchDomainFilter, "max_results": _b.check(_S.Number.annotate(description="Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped."), _S.is_int().annotate(expected="an integer")), "search_context_size": SearchContextSizeEnum, "type": _b.literal("web_search_preview_2025_03_11"), "user_location": Preview_WebSearchUserLocation}, optional=("engine", "filters", "max_results", "search_context_size", "user_location",)).annotate(description="Web search preview tool configuration (2025-03-11 version)", identifier="Preview_20250311_WebSearchServerTool")
|
|
803
|
+
Preview_WebSearchServerTool: _StructSchema[_T.Preview_WebSearchServerTool, _t.Never, _t.Never] = _b.struct(_T.Preview_WebSearchServerTool, {"engine": WebSearchEngineEnum, "filters": WebSearchDomainFilter, "max_results": _b.check(_S.Number.annotate(description="Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped."), _S.is_int().annotate(expected="an integer")), "search_context_size": SearchContextSizeEnum, "type": _b.literal("web_search_preview"), "user_location": Preview_WebSearchUserLocation}, optional=("engine", "filters", "max_results", "search_context_size", "user_location",)).annotate(description="Web search preview tool configuration", identifier="Preview_WebSearchServerTool")
|
|
804
|
+
Legacy_WebSearchServerTool: _StructSchema[_T.Legacy_WebSearchServerTool, _t.Never, _t.Never] = _b.struct(_T.Legacy_WebSearchServerTool, {"engine": WebSearchEngineEnum, "filters": WebSearchDomainFilter, "max_results": _b.check(_S.Number.annotate(description="Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped."), _S.is_int().annotate(expected="an integer")), "search_context_size": SearchContextSizeEnum, "type": _b.literal("web_search"), "user_location": WebSearchUserLocation}, optional=("engine", "filters", "max_results", "search_context_size", "user_location",)).annotate(description="Web search tool configuration", identifier="Legacy_WebSearchServerTool")
|
|
805
|
+
WebSearchServerTool: _StructSchema[_T.WebSearchServerTool, _t.Never, _t.Never] = _b.struct(_T.WebSearchServerTool, {"engine": WebSearchEngineEnum, "filters": WebSearchDomainFilter, "max_results": _b.check(_S.Number.annotate(description="Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped."), _S.is_int().annotate(expected="an integer")), "search_context_size": SearchContextSizeEnum, "type": _b.literal("web_search_2025_08_26"), "user_location": WebSearchUserLocation}, optional=("engine", "filters", "max_results", "search_context_size", "user_location",)).annotate(description="Web search tool configuration (2025-08-26 version)", identifier="WebSearchServerTool")
|
|
806
|
+
ChatWebSearchShorthand: _StructSchema[_T.ChatWebSearchShorthand, _t.Never, _t.Never] = _b.struct(_T.ChatWebSearchShorthand, {"allowed_domains": _b.array(_S.String).annotate(description="Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, xAI). Cannot be used with excluded_domains."), "engine": WebSearchEngineEnum, "excluded_domains": _b.array(_S.String).annotate(description="Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, and xAI. Not supported with OpenAI (silently ignored). Cannot be used with allowed_domains."), "max_characters": _b.check(_S.Number.annotate(description="Exact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). For Perplexity, maps to the native `max_tokens_per_page` parameter (converted from characters to tokens) and trims the response to the exact character cap. When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel, Perplexity)."), _S.is_int().annotate(expected="an integer")), "max_results": _b.check(_S.Number.annotate(description="Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped."), _S.is_int().annotate(expected="an integer")), "max_total_results": _b.check(_S.Number.annotate(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."), _S.is_int().annotate(expected="an integer")), "parameters": WebSearchConfig, "search_context_size": SearchQualityLevel, "type": _b.literals(["web_search", "web_search_preview", "web_search_preview_2025_03_11", "web_search_2025_08_26"]), "user_location": WebSearchUserLocationServerTool}, optional=("allowed_domains", "engine", "excluded_domains", "max_characters", "max_results", "max_total_results", "parameters", "search_context_size", "user_location",)).annotate(description="Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search.", identifier="ChatWebSearchShorthand")
|
|
807
|
+
OpenRouterWebSearchServerTool: _StructSchema[_T.OpenRouterWebSearchServerTool, _t.Never, _t.Never] = _b.struct(_T.OpenRouterWebSearchServerTool, {"parameters": WebSearchConfig, "type": _b.literal("openrouter:web_search")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: searches the web for current information", identifier="OpenRouterWebSearchServerTool")
|
|
808
|
+
WebSearchServerTool_OpenRouter: _StructSchema[_T.WebSearchServerTool_OpenRouter, _t.Never, _t.Never] = _b.struct(_T.WebSearchServerTool_OpenRouter, {"parameters": WebSearchServerToolConfig, "type": _b.literal("openrouter:web_search")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: searches the web for current information", identifier="WebSearchServerTool_OpenRouter")
|
|
809
|
+
AdvisorServerTool_OpenRouter: _StructSchema[_T.AdvisorServerTool_OpenRouter, _t.Never, _t.Never] = _b.struct(_T.AdvisorServerTool_OpenRouter, {"parameters": AdvisorServerToolConfig, "type": _b.literal("openrouter:advisor")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.", identifier="AdvisorServerTool_OpenRouter")
|
|
810
|
+
AnthropicBashCodeExecutionToolResult: _StructSchema[_T.AnthropicBashCodeExecutionToolResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicBashCodeExecutionToolResult, {"content": AnthropicBashCodeExecutionContent, "tool_use_id": _S.String, "type": _b.literal("bash_code_execution_tool_result")}).annotate(identifier="AnthropicBashCodeExecutionToolResult")
|
|
811
|
+
AnthropicSearchResultBlockParam: _StructSchema[_T.AnthropicSearchResultBlockParam, _t.Never, _t.Never] = _b.struct(_T.AnthropicSearchResultBlockParam, {"cache_control": AnthropicCacheControlDirective, "citations": _b.struct(_T.AnthropicSearchResultBlockParam__citations, {"enabled": _S.Boolean}, optional=("enabled",)), "content": _b.array(AnthropicTextBlockParam), "source": _S.String, "title": _S.String, "type": _b.literal("search_result")}, optional=("cache_control", "citations",)).annotate(identifier="AnthropicSearchResultBlockParam")
|
|
812
|
+
FusionServerTool_OpenRouter: _StructSchema[_T.FusionServerTool_OpenRouter, _t.Never, _t.Never] = _b.struct(_T.FusionServerTool_OpenRouter, {"parameters": FusionServerToolConfig, "type": _b.literal("openrouter:fusion")}, optional=("parameters",)).annotate(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.", identifier="FusionServerTool_OpenRouter")
|
|
813
|
+
AnthropicWebFetchBlock: _StructSchema[_T.AnthropicWebFetchBlock, _t.Never, _t.Never] = _b.struct(_T.AnthropicWebFetchBlock, {"content": AnthropicDocumentBlock, "retrieved_at": _b.union(_S.String, _S.Null), "type": _b.literal("web_fetch_result"), "url": _S.String}).annotate(identifier="AnthropicWebFetchBlock")
|
|
814
|
+
AnthropicDocumentBlockParam: _StructSchema[_T.AnthropicDocumentBlockParam, _t.Never, _t.Never] = _b.struct(_T.AnthropicDocumentBlockParam, {"cache_control": AnthropicCacheControlDirective, "citations": _b.union(_b.struct_with_rest(_b.struct(_T.AnthropicDocumentBlockParam__citations__0, {"enabled": _S.Boolean}, optional=("enabled",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null), "context": _b.union(_S.String, _S.Null), "source": _b.union(AnthropicBase64PdfSource, AnthropicPlainTextSource, _b.struct(_T.AnthropicDocumentBlockParam__source__2, {"content": _b.union(_S.String, _b.array(_b.union(AnthropicTextBlockParam, AnthropicImageBlockParam, mode="one_of"))), "type": _b.literal("content")}), AnthropicUrlPdfSource, AnthropicFileDocumentSource, mode="one_of"), "title": _b.union(_S.String, _S.Null), "type": _b.literal("document")}, optional=("cache_control", "citations", "context", "title",)).annotate(identifier="AnthropicDocumentBlockParam")
|
|
815
|
+
AnthropicUsageIteration: _S.Bottom[_T.AnthropicUsageIteration, _t.Any] = _b.union(AnthropicCompactionUsageIteration, AnthropicMessageUsageIteration, AnthropicAdvisorMessageUsageIteration, AnthropicUnknownUsageIteration).annotate(identifier="AnthropicUsageIteration")
|
|
816
|
+
AnthropicCodeExecutionToolResult: _StructSchema[_T.AnthropicCodeExecutionToolResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicCodeExecutionToolResult, {"content": AnthropicCodeExecutionContent, "tool_use_id": _S.String, "type": _b.literal("code_execution_tool_result")}).annotate(identifier="AnthropicCodeExecutionToolResult")
|
|
817
|
+
AnthropicToolSearchToolResult: _StructSchema[_T.AnthropicToolSearchToolResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicToolSearchToolResult, {"content": AnthropicToolSearchContent, "tool_use_id": _S.String, "type": _b.literal("tool_search_tool_result")}).annotate(identifier="AnthropicToolSearchToolResult")
|
|
818
|
+
BashServerTool: _StructSchema[_T.BashServerTool, _t.Never, _t.Never] = _b.struct(_T.BashServerTool, {"parameters": BashServerToolConfig, "type": _b.literal("openrouter:bash")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container", identifier="BashServerTool")
|
|
819
|
+
ShellServerTool_OpenRouter: _StructSchema[_T.ShellServerTool_OpenRouter, _t.Never, _t.Never] = _b.struct(_T.ShellServerTool_OpenRouter, {"parameters": ShellServerToolConfig, "type": _b.literal("openrouter:shell")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container (a sandbox-backed clone of OpenAI's hosted shell tool)", identifier="ShellServerTool_OpenRouter")
|
|
820
|
+
ImageModelsListResponse: _StructSchema[_T.ImageModelsListResponse, _t.Never, _t.Never] = _b.struct(_T.ImageModelsListResponse, {"data": _b.array(ImageModelListItem)}).annotate(description="List of image generation models.", identifier="ImageModelsListResponse")
|
|
821
|
+
ObservabilityDestination: _S.Bottom[_T.ObservabilityDestination, _t.Any] = _b.union(ObservabilityArizeDestination, ObservabilityBraintrustDestination, ObservabilityClickhouseDestination, ObservabilityDatadogDestination, ObservabilityGrafanaDestination, ObservabilityLangfuseDestination, ObservabilityLangsmithDestination, ObservabilityNewrelicDestination, ObservabilityOpikDestination, ObservabilityOtelCollectorDestination, ObservabilityPosthogDestination, ObservabilityRampDestination, ObservabilityS3Destination, ObservabilitySentryDestination, ObservabilitySnowflakeDestination, ObservabilityWeaveDestination, ObservabilityWebhookDestination, mode="one_of").annotate(identifier="ObservabilityDestination")
|
|
822
|
+
CreateObservabilityDestinationRequest: _StructSchema[_T.CreateObservabilityDestinationRequest, _t.Never, _t.Never] = _b.struct(_T.CreateObservabilityDestinationRequest, {"api_key_hashes": _b.union(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided."), "config": _b.struct(_T.CreateObservabilityDestinationRequest__config, {}).annotate(description="Provider-specific configuration. The shape depends on `type` and is validated server-side."), "enabled": _S.Boolean.annotate(description="Whether this destination should be enabled immediately."), "filter_rules": ObservabilityFilterRulesConfigNullable, "name": _S.String.annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number")), "type": _b.literals(["arize", "braintrust", "clickhouse", "datadog", "grafana", "langfuse", "langsmith", "newrelic", "opik", "otel-collector", "posthog", "ramp", "s3", "sentry", "snowflake", "weave", "webhook"]).annotate(description="The destination type. Only stable destination types are accepted."), "workspace_id": _S.String.annotate(description="Optional workspace ID. Defaults to the authenticated entity's default workspace.", format="uuid")}, optional=("api_key_hashes", "enabled", "filter_rules", "privacy_mode", "sampling_rate", "workspace_id",)).annotate(identifier="CreateObservabilityDestinationRequest")
|
|
823
|
+
UpdateObservabilityDestinationRequest: _StructSchema[_T.UpdateObservabilityDestinationRequest, _t.Never, _t.Never] = _b.struct(_T.UpdateObservabilityDestinationRequest, {"api_key_hashes": _b.union(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null).annotate(description="Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided."), "config": _b.struct(_T.UpdateObservabilityDestinationRequest__config, {}).annotate(description="Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value."), "enabled": _S.Boolean.annotate(description="Whether the destination is enabled."), "filter_rules": _b.suspend(lambda: ObservabilityFilterRulesConfigNullable).annotate(description="Optional structured filter rules. `null` clears the rules. Omitting keeps the current value."), "name": _S.String.annotate(description="Human-readable name for the destination."), "privacy_mode": _S.Boolean.annotate(description="When true, request/response bodies are not forwarded — only metadata."), "sampling_rate": _b.check(_S.Number.annotate(description="Sampling rate between 0.0001 and 1 (1 = 100%).", format="double"), _S.is_finite().annotate(expected="a finite number"))}, optional=("api_key_hashes", "config", "enabled", "filter_rules", "name", "privacy_mode", "sampling_rate",)).annotate(identifier="UpdateObservabilityDestinationRequest")
|
|
824
|
+
ProviderPreferences: _S.Bottom[_T.ProviderPreferences, _t.Any] = _b.union(Objects_148, _S.Null).annotate(description="When multiple model providers are available, optionally indicate your routing preference.", identifier="ProviderPreferences")
|
|
825
|
+
OpenRouterMetadata: _StructSchema[_T.OpenRouterMetadata, _t.Never, _t.Never] = _b.struct(_T.OpenRouterMetadata, {"attempt": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "attempts": Arrays_10, "endpoints": EndpointsMetadata, "is_byok": _S.Boolean, "params": RouterParams, "pipeline": Arrays_11, "region": _b.union(_S.String, _S.Null), "requested": _S.String, "strategy": RoutingStrategy, "summary": _S.String}, optional=("attempts", "params", "pipeline",)).annotate(identifier="OpenRouterMetadata")
|
|
826
|
+
ChatContentItems: _S.Bottom[_T.ChatContentItems, _t.Any] = _b.union(ChatContentText, ChatContentImage, ChatContentAudio, Legacy_ChatContentVideo, ChatContentVideo, ChatContentFile, mode="one_of").annotate(description="Content part for chat completion messages", identifier="ChatContentItems")
|
|
827
|
+
ChatDeveloperMessage: _StructSchema[_T.ChatDeveloperMessage, _t.Never, _t.Never] = _b.struct(_T.ChatDeveloperMessage, {"content": _b.union(_S.String, _b.array(ChatContentText)).annotate(description="Developer message content"), "name": _S.String.annotate(description="Optional name for the developer message"), "role": _b.literal("developer")}, optional=("name",)).annotate(description="Developer message", identifier="ChatDeveloperMessage")
|
|
828
|
+
ChatSystemMessage: _StructSchema[_T.ChatSystemMessage, _t.Never, _t.Never] = _b.struct(_T.ChatSystemMessage, {"content": _b.union(_S.String, _b.array(ChatContentText)).annotate(description="System message content"), "name": _S.String.annotate(description="Optional name for the system message"), "role": _b.literal("system")}, optional=("name",)).annotate(description="System message for setting behavior", identifier="ChatSystemMessage")
|
|
829
|
+
AgentMessageItem: _StructSchema[_T.AgentMessageItem, _t.Never, _t.Never] = _b.struct(_T.AgentMessageItem, {"agent": _b.union(_b.struct_with_rest(_b.struct(_T.AgentMessageItem__agent__0, {"agent_name": _S.String}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null), "author": _S.String, "content": _b.array(_b.union(InputText, _b.struct(_T.AgentMessageItem__content__item__1, {"detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null), "type": _b.literal("input_image")}, optional=("image_url",)).annotate(description="Image input content item"), _b.struct(_T.AgentMessageItem__content__item__2, {"encrypted_content": _S.String, "type": _b.literal("encrypted_content")}), mode="one_of")), "id": _b.union(_S.String, _S.Null), "recipient": _S.String, "type": _b.literal("agent_message")}, optional=("agent", "id",)).annotate(description="A message routed between agents in a multi-agent session", identifier="AgentMessageItem")
|
|
830
|
+
EasyInputMessage: _StructSchema[_T.EasyInputMessage, _t.Never, _t.Never] = _b.struct(_T.EasyInputMessage, {"content": _b.union(_b.array(_b.union(InputText, _b.struct(_T.EasyInputMessage__content__0__item__1, {"detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null), "type": _b.literal("input_image")}, optional=("image_url",)).annotate(description="Image input content item"), InputFile, InputAudio, InputVideo, mode="one_of")), _S.String, _S.Null), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literals(["user", "system", "assistant", "developer"]), "type": _b.literal("message")}, optional=("content", "phase", "type",)).annotate(identifier="EasyInputMessage")
|
|
831
|
+
InputMessageItem: _StructSchema[_T.InputMessageItem, _t.Never, _t.Never] = _b.struct(_T.InputMessageItem, {"content": _b.union(_b.array(_b.union(InputText, _b.struct(_T.InputMessageItem__content__0__item__1, {"detail": _b.literals(["auto", "high", "low", "original"]), "image_url": _b.union(_S.String, _S.Null), "type": _b.literal("input_image")}, optional=("image_url",)).annotate(description="Image input content item"), InputFile, InputAudio, InputVideo, mode="one_of")), _S.Null), "id": _S.String, "role": _b.literals(["user", "system", "developer"]), "type": _b.literal("message")}, optional=("content", "id", "type",)).annotate(identifier="InputMessageItem")
|
|
832
|
+
OpenAIResponseCustomToolCallOutput: _StructSchema[_T.OpenAIResponseCustomToolCallOutput, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponseCustomToolCallOutput, {"call_id": _S.String, "id": _S.String, "output": _b.union(_S.String, _b.array(_b.union(InputText, InputImage, InputFile, mode="one_of"))), "type": _b.literal("custom_tool_call_output")}, optional=("id",)).annotate(identifier="OpenAIResponseCustomToolCallOutput")
|
|
833
|
+
OpenAIResponseFunctionToolCallOutput: _StructSchema[_T.OpenAIResponseFunctionToolCallOutput, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponseFunctionToolCallOutput, {"call_id": _S.String, "id": _b.union(_S.String, _S.Null), "output": _b.union(_S.String, _b.array(_b.union(InputText, InputImage, InputFile, mode="one_of"))), "status": _b.union(ToolCallStatus, _S.Null), "type": _b.literal("function_call_output")}, optional=("id", "status",)).annotate(identifier="OpenAIResponseFunctionToolCallOutput")
|
|
834
|
+
OpenAIResponseInputMessageItem: _StructSchema[_T.OpenAIResponseInputMessageItem, _t.Never, _t.Never] = _b.struct(_T.OpenAIResponseInputMessageItem, {"content": _b.array(_b.union(InputText, InputImage, InputFile, InputAudio, mode="one_of")), "id": _S.String, "role": _b.literals(["user", "system", "developer"]), "type": _b.literal("message")}, optional=("type",)).annotate(identifier="OpenAIResponseInputMessageItem")
|
|
835
|
+
Objects_151: _S.Bottom[_T.Objects_151, _t.Any] = _b.struct_with_rest(_b.struct(_T.Objects_151, {"id": _S.String, "variables": _b.union(_b.record(_S.String, _b.union(_S.String, InputText, InputImage, InputFile)), _S.Null)}, optional=("variables",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))
|
|
836
|
+
CreateGuardrailResponse: _StructSchema[_T.CreateGuardrailResponse, _t.Never, _t.Never] = _b.struct(_T.CreateGuardrailResponse, {"data": _b.suspend(lambda: Guardrail).annotate(description="The created guardrail")}).annotate(identifier="CreateGuardrailResponse")
|
|
837
|
+
GetGuardrailResponse: _StructSchema[_T.GetGuardrailResponse, _t.Never, _t.Never] = _b.struct(_T.GetGuardrailResponse, {"data": _b.suspend(lambda: Guardrail).annotate(description="The guardrail")}).annotate(identifier="GetGuardrailResponse")
|
|
838
|
+
ListGuardrailsResponse: _StructSchema[_T.ListGuardrailsResponse, _t.Never, _t.Never] = _b.struct(_T.ListGuardrailsResponse, {"data": _b.array(Guardrail).annotate(description="List of guardrails"), "total_count": _b.check(_S.Number.annotate(description="Total number of guardrails"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="ListGuardrailsResponse")
|
|
839
|
+
UpdateGuardrailResponse: _StructSchema[_T.UpdateGuardrailResponse, _t.Never, _t.Never] = _b.struct(_T.UpdateGuardrailResponse, {"data": _b.suspend(lambda: Guardrail).annotate(description="The updated guardrail")}).annotate(identifier="UpdateGuardrailResponse")
|
|
840
|
+
ImageGenerationRequest: _StructSchema[_T.ImageGenerationRequest, _t.Never, _t.Never] = _b.struct(_T.ImageGenerationRequest, {"aspect_ratio": _b.literals(["1:1", "1:2", "1:4", "1:8", "2:1", "2:3", "3:2", "3:4", "4:1", "4:3", "4:5", "5:4", "8:1", "9:16", "16:9", "9:19.5", "19.5:9", "9:20", "20:9", "9:21", "21:9", "auto"]).annotate(description="Normalized aspect ratio of the generated image. Providers clamp to their supported subset."), "background": _b.literals(["auto", "transparent", "opaque"]).annotate(description="Background treatment. `transparent` requires an output_format that supports alpha (png or webp)."), "input_references": _b.check(_b.array(ContentPartImage).annotate(description="Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs."), _S.is_max_length(16).annotate(expected="a value with a length of at most 16")), "model": _S.String.annotate(description="The image generation model to use"), "n": _b.check(_S.Number.annotate(description="Number of images to generate (1-10). Providers that only support single-image generation reject n > 1."), _S.is_int().annotate(expected="an integer")), "output_compression": _b.check(_S.Number.annotate(description="Compression level (0-100) for webp/jpeg output. Ignored for png and by providers without a compression knob."), _S.is_int().annotate(expected="an integer")), "output_format": _b.literals(["png", "jpeg", "webp", "svg"]).annotate(description="Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`."), "prompt": _b.check(_S.String.annotate(description="Text description of the desired image"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "provider": ImageGenerationProviderPreferences, "quality": _b.literals(["auto", "low", "medium", "high"]).annotate(description="Rendering quality. Providers without a quality knob ignore this."), "resolution": _b.literals(["512", "1K", "2K", "4K"]).annotate(description="Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider."), "seed": _b.check(_S.Number.annotate(description="If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers."), _S.is_int().annotate(expected="an integer")), "size": _S.String.annotate(description="Optional. A convenience shorthand for output dimensions — pass a tier (\"2K\", \"4K\") or explicit pixels (\"2048x2048\") and we normalize it to the right dimensions for the chosen provider. A tier size is equivalent to setting `resolution` and combines with `aspect_ratio`. An explicit pixel size is authoritative: a mismatched `resolution` or `aspect_ratio` alongside it is rejected with a 400."), "stream": _S.Boolean.annotate(description="If true, partial images are streamed as SSE events as they become available. Only supported by providers with native streaming (currently OpenAI). Non-streaming providers ignore this flag and return a buffered response.")}, optional=("aspect_ratio", "background", "input_references", "n", "output_compression", "output_format", "provider", "quality", "resolution", "seed", "size", "stream",)).annotate(description="Image generation request input", identifier="ImageGenerationRequest")
|
|
841
|
+
Model: _StructSchema[_T.Model, _t.Never, _t.Never] = _b.struct(_T.Model, {"architecture": ModelArchitecture, "benchmarks": ModelBenchmarks, "canonical_slug": _S.String.annotate(description="Canonical slug for the model"), "context_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Maximum context length in tokens"), "created": _b.check(_S.Number.annotate(description="Unix timestamp of when the model was created"), _S.is_int().annotate(expected="an integer")), "default_parameters": DefaultParameters, "description": _S.String.annotate(description="Description of the model"), "expiration_date": _b.union(_S.String, _S.Null).annotate(description="The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration."), "hugging_face_id": _b.union(_S.String, _S.Null).annotate(description="Hugging Face model identifier, if applicable"), "id": _S.String.annotate(description="Unique identifier for the model"), "knowledge_cutoff": _b.union(_S.String, _S.Null).annotate(description="The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown."), "links": ModelLinks, "name": _S.String.annotate(description="Display name of the model"), "per_request_limits": PerRequestLimits, "pricing": PublicPricing, "reasoning": ModelReasoning, "supported_parameters": _b.array(Parameter).annotate(description="List of supported parameters for this model"), "supported_voices": _b.union(_b.array(_S.String), _S.Null).annotate(description="List of supported voice identifiers for TTS models. Null for non-TTS models."), "top_provider": TopProviderInfo}, optional=("benchmarks", "description", "expiration_date", "hugging_face_id", "knowledge_cutoff", "reasoning",)).annotate(description="Information about an AI model available on OpenRouter", identifier="Model")
|
|
842
|
+
ChatReasoningDetails: _S.Bottom[_T.ChatReasoningDetails, _t.Any] = _b.array(ReasoningDetailUnion).annotate(description="Reasoning details for extended thinking models", identifier="ChatReasoningDetails")
|
|
843
|
+
ChatStreamReasoningDetails: _S.Bottom[_T.ChatStreamReasoningDetails, _t.Any] = _b.array(ReasoningDetailUnion).annotate(description="Reasoning details for extended thinking models", identifier="ChatStreamReasoningDetails")
|
|
844
|
+
SubagentServerTool_OpenRouter: _StructSchema[_T.SubagentServerTool_OpenRouter, _t.Never, _t.Never] = _b.struct(_T.SubagentServerTool_OpenRouter, {"parameters": SubagentServerToolConfig, "type": _b.literal("openrouter:subagent")}, optional=("parameters",)).annotate(description="OpenRouter built-in server tool: delegates self-contained tasks to a smaller, cheaper, faster worker model (any OpenRouter model) mid-generation and returns its outcome. The worker may run as a sub-agent with its own tools.", identifier="SubagentServerTool_OpenRouter")
|
|
845
|
+
BaseContentPartAddedEvent: _StructSchema[_T.BaseContentPartAddedEvent, _t.Never, _t.Never] = _b.struct(_T.BaseContentPartAddedEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "part": _b.union(ResponseOutputText, OpenAIResponsesRefusalContent), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.content_part.added")}).annotate(description="Event emitted when a new content part is added to an output item", identifier="BaseContentPartAddedEvent")
|
|
846
|
+
BaseContentPartDoneEvent: _StructSchema[_T.BaseContentPartDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BaseContentPartDoneEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "part": _b.union(ResponseOutputText, OpenAIResponsesRefusalContent), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.content_part.done")}).annotate(description="Event emitted when a content part is complete", identifier="BaseContentPartDoneEvent")
|
|
847
|
+
ContentPartAddedEvent: _StructSchema[_T.ContentPartAddedEvent, _t.Never, _t.Never] = _b.struct(_T.ContentPartAddedEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "part": _b.union(ResponseOutputText, ReasoningTextContent, OpenAIResponsesRefusalContent), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.content_part.added")}).annotate(description="Event emitted when a new content part is added to an output item", identifier="ContentPartAddedEvent")
|
|
848
|
+
ContentPartDoneEvent: _StructSchema[_T.ContentPartDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ContentPartDoneEvent, {"content_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "item_id": _S.String, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "part": _b.union(ResponseOutputText, ReasoningTextContent, OpenAIResponsesRefusalContent), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.content_part.done")}).annotate(description="Event emitted when a content part is complete", identifier="ContentPartDoneEvent")
|
|
849
|
+
OutputMessage: _StructSchema[_T.OutputMessage, _t.Never, _t.Never] = _b.struct(_T.OutputMessage, {"content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "id": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.literals(["completed", "incomplete", "in_progress"]), "type": _b.literal("message")}, optional=("phase", "status",)).annotate(identifier="OutputMessage")
|
|
850
|
+
OutputMessageItem: _StructSchema[_T.OutputMessageItem, _t.Never, _t.Never] = _b.struct(_T.OutputMessageItem, {"content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "id": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.literals(["completed", "incomplete", "in_progress"]), "type": _b.literal("message")}, optional=("phase", "status",)).annotate(description="An output message item", identifier="OutputMessageItem")
|
|
851
|
+
AnthropicWebFetchContent: _S.Bottom[_T.AnthropicWebFetchContent, _t.Any] = _b.union(AnthropicWebFetchToolResultError, AnthropicWebFetchBlock, mode="one_of").annotate(identifier="AnthropicWebFetchContent")
|
|
852
|
+
MessagesMessageParam: _StructSchema[_T.MessagesMessageParam, _t.Never, _t.Never] = _b.struct(_T.MessagesMessageParam, {"content": _b.union(_S.String, _b.array(_b.union(AnthropicTextBlockParam, AnthropicImageBlockParam, AnthropicDocumentBlockParam, _b.struct(_T.MessagesMessageParam__content__1__item__3, {"cache_control": AnthropicCacheControlDirective, "id": _S.String, "input": _S.Json.annotate(expected="JSON value"), "name": _S.String, "type": _b.literal("tool_use")}, optional=("cache_control", "input",)), _b.struct(_T.MessagesMessageParam__content__1__item__4, {"cache_control": AnthropicCacheControlDirective, "content": _b.union(_S.String, _b.array(_b.union(AnthropicTextBlockParam, AnthropicImageBlockParam, _b.struct(_T.MessagesMessageParam__content__1__item__4__content__1__item__2, {"tool_name": _S.String, "type": _b.literal("tool_reference")}), AnthropicSearchResultBlockParam, AnthropicDocumentBlockParam))), "is_error": _S.Boolean, "tool_use_id": _S.String, "type": _b.literal("tool_result")}, optional=("cache_control", "content", "is_error",)), _b.struct(_T.MessagesMessageParam__content__1__item__5, {"signature": _S.String, "thinking": _S.String, "type": _b.literal("thinking")}), _b.struct(_T.MessagesMessageParam__content__1__item__6, {"data": _S.String, "type": _b.literal("redacted_thinking")}), _b.struct(_T.MessagesMessageParam__content__1__item__7, {"cache_control": AnthropicCacheControlDirective, "id": _S.String, "input": _S.Json.annotate(expected="JSON value"), "name": _S.String, "type": _b.literal("server_tool_use")}, optional=("cache_control", "input",)), _b.struct(_T.MessagesMessageParam__content__1__item__8, {"cache_control": AnthropicCacheControlDirective, "content": _b.union(_b.array(AnthropicWebSearchResultBlockParam), _b.struct(_T.MessagesMessageParam__content__1__item__8__content__1, {"error_code": _b.literals(["invalid_tool_input", "unavailable", "max_uses_exceeded", "too_many_requests", "query_too_long"]), "type": _b.literal("web_search_tool_result_error")})), "tool_use_id": _S.String, "type": _b.literal("web_search_tool_result")}, optional=("cache_control",)), AnthropicSearchResultBlockParam, _b.struct(_T.MessagesMessageParam__content__1__item__10, {"cache_control": AnthropicCacheControlDirective, "content": _b.union(_S.String, _S.Null), "type": _b.literal("compaction")}, optional=("cache_control",)), MessagesAdvisorToolResultBlock, mode="one_of"))), "role": _b.literals(["user", "assistant", "system"])}).annotate(description="Anthropic message with OpenRouter extensions", identifier="MessagesMessageParam")
|
|
853
|
+
Union_7: _S.Bottom[_T.Union_7, _t.Any] = _b.union(_b.array(AnthropicUsageIteration), _S.Null)
|
|
854
|
+
MessagesDeltaEvent: _StructSchema[_T.MessagesDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.MessagesDeltaEvent, {"delta": _b.struct(_T.MessagesDeltaEvent__delta, {"container": AnthropicContainer, "stop_details": AnthropicRefusalStopDetails, "stop_reason": ORAnthropicStopReason, "stop_sequence": _b.union(_S.String, _S.Null)}), "type": _b.literal("message_delta"), "usage": _b.struct(_T.MessagesDeltaEvent__usage, {"cache_creation": AnthropicCacheCreation, "cache_creation_input_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "cache_read_input_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "input_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "iterations": _b.array(AnthropicUsageIteration), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens_details": AnthropicOutputTokensDetails, "server_tool_use": _b.union(_b.struct_with_rest(_b.struct(_T.MessagesDeltaEvent__usage__server_tool_use__0, {"web_fetch_requests": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "web_search_requests": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null)}, optional=("cache_creation", "iterations",))}).annotate(description="Event sent when the message metadata changes (e.g., stop_reason)", identifier="MessagesDeltaEvent")
|
|
855
|
+
CreateObservabilityDestinationResponse: _StructSchema[_T.CreateObservabilityDestinationResponse, _t.Never, _t.Never] = _b.struct(_T.CreateObservabilityDestinationResponse, {"data": _b.suspend(lambda: ObservabilityDestination).annotate(description="The newly created observability destination.")}).annotate(identifier="CreateObservabilityDestinationResponse")
|
|
856
|
+
GetObservabilityDestinationResponse: _StructSchema[_T.GetObservabilityDestinationResponse, _t.Never, _t.Never] = _b.struct(_T.GetObservabilityDestinationResponse, {"data": _b.suspend(lambda: ObservabilityDestination).annotate(description="The observability destination.")}).annotate(identifier="GetObservabilityDestinationResponse")
|
|
857
|
+
ListObservabilityDestinationsResponse: _StructSchema[_T.ListObservabilityDestinationsResponse, _t.Never, _t.Never] = _b.struct(_T.ListObservabilityDestinationsResponse, {"data": _b.array(ObservabilityDestination).annotate(description="List of observability destinations."), "total_count": _b.check(_S.Number.annotate(description="Total number of destinations matching the filters."), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="ListObservabilityDestinationsResponse")
|
|
858
|
+
UpdateObservabilityDestinationResponse: _StructSchema[_T.UpdateObservabilityDestinationResponse, _t.Never, _t.Never] = _b.struct(_T.UpdateObservabilityDestinationResponse, {"data": _b.suspend(lambda: ObservabilityDestination).annotate(description="The updated observability destination.")}).annotate(identifier="UpdateObservabilityDestinationResponse")
|
|
859
|
+
MessagesErrorEvent: _StructSchema[_T.MessagesErrorEvent, _t.Never, _t.Never] = _b.struct(_T.MessagesErrorEvent, {"error": _b.struct(_T.MessagesErrorEvent__error, {"error_type": ApiErrorType, "message": _S.String, "type": _S.String}, optional=("error_type",)), "openrouter_metadata": OpenRouterMetadata, "type": _b.literal("error")}, optional=("openrouter_metadata",)).annotate(description="Error event in the stream", identifier="MessagesErrorEvent")
|
|
860
|
+
MessagesStopEvent: _StructSchema[_T.MessagesStopEvent, _t.Never, _t.Never] = _b.struct(_T.MessagesStopEvent, {"openrouter_metadata": OpenRouterMetadata, "type": _b.literal("message_stop")}, optional=("openrouter_metadata",)).annotate(description="Event sent when the message is complete", identifier="MessagesStopEvent")
|
|
861
|
+
ChatToolMessage: _StructSchema[_T.ChatToolMessage, _t.Never, _t.Never] = _b.struct(_T.ChatToolMessage, {"content": _b.union(_S.String, _b.array(ChatContentItems)).annotate(description="Tool response content"), "role": _b.literal("tool"), "tool_call_id": _S.String.annotate(description="ID of the assistant message tool call this message responds to")}).annotate(description="Tool response message", identifier="ChatToolMessage")
|
|
862
|
+
ChatUserMessage: _StructSchema[_T.ChatUserMessage, _t.Never, _t.Never] = _b.struct(_T.ChatUserMessage, {"content": _b.union(_S.String, _b.array(ChatContentItems)).annotate(description="User message content"), "name": _S.String.annotate(description="Optional name for the user"), "role": _b.literal("user")}, optional=("name",)).annotate(description="User message", identifier="ChatUserMessage")
|
|
863
|
+
StoredPromptTemplate: _S.Bottom[_T.StoredPromptTemplate, _t.Any] = _b.union(Objects_151, _S.Null).annotate(identifier="StoredPromptTemplate")
|
|
864
|
+
ModelResponse: _StructSchema[_T.ModelResponse, _t.Never, _t.Never] = _b.struct(_T.ModelResponse, {"data": Model}).annotate(description="Single model response", identifier="ModelResponse")
|
|
865
|
+
ModelsListResponseData: _S.Bottom[_T.ModelsListResponseData, _t.Any] = _b.array(Model).annotate(description="List of available models", identifier="ModelsListResponseData")
|
|
866
|
+
ChatAssistantMessage: _StructSchema[_T.ChatAssistantMessage, _t.Never, _t.Never] = _b.struct(_T.ChatAssistantMessage, {"audio": ChatAudioOutput, "content": _b.union(_S.String, _b.array(ChatContentItems), _S.Null).annotate(description="Assistant message content"), "images": _b.union(_b.array(_b.struct(_T.ChatAssistantMessage__images__0__item, {"type": _b.literal("image_url"), "image_url": _b.struct(_T.ChatAssistantMessage__images__0__item__image_url, {"url": _S.String})})), _S.Null), "model": _S.String.annotate(description="Model that generated this assistant message"), "name": _S.String.annotate(description="Optional name for the assistant"), "reasoning": _b.union(_S.String, _S.Null).annotate(description="Reasoning output"), "reasoning_details": ChatReasoningDetails, "refusal": _b.union(_S.String, _S.Null).annotate(description="Refusal message if content was refused"), "role": _b.literal("assistant"), "tool_calls": _b.array(ChatToolCall).annotate(description="Tool calls made by the assistant"), "annotations": _b.union(_b.array(_b.union(_b.struct(_T.ChatAssistantMessage__annotations__0__item__0, {"type": _b.literal("url_citation"), "url_citation": _b.struct(_T.ChatAssistantMessage__annotations__0__item__0__url_citation, {"url": _S.String, "title": _S.String, "start_index": _b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), "end_index": _b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), "content": _S.String}, optional=("title", "start_index", "end_index", "content",))}), _b.struct(_T.ChatAssistantMessage__annotations__0__item__1, {"type": _b.literal("file_annotation"), "file_annotation": _b.struct(_T.ChatAssistantMessage__annotations__0__item__1__file_annotation, {"file_id": _S.String, "quote": _S.String}, optional=("quote",))}), _b.struct(_T.ChatAssistantMessage__annotations__0__item__2, {"type": _b.literal("file"), "file": _b.struct(_T.ChatAssistantMessage__annotations__0__item__2__file, {"hash": _S.String, "name": _S.String, "content": _b.array(_b.struct(_T.ChatAssistantMessage__annotations__0__item__2__file__content__item, {"type": _S.String, "text": _S.String}, optional=("text",)))}, optional=("content",))}), mode="one_of")), _S.Null)}, optional=("audio", "content", "images", "model", "name", "reasoning", "reasoning_details", "refusal", "tool_calls", "annotations",)).annotate(description="Assistant message for requests and responses", identifier="ChatAssistantMessage")
|
|
867
|
+
ChatStreamDelta: _StructSchema[_T.ChatStreamDelta, _t.Never, _t.Never] = _b.struct(_T.ChatStreamDelta, {"audio": _b.suspend(lambda: ChatAudioOutput).annotate(description="Audio output data"), "content": _b.union(_S.String, _S.Null).annotate(description="Message content delta"), "reasoning": _b.union(_S.String, _S.Null).annotate(description="Reasoning content delta"), "reasoning_details": ChatStreamReasoningDetails, "refusal": _b.union(_S.String, _S.Null).annotate(description="Refusal message delta"), "role": _b.literal("assistant").annotate(description="The role of the message author"), "tool_calls": _b.array(ChatStreamToolCall).annotate(description="Tool calls delta"), "images": _b.union(_b.array(_b.struct(_T.ChatStreamDelta__images__0__item, {"type": _b.literal("image_url"), "image_url": _b.struct(_T.ChatStreamDelta__images__0__item__image_url, {"url": _S.String})})), _S.Null), "annotations": _b.union(_b.array(_b.union(_b.struct(_T.ChatStreamDelta__annotations__0__item__0, {"type": _b.literal("url_citation"), "url_citation": _b.struct(_T.ChatStreamDelta__annotations__0__item__0__url_citation, {"url": _S.String, "title": _S.String, "start_index": _b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), "end_index": _b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), "content": _S.String}, optional=("title", "start_index", "end_index", "content",))}), _b.struct(_T.ChatStreamDelta__annotations__0__item__1, {"type": _b.literal("file_annotation"), "file_annotation": _b.struct(_T.ChatStreamDelta__annotations__0__item__1__file_annotation, {"file_id": _S.String, "quote": _S.String}, optional=("quote",))}), _b.struct(_T.ChatStreamDelta__annotations__0__item__2, {"type": _b.literal("file"), "file": _b.struct(_T.ChatStreamDelta__annotations__0__item__2__file, {"hash": _S.String, "name": _S.String, "content": _b.array(_b.struct(_T.ChatStreamDelta__annotations__0__item__2__file__content__item, {"type": _S.String, "text": _S.String}, optional=("text",)))}, optional=("content",))}), mode="one_of")), _S.Null)}, optional=("audio", "content", "reasoning", "reasoning_details", "refusal", "role", "tool_calls", "images", "annotations",)).annotate(description="Delta changes in streaming response", identifier="ChatStreamDelta")
|
|
868
|
+
AdditionalToolsItem: _StructSchema[_T.AdditionalToolsItem, _t.Never, _t.Never] = _b.struct(_T.AdditionalToolsItem, {"id": _b.union(_S.String, _S.Null), "role": _b.literals(["unknown", "user", "assistant", "system", "critic", "discriminator", "developer", "tool"]), "tools": _b.array(_b.union(_b.struct(_T.AdditionalToolsItem__tools__item__0, {"description": _b.union(_S.String, _S.Null), "name": _S.String, "parameters": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "strict": _b.union(_S.Boolean, _S.Null), "type": _b.literal("function")}, optional=("description", "strict",)).annotate(description="Function tool definition"), Preview_WebSearchServerTool, Preview_20250311_WebSearchServerTool, Legacy_WebSearchServerTool, WebSearchServerTool, FileSearchServerTool, ComputerUseServerTool, CodeInterpreterServerTool, McpServerTool, ImageGenerationServerTool, CodexLocalShellTool, ShellServerTool, ApplyPatchServerTool, CustomTool, NamespaceTool, AdvisorServerTool_OpenRouter, SubagentServerTool_OpenRouter, DatetimeServerTool, FilesServerTool, FusionServerTool_OpenRouter, ImageGenerationServerTool_OpenRouter, SearchModelsServerTool_OpenRouter, WebFetchServerTool, WebSearchServerTool_OpenRouter, ApplyPatchServerTool_OpenRouter, BashServerTool, ShellServerTool_OpenRouter, _b.struct(_T.AdditionalToolsItem__tools__item__27, {"type": _S.String}))), "type": _b.literal("additional_tools")}, optional=("id",)).annotate(description="Additional tools made available to the model at this point in the input", identifier="AdditionalToolsItem")
|
|
869
|
+
ChatFunctionTool: _S.Bottom[_T.ChatFunctionTool, _t.Any] = _b.union(_b.struct(_T.ChatFunctionTool__0, {"cache_control": ChatContentCacheControl, "function": _b.struct(_T.ChatFunctionTool__0__function, {"description": _S.String.annotate(description="Function description for the model"), "name": _b.check(_S.String.annotate(description="Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)"), _S.is_max_length(64).annotate(expected="a value with a length of at most 64")), "parameters": _b.struct(_T.ChatFunctionTool__0__function__parameters, {}).annotate(description="Function parameters as JSON Schema object"), "strict": _b.union(_S.Boolean, _S.Null).annotate(description="Enable strict schema adherence")}, optional=("description", "parameters", "strict",)).annotate(description="Function definition for tool calling"), "type": _b.literal("function")}, optional=("cache_control",)), AdvisorServerTool_OpenRouter, BashServerTool, DatetimeServerTool, FilesServerTool, FusionServerTool_OpenRouter, ImageGenerationServerTool_OpenRouter, ChatSearchModelsServerTool, SubagentServerTool_OpenRouter, WebFetchServerTool, OpenRouterWebSearchServerTool, ChatWebSearchShorthand).annotate(description="Tool definition for function calling (regular function or OpenRouter built-in server tool)", identifier="ChatFunctionTool")
|
|
870
|
+
BaseInputs: _S.Bottom[_T.BaseInputs, _t.Any] = _b.union(_S.String, _b.array(_b.union(_b.struct(_T.BaseInputs__1__item__0, {"content": _b.union(_b.array(_b.union(InputText, InputImage, InputFile, InputAudio, mode="one_of")), _S.String), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null), "role": _b.literals(["user", "system", "assistant", "developer"]), "type": _b.literal("message")}, optional=("phase", "type",)), OpenAIResponseInputMessageItem, OpenAIResponseFunctionToolCallOutput, OpenAIResponseFunctionToolCall, OutputItemImageGenerationCall, OutputMessage, OpenAIResponseCustomToolCall, OpenAIResponseCustomToolCallOutput, ApplyPatchCallItem, ApplyPatchCallOutputItem)), _S.Null).annotate(identifier="BaseInputs")
|
|
871
|
+
OutputItemAddedEvent: _StructSchema[_T.OutputItemAddedEvent, _t.Never, _t.Never] = _b.struct(_T.OutputItemAddedEvent, {"item": _b.union(OutputMessage, OutputItemReasoning, OutputItemFunctionCall, OutputItemCustomToolCall, OutputItemWebSearchCall, OutputItemFileSearchCall, OutputItemImageGenerationCall, OutputItemApplyPatchCall, mode="one_of"), "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.output_item.added")}).annotate(description="Event emitted when a new output item is added to the response", identifier="OutputItemAddedEvent")
|
|
872
|
+
OutputItemDoneEvent: _StructSchema[_T.OutputItemDoneEvent, _t.Never, _t.Never] = _b.struct(_T.OutputItemDoneEvent, {"item": _b.union(OutputMessage, OutputItemReasoning, OutputItemFunctionCall, OutputItemCustomToolCall, OutputItemWebSearchCall, OutputItemFileSearchCall, OutputItemImageGenerationCall, OutputItemApplyPatchCall, mode="one_of"), "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.output_item.done")}).annotate(description="Event emitted when an output item is complete", identifier="OutputItemDoneEvent")
|
|
873
|
+
OutputItems: _S.Bottom[_T.OutputItems, _t.Any] = _b.union(OutputMessageItem, OutputReasoningItem, OutputFunctionCallItem, OutputWebSearchCallItem, OutputFileSearchCallItem, OutputImageGenerationCallItem, OutputCodeInterpreterCallItem, OutputComputerCallItem, OutputDatetimeItem, OutputWebSearchServerToolItem, OutputCodeInterpreterServerToolItem, OutputFileSearchServerToolItem, OutputImageGenerationServerToolItem, OutputBrowserUseServerToolItem, OutputBashServerToolItem, OutputTextEditorServerToolItem, OutputApplyPatchServerToolItem, OutputApplyPatchCallItem, OutputShellCallItem, OutputShellCallOutputItem, OutputWebFetchServerToolItem, OutputToolSearchServerToolItem, OutputMemoryServerToolItem, OutputMcpServerToolItem, OutputSearchModelsServerToolItem, OutputFusionServerToolItem, OutputAdvisorServerToolItem, OutputSubagentServerToolItem, OutputFilesServerToolItem, OutputCustomToolCallItem, mode="one_of").annotate(description="An output item from the response", identifier="OutputItems")
|
|
874
|
+
AnthropicWebFetchToolResult: _StructSchema[_T.AnthropicWebFetchToolResult, _t.Never, _t.Never] = _b.struct(_T.AnthropicWebFetchToolResult, {"caller": AnthropicCaller, "content": AnthropicWebFetchContent, "tool_use_id": _S.String, "type": _b.literal("web_fetch_tool_result")}).annotate(identifier="AnthropicWebFetchToolResult")
|
|
875
|
+
MessagesRequest: _StructSchema[_T.MessagesRequest, _t.Never, _t.Never] = _b.struct(_T.MessagesRequest, {"cache_control": AnthropicCacheControlDirective, "context_management": _b.union(_b.struct_with_rest(_b.struct(_T.MessagesRequest__context_management__0, {"edits": _b.array(_b.union(_b.struct(_T.MessagesRequest__context_management__0__edits__item__0, {"clear_at_least": AnthropicInputTokensClearAtLeast, "clear_tool_inputs": _b.union(_S.Boolean, _b.array(_S.String), _S.Null), "exclude_tools": _b.union(_b.array(_S.String), _S.Null), "keep": AnthropicToolUsesKeep, "trigger": _b.union(AnthropicInputTokensTrigger, AnthropicToolUsesTrigger, mode="one_of"), "type": _b.literal("clear_tool_uses_20250919")}, optional=("clear_at_least", "clear_tool_inputs", "exclude_tools", "keep", "trigger",)), _b.struct(_T.MessagesRequest__context_management__0__edits__item__1, {"keep": _b.union(AnthropicThinkingTurns, _b.struct(_T.MessagesRequest__context_management__0__edits__item__1__keep__1, {"type": _b.literal("all")}), _b.literal("all")), "type": _b.literal("clear_thinking_20251015")}, optional=("keep",)), _b.struct(_T.MessagesRequest__context_management__0__edits__item__2, {"instructions": _b.union(_S.String, _S.Null), "pause_after_compaction": _S.Boolean, "trigger": _b.union(_b.struct(_T.MessagesRequest__context_management__0__edits__item__2__trigger__0, {"type": _b.literal("input_tokens"), "value": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), _S.Null), "type": _b.literal("compact_20260112")}, optional=("instructions", "pause_after_compaction", "trigger",)), mode="one_of"))}, optional=("edits",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null), "fallbacks": _b.union(_b.array(MessagesFallbackParam), _S.Null).annotate(description="Fallback models to try if the primary model fails or refuses, in order. Handled by OpenRouter multi-model routing rather than Anthropic server-side fallbacks; cannot be combined with `models`. Each entry accepts only `model`. Maximum of 3 entries."), "max_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "messages": _b.union(_b.array(MessagesMessageParam), _S.Null), "metadata": _b.struct(_T.MessagesRequest__metadata, {"user_id": _b.union(_S.String, _S.Null)}, optional=("user_id",)), "model": _S.String, "models": _b.array(_S.String), "output_config": MessagesOutputConfig, "plugins": _b.array(_b.union(AutoRouterPlugin, AutoBetaRouterPlugin, ModerationPlugin, WebSearchPlugin, WebFetchPlugin, FileParserPlugin, ResponseHealingPlugin, ContextCompressionPlugin, ParetoRouterPlugin, FusionPlugin, mode="one_of")).annotate(description="Plugins you want to enable for this request, including their settings."), "provider": ProviderPreferences, "route": DeprecatedRoute, "service_tier": _S.String, "session_id": _b.check(_S.String.annotate(description="A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."), _S.is_max_length(256).annotate(expected="a value with a length of at most 256")), "speed": _b.suspend(lambda: AnthropicSpeed).annotate(description="Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted."), "stop_sequences": _b.array(_S.String), "stop_server_tools_when": StopServerToolsWhen, "stream": _S.Boolean, "system": _b.union(_S.String, _b.array(AnthropicTextBlockParam)), "temperature": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "thinking": _b.union(_b.struct(_T.MessagesRequest__thinking__0, {"budget_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "display": AnthropicThinkingDisplay, "type": _b.literal("enabled")}, optional=("display",)), _b.struct(_T.MessagesRequest__thinking__1, {"type": _b.literal("disabled")}), _b.struct(_T.MessagesRequest__thinking__2, {"display": AnthropicThinkingDisplay, "type": _b.literal("adaptive")}, optional=("display",)), mode="one_of"), "tool_choice": _b.union(_b.struct(_T.MessagesRequest__tool_choice__0, {"disable_parallel_tool_use": _S.Boolean, "type": _b.literal("auto")}, optional=("disable_parallel_tool_use",)), _b.struct(_T.MessagesRequest__tool_choice__1, {"disable_parallel_tool_use": _S.Boolean, "type": _b.literal("any")}, optional=("disable_parallel_tool_use",)), _b.struct(_T.MessagesRequest__tool_choice__2, {"type": _b.literal("none")}), _b.struct(_T.MessagesRequest__tool_choice__3, {"disable_parallel_tool_use": _S.Boolean, "name": _S.String, "type": _b.literal("tool")}, optional=("disable_parallel_tool_use",)), mode="one_of"), "tools": _b.array(_b.union(_b.struct(_T.MessagesRequest__tools__item__0, {"cache_control": AnthropicCacheControlDirective, "description": _S.String, "input_schema": _b.struct(_T.MessagesRequest__tools__item__0__input_schema, {"properties": _S.Json.annotate(expected="JSON value"), "required": _b.union(_b.array(_S.String), _S.Null), "type": _S.String}, optional=("properties", "required", "type",)), "name": _S.String, "type": _b.literal("custom")}, optional=("cache_control", "description", "type",)), _b.struct(_T.MessagesRequest__tools__item__1, {"cache_control": AnthropicCacheControlDirective, "name": _b.literal("bash"), "type": _b.literal("bash_20250124")}, optional=("cache_control",)), _b.struct(_T.MessagesRequest__tools__item__2, {"cache_control": AnthropicCacheControlDirective, "name": _b.literal("str_replace_editor"), "type": _b.literal("text_editor_20250124")}, optional=("cache_control",)), _b.struct(_T.MessagesRequest__tools__item__3, {"allowed_domains": _b.union(_b.array(_S.String), _S.Null), "blocked_domains": _b.union(_b.array(_S.String), _S.Null), "cache_control": AnthropicCacheControlDirective, "max_uses": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "name": _b.literal("web_search"), "type": _b.literal("web_search_20250305"), "user_location": AnthropicWebSearchToolUserLocation}, optional=("allowed_domains", "blocked_domains", "cache_control", "max_uses", "user_location",)), _b.struct(_T.MessagesRequest__tools__item__4, {"allowed_callers": AnthropicAllowedCallers, "allowed_domains": _b.union(_b.array(_S.String), _S.Null), "blocked_domains": _b.union(_b.array(_S.String), _S.Null), "cache_control": AnthropicCacheControlDirective, "max_uses": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "name": _b.literal("web_search"), "type": _b.literal("web_search_20260209"), "user_location": AnthropicWebSearchToolUserLocation}, optional=("allowed_callers", "allowed_domains", "blocked_domains", "cache_control", "max_uses", "user_location",)), _b.struct(_T.MessagesRequest__tools__item__5, {"allowed_callers": AnthropicAllowedCallers, "cache_control": AnthropicCacheControlDirective, "caching": _b.union(AnthropicCacheControlDirective, _S.Null), "defer_loading": _S.Boolean, "max_uses": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "name": _b.literal("advisor"), "type": _b.literal("advisor_20260301")}, optional=("allowed_callers", "cache_control", "caching", "defer_loading", "max_uses",)), BashServerTool, DatetimeServerTool, ImageGenerationServerTool_OpenRouter, MessagesSearchModelsServerTool, WebFetchServerTool, OpenRouterWebSearchServerTool, _b.struct(_T.MessagesRequest__tools__item__12, {"type": _S.String}), AnthropicToolSearchToolBm25, AnthropicToolSearchToolRegex)), "top_k": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "top_p": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "trace": TraceConfig, "user": _b.check(_S.String.annotate(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."), _S.is_max_length(256).annotate(expected="a value with a length of at most 256"))}, optional=("cache_control", "context_management", "fallbacks", "max_tokens", "metadata", "models", "output_config", "plugins", "provider", "route", "service_tier", "session_id", "speed", "stop_sequences", "stop_server_tools_when", "stream", "system", "temperature", "thinking", "tool_choice", "tools", "top_k", "top_p", "trace", "user",)).annotate(description="Request schema for Anthropic Messages API endpoint", identifier="MessagesRequest")
|
|
876
|
+
ImageGenerationUsage: _StructSchema[_T.ImageGenerationUsage, _t.Never, _t.Never] = _b.struct(_T.ImageGenerationUsage, {"cache_creation": AnthropicCacheCreation, "completion_tokens": _b.check(_S.Number.annotate(description="The tokens generated"), _S.is_int().annotate(expected="an integer")), "completion_tokens_details": Union_6, "cost": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Cost of the completion", format="double"), "cost_details": CostDetails, "is_byok": _S.Boolean.annotate(description="Whether a request was made using a Bring Your Own Key configuration"), "iterations": Union_7, "prompt_tokens": _b.check(_S.Number.annotate(description="Including images, input audio, and tools if any"), _S.is_int().annotate(expected="an integer")), "prompt_tokens_details": Union_8, "server_tool_use": Union_9, "service_tier": _b.union(_S.String, _S.Null).annotate(description="The service tier used by the upstream provider for this request"), "speed": AnthropicSpeed, "total_tokens": _b.check(_S.Number.annotate(description="Sum of the above two fields"), _S.is_int().annotate(expected="an integer"))}, optional=("cache_creation", "completion_tokens_details", "cost", "cost_details", "is_byok", "iterations", "prompt_tokens_details", "server_tool_use", "service_tier", "speed",)).annotate(description="Token and cost usage for the image generation request, when available", identifier="ImageGenerationUsage")
|
|
877
|
+
ModelsListResponse: _StructSchema[_T.ModelsListResponse, _t.Never, _t.Never] = _b.struct(_T.ModelsListResponse, {"data": ModelsListResponseData, "links": _b.struct(_T.ModelsListResponse__links, {"next": _b.union(_S.String, _S.Null).annotate(description="URL for the next page of results, or null if this is the last page")}).annotate(description="Pagination links"), "total_count": _b.check(_S.Number.annotate(description="Total number of models matching the query"), _S.is_int().annotate(expected="an integer"))}).annotate(description="List of available models", identifier="ModelsListResponse")
|
|
878
|
+
ChatChoice: _StructSchema[_T.ChatChoice, _t.Never, _t.Never] = _b.struct(_T.ChatChoice, {"finish_reason": ChatFinishReasonEnum, "index": _b.check(_S.Number.annotate(description="Choice index"), _S.is_int().annotate(expected="an integer")), "logprobs": ChatTokenLogprobs, "message": ChatAssistantMessage}, optional=("logprobs",)).annotate(description="Chat completion choice", identifier="ChatChoice")
|
|
879
|
+
ChatMessages: _S.Bottom[_T.ChatMessages, _t.Any] = _b.union(ChatSystemMessage, ChatUserMessage, ChatDeveloperMessage, ChatAssistantMessage, ChatToolMessage, mode="one_of").annotate(description="Chat completion message with role-based discrimination", identifier="ChatMessages")
|
|
880
|
+
ChatStreamChoice: _StructSchema[_T.ChatStreamChoice, _t.Never, _t.Never] = _b.struct(_T.ChatStreamChoice, {"delta": ChatStreamDelta, "finish_reason": ChatFinishReasonEnum, "index": _b.check(_S.Number.annotate(description="Choice index"), _S.is_int().annotate(expected="an integer")), "logprobs": ChatTokenLogprobs}, optional=("finish_reason", "logprobs",)).annotate(description="Streaming completion choice chunk", identifier="ChatStreamChoice")
|
|
881
|
+
Arrays_8: _S.Bottom[_T.Arrays_8, _t.Any] = _b.array(_b.union(ReasoningItem, EasyInputMessage, InputMessageItem, FunctionCallItem, FunctionCallOutputItem, ApplyPatchCallItem, ApplyPatchCallOutputItem, _b.struct(_T.Arrays_8__item__7, {"content": _b.union(_b.array(_b.union(_b.union(_b.struct(_T.Arrays_8__item__7__content__0__item__0__0, {"annotations": _b.array(_b.union(_b.union(_b.struct(_T.Arrays_8__item__7__content__0__item__0__0__annotations__item__0__0, {"file_id": _S.String, "filename": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("file_citation")}), _b.struct(_T.Arrays_8__item__7__content__0__item__0__0__annotations__item__0__1, {"content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "type": _S.Never, "url": _S.String, "file_id": _S.String, "filename": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("content",)), _b.struct(_T.Arrays_8__item__7__content__0__item__0__0__annotations__item__0__2, {"file_id": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.Never, "filename": _S.String})), _b.union(_b.struct(_T.Arrays_8__item__7__content__0__item__0__0__annotations__item__1__0, {"file_id": _S.String, "filename": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.Never, "content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "url": _S.String}, optional=("content",)), _b.struct(_T.Arrays_8__item__7__content__0__item__0__0__annotations__item__1__1, {"content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "type": _b.literal("url_citation"), "url": _S.String}, optional=("content",)), _b.struct(_T.Arrays_8__item__7__content__0__item__0__0__annotations__item__1__2, {"file_id": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.Never, "content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "url": _S.String}, optional=("content",))), _b.union(_b.struct(_T.Arrays_8__item__7__content__0__item__0__0__annotations__item__2__0, {"file_id": _S.String, "filename": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.Never}), _b.struct(_T.Arrays_8__item__7__content__0__item__0__0__annotations__item__2__1, {"content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "type": _S.Never, "url": _S.String, "file_id": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("content",)), _b.struct(_T.Arrays_8__item__7__content__0__item__0__0__annotations__item__2__2, {"file_id": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("file_path")})))), "logprobs": _b.array(_b.struct(_T.Arrays_8__item__7__content__0__item__0__0__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.Arrays_8__item__7__content__0__item__0__0__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}))})), "text": _S.String, "type": _b.literal("output_text")}, optional=("annotations", "logprobs",)), _b.struct(_T.Arrays_8__item__7__content__0__item__0__1, {"refusal": _S.String, "type": _S.Never, "annotations": _b.array(OpenAIResponsesAnnotation), "logprobs": _b.array(_b.struct(_T.Arrays_8__item__7__content__0__item__0__1__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.Arrays_8__item__7__content__0__item__0__1__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}))})), "text": _S.String}, optional=("annotations", "logprobs",))), _b.union(_b.struct(_T.Arrays_8__item__7__content__0__item__1__0, {"annotations": _b.array(OpenAIResponsesAnnotation), "logprobs": _b.array(_b.struct(_T.Arrays_8__item__7__content__0__item__1__0__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.Arrays_8__item__7__content__0__item__1__0__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}))})), "text": _S.String, "type": _S.Never, "refusal": _S.String}, optional=("annotations", "logprobs",)), _b.struct(_T.Arrays_8__item__7__content__0__item__1__1, {"refusal": _S.String, "type": _b.literal("refusal")}))))), "id": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.literals(["completed", "incomplete", "in_progress"]), "type": _b.literal("message")}, optional=("phase", "status",)).annotate(description="An output message item"), _b.struct(_T.Arrays_8__item__8, {"content": _b.union(_b.array(_b.struct(_T.Arrays_8__item__8__content__0__item, {"text": _S.String, "type": _b.literal("reasoning_text")}))), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.literals(["completed", "incomplete", "in_progress"]), "summary": _b.union(_b.array(_b.struct(_T.Arrays_8__item__8__summary__0__item, {"text": _S.String, "type": _b.literal("summary_text")}))), "type": _b.literal("reasoning"), "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null).annotate(description="A signature for the reasoning content, used for verification")}, optional=("content", "encrypted_content", "status", "format", "signature",)).annotate(description="An output item containing reasoning"), OutputFunctionCallItem, OutputCustomToolCallItem, OutputWebSearchCallItem, OutputFileSearchCallItem, OutputImageGenerationCallItem, OutputCodeInterpreterCallItem, OutputComputerCallItem, OutputDatetimeItem, OutputWebSearchServerToolItem, OutputCodeInterpreterServerToolItem, OutputFileSearchServerToolItem, OutputImageGenerationServerToolItem, OutputBrowserUseServerToolItem, OutputBashServerToolItem, OutputTextEditorServerToolItem, OutputApplyPatchServerToolItem, OutputWebFetchServerToolItem, OutputToolSearchServerToolItem, OutputMemoryServerToolItem, OutputMcpServerToolItem, OutputSearchModelsServerToolItem, OutputFusionServerToolItem, OutputAdvisorServerToolItem, OutputSubagentServerToolItem, OutputFilesServerToolItem, LocalShellCallItem, LocalShellCallOutputItem, ShellCallItem, ShellCallOutputItem, McpListToolsItem, McpApprovalRequestItem, McpApprovalResponseItem, McpCallItem, CustomToolCallItem, CustomToolCallOutputItem, CompactionItem, ContextCompactionItem, ItemReferenceItem, AdditionalToolsItem, AgentMessageItem))
|
|
882
|
+
BaseResponsesResult: _StructSchema[_T.BaseResponsesResult, _t.Never, _t.Never] = _b.struct(_T.BaseResponsesResult, {"background": _b.union(_S.Boolean, _S.Null), "completed_at": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "created_at": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "error": ResponsesErrorField, "frequency_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "id": _S.String, "incomplete_details": IncompleteDetails, "instructions": BaseInputs, "max_output_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "max_tool_calls": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "metadata": RequestMetadata, "model": _S.String, "object": _b.literal("response"), "output": _b.array(_b.union(OutputMessage, OutputItemReasoning, OutputItemFunctionCall, OutputItemCustomToolCall, OutputItemWebSearchCall, OutputItemFileSearchCall, OutputItemImageGenerationCall, OutputItemApplyPatchCall, mode="one_of")), "output_text": _S.String, "parallel_tool_calls": _S.Boolean, "presence_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "previous_response_id": _b.union(_S.String, _S.Null), "prompt": StoredPromptTemplate, "prompt_cache_key": _b.union(_S.String, _S.Null), "prompt_cache_options": PromptCacheOptions, "reasoning": BaseReasoningConfig, "safety_identifier": _b.union(_S.String, _S.Null), "service_tier": ServiceTier, "status": OpenAIResponsesResponseStatus, "store": _S.Boolean, "temperature": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "text": TextConfig, "tool_choice": OpenAIResponsesToolChoice, "tools": _b.array(_b.union(_b.struct(_T.BaseResponsesResult__tools__item__0, {"description": _b.union(_S.String, _S.Null), "name": _S.String, "parameters": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "strict": _b.union(_S.Boolean, _S.Null), "type": _b.literal("function")}, optional=("description", "strict",)).annotate(description="Function tool definition"), Preview_WebSearchServerTool, Preview_20250311_WebSearchServerTool, Legacy_WebSearchServerTool, WebSearchServerTool, FileSearchServerTool, ComputerUseServerTool, CodeInterpreterServerTool, McpServerTool, ImageGenerationServerTool, CodexLocalShellTool, ShellServerTool, ApplyPatchServerTool, CustomTool, NamespaceTool, mode="one_of")), "top_logprobs": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "top_p": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "truncation": Truncation, "usage": OpenAIResponsesUsage, "user": _b.union(_S.String, _S.Null)}, optional=("background", "max_output_tokens", "max_tool_calls", "output_text", "previous_response_id", "prompt", "prompt_cache_key", "prompt_cache_options", "reasoning", "safety_identifier", "service_tier", "store", "text", "top_logprobs", "truncation", "usage", "user",)).annotate(identifier="BaseResponsesResult")
|
|
883
|
+
OpenResponsesResult: _StructSchema[_T.OpenResponsesResult, _t.Never, _t.Never] = _b.struct(_T.OpenResponsesResult, {"background": _b.union(_S.Boolean, _S.Null), "completed_at": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "created_at": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "error": ResponsesErrorField, "frequency_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "id": _S.String, "incomplete_details": IncompleteDetails, "instructions": BaseInputs, "max_output_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "max_tool_calls": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "metadata": RequestMetadata, "model": _S.String, "object": _b.literal("response"), "output": _b.array(_b.union(_b.union(_b.struct(_T.OpenResponsesResult__output__item__0__0, {"content": _b.array(_b.union(_b.union(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0, {"annotations": _b.array(_b.union(_b.union(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__annotations__item__0__0, {"file_id": _S.String, "filename": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("file_citation")}), _b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__annotations__item__0__1, {"content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "type": _S.Never, "url": _S.String, "file_id": _S.String, "filename": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("content",)), _b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__annotations__item__0__2, {"file_id": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.Never, "filename": _S.String})), _b.union(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__annotations__item__1__0, {"file_id": _S.String, "filename": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.Never, "content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "url": _S.String}, optional=("content",)), _b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__annotations__item__1__1, {"content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "type": _b.literal("url_citation"), "url": _S.String}, optional=("content",)), _b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__annotations__item__1__2, {"file_id": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.Never, "content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "url": _S.String}, optional=("content",))), _b.union(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__annotations__item__2__0, {"file_id": _S.String, "filename": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.Never}), _b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__annotations__item__2__1, {"content": _S.String, "end_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "title": _S.String, "type": _S.Never, "url": _S.String, "file_id": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("content",)), _b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__annotations__item__2__2, {"file_id": _S.String, "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("file_path")})))), "logprobs": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__0__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}))})), "text": _S.String, "type": _b.literal("output_text")}, optional=("annotations", "logprobs",)), _b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__1, {"refusal": _S.String, "type": _S.Never, "annotations": _b.array(OpenAIResponsesAnnotation), "logprobs": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__1__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__0__1__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}))})), "text": _S.String}, optional=("annotations", "logprobs",))), _b.union(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__1__0, {"annotations": _b.array(OpenAIResponsesAnnotation), "logprobs": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__1__0__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__1__0__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}))})), "text": _S.String, "type": _S.Never, "refusal": _S.String}, optional=("annotations", "logprobs",)), _b.struct(_T.OpenResponsesResult__output__item__0__0__content__item__1__1, {"refusal": _S.String, "type": _b.literal("refusal")})))), "id": _S.String, "phase": _b.union(_b.literal("commentary").annotate(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."), _b.literal("final_answer").annotate(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."), _b.union(_S.Null).annotate(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.")).annotate(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": _b.literal("assistant"), "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "type": _b.literal("message")}, optional=("phase", "status",)).annotate(description="An output message item"), _b.struct(_T.OpenResponsesResult__output__item__0__1, {"content": _b.union(_b.array(_b.union(_b.struct(_T.OpenResponsesResult__output__item__0__1__content__0__item__0, {"annotations": _b.array(OpenAIResponsesAnnotation), "logprobs": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__1__content__0__item__0__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__1__content__0__item__0__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}))})), "text": _S.String, "type": _S.Never}, optional=("annotations", "logprobs",)), _b.struct(_T.OpenResponsesResult__output__item__0__1__content__0__item__1, {"refusal": _S.String, "type": _S.Never, "text": _S.String})))), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "summary": _b.array(ReasoningSummaryText), "type": _S.Never, "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null).annotate(description="A signature for the reasoning content, used for verification"), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("encrypted_content", "status", "format", "signature", "phase",)).annotate(description="An output item containing reasoning"), _b.struct(_T.OpenResponsesResult__output__item__0__2, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("namespace", "status", "phase",)), _b.struct(_T.OpenResponsesResult__output__item__0__3, {"action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__0__3__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__0__3__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__0__3__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("action", "phase",)), _b.struct(_T.OpenResponsesResult__output__item__0__4, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("phase",)), _b.struct(_T.OpenResponsesResult__output__item__0__5, {"id": _S.String, "result": _b.union(_S.String, _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("result", "prompt", "phase",)), _b.struct(_T.OpenResponsesResult__output__item__0__6, {"code": _b.union(_S.String, _S.Null), "container_id": _S.String, "id": _S.String, "outputs": _b.union(_b.array(_b.union(_b.struct(_T.OpenResponsesResult__output__item__0__6__outputs__0__item__0, {"type": _b.literal("image"), "url": _S.String}), _b.struct(_T.OpenResponsesResult__output__item__0__6__outputs__0__item__1, {"logs": _S.String, "type": _b.literal("logs")}))), _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("phase",)).annotate(description="A code interpreter execution call with outputs"), _b.struct(_T.OpenResponsesResult__output__item__0__7, {"action": _S.Json.annotate(expected="JSON value"), "call_id": _S.String, "id": _S.String, "pending_safety_checks": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__7__pending_safety_checks__item, {"code": _S.String, "id": _S.String, "message": _S.String})), "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("action", "phase",)), _b.struct(_T.OpenResponsesResult__output__item__0__8, {"datetime": _S.String.annotate(description="ISO 8601 datetime string"), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "timezone": _S.String.annotate(description="IANA timezone name"), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("phase",)).annotate(description="An openrouter:datetime server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__9, {"action": _b.struct(_T.OpenResponsesResult__output__item__0__9__action, {"query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__9__action__sources__item, {"type": _b.literal("url"), "url": _S.String})), "type": _b.literal("search")}, optional=("sources",)).annotate(description="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": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("action", "phase",)).annotate(description="An openrouter:web_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__10, {"code": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "language": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("code", "exitCode", "language", "stderr", "stdout", "phase",)).annotate(description="An openrouter:code_interpreter server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__11, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("queries", "phase",)).annotate(description="An openrouter:file_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__12, {"id": _S.String, "imageB64": _S.String, "imageUrl": _S.String, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "result": _b.union(_S.String, _S.Null).annotate(description="The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"), "revisedPrompt": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("imageB64", "imageUrl", "prompt", "result", "revisedPrompt", "phase",)).annotate(description="An openrouter:image_generation server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__13, {"action": _S.String, "id": _S.String, "screenshotB64": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("action", "screenshotB64", "phase",)).annotate(description="An openrouter:browser_use server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__14, {"arguments": _S.String.annotate(description="The raw tool-call arguments string as emitted by the model."), "call_id": _S.String.annotate(description="The model-generated tool call id from the originating turn."), "command": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("arguments", "call_id", "command", "exitCode", "stderr", "stdout", "phase",)).annotate(description="An openrouter:bash server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__15, {"command": _b.literals(["view", "create", "str_replace", "insert"]), "filePath": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("command", "filePath", "phase",)).annotate(description="An openrouter:text_editor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__16, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("call_id", "operation", "phase",)).annotate(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."), _b.struct(_T.OpenResponsesResult__output__item__0__17, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Lifecycle state of an `apply_patch_call` output item."), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("phase",)).annotate(description="A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand."), _b.struct(_T.OpenResponsesResult__output__item__0__18, {"action": _b.struct(_T.OpenResponsesResult__output__item__0__18__action, {"commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}), "call_id": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("action", "phase",)).annotate(description="A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool."), _b.struct(_T.OpenResponsesResult__output__item__0__19, {"call_id": _S.String, "id": _S.String, "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "output": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__19__output__item, {"outcome": _b.union(_b.struct(_T.OpenResponsesResult__output__item__0__19__output__item__outcome__0, {"exit_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("exit")}), _b.struct(_T.OpenResponsesResult__output__item__0__19__output__item__outcome__1, {"type": _b.literal("timeout")}), mode="one_of"), "stderr": _S.String, "stdout": _S.String})), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("max_output_length", "phase",)).annotate(description="A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome."), _b.struct(_T.OpenResponsesResult__output__item__0__20, {"content": _S.Never, "error": _S.String.annotate(description="The error message if the fetch failed."), "httpStatus": _b.check(_S.Number.annotate(description="The HTTP status code returned by the upstream URL fetch."), _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "title": _S.String, "type": _S.Never, "url": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("error", "httpStatus", "title", "url", "phase",)).annotate(description="An openrouter:web_fetch server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__21, {"id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("query", "phase",)).annotate(description="An openrouter:tool_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__22, {"action": _b.literals(["read", "write", "delete"]), "id": _S.String, "key": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "value": _S.Json.annotate(expected="JSON value"), "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("action", "key", "value", "phase",)).annotate(description="An openrouter:memory server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__23, {"id": _S.String, "serverLabel": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "toolName": _S.String, "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("serverLabel", "toolName", "phase",)).annotate(description="An openrouter:mcp server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__24, {"arguments": _S.String.annotate(description="The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"), "id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("arguments", "query", "phase",)).annotate(description="An openrouter:experimental__search_models server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__25, {"analysis": FusionAnalysisResult, "error": _S.String.annotate(description="Error message when the fusion run did not produce an analysis result."), "failed_models": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__25__failed_models__item, {"error": _S.String.annotate(description="Error message describing why the model failed."), "model": _S.String.annotate(description="Slug of the analysis model that failed."), "status_code": _b.check(_S.Number.annotate(description="HTTP status code from the upstream response, when available (e.g. 402, 429)."), _S.is_int().annotate(expected="an integer"))}, optional=("status_code",))).annotate(description="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."), "failure_reason": _S.String.annotate(description="Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."), "id": _S.String, "responses": _b.array(_b.struct(_T.OpenResponsesResult__output__item__0__25__responses__item, {"content": _S.String, "model": _S.String}, optional=("content",))).annotate(description="Analysis models that produced a response in this fusion run, with each model's full panel content."), "sources": _b.array(FusionSource).annotate(description="Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("analysis", "error", "failed_models", "failure_reason", "responses", "sources", "phase",)).annotate(description="An openrouter:fusion server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__26, {"advice": _S.String.annotate(description="The advisor model's response (the advice text returned to the executor)."), "error": _S.String.annotate(description="Error message when the advisor call did not produce advice."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."), "model": _S.String.annotate(description="Slug of the advisor model that was consulted."), "prompt": _S.String.annotate(description="The prompt the executor sent to the advisor."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("advice", "error", "instance_name", "model", "prompt", "phase",)).annotate(description="An openrouter:advisor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__27, {"error": _S.String.annotate(description="Error message when the subagent task did not produce an outcome."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) instance omits it, even when multiple subagents are configured. When a replayed item echoes this field back, the transcript rehydrates the call under that instance's tool. This identity is positional: it is derived from the index of the subagent entry in the request `tools` array, so keep the order of subagent entries stable across requests in a conversation."), "model": _S.String.annotate(description="Slug of the worker model that executed the task."), "name": _S.String.annotate(description="Configured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent."), "outcome": _S.String.annotate(description="The worker model's result (the outcome text returned to the delegating model)."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "task_description": _S.String.annotate(description="The task description the delegating model sent to the worker."), "task_name": _S.String.annotate(description="The short task identifier the delegating model supplied."), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("error", "instance_name", "model", "name", "outcome", "task_description", "task_name", "phase",)).annotate(description="An openrouter:subagent server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__28, {"error": _S.String.annotate(description="Error message when the file operation failed."), "file_id": _S.String.annotate(description="The target file id supplied in the tool-call arguments."), "filename": _S.String.annotate(description="The target filename supplied in the tool-call arguments."), "id": _S.String, "operation": _S.String.annotate(description="The file operation performed (list, read, write, or edit)."), "result": _S.String.annotate(description="JSON-serialized result of the file operation."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant")}, optional=("error", "file_id", "filename", "operation", "result", "phase",)).annotate(description="An openrouter:files server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__0__29, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _S.Never, "content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.literals(["completed", "incomplete", "in_progress"])}, optional=("namespace", "phase", "status",)).annotate(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."), mode="one_of").annotate(description="An output item from the response"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__1__0, {"content": _b.array(_b.union(_b.struct(_T.OpenResponsesResult__output__item__1__0__content__item__0, {"annotations": _b.array(OpenAIResponsesAnnotation), "logprobs": _b.array(_b.struct(_T.OpenResponsesResult__output__item__1__0__content__item__0__logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String, "top_logprobs": _b.array(_b.struct(_T.OpenResponsesResult__output__item__1__0__content__item__0__logprobs__item__top_logprobs__item, {"bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "logprob": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "token": _S.String}))})), "text": _S.String, "type": _S.Never}, optional=("annotations", "logprobs",)), _b.struct(_T.OpenResponsesResult__output__item__1__0__content__item__1, {"refusal": _S.String, "type": _S.Never, "text": _S.String}))), "id": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "type": _S.Never, "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("phase", "status", "encrypted_content",)).annotate(description="An output message item"), _b.struct(_T.OpenResponsesResult__output__item__1__1, {"content": _b.union(_b.array(_b.struct(_T.OpenResponsesResult__output__item__1__1__content__0__item, {"text": _S.String, "type": _b.literal("reasoning_text")}))), "encrypted_content": _b.union(_b.union(_S.String), _b.union(_S.Null)), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "summary": _b.array(_b.struct(_T.OpenResponsesResult__output__item__1__1__summary__item, {"text": _S.String, "type": _b.literal("summary_text")})), "type": _b.literal("reasoning"), "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null).annotate(description="A signature for the reasoning content, used for verification")}, optional=("content", "encrypted_content", "status", "format", "signature",)).annotate(description="An output item containing reasoning"), _b.struct(_T.OpenResponsesResult__output__item__1__2, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("namespace", "status", "content", "encrypted_content",)), _b.struct(_T.OpenResponsesResult__output__item__1__3, {"action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__1__3__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__1__3__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__1__3__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("action", "content", "encrypted_content",)), _b.struct(_T.OpenResponsesResult__output__item__1__4, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("content", "encrypted_content",)), _b.struct(_T.OpenResponsesResult__output__item__1__5, {"id": _S.String, "result": _b.union(_S.String, _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("result", "prompt", "content", "encrypted_content",)), _b.struct(_T.OpenResponsesResult__output__item__1__6, {"code": _b.union(_S.String, _S.Null), "container_id": _S.String, "id": _S.String, "outputs": _b.union(_b.array(_b.union(_b.struct(_T.OpenResponsesResult__output__item__1__6__outputs__0__item__0, {"type": _b.literal("image"), "url": _S.String}), _b.struct(_T.OpenResponsesResult__output__item__1__6__outputs__0__item__1, {"logs": _S.String, "type": _b.literal("logs")}))), _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("content", "encrypted_content",)).annotate(description="A code interpreter execution call with outputs"), _b.struct(_T.OpenResponsesResult__output__item__1__7, {"action": _S.Json.annotate(expected="JSON value"), "call_id": _S.String, "id": _S.String, "pending_safety_checks": _b.array(_b.struct(_T.OpenResponsesResult__output__item__1__7__pending_safety_checks__item, {"code": _S.String, "id": _S.String, "message": _S.String})), "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("action", "content", "encrypted_content",)), _b.struct(_T.OpenResponsesResult__output__item__1__8, {"datetime": _S.String.annotate(description="ISO 8601 datetime string"), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "timezone": _S.String.annotate(description="IANA timezone name"), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("content", "encrypted_content",)).annotate(description="An openrouter:datetime server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__9, {"action": _b.struct(_T.OpenResponsesResult__output__item__1__9__action, {"query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__1__9__action__sources__item, {"type": _b.literal("url"), "url": _S.String})), "type": _b.literal("search")}, optional=("sources",)).annotate(description="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": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("action", "content", "encrypted_content",)).annotate(description="An openrouter:web_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__10, {"code": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "language": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("code", "exitCode", "language", "stderr", "stdout", "content", "encrypted_content",)).annotate(description="An openrouter:code_interpreter server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__11, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("queries", "content", "encrypted_content",)).annotate(description="An openrouter:file_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__12, {"id": _S.String, "imageB64": _S.String, "imageUrl": _S.String, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "result": _b.union(_S.String, _S.Null).annotate(description="The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"), "revisedPrompt": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("imageB64", "imageUrl", "prompt", "result", "revisedPrompt", "content", "encrypted_content",)).annotate(description="An openrouter:image_generation server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__13, {"action": _S.String, "id": _S.String, "screenshotB64": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("action", "screenshotB64", "content", "encrypted_content",)).annotate(description="An openrouter:browser_use server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__14, {"arguments": _S.String.annotate(description="The raw tool-call arguments string as emitted by the model."), "call_id": _S.String.annotate(description="The model-generated tool call id from the originating turn."), "command": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("arguments", "call_id", "command", "exitCode", "stderr", "stdout", "content", "encrypted_content",)).annotate(description="An openrouter:bash server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__15, {"command": _b.literals(["view", "create", "str_replace", "insert"]), "filePath": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("command", "filePath", "content", "encrypted_content",)).annotate(description="An openrouter:text_editor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__16, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("call_id", "operation", "content", "encrypted_content",)).annotate(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."), _b.struct(_T.OpenResponsesResult__output__item__1__17, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Lifecycle state of an `apply_patch_call` output item."), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("content", "encrypted_content",)).annotate(description="A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand."), _b.struct(_T.OpenResponsesResult__output__item__1__18, {"action": _b.struct(_T.OpenResponsesResult__output__item__1__18__action, {"commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}), "call_id": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("action", "content", "encrypted_content",)).annotate(description="A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool."), _b.struct(_T.OpenResponsesResult__output__item__1__19, {"call_id": _S.String, "id": _S.String, "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "output": _b.array(_b.struct(_T.OpenResponsesResult__output__item__1__19__output__item, {"outcome": _b.union(_b.struct(_T.OpenResponsesResult__output__item__1__19__output__item__outcome__0, {"exit_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("exit")}), _b.struct(_T.OpenResponsesResult__output__item__1__19__output__item__outcome__1, {"type": _b.literal("timeout")}), mode="one_of"), "stderr": _S.String, "stdout": _S.String})), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("max_output_length", "content", "encrypted_content",)).annotate(description="A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome."), _b.struct(_T.OpenResponsesResult__output__item__1__20, {"content": _S.Never, "error": _S.String.annotate(description="The error message if the fetch failed."), "httpStatus": _b.check(_S.Number.annotate(description="The HTTP status code returned by the upstream URL fetch."), _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "title": _S.String, "type": _S.Never, "url": _S.String, "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("content", "error", "httpStatus", "title", "url", "encrypted_content",)).annotate(description="An openrouter:web_fetch server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__21, {"id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("query", "content", "encrypted_content",)).annotate(description="An openrouter:tool_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__22, {"action": _b.literals(["read", "write", "delete"]), "id": _S.String, "key": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "value": _S.Json.annotate(expected="JSON value"), "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("action", "key", "value", "content", "encrypted_content",)).annotate(description="An openrouter:memory server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__23, {"id": _S.String, "serverLabel": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "toolName": _S.String, "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("serverLabel", "toolName", "content", "encrypted_content",)).annotate(description="An openrouter:mcp server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__24, {"arguments": _S.String.annotate(description="The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"), "id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("arguments", "query", "content", "encrypted_content",)).annotate(description="An openrouter:experimental__search_models server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__25, {"analysis": FusionAnalysisResult, "error": _S.String.annotate(description="Error message when the fusion run did not produce an analysis result."), "failed_models": _b.array(_b.struct(_T.OpenResponsesResult__output__item__1__25__failed_models__item, {"error": _S.String.annotate(description="Error message describing why the model failed."), "model": _S.String.annotate(description="Slug of the analysis model that failed."), "status_code": _b.check(_S.Number.annotate(description="HTTP status code from the upstream response, when available (e.g. 402, 429)."), _S.is_int().annotate(expected="an integer"))}, optional=("status_code",))).annotate(description="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."), "failure_reason": _S.String.annotate(description="Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."), "id": _S.String, "responses": _b.array(_b.struct(_T.OpenResponsesResult__output__item__1__25__responses__item, {"content": _S.String, "model": _S.String}, optional=("content",))).annotate(description="Analysis models that produced a response in this fusion run, with each model's full panel content."), "sources": _b.array(FusionSource).annotate(description="Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("analysis", "error", "failed_models", "failure_reason", "responses", "sources", "content", "encrypted_content",)).annotate(description="An openrouter:fusion server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__26, {"advice": _S.String.annotate(description="The advisor model's response (the advice text returned to the executor)."), "error": _S.String.annotate(description="Error message when the advisor call did not produce advice."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."), "model": _S.String.annotate(description="Slug of the advisor model that was consulted."), "prompt": _S.String.annotate(description="The prompt the executor sent to the advisor."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("advice", "error", "instance_name", "model", "prompt", "content", "encrypted_content",)).annotate(description="An openrouter:advisor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__27, {"error": _S.String.annotate(description="Error message when the subagent task did not produce an outcome."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) instance omits it, even when multiple subagents are configured. When a replayed item echoes this field back, the transcript rehydrates the call under that instance's tool. This identity is positional: it is derived from the index of the subagent entry in the request `tools` array, so keep the order of subagent entries stable across requests in a conversation."), "model": _S.String.annotate(description="Slug of the worker model that executed the task."), "name": _S.String.annotate(description="Configured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent."), "outcome": _S.String.annotate(description="The worker model's result (the outcome text returned to the delegating model)."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "task_description": _S.String.annotate(description="The task description the delegating model sent to the worker."), "task_name": _S.String.annotate(description="The short task identifier the delegating model supplied."), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("error", "instance_name", "model", "name", "outcome", "task_description", "task_name", "content", "encrypted_content",)).annotate(description="An openrouter:subagent server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__28, {"error": _S.String.annotate(description="Error message when the file operation failed."), "file_id": _S.String.annotate(description="The target file id supplied in the tool-call arguments."), "filename": _S.String.annotate(description="The target filename supplied in the tool-call arguments."), "id": _S.String, "operation": _S.String.annotate(description="The file operation performed (list, read, write, or edit)."), "result": _S.String.annotate(description="JSON-serialized result of the file operation."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "summary": _b.array(ReasoningSummaryText)}, optional=("error", "file_id", "filename", "operation", "result", "content", "encrypted_content",)).annotate(description="An openrouter:files server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__1__29, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _S.Never, "content": _b.array(ReasoningTextContent), "encrypted_content": _b.union(_S.String, _S.Null), "status": _b.literals(["completed", "incomplete", "in_progress"]), "summary": _b.array(ReasoningSummaryText)}, optional=("namespace", "content", "encrypted_content", "status",)).annotate(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."), mode="one_of").annotate(description="An output item from the response"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__2__0, {"content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "id": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("phase", "status", "namespace",)).annotate(description="An output message item"), _b.struct(_T.OpenResponsesResult__output__item__2__1, {"content": _b.union(_b.array(_b.struct(_T.OpenResponsesResult__output__item__2__1__content__0__item, {"text": _S.String, "type": _b.literal("reasoning_text")}))), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "summary": _b.array(ReasoningSummaryText), "type": _S.Never, "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null).annotate(description="A signature for the reasoning content, used for verification"), "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("content", "encrypted_content", "status", "format", "signature", "namespace",)).annotate(description="An output item containing reasoning"), _b.struct(_T.OpenResponsesResult__output__item__2__2, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "type": _b.literal("function_call")}, optional=("id", "namespace", "status",)), _b.struct(_T.OpenResponsesResult__output__item__2__3, {"action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__2__3__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__2__3__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__2__3__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "namespace",)), _b.struct(_T.OpenResponsesResult__output__item__2__4, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("namespace",)), _b.struct(_T.OpenResponsesResult__output__item__2__5, {"id": _S.String, "result": _b.union(_S.String, _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("result", "prompt", "namespace",)), _b.struct(_T.OpenResponsesResult__output__item__2__6, {"code": _b.union(_S.String, _S.Null), "container_id": _S.String, "id": _S.String, "outputs": _b.union(_b.array(_b.union(_b.struct(_T.OpenResponsesResult__output__item__2__6__outputs__0__item__0, {"type": _b.literal("image"), "url": _S.String}), _b.struct(_T.OpenResponsesResult__output__item__2__6__outputs__0__item__1, {"logs": _S.String, "type": _b.literal("logs")}))), _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("namespace",)).annotate(description="A code interpreter execution call with outputs"), _b.struct(_T.OpenResponsesResult__output__item__2__7, {"action": _S.Json.annotate(expected="JSON value"), "call_id": _S.String, "id": _S.String, "pending_safety_checks": _b.array(_b.struct(_T.OpenResponsesResult__output__item__2__7__pending_safety_checks__item, {"code": _S.String, "id": _S.String, "message": _S.String})), "status": _b.union(_b.literal("completed"), _b.literal("incomplete"), _b.literal("in_progress")), "type": _S.Never, "arguments": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "id", "namespace",)), _b.struct(_T.OpenResponsesResult__output__item__2__8, {"datetime": _S.String.annotate(description="ISO 8601 datetime string"), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "timezone": _S.String.annotate(description="IANA timezone name"), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "namespace",)).annotate(description="An openrouter:datetime server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__9, {"action": _b.struct(_T.OpenResponsesResult__output__item__2__9__action, {"query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__2__9__action__sources__item, {"type": _b.literal("url"), "url": _S.String})), "type": _b.literal("search")}, optional=("sources",)).annotate(description="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": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "id", "namespace",)).annotate(description="An openrouter:web_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__10, {"code": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "language": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("code", "exitCode", "id", "language", "stderr", "stdout", "namespace",)).annotate(description="An openrouter:code_interpreter server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__11, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "queries", "namespace",)).annotate(description="An openrouter:file_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__12, {"id": _S.String, "imageB64": _S.String, "imageUrl": _S.String, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "result": _b.union(_S.String, _S.Null).annotate(description="The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"), "revisedPrompt": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "imageB64", "imageUrl", "prompt", "result", "revisedPrompt", "namespace",)).annotate(description="An openrouter:image_generation server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__13, {"action": _S.String, "id": _S.String, "screenshotB64": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "id", "screenshotB64", "namespace",)).annotate(description="An openrouter:browser_use server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__14, {"arguments": _S.String.annotate(description="The raw tool-call arguments string as emitted by the model."), "call_id": _S.String.annotate(description="The model-generated tool call id from the originating turn."), "command": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("command", "exitCode", "id", "stderr", "stdout", "namespace",)).annotate(description="An openrouter:bash server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__15, {"command": _b.literals(["view", "create", "str_replace", "insert"]), "filePath": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("command", "filePath", "id", "namespace",)).annotate(description="An openrouter:text_editor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__16, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "operation", "namespace",)).annotate(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."), _b.struct(_T.OpenResponsesResult__output__item__2__17, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Lifecycle state of an `apply_patch_call` output item."), "type": _S.Never, "arguments": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("namespace",)).annotate(description="A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand."), _b.struct(_T.OpenResponsesResult__output__item__2__18, {"action": _b.struct(_T.OpenResponsesResult__output__item__2__18__action, {"commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}), "call_id": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "arguments": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "namespace",)).annotate(description="A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool."), _b.struct(_T.OpenResponsesResult__output__item__2__19, {"call_id": _S.String, "id": _S.String, "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "output": _b.array(_b.struct(_T.OpenResponsesResult__output__item__2__19__output__item, {"outcome": _b.union(_b.struct(_T.OpenResponsesResult__output__item__2__19__output__item__outcome__0, {"exit_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("exit")}), _b.struct(_T.OpenResponsesResult__output__item__2__19__output__item__outcome__1, {"type": _b.literal("timeout")}), mode="one_of"), "stderr": _S.String, "stdout": _S.String})), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "arguments": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("max_output_length", "namespace",)).annotate(description="A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome."), _b.struct(_T.OpenResponsesResult__output__item__2__20, {"content": _S.String, "error": _S.String.annotate(description="The error message if the fetch failed."), "httpStatus": _b.check(_S.Number.annotate(description="The HTTP status code returned by the upstream URL fetch."), _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "title": _S.String, "type": _S.Never, "url": _S.String, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("content", "error", "httpStatus", "id", "title", "url", "namespace",)).annotate(description="An openrouter:web_fetch server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__21, {"id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "query", "namespace",)).annotate(description="An openrouter:tool_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__22, {"action": _b.literals(["read", "write", "delete"]), "id": _S.String, "key": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "value": _S.Json.annotate(expected="JSON value"), "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "id", "key", "value", "namespace",)).annotate(description="An openrouter:memory server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__23, {"id": _S.String, "serverLabel": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "toolName": _S.String, "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "serverLabel", "toolName", "namespace",)).annotate(description="An openrouter:mcp server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__24, {"arguments": _S.String.annotate(description="The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"), "id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "query", "namespace",)).annotate(description="An openrouter:experimental__search_models server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__25, {"analysis": FusionAnalysisResult, "error": _S.String.annotate(description="Error message when the fusion run did not produce an analysis result."), "failed_models": _b.array(_b.struct(_T.OpenResponsesResult__output__item__2__25__failed_models__item, {"error": _S.String.annotate(description="Error message describing why the model failed."), "model": _S.String.annotate(description="Slug of the analysis model that failed."), "status_code": _b.check(_S.Number.annotate(description="HTTP status code from the upstream response, when available (e.g. 402, 429)."), _S.is_int().annotate(expected="an integer"))}, optional=("status_code",))).annotate(description="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."), "failure_reason": _S.String.annotate(description="Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."), "id": _S.String, "responses": _b.array(_b.struct(_T.OpenResponsesResult__output__item__2__25__responses__item, {"content": _S.String, "model": _S.String}, optional=("content",))).annotate(description="Analysis models that produced a response in this fusion run, with each model's full panel content."), "sources": _b.array(FusionSource).annotate(description="Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("analysis", "error", "failed_models", "failure_reason", "id", "responses", "sources", "namespace",)).annotate(description="An openrouter:fusion server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__26, {"advice": _S.String.annotate(description="The advisor model's response (the advice text returned to the executor)."), "error": _S.String.annotate(description="Error message when the advisor call did not produce advice."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."), "model": _S.String.annotate(description="Slug of the advisor model that was consulted."), "prompt": _S.String.annotate(description="The prompt the executor sent to the advisor."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("advice", "error", "id", "instance_name", "model", "prompt", "namespace",)).annotate(description="An openrouter:advisor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__27, {"error": _S.String.annotate(description="Error message when the subagent task did not produce an outcome."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) instance omits it, even when multiple subagents are configured. When a replayed item echoes this field back, the transcript rehydrates the call under that instance's tool. This identity is positional: it is derived from the index of the subagent entry in the request `tools` array, so keep the order of subagent entries stable across requests in a conversation."), "model": _S.String.annotate(description="Slug of the worker model that executed the task."), "name": _S.String.annotate(description="Configured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent."), "outcome": _S.String.annotate(description="The worker model's result (the outcome text returned to the delegating model)."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "task_description": _S.String.annotate(description="The task description the delegating model sent to the worker."), "task_name": _S.String.annotate(description="The short task identifier the delegating model supplied."), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("error", "id", "instance_name", "model", "outcome", "task_description", "task_name", "namespace",)).annotate(description="An openrouter:subagent server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__28, {"error": _S.String.annotate(description="Error message when the file operation failed."), "file_id": _S.String.annotate(description="The target file id supplied in the tool-call arguments."), "filename": _S.String.annotate(description="The target filename supplied in the tool-call arguments."), "id": _S.String, "operation": _S.String.annotate(description="The file operation performed (list, read, write, or edit)."), "result": _S.String.annotate(description="JSON-serialized result of the file operation."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("incomplete")), "type": _S.Never, "arguments": _S.String, "call_id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("error", "file_id", "filename", "id", "operation", "result", "namespace",)).annotate(description="An openrouter:files server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__2__29, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _S.Never, "arguments": _S.String, "status": _b.literals(["completed", "incomplete", "in_progress"])}, optional=("id", "namespace", "status",)).annotate(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."), mode="one_of").annotate(description="An output item from the response"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__3__0, {"content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "id": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.literals(["completed", "incomplete", "in_progress"]), "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("phase", "status", "namespace",)).annotate(description="An output message item"), _b.struct(_T.OpenResponsesResult__output__item__3__1, {"content": _b.union(_b.array(_b.struct(_T.OpenResponsesResult__output__item__3__1__content__0__item, {"text": _S.String, "type": _b.literal("reasoning_text")}))), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.literals(["completed", "incomplete", "in_progress"]), "summary": _b.array(ReasoningSummaryText), "type": _S.Never, "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null).annotate(description="A signature for the reasoning content, used for verification"), "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("content", "encrypted_content", "status", "format", "signature", "namespace",)).annotate(description="An output item containing reasoning"), _b.struct(_T.OpenResponsesResult__output__item__3__2, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": _b.literals(["completed", "incomplete", "in_progress"]), "type": _S.Never, "input": _S.String}, optional=("id", "namespace", "status",)), _b.struct(_T.OpenResponsesResult__output__item__3__3, {"action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__3__3__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__3__3__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__3__3__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "id": _S.String, "status": WebSearchStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "namespace",)), _b.struct(_T.OpenResponsesResult__output__item__3__4, {"id": _S.String, "queries": _b.array(_S.String), "status": WebSearchStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("namespace",)), _b.struct(_T.OpenResponsesResult__output__item__3__5, {"id": _S.String, "result": _b.union(_S.String, _S.Null), "status": ImageGenerationStatus, "type": _S.Never, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("result", "prompt", "namespace",)), _b.struct(_T.OpenResponsesResult__output__item__3__6, {"code": _b.union(_S.String, _S.Null), "container_id": _S.String, "id": _S.String, "outputs": _b.union(_b.array(_b.union(_b.struct(_T.OpenResponsesResult__output__item__3__6__outputs__0__item__0, {"type": _b.literal("image"), "url": _S.String}), _b.struct(_T.OpenResponsesResult__output__item__3__6__outputs__0__item__1, {"logs": _S.String, "type": _b.literal("logs")}))), _S.Null), "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("namespace",)).annotate(description="A code interpreter execution call with outputs"), _b.struct(_T.OpenResponsesResult__output__item__3__7, {"action": _S.Json.annotate(expected="JSON value"), "call_id": _S.String, "id": _S.String, "pending_safety_checks": _b.array(_b.struct(_T.OpenResponsesResult__output__item__3__7__pending_safety_checks__item, {"code": _S.String, "id": _S.String, "message": _S.String})), "status": _b.literals(["completed", "incomplete", "in_progress"]), "type": _S.Never, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "id", "namespace",)), _b.struct(_T.OpenResponsesResult__output__item__3__8, {"datetime": _S.String.annotate(description="ISO 8601 datetime string"), "id": _S.String, "status": ToolCallStatus, "timezone": _S.String.annotate(description="IANA timezone name"), "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "namespace",)).annotate(description="An openrouter:datetime server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__9, {"action": _b.struct(_T.OpenResponsesResult__output__item__3__9__action, {"query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__3__9__action__sources__item, {"type": _b.literal("url"), "url": _S.String})), "type": _b.literal("search")}, optional=("sources",)).annotate(description="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": _S.String, "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "id", "namespace",)).annotate(description="An openrouter:web_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__10, {"code": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "language": _S.String, "status": ToolCallStatus, "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("code", "exitCode", "id", "language", "stderr", "stdout", "namespace",)).annotate(description="An openrouter:code_interpreter server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__11, {"id": _S.String, "queries": _b.array(_S.String), "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "queries", "namespace",)).annotate(description="An openrouter:file_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__12, {"id": _S.String, "imageB64": _S.String, "imageUrl": _S.String, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "result": _b.union(_S.String, _S.Null).annotate(description="The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"), "revisedPrompt": _S.String, "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "imageB64", "imageUrl", "prompt", "result", "revisedPrompt", "namespace",)).annotate(description="An openrouter:image_generation server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__13, {"action": _S.String, "id": _S.String, "screenshotB64": _S.String, "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "id", "screenshotB64", "namespace",)).annotate(description="An openrouter:browser_use server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__14, {"arguments": _S.String.annotate(description="The raw tool-call arguments string as emitted by the model."), "call_id": _S.String.annotate(description="The model-generated tool call id from the originating turn."), "command": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": ToolCallStatus, "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("arguments", "command", "exitCode", "id", "stderr", "stdout", "namespace",)).annotate(description="An openrouter:bash server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__15, {"command": _b.literals(["view", "create", "str_replace", "insert"]), "filePath": _S.String, "id": _S.String, "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("command", "filePath", "id", "namespace",)).annotate(description="An openrouter:text_editor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__16, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": ToolCallStatus, "type": _S.Never, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "operation", "namespace",)).annotate(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."), _b.struct(_T.OpenResponsesResult__output__item__3__17, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": ApplyPatchCallStatus, "type": _S.Never, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("namespace",)).annotate(description="A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand."), _b.struct(_T.OpenResponsesResult__output__item__3__18, {"action": _b.struct(_T.OpenResponsesResult__output__item__3__18__action, {"commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}), "call_id": _S.String, "id": _S.String, "status": ShellCallStatus, "type": _S.Never, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "namespace",)).annotate(description="A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool."), _b.struct(_T.OpenResponsesResult__output__item__3__19, {"call_id": _S.String, "id": _S.String, "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "output": _b.array(_b.struct(_T.OpenResponsesResult__output__item__3__19__output__item, {"outcome": _b.union(_b.struct(_T.OpenResponsesResult__output__item__3__19__output__item__outcome__0, {"exit_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("exit")}), _b.struct(_T.OpenResponsesResult__output__item__3__19__output__item__outcome__1, {"type": _b.literal("timeout")}), mode="one_of"), "stderr": _S.String, "stdout": _S.String})), "status": ShellCallStatus, "type": _S.Never, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("max_output_length", "namespace",)).annotate(description="A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome."), _b.struct(_T.OpenResponsesResult__output__item__3__20, {"content": _S.String, "error": _S.String.annotate(description="The error message if the fetch failed."), "httpStatus": _b.check(_S.Number.annotate(description="The HTTP status code returned by the upstream URL fetch."), _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": ToolCallStatus, "title": _S.String, "type": _S.Never, "url": _S.String, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("content", "error", "httpStatus", "id", "title", "url", "namespace",)).annotate(description="An openrouter:web_fetch server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__21, {"id": _S.String, "query": _S.String, "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "query", "namespace",)).annotate(description="An openrouter:tool_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__22, {"action": _b.literals(["read", "write", "delete"]), "id": _S.String, "key": _S.String, "status": ToolCallStatus, "type": _S.Never, "value": _S.Json.annotate(expected="JSON value"), "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("action", "id", "key", "value", "namespace",)).annotate(description="An openrouter:memory server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__23, {"id": _S.String, "serverLabel": _S.String, "status": ToolCallStatus, "toolName": _S.String, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("id", "serverLabel", "toolName", "namespace",)).annotate(description="An openrouter:mcp server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__24, {"arguments": _S.String.annotate(description="The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"), "id": _S.String, "query": _S.String, "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("arguments", "id", "query", "namespace",)).annotate(description="An openrouter:experimental__search_models server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__25, {"analysis": FusionAnalysisResult, "error": _S.String.annotate(description="Error message when the fusion run did not produce an analysis result."), "failed_models": _b.array(_b.struct(_T.OpenResponsesResult__output__item__3__25__failed_models__item, {"error": _S.String.annotate(description="Error message describing why the model failed."), "model": _S.String.annotate(description="Slug of the analysis model that failed."), "status_code": _b.check(_S.Number.annotate(description="HTTP status code from the upstream response, when available (e.g. 402, 429)."), _S.is_int().annotate(expected="an integer"))}, optional=("status_code",))).annotate(description="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."), "failure_reason": _S.String.annotate(description="Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."), "id": _S.String, "responses": _b.array(_b.struct(_T.OpenResponsesResult__output__item__3__25__responses__item, {"content": _S.String, "model": _S.String}, optional=("content",))).annotate(description="Analysis models that produced a response in this fusion run, with each model's full panel content."), "sources": _b.array(FusionSource).annotate(description="Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source."), "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("analysis", "error", "failed_models", "failure_reason", "id", "responses", "sources", "namespace",)).annotate(description="An openrouter:fusion server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__26, {"advice": _S.String.annotate(description="The advisor model's response (the advice text returned to the executor)."), "error": _S.String.annotate(description="Error message when the advisor call did not produce advice."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."), "model": _S.String.annotate(description="Slug of the advisor model that was consulted."), "prompt": _S.String.annotate(description="The prompt the executor sent to the advisor."), "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("advice", "error", "id", "instance_name", "model", "prompt", "namespace",)).annotate(description="An openrouter:advisor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__27, {"error": _S.String.annotate(description="Error message when the subagent task did not produce an outcome."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) instance omits it, even when multiple subagents are configured. When a replayed item echoes this field back, the transcript rehydrates the call under that instance's tool. This identity is positional: it is derived from the index of the subagent entry in the request `tools` array, so keep the order of subagent entries stable across requests in a conversation."), "model": _S.String.annotate(description="Slug of the worker model that executed the task."), "name": _S.String.annotate(description="Configured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent."), "outcome": _S.String.annotate(description="The worker model's result (the outcome text returned to the delegating model)."), "status": ToolCallStatus, "task_description": _S.String.annotate(description="The task description the delegating model sent to the worker."), "task_name": _S.String.annotate(description="The short task identifier the delegating model supplied."), "type": _S.Never, "call_id": _S.String, "input": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("error", "id", "instance_name", "model", "outcome", "task_description", "task_name", "namespace",)).annotate(description="An openrouter:subagent server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__28, {"error": _S.String.annotate(description="Error message when the file operation failed."), "file_id": _S.String.annotate(description="The target file id supplied in the tool-call arguments."), "filename": _S.String.annotate(description="The target filename supplied in the tool-call arguments."), "id": _S.String, "operation": _S.String.annotate(description="The file operation performed (list, read, write, or edit)."), "result": _S.String.annotate(description="JSON-serialized result of the file operation."), "status": ToolCallStatus, "type": _S.Never, "call_id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)")}, optional=("error", "file_id", "filename", "id", "operation", "result", "namespace",)).annotate(description="An openrouter:files server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__3__29, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _b.literal("custom_tool_call")}, optional=("id", "namespace",)).annotate(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."), mode="one_of").annotate(description="An output item from the response"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__0, {"content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "id": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__0__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__0__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__0__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("phase", "action",)).annotate(description="An output message item"), _b.struct(_T.OpenResponsesResult__output__item__4__1, {"content": _b.union(_b.array(_b.struct(_T.OpenResponsesResult__output__item__4__1__content__0__item, {"text": _S.String, "type": _b.literal("reasoning_text")}))), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "summary": _b.array(ReasoningSummaryText), "type": _S.Never, "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null).annotate(description="A signature for the reasoning content, used for verification"), "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__1__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__1__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__1__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("content", "encrypted_content", "format", "signature", "action",)).annotate(description="An output item containing reasoning"), _b.struct(_T.OpenResponsesResult__output__item__4__2, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__2__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__2__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__2__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("namespace", "action",)), _b.struct(_T.OpenResponsesResult__output__item__4__3, {"action": _b.union(_b.union(_b.struct(_T.OpenResponsesResult__output__item__4__3__action__0__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__4__3__action__0__0__sources__item, {"type": _b.literal("url"), "url": _S.String})), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__3__action__0__1, {"type": _S.Never, "url": _b.union(_S.String, _S.Null), "queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource)}, optional=("url", "queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__3__action__0__2, {"pattern": _S.String, "type": _S.Never, "url": _S.String, "queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource)}, optional=("queries", "sources",)), mode="one_of"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__3__action__1__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _S.Never, "url": _b.union(_S.String, _S.Null)}, optional=("queries", "sources", "url",)), _b.struct(_T.OpenResponsesResult__output__item__4__3__action__1__1, {"type": _b.literal("open_page"), "url": _b.union(_b.union(_S.String), _b.union(_S.Null))}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__3__action__1__2, {"pattern": _S.String, "type": _S.Never, "url": _b.union(_S.String)}), mode="one_of"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__3__action__2__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _S.Never, "pattern": _S.String, "url": _S.String}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__3__action__2__1, {"type": _S.Never, "url": _b.union(_S.String), "pattern": _S.String}), _b.struct(_T.OpenResponsesResult__output__item__4__3__action__2__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), mode="one_of"), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("searching"), _b.literal("in_progress"), _b.literal("failed")), "type": _b.literal("web_search_call")}, optional=("action",)), _b.struct(_T.OpenResponsesResult__output__item__4__4, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("completed"), _b.literal("searching"), _b.literal("in_progress"), _b.literal("failed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__4__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__4__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__4__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("action",)), _b.struct(_T.OpenResponsesResult__output__item__4__5, {"id": _S.String, "result": _b.union(_S.String, _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("failed")), "type": _S.Never, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__5__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__5__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__5__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("result", "prompt", "action",)), _b.struct(_T.OpenResponsesResult__output__item__4__6, {"code": _b.union(_S.String, _S.Null), "container_id": _S.String, "id": _S.String, "outputs": _b.union(_b.array(_b.union(_b.struct(_T.OpenResponsesResult__output__item__4__6__outputs__0__item__0, {"type": _b.literal("image"), "url": _S.String}), _b.struct(_T.OpenResponsesResult__output__item__4__6__outputs__0__item__1, {"logs": _S.String, "type": _b.literal("logs")}))), _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__6__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__6__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__6__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("action",)).annotate(description="A code interpreter execution call with outputs"), _b.struct(_T.OpenResponsesResult__output__item__4__7, {"action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__7__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__7__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__7__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "call_id": _S.String, "id": _S.String, "pending_safety_checks": _b.array(_b.struct(_T.OpenResponsesResult__output__item__4__7__pending_safety_checks__item, {"code": _S.String, "id": _S.String, "message": _S.String})), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never}, optional=("action",)), _b.struct(_T.OpenResponsesResult__output__item__4__8, {"datetime": _S.String.annotate(description="ISO 8601 datetime string"), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "timezone": _S.String.annotate(description="IANA timezone name"), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__8__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__8__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__8__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("action",)).annotate(description="An openrouter:datetime server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__9, {"action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__9__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__4__9__action__0__sources__item, {"type": _b.literal("url"), "url": _S.String})), "type": _b.literal("search")}, optional=("queries", "sources",)).annotate(description="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."), _b.struct(_T.OpenResponsesResult__output__item__4__9__action__1, {"type": _S.Never, "url": _b.union(_S.String, _S.Null), "query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__4__9__action__1__sources__item, {"type": _b.literal("url"), "url": _S.String}))}, optional=("url", "sources",)).annotate(description="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."), _b.struct(_T.OpenResponsesResult__output__item__4__9__action__2, {"pattern": _S.String, "type": _S.Never, "url": _S.String, "query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__4__9__action__2__sources__item, {"type": _b.literal("url"), "url": _S.String}))}, optional=("sources",)).annotate(description="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."), mode="one_of"), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never}, optional=("action",)).annotate(description="An openrouter:web_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__10, {"code": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "language": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__10__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__10__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__10__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("code", "exitCode", "language", "stderr", "stdout", "action",)).annotate(description="An openrouter:code_interpreter server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__11, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__11__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__11__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__11__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("queries", "action",)).annotate(description="An openrouter:file_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__12, {"id": _S.String, "imageB64": _S.String, "imageUrl": _S.String, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "result": _b.union(_S.String, _S.Null).annotate(description="The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"), "revisedPrompt": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__12__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__12__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__12__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("imageB64", "imageUrl", "prompt", "result", "revisedPrompt", "action",)).annotate(description="An openrouter:image_generation server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__13, {"action": _S.Never, "id": _S.String, "screenshotB64": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never}, optional=("action", "screenshotB64",)).annotate(description="An openrouter:browser_use server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__14, {"arguments": _S.String.annotate(description="The raw tool-call arguments string as emitted by the model."), "call_id": _S.String.annotate(description="The model-generated tool call id from the originating turn."), "command": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__14__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__14__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__14__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("arguments", "call_id", "command", "exitCode", "stderr", "stdout", "action",)).annotate(description="An openrouter:bash server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__15, {"command": _b.literals(["view", "create", "str_replace", "insert"]), "filePath": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__15__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__15__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__15__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("command", "filePath", "action",)).annotate(description="An openrouter:text_editor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__16, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__16__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__16__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__16__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("call_id", "operation", "action",)).annotate(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."), _b.struct(_T.OpenResponsesResult__output__item__4__17, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Lifecycle state of an `apply_patch_call` output item."), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__17__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__17__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__17__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("action",)).annotate(description="A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand."), _b.struct(_T.OpenResponsesResult__output__item__4__18, {"action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__18__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search"), "commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__18__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null), "commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__18__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String, "commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}), mode="one_of"), "call_id": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Status of a shell call or its output."), "type": _S.Never}, optional=("action",)).annotate(description="A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool."), _b.struct(_T.OpenResponsesResult__output__item__4__19, {"call_id": _S.String, "id": _S.String, "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "output": _b.array(_b.struct(_T.OpenResponsesResult__output__item__4__19__output__item, {"outcome": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__19__output__item__outcome__0, {"exit_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("exit")}), _b.struct(_T.OpenResponsesResult__output__item__4__19__output__item__outcome__1, {"type": _b.literal("timeout")}), mode="one_of"), "stderr": _S.String, "stdout": _S.String})), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__19__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__19__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__19__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("max_output_length", "action",)).annotate(description="A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome."), _b.struct(_T.OpenResponsesResult__output__item__4__20, {"content": _S.String, "error": _S.String.annotate(description="The error message if the fetch failed."), "httpStatus": _b.check(_S.Number.annotate(description="The HTTP status code returned by the upstream URL fetch."), _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "title": _S.String, "type": _S.Never, "url": _S.String, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__20__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__20__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__20__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("content", "error", "httpStatus", "title", "url", "action",)).annotate(description="An openrouter:web_fetch server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__21, {"id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__21__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__21__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__21__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("query", "action",)).annotate(description="An openrouter:tool_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__22, {"action": _S.Never, "id": _S.String, "key": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "value": _S.Json.annotate(expected="JSON value")}, optional=("action", "key", "value",)).annotate(description="An openrouter:memory server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__23, {"id": _S.String, "serverLabel": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "toolName": _S.String, "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__23__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__23__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__23__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("serverLabel", "toolName", "action",)).annotate(description="An openrouter:mcp server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__24, {"arguments": _S.String.annotate(description="The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"), "id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__24__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__24__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__24__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("arguments", "query", "action",)).annotate(description="An openrouter:experimental__search_models server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__25, {"analysis": FusionAnalysisResult, "error": _S.String.annotate(description="Error message when the fusion run did not produce an analysis result."), "failed_models": _b.array(_b.struct(_T.OpenResponsesResult__output__item__4__25__failed_models__item, {"error": _S.String.annotate(description="Error message describing why the model failed."), "model": _S.String.annotate(description="Slug of the analysis model that failed."), "status_code": _b.check(_S.Number.annotate(description="HTTP status code from the upstream response, when available (e.g. 402, 429)."), _S.is_int().annotate(expected="an integer"))}, optional=("status_code",))).annotate(description="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."), "failure_reason": _S.String.annotate(description="Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."), "id": _S.String, "responses": _b.array(_b.struct(_T.OpenResponsesResult__output__item__4__25__responses__item, {"content": _S.String, "model": _S.String}, optional=("content",))).annotate(description="Analysis models that produced a response in this fusion run, with each model's full panel content."), "sources": _b.array(FusionSource).annotate(description="Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__25__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__25__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__25__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("analysis", "error", "failed_models", "failure_reason", "responses", "sources", "action",)).annotate(description="An openrouter:fusion server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__26, {"advice": _S.String.annotate(description="The advisor model's response (the advice text returned to the executor)."), "error": _S.String.annotate(description="Error message when the advisor call did not produce advice."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."), "model": _S.String.annotate(description="Slug of the advisor model that was consulted."), "prompt": _S.String.annotate(description="The prompt the executor sent to the advisor."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__26__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__26__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__26__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("advice", "error", "instance_name", "model", "prompt", "action",)).annotate(description="An openrouter:advisor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__27, {"error": _S.String.annotate(description="Error message when the subagent task did not produce an outcome."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) instance omits it, even when multiple subagents are configured. When a replayed item echoes this field back, the transcript rehydrates the call under that instance's tool. This identity is positional: it is derived from the index of the subagent entry in the request `tools` array, so keep the order of subagent entries stable across requests in a conversation."), "model": _S.String.annotate(description="Slug of the worker model that executed the task."), "name": _S.String.annotate(description="Configured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent."), "outcome": _S.String.annotate(description="The worker model's result (the outcome text returned to the delegating model)."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "task_description": _S.String.annotate(description="The task description the delegating model sent to the worker."), "task_name": _S.String.annotate(description="The short task identifier the delegating model supplied."), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__27__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__27__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__27__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("error", "instance_name", "model", "name", "outcome", "task_description", "task_name", "action",)).annotate(description="An openrouter:subagent server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__28, {"error": _S.String.annotate(description="Error message when the file operation failed."), "file_id": _S.String.annotate(description="The target file id supplied in the tool-call arguments."), "filename": _S.String.annotate(description="The target filename supplied in the tool-call arguments."), "id": _S.String, "operation": _S.String.annotate(description="The file operation performed (list, read, write, or edit)."), "result": _S.String.annotate(description="JSON-serialized result of the file operation."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__28__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__28__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__28__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of")}, optional=("error", "file_id", "filename", "operation", "result", "action",)).annotate(description="An openrouter:files server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__4__29, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _S.Never, "action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__4__29__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__4__29__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__4__29__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "status": WebSearchStatus}, optional=("namespace", "action",)).annotate(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."), mode="one_of").annotate(description="An output item from the response"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__5__0, {"content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "id": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("phase",)).annotate(description="An output message item"), _b.struct(_T.OpenResponsesResult__output__item__5__1, {"content": _b.union(_b.array(_b.struct(_T.OpenResponsesResult__output__item__5__1__content__0__item, {"text": _S.String, "type": _b.literal("reasoning_text")}))), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "summary": _b.array(ReasoningSummaryText), "type": _S.Never, "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null).annotate(description="A signature for the reasoning content, used for verification"), "queries": _b.array(_S.String)}, optional=("content", "encrypted_content", "format", "signature",)).annotate(description="An output item containing reasoning"), _b.struct(_T.OpenResponsesResult__output__item__5__2, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("namespace",)), _b.struct(_T.OpenResponsesResult__output__item__5__3, {"action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__5__3__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__5__3__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__5__3__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("searching"), _b.literal("in_progress"), _b.literal("failed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("action",)), _b.struct(_T.OpenResponsesResult__output__item__5__4, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("completed"), _b.literal("searching"), _b.literal("in_progress"), _b.literal("failed")), "type": _b.literal("file_search_call")}), _b.struct(_T.OpenResponsesResult__output__item__5__5, {"id": _S.String, "result": _b.union(_S.String, _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("failed")), "type": _S.Never, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "queries": _b.array(_S.String)}, optional=("result", "prompt",)), _b.struct(_T.OpenResponsesResult__output__item__5__6, {"code": _b.union(_S.String, _S.Null), "container_id": _S.String, "id": _S.String, "outputs": _b.union(_b.array(_b.union(_b.struct(_T.OpenResponsesResult__output__item__5__6__outputs__0__item__0, {"type": _b.literal("image"), "url": _S.String}), _b.struct(_T.OpenResponsesResult__output__item__5__6__outputs__0__item__1, {"logs": _S.String, "type": _b.literal("logs")}))), _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}).annotate(description="A code interpreter execution call with outputs"), _b.struct(_T.OpenResponsesResult__output__item__5__7, {"action": _S.Json.annotate(expected="JSON value"), "call_id": _S.String, "id": _S.String, "pending_safety_checks": _b.array(_b.struct(_T.OpenResponsesResult__output__item__5__7__pending_safety_checks__item, {"code": _S.String, "id": _S.String, "message": _S.String})), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("action",)), _b.struct(_T.OpenResponsesResult__output__item__5__8, {"datetime": _S.String.annotate(description="ISO 8601 datetime string"), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "timezone": _S.String.annotate(description="IANA timezone name"), "type": _S.Never, "queries": _b.array(_S.String)}).annotate(description="An openrouter:datetime server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__9, {"action": _b.struct(_T.OpenResponsesResult__output__item__5__9__action, {"query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__5__9__action__sources__item, {"type": _b.literal("url"), "url": _S.String})), "type": _b.literal("search")}, optional=("sources",)).annotate(description="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": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("action",)).annotate(description="An openrouter:web_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__10, {"code": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "language": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "queries": _b.array(_S.String)}, optional=("code", "exitCode", "language", "stderr", "stdout",)).annotate(description="An openrouter:code_interpreter server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__11, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never}).annotate(description="An openrouter:file_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__12, {"id": _S.String, "imageB64": _S.String, "imageUrl": _S.String, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "result": _b.union(_S.String, _S.Null).annotate(description="The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"), "revisedPrompt": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("imageB64", "imageUrl", "prompt", "result", "revisedPrompt",)).annotate(description="An openrouter:image_generation server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__13, {"action": _S.String, "id": _S.String, "screenshotB64": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("action", "screenshotB64",)).annotate(description="An openrouter:browser_use server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__14, {"arguments": _S.String.annotate(description="The raw tool-call arguments string as emitted by the model."), "call_id": _S.String.annotate(description="The model-generated tool call id from the originating turn."), "command": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "queries": _b.array(_S.String)}, optional=("arguments", "call_id", "command", "exitCode", "stderr", "stdout",)).annotate(description="An openrouter:bash server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__15, {"command": _b.literals(["view", "create", "str_replace", "insert"]), "filePath": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("command", "filePath",)).annotate(description="An openrouter:text_editor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__16, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("call_id", "operation",)).annotate(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."), _b.struct(_T.OpenResponsesResult__output__item__5__17, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Lifecycle state of an `apply_patch_call` output item."), "type": _S.Never, "queries": _b.array(_S.String)}).annotate(description="A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand."), _b.struct(_T.OpenResponsesResult__output__item__5__18, {"action": _b.struct(_T.OpenResponsesResult__output__item__5__18__action, {"commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}), "call_id": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("action",)).annotate(description="A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool."), _b.struct(_T.OpenResponsesResult__output__item__5__19, {"call_id": _S.String, "id": _S.String, "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "output": _b.array(_b.struct(_T.OpenResponsesResult__output__item__5__19__output__item, {"outcome": _b.union(_b.struct(_T.OpenResponsesResult__output__item__5__19__output__item__outcome__0, {"exit_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("exit")}), _b.struct(_T.OpenResponsesResult__output__item__5__19__output__item__outcome__1, {"type": _b.literal("timeout")}), mode="one_of"), "stderr": _S.String, "stdout": _S.String})), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("max_output_length",)).annotate(description="A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome."), _b.struct(_T.OpenResponsesResult__output__item__5__20, {"content": _S.String, "error": _S.String.annotate(description="The error message if the fetch failed."), "httpStatus": _b.check(_S.Number.annotate(description="The HTTP status code returned by the upstream URL fetch."), _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "title": _S.String, "type": _S.Never, "url": _S.String, "queries": _b.array(_S.String)}, optional=("content", "error", "httpStatus", "title", "url",)).annotate(description="An openrouter:web_fetch server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__21, {"id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("query",)).annotate(description="An openrouter:tool_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__22, {"action": _b.literals(["read", "write", "delete"]), "id": _S.String, "key": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "value": _S.Json.annotate(expected="JSON value"), "queries": _b.array(_S.String)}, optional=("action", "key", "value",)).annotate(description="An openrouter:memory server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__23, {"id": _S.String, "serverLabel": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "toolName": _S.String, "type": _S.Never, "queries": _b.array(_S.String)}, optional=("serverLabel", "toolName",)).annotate(description="An openrouter:mcp server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__24, {"arguments": _S.String.annotate(description="The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"), "id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("arguments", "query",)).annotate(description="An openrouter:experimental__search_models server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__25, {"analysis": FusionAnalysisResult, "error": _S.String.annotate(description="Error message when the fusion run did not produce an analysis result."), "failed_models": _b.array(_b.struct(_T.OpenResponsesResult__output__item__5__25__failed_models__item, {"error": _S.String.annotate(description="Error message describing why the model failed."), "model": _S.String.annotate(description="Slug of the analysis model that failed."), "status_code": _b.check(_S.Number.annotate(description="HTTP status code from the upstream response, when available (e.g. 402, 429)."), _S.is_int().annotate(expected="an integer"))}, optional=("status_code",))).annotate(description="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."), "failure_reason": _S.String.annotate(description="Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."), "id": _S.String, "responses": _b.array(_b.struct(_T.OpenResponsesResult__output__item__5__25__responses__item, {"content": _S.String, "model": _S.String}, optional=("content",))).annotate(description="Analysis models that produced a response in this fusion run, with each model's full panel content."), "sources": _b.array(FusionSource).annotate(description="Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("analysis", "error", "failed_models", "failure_reason", "responses", "sources",)).annotate(description="An openrouter:fusion server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__26, {"advice": _S.String.annotate(description="The advisor model's response (the advice text returned to the executor)."), "error": _S.String.annotate(description="Error message when the advisor call did not produce advice."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."), "model": _S.String.annotate(description="Slug of the advisor model that was consulted."), "prompt": _S.String.annotate(description="The prompt the executor sent to the advisor."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("advice", "error", "instance_name", "model", "prompt",)).annotate(description="An openrouter:advisor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__27, {"error": _S.String.annotate(description="Error message when the subagent task did not produce an outcome."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) instance omits it, even when multiple subagents are configured. When a replayed item echoes this field back, the transcript rehydrates the call under that instance's tool. This identity is positional: it is derived from the index of the subagent entry in the request `tools` array, so keep the order of subagent entries stable across requests in a conversation."), "model": _S.String.annotate(description="Slug of the worker model that executed the task."), "name": _S.String.annotate(description="Configured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent."), "outcome": _S.String.annotate(description="The worker model's result (the outcome text returned to the delegating model)."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "task_description": _S.String.annotate(description="The task description the delegating model sent to the worker."), "task_name": _S.String.annotate(description="The short task identifier the delegating model supplied."), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("error", "instance_name", "model", "name", "outcome", "task_description", "task_name",)).annotate(description="An openrouter:subagent server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__28, {"error": _S.String.annotate(description="Error message when the file operation failed."), "file_id": _S.String.annotate(description="The target file id supplied in the tool-call arguments."), "filename": _S.String.annotate(description="The target filename supplied in the tool-call arguments."), "id": _S.String, "operation": _S.String.annotate(description="The file operation performed (list, read, write, or edit)."), "result": _S.String.annotate(description="JSON-serialized result of the file operation."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "queries": _b.array(_S.String)}, optional=("error", "file_id", "filename", "operation", "result",)).annotate(description="An openrouter:files server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__5__29, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _S.Never, "queries": _b.array(_S.String), "status": WebSearchStatus}, optional=("namespace",)).annotate(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."), mode="one_of").annotate(description="An output item from the response"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__6__0, {"content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "id": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("phase", "result",)).annotate(description="An output message item"), _b.struct(_T.OpenResponsesResult__output__item__6__1, {"content": _b.union(_b.array(_b.struct(_T.OpenResponsesResult__output__item__6__1__content__0__item, {"text": _S.String, "type": _b.literal("reasoning_text")}))), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "summary": _b.array(ReasoningSummaryText), "type": _S.Never, "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null).annotate(description="A signature for the reasoning content, used for verification"), "result": _b.union(_S.String, _S.Null)}, optional=("content", "encrypted_content", "format", "signature", "result",)).annotate(description="An output item containing reasoning"), _b.struct(_T.OpenResponsesResult__output__item__6__2, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("namespace", "result",)), _b.struct(_T.OpenResponsesResult__output__item__6__3, {"action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__6__3__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__6__3__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__6__3__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("in_progress"), _b.literal("failed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("action", "result",)), _b.struct(_T.OpenResponsesResult__output__item__6__4, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("completed"), _b.literal("in_progress"), _b.literal("failed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("result",)), _b.struct(_T.OpenResponsesResult__output__item__6__5, {"id": _S.String, "result": _b.union(_b.union(_S.String), _b.union(_S.Null)), "status": _b.union(_b.literal("in_progress"), _b.literal("completed"), _b.literal("generating"), _b.literal("failed")), "type": _b.literal("image_generation_call"), "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from.")}, optional=("result", "prompt",)), _b.struct(_T.OpenResponsesResult__output__item__6__6, {"code": _b.union(_S.String, _S.Null), "container_id": _S.String, "id": _S.String, "outputs": _b.union(_b.array(_b.union(_b.struct(_T.OpenResponsesResult__output__item__6__6__outputs__0__item__0, {"type": _b.literal("image"), "url": _S.String}), _b.struct(_T.OpenResponsesResult__output__item__6__6__outputs__0__item__1, {"logs": _S.String, "type": _b.literal("logs")}))), _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("result",)).annotate(description="A code interpreter execution call with outputs"), _b.struct(_T.OpenResponsesResult__output__item__6__7, {"action": _S.Json.annotate(expected="JSON value"), "call_id": _S.String, "id": _S.String, "pending_safety_checks": _b.array(_b.struct(_T.OpenResponsesResult__output__item__6__7__pending_safety_checks__item, {"code": _S.String, "id": _S.String, "message": _S.String})), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("action", "result",)), _b.struct(_T.OpenResponsesResult__output__item__6__8, {"datetime": _S.String.annotate(description="ISO 8601 datetime string"), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "timezone": _S.String.annotate(description="IANA timezone name"), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("result",)).annotate(description="An openrouter:datetime server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__9, {"action": _b.struct(_T.OpenResponsesResult__output__item__6__9__action, {"query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__6__9__action__sources__item, {"type": _b.literal("url"), "url": _S.String})), "type": _b.literal("search")}, optional=("sources",)).annotate(description="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": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("action", "result",)).annotate(description="An openrouter:web_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__10, {"code": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "language": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("code", "exitCode", "language", "stderr", "stdout", "result",)).annotate(description="An openrouter:code_interpreter server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__11, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("queries", "result",)).annotate(description="An openrouter:file_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__12, {"id": _S.String, "imageB64": _S.String, "imageUrl": _S.String, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "result": _b.union(_b.union(_S.String), _b.union(_S.Null)).annotate(description="The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"), "revisedPrompt": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never}, optional=("imageB64", "imageUrl", "prompt", "result", "revisedPrompt",)).annotate(description="An openrouter:image_generation server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__13, {"action": _S.String, "id": _S.String, "screenshotB64": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("action", "screenshotB64", "result",)).annotate(description="An openrouter:browser_use server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__14, {"arguments": _S.String.annotate(description="The raw tool-call arguments string as emitted by the model."), "call_id": _S.String.annotate(description="The model-generated tool call id from the originating turn."), "command": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("arguments", "call_id", "command", "exitCode", "stderr", "stdout", "result",)).annotate(description="An openrouter:bash server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__15, {"command": _b.literals(["view", "create", "str_replace", "insert"]), "filePath": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("command", "filePath", "result",)).annotate(description="An openrouter:text_editor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__16, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("call_id", "operation", "result",)).annotate(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."), _b.struct(_T.OpenResponsesResult__output__item__6__17, {"call_id": _S.String, "id": _S.String, "operation": ApplyPatchCallOperation, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Lifecycle state of an `apply_patch_call` output item."), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("result",)).annotate(description="A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand."), _b.struct(_T.OpenResponsesResult__output__item__6__18, {"action": _b.struct(_T.OpenResponsesResult__output__item__6__18__action, {"commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}), "call_id": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("action", "result",)).annotate(description="A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool."), _b.struct(_T.OpenResponsesResult__output__item__6__19, {"call_id": _S.String, "id": _S.String, "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "output": _b.array(_b.struct(_T.OpenResponsesResult__output__item__6__19__output__item, {"outcome": _b.union(_b.struct(_T.OpenResponsesResult__output__item__6__19__output__item__outcome__0, {"exit_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("exit")}), _b.struct(_T.OpenResponsesResult__output__item__6__19__output__item__outcome__1, {"type": _b.literal("timeout")}), mode="one_of"), "stderr": _S.String, "stdout": _S.String})), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("max_output_length", "result",)).annotate(description="A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome."), _b.struct(_T.OpenResponsesResult__output__item__6__20, {"content": _S.String, "error": _S.String.annotate(description="The error message if the fetch failed."), "httpStatus": _b.check(_S.Number.annotate(description="The HTTP status code returned by the upstream URL fetch."), _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "title": _S.String, "type": _S.Never, "url": _S.String, "result": _b.union(_S.String, _S.Null)}, optional=("content", "error", "httpStatus", "title", "url", "result",)).annotate(description="An openrouter:web_fetch server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__21, {"id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("query", "result",)).annotate(description="An openrouter:tool_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__22, {"action": _b.literals(["read", "write", "delete"]), "id": _S.String, "key": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "value": _S.Json.annotate(expected="JSON value"), "result": _b.union(_S.String, _S.Null)}, optional=("action", "key", "value", "result",)).annotate(description="An openrouter:memory server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__23, {"id": _S.String, "serverLabel": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "toolName": _S.String, "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("serverLabel", "toolName", "result",)).annotate(description="An openrouter:mcp server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__24, {"arguments": _S.String.annotate(description="The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"), "id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("arguments", "query", "result",)).annotate(description="An openrouter:experimental__search_models server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__25, {"analysis": FusionAnalysisResult, "error": _S.String.annotate(description="Error message when the fusion run did not produce an analysis result."), "failed_models": _b.array(_b.struct(_T.OpenResponsesResult__output__item__6__25__failed_models__item, {"error": _S.String.annotate(description="Error message describing why the model failed."), "model": _S.String.annotate(description="Slug of the analysis model that failed."), "status_code": _b.check(_S.Number.annotate(description="HTTP status code from the upstream response, when available (e.g. 402, 429)."), _S.is_int().annotate(expected="an integer"))}, optional=("status_code",))).annotate(description="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."), "failure_reason": _S.String.annotate(description="Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."), "id": _S.String, "responses": _b.array(_b.struct(_T.OpenResponsesResult__output__item__6__25__responses__item, {"content": _S.String, "model": _S.String}, optional=("content",))).annotate(description="Analysis models that produced a response in this fusion run, with each model's full panel content."), "sources": _b.array(FusionSource).annotate(description="Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("analysis", "error", "failed_models", "failure_reason", "responses", "sources", "result",)).annotate(description="An openrouter:fusion server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__26, {"advice": _S.String.annotate(description="The advisor model's response (the advice text returned to the executor)."), "error": _S.String.annotate(description="Error message when the advisor call did not produce advice."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."), "model": _S.String.annotate(description="Slug of the advisor model that was consulted."), "prompt": _S.String.annotate(description="The prompt the executor sent to the advisor."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("advice", "error", "instance_name", "model", "prompt", "result",)).annotate(description="An openrouter:advisor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__27, {"error": _S.String.annotate(description="Error message when the subagent task did not produce an outcome."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) instance omits it, even when multiple subagents are configured. When a replayed item echoes this field back, the transcript rehydrates the call under that instance's tool. This identity is positional: it is derived from the index of the subagent entry in the request `tools` array, so keep the order of subagent entries stable across requests in a conversation."), "model": _S.String.annotate(description="Slug of the worker model that executed the task."), "name": _S.String.annotate(description="Configured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent."), "outcome": _S.String.annotate(description="The worker model's result (the outcome text returned to the delegating model)."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "task_description": _S.String.annotate(description="The task description the delegating model sent to the worker."), "task_name": _S.String.annotate(description="The short task identifier the delegating model supplied."), "type": _S.Never, "result": _b.union(_S.String, _S.Null)}, optional=("error", "instance_name", "model", "name", "outcome", "task_description", "task_name", "result",)).annotate(description="An openrouter:subagent server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__28, {"error": _S.String.annotate(description="Error message when the file operation failed."), "file_id": _S.String.annotate(description="The target file id supplied in the tool-call arguments."), "filename": _S.String.annotate(description="The target filename supplied in the tool-call arguments."), "id": _S.String, "operation": _S.String.annotate(description="The file operation performed (list, read, write, or edit)."), "result": _b.union(_S.String.annotate(description="JSON-serialized result of the file operation.")), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never}, optional=("error", "file_id", "filename", "operation", "result",)).annotate(description="An openrouter:files server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__6__29, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _S.Never, "result": _b.union(_S.String, _S.Null), "status": ImageGenerationStatus}, optional=("namespace", "result",)).annotate(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."), mode="one_of").annotate(description="An output item from the response"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__7__0, {"content": _b.array(_b.union(ResponseOutputText, OpenAIResponsesRefusalContent)), "id": _S.String, "phase": _b.union(_b.literal("commentary"), _b.literal("final_answer"), _S.Null).annotate(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": _b.literal("assistant"), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("phase", "created_by",)).annotate(description="An output message item"), _b.struct(_T.OpenResponsesResult__output__item__7__1, {"content": _b.union(_b.array(_b.struct(_T.OpenResponsesResult__output__item__7__1__content__0__item, {"text": _S.String, "type": _b.literal("reasoning_text")}))), "encrypted_content": _b.union(_S.String, _S.Null), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "summary": _b.array(ReasoningSummaryText), "type": _S.Never, "format": ReasoningFormat, "signature": _b.union(_S.String, _S.Null).annotate(description="A signature for the reasoning content, used for verification"), "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("content", "encrypted_content", "format", "signature", "created_by",)).annotate(description="An output item containing reasoning"), _b.struct(_T.OpenResponsesResult__output__item__7__2, {"arguments": _S.String, "call_id": _S.String, "id": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("namespace", "created_by",)), _b.struct(_T.OpenResponsesResult__output__item__7__3, {"action": _b.union(_b.struct(_T.OpenResponsesResult__output__item__7__3__action__0, {"queries": _b.array(_S.String), "query": _S.String, "sources": _b.array(WebSearchSource), "type": _b.literal("search")}, optional=("queries", "sources",)), _b.struct(_T.OpenResponsesResult__output__item__7__3__action__1, {"type": _b.literal("open_page"), "url": _b.union(_S.String, _S.Null)}, optional=("url",)), _b.struct(_T.OpenResponsesResult__output__item__7__3__action__2, {"pattern": _S.String, "type": _b.literal("find_in_page"), "url": _S.String}), mode="one_of"), "id": _S.String, "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("action", "created_by",)), _b.struct(_T.OpenResponsesResult__output__item__7__4, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("created_by",)), _b.struct(_T.OpenResponsesResult__output__item__7__5, {"id": _S.String, "result": _b.union(_S.String, _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("result", "prompt", "created_by",)), _b.struct(_T.OpenResponsesResult__output__item__7__6, {"code": _b.union(_S.String, _S.Null), "container_id": _S.String, "id": _S.String, "outputs": _b.union(_b.array(_b.union(_b.struct(_T.OpenResponsesResult__output__item__7__6__outputs__0__item__0, {"type": _b.literal("image"), "url": _S.String}), _b.struct(_T.OpenResponsesResult__output__item__7__6__outputs__0__item__1, {"logs": _S.String, "type": _b.literal("logs")}))), _S.Null), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("created_by",)).annotate(description="A code interpreter execution call with outputs"), _b.struct(_T.OpenResponsesResult__output__item__7__7, {"action": _S.Json.annotate(expected="JSON value"), "call_id": _S.String, "id": _S.String, "pending_safety_checks": _b.array(_b.struct(_T.OpenResponsesResult__output__item__7__7__pending_safety_checks__item, {"code": _S.String, "id": _S.String, "message": _S.String})), "status": _b.union(_b.literal("completed"), _b.literal("in_progress")), "type": _S.Never, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("action", "created_by",)), _b.struct(_T.OpenResponsesResult__output__item__7__8, {"datetime": _S.String.annotate(description="ISO 8601 datetime string"), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "timezone": _S.String.annotate(description="IANA timezone name"), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("created_by",)).annotate(description="An openrouter:datetime server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__9, {"action": _b.struct(_T.OpenResponsesResult__output__item__7__9__action, {"query": _S.String, "sources": _b.array(_b.struct(_T.OpenResponsesResult__output__item__7__9__action__sources__item, {"type": _b.literal("url"), "url": _S.String})), "type": _b.literal("search")}, optional=("sources",)).annotate(description="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": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("action", "created_by",)).annotate(description="An openrouter:web_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__10, {"code": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "language": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("code", "exitCode", "language", "stderr", "stdout", "created_by",)).annotate(description="An openrouter:code_interpreter server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__11, {"id": _S.String, "queries": _b.array(_S.String), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("queries", "created_by",)).annotate(description="An openrouter:file_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__12, {"id": _S.String, "imageB64": _S.String, "imageUrl": _S.String, "prompt": _S.String.annotate(description="The prompt (possibly rewritten) that the image was generated from."), "result": _b.union(_S.String, _S.Null).annotate(description="The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"), "revisedPrompt": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("imageB64", "imageUrl", "prompt", "result", "revisedPrompt", "created_by",)).annotate(description="An openrouter:image_generation server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__13, {"action": _S.String, "id": _S.String, "screenshotB64": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("action", "screenshotB64", "created_by",)).annotate(description="An openrouter:browser_use server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__14, {"arguments": _S.String.annotate(description="The raw tool-call arguments string as emitted by the model."), "call_id": _S.String.annotate(description="The model-generated tool call id from the originating turn."), "command": _S.String, "exitCode": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "stderr": _S.String, "stdout": _S.String, "type": _S.Never, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("arguments", "command", "exitCode", "stderr", "stdout", "created_by",)).annotate(description="An openrouter:bash server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__15, {"command": _b.literals(["view", "create", "str_replace", "insert"]), "filePath": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("command", "filePath", "created_by",)).annotate(description="An openrouter:text_editor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__16, {"call_id": _S.String, "id": _S.String, "operation": _b.union(_b.union(_b.struct(_T.OpenResponsesResult__output__item__7__16__operation__0__0, {"diff": _S.String, "path": _S.String, "type": _b.literal("create_file")}).annotate(description="The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents."), _b.struct(_T.OpenResponsesResult__output__item__7__16__operation__0__1, {"diff": _S.String, "path": _S.String, "type": _S.Never}).annotate(description="The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents."), _b.struct(_T.OpenResponsesResult__output__item__7__16__operation__0__2, {"path": _S.String, "type": _S.Never, "diff": _S.String}).annotate(description="The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents."), mode="one_of"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__7__16__operation__1__0, {"diff": _S.String, "path": _S.String, "type": _S.Never}).annotate(description="The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file."), _b.struct(_T.OpenResponsesResult__output__item__7__16__operation__1__1, {"diff": _S.String, "path": _S.String, "type": _b.literal("update_file")}).annotate(description="The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file."), _b.struct(_T.OpenResponsesResult__output__item__7__16__operation__1__2, {"path": _S.String, "type": _S.Never, "diff": _S.String}).annotate(description="The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file."), mode="one_of"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__7__16__operation__2__0, {"diff": _S.String, "path": _S.String, "type": _S.Never}).annotate(description="The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required."), _b.struct(_T.OpenResponsesResult__output__item__7__16__operation__2__1, {"diff": _S.String, "path": _S.String, "type": _S.Never}).annotate(description="The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required."), _b.struct(_T.OpenResponsesResult__output__item__7__16__operation__2__2, {"path": _S.String, "type": _b.literal("delete_file")}).annotate(description="The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required."), mode="one_of"), mode="one_of").annotate(description="The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "created_by": _S.String}, optional=("created_by",)).annotate(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."), _b.struct(_T.OpenResponsesResult__output__item__7__17, {"call_id": _S.String, "id": _S.String, "operation": _b.union(_b.union(_b.struct(_T.OpenResponsesResult__output__item__7__17__operation__0__0, {"diff": _S.String, "path": _S.String, "type": _b.literal("create_file")}).annotate(description="The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents."), _b.struct(_T.OpenResponsesResult__output__item__7__17__operation__0__1, {"diff": _S.String, "path": _S.String, "type": _S.Never}).annotate(description="The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents."), _b.struct(_T.OpenResponsesResult__output__item__7__17__operation__0__2, {"path": _S.String, "type": _S.Never, "diff": _S.String}).annotate(description="The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents."), mode="one_of"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__7__17__operation__1__0, {"diff": _S.String, "path": _S.String, "type": _S.Never}).annotate(description="The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file."), _b.struct(_T.OpenResponsesResult__output__item__7__17__operation__1__1, {"diff": _S.String, "path": _S.String, "type": _b.literal("update_file")}).annotate(description="The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file."), _b.struct(_T.OpenResponsesResult__output__item__7__17__operation__1__2, {"path": _S.String, "type": _S.Never, "diff": _S.String}).annotate(description="The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file."), mode="one_of"), _b.union(_b.struct(_T.OpenResponsesResult__output__item__7__17__operation__2__0, {"diff": _S.String, "path": _S.String, "type": _S.Never}).annotate(description="The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required."), _b.struct(_T.OpenResponsesResult__output__item__7__17__operation__2__1, {"diff": _S.String, "path": _S.String, "type": _S.Never}).annotate(description="The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required."), _b.struct(_T.OpenResponsesResult__output__item__7__17__operation__2__2, {"path": _S.String, "type": _b.literal("delete_file")}).annotate(description="The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required."), mode="one_of"), mode="one_of").annotate(description="The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Lifecycle state of an `apply_patch_call` output item."), "type": _b.literal("apply_patch_call"), "created_by": _S.String}, optional=("created_by",)).annotate(description="A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand."), _b.struct(_T.OpenResponsesResult__output__item__7__18, {"action": _b.struct(_T.OpenResponsesResult__output__item__7__18__action, {"commands": _b.array(_S.String), "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "timeout_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}), "call_id": _S.String, "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("action", "created_by",)).annotate(description="A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool."), _b.struct(_T.OpenResponsesResult__output__item__7__19, {"call_id": _S.String, "id": _S.String, "max_output_length": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "output": _b.array(_b.struct(_T.OpenResponsesResult__output__item__7__19__output__item, {"outcome": _b.union(_b.struct(_T.OpenResponsesResult__output__item__7__19__output__item__outcome__0, {"exit_code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("exit")}), _b.struct(_T.OpenResponsesResult__output__item__7__19__output__item__outcome__1, {"type": _b.literal("timeout")}), mode="one_of"), "stderr": _S.String, "stdout": _S.String})), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")).annotate(description="Status of a shell call or its output."), "type": _S.Never, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("max_output_length", "created_by",)).annotate(description="A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome."), _b.struct(_T.OpenResponsesResult__output__item__7__20, {"content": _S.String, "error": _S.String.annotate(description="The error message if the fetch failed."), "httpStatus": _b.check(_S.Number.annotate(description="The HTTP status code returned by the upstream URL fetch."), _S.is_int().annotate(expected="an integer")), "id": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "title": _S.String, "type": _S.Never, "url": _S.String, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("content", "error", "httpStatus", "title", "url", "created_by",)).annotate(description="An openrouter:web_fetch server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__21, {"id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("query", "created_by",)).annotate(description="An openrouter:tool_search server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__22, {"action": _b.literals(["read", "write", "delete"]), "id": _S.String, "key": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "value": _S.Json.annotate(expected="JSON value"), "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("action", "key", "value", "created_by",)).annotate(description="An openrouter:memory server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__23, {"id": _S.String, "serverLabel": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "toolName": _S.String, "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("serverLabel", "toolName", "created_by",)).annotate(description="An openrouter:mcp server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__24, {"arguments": _S.String.annotate(description="The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"), "id": _S.String, "query": _S.String, "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("arguments", "query", "created_by",)).annotate(description="An openrouter:experimental__search_models server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__25, {"analysis": FusionAnalysisResult, "error": _S.String.annotate(description="Error message when the fusion run did not produce an analysis result."), "failed_models": _b.array(_b.struct(_T.OpenResponsesResult__output__item__7__25__failed_models__item, {"error": _S.String.annotate(description="Error message describing why the model failed."), "model": _S.String.annotate(description="Slug of the analysis model that failed."), "status_code": _b.check(_S.Number.annotate(description="HTTP status code from the upstream response, when available (e.g. 402, 429)."), _S.is_int().annotate(expected="an integer"))}, optional=("status_code",))).annotate(description="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."), "failure_reason": _S.String.annotate(description="Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."), "id": _S.String, "responses": _b.array(_b.struct(_T.OpenResponsesResult__output__item__7__25__responses__item, {"content": _S.String, "model": _S.String}, optional=("content",))).annotate(description="Analysis models that produced a response in this fusion run, with each model's full panel content."), "sources": _b.array(FusionSource).annotate(description="Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("analysis", "error", "failed_models", "failure_reason", "responses", "sources", "created_by",)).annotate(description="An openrouter:fusion server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__26, {"advice": _S.String.annotate(description="The advisor model's response (the advice text returned to the executor)."), "error": _S.String.annotate(description="Error message when the advisor call did not produce advice."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."), "model": _S.String.annotate(description="Slug of the advisor model that was consulted."), "prompt": _S.String.annotate(description="The prompt the executor sent to the advisor."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("advice", "error", "instance_name", "model", "prompt", "created_by",)).annotate(description="An openrouter:advisor server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__27, {"error": _S.String.annotate(description="Error message when the subagent task did not produce an outcome."), "id": _S.String, "instance_name": _S.String.annotate(description="Provider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) instance omits it, even when multiple subagents are configured. When a replayed item echoes this field back, the transcript rehydrates the call under that instance's tool. This identity is positional: it is derived from the index of the subagent entry in the request `tools` array, so keep the order of subagent entries stable across requests in a conversation."), "model": _S.String.annotate(description="Slug of the worker model that executed the task."), "name": _S.String.annotate(description="Configured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent."), "outcome": _S.String.annotate(description="The worker model's result (the outcome text returned to the delegating model)."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "task_description": _S.String.annotate(description="The task description the delegating model sent to the worker."), "task_name": _S.String.annotate(description="The short task identifier the delegating model supplied."), "type": _S.Never, "call_id": _S.String, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of")}, optional=("error", "instance_name", "model", "name", "outcome", "task_description", "task_name", "created_by",)).annotate(description="An openrouter:subagent server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__28, {"error": _S.String.annotate(description="Error message when the file operation failed."), "file_id": _S.String.annotate(description="The target file id supplied in the tool-call arguments."), "filename": _S.String.annotate(description="The target filename supplied in the tool-call arguments."), "id": _S.String, "operation": _S.Never, "result": _S.String.annotate(description="JSON-serialized result of the file operation."), "status": _b.union(_b.literal("in_progress"), _b.literal("completed")), "type": _S.Never, "call_id": _S.String, "created_by": _S.String}, optional=("error", "file_id", "filename", "result", "created_by",)).annotate(description="An openrouter:files server tool output item"), _b.struct(_T.OpenResponsesResult__output__item__7__29, {"call_id": _S.String, "id": _S.String, "input": _S.String, "name": _S.String, "namespace": _S.String.annotate(description="Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"), "type": _S.Never, "created_by": _S.String, "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchUpdateFileOperation, ApplyPatchDeleteFileOperation, mode="one_of"), "status": _b.literals(["in_progress", "completed"])}, optional=("namespace", "created_by",)).annotate(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."), mode="one_of").annotate(description="An output item from the response"), mode="one_of")), "output_text": _S.String, "parallel_tool_calls": _S.Boolean, "presence_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "previous_response_id": _b.union(_S.String, _S.Null), "prompt": StoredPromptTemplate, "prompt_cache_key": _b.union(_S.String, _S.Null), "prompt_cache_options": PromptCacheOptions, "reasoning": BaseReasoningConfig, "safety_identifier": _b.union(_S.String, _S.Null), "service_tier": _b.union(_b.literal("auto"), _b.literal("default"), _b.literal("flex"), _b.literal("priority"), _b.literal("scale"), _b.union(_S.Null)), "status": OpenAIResponsesResponseStatus, "store": _S.Boolean, "temperature": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "text": _b.struct(_T.OpenResponsesResult__text, {"format": _b.union(_b.union(_b.struct(_T.OpenResponsesResult__text__format__0__0, {"type": _b.literal("text")}).annotate(description="Plain text response format"), _b.struct(_T.OpenResponsesResult__text__format__0__1, {"type": _S.Never}).annotate(description="Plain text response format"), _b.struct(_T.OpenResponsesResult__text__format__0__2, {"description": _S.String, "name": _S.String, "schema": _b.struct(_T.OpenResponsesResult__text__format__0__2__schema, {}), "strict": _b.union(_S.Boolean, _S.Null), "type": _S.Never}, optional=("description", "strict",)).annotate(description="Plain text response format")).annotate(description="Text response format configuration"), _b.union(_b.struct(_T.OpenResponsesResult__text__format__1__0, {"type": _S.Never}).annotate(description="JSON object response format"), _b.struct(_T.OpenResponsesResult__text__format__1__1, {"type": _b.literal("json_object")}).annotate(description="JSON object response format"), _b.struct(_T.OpenResponsesResult__text__format__1__2, {"description": _S.String, "name": _S.String, "schema": _b.struct(_T.OpenResponsesResult__text__format__1__2__schema, {}), "strict": _b.union(_S.Boolean, _S.Null), "type": _S.Never}, optional=("description", "strict",)).annotate(description="JSON object response format")).annotate(description="Text response format configuration"), _b.union(_b.struct(_T.OpenResponsesResult__text__format__2__0, {"type": _S.Never, "description": _S.String, "name": _S.String, "schema": _b.struct(_T.OpenResponsesResult__text__format__2__0__schema, {}), "strict": _b.union(_S.Boolean, _S.Null)}, optional=("description", "strict",)).annotate(description="JSON schema constrained response format"), _b.struct(_T.OpenResponsesResult__text__format__2__1, {"type": _S.Never, "description": _S.String, "name": _S.String, "schema": _b.struct(_T.OpenResponsesResult__text__format__2__1__schema, {}), "strict": _b.union(_S.Boolean, _S.Null)}, optional=("description", "strict",)).annotate(description="JSON schema constrained response format"), _b.struct(_T.OpenResponsesResult__text__format__2__2, {"description": _S.String, "name": _S.String, "schema": _b.struct(_T.OpenResponsesResult__text__format__2__2__schema, {}), "strict": _b.union(_b.union(_S.Boolean), _b.union(_S.Null)), "type": _b.literal("json_schema")}, optional=("description", "strict",)).annotate(description="JSON schema constrained response format")).annotate(description="Text response format configuration")).annotate(description="Text response format configuration"), "verbosity": _b.union(_b.union(_b.literal("high")), _b.union(_b.literal("low")), _b.union(_b.literal("medium")), _b.union(_b.union(_S.Null)))}, optional=("format", "verbosity",)).annotate(description="Text output configuration including format and verbosity"), "tool_choice": OpenAIResponsesToolChoice, "tools": _b.array(_b.union(_b.struct(_T.OpenResponsesResult__tools__item__0, {"description": _b.union(_S.String, _S.Null), "name": _S.String, "parameters": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "strict": _b.union(_S.Boolean, _S.Null), "type": _b.literal("function")}, optional=("description", "strict",)).annotate(description="Function tool definition"), Preview_WebSearchServerTool, Preview_20250311_WebSearchServerTool, Legacy_WebSearchServerTool, WebSearchServerTool, FileSearchServerTool, ComputerUseServerTool, CodeInterpreterServerTool, McpServerTool, ImageGenerationServerTool, CodexLocalShellTool, ShellServerTool, ApplyPatchServerTool, CustomTool, NamespaceTool, mode="one_of")), "top_logprobs": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "top_p": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "truncation": Truncation, "usage": _b.union(_b.struct(_T.OpenResponsesResult__usage__0, {"input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens_details": _b.struct(_T.OpenResponsesResult__usage__0__input_tokens_details, {"cache_write_tokens": _b.union(_b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _b.union(_S.Null)), "cached_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("cache_write_tokens",)), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens_details": _b.struct(_T.OpenResponsesResult__usage__0__output_tokens_details, {"reasoning_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), "total_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cost": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Cost of the completion", format="double"), "cost_details": _b.struct(_T.OpenResponsesResult__usage__0__cost_details, {"upstream_inference_cost": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "upstream_inference_input_cost": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "upstream_inference_output_cost": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number"))}, optional=("upstream_inference_cost",)), "is_byok": _S.Boolean.annotate(description="Whether a request was made using a Bring Your Own Key configuration"), "server_tool_use_details": ServerToolUseDetails}, optional=("cost", "cost_details", "is_byok", "server_tool_use_details",))).annotate(description="Token usage information for the response"), "user": _b.union(_S.String, _S.Null), "error_type": ApiErrorType, "openrouter_metadata": OpenRouterMetadata}, optional=("background", "max_output_tokens", "max_tool_calls", "output_text", "previous_response_id", "prompt", "prompt_cache_key", "prompt_cache_options", "reasoning", "safety_identifier", "service_tier", "store", "text", "top_logprobs", "truncation", "usage", "user", "error_type", "openrouter_metadata",)).annotate(description="Complete non-streaming response from the Responses API", identifier="OpenResponsesResult")
|
|
884
|
+
StreamEventsResponseOutputItemAdded: _StructSchema[_T.StreamEventsResponseOutputItemAdded, _t.Never, _t.Never] = _b.struct(_T.StreamEventsResponseOutputItemAdded, {"item": OutputItems, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.output_item.added")}).annotate(description="Event emitted when a new output item is added to the response", identifier="StreamEventsResponseOutputItemAdded")
|
|
885
|
+
StreamEventsResponseOutputItemDone: _StructSchema[_T.StreamEventsResponseOutputItemDone, _t.Never, _t.Never] = _b.struct(_T.StreamEventsResponseOutputItemDone, {"item": OutputItems, "output_index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.output_item.done")}).annotate(description="Event emitted when an output item is complete", identifier="StreamEventsResponseOutputItemDone")
|
|
886
|
+
MessagesContentBlockStartEvent: _StructSchema[_T.MessagesContentBlockStartEvent, _t.Never, _t.Never] = _b.struct(_T.MessagesContentBlockStartEvent, {"content_block": _b.union(AnthropicTextBlock, AnthropicToolUseBlock, AnthropicThinkingBlock, AnthropicRedactedThinkingBlock, ORAnthropicServerToolUseBlock, AnthropicWebSearchToolResult, AnthropicWebFetchToolResult, AnthropicCodeExecutionToolResult, AnthropicBashCodeExecutionToolResult, AnthropicTextEditorCodeExecutionToolResult, AnthropicToolSearchToolResult, AnthropicContainerUpload, AnthropicCompactionBlock, AnthropicAdvisorToolResult, _b.struct(_T.MessagesContentBlockStartEvent__content_block__14, {"content": _b.union(_S.String, _S.Null), "type": _b.literal("compaction")})), "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("content_block_start")}).annotate(description="Event sent when a new content block starts", identifier="MessagesContentBlockStartEvent")
|
|
887
|
+
ORAnthropicContentBlock: _S.Bottom[_T.ORAnthropicContentBlock, _t.Any] = _b.union(AnthropicTextBlock, AnthropicToolUseBlock, AnthropicThinkingBlock, AnthropicRedactedThinkingBlock, ORAnthropicServerToolUseBlock, AnthropicWebSearchToolResult, AnthropicWebFetchToolResult, AnthropicCodeExecutionToolResult, AnthropicBashCodeExecutionToolResult, AnthropicTextEditorCodeExecutionToolResult, AnthropicToolSearchToolResult, AnthropicContainerUpload, AnthropicCompactionBlock, AnthropicAdvisorToolResult, mode="one_of").annotate(identifier="ORAnthropicContentBlock")
|
|
888
|
+
ImageGenCompletedEvent: _StructSchema[_T.ImageGenCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ImageGenCompletedEvent, {"b64_json": _S.String.annotate(description="Base64-encoded final image data"), "created": _b.check(_S.Number.annotate(description="Unix timestamp (seconds) when the image was generated"), _S.is_int().annotate(expected="an integer")), "media_type": _S.String.annotate(description="Media type (MIME type) of the image, e.g. `image/png`, `image/jpeg`, `image/webp`, `image/svg+xml`. May be omitted if the format could not be determined."), "type": _b.literal("image_generation.completed").annotate(description="The event type"), "usage": ImageGenerationUsage}, optional=("media_type", "usage",)).annotate(description="Emitted when generation completes and the final image is available", identifier="ImageGenCompletedEvent")
|
|
889
|
+
ImageGenerationResponse: _StructSchema[_T.ImageGenerationResponse, _t.Never, _t.Never] = _b.struct(_T.ImageGenerationResponse, {"created": _b.check(_S.Number.annotate(description="Unix timestamp (seconds) when the image was generated"), _S.is_int().annotate(expected="an integer")), "data": _b.array(_b.struct(_T.ImageGenerationResponse__data__item, {"b64_json": _S.String.annotate(description="Base64-encoded image bytes"), "media_type": _S.String.annotate(description="Media type (MIME type) of the image, e.g. `image/png`, `image/jpeg`, `image/webp`, `image/svg+xml`. May be omitted if the format could not be determined.")}, optional=("media_type",))).annotate(description="Generated images"), "usage": ImageGenerationUsage}, optional=("usage",)).annotate(description="Image generation response", identifier="ImageGenerationResponse")
|
|
890
|
+
ChatResult: _StructSchema[_T.ChatResult, _t.Never, _t.Never] = _b.struct(_T.ChatResult, {"choices": _b.array(ChatChoice).annotate(description="List of completion choices"), "created": _b.check(_S.Number.annotate(description="Unix timestamp of creation"), _S.is_int().annotate(expected="an integer")), "id": _S.String.annotate(description="Unique completion identifier"), "model": _S.String.annotate(description="Model used for completion"), "object": _b.literal("chat.completion"), "openrouter_metadata": OpenRouterMetadata, "service_tier": _b.union(_S.String, _S.Null).annotate(description="The service tier used by the upstream provider for this request"), "system_fingerprint": _b.union(_S.String, _S.Null).annotate(description="System fingerprint"), "usage": ChatUsage}, optional=("openrouter_metadata", "service_tier", "usage",)).annotate(description="Chat completion response", identifier="ChatResult")
|
|
891
|
+
ChatRequest: _StructSchema[_T.ChatRequest, _t.Never, _t.Never] = _b.struct(_T.ChatRequest, {"cache_control": AnthropicCacheControlDirective, "debug": ChatDebugOptions, "frequency_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Frequency penalty (-2.0 to 2.0)", format="double"), "image_config": ImageConfig, "logit_bias": _b.union(_b.record(_S.String, _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number"))), _S.Null).annotate(description="Token logit bias adjustments"), "logprobs": _b.union(_S.Boolean, _S.Null).annotate(description="Return log probabilities"), "max_completion_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Maximum tokens in completion"), "max_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16."), "messages": _b.check(_b.array(ChatMessages).annotate(description="List of messages for the conversation"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "metadata": _b.struct(_T.ChatRequest__metadata, {}).annotate(description="Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)"), "min_p": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Minimum probability threshold relative to the most likely token. Tokens with probability below min_p * (probability of top token) are filtered out. Not all providers support this parameter.", format="double"), "modalities": _b.array(_b.literals(["text", "image", "audio"])).annotate(description="Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\"."), "model": ModelName, "models": ChatModelNames, "parallel_tool_calls": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response."), "plugins": _b.array(_b.union(AutoRouterPlugin, AutoBetaRouterPlugin, ModerationPlugin, WebSearchPlugin, WebFetchPlugin, FileParserPlugin, ResponseHealingPlugin, ContextCompressionPlugin, ParetoRouterPlugin, FusionPlugin, mode="one_of")).annotate(description="Plugins you want to enable for this request, including their settings."), "prediction": Prediction, "presence_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Presence penalty (-2.0 to 2.0)", format="double"), "prompt_cache_key": _b.union(_S.String, _S.Null), "prompt_cache_options": PromptCacheOptions, "provider": ProviderPreferences, "reasoning": _b.struct(_T.ChatRequest__reasoning, {"effort": _b.union(_b.literal("max"), _b.literal("xhigh"), _b.literal("high"), _b.literal("medium"), _b.literal("low"), _b.literal("minimal"), _b.literal("none"), _S.Null).annotate(description="Constrains effort on reasoning for reasoning models"), "summary": ChatReasoningSummaryVerbosityEnum}, optional=("effort", "summary",)).annotate(description="Configuration options for reasoning models"), "reasoning_effort": _b.union(_b.literal("max"), _b.literal("xhigh"), _b.literal("high"), _b.literal("medium"), _b.literal("low"), _b.literal("minimal"), _b.literal("none"), _S.Null).annotate(description="Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ."), "repetition_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Penalizes tokens based on how much they have already appeared in the text. A value of 1.0 means no penalty. Values above 1.0 penalize repeated tokens more strongly. Not all providers support this parameter.", format="double"), "response_format": _b.union(ChatFormatTextConfig, ChatFormatJsonObjectConfig, ChatFormatJsonSchemaConfig, ChatFormatGrammarConfig, ChatFormatPythonConfig, mode="one_of").annotate(description="Response format configuration"), "route": DeprecatedRoute, "seed": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Random seed for deterministic outputs"), "service_tier": _b.union(_b.literal("auto"), _b.literal("default"), _b.literal("flex"), _b.literal("priority"), _b.literal("scale"), _S.Null).annotate(description="The service tier to use for processing this request."), "session_id": _b.check(_S.String.annotate(description="A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."), _S.is_max_length(256).annotate(expected="a value with a length of at most 256")), "stop": _b.union(_S.String, _b.check(_b.array(_S.String), _S.is_max_length(4).annotate(expected="a value with a length of at most 4")), _S.Null).annotate(description="Stop sequences (up to 4)"), "stop_server_tools_when": StopServerToolsWhen, "stream": _S.Boolean.annotate(description="Enable streaming response"), "stream_options": ChatStreamOptions, "temperature": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Sampling temperature (0-2)", format="double"), "tool_choice": ChatToolChoice, "tools": _b.array(ChatFunctionTool).annotate(description="Available tools for function calling"), "top_a": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Consider only tokens with \"sufficiently high\" probabilities based on the probability of the most likely token. Not all providers support this parameter.", format="double"), "top_k": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Limits the model to choose from the top K most likely tokens at each step. A value of 1 means the model will always pick the most likely next token. Not all providers support this parameter."), "top_logprobs": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Number of top log probabilities to return (0-20)"), "top_p": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(description="Nucleus sampling parameter (0-1)", format="double"), "trace": TraceConfig, "user": _S.String.annotate(description="Per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account.")}, optional=("cache_control", "debug", "frequency_penalty", "image_config", "logit_bias", "logprobs", "max_completion_tokens", "max_tokens", "metadata", "min_p", "modalities", "model", "models", "parallel_tool_calls", "plugins", "prediction", "presence_penalty", "prompt_cache_key", "prompt_cache_options", "provider", "reasoning", "reasoning_effort", "repetition_penalty", "response_format", "route", "seed", "service_tier", "session_id", "stop", "stop_server_tools_when", "stream", "stream_options", "temperature", "tool_choice", "tools", "top_a", "top_k", "top_logprobs", "top_p", "trace", "user",)).annotate(description="Chat completion request parameters", identifier="ChatRequest")
|
|
892
|
+
ChatStreamChunk: _StructSchema[_T.ChatStreamChunk, _t.Never, _t.Never] = _b.struct(_T.ChatStreamChunk, {"choices": _b.array(ChatStreamChoice).annotate(description="List of streaming chunk choices"), "created": _b.check(_S.Number.annotate(description="Unix timestamp of creation"), _S.is_int().annotate(expected="an integer")), "error": _b.struct(_T.ChatStreamChunk__error, {"code": _b.check(_S.Number.annotate(description="Error code", format="int32"), _S.is_int().annotate(expected="an integer")), "message": _S.String.annotate(description="Error message"), "metadata": _b.struct(_T.ChatStreamChunk__error__metadata, {"error_type": ApiErrorType, "provider_code": _S.String.annotate(description="Upstream provider-specific error code, when available")}, optional=("provider_code",)).annotate(description="Structured error metadata")}, optional=("metadata",)).annotate(description="Error information"), "id": _S.String.annotate(description="Unique chunk identifier"), "model": _S.String.annotate(description="Model used for completion"), "object": _b.literal("chat.completion.chunk"), "openrouter_metadata": OpenRouterMetadata, "service_tier": _b.union(_S.String, _S.Null).annotate(description="The service tier used by the upstream provider for this request"), "system_fingerprint": _S.String.annotate(description="System fingerprint"), "usage": ChatUsage}, optional=("error", "openrouter_metadata", "service_tier", "system_fingerprint", "usage",)).annotate(description="Streaming chat completion chunk", identifier="ChatStreamChunk")
|
|
893
|
+
Inputs: _S.Bottom[_T.Inputs, _t.Any] = _b.union(_S.String, Arrays_8).annotate(description="Input for a response request - can be a string or array of items", identifier="Inputs")
|
|
894
|
+
CompletedEvent: _StructSchema[_T.CompletedEvent, _t.Never, _t.Never] = _b.struct(_T.CompletedEvent, {"response": BaseResponsesResult, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.completed")}).annotate(description="Event emitted when a response has completed successfully", identifier="CompletedEvent")
|
|
895
|
+
CreatedEvent: _StructSchema[_T.CreatedEvent, _t.Never, _t.Never] = _b.struct(_T.CreatedEvent, {"response": BaseResponsesResult, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.created")}).annotate(description="Event emitted when a response is created", identifier="CreatedEvent")
|
|
896
|
+
FailedEvent: _StructSchema[_T.FailedEvent, _t.Never, _t.Never] = _b.struct(_T.FailedEvent, {"response": BaseResponsesResult, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.failed")}).annotate(description="Event emitted when a response has failed", identifier="FailedEvent")
|
|
897
|
+
IncompleteEvent: _StructSchema[_T.IncompleteEvent, _t.Never, _t.Never] = _b.struct(_T.IncompleteEvent, {"response": BaseResponsesResult, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.incomplete")}).annotate(description="Event emitted when a response is incomplete", identifier="IncompleteEvent")
|
|
898
|
+
InProgressEvent: _StructSchema[_T.InProgressEvent, _t.Never, _t.Never] = _b.struct(_T.InProgressEvent, {"response": BaseResponsesResult, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.in_progress")}).annotate(description="Event emitted when a response is in progress", identifier="InProgressEvent")
|
|
899
|
+
OpenResponsesCreatedEvent: _StructSchema[_T.OpenResponsesCreatedEvent, _t.Never, _t.Never] = _b.struct(_T.OpenResponsesCreatedEvent, {"response": OpenResponsesResult, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.created")}).annotate(description="Event emitted when a response is created", identifier="OpenResponsesCreatedEvent")
|
|
900
|
+
OpenResponsesInProgressEvent: _StructSchema[_T.OpenResponsesInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.OpenResponsesInProgressEvent, {"response": OpenResponsesResult, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.in_progress")}).annotate(description="Event emitted when a response is in progress", identifier="OpenResponsesInProgressEvent")
|
|
901
|
+
StreamEventsResponseCompleted: _StructSchema[_T.StreamEventsResponseCompleted, _t.Never, _t.Never] = _b.struct(_T.StreamEventsResponseCompleted, {"response": OpenResponsesResult, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.completed")}).annotate(description="Event emitted when a response has completed successfully", identifier="StreamEventsResponseCompleted")
|
|
902
|
+
StreamEventsResponseFailed: _StructSchema[_T.StreamEventsResponseFailed, _t.Never, _t.Never] = _b.struct(_T.StreamEventsResponseFailed, {"response": OpenResponsesResult, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.failed")}).annotate(description="Event emitted when a response has failed", identifier="StreamEventsResponseFailed")
|
|
903
|
+
StreamEventsResponseIncomplete: _StructSchema[_T.StreamEventsResponseIncomplete, _t.Never, _t.Never] = _b.struct(_T.StreamEventsResponseIncomplete, {"response": OpenResponsesResult, "sequence_number": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("response.incomplete")}).annotate(description="Event emitted when a response is incomplete", identifier="StreamEventsResponseIncomplete")
|
|
904
|
+
BaseMessagesResult: _StructSchema[_T.BaseMessagesResult, _t.Never, _t.Never] = _b.struct(_T.BaseMessagesResult, {"container": AnthropicContainer, "content": _b.array(ORAnthropicContentBlock), "id": _S.String, "model": _S.String, "role": _b.literal("assistant"), "stop_details": AnthropicRefusalStopDetails, "stop_reason": ORAnthropicStopReason, "stop_sequence": _b.union(_S.String, _S.Null), "type": _b.literal("message"), "usage": _b.struct(_T.BaseMessagesResult__usage, {"cache_creation": AnthropicCacheCreation, "cache_creation_input_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "cache_read_input_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "inference_geo": _b.union(_S.String, _S.Null), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens_details": AnthropicOutputTokensDetails, "server_tool_use": AnthropicServerToolUsage, "service_tier": AnthropicServiceTier, "iterations": _b.array(AnthropicUsageIteration), "speed": AnthropicSpeed}, optional=("iterations", "speed",))}).annotate(description="Base Anthropic Messages API response before OpenRouter extensions", identifier="BaseMessagesResult")
|
|
905
|
+
MessagesResult: _StructSchema[_T.MessagesResult, _t.Never, _t.Never] = _b.struct(_T.MessagesResult, {"container": AnthropicContainer, "content": _b.array(ORAnthropicContentBlock), "id": _S.String, "model": _S.String, "role": _b.literal("assistant"), "stop_details": AnthropicRefusalStopDetails, "stop_reason": ORAnthropicStopReason, "stop_sequence": _b.union(_S.String, _S.Null), "type": _b.literal("message"), "usage": _b.struct(_T.MessagesResult__usage, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.union(_b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _b.union(_S.Null)), "cache_read_input_tokens": _b.union(_b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _b.union(_S.Null)), "inference_geo": _b.union(_b.union(_S.String), _b.union(_S.Null)), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens_details": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__output_tokens_details__0__0, {"thinking_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "server_tool_use": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__server_tool_use__0__0, {"web_fetch_requests": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "web_search_requests": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "service_tier": _b.union(_b.union(_b.literal("standard")), _b.union(_b.literal("priority")), _b.union(_b.literal("batch")), _b.union(_b.union(_S.Null))), "iterations": _b.array(_b.union(_b.union(_b.struct(_T.MessagesResult__usage__iterations__item__0__0, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__0__0__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("compaction")}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)), _b.struct(_T.MessagesResult__usage__iterations__item__0__1, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__0__1__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "type": _S.Never}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens", "model",)), _b.struct(_T.MessagesResult__usage__iterations__item__0__2, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__0__2__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "type": _S.Never}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)), _b.struct(_T.MessagesResult__usage__iterations__item__0__3, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__0__3__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("compaction")}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",))), _b.union(_b.struct(_T.MessagesResult__usage__iterations__item__1__0, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__1__0__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.Never, "model": _S.String}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens", "model",)), _b.struct(_T.MessagesResult__usage__iterations__item__1__1, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__1__1__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "type": _b.literal("message")}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens", "model",)), _b.struct(_T.MessagesResult__usage__iterations__item__1__2, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__1__2__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "type": _S.Never}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)), _b.struct(_T.MessagesResult__usage__iterations__item__1__3, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__1__3__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("message"), "model": _S.String}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens", "model",))), _b.union(_b.struct(_T.MessagesResult__usage__iterations__item__2__0, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__2__0__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.Never, "model": _S.String}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)), _b.struct(_T.MessagesResult__usage__iterations__item__2__1, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__2__1__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "type": _S.Never}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)), _b.struct(_T.MessagesResult__usage__iterations__item__2__2, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__2__2__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "type": _b.literal("advisor_message")}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)), _b.struct(_T.MessagesResult__usage__iterations__item__2__3, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__2__3__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("advisor_message"), "model": _S.String}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",))), _b.union(_b.struct(_T.MessagesResult__usage__iterations__item__3__0, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__3__0__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _b.literal("compaction")}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)), _b.struct(_T.MessagesResult__usage__iterations__item__3__1, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__3__1__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "type": _b.literal("message")}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens", "model",)), _b.struct(_T.MessagesResult__usage__iterations__item__3__2, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__3__2__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "model": _S.String, "type": _b.literal("advisor_message")}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",)), _b.struct(_T.MessagesResult__usage__iterations__item__3__3, {"cache_creation": _b.union(_b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__usage__iterations__item__3__3__cache_creation__0__0, {"ephemeral_1h_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "ephemeral_5m_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("ephemeral_1h_input_tokens", "ephemeral_5m_input_tokens",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))), _b.union(_S.Null)), "cache_creation_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "cache_read_input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "type": _S.String}, optional=("cache_creation", "cache_creation_input_tokens", "cache_read_input_tokens", "input_tokens", "output_tokens",))))), "speed": _b.union(_b.literal("fast"), _b.literal("standard"), _b.union(_S.Null)), "cost": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "cost_details": CostDetails, "is_byok": _S.Boolean}, optional=("iterations", "speed", "cost", "cost_details", "is_byok",)), "context_management": _b.union(_b.struct_with_rest(_b.struct(_T.MessagesResult__context_management__0, {"applied_edits": _b.array(_b.struct(_T.MessagesResult__context_management__0__applied_edits__item, {"type": _S.String}))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null), "openrouter_metadata": OpenRouterMetadata, "provider": ProviderName}, optional=("context_management", "openrouter_metadata", "provider",)).annotate(description="Non-streaming response from the Anthropic Messages API with OpenRouter extensions", identifier="MessagesResult")
|
|
906
|
+
MessagesStartEvent: _StructSchema[_T.MessagesStartEvent, _t.Never, _t.Never] = _b.struct(_T.MessagesStartEvent, {"message": _b.struct(_T.MessagesStartEvent__message, {"container": AnthropicContainer, "content": _b.array(ORAnthropicContentBlock), "id": _S.String, "model": _S.String, "provider": _b.literals(["AnyScale", "Atoma", "Cent-ML", "CrofAI", "Enfer", "GoPomelo", "HuggingFace", "Hyperbolic", "Hyperbolic 2", "InoCloud", "Kluster", "Lambda", "Lepton", "Lynn 2", "Lynn", "Mancer", "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", "CoreWeave", "Crucible", "Crusoe", "Darkbloom", "Decart", "Deepgram", "DeepInfra", "DeepSeek", "DekaLLM", "DigitalOcean", "Featherless", "Fireworks", "Fish Audio", "Friendli", "GMICloud", "Google", "Google AI Studio", "Groq", "HeyGen", "Inception", "Inceptron", "InferenceNet", "Ionstream", "Infermatic", "Io Net", "Inferact vLLM", "Inflection", "Liquid", "Mara", "Mancer 2", "Meta", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "Nex AGI", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Poolside", "Perceptron", "Perplexity", "Phala", "Recraft", "Reka", "Relace", "Sail Research", "Sakana AI", "SambaNova", "Seed", "SiliconFlow", "Sourceful", "StepFun", "Stealth", "StreamLake", "Switchpoint", "Tencent", "Tenstorrent", "Together", "Upstage", "Venice", "Wafer", "WandB", "Quiver", "Krea", "Runway", "Xiaomi", "xAI", "Z.AI", "FakeProvider"]), "role": _b.literal("assistant"), "stop_details": AnthropicRefusalStopDetails, "stop_reason": _S.Json.annotate(expected="JSON value"), "stop_sequence": _S.Json.annotate(expected="JSON value"), "type": _b.literal("message"), "usage": _b.struct(_T.MessagesStartEvent__message__usage, {"cache_creation": AnthropicCacheCreation, "cache_creation_input_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "cache_read_input_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "inference_geo": _b.union(_S.String, _S.Null), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "output_tokens_details": AnthropicOutputTokensDetails, "server_tool_use": AnthropicServerToolUsage, "service_tier": AnthropicServiceTier, "iterations": _b.array(AnthropicUsageIteration), "speed": AnthropicSpeed}, optional=("iterations", "speed",))}, optional=("provider",)), "type": _b.literal("message_start")}).annotate(description="Event sent at the start of a streaming message", identifier="MessagesStartEvent")
|
|
907
|
+
ImageStreamingResponse: _StructSchema[_T.ImageStreamingResponse, _t.Never, _t.Never] = _b.struct(_T.ImageStreamingResponse, {"data": _b.union(ImageGenPartialImageEvent, ImageGenTextChunkEvent, ImageGenCompletedEvent, ImageGenStreamErrorEvent)}).annotate(identifier="ImageStreamingResponse")
|
|
908
|
+
ChatStreamingResponse: _StructSchema[_T.ChatStreamingResponse, _t.Never, _t.Never] = _b.struct(_T.ChatStreamingResponse, {"data": ChatStreamChunk}).annotate(identifier="ChatStreamingResponse")
|
|
909
|
+
ResponsesRequest: _StructSchema[_T.ResponsesRequest, _t.Never, _t.Never] = _b.struct(_T.ResponsesRequest, {"background": _b.union(_S.Boolean, _S.Null), "cache_control": AnthropicCacheControlDirective, "debug": ChatDebugOptions, "frequency_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "image_config": ImageConfig, "include": _b.union(_b.array(ResponseIncludesEnum), _S.Null), "input": Inputs, "instructions": _b.union(_S.String, _S.Null), "max_output_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "max_tool_calls": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="Maximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set."), "metadata": RequestMetadata, "modalities": _b.array(OutputModalityEnum).annotate(description="Output modalities for the response. Supported values are \"text\" and \"image\"."), "model": _S.String, "models": _b.array(_S.String), "parallel_tool_calls": _b.union(_S.Boolean, _S.Null), "plugins": _b.array(_b.union(AutoRouterPlugin, AutoBetaRouterPlugin, ModerationPlugin, WebSearchPlugin, WebFetchPlugin, FileParserPlugin, ResponseHealingPlugin, ContextCompressionPlugin, ParetoRouterPlugin, FusionPlugin, mode="one_of")).annotate(description="Plugins you want to enable for this request, including their settings."), "presence_penalty": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "previous_response_id": _S.Json.annotate(expected="JSON value", description="Not supported. The Responses API is stateless: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead."), "prompt": StoredPromptTemplate, "prompt_cache_key": _b.union(_S.String, _S.Null), "prompt_cache_options": PromptCacheOptions, "provider": ProviderPreferences, "reasoning": ReasoningConfig, "route": DeprecatedRoute, "safety_identifier": _b.union(_S.String, _S.Null).annotate(description="Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account."), "service_tier": _b.union(_b.literal("auto"), _b.literal("default"), _b.literal("flex"), _b.literal("priority"), _b.literal("scale"), _S.Null), "session_id": _b.check(_S.String.annotate(description="A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."), _S.is_max_length(256).annotate(expected="a value with a length of at most 256")), "stop_server_tools_when": StopServerToolsWhen, "store": _b.literal(False), "stream": _S.Boolean, "temperature": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "text": TextExtendedConfig, "tool_choice": OpenAIResponsesToolChoice, "tools": _b.array(_b.union(_b.struct(_T.ResponsesRequest__tools__item__0, {"description": _b.union(_S.String, _S.Null), "name": _S.String, "parameters": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null), "strict": _b.union(_S.Boolean, _S.Null), "type": _b.literal("function")}, optional=("description", "strict",)).annotate(description="Function tool definition"), Preview_WebSearchServerTool, Preview_20250311_WebSearchServerTool, Legacy_WebSearchServerTool, WebSearchServerTool, FileSearchServerTool, ComputerUseServerTool, CodeInterpreterServerTool, McpServerTool, ImageGenerationServerTool, CodexLocalShellTool, ShellServerTool, ApplyPatchServerTool, CustomTool, NamespaceTool, AdvisorServerTool_OpenRouter, SubagentServerTool_OpenRouter, DatetimeServerTool, FilesServerTool, FusionServerTool_OpenRouter, ImageGenerationServerTool_OpenRouter, SearchModelsServerTool_OpenRouter, WebFetchServerTool, WebSearchServerTool_OpenRouter, ApplyPatchServerTool_OpenRouter, BashServerTool, ShellServerTool_OpenRouter)), "top_k": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "top_logprobs": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "top_p": _b.union(_b.check(_S.Number, _S.is_finite().annotate(expected="a finite number")), _S.Null).annotate(format="double"), "trace": TraceConfig, "truncation": OpenAIResponsesTruncation, "user": _b.check(_S.String.annotate(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."), _S.is_max_length(256).annotate(expected="a value with a length of at most 256"))}, optional=("background", "cache_control", "debug", "frequency_penalty", "image_config", "include", "input", "instructions", "max_output_tokens", "max_tool_calls", "metadata", "modalities", "model", "models", "parallel_tool_calls", "plugins", "presence_penalty", "previous_response_id", "prompt", "prompt_cache_key", "prompt_cache_options", "provider", "reasoning", "route", "safety_identifier", "service_tier", "session_id", "stop_server_tools_when", "store", "stream", "temperature", "text", "tool_choice", "tools", "top_k", "top_logprobs", "top_p", "trace", "truncation", "user",)).annotate(description="Request schema for Responses endpoint", identifier="ResponsesRequest")
|
|
910
|
+
StreamEvents: _S.Bottom[_T.StreamEvents, _t.Any] = _b.union(OpenResponsesCreatedEvent, OpenResponsesInProgressEvent, StreamEventsResponseCompleted, StreamEventsResponseIncomplete, StreamEventsResponseFailed, ErrorEvent, StreamEventsResponseOutputItemAdded, StreamEventsResponseOutputItemDone, ContentPartAddedEvent, ContentPartDoneEvent, TextDeltaEvent, TextDoneEvent, RefusalDeltaEvent, RefusalDoneEvent, AnnotationAddedEvent, FunctionCallArgsDeltaEvent, FunctionCallArgsDoneEvent, ReasoningDeltaEvent, ReasoningDoneEvent, ReasoningSummaryPartAddedEvent, ReasoningSummaryPartDoneEvent, ReasoningSummaryTextDeltaEvent, ReasoningSummaryTextDoneEvent, ImageGenCallInProgressEvent, ImageGenCallGeneratingEvent, ImageGenCallPartialImageEvent, ImageGenCallCompletedEvent, WebSearchCallInProgressEvent, WebSearchCallSearchingEvent, WebSearchCallCompletedEvent, CustomToolCallInputDeltaEvent, CustomToolCallInputDoneEvent, ApplyPatchCallOperationDiffDeltaEvent, ApplyPatchCallOperationDiffDoneEvent, FusionCallInProgressEvent, FusionCallPanelAddedEvent, FusionCallPanelDeltaEvent, FusionCallPanelReasoningDeltaEvent, FusionCallPanelCompletedEvent, FusionCallPanelFailedEvent, FusionCallAnalysisInProgressEvent, FusionCallAnalysisCompletedEvent, FusionCallCompletedEvent, DebugEvent, mode="one_of").annotate(description="Union of all possible event types emitted during response streaming", identifier="StreamEvents")
|
|
911
|
+
MessagesStreamEvents: _S.Bottom[_T.MessagesStreamEvents, _t.Any] = _b.union(MessagesStartEvent, MessagesDeltaEvent, MessagesStopEvent, MessagesContentBlockStartEvent, MessagesContentBlockDeltaEvent, MessagesContentBlockStopEvent, MessagesPingEvent, MessagesErrorEvent, mode="one_of").annotate(description="Union of all possible streaming events", identifier="MessagesStreamEvents")
|
|
912
|
+
ResponsesStreamingResponse: _StructSchema[_T.ResponsesStreamingResponse, _t.Never, _t.Never] = _b.struct(_T.ResponsesStreamingResponse, {"data": StreamEvents}).annotate(identifier="ResponsesStreamingResponse")
|
|
913
|
+
MessagesStreamingResponse: _StructSchema[_T.MessagesStreamingResponse, _t.Never, _t.Never] = _b.struct(_T.MessagesStreamingResponse, {"data": MessagesStreamEvents, "event": _S.String}).annotate(identifier="MessagesStreamingResponse")
|
|
914
|
+
GetUserActivityParams: _StructSchema[_T.GetUserActivityParams, _t.Never, _t.Never] = _b.struct(_T.GetUserActivityParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String, "date": _S.String.annotate(description="Filter by a single UTC date in the last 30 days (YYYY-MM-DD format)."), "api_key_hash": _S.String.annotate(description="Filter by API key hash (SHA-256 hex string, as returned by the keys API)."), "user_id": _S.String.annotate(description="Filter by org member user ID. Only applicable for organization accounts.")}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories", "date", "api_key_hash", "user_id",))
|
|
915
|
+
GetUserActivity200: _S.Bottom[_T.GetUserActivity200, _t.Any] = ActivityResponse
|
|
916
|
+
GetUserActivity400: _S.Bottom[_T.GetUserActivity400, _t.Any] = BadRequestResponse
|
|
917
|
+
GetUserActivity401: _S.Bottom[_T.GetUserActivity401, _t.Any] = UnauthorizedResponse
|
|
918
|
+
GetUserActivity403: _S.Bottom[_T.GetUserActivity403, _t.Any] = ForbiddenResponse
|
|
919
|
+
GetUserActivity404: _S.Bottom[_T.GetUserActivity404, _t.Any] = NotFoundResponse
|
|
920
|
+
GetUserActivity500: _S.Bottom[_T.GetUserActivity500, _t.Any] = InternalServerResponse
|
|
921
|
+
GetAnalyticsMetaParams: _StructSchema[_T.GetAnalyticsMetaParams, _t.Never, _t.Never] = _b.struct(_T.GetAnalyticsMetaParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories",))
|
|
922
|
+
GetAnalyticsMeta200: _StructSchema[_T.GetAnalyticsMeta200, _t.Never, _t.Never] = _b.struct(_T.GetAnalyticsMeta200, {"data": _b.struct(_T.GetAnalyticsMeta200__data, {"dimensions": _b.array(_b.struct(_T.GetAnalyticsMeta200__data__dimensions__item, {"display_label": _S.String.annotate(description="Human-readable label"), "name": _S.String.annotate(description="Dimension identifier used in query requests")})), "granularities": _b.array(_b.struct(_T.GetAnalyticsMeta200__data__granularities__item, {"display_label": _S.String.annotate(description="Human-readable label"), "name": _b.literals(["minute", "hour", "day", "week", "month"]).annotate(description="Granularity identifier")})), "metrics": _b.array(_b.struct(_T.GetAnalyticsMeta200__data__metrics__item, {"display_format": _b.literals(["number", "currency", "percent", "latency", "throughput"]).annotate(description="How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)"), "display_label": _S.String.annotate(description="Human-readable label"), "is_rate": _S.Boolean.annotate(description="Whether this metric is a rate/ratio (averaged, not summed)"), "name": _S.String.annotate(description="Metric identifier used in query requests")})), "operators": _b.array(_b.struct(_T.GetAnalyticsMeta200__data__operators__item, {"name": _b.literals(["eq", "neq", "in", "not_in", "gt", "gte", "lt", "lte"]).annotate(description="Operator identifier used in filter definitions"), "value_type": _b.literals(["scalar", "array"]).annotate(description="Whether the operator expects a single value or an array")}))})})
|
|
923
|
+
GetAnalyticsMeta401: _S.Bottom[_T.GetAnalyticsMeta401, _t.Any] = UnauthorizedResponse
|
|
924
|
+
GetAnalyticsMeta403: _S.Bottom[_T.GetAnalyticsMeta403, _t.Any] = ForbiddenResponse
|
|
925
|
+
GetAnalyticsMeta500: _S.Bottom[_T.GetAnalyticsMeta500, _t.Any] = InternalServerResponse
|
|
926
|
+
QueryAnalyticsParams: _StructSchema[_T.QueryAnalyticsParams, _t.Never, _t.Never] = _b.struct(_T.QueryAnalyticsParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories",))
|
|
927
|
+
QueryAnalyticsRequestJson: _StructSchema[_T.QueryAnalyticsRequestJson, _t.Never, _t.Never] = _b.struct(_T.QueryAnalyticsRequestJson, {"classifier_dimensions": _b.struct(_T.QueryAnalyticsRequestJson__classifier_dimensions, {"classifier_id": _S.String.annotate(description="UUID of the classifier whose tags to group by.", format="uuid"), "dimension_names": _b.check(_b.array(_S.String.annotate(description="Classifier dimension name (snake_case identifier). When exactly one name is provided, the response uses it as the column key; with multiple names or none, the response uses `clf_dimension_name`/`clf_dimension_value` columns.")), _S.is_max_length(10).annotate(expected="a value with a length of at most 10")), "include_nulls": _S.Boolean.annotate(description="When true, also include generations that have no tag from this classifier. Defaults to false, which returns only classified generations.")}, optional=("dimension_names", "include_nulls",)).annotate(description="Group results by custom classifier tags, breaking down metrics by the specified dimension values. Requires an active classifier on the workspace."), "classifier_filters": _b.struct(_T.QueryAnalyticsRequestJson__classifier_filters, {"classifier_id": _S.String.annotate(description="UUID of the classifier whose tags to filter by. Must match classifier_dimensions.classifier_id when both are specified.", format="uuid"), "filters": _b.check(_b.check(_b.array(_b.struct(_T.QueryAnalyticsRequestJson__classifier_filters__filters__item, {"field": _S.String.annotate(description="Classifier dimension name to filter on (snake_case identifier, e.g. \"department\", \"work_type\")."), "operator": _S.String.annotate(description="Filter operator. Only equality/set operators are supported (eq, neq, in, not_in) — ordered comparisons are not available because classification values are strings."), "value": _b.union(_S.String, _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), _b.array(_b.union(_S.String, _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number"))))).annotate(description="Filter value. Use a scalar (string or number) for eq/neq, or an array for in/not_in.")})), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(10).annotate(expected="a value with a length of at most 10"))}).annotate(description="Filter results to generations with specific classifier tag values. Can be combined with classifier_dimensions (must use the same classifier_id) or used independently with standard dimensions."), "dimensions": _b.check(_b.array(_S.String.annotate(description="Dimension to group by (up to 2). Use the /meta endpoint for available dimensions.")), _S.is_max_length(2).annotate(expected="a value with a length of at most 2")), "filters": _b.check(_b.array(_b.struct(_T.QueryAnalyticsRequestJson__filters__item, {"field": _S.String.annotate(description="Dimension to filter on. Use the /meta endpoint for available dimensions."), "operator": _S.String.annotate(description="Filter operator"), "value": _b.union(_S.String, _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), _b.array(_b.union(_S.String, _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number"))))).annotate(description="Filter value (scalar or array depending on operator). Several dimensions are enriched in responses (returned as human-readable labels), but filters must use the underlying ID: `api_key_id` — numeric ID (from generation metadata) or key hash (64-char hex from GET /api/v1/keys, resolved server-side); `user` — Clerk user ID (e.g. \"user_abc123\"), not the display name; `workspace` — workspace UUID, not the workspace name; `app` — numeric app ID, not the app title; `model` — permaslug (e.g. \"openai/gpt-4o\"), not the display name. Other dimensions (provider, origin, country, etc.) are not enriched and accept the value as returned.")})), _S.is_max_length(20).annotate(expected="a value with a length of at most 20")), "granularity": _S.String.annotate(description="Time granularity"), "group_limit": _b.check(_S.Number.annotate(description="Maximum rows per distinct combination of dimensions. When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified."), _S.is_int().annotate(expected="an integer")), "limit": _b.check(_S.Number.annotate(description="Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations."), _S.is_int().annotate(expected="an integer")), "metrics": _b.check(_b.array(_S.String.annotate(description="Metric name")), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "order_by": _b.struct(_T.QueryAnalyticsRequestJson__order_by, {"direction": _b.literals(["asc", "desc"]), "field": _S.String.annotate(description="Field to order by: a metric included in `metrics` (or \"request_count\", which may be ordered by without being requested), a requested dimension, or \"date\".")}), "time_range": _b.struct(_T.QueryAnalyticsRequestJson__time_range, {"end": _S.String.annotate(format="date-time"), "start": _S.String.annotate(format="date-time")})}, optional=("classifier_dimensions", "classifier_filters", "dimensions", "filters", "granularity", "group_limit", "limit", "order_by", "time_range",))
|
|
928
|
+
QueryAnalytics200: _StructSchema[_T.QueryAnalytics200, _t.Never, _t.Never] = _b.struct(_T.QueryAnalytics200, {"data": _b.struct(_T.QueryAnalytics200__data, {"cachedAt": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "data": _b.array(_b.struct(_T.QueryAnalytics200__data__data__item, {}).annotate(description="A row of analytics data with metric/dimension values")), "metadata": _b.struct(_T.QueryAnalytics200__data__metadata, {"query_time_ms": _b.check(_S.Number.annotate(format="double"), _S.is_finite().annotate(expected="a finite number")), "row_count": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "truncated": _S.Boolean}), "warnings": _b.array(_S.String).annotate(description="Warnings about filter resolution issues (e.g. unresolvable api_key_id hashes). The query still runs normally; these inform the caller that some filter values could not be resolved.")}, optional=("cachedAt", "warnings",))})
|
|
929
|
+
QueryAnalytics400: _S.Bottom[_T.QueryAnalytics400, _t.Any] = BadRequestResponse
|
|
930
|
+
QueryAnalytics401: _S.Bottom[_T.QueryAnalytics401, _t.Any] = UnauthorizedResponse
|
|
931
|
+
QueryAnalytics403: _S.Bottom[_T.QueryAnalytics403, _t.Any] = ForbiddenResponse
|
|
932
|
+
QueryAnalytics408: _S.Bottom[_T.QueryAnalytics408, _t.Any] = RequestTimeoutResponse
|
|
933
|
+
QueryAnalytics500: _S.Bottom[_T.QueryAnalytics500, _t.Any] = InternalServerResponse
|
|
934
|
+
CreateAudioSpeechParams: _StructSchema[_T.CreateAudioSpeechParams, _t.Never, _t.Never] = _b.struct(_T.CreateAudioSpeechParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories",))
|
|
935
|
+
CreateAudioSpeechRequestJson: _S.Bottom[_T.CreateAudioSpeechRequestJson, _t.Any] = SpeechRequest
|
|
936
|
+
CreateAudioSpeech400: _S.Bottom[_T.CreateAudioSpeech400, _t.Any] = BadRequestResponse
|
|
937
|
+
CreateAudioSpeech401: _S.Bottom[_T.CreateAudioSpeech401, _t.Any] = UnauthorizedResponse
|
|
938
|
+
CreateAudioSpeech402: _S.Bottom[_T.CreateAudioSpeech402, _t.Any] = PaymentRequiredResponse
|
|
939
|
+
CreateAudioSpeech404: _S.Bottom[_T.CreateAudioSpeech404, _t.Any] = NotFoundResponse
|
|
940
|
+
CreateAudioSpeech429: _S.Bottom[_T.CreateAudioSpeech429, _t.Any] = TooManyRequestsResponse
|
|
941
|
+
CreateAudioSpeech500: _S.Bottom[_T.CreateAudioSpeech500, _t.Any] = InternalServerResponse
|
|
942
|
+
CreateAudioSpeech502: _S.Bottom[_T.CreateAudioSpeech502, _t.Any] = BadGatewayResponse
|
|
943
|
+
CreateAudioSpeech503: _S.Bottom[_T.CreateAudioSpeech503, _t.Any] = ServiceUnavailableResponse
|
|
944
|
+
CreateAudioSpeech524: _S.Bottom[_T.CreateAudioSpeech524, _t.Any] = EdgeNetworkTimeoutResponse
|
|
945
|
+
CreateAudioSpeech529: _S.Bottom[_T.CreateAudioSpeech529, _t.Any] = ProviderOverloadedResponse
|
|
946
|
+
CreateAudioTranscriptionsParams: _StructSchema[_T.CreateAudioTranscriptionsParams, _t.Never, _t.Never] = _b.struct(_T.CreateAudioTranscriptionsParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories",))
|
|
947
|
+
CreateAudioTranscriptionsRequestJson: _S.Bottom[_T.CreateAudioTranscriptionsRequestJson, _t.Any] = STTRequest
|
|
948
|
+
CreateAudioTranscriptions200: _S.Bottom[_T.CreateAudioTranscriptions200, _t.Any] = STTResponse
|
|
949
|
+
CreateAudioTranscriptions400: _S.Bottom[_T.CreateAudioTranscriptions400, _t.Any] = BadRequestResponse
|
|
950
|
+
CreateAudioTranscriptions401: _S.Bottom[_T.CreateAudioTranscriptions401, _t.Any] = UnauthorizedResponse
|
|
951
|
+
CreateAudioTranscriptions402: _S.Bottom[_T.CreateAudioTranscriptions402, _t.Any] = PaymentRequiredResponse
|
|
952
|
+
CreateAudioTranscriptions404: _S.Bottom[_T.CreateAudioTranscriptions404, _t.Any] = NotFoundResponse
|
|
953
|
+
CreateAudioTranscriptions429: _S.Bottom[_T.CreateAudioTranscriptions429, _t.Any] = TooManyRequestsResponse
|
|
954
|
+
CreateAudioTranscriptions500: _S.Bottom[_T.CreateAudioTranscriptions500, _t.Any] = InternalServerResponse
|
|
955
|
+
CreateAudioTranscriptions502: _S.Bottom[_T.CreateAudioTranscriptions502, _t.Any] = BadGatewayResponse
|
|
956
|
+
CreateAudioTranscriptions503: _S.Bottom[_T.CreateAudioTranscriptions503, _t.Any] = ServiceUnavailableResponse
|
|
957
|
+
CreateAudioTranscriptions524: _S.Bottom[_T.CreateAudioTranscriptions524, _t.Any] = EdgeNetworkTimeoutResponse
|
|
958
|
+
CreateAudioTranscriptions529: _S.Bottom[_T.CreateAudioTranscriptions529, _t.Any] = ProviderOverloadedResponse
|
|
959
|
+
ExchangeAuthCodeForAPIKeyParams: _StructSchema[_T.ExchangeAuthCodeForAPIKeyParams, _t.Never, _t.Never] = _b.struct(_T.ExchangeAuthCodeForAPIKeyParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories",))
|
|
960
|
+
ExchangeAuthCodeForAPIKeyRequestJson: _StructSchema[_T.ExchangeAuthCodeForAPIKeyRequestJson, _t.Never, _t.Never] = _b.struct(_T.ExchangeAuthCodeForAPIKeyRequestJson, {"code": _S.String.annotate(description="The authorization code received from the OAuth redirect"), "code_challenge_method": _b.union(_b.literal("S256"), _b.literal("plain"), _S.Null).annotate(description="The method used to generate the code challenge"), "code_verifier": _S.String.annotate(description="The code verifier if code_challenge was used in the authorization request")}, optional=("code_challenge_method", "code_verifier",))
|
|
961
|
+
ExchangeAuthCodeForAPIKey200: _StructSchema[_T.ExchangeAuthCodeForAPIKey200, _t.Never, _t.Never] = _b.struct(_T.ExchangeAuthCodeForAPIKey200, {"key": _S.String.annotate(description="The API key to use for OpenRouter requests"), "user_id": _b.union(_S.String, _S.Null).annotate(description="User ID associated with the API key")})
|
|
962
|
+
ExchangeAuthCodeForAPIKey400: _S.Bottom[_T.ExchangeAuthCodeForAPIKey400, _t.Any] = BadRequestResponse
|
|
963
|
+
ExchangeAuthCodeForAPIKey403: _S.Bottom[_T.ExchangeAuthCodeForAPIKey403, _t.Any] = ForbiddenResponse
|
|
964
|
+
ExchangeAuthCodeForAPIKey500: _S.Bottom[_T.ExchangeAuthCodeForAPIKey500, _t.Any] = InternalServerResponse
|
|
965
|
+
CreateAuthKeysCodeParams: _StructSchema[_T.CreateAuthKeysCodeParams, _t.Never, _t.Never] = _b.struct(_T.CreateAuthKeysCodeParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories",))
|
|
966
|
+
CreateAuthKeysCodeRequestJson: _StructSchema[_T.CreateAuthKeysCodeRequestJson, _t.Never, _t.Never] = _b.struct(_T.CreateAuthKeysCodeRequestJson, {"callback_url": _S.String.annotate(description="The callback URL to redirect to after authorization. Supports https URLs and localhost/127.0.0.1 URLs on any port for local CLI tools.", format="uri"), "code_challenge": _S.String.annotate(description="PKCE code challenge for enhanced security"), "code_challenge_method": _b.literals(["S256", "plain"]).annotate(description="The method used to generate the code challenge"), "expires_at": _b.union(_S.String, _S.Null).annotate(description="Optional expiration time for the API key to be created", format="date-time"), "key_label": _b.check(_S.String.annotate(description="Optional custom label for the API key. Defaults to the app name if not provided."), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), "limit": _b.check(_S.Number.annotate(description="Credit limit for the API key to be created", format="double"), _S.is_finite().annotate(expected="a finite number")), "spawn_agent": _S.String.annotate(description="Agent identifier for spawn telemetry"), "spawn_cloud": _S.String.annotate(description="Cloud identifier for spawn telemetry"), "usage_limit_type": _b.literals(["daily", "weekly", "monthly"]).annotate(description="Optional credit limit reset interval. When set, the credit limit resets on this interval."), "workspace_id": _S.String.annotate(description="Optional workspace ID to associate the API key with", format="uuid")}, optional=("code_challenge", "code_challenge_method", "expires_at", "key_label", "limit", "spawn_agent", "spawn_cloud", "usage_limit_type", "workspace_id",))
|
|
967
|
+
CreateAuthKeysCode200: _StructSchema[_T.CreateAuthKeysCode200, _t.Never, _t.Never] = _b.struct(_T.CreateAuthKeysCode200, {"data": _b.struct(_T.CreateAuthKeysCode200__data, {"app_id": _b.check(_S.Number.annotate(description="The application ID associated with this auth code"), _S.is_int().annotate(expected="an integer")), "created_at": _S.String.annotate(description="ISO 8601 timestamp of when the auth code was created"), "id": _S.String.annotate(description="The authorization code ID to use in the exchange request")}).annotate(description="Auth code data")})
|
|
968
|
+
CreateAuthKeysCode400: _S.Bottom[_T.CreateAuthKeysCode400, _t.Any] = BadRequestResponse
|
|
969
|
+
CreateAuthKeysCode401: _S.Bottom[_T.CreateAuthKeysCode401, _t.Any] = UnauthorizedResponse
|
|
970
|
+
CreateAuthKeysCode403: _S.Bottom[_T.CreateAuthKeysCode403, _t.Any] = ForbiddenResponse
|
|
971
|
+
CreateAuthKeysCode409: _S.Bottom[_T.CreateAuthKeysCode409, _t.Any] = ConflictResponse
|
|
972
|
+
CreateAuthKeysCode500: _S.Bottom[_T.CreateAuthKeysCode500, _t.Any] = InternalServerResponse
|
|
973
|
+
GetBenchmarksParams: _StructSchema[_T.GetBenchmarksParams, _t.Never, _t.Never] = _b.struct(_T.GetBenchmarksParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String, "source": _b.literals(["artificial-analysis", "design-arena"]).annotate(description="Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources."), "task_type": _b.literals(["coding", "intelligence", "agentic"]).annotate(description="Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category."), "arena": _b.literals(["models", "builders", "agents"]).annotate(description="Design Arena only: arena to query. Defaults to `models` when source is `design-arena`."), "category": _S.String.annotate(description="Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories."), "max_results": _b.check(_b.check(_S.Number.annotate(description="Maximum number of items to return. When omitted, all matching results are returned."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1"))}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories", "source", "task_type", "arena", "category", "max_results",))
|
|
974
|
+
GetBenchmarks200: _S.Bottom[_T.GetBenchmarks200, _t.Any] = UnifiedBenchmarksResponse
|
|
975
|
+
GetBenchmarks400: _S.Bottom[_T.GetBenchmarks400, _t.Any] = BadRequestResponse
|
|
976
|
+
GetBenchmarks401: _S.Bottom[_T.GetBenchmarks401, _t.Any] = UnauthorizedResponse
|
|
977
|
+
GetBenchmarks429: _S.Bottom[_T.GetBenchmarks429, _t.Any] = TooManyRequestsResponse
|
|
978
|
+
GetBenchmarks500: _S.Bottom[_T.GetBenchmarks500, _t.Any] = InternalServerResponse
|
|
979
|
+
ListBYOKKeysParams: _StructSchema[_T.ListBYOKKeysParams, _t.Never, _t.Never] = _b.struct(_T.ListBYOKKeysParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String, "offset": _b.union(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(0).annotate(expected="a value greater than or equal to 0")), _S.Null).annotate(description="Number of records to skip for pagination"), "limit": _b.check(_b.check(_b.check(_S.Number.annotate(description="Maximum number of records to return (max 100)"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1")), _S.is_less_than_or_equal_to(100).annotate(expected="a value less than or equal to 100")), "workspace_id": _S.String.annotate(description="Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.", format="uuid"), "provider": _b.literals(["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", "coreweave", "crusoe", "darkbloom", "decart", "deepgram", "deepinfra", "deepseek", "dekallm", "digitalocean", "featherless", "fireworks", "fish-audio", "friendli", "gmicloud", "google-ai-studio", "google-vertex", "groq", "heygen", "inception", "inceptron", "inferact-vllm", "inference-net", "infermatic", "inflection", "io-net", "ionstream", "krea", "liquid", "mancer", "mara", "meta", "minimax", "mistral", "modelrun", "modular", "moonshotai", "morph", "ncompass", "nebius", "nex-agi", "nextbit", "novita", "nvidia", "open-inference", "openai", "parasail", "perceptron", "perplexity", "phala", "poolside", "quiver", "recraft", "reka", "relace", "runway", "sail-research", "sakana", "sambanova", "seed", "siliconflow", "sourceful", "stepfun", "streamlake", "switchpoint", "tencent", "tenstorrent", "together", "upstage", "venice", "wafer", "wandb", "xai", "xiaomi", "z-ai"]).annotate(description="Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).")}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories", "offset", "limit", "workspace_id", "provider",))
|
|
980
|
+
ListBYOKKeys200: _S.Bottom[_T.ListBYOKKeys200, _t.Any] = ListBYOKKeysResponse
|
|
981
|
+
ListBYOKKeys400: _S.Bottom[_T.ListBYOKKeys400, _t.Any] = BadRequestResponse
|
|
982
|
+
ListBYOKKeys401: _S.Bottom[_T.ListBYOKKeys401, _t.Any] = UnauthorizedResponse
|
|
983
|
+
ListBYOKKeys500: _S.Bottom[_T.ListBYOKKeys500, _t.Any] = InternalServerResponse
|
|
984
|
+
CreateBYOKKeyParams: _StructSchema[_T.CreateBYOKKeyParams, _t.Never, _t.Never] = _b.struct(_T.CreateBYOKKeyParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories",))
|
|
985
|
+
CreateBYOKKeyRequestJson: _S.Bottom[_T.CreateBYOKKeyRequestJson, _t.Any] = CreateBYOKKeyRequest
|
|
986
|
+
CreateBYOKKey201: _S.Bottom[_T.CreateBYOKKey201, _t.Any] = CreateBYOKKeyResponse
|
|
987
|
+
CreateBYOKKey400: _S.Bottom[_T.CreateBYOKKey400, _t.Any] = BadRequestResponse
|
|
988
|
+
CreateBYOKKey401: _S.Bottom[_T.CreateBYOKKey401, _t.Any] = UnauthorizedResponse
|
|
989
|
+
CreateBYOKKey403: _S.Bottom[_T.CreateBYOKKey403, _t.Any] = ForbiddenResponse
|
|
990
|
+
CreateBYOKKey500: _S.Bottom[_T.CreateBYOKKey500, _t.Any] = InternalServerResponse
|
|
991
|
+
GetBYOKKeyParams: _StructSchema[_T.GetBYOKKeyParams, _t.Never, _t.Never] = _b.struct(_T.GetBYOKKeyParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories",))
|
|
992
|
+
GetBYOKKey200: _S.Bottom[_T.GetBYOKKey200, _t.Any] = GetBYOKKeyResponse
|
|
993
|
+
GetBYOKKey401: _S.Bottom[_T.GetBYOKKey401, _t.Any] = UnauthorizedResponse
|
|
994
|
+
GetBYOKKey404: _S.Bottom[_T.GetBYOKKey404, _t.Any] = NotFoundResponse
|
|
995
|
+
GetBYOKKey500: _S.Bottom[_T.GetBYOKKey500, _t.Any] = InternalServerResponse
|
|
996
|
+
DeleteBYOKKeyParams: _StructSchema[_T.DeleteBYOKKeyParams, _t.Never, _t.Never] = _b.struct(_T.DeleteBYOKKeyParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories",))
|
|
997
|
+
DeleteBYOKKey200: _S.Bottom[_T.DeleteBYOKKey200, _t.Any] = DeleteBYOKKeyResponse
|
|
998
|
+
DeleteBYOKKey401: _S.Bottom[_T.DeleteBYOKKey401, _t.Any] = UnauthorizedResponse
|
|
999
|
+
DeleteBYOKKey404: _S.Bottom[_T.DeleteBYOKKey404, _t.Any] = NotFoundResponse
|
|
1000
|
+
DeleteBYOKKey500: _S.Bottom[_T.DeleteBYOKKey500, _t.Any] = InternalServerResponse
|
|
1001
|
+
UpdateBYOKKeyParams: _StructSchema[_T.UpdateBYOKKeyParams, _t.Never, _t.Never] = _b.struct(_T.UpdateBYOKKeyParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories",))
|
|
1002
|
+
UpdateBYOKKeyRequestJson: _S.Bottom[_T.UpdateBYOKKeyRequestJson, _t.Any] = UpdateBYOKKeyRequest
|
|
1003
|
+
UpdateBYOKKey200: _S.Bottom[_T.UpdateBYOKKey200, _t.Any] = UpdateBYOKKeyResponse
|
|
1004
|
+
UpdateBYOKKey400: _S.Bottom[_T.UpdateBYOKKey400, _t.Any] = BadRequestResponse
|
|
1005
|
+
UpdateBYOKKey401: _S.Bottom[_T.UpdateBYOKKey401, _t.Any] = UnauthorizedResponse
|
|
1006
|
+
UpdateBYOKKey404: _S.Bottom[_T.UpdateBYOKKey404, _t.Any] = NotFoundResponse
|
|
1007
|
+
UpdateBYOKKey500: _S.Bottom[_T.UpdateBYOKKey500, _t.Any] = InternalServerResponse
|
|
1008
|
+
SendChatCompletionRequestParams: _StructSchema[_T.SendChatCompletionRequestParams, _t.Never, _t.Never] = _b.struct(_T.SendChatCompletionRequestParams, {"HTTP-Referer": _S.String, "X-OpenRouter-Title": _S.String, "X-OpenRouter-Categories": _S.String, "X-OpenRouter-Metadata": MetadataLevel}, optional=("HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories", "X-OpenRouter-Metadata",))
|
|
1009
|
+
SendChatCompletionRequestRequestJson: _S.Bottom[_T.SendChatCompletionRequestRequestJson, _t.Any] = ChatRequest
|
|
1010
|
+
SendChatCompletionRequest200: _S.Bottom[_T.SendChatCompletionRequest200, _t.Any] = ChatResult
|
|
1011
|
+
SendChatCompletionRequest200Sse: _S.Bottom[_T.SendChatCompletionRequest200Sse, _t.Any] = ChatStreamingResponse
|
|
1012
|
+
SendChatCompletionRequest400: _S.Bottom[_T.SendChatCompletionRequest400, _t.Any] = BadRequestResponse
|
|
1013
|
+
SendChatCompletionRequest401: _S.Bottom[_T.SendChatCompletionRequest401, _t.Any] = UnauthorizedResponse
|
|
1014
|
+
SendChatCompletionRequest402: _S.Bottom[_T.SendChatCompletionRequest402, _t.Any] = PaymentRequiredResponse
|
|
1015
|
+
SendChatCompletionRequest403: _S.Bottom[_T.SendChatCompletionRequest403, _t.Any] = ForbiddenResponse
|