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,1016 @@
|
|
|
1
|
+
"""Schemas generated by ``scripts/gen_ai_schemas.py``; do not edit.
|
|
2
|
+
Import them from ``pyfect.ai.openai.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.openai.generated import types as _T
|
|
13
|
+
from pyfect.schema._struct import StructSchema as _StructSchema
|
|
14
|
+
|
|
15
|
+
from pyfect.ai.openai.generated._schemas_0 import ActiveStatus, AdminApiKey, AgentToolConfigParamComputerUse, AgentToolConfigParamFunction, AgentToolConfigParamProgrammaticToolCalling, AgentToolConfigParamToolSearch, AgentToolResourceComputerUse, AgentToolResourceFunction, AgentToolResourceProgrammaticToolCalling, Annotation, AnswerResourcePredicate, AnswerResourceRefusal, ApplyPatchCallOutputStatus, ApplyPatchCallOutputStatusParam, ApplyPatchCallStatus, ApplyPatchCallStatusParam, ApplyPatchCreateFileOperation, ApplyPatchDeleteFileOperation, ApplyPatchOperationParam, ApplyPatchToolParam, ApplyPatchUpdateFileOperation, AssignedRoleDetails, AssistantSupportedModels, AssistantToolsCode, AssistantToolsFileSearchTypeOnly, AssistantsNamedToolChoice, AttachmentType, AudioTranscription, AudioTranscriptionResponse, AuditLogActorServiceAccount, AuditLogActorUser, AuditLogEventType, AutoChunkingStrategyRequestParam, AutomaticThreadTitlingParam, AwsExternalStorageProviderParams, AwsExternalStorageProviderResponse, AzureExternalStorageProviderParams, AzureExternalStorageProviderResponse, Batch, BetaAgentTag, BetaApplyPatchCallOutputStatus, BetaApplyPatchCallOutputStatusParam, BetaApplyPatchCallStatus, BetaApplyPatchCallStatusParam, BetaApplyPatchCreateFileOperation, BetaApplyPatchCreateFileOperationParam, BetaApplyPatchDeleteFileOperation, BetaApplyPatchDeleteFileOperationParam, BetaApplyPatchUpdateFileOperation, BetaApplyPatchUpdateFileOperationParam, BetaApproximateLocation, BetaCacheMissReasonTypeEnum, BetaCallableToolAllowedCaller, BetaClickButtonType, BetaCodeInterpreterOutputImage, BetaCodeInterpreterOutputLogs, BetaComparisonFilter, BetaCompoundFilter, BetaComputerCallSafetyCheckParam, BetaComputerEnvironment, BetaComputerScreenshotImage, BetaComputerTool, BetaContainerFileCitationBody, BetaContainerFileCitationParam, BetaContainerMemoryLimit, BetaContainerNetworkPolicyDisabledParam, BetaContainerNetworkPolicyDomainSecretParam, BetaContainerReferenceParam, BetaContainerReferenceResource, BetaContextManagementParam, BetaConversationParam_2, BetaCoordParam, BetaCustomTextFormatParam, BetaCyberAccessProgramEnum, BetaDetailEnum, BetaDirectToolCallCaller, BetaDirectToolCallCallerParam, BetaDoubleClickAction, BetaEmptyModelParam, BetaEncryptedContent, BetaEncryptedContentParam, BetaFileCitationBody, BetaFileCitationParam, BetaFileDetailEnum, BetaFileInputDetail, BetaFilePath, BetaFunctionCallItemStatus, BetaFunctionCallOutputStatusEnum, BetaFunctionCallStatus, BetaFunctionShellAction, BetaFunctionShellActionParam, BetaFunctionShellCallItemStatus, BetaFunctionShellCallOutputExitOutcome, BetaFunctionShellCallOutputExitOutcomeParam, BetaFunctionShellCallOutputStatusEnum, BetaFunctionShellCallOutputTimeoutOutcome, BetaFunctionShellCallOutputTimeoutOutcomeParam, BetaFunctionShellCallStatus, BetaGrammarSyntax1, BetaHTTPError, BetaHybridSearchOptions, BetaImageBackground, BetaImageDetail, BetaImageGenActionEnum, BetaImageOutputFormat, BetaIncludeEnum, BetaInlineSkillSourceParam, BetaInputFidelity, BetaKeyPressAction, BetaLocalEnvironmentResource, BetaLocalShellExecAction, BetaLocalShellToolParam, BetaLocalSkillParam, BetaMCPListToolsTool, BetaMCPProtocolError, BetaMCPToolCallStatus, BetaMCPToolExecutionError, BetaMCPToolFilter, BetaMessagePhase, BetaMessagePhase_2, BetaMessageRole, BetaMessageStatus, BetaMetadata, BetaModelIdsShared, BetaModerationErrorBody, BetaModerationInputType, BetaModerationMode, BetaMoveParam, BetaMultiAgentAction, BetaMultiAgentAction1, BetaMultiAgentParam, BetaPersonalityEnum, BetaProgramOutputItemStatus, BetaProgramOutputStatus, BetaProgramToolCallCaller, BetaProgramToolCallCallerParam, BetaProgrammaticToolCallingParam, BetaPromptCacheBreakpointConfig, BetaPromptCacheBreakpointParam, BetaPromptCacheComparisonResponseNotFoundDiagnosticsBody, BetaPromptCacheHitDiagnosticsBody, BetaPromptCacheModeEnum, BetaPromptCacheRetentionEnum, BetaPromptCacheTTLEnum, BetaPromptCacheUnavailableDiagnosticsBody, BetaRankerVersionType, BetaReasoningEffort, BetaReasoningModeEnum, BetaReasoningTextContent, BetaRefusalContent, BetaResponseConversation, BetaResponseErrorCode, BetaResponseFormatJsonObject, BetaResponseFormatJsonSchemaSchema, BetaResponseFormatText, BetaResponseLogProb, BetaResponseStreamOptions, BetaResponseUsage, BetaScreenshotParam, BetaScrollParam, BetaSearchContentType, BetaSearchContextSize, BetaServiceTierEnum, BetaServiceTierResponses, BetaShellCallOutputDelta, BetaSkillReferenceParam, BetaSpecificApplyPatchParam, BetaSpecificFunctionShellParam, BetaSpecificProgrammaticToolCallingParam, BetaSummaryTextContent, BetaTextContent, BetaToolChoiceAllowed, BetaToolChoiceCustom, BetaToolChoiceFunction, BetaToolChoiceMCP, BetaToolChoiceOptions, BetaToolChoiceTypes, BetaToolSearchExecutionType, BetaTopLogProb, BetaTruncationEnum, BetaTypeParam, BetaUrlCitationBody, BetaUrlCitationParam, BetaVectorStoreFileAttributes, BetaVerbosity, BetaWaitParam, BetaWebSearchActionFind, BetaWebSearchActionOpenPage, BetaWebSearchActionSearch, BetaWebSearchApproximateLocation, BetaWebSearchCallStatus, Beta_AgentTagParam, Beta_MisalignmentErrorType, Beta_MisalignmentSteer, BrowserAuthenticationFieldResource, BrowserAuthenticationFieldValueParam, BrowserAuthenticationOptionResource, BrowserOriginAccessDecisionParam, C2PAValidationStateApi, CacheMissReasonTypeEnum, CallableToolAllowedCaller, ChatCompletionAllowedToolsChoice, ChatCompletionDeleted, ChatCompletionFunctionCallOption, ChatCompletionFunctions, ChatCompletionMessageList, ChatCompletionMessageToolCalls, ChatCompletionModerationError, ChatCompletionNamedToolChoice, ChatCompletionNamedToolChoiceCustom, ChatCompletionRequestFunctionMessage, ChatCompletionRequestMessageContentPartAudio, ChatCompletionRequestMessageContentPartFile, ChatCompletionRequestMessageContentPartImage, ChatCompletionRequestMessageContentPartRefusal, ChatCompletionRequestMessageContentPartText, ChatCompletionStreamOptions, ChatCompletionStreamResponseDelta, ChatCompletionTokenLogprob, ChatSessionAutomaticThreadTitling, ChatSessionFileUpload, ChatSessionHistory, ChatSessionRateLimits, ChatSessionStatus, ChatkitWorkflowTracing, ChoiceValueParam, ChoiceValueResource, ClickParam, ClientToolCallStatus, ClosedStatus, CodeInterpreterOutputImage, CodeInterpreterOutputLogs, CodeInterpreterToolCall, CompactionBody, CompactionTriggerItemParam, CompletionUsage, ComputerCallSafetyCheckParam, ComputerScreenshotContent, ComputerScreenshotImage, ComputerScreenshotResource, ComputerTool, ComputerToolCallOutputResource, ComputerUseApprovalRequestKindResourceBrowserOriginAccess, ComputerUseApprovalResponseKindResourceBrowserAuthenticationCancelResource, ComputerUseApprovalResponseKindResourceBrowserAuthenticationSubmitResource, ComputerUsePreviewTool, ContainerFileListResource, ContainerFileResource, ContainerListResource, ContainerMemoryLimit, ContainerNetworkPolicyAllowlistParam, ContainerNetworkPolicyDisabledParam, ContainerReferenceParam, ContainerReferenceResource, ContainerResource, ContainerSizeParam, ContainerSizeResource, ContextManagementParam, ConversationParam_2, ConversationResource, CostsResult, CreateBatchRequest, CreateCompletionRequest, CreateCompletionResponse, CreateContainerFileBody, CreateContainerFileBodyMultipart, CreateEmbeddingRequest, CreateEmbeddingResponse, CreateEvalCustomDataSourceConfig, CreateEvalJsonlRunDataSource, CreateEvalLogsDataSourceConfig, CreateEvalStoredCompletionsDataSourceConfig, CreateFileRequestMultipart, CreateFineTuningCheckpointPermissionRequest, CreateMcpOauthTokenEndpointAuthParamClientSecretBasic, CreateMcpOauthTokenEndpointAuthParamClientSecretPost, CreateMcpOauthTokenEndpointAuthParamNone, CreateSpeechRequest, CreateSpeechResponseStreamEvent, CreateTranscriptionRequestMultipart, CreateTranscriptionResponseDiarizedJson, CreateTranscriptionResponseJson, CreateTranscriptionResponseVerboseJson, CreateTranslationRequestMultipart, CreateTranslationResponseJson, CreateTranslationResponseVerboseJson, CreateVaultCredentialAuthParamStaticBearer, CreateVoiceConsentRequestMultipart, CreateVoiceFromConsentRequestMultipart, CustomGrammarFormatParam, CustomTextFormatParam, CustomToolChatCompletions, CyberAccessProgramEnum, DecisionInputText, DecisionsUsageApiSource, DecisionsUsageErrorDetails, DeleteAssistantResponse, DeleteFileResponse, DeleteFineTuningCheckpointPermissionResponse, DesktopParam, DesktopResource, DoneEvent, DoubleClickAction, DragParam, EmptyModelParam, EncryptedContentResource, EnvironmentFilePageObjectResource, EnvironmentFileResource, EnvironmentPackagesParam, EnvironmentPackagesResource, EnvironmentParamNone, EnvironmentParamSelfHosted, EnvironmentResourceNone, EnvironmentResourceSelfHosted, EnvironmentStatusResource, EnvironmentTypeResource, ErrorBodyResource, EvalApiError, EvalCustomDataSourceConfig, EvalGraderPython, EvalGraderStringCheck, EvalGraderTextSimilarity, EvalItemContentOutputText, EvalItemContentText, EvalItemInputImage, EvalJsonlFileContentSource, EvalJsonlFileIdSource, EvalLogsDataSourceConfig, EvalResponsesSource, EvalRunOutputItem, EvalStoredCompletionsDataSourceConfig, EvalStoredCompletionsSource, ExpiresAfterParam, ExternalStorageStatus, FileAnnotationSource, FileSearchRankingOptions, FileSearchToolCall, FileUploadParam, Filters, FineTuneDPOMethod, FineTuneReinforcementHyperparameters, FineTuneSupervisedMethod, FineTuningIntegration, FunctionCallItemStatus, FunctionCallOutputStatusEnum, FunctionCallStatus, FunctionCallStatusResource, FunctionObject, FunctionShellAction, FunctionShellActionParam, FunctionShellCallItemStatus, FunctionShellCallOutputContent, FunctionShellCallOutputOutcomeParam, FunctionShellCallOutputStatusEnum, FunctionShellCallStatus, FunctionTool, FunctionToolParam, GcpExternalStorageProviderParams, GcpExternalStorageProviderResponse, GraderPython, GraderStringCheck, GraderTextSimilarity, Group, GroupResponse, GroupUser, HistoryParam, HostedEnvironmentFileParamFileId, HostedEnvironmentFileParamInline, HostedEnvironmentFileResourceFileId, HostedEnvironmentFileResourceInline, HostedPluginResourceInline, HostedSkillParamSkillReference, HostedSkillResourceInline, HostedSkillResourceSkillReference, HostedTemplateFileResourceFileId, HostedTemplateFileResourceInline, HostedTemplateSkillResourceInline, HostedTemplateSkillResourceSkillReference, HostedToolPermission, HostedToolPermissionUpdate, Image, ImageBackground, ImageDetailParam, ImageEditPartialImageEvent, ImageGenActionEnum, ImageGenInputUsageDetails, ImageGenOutputTokensDetails, ImageGenPartialImageEvent, ImageGenTool, ImageGenToolCall, ImageOutputFormat, ImageRefParam_2, ImagesUsage, IncludeEnum, InlineCapabilitySourceParamBase64, InlineSkillParam, InputAudio, InputContentParamInputImage, InputContentParamInputText, InputContentResourceInputImage, InputContentResourceInputText, InputFileContent, InputFileContentParam, InputImageContent, InputImageContentParamAutoParam, InputTextContent, InputTextContentParam, InputTokensDetailsResource, InputTokensDetailsResource_2, Instructions, Invite, ItemReferenceParam, KeyPressAction, ListFilesResponse, ListFineTuningCheckpointPermissionResponse, ListFineTuningJobCheckpointsResponse, LiveAllowedServerEventParam, LiveApplyPatchToolInputParam, LiveClientDelegationParam, LiveCodeInterpreterToolInputParam, LiveComputerToolInputParam, LiveContainerMemoryLimit, LiveContainerNetworkPolicyDisabledParam, LiveContainerReferenceParam, LiveCustomToolInputParam, LiveCustomVoiceParam, LiveFileSearchToolInputParam, LiveFunctionToolChoiceParam, LiveFunctionToolInputParam, LiveHostedShellNetworkPolicyAllowlistParam, LiveImageGenerationToolInputParam, LiveInitialInputTextContentPartParam, LiveInitialMessageStatus, LiveInitialOutputTextContentPartParam, LiveInitialTextContentPartParam, LiveInlineSkillSourceParam, LiveLocalSkillParam, LiveMCPToolChoiceParam, LiveMCPToolInputParam, LiveNamespaceToolInputParam, LiveProgrammaticToolInputParam, LiveReasoningEffort, LiveReasoningSummary, LiveResponsesServiceTier, LiveSIPTrunkAuth, LiveSkillReferenceParam, LiveSpecificApplyPatchParam, LiveSpecificCodeInterpreterParam, LiveSpecificComputerParam, LiveSpecificCustomToolParam, LiveSpecificFileSearchParam, LiveSpecificFunctionShellParam, LiveSpecificImageGenParam, LiveSpecificProgrammaticToolCallingParam, LiveSpecificWebSearchParam, LiveSpecificWebSearchPreviewParam, LiveTextVerbosity, LiveToolChoiceEnum, LiveToolChoiceValueEnum, LiveToolSearchToolInputParam, LiveWebRTCTransport, LiveWebSearchToolInputParam, LocalEnvironmentParam, LocalEnvironmentResource, LocalShellExecAction, LocalShellToolCall, LocalShellToolCallOutput, LocalShellToolParam, LockedStatus, LogProb, MCPApprovalRequest, MCPApprovalResponseResource, MCPListTools, MCPListToolsTool, MCPTool, MCPToolCallError, MCPToolCallStatus, McpConnectionOriginParam, McpConnectionOriginResource, McpOauthTokenEndpointAuthResourceClientSecretBasic, McpOauthTokenEndpointAuthResourceClientSecretPost, McpOauthTokenEndpointAuthResourceNone, McpTransportConfigParamHttp, McpTransportConfigParamStdio, McpTransportResourceHttp, McpTransportResourceStdio, MessageContentImageFileObject, MessageContentImageUrlObject, MessageContentRefusalObject, MessageContentResourceInputImage, MessageContentResourceInputText, MessageContentResourceOutputText, MessageContentTextAnnotationsFileCitationObject, MessageContentTextAnnotationsFilePathObject, MessageDeltaContentImageFileObject, MessageDeltaContentImageUrlObject, MessageDeltaContentRefusalObject, MessageDeltaContentTextAnnotationsFileCitationObject, MessageDeltaContentTextAnnotationsFilePathObject, MessagePhase, MessagePhaseResource, MessagePhase_2, MessageRequestContentTextObject, MessageRole, MessageStatus, Metadata, MisalignmentErrorDetailsResource, Model, ModelIdsLive, ModelIdsResponses, ModelIdsShared, ModerationConfigParam, ModerationErrorBody, ModerationResultBody, MoveParam, MultiAgentConfigCurrentParam, MultiAgentConfigResource, NetworkAccessParam, NetworkAccessResource, NoiseReductionType, OciExternalStorageProviderParams, OciExternalStorageProviderResponse, OpenAIFile, OrganizationCertificate, OrganizationProjectCertificate, OtherChunkingStrategyResponseParam, OutputItemStatusResource, OutputTextResource, OutputTokensDetailsResource, OutputTokensDetailsResource_2, ParallelToolCalls, PersistedAgentToolConfigParamComputerUse, PersistedAgentToolConfigParamFunction, PersistedAgentToolConfigParamProgrammaticToolCalling, PersistedAgentToolConfigParamToolSearch, PersistedAgentToolResourceComputerUse, PersistedAgentToolResourceFunction, PersistedAgentToolResourceProgrammaticToolCalling, PersistedAgentToolResourceToolSearch, PersistedMcpTransportConfigParamHttp, PersistedMcpTransportConfigParamStdio, PersistedMcpTransportResourceHttp, PersistedMcpTransportResourceStdio, PersonalityEnum, Program, ProgramItemParam, ProgramOutput, ProgramOutputItemParam, ProgrammaticToolCallingParam, ProjectApiKeyOwnerServiceAccount, ProjectApiKeyOwnerUser, ProjectEventTypeEnum, ProjectGroup, ProjectRateLimit, ProjectServiceAccount, ProjectServiceAccountApiKey, ProjectUser, PromptCacheComparisonResponseNotFoundDiagnosticsBody, PromptCacheHitDiagnosticsBody, PromptCacheModeEnum, PromptCacheOptions, PromptCacheOptionsParam, PromptCacheRetentionEnum, PromptCacheTTLEnum, PromptCacheUnavailableDiagnosticsBody, Properties_store, ProvenanceCheckObject, ProvenanceDetectionResultApi, PublicProjectResidency, QuestionParamPredicate, RankingOptions, RateLimitsParam, RealtimeAudioFormats, RealtimeFunctionTool, RealtimeReasoningEffort, RealtimeTruncation, RealtimeTurnDetection, ReasoningEffort, ReasoningEffortParam, ReasoningEffortResource, ReasoningItem, ReasoningModeEnum, ReasoningSummaryParam, ReasoningSummaryResource, ReasoningTextContent, RefusalContent, ResponseApplyPatchCallOperationDiffDeltaEvent, ResponseApplyPatchCallOperationDiffDoneEvent, ResponseAudioDeltaEvent, ResponseAudioDoneEvent, ResponseAudioTranscriptDeltaEvent, ResponseAudioTranscriptDoneEvent, ResponseCodeInterpreterCallCodeDeltaEvent, ResponseCodeInterpreterCallCodeDoneEvent, ResponseCodeInterpreterCallCompletedEvent, ResponseCodeInterpreterCallInProgressEvent, ResponseCodeInterpreterCallInterpretingEvent, ResponseCompactionCompactingStreamingEvent, ResponseConfigurationUpdate, ResponseConversation, ResponseCustomToolCallInputDeltaEvent, ResponseCustomToolCallInputDoneEvent, ResponseErrorCode, ResponseErrorEvent, ResponseFileSearchCallCompletedEvent, ResponseFileSearchCallInProgressEvent, ResponseFileSearchCallSearchingEvent, ResponseFormatJsonObject, ResponseFormatJsonSchema, ResponseFormatText, ResponseFunctionCallArgumentsDeltaEvent, ResponseFunctionCallArgumentsDoneEvent, ResponseImageGenCallCompletedEvent, ResponseImageGenCallGeneratingEvent, ResponseImageGenCallInProgressEvent, ResponseImageGenCallPartialImageEvent, ResponseKeepAliveEvent, ResponseLogProb, ResponseMCPCallArgumentsDeltaEvent, ResponseMCPCallArgumentsDoneEvent, ResponseMCPCallCompletedEvent, ResponseMCPCallFailedEvent, ResponseMCPCallInProgressEvent, ResponseMCPListToolsCompletedEvent, ResponseMCPListToolsFailedEvent, ResponseMCPListToolsInProgressEvent, ResponseModalities, ResponseReasoningSummaryPartAddedEvent, ResponseReasoningSummaryPartDoneEvent, ResponseReasoningSummaryTextDeltaEvent, ResponseReasoningSummaryTextDoneEvent, ResponseReasoningTextDeltaEvent, ResponseReasoningTextDoneEvent, ResponseRefusalDeltaEvent, ResponseRefusalDoneEvent, ResponseShellCallCommandAddedStreamingEvent, ResponseShellCallCommandDeltaStreamingEvent, ResponseShellCallCommandDoneStreamingEvent, ResponseStreamOptions, ResponseUsage, ResponseWebSearchCallCompletedEvent, ResponseWebSearchCallInProgressEvent, ResponseWebSearchCallSearchingEvent, Role, RotateMcpOauthTokenEndpointAuthParamClientSecretBasic, RotateMcpOauthTokenEndpointAuthParamClientSecretPost, RotateVaultCredentialAuthParamEnvironmentVariable, RotateVaultCredentialAuthParamStaticBearer, RunCompletionUsage, RunGraderResponse, RunStepCompletionUsage, RunStepDeltaStepDetailsMessageCreationObject, RunStepDeltaStepDetailsToolCallsCodeOutputImageObject, RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, RunStepDeltaStepDetailsToolCallsFileSearchObject, RunStepDeltaStepDetailsToolCallsFunctionObject, RunStepDetailsMessageCreationObject, RunStepDetailsToolCallsCodeOutputImageObject, RunStepDetailsToolCallsCodeOutputLogsObject, RunStepDetailsToolCallsFileSearchRankingOptionsObject, RunStepDetailsToolCallsFileSearchResultObject, RunStepDetailsToolCallsFunctionObject, RunToolCallObject, SafetyAlertErrorType, SafetyCaseNoticeType, ScoreLevelParam, ScoreProbabilityResource, ScreenshotParam, ScrollParam, ServiceTier, ServiceTierEnum, ServiceTierParam, ServiceTierResource, ServiceTierResponses, Session, SessionArtifactResource, SessionEnvironmentErrorResource, SessionEnvironmentStatusResource, SessionErrorResource, SessionEventAgentOutputCommandExecutionOutputDelta, SessionEventAgentSessionEnvironmentReset, SessionEventAgentSessionTurnOutputTextDelta, SessionEventAgentSessionTurnOutputTextDone, SessionEventAgentSessionTurnReasoningSummaryTextDelta, SessionEventAgentSessionTurnReasoningSummaryTextDone, SessionInputParamAgentSessionInputCancel, SessionMessageRoleResource, SessionRequiredActionResourceEnvironmentConnection, SessionRequiredActionResourceFunctionCall, SessionSpendControlParam, SessionSpendControlResource, SessionStatusResource, SessionTurnErrorCodeResource, SessionTurnTraceResource, SetupCommandParam, ShellCallOutputDelta, SkillReferenceParam, SkillResource, SkillVersionResource, SpecificApplyPatchParam, SpecificFunctionShellParam, SpecificProgrammaticToolCallingParam, SpendAlertNotificationChannel, SpendLimitCurrency, SpendLimitEnforcementStatus, SpendLimitInterval, StaticChunkingStrategy, StopConfiguration, Store, SubagentObjectResource, SubagentStatusResource, SummaryTextContent, SummaryTextResource, TaskType, TextContent, TextFormatParamJsonSchema, TextFormatParamText, TextFormatResourceJsonSchema, TextFormatResourceText, TextResponseFormatJsonSchema, ThreadObject, ToolCallCaller, ToolCallCallerParam, ToolChoice, ToolChoiceAllowed, ToolChoiceCustom, ToolChoiceFunction, ToolChoiceMCP, ToolChoiceOptions, ToolChoiceTypes, ToolSearchCall, ToolSearchExecutionType, ToolSearchOutputFunctionToolParam, ToolSearchToolParam, TranscriptTextDeltaEvent, TranscriptTextDoneEvent, TranscriptTextSegmentEvent, TruncationEnum, TruncationObject, TurnObjectResource, TurnStatusResource, TypeParam, UpdateVoiceConsentRequest, UrlAnnotationSource, UsageAudioSpeechesResult, UsageAudioTranscriptionsResult, UsageCodeInterpreterSessionsResult, UsageCompletionsResult, UsageEmbeddingsResult, UsageFileSearchCallsResult, UsageImagesResult, UsageModerationsResult, UsageVectorStoresResult, UsageWebSearchCallsResult, User, UserMessageInputText, UserMessageQuotedText, VaultCredentialAuthResourceStaticBearer, VaultCredentialNetworkingParamLimited, VaultCredentialNetworkingParamUnrestricted, VaultCredentialNetworkingResourceLimited, VaultCredentialNetworkingResourceUnrestricted, VaultResource, VaultStatusParam, VectorStoreExpirationAfter, VectorStoreFileAttributes, VectorStoreSearchResultContentObject, Verbosity, VerbosityParam, VerbosityResource, VideoModel, VideoReferenceInputParam, VideoSeconds, VideoSize, VideoStatus, VoiceConsentDeletedResource, VoiceConsentListResource, VoiceConsentResource, VoiceIdsOrCustomVoice, VoiceIdsShared, VoiceResource, WaitParam, WebSearchActionFind, WebSearchActionOpenPage, WebSearchActionResourceFindInPage, WebSearchActionResourceOpenPage, WebSearchActionResourceOther, WebSearchActionResourceSearch, WebSearchActionSearch, WebSearchCallStatus, WebSearchContextSize, WebSearchContextSizeParam, WebSearchContextSizeResource, WebSearchLocation, WebSearchLocationParam, WebSearchLocationResource, WebSearchModeParam, WebSearchModeResource, WebSearchPreviewTool, WebSearchTool, WebSearchToolCall, WebhookEndpointBody, WidgetMessageItem, WorkflowTracingParam, __ClientMultipartFile
|
|
16
|
+
|
|
17
|
+
ImageGenUsage: _StructSchema[_T.ImageGenUsage, _t.Never, _t.Never] = _b.struct(_T.ImageGenUsage, {"input_tokens": _b.check(_S.Number.annotate(description="The number of tokens (images and text) in the input prompt."), _S.is_int().annotate(expected="an integer")), "total_tokens": _b.check(_S.Number.annotate(description="The total number of tokens (images and text) used for the image generation."), _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number.annotate(description="The number of output tokens generated by the model."), _S.is_int().annotate(expected="an integer")), "output_tokens_details": ImageGenOutputTokensDetails, "input_tokens_details": ImageGenInputUsageDetails}, optional=("output_tokens_details",)).annotate(title="Image generation usage", description="For `gpt-image-1` only, the token usage information for the image generation.", identifier="ImageGenUsage")
|
|
18
|
+
ImageEditCompletedEvent: _StructSchema[_T.ImageEditCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ImageEditCompletedEvent, {"type": _b.literal("image_edit.completed").annotate(description="The type of the event. Always `image_edit.completed`.\n"), "b64_json": _S.String.annotate(description="Base64-encoded final edited image data, suitable for rendering as an image.\n"), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp when the event was created.\n", format="unixtime"), _S.is_int().annotate(expected="an integer")), "size": _b.union(_S.String, _b.literals(["1024x1024", "1024x1536", "1536x1024", "auto"])).annotate(description="The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`."), "quality": _b.literals(["low", "medium", "high", "xhigh", "max", "auto"]).annotate(description="The quality setting for the edited image.\n"), "background": _b.literals(["transparent", "opaque", "auto"]).annotate(description="The background setting for the edited image.\n"), "output_format": _b.literals(["png", "webp", "jpeg"]).annotate(description="The output format for the edited image.\n"), "usage": ImagesUsage}).annotate(description="Emitted when image editing has completed and the final image is available.\n", identifier="ImageEditCompletedEvent")
|
|
19
|
+
ImageGenCompletedEvent: _StructSchema[_T.ImageGenCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ImageGenCompletedEvent, {"type": _b.literal("image_generation.completed").annotate(description="The type of the event. Always `image_generation.completed`.\n"), "b64_json": _S.String.annotate(description="Base64-encoded image data, suitable for rendering as an image.\n"), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp when the event was created.\n", format="unixtime"), _S.is_int().annotate(expected="an integer")), "size": _b.union(_S.String, _b.literals(["1024x1024", "1024x1536", "1536x1024", "auto"])).annotate(description="The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`."), "quality": _b.literals(["low", "medium", "high", "xhigh", "max", "auto"]).annotate(description="The quality setting for the generated image.\n"), "background": _b.literals(["transparent", "opaque", "auto"]).annotate(description="The background setting for the generated image.\n"), "output_format": _b.literals(["png", "webp", "jpeg"]).annotate(description="The output format for the generated image.\n"), "usage": ImagesUsage}).annotate(description="Emitted when image generation has completed and the final image is available.\n", identifier="ImageGenCompletedEvent")
|
|
20
|
+
LiveInitialSessionAudioOutputParam: _StructSchema[_T.LiveInitialSessionAudioOutputParam, _t.Never, _t.Never] = _b.struct(_T.LiveInitialSessionAudioOutputParam, {"voice": _b.union(_b.union(_S.String, _b.literals(["alloy", "ash", "ballad", "beacon", "bossa", "brise", "cedar", "cinder", "coral", "delta", "echo", "flitz", "gleam", "harema", "juni", "marin", "meridian", "nira", "noeul", "nuri", "quartz", "ripple", "sage", "shida", "shimmer", "sillage", "stone", "tempo", "verse", "vesper", "willow"])), LiveCustomVoiceParam, mode="one_of").annotate(description="The voice used for Live speech, as a built-in voice name or a custom voice object containing its ID. Defaults to `marin` and cannot change after startup.")}, optional=("voice",)).annotate(description="Settings for speech generated by the Live model. Choose the voice before starting the session.", identifier="LiveInitialSessionAudioOutputParam")
|
|
21
|
+
LiveDelegationReasoningInputParam: _StructSchema[_T.LiveDelegationReasoningInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveDelegationReasoningInputParam, {"effort": _b.union(_b.suspend(lambda: LiveReasoningEffort).annotate(description="How much reasoning effort the delegated Responses model should use. Supported values depend on the backend model."), _S.Null), "summary": _b.union(_b.suspend(lambda: LiveReasoningSummary).annotate(description="The reasoning summary to request from the delegated Responses model, when supported."), _S.Null)}, optional=("effort", "summary",)).annotate(description="Reasoning options for Responses requests made on behalf of the Live session.", identifier="LiveDelegationReasoningInputParam")
|
|
22
|
+
LiveDelegationTextInputParam: _StructSchema[_T.LiveDelegationTextInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveDelegationTextInputParam, {"verbosity": _b.union(_b.suspend(lambda: LiveTextVerbosity).annotate(description="The amount of detail in text generated by the Responses backend. This does not configure the Live model’s spoken delivery."), _S.Null)}, optional=("verbosity",)).annotate(description="Text generation options for the Live session’s Responses backend.", identifier="LiveDelegationTextInputParam")
|
|
23
|
+
LiveInlineSkillParam: _StructSchema[_T.LiveInlineSkillParam, _t.Never, _t.Never] = _b.struct(_T.LiveInlineSkillParam, {"type": _b.literal("inline").annotate(description="Defines an inline skill for this request."), "name": _S.String.annotate(description="The name of the skill."), "description": _S.String.annotate(description="The description of the skill."), "source": _b.suspend(lambda: LiveInlineSkillSourceParam).annotate(description="Inline skill payload")}).annotate(identifier="LiveInlineSkillParam")
|
|
24
|
+
LiveLocalEnvironmentParam: _StructSchema[_T.LiveLocalEnvironmentParam, _t.Never, _t.Never] = _b.struct(_T.LiveLocalEnvironmentParam, {"type": _b.literal("local").annotate(description="Use a local computer environment."), "skills": _b.union(_b.check(_b.array(LiveLocalSkillParam).annotate(description="An optional list of skills."), _S.is_max_length(200).annotate(expected="a value with a length of at most 200")), _S.Null)}, optional=("skills",)).annotate(identifier="LiveLocalEnvironmentParam")
|
|
25
|
+
LiveAllowedToolsChoiceParam: _StructSchema[_T.LiveAllowedToolsChoiceParam, _t.Never, _t.Never] = _b.struct(_T.LiveAllowedToolsChoiceParam, {"type": _b.literal("allowed_tools").annotate(description="The tool choice type. Always `allowed_tools`."), "tools": _b.check(_b.check(_b.array(_b.union(LiveFunctionToolChoiceParam, LiveMCPToolChoiceParam, LiveSpecificFileSearchParam, LiveSpecificWebSearchParam, LiveSpecificWebSearchPreviewParam, LiveSpecificImageGenParam, LiveSpecificComputerParam, LiveSpecificCodeInterpreterParam, LiveSpecificProgrammaticToolCallingParam, LiveSpecificFunctionShellParam, LiveSpecificCustomToolParam, LiveSpecificApplyPatchParam, mode="one_of")).annotate(description="The tools that the delegated Responses model may call."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(128).annotate(expected="a value with a length of at most 128")), "mode": _b.union(_b.suspend(lambda: LiveToolChoiceValueEnum).annotate(description="How to select a tool from the allowed set."), _S.Null)}, optional=("mode",)).annotate(identifier="LiveAllowedToolsChoiceParam")
|
|
26
|
+
LiveInitialDeveloperMessageItemParam: _StructSchema[_T.LiveInitialDeveloperMessageItemParam, _t.Never, _t.Never] = _b.struct(_T.LiveInitialDeveloperMessageItemParam, {"id": _b.union(_S.String.annotate(description="An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation."), _S.Null), "type": _b.literal("message").annotate(description="The history item type. Always `message`."), "status": _b.union(_b.suspend(lambda: LiveInitialMessageStatus).annotate(description="The supplied message’s status. Live uses its text as history and does not resume an incomplete message."), _S.Null), "role": _b.literal("developer").annotate(description="The author of this history message. Always `developer`."), "content": _b.check(_b.check(_b.array(LiveInitialInputTextContentPartParam).annotate(description="The message content. Supply exactly one text part for the initial Live conversation history."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(1).annotate(expected="a value with a length of at most 1"))}, optional=("id", "type", "status",)).annotate(description="A developer message included in the initial text history of a Live session.", identifier="LiveInitialDeveloperMessageItemParam")
|
|
27
|
+
LiveInitialUserMessageItemParam: _StructSchema[_T.LiveInitialUserMessageItemParam, _t.Never, _t.Never] = _b.struct(_T.LiveInitialUserMessageItemParam, {"id": _b.union(_S.String.annotate(description="An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation."), _S.Null), "type": _b.literal("message").annotate(description="The history item type. Always `message`."), "status": _b.union(_b.suspend(lambda: LiveInitialMessageStatus).annotate(description="The supplied message’s status. Live uses its text as history and does not resume an incomplete message."), _S.Null), "role": _b.literal("user").annotate(description="The author of this history message. Always `user`."), "content": _b.check(_b.check(_b.array(LiveInitialInputTextContentPartParam).annotate(description="The message content. Supply exactly one text part for the initial Live conversation history."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(1).annotate(expected="a value with a length of at most 1"))}, optional=("id", "type", "status",)).annotate(description="A user message included in the initial text history of a Live session.", identifier="LiveInitialUserMessageItemParam")
|
|
28
|
+
LiveInitialAssistantMessageItemParam: _StructSchema[_T.LiveInitialAssistantMessageItemParam, _t.Never, _t.Never] = _b.struct(_T.LiveInitialAssistantMessageItemParam, {"id": _b.union(_S.String.annotate(description="An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation."), _S.Null), "type": _b.literal("message").annotate(description="The history item type. Always `message`."), "status": _b.union(_b.suspend(lambda: LiveInitialMessageStatus).annotate(description="The supplied message’s status. Live uses its text as history and does not resume an incomplete message."), _S.Null), "role": _b.literal("assistant").annotate(description="The author of this history message. Always `assistant`."), "content": _b.check(_b.check(_b.array(_b.union(LiveInitialTextContentPartParam, LiveInitialOutputTextContentPartParam, mode="one_of")).annotate(description="The message content. Supply exactly one text part for the initial Live conversation history."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(1).annotate(expected="a value with a length of at most 1"))}, optional=("id", "type", "status",)).annotate(description="An assistant message included in the initial text history of a Live session.", identifier="LiveInitialAssistantMessageItemParam")
|
|
29
|
+
LiveDataChannelConfigParam: _StructSchema[_T.LiveDataChannelConfigParam, _t.Never, _t.Never] = _b.struct(_T.LiveDataChannelConfigParam, {"allowed_client_events": _b.union(_b.literal("all"), _b.check(_b.array(_b.check(_b.check(_b.check(_S.String.annotate(description="A Live client event type allowed on the frontend data channel, such as `session.input_audio.mute`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points")), _b.js_pattern('^(?:error|info|[a-z][a-z0-9_-]*(?:\\.[a-z0-9_-]+)+)\\Z', '^(?:error|info|[a-z][a-z0-9_-]*(?:\\.[a-z0-9_-]+)+)$').annotate(expected="a string matching the RegExp ^(?:error|info|[a-z][a-z0-9_-]*(?:\\.[a-z0-9_-]+)+)$"))), _S.is_max_length(256).annotate(expected="a value with a length of at most 256")), mode="one_of").annotate(description="Client event types that the frontend data channel may send. Use 'all' to allow every client event; an empty array allows none. Omission preserves the existing allow-all behavior."), "allowed_server_events": _b.union(_b.literal("all"), _b.check(_b.array(LiveAllowedServerEventParam), _S.is_max_length(256).annotate(expected="a value with a length of at most 256")), mode="one_of").annotate(description="Server events that may be sent to the frontend data channel. Use 'all' to allow every server event; an empty array allows none. Omission preserves the existing allow-all behavior. Responses events use an object with type 'response.event' and a response_event selector.")}, optional=("allowed_client_events", "allowed_server_events",)).annotate(description="Control which Live events an untrusted WebRTC frontend can send and receive over its data channel. These restrictions do not apply to trusted sideband connections.", identifier="LiveDataChannelConfigParam")
|
|
30
|
+
LiveCreateResponse: _StructSchema[_T.LiveCreateResponse, _t.Never, _t.Never] = _b.struct(_T.LiveCreateResponse, {"session": _b.struct(_T.LiveCreateResponse__session, {"id": _S.String.annotate(description="Opaque session identifier. Preserve the returned value unchanged, including its prefix.")}).annotate(description="The newly created Live session. Use its ID for session controls and sideband connections."), "transport": _b.suspend(lambda: LiveWebRTCTransport).annotate(description="WebRTC transport with the SDP answer.")}).annotate(description="The created Live session identifier and WebRTC answer. Apply transport.sdp as the peer's remote answer and wait for session.started on the data channel before sending commands.", identifier="LiveCreateResponse")
|
|
31
|
+
LiveSIPTrunk: _StructSchema[_T.LiveSIPTrunk, _t.Never, _t.Never] = _b.struct(_T.LiveSIPTrunk, {"provider_url": _S.String.annotate(description="Provider endpoint in the form `sips:host[:port][;transport=tcp]`. The default port is 5061. IPv6 addresses must be bracketed. TLS signaling is required; plaintext SIP is not supported. Do not include userinfo, a path, URI headers, or other URI parameters. Local hostnames and literal private, loopback, link-local, unspecified, multicast, and broadcast IP addresses are rejected."), "auth": LiveSIPTrunkAuth, "caller_number": _b.check(_S.String.annotate(description="Caller phone number in E.164 format to use in the SIP From header."), _b.js_pattern('^\\+[1-9][0-9]{1,14}\\Z', '^\\+[1-9][0-9]{1,14}$').annotate(expected="a string matching the RegExp ^\\+[1-9][0-9]{1,14}$"))}).annotate(description="SIP trunk configuration supplied for this call. Keep trunk credentials on your server. The creation response does not return this configuration.", identifier="LiveSIPTrunk")
|
|
32
|
+
LiveSessionCreateResponse: _StructSchema[_T.LiveSessionCreateResponse, _t.Never, _t.Never] = _b.struct(_T.LiveSessionCreateResponse, {"session": Session, "transport": _b.union(LiveWebRTCTransport, _b.struct(_T.LiveSessionCreateResponse__transport__1, {"type": _b.literal("sip").annotate(description="The transport used for the Live session. Always `sip`.")}).annotate(description="The SIP transport. Trunk credentials and SDP are not returned."), mode="one_of").annotate(description="WebRTC transport with an SDP answer, or SIP transport without SDP or trunk credentials. For SIP, attach a sideband using session.id to receive transport.ringing, transport.answered, and transport.failed notifications.")}).annotate(description="The created Live session and its transport. WebRTC creation returns 201 Created with an SDP answer. Outbound SIP creation returns 201 Created after initialization, before the callee necessarily answers, without SDP or trunk credentials.", identifier="LiveSessionCreateResponse")
|
|
33
|
+
ListModelsResponse: _StructSchema[_T.ListModelsResponse, _t.Never, _t.Never] = _b.struct(_T.ListModelsResponse, {"object": _b.literal("list"), "data": _b.array(Model)}).annotate(identifier="ListModelsResponse")
|
|
34
|
+
ApiKeyList: _StructSchema[_T.ApiKeyList, _t.Never, _t.Never] = _b.struct(_T.ApiKeyList, {"object": _b.literal("list"), "data": _b.array(AdminApiKey), "has_more": _S.Boolean, "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null)}, optional=("first_id", "last_id",)).annotate(identifier="ApiKeyList")
|
|
35
|
+
AuditLogActorSession: _StructSchema[_T.AuditLogActorSession, _t.Never, _t.Never] = _b.struct(_T.AuditLogActorSession, {"user": AuditLogActorUser, "ip_address": _S.String.annotate(description="The IP address from which the action was performed.")}, optional=("user", "ip_address",)).annotate(description="The session in which the audit logged action was performed.", identifier="AuditLogActorSession")
|
|
36
|
+
AuditLogActorApiKey: _StructSchema[_T.AuditLogActorApiKey, _t.Never, _t.Never] = _b.struct(_T.AuditLogActorApiKey, {"id": _S.String.annotate(description="The tracking id of the API key."), "type": _b.literals(["user", "service_account"]).annotate(description="The type of API key. Can be either `user` or `service_account`."), "user": AuditLogActorUser, "service_account": AuditLogActorServiceAccount}, optional=("id", "type", "user", "service_account",)).annotate(description="The API Key used to perform the audit logged action.", identifier="AuditLogActorApiKey")
|
|
37
|
+
Provider: _S.Bottom[_T.Provider, _t.Any] = _b.union(AwsExternalStorageProviderResponse, AzureExternalStorageProviderResponse, GcpExternalStorageProviderResponse, OciExternalStorageProviderResponse, mode="one_of").annotate(identifier="provider")
|
|
38
|
+
ListCertificatesResponse: _StructSchema[_T.ListCertificatesResponse, _t.Never, _t.Never] = _b.struct(_T.ListCertificatesResponse, {"data": _b.array(OrganizationCertificate), "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean, "object": _b.literal("list")}).annotate(identifier="ListCertificatesResponse")
|
|
39
|
+
OrganizationCertificateActivationResponse: _StructSchema[_T.OrganizationCertificateActivationResponse, _t.Never, _t.Never] = _b.struct(_T.OrganizationCertificateActivationResponse, {"object": _b.literal("organization.certificate.activation").annotate(description="The organization certificate activation result type."), "data": _b.array(OrganizationCertificate)}).annotate(identifier="OrganizationCertificateActivationResponse")
|
|
40
|
+
OrganizationCertificateDeactivationResponse: _StructSchema[_T.OrganizationCertificateDeactivationResponse, _t.Never, _t.Never] = _b.struct(_T.OrganizationCertificateDeactivationResponse, {"object": _b.literal("organization.certificate.deactivation").annotate(description="The organization certificate deactivation result type."), "data": _b.array(OrganizationCertificate)}).annotate(identifier="OrganizationCertificateDeactivationResponse")
|
|
41
|
+
UsageTimeBucket: _StructSchema[_T.UsageTimeBucket, _t.Never, _t.Never] = _b.struct(_T.UsageTimeBucket, {"object": _b.literal("bucket"), "start_time": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "end_time": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "results": _b.array(_b.union(UsageCompletionsResult, UsageEmbeddingsResult, UsageModerationsResult, UsageImagesResult, UsageAudioSpeechesResult, UsageAudioTranscriptionsResult, UsageVectorStoresResult, UsageCodeInterpreterSessionsResult, UsageFileSearchCallsResult, UsageWebSearchCallsResult, CostsResult, mode="one_of"))}).annotate(identifier="UsageTimeBucket")
|
|
42
|
+
GroupListResource: _StructSchema[_T.GroupListResource, _t.Never, _t.Never] = _b.struct(_T.GroupListResource, {"object": _b.literal("list").annotate(description="Always `list`."), "data": _b.array(GroupResponse).annotate(description="Groups returned in the current page."), "has_more": _S.Boolean.annotate(description="Whether additional groups are available when paginating."), "next": _b.union(_S.String, _S.Null).annotate(description="Cursor to fetch the next page of results, or `null` if there are no more results.")}).annotate(description="Paginated list of organization groups.", identifier="GroupListResource")
|
|
43
|
+
RoleListResource: _StructSchema[_T.RoleListResource, _t.Never, _t.Never] = _b.struct(_T.RoleListResource, {"object": _b.literal("list").annotate(description="Always `list`."), "data": _b.array(AssignedRoleDetails).annotate(description="Role assignments returned in the current page."), "has_more": _S.Boolean.annotate(description="Whether additional assignments are available when paginating."), "next": _b.union(_S.String, _S.Null).annotate(description="Cursor to fetch the next page of results, or `null` when there are no more assignments.")}).annotate(description="Paginated list of roles assigned to a principal.", identifier="RoleListResource")
|
|
44
|
+
GroupRoleAssignment: _StructSchema[_T.GroupRoleAssignment, _t.Never, _t.Never] = _b.struct(_T.GroupRoleAssignment, {"object": _b.literal("group.role").annotate(description="Always `group.role`."), "group": Group, "role": Role}).annotate(description="Role assignment linking a group to a role.", identifier="GroupRoleAssignment")
|
|
45
|
+
PublicRoleListResource: _StructSchema[_T.PublicRoleListResource, _t.Never, _t.Never] = _b.struct(_T.PublicRoleListResource, {"object": _b.literal("list").annotate(description="Always `list`."), "data": _b.array(Role).annotate(description="Roles returned in the current page."), "has_more": _S.Boolean.annotate(description="Whether more roles are available when paginating."), "next": _b.union(_S.String, _S.Null).annotate(description="Cursor to fetch the next page of results, or `null` when there are no additional roles.")}).annotate(description="Paginated list of roles available on an organization or project.", identifier="PublicRoleListResource")
|
|
46
|
+
UserListResource: _StructSchema[_T.UserListResource, _t.Never, _t.Never] = _b.struct(_T.UserListResource, {"object": _b.literal("list").annotate(description="Always `list`."), "data": _b.array(GroupUser).annotate(description="Users in the current page."), "has_more": _S.Boolean.annotate(description="Whether more users are available when paginating."), "next": _b.union(_S.String, _S.Null).annotate(description="Cursor to fetch the next page of results, or `null` when no further users are available.")}).annotate(description="Paginated list of user objects returned when inspecting group membership.", identifier="UserListResource")
|
|
47
|
+
InviteListResponse: _StructSchema[_T.InviteListResponse, _t.Never, _t.Never] = _b.struct(_T.InviteListResponse, {"object": _b.literal("list").annotate(description="The object type, which is always `list`"), "data": _b.array(Invite), "first_id": _b.union(_S.String, _S.Null).annotate(description="The first `invite_id` in the retrieved `list`"), "last_id": _b.union(_S.String, _S.Null).annotate(description="The last `invite_id` in the retrieved `list`"), "has_more": _S.Boolean.annotate(description="The `has_more` property is used for pagination to indicate there are additional results.")}, optional=("first_id", "last_id",)).annotate(identifier="InviteListResponse")
|
|
48
|
+
Project: _StructSchema[_T.Project, _t.Never, _t.Never] = _b.struct(_T.Project, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "object": _b.literal("organization.project").annotate(description="The object type, which is always `organization.project`"), "name": _b.union(_S.String, _S.Null).annotate(description="The name of the project. This appears in reporting."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the project was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "archived_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the project was archived or `null`.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "status": _b.union(_S.String, _S.Null).annotate(description="`active` or `archived`"), "external_key_id": _b.union(_S.String, _S.Null).annotate(description="The external key associated with the project."), "residency": _b.suspend(lambda: PublicProjectResidency).annotate(description="The residency configuration for the project.")}, optional=("name", "archived_at", "status", "external_key_id", "residency",)).annotate(description="Represents an individual project.", identifier="Project")
|
|
49
|
+
ProjectCreateRequest: _StructSchema[_T.ProjectCreateRequest, _t.Never, _t.Never] = _b.struct(_T.ProjectCreateRequest, {"name": _S.String.annotate(description="The friendly name of the project, this name appears in reports."), "geography": _b.union(_S.String, _S.Null).annotate(description="Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field.\nDeprecated: use `residency` instead. Do not provide both `geography` and `residency`."), "residency": _b.union(PublicProjectResidency, _S.Null).annotate(description="Create the project with the specified residency configuration. Your organization must have access to the requested residency configuration in order to use it. See [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field."), "external_key_id": _b.union(_S.String, _S.Null).annotate(description="External key ID to associate with the project.")}, optional=("geography", "residency", "external_key_id",)).annotate(identifier="ProjectCreateRequest")
|
|
50
|
+
ProjectApiKey: _StructSchema[_T.ProjectApiKey, _t.Never, _t.Never] = _b.struct(_T.ProjectApiKey, {"object": _b.literal("organization.project.api_key").annotate(description="The object type, which is always `organization.project.api_key`"), "redacted_value": _S.String.annotate(description="The redacted value of the API key"), "name": _S.String.annotate(description="The name of the API key"), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the API key was created", format="unixtime"), _S.is_int().annotate(expected="an integer")), "expires_at": _b.union(_b.check(_S.Number.annotate(format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The Unix timestamp (in seconds) when the API key expires, or null if it does not expire."), "last_used_at": _b.union(_b.check(_S.Number.annotate(format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The Unix timestamp (in seconds) of when the API key was last used."), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "owner_project_access": _b.literals(["active", "inactive"]).annotate(description="Whether the API key's owner currently has effective access to the project."), "owner": _b.struct(_T.ProjectApiKey__owner, {"type": _b.literals(["user", "service_account"]).annotate(description="`user` or `service_account`"), "user": ProjectApiKeyOwnerUser, "service_account": ProjectApiKeyOwnerServiceAccount}, optional=("type", "user", "service_account",))}, optional=("expires_at",)).annotate(description="Represents an individual API key in a project.", identifier="ProjectApiKey")
|
|
51
|
+
ListProjectCertificatesResponse: _StructSchema[_T.ListProjectCertificatesResponse, _t.Never, _t.Never] = _b.struct(_T.ListProjectCertificatesResponse, {"data": _b.array(OrganizationProjectCertificate), "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean, "object": _b.literal("list")}).annotate(identifier="ListProjectCertificatesResponse")
|
|
52
|
+
OrganizationProjectCertificateActivationResponse: _StructSchema[_T.OrganizationProjectCertificateActivationResponse, _t.Never, _t.Never] = _b.struct(_T.OrganizationProjectCertificateActivationResponse, {"object": _b.literal("organization.project.certificate.activation").annotate(description="The project certificate activation result type."), "data": _b.array(OrganizationProjectCertificate)}).annotate(identifier="OrganizationProjectCertificateActivationResponse")
|
|
53
|
+
OrganizationProjectCertificateDeactivationResponse: _StructSchema[_T.OrganizationProjectCertificateDeactivationResponse, _t.Never, _t.Never] = _b.struct(_T.OrganizationProjectCertificateDeactivationResponse, {"object": _b.literal("organization.project.certificate.deactivation").annotate(description="The project certificate deactivation result type."), "data": _b.array(OrganizationProjectCertificate)}).annotate(identifier="OrganizationProjectCertificateDeactivationResponse")
|
|
54
|
+
ProjectGroupListResource: _StructSchema[_T.ProjectGroupListResource, _t.Never, _t.Never] = _b.struct(_T.ProjectGroupListResource, {"object": _b.literal("list").annotate(description="Always `list`."), "data": _b.array(ProjectGroup).annotate(description="Project group memberships returned in the current page."), "has_more": _S.Boolean.annotate(description="Whether additional project group memberships are available."), "next": _b.union(_S.String, _S.Null).annotate(description="Cursor to fetch the next page of results, or `null` when there are no more results.")}).annotate(description="Paginated list of groups that have access to a project.", identifier="ProjectGroupListResource")
|
|
55
|
+
ProjectHostedToolPermissions: _StructSchema[_T.ProjectHostedToolPermissions, _t.Never, _t.Never] = _b.struct(_T.ProjectHostedToolPermissions, {"file_search": HostedToolPermission, "web_search": HostedToolPermission, "image_generation": HostedToolPermission, "mcp": HostedToolPermission, "code_interpreter": HostedToolPermission}).annotate(description="Represents hosted tool permissions for a project.", identifier="ProjectHostedToolPermissions")
|
|
56
|
+
ProjectHostedToolPermissionsUpdateRequest: _StructSchema[_T.ProjectHostedToolPermissionsUpdateRequest, _t.Never, _t.Never] = _b.struct(_T.ProjectHostedToolPermissionsUpdateRequest, {"file_search": _b.union(HostedToolPermissionUpdate, _S.Null).annotate(description="The file search permission update."), "web_search": _b.union(HostedToolPermissionUpdate, _S.Null).annotate(description="The web search permission update."), "image_generation": _b.union(HostedToolPermissionUpdate, _S.Null).annotate(description="The image generation permission update."), "mcp": _b.union(HostedToolPermissionUpdate, _S.Null).annotate(description="The MCP permission update."), "code_interpreter": _b.union(HostedToolPermissionUpdate, _S.Null).annotate(description="The code interpreter permission update.")}, optional=("file_search", "web_search", "image_generation", "mcp", "code_interpreter",)).annotate(identifier="ProjectHostedToolPermissionsUpdateRequest")
|
|
57
|
+
ProjectRateLimitListResponse: _StructSchema[_T.ProjectRateLimitListResponse, _t.Never, _t.Never] = _b.struct(_T.ProjectRateLimitListResponse, {"object": _b.literal("list"), "data": _b.array(ProjectRateLimit), "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean}, optional=("first_id", "last_id",)).annotate(identifier="ProjectRateLimitListResponse")
|
|
58
|
+
ProjectServiceAccountListResponse: _StructSchema[_T.ProjectServiceAccountListResponse, _t.Never, _t.Never] = _b.struct(_T.ProjectServiceAccountListResponse, {"object": _b.literal("list"), "data": _b.array(ProjectServiceAccount), "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean}, optional=("first_id", "last_id",)).annotate(identifier="ProjectServiceAccountListResponse")
|
|
59
|
+
ProjectServiceAccountCreateResponse: _StructSchema[_T.ProjectServiceAccountCreateResponse, _t.Never, _t.Never] = _b.struct(_T.ProjectServiceAccountCreateResponse, {"object": _b.literal("organization.project.service_account"), "id": _S.String, "name": _S.String, "role": _b.literals(["member", "none"]).annotate(description="Service accounts created with default project membership have role `member`. Accounts created with `create_service_account_only` have role `none`.\n"), "created_at": _b.check(_S.Number.annotate(format="unixtime"), _S.is_int().annotate(expected="an integer")), "api_key": _b.union(ProjectServiceAccountApiKey, _S.Null)}).annotate(identifier="ProjectServiceAccountCreateResponse")
|
|
60
|
+
ProjectSpendAlert: _StructSchema[_T.ProjectSpendAlert, _t.Never, _t.Never] = _b.struct(_T.ProjectSpendAlert, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints."), "object": _b.literal("project.spend_alert").annotate(description="The object type, which is always `project.spend_alert`."), "threshold_amount": _b.check(_S.Number.annotate(description="The alert threshold amount, in cents."), _S.is_int().annotate(expected="an integer")), "currency": _b.literal("USD").annotate(description="The currency for the threshold amount."), "interval": _b.literal("month").annotate(description="The time interval for evaluating spend against the threshold."), "notification_channel": SpendAlertNotificationChannel}).annotate(description="Represents a spend alert configured at the project level.", identifier="ProjectSpendAlert")
|
|
61
|
+
CreateSpendAlertBody: _StructSchema[_T.CreateSpendAlertBody, _t.Never, _t.Never] = _b.struct(_T.CreateSpendAlertBody, {"threshold_amount": _b.check(_b.check(_S.Number.annotate(description="The alert threshold amount, in cents."), _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")), "currency": _b.literal("USD").annotate(description="The currency for the threshold amount."), "interval": _b.literal("month").annotate(description="The time interval for evaluating spend against the threshold."), "notification_channel": SpendAlertNotificationChannel}).annotate(description="Parameters for creating or updating a spend alert.", identifier="CreateSpendAlertBody")
|
|
62
|
+
OrganizationSpendAlert: _StructSchema[_T.OrganizationSpendAlert, _t.Never, _t.Never] = _b.struct(_T.OrganizationSpendAlert, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints."), "object": _b.literal("organization.spend_alert").annotate(description="The object type, which is always `organization.spend_alert`."), "threshold_amount": _b.check(_S.Number.annotate(description="The alert threshold amount, in cents."), _S.is_int().annotate(expected="an integer")), "currency": _b.literal("USD").annotate(description="The currency for the threshold amount."), "interval": _b.literal("month").annotate(description="The time interval for evaluating spend against the threshold."), "notification_channel": SpendAlertNotificationChannel}).annotate(description="Represents a spend alert configured at the organization level.", identifier="OrganizationSpendAlert")
|
|
63
|
+
ProjectUserListResponse: _StructSchema[_T.ProjectUserListResponse, _t.Never, _t.Never] = _b.struct(_T.ProjectUserListResponse, {"object": _S.String, "data": _b.array(ProjectUser), "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean}, optional=("first_id", "last_id",)).annotate(identifier="ProjectUserListResponse")
|
|
64
|
+
UserListResponse: _StructSchema[_T.UserListResponse, _t.Never, _t.Never] = _b.struct(_T.UserListResponse, {"object": _b.literal("list"), "data": _b.array(User), "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean}, optional=("first_id", "last_id",)).annotate(identifier="UserListResponse")
|
|
65
|
+
UserRoleAssignment: _StructSchema[_T.UserRoleAssignment, _t.Never, _t.Never] = _b.struct(_T.UserRoleAssignment, {"object": _b.literal("user.role").annotate(description="Always `user.role`."), "user": User, "role": Role}).annotate(description="Role assignment linking a user to a role.", identifier="UserRoleAssignment")
|
|
66
|
+
RealtimeTranscriptionSessionCreateRequest: _StructSchema[_T.RealtimeTranscriptionSessionCreateRequest, _t.Never, _t.Never] = _b.struct(_T.RealtimeTranscriptionSessionCreateRequest, {"turn_detection": _b.struct(_T.RealtimeTranscriptionSessionCreateRequest__turn_detection, {"type": _b.literal("server_vad").annotate(description="Type of turn detection. Only `server_vad` is currently supported for transcription sessions.\n"), "threshold": _b.check(_S.Number.annotate(description="Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.\n"), _S.is_finite().annotate(expected="a finite number")), "prefix_padding_ms": _b.check(_S.Number.annotate(description="Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.\n"), _S.is_int().annotate(expected="an integer")), "silence_duration_ms": _b.check(_S.Number.annotate(description="Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("type", "threshold", "prefix_padding_ms", "silence_duration_ms",)).annotate(description="Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.\n"), "input_audio_noise_reduction": _b.union(_S.Null, _b.struct_with_rest(_b.struct(_T.RealtimeTranscriptionSessionCreateRequest__input_audio_noise_reduction__1, {"type": NoiseReductionType}, optional=("type",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))).annotate(description="Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.\n"), "input_audio_format": _b.literals(["pcm16", "g711_ulaw", "g711_alaw"]).annotate(description="The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.\n"), "input_audio_transcription": _b.suspend(lambda: AudioTranscription).annotate(description="Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.\n"), "include": _b.array(_b.literal("item.input_audio_transcription.logprobs")).annotate(description="The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`\n")}, optional=("turn_detection", "input_audio_noise_reduction", "input_audio_format", "input_audio_transcription", "include",)).annotate(title="Realtime transcription session configuration", description="Realtime transcription session object configuration.", identifier="RealtimeTranscriptionSessionCreateRequest")
|
|
67
|
+
RealtimeTranslationSessionCreateRequest: _StructSchema[_T.RealtimeTranslationSessionCreateRequest, _t.Never, _t.Never] = _b.struct(_T.RealtimeTranslationSessionCreateRequest, {"model": _S.String.annotate(description="The Realtime translation model used for this session.\n"), "audio": _b.struct(_T.RealtimeTranslationSessionCreateRequest__audio, {"input": _b.struct(_T.RealtimeTranslationSessionCreateRequest__audio__input, {"transcription": _b.union(_b.struct(_T.RealtimeTranslationSessionCreateRequest__audio__input__transcription__0, {"model": _S.String.annotate(description="The transcription model to use for source transcript deltas.")}).annotate(description="Optional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.\n"), _S.Null), "noise_reduction": _b.union(_b.struct(_T.RealtimeTranslationSessionCreateRequest__audio__input__noise_reduction__0, {"type": NoiseReductionType}).annotate(description="Optional input noise reduction. Set to `null` to disable it.\n"), _S.Null)}, optional=("transcription", "noise_reduction",)), "output": _b.struct(_T.RealtimeTranslationSessionCreateRequest__audio__output, {"language": _S.String.annotate(description="Target language for translated output audio and transcript deltas.\n")}, optional=("language",))}, optional=("input", "output",)).annotate(description="Configuration for translation input and output audio.\n")}, optional=("audio",)).annotate(title="Realtime translation session configuration", description="Realtime translation session configuration. Translation sessions stream source\naudio in and translated audio plus transcript deltas out continuously.\n", identifier="RealtimeTranslationSessionCreateRequest")
|
|
68
|
+
RealtimeTranslationSession: _StructSchema[_T.RealtimeTranslationSession, _t.Never, _t.Never] = _b.struct(_T.RealtimeTranslationSession, {"id": _S.String.annotate(description="Unique identifier for the session that looks like `sess_1234567890abcdef`.\n"), "type": _b.literal("translation").annotate(description="The session type. Always `translation` for Realtime translation sessions.\n"), "expires_at": _b.check(_S.Number.annotate(description="Expiration timestamp for the session, in seconds since epoch.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "model": _S.String.annotate(description="The Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.\n"), "audio": _b.struct(_T.RealtimeTranslationSession__audio, {"input": _b.struct(_T.RealtimeTranslationSession__audio__input, {"transcription": _b.union(_b.struct(_T.RealtimeTranslationSession__audio__input__transcription__0, {"model": _S.String.annotate(description="The transcription model used for source transcript deltas.")}).annotate(description="Optional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.\n"), _S.Null), "noise_reduction": _b.union(_b.struct(_T.RealtimeTranslationSession__audio__input__noise_reduction__0, {"type": NoiseReductionType}).annotate(description="Optional input noise reduction.\n"), _S.Null)}, optional=("transcription", "noise_reduction",)), "output": _b.struct(_T.RealtimeTranslationSession__audio__output, {"language": _S.String.annotate(description="Target language for translated output audio and transcript deltas.\n")}, optional=("language",))}, optional=("input", "output",)).annotate(description="Configuration for translation input and output audio.\n")}).annotate(title="Realtime translation session", description="A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.\n", identifier="RealtimeTranslationSession")
|
|
69
|
+
RealtimeTranscriptionSessionCreateRequestGA: _StructSchema[_T.RealtimeTranscriptionSessionCreateRequestGA, _t.Never, _t.Never] = _b.struct(_T.RealtimeTranscriptionSessionCreateRequestGA, {"type": _b.literal("transcription").annotate(description="The type of session to create. Always `transcription` for transcription sessions.\n"), "audio": _b.struct(_T.RealtimeTranscriptionSessionCreateRequestGA__audio, {"input": _b.struct(_T.RealtimeTranscriptionSessionCreateRequestGA__audio__input, {"format": RealtimeAudioFormats, "transcription": _b.suspend(lambda: AudioTranscription).annotate(description="Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.\n"), "noise_reduction": _b.union(_S.Null, _b.struct_with_rest(_b.struct(_T.RealtimeTranscriptionSessionCreateRequestGA__audio__input__noise_reduction__1, {"type": NoiseReductionType}, optional=("type",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))).annotate(description="Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.\n"), "turn_detection": RealtimeTurnDetection}, optional=("format", "transcription", "noise_reduction", "turn_detection",))}, optional=("input",)).annotate(description="Configuration for input and output audio.\n"), "include": _b.array(_b.literal("item.input_audio_transcription.logprobs")).annotate(description="Additional fields to include in server outputs.\n\n`item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n")}, optional=("audio", "include",)).annotate(title="Realtime transcription session configuration", description="Realtime transcription session object configuration.", identifier="RealtimeTranscriptionSessionCreateRequestGA")
|
|
70
|
+
RealtimeReasoning: _StructSchema[_T.RealtimeReasoning, _t.Never, _t.Never] = _b.struct(_T.RealtimeReasoning, {"effort": RealtimeReasoningEffort}, optional=("effort",)).annotate(title="Realtime reasoning configuration", description="Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.\n", identifier="RealtimeReasoning")
|
|
71
|
+
RealtimeTranscriptionSessionCreateResponseGA: _StructSchema[_T.RealtimeTranscriptionSessionCreateResponseGA, _t.Never, _t.Never] = _b.struct(_T.RealtimeTranscriptionSessionCreateResponseGA, {"type": _b.literal("transcription").annotate(description="The type of session. Always `transcription` for transcription sessions.\n"), "id": _S.String.annotate(description="Unique identifier for the session that looks like `sess_1234567890abcdef`.\n"), "object": _S.String.annotate(description="The object type. Always `realtime.transcription_session`."), "expires_at": _b.check(_S.Number.annotate(description="Expiration timestamp for the session, in seconds since epoch.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "include": _b.union(_b.array(_b.literal("item.input_audio_transcription.logprobs")), _S.Null).annotate(description="Additional fields to include in server outputs.\n- `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n"), "audio": _b.struct(_T.RealtimeTranscriptionSessionCreateResponseGA__audio, {"input": _b.struct(_T.RealtimeTranscriptionSessionCreateResponseGA__audio__input, {"format": RealtimeAudioFormats, "transcription": _b.union(AudioTranscriptionResponse, _S.Null).annotate(description="Configuration of the transcription model.\n"), "noise_reduction": _b.union(_b.struct_with_rest(_b.struct(_T.RealtimeTranscriptionSessionCreateResponseGA__audio__input__noise_reduction__0, {"type": NoiseReductionType}, optional=("type",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Configuration for input audio noise reduction.\n"), "turn_detection": _b.union(_b.struct(_T.RealtimeTranscriptionSessionCreateResponseGA__audio__input__turn_detection__0, {"type": _S.String.annotate(description="Type of turn detection, only `server_vad` is currently supported.\n"), "threshold": _b.check(_S.Number.annotate(description="Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.\n"), _S.is_finite().annotate(expected="a finite number")), "prefix_padding_ms": _b.check(_S.Number.annotate(description="Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.\n"), _S.is_int().annotate(expected="an integer")), "silence_duration_ms": _b.check(_S.Number.annotate(description="Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("type", "threshold", "prefix_padding_ms", "silence_duration_ms",)).annotate(description="Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.\n"), _S.Null).annotate(description="Configuration for turn detection. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.\n")}, optional=("format", "transcription", "noise_reduction", "turn_detection",))}, optional=("input",)).annotate(description="Configuration for input audio for the session.\n")}, optional=("expires_at", "include", "audio",)).annotate(title="Realtime transcription session configuration object", description="A Realtime transcription session configuration object.\n", identifier="RealtimeTranscriptionSessionCreateResponseGA")
|
|
72
|
+
RealtimeSessionCreateResponse: _StructSchema[_T.RealtimeSessionCreateResponse, _t.Never, _t.Never] = _b.struct(_T.RealtimeSessionCreateResponse, {"id": _S.String.annotate(description="Unique identifier for the session that looks like `sess_1234567890abcdef`.\n"), "object": _S.String.annotate(description="The object type. Always `realtime.session`."), "expires_at": _b.check(_S.Number.annotate(description="Expiration timestamp for the session, in seconds since epoch.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "include": _b.array(_b.literal("item.input_audio_transcription.logprobs")).annotate(description="Additional fields to include in server outputs.\n- `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n"), "model": _S.String.annotate(description="The Realtime model used for this session."), "output_modalities": _b.union(_S.Null, _S.String, _S.Finite, _S.Boolean, _b.record(_S.String, _S.Json.annotate(expected="JSON value")), _b.array(_b.literals(["text", "audio"]))).annotate(description="The set of modalities the model can respond with. To disable audio,\nset this to [\"text\"].\n"), "instructions": _S.String.annotate(description="The default system instructions (i.e. system message) prepended to model\ncalls. This field allows the client to guide the model on desired\nresponses. The model can be instructed on response content and format,\n(e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good\nresponses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion\ninto your voice\", \"laugh frequently\"). The instructions are not guaranteed\nto be followed by the model, but they provide guidance to the model on the\ndesired behavior.\n\nNote that the server sets default instructions which will be used if this\nfield is not set and are visible in the `session.created` event at the\nstart of the session.\n"), "audio": _b.struct(_T.RealtimeSessionCreateResponse__audio, {"input": _b.struct(_T.RealtimeSessionCreateResponse__audio__input, {"format": RealtimeAudioFormats, "transcription": _b.suspend(lambda: AudioTranscriptionResponse).annotate(description="Configuration for input audio transcription.\n"), "noise_reduction": _b.union(_b.struct_with_rest(_b.struct(_T.RealtimeSessionCreateResponse__audio__input__noise_reduction__0, {"type": NoiseReductionType}, optional=("type",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Configuration for input audio noise reduction.\n"), "turn_detection": _b.union(_b.struct_with_rest(_b.struct(_T.RealtimeSessionCreateResponse__audio__input__turn_detection__0, {"type": _S.String.annotate(description="Type of turn detection, only `server_vad` is currently supported.\n"), "threshold": _S.Finite, "prefix_padding_ms": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "silence_duration_ms": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("type", "threshold", "prefix_padding_ms", "silence_duration_ms",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Configuration for turn detection.\n")}, optional=("format", "transcription", "noise_reduction", "turn_detection",)), "output": _b.struct(_T.RealtimeSessionCreateResponse__audio__output, {"format": RealtimeAudioFormats, "voice": VoiceIdsShared, "speed": _S.Finite}, optional=("format", "voice", "speed",))}, optional=("input", "output",)).annotate(description="Configuration for input and output audio for the session.\n"), "tracing": _b.union(_b.literal("auto").annotate(description="Default tracing mode for the session.\n"), _b.struct(_T.RealtimeSessionCreateResponse__tracing__1, {"workflow_name": _S.String.annotate(description="The name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.\n"), "group_id": _S.String.annotate(description="The group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.\n"), "metadata": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.\n")}, optional=("workflow_name", "group_id", "metadata",)).annotate(title="Tracing Configuration", description="Granular configuration for tracing.\n"), mode="one_of").annotate(title="Tracing Configuration", description="Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified.\n\n`auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.\n"), "turn_detection": _b.union(_b.struct_with_rest(_b.struct(_T.RealtimeSessionCreateResponse__turn_detection__0, {"type": _S.String.annotate(description="Type of turn detection, only `server_vad` is currently supported.\n"), "threshold": _b.check(_S.Number.annotate(description="Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.\n"), _S.is_finite().annotate(expected="a finite number")), "prefix_padding_ms": _b.check(_S.Number.annotate(description="Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.\n"), _S.is_int().annotate(expected="an integer")), "silence_duration_ms": _b.check(_S.Number.annotate(description="Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("type", "threshold", "prefix_padding_ms", "silence_duration_ms",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.\n"), "tools": _b.array(RealtimeFunctionTool).annotate(description="Tools (functions) available to the model."), "tool_choice": _S.String.annotate(description="How the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.\n"), "max_output_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _b.literal("inf"), mode="one_of").annotate(description="Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.\n")}, optional=("id", "object", "expires_at", "include", "model", "output_modalities", "instructions", "audio", "tracing", "turn_detection", "tools", "tool_choice", "max_output_tokens",)).annotate(title="Realtime session configuration object", description="A Realtime session configuration object.\n", identifier="RealtimeSessionCreateResponse")
|
|
73
|
+
RealtimeTranscriptionSessionCreateResponse: _StructSchema[_T.RealtimeTranscriptionSessionCreateResponse, _t.Never, _t.Never] = _b.struct(_T.RealtimeTranscriptionSessionCreateResponse, {"client_secret": _b.struct(_T.RealtimeTranscriptionSessionCreateResponse__client_secret, {"value": _S.String.annotate(description="Ephemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.\n"), "expires_at": _b.check(_S.Number.annotate(description="Timestamp for when the token expires. Currently, all tokens expire\nafter one minute.\n", format="unixtime"), _S.is_int().annotate(expected="an integer"))}).annotate(description="Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.\n"), "modalities": _b.union(_S.Null, _S.String, _S.Finite, _S.Boolean, _b.record(_S.String, _S.Json.annotate(expected="JSON value")), _b.array(_b.literals(["text", "audio"]))).annotate(description="The set of modalities the model can respond with. To disable audio,\nset this to [\"text\"].\n"), "input_audio_format": _S.String.annotate(description="The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n"), "input_audio_transcription": _b.suspend(lambda: AudioTranscriptionResponse).annotate(description="Configuration of the transcription model.\n"), "turn_detection": _b.struct(_T.RealtimeTranscriptionSessionCreateResponse__turn_detection, {"type": _S.String.annotate(description="Type of turn detection, only `server_vad` is currently supported.\n"), "threshold": _b.check(_S.Number.annotate(description="Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.\n"), _S.is_finite().annotate(expected="a finite number")), "prefix_padding_ms": _b.check(_S.Number.annotate(description="Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.\n"), _S.is_int().annotate(expected="an integer")), "silence_duration_ms": _b.check(_S.Number.annotate(description="Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("type", "threshold", "prefix_padding_ms", "silence_duration_ms",)).annotate(description="Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.\n")}, optional=("modalities", "input_audio_format", "input_audio_transcription", "turn_detection",)).annotate(description="A new Realtime transcription session configuration.\n\nWhen a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.\n", identifier="RealtimeTranscriptionSessionCreateResponse")
|
|
74
|
+
ToolChoiceParam: _S.Bottom[_T.ToolChoiceParam, _t.Any] = _b.union(ToolChoiceOptions, ToolChoiceAllowed, ToolChoiceTypes, ToolChoiceFunction, ToolChoiceMCP, ToolChoiceCustom, SpecificProgrammaticToolCallingParam, SpecificApplyPatchParam, SpecificFunctionShellParam, mode="one_of").annotate(description="How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n", identifier="ToolChoiceParam")
|
|
75
|
+
AccessProgramsParam: _StructSchema[_T.AccessProgramsParam, _t.Never, _t.Never] = _b.struct(_T.AccessProgramsParam, {"cyber": _b.suspend(lambda: CyberAccessProgramEnum).annotate(description="The Cyber access program to use for this request. Supported values are `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves the program from the model's Cyber tier and your organization and project access, subject to model-specific eligibility restrictions. By default, models without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when authorized; otherwise they fall back to Standard unless the model requires Daybreak access. Red-tier models use Daybreak Red and require authorization. Requests that require unavailable Daybreak access return 403. An implicit Standard fallback is represented by null in the response's access_programs field, rather than an explicit Standard selection.")}, optional=("cyber",)).annotate(description="Domain-specific access programs to use for this request.", identifier="AccessProgramsParam")
|
|
76
|
+
AccessProgramsBody: _StructSchema[_T.AccessProgramsBody, _t.Never, _t.Never] = _b.struct(_T.AccessProgramsBody, {"cyber": _b.suspend(lambda: CyberAccessProgramEnum).annotate(description="The effective Cyber access program used for this response.")}).annotate(identifier="AccessProgramsBody")
|
|
77
|
+
Reasoning: _StructSchema[_T.Reasoning, _t.Never, _t.Never] = _b.struct(_T.Reasoning, {"mode": _b.suspend(lambda: ReasoningModeEnum).annotate(description="Controls the reasoning execution mode for the request.\n\nWhen returned on a response, this is the effective execution mode.\n"), "effort": ReasoningEffort, "summary": _b.union(_b.literals(["auto", "concise", "detailed"]).annotate(description="A summary of the reasoning performed by the model. This can be\nuseful for debugging and understanding the model's reasoning process.\nOne of `auto`, `concise`, or `detailed`.\n\n`concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.\n"), _S.Null), "context": _b.union(_b.literals(["auto", "current_turn", "all_turns"]).annotate(description="Controls which reasoning items are rendered back to the model on later turns.\nIf omitted or set to `auto`, the model determines the context mode. The\n`gpt-5.6` model family defaults to `all_turns`; earlier models default to\n`current_turn`.\n\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n"), _S.Null), "generate_summary": _b.union(_b.literals(["auto", "concise", "detailed"]).annotate(description="**Deprecated:** use `summary` instead.\n\nA summary of the reasoning performed by the model. This can be\nuseful for debugging and understanding the model's reasoning process.\nOne of `auto`, `concise`, or `detailed`.\n"), _S.Null)}, optional=("mode", "effort", "summary", "context", "generate_summary",)).annotate(title="Reasoning", description="Configuration options for\n[reasoning models](https://developers.openai.com/api/docs/guides/reasoning).\n", identifier="Reasoning")
|
|
78
|
+
ConversationParam: _S.Bottom[_T.ConversationParam, _t.Any] = _b.union(_S.String.annotate(title="Conversation ID", description="The unique ID of the conversation.\n"), ConversationParam_2, mode="one_of").annotate(description="The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.\nInput items and output items from this response are automatically added to this conversation after this response completes.\n", identifier="ConversationParam")
|
|
79
|
+
PromptCacheMissDiagnosticsBody: _StructSchema[_T.PromptCacheMissDiagnosticsBody, _t.Never, _t.Never] = _b.struct(_T.PromptCacheMissDiagnosticsBody, {"type": _b.literal("cache_miss"), "reason": _b.suspend(lambda: CacheMissReasonTypeEnum).annotate(description="The reason prompt cache reuse did not occur."), "cache_missed_tokens": _b.check(_S.Number.annotate(description="The estimated number of input tokens affected after the first detected divergence."), _S.is_int().annotate(expected="an integer")), "comparison_reusable_tokens": _b.check(_S.Number.annotate(description="The raw token count of the reusable prefix in the compared response."), _S.is_int().annotate(expected="an integer"))}, optional=("comparison_reusable_tokens",)).annotate(identifier="PromptCacheMissDiagnosticsBody")
|
|
80
|
+
ResponseShellCallOutputContentDeltaStreamingEvent: _StructSchema[_T.ResponseShellCallOutputContentDeltaStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseShellCallOutputContentDeltaStreamingEvent, {"type": _b.literal("response.shell_call_output_content.delta").annotate(description="The type of the event, always `response.shell_call_output_content.delta`."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the event that was emitted."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The ID of the output item that was updated."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was updated."), _S.is_int().annotate(expected="an integer")), "command_index": _b.check(_S.Number.annotate(description="The index of the shell command that produced output."), _S.is_int().annotate(expected="an integer")), "delta": _b.suspend(lambda: ShellCallOutputDelta).annotate(description="The stdout/stderr delta that was emitted.")}).annotate(title="Response shell call output content delta event", description="A streaming event that indicated shell call output was incrementally added.", identifier="ResponseShellCallOutputContentDeltaStreamingEvent")
|
|
81
|
+
ResponseTextDeltaEvent: _StructSchema[_T.ResponseTextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseTextDeltaEvent, {"type": _b.literal("response.output_text.delta").annotate(description="The type of the event. Always `response.output_text.delta`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the text delta was added to.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the text delta was added to.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part that the text delta was added to.\n"), _S.is_int().annotate(expected="an integer")), "delta": _S.String.annotate(description="The text delta that was added.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number for this event."), _S.is_int().annotate(expected="an integer")), "logprobs": _b.array(ResponseLogProb).annotate(description="The log probabilities of the tokens in the delta.\n")}).annotate(description="Emitted when there is an additional text delta.", identifier="ResponseTextDeltaEvent")
|
|
82
|
+
ResponseTextDoneEvent: _StructSchema[_T.ResponseTextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseTextDoneEvent, {"type": _b.literal("response.output_text.done").annotate(description="The type of the event. Always `response.output_text.done`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the text content is finalized.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the text content is finalized.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part that the text content is finalized.\n"), _S.is_int().annotate(expected="an integer")), "text": _S.String.annotate(description="The text content that is finalized.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number for this event."), _S.is_int().annotate(expected="an integer")), "logprobs": _b.array(ResponseLogProb).annotate(description="The log probabilities of the tokens in the delta.\n")}).annotate(description="Emitted when text content is finalized.", identifier="ResponseTextDoneEvent")
|
|
83
|
+
CreateMessageRequest: _StructSchema[_T.CreateMessageRequest, _t.Never, _t.Never] = _b.struct(_T.CreateMessageRequest, {"role": _b.literals(["user", "assistant"]).annotate(description="The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.\n"), "content": _b.union(_S.String.annotate(title="Text content", description="The text contents of the message."), _b.check(_b.array(_b.union(MessageContentImageFileObject, MessageContentImageUrlObject, MessageRequestContentTextObject, mode="one_of")).annotate(title="Array of content parts", description="An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://developers.openai.com/api/docs/models)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), mode="one_of"), "attachments": _b.union(_b.array(_b.struct(_T.CreateMessageRequest__attachments__0__item, {"file_id": _S.String.annotate(description="The ID of the file to attach to the message."), "tools": _b.array(_b.union(AssistantToolsCode, AssistantToolsFileSearchTypeOnly, mode="one_of")).annotate(description="The tools to add this file to.")}, optional=("file_id", "tools",))).annotate(description="A list of files attached to the message, and the tools they should be added to."), _S.Null), "metadata": Metadata}, optional=("attachments", "metadata",)).annotate(identifier="CreateMessageRequest")
|
|
84
|
+
AssistantsApiToolChoiceOption: _S.Bottom[_T.AssistantsApiToolChoiceOption, _t.Any] = _b.union(_b.literals(["none", "auto", "required"]).annotate(description="`none` means the model will not call any tools and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools before responding to the user.\n"), AssistantsNamedToolChoice, mode="one_of").annotate(description="Controls which (if any) tool is called by the model.\n`none` means the model will not call any tools and instead generates a message.\n`auto` is the default value and means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools before responding to the user.\nSpecifying a particular tool like `{\"type\": \"file_search\"}` or `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n", identifier="AssistantsApiToolChoiceOption")
|
|
85
|
+
RunStepDetailsToolCallsCodeObject: _StructSchema[_T.RunStepDetailsToolCallsCodeObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDetailsToolCallsCodeObject, {"id": _S.String.annotate(description="The ID of the tool call."), "type": _b.literal("code_interpreter").annotate(description="The type of tool call. This is always going to be `code_interpreter` for this type of tool call."), "code_interpreter": _b.struct(_T.RunStepDetailsToolCallsCodeObject__code_interpreter, {"input": _S.String.annotate(description="The input to the Code Interpreter tool call."), "outputs": _b.array(_b.union(RunStepDetailsToolCallsCodeOutputLogsObject, RunStepDetailsToolCallsCodeOutputImageObject, mode="one_of")).annotate(description="The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.")}).annotate(description="The Code Interpreter tool call definition.")}).annotate(title="Code Interpreter tool call", description="Details of the Code Interpreter tool call the run step was involved in.", identifier="RunStepDetailsToolCallsCodeObject")
|
|
86
|
+
RunStepDeltaStepDetailsToolCallsCodeObject: _StructSchema[_T.RunStepDeltaStepDetailsToolCallsCodeObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDeltaStepDetailsToolCallsCodeObject, {"index": _b.check(_S.Number.annotate(description="The index of the tool call in the tool calls array."), _S.is_int().annotate(expected="an integer")), "id": _S.String.annotate(description="The ID of the tool call."), "type": _b.literal("code_interpreter").annotate(description="The type of tool call. This is always going to be `code_interpreter` for this type of tool call."), "code_interpreter": _b.struct(_T.RunStepDeltaStepDetailsToolCallsCodeObject__code_interpreter, {"input": _S.String.annotate(description="The input to the Code Interpreter tool call."), "outputs": _b.array(_b.union(RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, RunStepDeltaStepDetailsToolCallsCodeOutputImageObject, mode="one_of")).annotate(description="The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.")}, optional=("input", "outputs",)).annotate(description="The Code Interpreter tool call definition.")}, optional=("id", "code_interpreter",)).annotate(title="Code interpreter tool call", description="Details of the Code Interpreter tool call the run step was involved in.", identifier="RunStepDeltaStepDetailsToolCallsCodeObject")
|
|
87
|
+
MessageContentTextObject: _StructSchema[_T.MessageContentTextObject, _t.Never, _t.Never] = _b.struct(_T.MessageContentTextObject, {"type": _b.literal("text").annotate(description="Always `text`."), "text": _b.struct(_T.MessageContentTextObject__text, {"value": _S.String.annotate(description="The data that makes up the text."), "annotations": _b.array(_b.union(MessageContentTextAnnotationsFileCitationObject, MessageContentTextAnnotationsFilePathObject, mode="one_of"))})}).annotate(title="Text", description="The text content that is part of a message.", identifier="MessageContentTextObject")
|
|
88
|
+
MessageDeltaContentTextObject: _StructSchema[_T.MessageDeltaContentTextObject, _t.Never, _t.Never] = _b.struct(_T.MessageDeltaContentTextObject, {"index": _b.check(_S.Number.annotate(description="The index of the content part in the message."), _S.is_int().annotate(expected="an integer")), "type": _b.literal("text").annotate(description="Always `text`."), "text": _b.struct(_T.MessageDeltaContentTextObject__text, {"value": _S.String.annotate(description="The data that makes up the text."), "annotations": _b.array(_b.union(MessageDeltaContentTextAnnotationsFileCitationObject, MessageDeltaContentTextAnnotationsFilePathObject, mode="one_of"))}, optional=("value", "annotations",))}, optional=("text",)).annotate(title="Text", description="The text content that is part of a message.", identifier="MessageDeltaContentTextObject")
|
|
89
|
+
VectorStoreObject: _StructSchema[_T.VectorStoreObject, _t.Never, _t.Never] = _b.struct(_T.VectorStoreObject, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints."), "object": _b.literal("vector_store").annotate(description="The object type, which is always `vector_store`."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the vector store was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "name": _S.String.annotate(description="The name of the vector store."), "usage_bytes": _b.check(_S.Number.annotate(description="The total number of bytes used by the files in the vector store."), _S.is_int().annotate(expected="an integer")), "file_counts": _b.struct(_T.VectorStoreObject__file_counts, {"in_progress": _b.check(_S.Number.annotate(description="The number of files that are currently being processed."), _S.is_int().annotate(expected="an integer")), "completed": _b.check(_S.Number.annotate(description="The number of files that have been successfully processed."), _S.is_int().annotate(expected="an integer")), "failed": _b.check(_S.Number.annotate(description="The number of files that have failed to process."), _S.is_int().annotate(expected="an integer")), "cancelled": _b.check(_S.Number.annotate(description="The number of files that were cancelled."), _S.is_int().annotate(expected="an integer")), "total": _b.check(_S.Number.annotate(description="The total number of files."), _S.is_int().annotate(expected="an integer"))}), "status": _b.literals(["expired", "in_progress", "completed"]).annotate(description="The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use."), "expires_after": VectorStoreExpirationAfter, "expires_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the vector store will expire.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "last_active_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the vector store was last active.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "metadata": Metadata}, optional=("expires_after", "expires_at",)).annotate(title="Vector store", description="A vector store is a collection of processed files can be used by the `file_search` tool.", identifier="VectorStoreObject")
|
|
90
|
+
UpdateVectorStoreRequest: _StructSchema[_T.UpdateVectorStoreRequest, _t.Never, _t.Never] = _b.struct(_T.UpdateVectorStoreRequest, {"name": _b.union(_S.String, _S.Null).annotate(description="The name of the vector store."), "expires_after": _b.union(VectorStoreExpirationAfter, _S.Null), "metadata": Metadata}, optional=("name", "expires_after", "metadata",)).annotate(identifier="UpdateVectorStoreRequest")
|
|
91
|
+
StaticChunkingStrategyRequestParam: _StructSchema[_T.StaticChunkingStrategyRequestParam, _t.Never, _t.Never] = _b.struct(_T.StaticChunkingStrategyRequestParam, {"type": _b.literal("static").annotate(description="Always `static`."), "static": StaticChunkingStrategy}).annotate(title="Static Chunking Strategy", description="Customize your own chunking strategy by setting chunk size and chunk overlap.", identifier="StaticChunkingStrategyRequestParam")
|
|
92
|
+
StaticChunkingStrategyResponseParam: _StructSchema[_T.StaticChunkingStrategyResponseParam, _t.Never, _t.Never] = _b.struct(_T.StaticChunkingStrategyResponseParam, {"type": _b.literal("static").annotate(description="Always `static`."), "static": StaticChunkingStrategy}).annotate(title="Static Chunking Strategy", identifier="StaticChunkingStrategyResponseParam")
|
|
93
|
+
VectorStoreSearchResultItem: _StructSchema[_T.VectorStoreSearchResultItem, _t.Never, _t.Never] = _b.struct(_T.VectorStoreSearchResultItem, {"file_id": _S.String.annotate(description="The ID of the vector store file."), "filename": _S.String.annotate(description="The name of the vector store file."), "score": _b.check(_b.check(_b.check(_S.Number.annotate(description="The similarity score for the result."), _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")), "attributes": VectorStoreFileAttributes, "content": _b.array(VectorStoreSearchResultContentObject).annotate(description="Content chunks from the file.")}).annotate(identifier="VectorStoreSearchResultItem")
|
|
94
|
+
SafetyCaseNotice: _StructSchema[_T.SafetyCaseNotice, _t.Never, _t.Never] = _b.struct(_T.SafetyCaseNotice, {"type": SafetyCaseNoticeType}).annotate(identifier="SafetyCaseNotice")
|
|
95
|
+
SafetyAlertResource: _StructSchema[_T.SafetyAlertResource, _t.Never, _t.Never] = _b.struct(_T.SafetyAlertResource, {"id": _S.String, "object": _b.literal("safety.alert"), "created_at": _b.check(_S.Number.annotate(format="unixtime"), _S.is_int().annotate(expected="an integer")), "request_id": _S.String, "response_id": _S.String, "model": _S.String, "request_paused": _S.Boolean.annotate(description="Whether block registration succeeded for this request. This does not confirm that response execution stopped."), "error_type": SafetyAlertErrorType, "reason": _b.union(_S.String.annotate(description="A customer-safe description derived from error_type, or null for zero data retention requests."), _S.Null), "detailed_explanation": _b.union(_S.String.annotate(description="A generated explanation, temporarily available for eligible zero data retention alerts. Omitted when unavailable."), _S.Null)}, optional=("detailed_explanation",)).annotate(identifier="SafetyAlertResource")
|
|
96
|
+
DecisionsUsageResult: _StructSchema[_T.DecisionsUsageResult, _t.Never, _t.Never] = _b.struct(_T.DecisionsUsageResult, {"api_source": _b.union(_b.suspend(lambda: DecisionsUsageApiSource).annotate(description="When grouped by `api_source`, `agents_api` identifies attributed Agents API activity and `unlabeled` includes all records without published source attribution, including historical and unknown origins. Unlabeled does not imply direct API usage. Without source grouping, this field is null."), _S.Null), "object": _b.literal("organization.usage.decisions.result"), "input_tokens": _b.check(_S.Number.annotate(description="The aggregated number of input tokens used, including cached and cache-write tokens. This includes text, audio, and image tokens. For customers subscribed to Scale Tier, this includes Scale Tier tokens."), _S.is_int().annotate(expected="an integer")), "input_cached_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of cached input tokens used across text, audio, and image inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens."), _S.is_int().annotate(expected="an integer")), _S.Null), "input_cache_write_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of input tokens written to the cache with a 30-minute retention period."), _S.is_int().annotate(expected="an integer")), _S.Null), "input_cache_write_12h_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of input tokens written to the cache with a 12-hour retention period."), _S.is_int().annotate(expected="an integer")), _S.Null), "input_uncached_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of uncached input tokens used across text, audio, and image inputs, excluding cache-write tokens."), _S.is_int().annotate(expected="an integer")), _S.Null), "output_tokens": _b.check(_S.Number.annotate(description="The aggregated number of output tokens used across text, audio, and image outputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens."), _S.is_int().annotate(expected="an integer")), "input_text_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of uncached text input tokens used, excluding cache-write tokens."), _S.is_int().annotate(expected="an integer")), _S.Null), "output_text_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of text output tokens used."), _S.is_int().annotate(expected="an integer")), _S.Null), "input_cached_text_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of cached text input tokens used."), _S.is_int().annotate(expected="an integer")), _S.Null), "input_audio_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of uncached audio input tokens used."), _S.is_int().annotate(expected="an integer")), _S.Null), "input_cached_audio_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of cached audio input tokens used."), _S.is_int().annotate(expected="an integer")), _S.Null), "output_audio_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of audio output tokens used."), _S.is_int().annotate(expected="an integer")), _S.Null), "input_image_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of uncached image input tokens used."), _S.is_int().annotate(expected="an integer")), _S.Null), "input_cached_image_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of cached image input tokens used."), _S.is_int().annotate(expected="an integer")), _S.Null), "output_image_tokens": _b.union(_b.check(_S.Number.annotate(description="The aggregated number of image output tokens used."), _S.is_int().annotate(expected="an integer")), _S.Null), "num_model_requests": _b.check(_S.Number.annotate(description="The count of requests made to the model."), _S.is_int().annotate(expected="an integer")), "project_id": _b.union(_S.String.annotate(description="When `group_by=project_id`, this field provides the project ID of the grouped usage result."), _S.Null), "user_id": _b.union(_S.String.annotate(description="When `group_by=user_id`, this field provides the user ID of the grouped usage result."), _S.Null), "api_key_id": _b.union(_S.String.annotate(description="When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result."), _S.Null), "model": _b.union(_S.String.annotate(description="When `group_by=model`, this field provides the model name of the grouped usage result."), _S.Null), "batch": _b.union(_S.Boolean.annotate(description="When `group_by=batch`, this field tells whether the grouped usage result is batch or not."), _S.Null), "service_tier": _b.union(_S.String.annotate(description="When `group_by=service_tier`, this field provides the service tier of the grouped usage result."), _S.Null)}, optional=("api_source", "input_cached_tokens", "input_cache_write_tokens", "input_cache_write_12h_tokens", "input_uncached_tokens", "input_text_tokens", "output_text_tokens", "input_cached_text_tokens", "input_audio_tokens", "input_cached_audio_tokens", "output_audio_tokens", "input_image_tokens", "input_cached_image_tokens", "output_image_tokens", "project_id", "user_id", "api_key_id", "model", "batch", "service_tier",)).annotate(description="The aggregated Decisions API usage details of the specific time bucket.", identifier="DecisionsUsageResult")
|
|
97
|
+
DecisionsUsageErrorResponse: _StructSchema[_T.DecisionsUsageErrorResponse, _t.Never, _t.Never] = _b.struct(_T.DecisionsUsageErrorResponse, {"error": DecisionsUsageErrorDetails}).annotate(identifier="DecisionsUsageErrorResponse")
|
|
98
|
+
DecisionsUsagePermissionErrorResponse: _StructSchema[_T.DecisionsUsagePermissionErrorResponse, _t.Never, _t.Never] = _b.struct(_T.DecisionsUsagePermissionErrorResponse, {"error": _b.union(DecisionsUsageErrorDetails, _S.String.annotate(description="An explanation of the missing API permissions."), mode="one_of").annotate(description="Details about the permission error.")}).annotate(identifier="DecisionsUsagePermissionErrorResponse")
|
|
99
|
+
ExternalStorageResponse: _StructSchema[_T.ExternalStorageResponse, _t.Never, _t.Never] = _b.struct(_T.ExternalStorageResponse, {"object": _b.literal("organization.external_storage"), "id": _S.String, "project_id": _S.String, "provider": _b.union(AwsExternalStorageProviderResponse, AzureExternalStorageProviderResponse, GcpExternalStorageProviderResponse, OciExternalStorageProviderResponse, mode="one_of"), "geography": _S.String, "status": ExternalStorageStatus, "created_at": _b.check(_S.Number.annotate(format="unixtime"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="ExternalStorageResponse")
|
|
100
|
+
CreateExternalStorageBody: _StructSchema[_T.CreateExternalStorageBody, _t.Never, _t.Never] = _b.struct(_T.CreateExternalStorageBody, {"project_id": _S.String, "provider": _b.union(AwsExternalStorageProviderParams, AzureExternalStorageProviderParams, GcpExternalStorageProviderParams, OciExternalStorageProviderParams, mode="one_of")}).annotate(identifier="CreateExternalStorageBody")
|
|
101
|
+
SpendLimitEnforcement: _StructSchema[_T.SpendLimitEnforcement, _t.Never, _t.Never] = _b.struct(_T.SpendLimitEnforcement, {"status": _b.suspend(lambda: SpendLimitEnforcementStatus).annotate(description="Whether the hard spend limit is currently enforcing.")}).annotate(description="The current enforcement state of a hard spend limit.", identifier="SpendLimitEnforcement")
|
|
102
|
+
SynthIDProvenanceResult: _StructSchema[_T.SynthIDProvenanceResult, _t.Never, _t.Never] = _b.struct(_T.SynthIDProvenanceResult, {"type": _b.literal("synthid").annotate(description="The provenance signal type. Always `synthid`."), "outcome": _b.suspend(lambda: ProvenanceDetectionResultApi).annotate(description="Whether a supported OpenAI SynthID watermark was detected.\nIf `not_detected`, it means the tool did not find supported signals in the uploaded file. The content could still have been generated by OpenAI if the metadata was stripped or has evidence of tampering, the watermark was degraded, it comes from a legacy generation model, or it was created before provenance signals were available. Content could also still be AI-generated by another company's model, which the tool currently does not detect."), "model": _b.union(_S.String.annotate(description="The OpenAI model recorded by the provenance signal, when available."), _S.Null), "generated_at": _b.union(_S.String.annotate(description="The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset was generated, when available."), _S.Null)}).annotate(identifier="SynthIDProvenanceResult")
|
|
103
|
+
C2PAProvenanceResult: _StructSchema[_T.C2PAProvenanceResult, _t.Never, _t.Never] = _b.struct(_T.C2PAProvenanceResult, {"type": _b.literal("c2pa").annotate(description="The provenance signal type. Always `c2pa`."), "outcome": _b.suspend(lambda: ProvenanceDetectionResultApi).annotate(description="Whether a supported OpenAI C2PA provenance signal was detected.\nIf `not_detected`, it means the tool did not find supported signals in the uploaded file. The content could still have been generated by OpenAI if the metadata was stripped or has evidence of tampering, the watermark was degraded, it comes from a legacy generation model, or it was created before provenance signals were available. Content could also still be AI-generated by another company's model, which the tool currently does not detect."), "validation_state": _b.suspend(lambda: C2PAValidationStateApi).annotate(description="The validation status of the C2PA manifest in the uploaded image."), "issuer": _b.union(_S.String.annotate(description="The C2PA manifest issuer, when available."), _S.Null), "model": _b.union(_S.String.annotate(description="The OpenAI model recorded by the provenance signal, when available."), _S.Null), "generated_at": _b.union(_S.String.annotate(description="The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset was generated, when available."), _S.Null)}).annotate(identifier="C2PAProvenanceResult")
|
|
104
|
+
CreateVideoJsonBody: _StructSchema[_T.CreateVideoJsonBody, _t.Never, _t.Never] = _b.struct(_T.CreateVideoJsonBody, {"model": _b.suspend(lambda: VideoModel).annotate(description="The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults to `sora-2`."), "prompt": _b.check(_b.check(_S.String.annotate(description="Text prompt that describes the video to generate."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(32000).annotate(expected="a string with at most 32000 code points")), "input_reference": _b.suspend(lambda: ImageRefParam_2).annotate(description="Optional reference object that guides generation. Provide exactly one of `image_url` or `file_id`."), "seconds": _b.suspend(lambda: VideoSeconds).annotate(description="Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds."), "size": _b.suspend(lambda: VideoSize).annotate(description="Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280.")}, optional=("model", "input_reference", "seconds", "size",)).annotate(title="Create video JSON request", description="JSON parameters for creating a new video generation job.", identifier="CreateVideoJsonBody")
|
|
105
|
+
CreateVideoMultipartBodyMultipart: _StructSchema[_T.CreateVideoMultipartBodyMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateVideoMultipartBodyMultipart, {"model": _b.suspend(lambda: VideoModel).annotate(description="The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults to `sora-2`."), "prompt": _b.check(_b.check(_S.String.annotate(description="Text prompt that describes the video to generate."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(32000).annotate(expected="a string with at most 32000 code points")), "input_reference": _b.union(__ClientMultipartFile, _b.suspend(lambda: ImageRefParam_2).annotate(description="Optional reference asset upload or reference object that guides generation. Provide exactly one of `image_url` or `file_id` when using an object."), mode="one_of"), "seconds": _b.suspend(lambda: VideoSeconds).annotate(description="Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds."), "size": _b.suspend(lambda: VideoSize).annotate(description="Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280.")}, optional=("model", "input_reference", "seconds", "size",)).annotate(title="Create video multipart request", description="Multipart parameters for creating a new video generation job.", identifier="CreateVideoMultipartBodyMultipart")
|
|
106
|
+
CreateVideoEditJsonBody: _StructSchema[_T.CreateVideoEditJsonBody, _t.Never, _t.Never] = _b.struct(_T.CreateVideoEditJsonBody, {"video": _b.suspend(lambda: VideoReferenceInputParam).annotate(description="Reference to the completed video to edit."), "prompt": _b.check(_b.check(_S.String.annotate(description="Text prompt that describes how to edit the source video."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(32000).annotate(expected="a string with at most 32000 code points"))}).annotate(title="Create video edit JSON request", description="JSON parameters for editing an existing generated video.", identifier="CreateVideoEditJsonBody")
|
|
107
|
+
CreateVideoEditMultipartBodyMultipart: _StructSchema[_T.CreateVideoEditMultipartBodyMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateVideoEditMultipartBodyMultipart, {"video": _b.union(__ClientMultipartFile, _b.suspend(lambda: VideoReferenceInputParam).annotate(description="Reference to the completed video to edit."), mode="one_of"), "prompt": _b.check(_b.check(_S.String.annotate(description="Text prompt that describes how to edit the source video."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(32000).annotate(expected="a string with at most 32000 code points"))}).annotate(title="Create video edit multipart request", description="Parameters for editing an existing generated video.", identifier="CreateVideoEditMultipartBodyMultipart")
|
|
108
|
+
CreateVideoExtendJsonBody: _StructSchema[_T.CreateVideoExtendJsonBody, _t.Never, _t.Never] = _b.struct(_T.CreateVideoExtendJsonBody, {"video": _b.suspend(lambda: VideoReferenceInputParam).annotate(description="Reference to the completed video to extend."), "prompt": _b.check(_b.check(_S.String.annotate(description="Updated text prompt that directs the extension generation."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(32000).annotate(expected="a string with at most 32000 code points")), "seconds": _b.suspend(lambda: VideoSeconds).annotate(description="Length of the newly generated extension segment in seconds (allowed values: 4, 8, 12, 16, 20).")}).annotate(title="Create video extension JSON request", description="JSON parameters for extending an existing generated video.", identifier="CreateVideoExtendJsonBody")
|
|
109
|
+
CreateVideoExtendMultipartBodyMultipart: _StructSchema[_T.CreateVideoExtendMultipartBodyMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateVideoExtendMultipartBodyMultipart, {"video": _b.union(_b.suspend(lambda: VideoReferenceInputParam).annotate(description="Reference to the completed video to extend."), __ClientMultipartFile, mode="one_of"), "prompt": _b.check(_b.check(_S.String.annotate(description="Updated text prompt that directs the extension generation."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(32000).annotate(expected="a string with at most 32000 code points")), "seconds": _b.suspend(lambda: VideoSeconds).annotate(description="Length of the newly generated extension segment in seconds (allowed values: 4, 8, 12, 16, 20).")}).annotate(title="Create video extension multipart request", description="Multipart parameters for extending an existing generated video.", identifier="CreateVideoExtendMultipartBodyMultipart")
|
|
110
|
+
SkillListResource: _StructSchema[_T.SkillListResource, _t.Never, _t.Never] = _b.struct(_T.SkillListResource, {"object": _b.literal("list").annotate(description="The type of object returned, must be `list`."), "data": _b.array(SkillResource).annotate(description="A list of items"), "first_id": _b.union(_S.String.annotate(description="The ID of the first item in the list."), _S.Null), "last_id": _b.union(_S.String.annotate(description="The ID of the last item in the list."), _S.Null), "has_more": _S.Boolean.annotate(description="Whether there are more items available.")}).annotate(identifier="SkillListResource")
|
|
111
|
+
SkillVersionListResource: _StructSchema[_T.SkillVersionListResource, _t.Never, _t.Never] = _b.struct(_T.SkillVersionListResource, {"object": _b.literal("list").annotate(description="The type of object returned, must be `list`."), "data": _b.array(SkillVersionResource).annotate(description="A list of items"), "first_id": _b.union(_S.String.annotate(description="The ID of the first item in the list."), _S.Null), "last_id": _b.union(_S.String.annotate(description="The ID of the last item in the list."), _S.Null), "has_more": _S.Boolean.annotate(description="Whether there are more items available.")}).annotate(identifier="SkillVersionListResource")
|
|
112
|
+
ChatkitWorkflow: _StructSchema[_T.ChatkitWorkflow, _t.Never, _t.Never] = _b.struct(_T.ChatkitWorkflow, {"id": _S.String.annotate(description="Identifier of the workflow backing the session."), "version": _b.union(_S.String.annotate(description="Specific workflow version used for the session. Defaults to null when using the latest deployment."), _S.Null), "state_variables": _b.union(_b.record(_S.String, _b.union(_S.String, _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Boolean, _S.Finite, _S.Null)).annotate(description="State variable key-value pairs applied when invoking the workflow. Defaults to null when no overrides were provided."), _S.Null), "tracing": _b.suspend(lambda: ChatkitWorkflowTracing).annotate(description="Tracing settings applied to the workflow.")}).annotate(title="Workflow", description="Workflow metadata and state returned for the session.", identifier="ChatkitWorkflow")
|
|
113
|
+
ChatSessionChatkitConfiguration: _StructSchema[_T.ChatSessionChatkitConfiguration, _t.Never, _t.Never] = _b.struct(_T.ChatSessionChatkitConfiguration, {"automatic_thread_titling": _b.suspend(lambda: ChatSessionAutomaticThreadTitling).annotate(description="Automatic thread titling preferences."), "file_upload": _b.suspend(lambda: ChatSessionFileUpload).annotate(description="Upload settings for the session."), "history": _b.suspend(lambda: ChatSessionHistory).annotate(description="History retention configuration.")}).annotate(title="ChatKit configuration", description="ChatKit configuration for the session.", identifier="ChatSessionChatkitConfiguration")
|
|
114
|
+
WorkflowParam: _StructSchema[_T.WorkflowParam, _t.Never, _t.Never] = _b.struct(_T.WorkflowParam, {"id": _S.String.annotate(description="Identifier for the workflow invoked by the session."), "version": _S.String.annotate(description="Specific workflow version to run. Defaults to the latest deployed version."), "state_variables": _b.check(_b.record(_S.String, _b.union(_b.check(_S.String, _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Boolean, _S.Finite, mode="one_of")).annotate(description="State variables forwarded to the workflow. Keys may be up to 64 characters, values must be primitive types, and the map defaults to an empty object."), _S.is_max_properties(64).annotate(expected="a value with at most 64 entries")), "tracing": _b.suspend(lambda: WorkflowTracingParam).annotate(description="Optional tracing overrides for the workflow invocation. When omitted, tracing is enabled by default.")}, optional=("version", "state_variables", "tracing",)).annotate(title="Workflow settings", description="Workflow reference and overrides applied to the chat session.", identifier="WorkflowParam")
|
|
115
|
+
ChatkitConfigurationParam: _StructSchema[_T.ChatkitConfigurationParam, _t.Never, _t.Never] = _b.struct(_T.ChatkitConfigurationParam, {"automatic_thread_titling": _b.suspend(lambda: AutomaticThreadTitlingParam).annotate(description="Configuration for automatic thread titling. When omitted, automatic thread titling is enabled by default."), "file_upload": _b.suspend(lambda: FileUploadParam).annotate(description="Configuration for upload enablement and limits. When omitted, uploads are disabled by default (max_files 10, max_file_size 512 MB)."), "history": _b.suspend(lambda: HistoryParam).annotate(description="Configuration for chat history retention. When omitted, history is enabled by default with no limit on recent_threads (null).")}, optional=("automatic_thread_titling", "file_upload", "history",)).annotate(title="ChatKit configuration overrides", description="Optional per-session configuration settings for ChatKit behavior.", identifier="ChatkitConfigurationParam")
|
|
116
|
+
Attachment: _StructSchema[_T.Attachment, _t.Never, _t.Never] = _b.struct(_T.Attachment, {"type": _b.suspend(lambda: AttachmentType).annotate(description="Attachment discriminator."), "id": _S.String.annotate(description="Identifier for the attachment."), "name": _S.String.annotate(description="Original display name for the attachment."), "mime_type": _S.String.annotate(description="MIME type of the attachment."), "preview_url": _b.union(_S.String.annotate(description="Preview URL for rendering the attachment inline.", format="uri"), _S.Null)}).annotate(title="Attachment", description="Attachment metadata included on thread items.", identifier="Attachment")
|
|
117
|
+
InferenceOptions: _StructSchema[_T.InferenceOptions, _t.Never, _t.Never] = _b.struct(_T.InferenceOptions, {"tool_choice": _b.union(_b.suspend(lambda: ToolChoice).annotate(description="Preferred tool to invoke. Defaults to null when ChatKit should auto-select."), _S.Null), "model": _b.union(_S.String.annotate(description="Model name that generated the response. Defaults to null when using the session default."), _S.Null)}).annotate(title="Inference options", description="Model and tool overrides applied when generating the assistant response.", identifier="InferenceOptions")
|
|
118
|
+
FileAnnotation: _StructSchema[_T.FileAnnotation, _t.Never, _t.Never] = _b.struct(_T.FileAnnotation, {"type": _b.literal("file").annotate(description="Type discriminator that is always `file` for this annotation."), "source": _b.suspend(lambda: FileAnnotationSource).annotate(description="File attachment referenced by the annotation.")}).annotate(title="File annotation", description="Annotation that references an uploaded file.", identifier="FileAnnotation")
|
|
119
|
+
UrlAnnotation: _StructSchema[_T.UrlAnnotation, _t.Never, _t.Never] = _b.struct(_T.UrlAnnotation, {"type": _b.literal("url").annotate(description="Type discriminator that is always `url` for this annotation."), "source": _b.suspend(lambda: UrlAnnotationSource).annotate(description="URL referenced by the annotation.")}).annotate(title="URL annotation", description="Annotation that references a URL.", identifier="UrlAnnotation")
|
|
120
|
+
ClientToolCallItem: _StructSchema[_T.ClientToolCallItem, _t.Never, _t.Never] = _b.struct(_T.ClientToolCallItem, {"id": _S.String.annotate(description="Identifier of the thread item."), "object": _b.literal("chatkit.thread_item").annotate(description="Type discriminator that is always `chatkit.thread_item`."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) for when the item was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "thread_id": _S.String.annotate(description="Identifier of the parent thread."), "type": _b.literal("chatkit.client_tool_call").annotate(description="Type discriminator that is always `chatkit.client_tool_call`."), "status": _b.suspend(lambda: ClientToolCallStatus).annotate(description="Execution status for the tool call."), "call_id": _S.String.annotate(description="Identifier for the client tool call."), "name": _S.String.annotate(description="Tool name that was invoked."), "arguments": _S.String.annotate(description="JSON-encoded arguments that were sent to the tool."), "output": _b.union(_S.String.annotate(description="JSON-encoded output captured from the tool. Defaults to null while execution is in progress."), _S.Null)}).annotate(title="Client tool call", description="Record of a client side tool invocation initiated by the assistant.", identifier="ClientToolCallItem")
|
|
121
|
+
TaskItem: _StructSchema[_T.TaskItem, _t.Never, _t.Never] = _b.struct(_T.TaskItem, {"id": _S.String.annotate(description="Identifier of the thread item."), "object": _b.literal("chatkit.thread_item").annotate(description="Type discriminator that is always `chatkit.thread_item`."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) for when the item was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "thread_id": _S.String.annotate(description="Identifier of the parent thread."), "type": _b.literal("chatkit.task").annotate(description="Type discriminator that is always `chatkit.task`."), "task_type": _b.suspend(lambda: TaskType).annotate(description="Subtype for the task."), "heading": _b.union(_S.String.annotate(description="Optional heading for the task. Defaults to null when not provided."), _S.Null), "summary": _b.union(_S.String.annotate(description="Optional summary that describes the task. Defaults to null when omitted."), _S.Null)}).annotate(title="Task item", description="Task emitted by the workflow to show progress and status updates.", identifier="TaskItem")
|
|
122
|
+
TaskGroupTask: _StructSchema[_T.TaskGroupTask, _t.Never, _t.Never] = _b.struct(_T.TaskGroupTask, {"type": _b.suspend(lambda: TaskType).annotate(description="Subtype for the grouped task."), "heading": _b.union(_S.String.annotate(description="Optional heading for the grouped task. Defaults to null when not provided."), _S.Null), "summary": _b.union(_S.String.annotate(description="Optional summary that describes the grouped task. Defaults to null when omitted."), _S.Null)}).annotate(title="Task group task", description="Task entry that appears within a TaskGroup.", identifier="TaskGroupTask")
|
|
123
|
+
ThreadResource: _StructSchema[_T.ThreadResource, _t.Never, _t.Never] = _b.struct(_T.ThreadResource, {"id": _S.String.annotate(description="Identifier of the thread."), "object": _b.literal("chatkit.thread").annotate(description="Type discriminator that is always `chatkit.thread`."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) for when the thread was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "title": _b.union(_S.String.annotate(description="Optional human-readable title for the thread. Defaults to null when no title has been generated."), _S.Null), "status": _b.union(ActiveStatus, LockedStatus, ClosedStatus, mode="one_of").annotate(description="Current status for the thread. Defaults to `active` for newly created threads."), "user": _S.String.annotate(description="Free-form string that identifies your end user who owns the thread.")}).annotate(title="The thread object", description="Represents a ChatKit thread and its current status.", identifier="ThreadResource")
|
|
124
|
+
DecisionInputImage: _StructSchema[_T.DecisionInputImage, _t.Never, _t.Never] = _b.struct(_T.DecisionInputImage, {"image_url": _b.check(_b.check(_b.check(_S.String.annotate(description="A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1073741824).annotate(expected="a string with at most 1073741824 code points")), _b.js_pattern('^(data:|https?:\\/\\/)', '^(data:|https?:\\/\\/)').annotate(expected="a string matching the RegExp ^(data:|https?:\\/\\/)")), "detail": _b.union(ImageDetailParam, _S.Null).annotate(description="The image detail level, using the selected model's image profile. Defaults to auto."), "type": _b.literal("input_image")}, optional=("detail",)).annotate(description="An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.", identifier="DecisionInputImage")
|
|
125
|
+
ChoiceOptionParam: _StructSchema[_T.ChoiceOptionParam, _t.Never, _t.Never] = _b.struct(_T.ChoiceOptionParam, {"value": ChoiceValueParam, "description": _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))}, optional=("description",)).annotate(identifier="ChoiceOptionParam")
|
|
126
|
+
QuestionParamScore: _StructSchema[_T.QuestionParamScore, _t.Never, _t.Never] = _b.struct(_T.QuestionParamScore, {"type": _b.literal("score").annotate(description="The type of the object. Always `score`."), "name": _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "instructions": _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "levels": _b.check(_b.check(_b.array(ScoreLevelParam), _S.is_min_length(2).annotate(expected="a value with a length of at least 2")), _S.is_max_length(10).annotate(expected="a value with a length of at most 10"))}, optional=("name",)).annotate(description="Rate the input against the supplied ordered levels.", identifier="QuestionParamScore")
|
|
127
|
+
ChoiceProbabilityResource: _StructSchema[_T.ChoiceProbabilityResource, _t.Never, _t.Never] = _b.struct(_T.ChoiceProbabilityResource, {"value": ChoiceValueResource, "probability": _S.Finite}).annotate(identifier="ChoiceProbabilityResource")
|
|
128
|
+
AnswerResourceScore: _StructSchema[_T.AnswerResourceScore, _t.Never, _t.Never] = _b.struct(_T.AnswerResourceScore, {"type": _b.literal("score").annotate(description="The type of the object. Always `score`."), "name": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null), "score": _S.Finite, "probabilities": _b.check(_b.check(_b.array(ScoreProbabilityResource), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "confidence": _S.Finite}).annotate(identifier="AnswerResourceScore")
|
|
129
|
+
ResponseUsageResource: _StructSchema[_T.ResponseUsageResource, _t.Never, _t.Never] = _b.struct(_T.ResponseUsageResource, {"input_tokens": _b.check(_b.check(_b.check(_S.Number.annotate(format="int64"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(-2147483648).annotate(expected="a value greater than or equal to -2147483648")), _S.is_less_than_or_equal_to(2147483647).annotate(expected="a value less than or equal to 2147483647")), "input_tokens_details": InputTokensDetailsResource, "output_tokens": _b.check(_b.check(_b.check(_S.Number.annotate(format="int64"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(-2147483648).annotate(expected="a value greater than or equal to -2147483648")), _S.is_less_than_or_equal_to(2147483647).annotate(expected="a value less than or equal to 2147483647")), "output_tokens_details": OutputTokensDetailsResource, "total_tokens": _b.check(_b.check(_b.check(_S.Number.annotate(format="int64"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(-2147483648).annotate(expected="a value greater than or equal to -2147483648")), _S.is_less_than_or_equal_to(2147483647).annotate(expected="a value less than or equal to 2147483647"))}).annotate(identifier="ResponseUsageResource")
|
|
130
|
+
HostedEnvironmentFileResource: _S.Bottom[_T.HostedEnvironmentFileResource, _t.Any] = _b.union(HostedEnvironmentFileResourceFileId, HostedEnvironmentFileResourceInline, mode="one_of").annotate(description="Metadata for a file materialized in an OpenAI-hosted execution environment.", identifier="HostedEnvironmentFileResource")
|
|
131
|
+
HostedSkillResource: _S.Bottom[_T.HostedSkillResource, _t.Any] = _b.union(HostedSkillResourceSkillReference, HostedSkillResourceInline, mode="one_of").annotate(description="A skill installed in an OpenAI-hosted environment.", identifier="HostedSkillResource")
|
|
132
|
+
HostedPluginResource: _S.Bottom[_T.HostedPluginResource, _t.Any] = _b.union(HostedPluginResourceInline, mode="one_of").annotate(description="A plugin installed in an OpenAI-hosted environment.", identifier="HostedPluginResource")
|
|
133
|
+
ErrorResponse_2: _StructSchema[_T.ErrorResponse_2, _t.Never, _t.Never] = _b.struct(_T.ErrorResponse_2, {"error": _b.suspend(lambda: ErrorBodyResource).annotate(description="The error returned by the API.")}).annotate(description="An API error response.", identifier="ErrorResponse-2")
|
|
134
|
+
NetworkPolicyParam: _StructSchema[_T.NetworkPolicyParam, _t.Never, _t.Never] = _b.struct(_T.NetworkPolicyParam, {"access": _b.suspend(lambda: NetworkAccessParam).annotate(description="The environment's network access mode."), "allowed_domains": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="Domains the environment may access when network access is restricted."), "blocked_domains": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(100).annotate(expected="a value with a length of at most 100")), _S.Null).annotate(description="Domains blocked for both executor and browser when access is restricted. A nonempty list requires `access: restricted` and cannot be combined with nonempty `allowed_domains`. Wildcard domains are not supported.")}, optional=("allowed_domains", "blocked_domains",)).annotate(description="Network access for an OpenAI-hosted environment.", identifier="NetworkPolicyParam")
|
|
135
|
+
InlineCapabilitySourceParam: _S.Bottom[_T.InlineCapabilitySourceParam, _t.Any] = _b.union(InlineCapabilitySourceParamBase64, mode="one_of").annotate(description="The encoded ZIP archive for an inline skill or plugin.", identifier="InlineCapabilitySourceParam")
|
|
136
|
+
HostedEnvironmentFileParam: _S.Bottom[_T.HostedEnvironmentFileParam, _t.Any] = _b.union(HostedEnvironmentFileParamFileId, HostedEnvironmentFileParamInline, mode="one_of").annotate(description="A file materialized in an OpenAI-hosted execution environment.", identifier="HostedEnvironmentFileParam")
|
|
137
|
+
EnvironmentFileListResource: _StructSchema[_T.EnvironmentFileListResource, _t.Never, _t.Never] = _b.struct(_T.EnvironmentFileListResource, {"object": _b.suspend(lambda: EnvironmentFilePageObjectResource).annotate(description="The object type. Always `page`."), "data": _b.check(_b.check(_b.array(EnvironmentFileResource).annotate(description="Files available on the current page."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "next": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The opaque cursor to use when requesting the next page, if any."), "has_more": _S.Boolean.annotate(description="Whether more files follow this page.")}).annotate(description="A paginated list of live execution environment files.", identifier="EnvironmentFileListResource")
|
|
138
|
+
SessionEventAgentSessionTurnContentPartAdded: _StructSchema[_T.SessionEventAgentSessionTurnContentPartAdded, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnContentPartAdded, {"type": _b.literal("agent.session.turn.content_part.added").annotate(description="The type of the object. Always `agent.session.turn.content_part.added`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "item_id": _b.check(_S.String.annotate(description="The ID of the message item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "output_index": _b.check(_b.check(_b.check(_S.Number.annotate(description="The index of the item in the turn output.", format="int64"), _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(4294967295).annotate(expected="a value less than or equal to 4294967295")), "content_index": _b.check(_b.check(_b.check(_S.Number.annotate(description="The index of the content part in the message.", format="int64"), _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(4294967295).annotate(expected="a value less than or equal to 4294967295")), "part": _b.suspend(lambda: OutputTextResource).annotate(description="The initial content part.")}).annotate(description="Emitted when an output text content part is added.", identifier="SessionEventAgentSessionTurnContentPartAdded")
|
|
139
|
+
SessionEventAgentSessionTurnContentPartDone: _StructSchema[_T.SessionEventAgentSessionTurnContentPartDone, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnContentPartDone, {"type": _b.literal("agent.session.turn.content_part.done").annotate(description="The type of the object. Always `agent.session.turn.content_part.done`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "item_id": _b.check(_S.String.annotate(description="The ID of the message item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "output_index": _b.check(_b.check(_b.check(_S.Number.annotate(description="The index of the item in the turn output.", format="int64"), _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(4294967295).annotate(expected="a value less than or equal to 4294967295")), "content_index": _b.check(_b.check(_b.check(_S.Number.annotate(description="The index of the content part in the message.", format="int64"), _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(4294967295).annotate(expected="a value less than or equal to 4294967295")), "part": _b.suspend(lambda: OutputTextResource).annotate(description="The completed content part.")}).annotate(description="Emitted when an output content part is complete.", identifier="SessionEventAgentSessionTurnContentPartDone")
|
|
140
|
+
AgentContentResource: _S.Bottom[_T.AgentContentResource, _t.Any] = _b.union(OutputTextResource, EncryptedContentResource, mode="one_of").annotate(description="A plaintext or encrypted content part exchanged between agents.", identifier="AgentContentResource")
|
|
141
|
+
MessageContentResource: _S.Bottom[_T.MessageContentResource, _t.Any] = _b.union(MessageContentResourceInputText, MessageContentResourceInputImage, MessageContentResourceOutputText, mode="one_of").annotate(description="A content part in a session message.", identifier="MessageContentResource")
|
|
142
|
+
AssistantMessageItemResource: _StructSchema[_T.AssistantMessageItemResource, _t.Never, _t.Never] = _b.struct(_T.AssistantMessageItemResource, {"type": _b.literal("message").annotate(description="The item type. Always `message`."), "id": _b.check(_S.String.annotate(description="The ID of the message."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "role": _b.literal("assistant").annotate(description="The role of the message author. Always `assistant`."), "status": _b.suspend(lambda: OutputItemStatusResource).annotate(description="The status of the message."), "content": _b.check(_b.check(_b.array(OutputTextResource).annotate(description="The content of the message."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "phase": _b.union(MessagePhaseResource, _S.Null).annotate(description="The phase of the assistant message.")}).annotate(description="An assistant message produced by the agent.", identifier="AssistantMessageItemResource")
|
|
143
|
+
ReasoningItemResource: _StructSchema[_T.ReasoningItemResource, _t.Never, _t.Never] = _b.struct(_T.ReasoningItemResource, {"type": _b.literal("reasoning").annotate(description="The item type. Always `reasoning`."), "id": _b.check(_S.String.annotate(description="The ID of the reasoning item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "summary": _b.check(_b.check(_b.array(SummaryTextResource).annotate(description="The reasoning summaries produced by the agent."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "status": _b.union(OutputItemStatusResource, _S.Null).annotate(description="The status of the reasoning item.")}).annotate(description="A reasoning item produced by the agent.", identifier="ReasoningItemResource")
|
|
144
|
+
SessionEventAgentSessionTurnReasoningSummaryPartAdded: _StructSchema[_T.SessionEventAgentSessionTurnReasoningSummaryPartAdded, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnReasoningSummaryPartAdded, {"type": _b.literal("agent.session.turn.reasoning_summary_part.added").annotate(description="The type of the object. Always `agent.session.turn.reasoning_summary_part.added`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "item_id": _b.check(_S.String.annotate(description="The ID of the reasoning item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "output_index": _b.check(_b.check(_b.check(_S.Number.annotate(description="The index of the item in the turn output.", format="int64"), _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(4294967295).annotate(expected="a value less than or equal to 4294967295")), "summary_index": _b.check(_b.check(_b.check(_S.Number.annotate(description="The index of the summary content part.", format="int64"), _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(4294967295).annotate(expected="a value less than or equal to 4294967295")), "part": _b.suspend(lambda: SummaryTextResource).annotate(description="The initial summary part.")}).annotate(description="Emitted when a reasoning summary content part is added.", identifier="SessionEventAgentSessionTurnReasoningSummaryPartAdded")
|
|
145
|
+
SessionEventAgentSessionTurnReasoningSummaryPartDone: _StructSchema[_T.SessionEventAgentSessionTurnReasoningSummaryPartDone, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnReasoningSummaryPartDone, {"type": _b.literal("agent.session.turn.reasoning_summary_part.done").annotate(description="The type of the object. Always `agent.session.turn.reasoning_summary_part.done`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "item_id": _b.check(_S.String.annotate(description="The ID of the reasoning item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "output_index": _b.check(_b.check(_b.check(_S.Number.annotate(description="The index of the item in the turn output.", format="int64"), _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(4294967295).annotate(expected="a value less than or equal to 4294967295")), "summary_index": _b.check(_b.check(_b.check(_S.Number.annotate(description="The index of the summary part.", format="int64"), _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(4294967295).annotate(expected="a value less than or equal to 4294967295")), "part": _b.suspend(lambda: SummaryTextResource).annotate(description="The completed summary part."), "status": _b.union(_b.literal("incomplete"), _S.Null).annotate(description="Present as `incomplete` when summary generation was interrupted.")}).annotate(description="Emitted when a reasoning summary part is complete.", identifier="SessionEventAgentSessionTurnReasoningSummaryPartDone")
|
|
146
|
+
FunctionCallItemResource: _StructSchema[_T.FunctionCallItemResource, _t.Never, _t.Never] = _b.struct(_T.FunctionCallItemResource, {"type": _b.literal("function_call").annotate(description="The item type. Always `function_call`."), "id": _b.check(_S.String.annotate(description="The ID of the function call item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "call_id": _b.check(_S.String.annotate(description="The ID used to submit the function result."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "name": _b.check(_S.String.annotate(description="The name of the function to call."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "arguments": _S.Json.annotate(expected="JSON value", description="The arguments to pass to the function."), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The status of the function call.")}).annotate(description="A function call produced by the agent.", identifier="FunctionCallItemResource")
|
|
147
|
+
McpCallItemResource: _StructSchema[_T.McpCallItemResource, _t.Never, _t.Never] = _b.struct(_T.McpCallItemResource, {"type": _b.literal("mcp_call").annotate(description="The item type. Always `mcp_call`."), "id": _b.check(_S.String.annotate(description="The ID of the MCP call item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "server_label": _b.check(_S.String.annotate(description="The label of the MCP server."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "name": _b.check(_S.String.annotate(description="The name of the MCP tool."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "arguments": _S.Json.annotate(expected="JSON value", description="The arguments passed to the MCP tool."), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The status of the MCP tool call."), "output": _b.union(_S.Json.annotate(expected="JSON value"), _S.Null).annotate(description="The output returned by the MCP tool, if any."), "error": _b.union(_S.Json.annotate(expected="JSON value"), _S.Null).annotate(description="The error returned by the MCP tool, if any.")}).annotate(description="A call to a tool on an MCP server.", identifier="McpCallItemResource")
|
|
148
|
+
CommandExecutionItemResource: _StructSchema[_T.CommandExecutionItemResource, _t.Never, _t.Never] = _b.struct(_T.CommandExecutionItemResource, {"type": _b.literal("command_execution").annotate(description="The item type. Always `command_execution`."), "id": _b.check(_S.String.annotate(description="The ID of the command execution item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "command": _b.check(_S.String.annotate(description="The command that was executed."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "cwd": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The working directory used to execute the command."), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The status of the command execution."), "output": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The command output, if available."), "exit_code": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The process exit code, if the command completed.", format="int64"), "duration_ms": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The command duration in milliseconds.", format="int64")}).annotate(description="A command execution produced by the agent.", identifier="CommandExecutionItemResource")
|
|
149
|
+
ResumeSubagentCallItemResource: _StructSchema[_T.ResumeSubagentCallItemResource, _t.Never, _t.Never] = _b.struct(_T.ResumeSubagentCallItemResource, {"type": _b.literal("resume_subagent_call").annotate(description="The item type. Always `resume_subagent_call`."), "id": _b.check(_S.String.annotate(description="The ID of the tool call item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The status of the tool call."), "sender_agent_id": _b.check(_S.String.annotate(description="The ID of the agent requesting the resume."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "recipient_agent_id": _b.check(_S.String.annotate(description="The ID of the agent to resume."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A request to resume a subagent.", identifier="ResumeSubagentCallItemResource")
|
|
150
|
+
WaitForSubagentsCallItemResource: _StructSchema[_T.WaitForSubagentsCallItemResource, _t.Never, _t.Never] = _b.struct(_T.WaitForSubagentsCallItemResource, {"type": _b.literal("wait_for_subagents_call").annotate(description="The item type. Always `wait_for_subagents_call`."), "id": _b.check(_S.String.annotate(description="The ID of the tool call item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The status of the tool call."), "sender_agent_id": _b.check(_S.String.annotate(description="The ID of the agent waiting for results."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "recipient_agent_ids": _b.check(_b.check(_b.array(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(description="The IDs of the agents to wait for."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000"))}).annotate(description="A request to wait for one or more subagents.", identifier="WaitForSubagentsCallItemResource")
|
|
151
|
+
InterruptSubagentCallItemResource: _StructSchema[_T.InterruptSubagentCallItemResource, _t.Never, _t.Never] = _b.struct(_T.InterruptSubagentCallItemResource, {"type": _b.literal("interrupt_subagent_call").annotate(description="The item type. Always `interrupt_subagent_call`."), "id": _b.check(_S.String.annotate(description="The ID of the tool call item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The status of the tool call."), "sender_agent_id": _b.check(_S.String.annotate(description="The ID of the agent requesting the interrupt."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "recipient_agent_id": _b.check(_S.String.annotate(description="The ID of the agent to interrupt."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A request to interrupt a subagent's current turn. The subagent remains available.", identifier="InterruptSubagentCallItemResource")
|
|
152
|
+
CloseSubagentCallItemResource: _StructSchema[_T.CloseSubagentCallItemResource, _t.Never, _t.Never] = _b.struct(_T.CloseSubagentCallItemResource, {"type": _b.literal("close_subagent_call").annotate(description="The item type. Always `close_subagent_call`."), "id": _b.check(_S.String.annotate(description="The ID of the tool call item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The status of the tool call."), "sender_agent_id": _b.check(_S.String.annotate(description="The ID of the agent requesting the close."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "recipient_agent_id": _b.check(_S.String.annotate(description="The ID of the agent to close."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A request to close a subagent.", identifier="CloseSubagentCallItemResource")
|
|
153
|
+
InputContentResource: _S.Bottom[_T.InputContentResource, _t.Any] = _b.union(InputContentResourceInputText, InputContentResourceInputImage, mode="one_of").annotate(description="User-provided content recorded in a session item.", identifier="InputContentResource")
|
|
154
|
+
ComputerUseCallItemResource: _StructSchema[_T.ComputerUseCallItemResource, _t.Never, _t.Never] = _b.struct(_T.ComputerUseCallItemResource, {"type": _b.literal("computer_use_call").annotate(description="The item type. Always `computer_use_call`."), "id": _b.check(_S.String.annotate(description="The ID of the activity item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "title": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="A model-generated description of the activity, when available."), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The execution status of the activity."), "output": _b.union(ComputerScreenshotResource, _S.Null).annotate(description="The last screenshot emitted by the model. Null when screenshot inclusion is disabled or the call emitted no screenshot.")}).annotate(description="One execution of the platform-provided computer-use capability.", identifier="ComputerUseCallItemResource")
|
|
155
|
+
BrowserAuthenticationHistoryRequestKindResourceBrowserAuthentication: _StructSchema[_T.BrowserAuthenticationHistoryRequestKindResourceBrowserAuthentication, _t.Never, _t.Never] = _b.struct(_T.BrowserAuthenticationHistoryRequestKindResourceBrowserAuthentication, {"type": _b.literal("browser_authentication").annotate(description="The type of the object. Always `browser_authentication`."), "reason": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="Why the agent needs the user to sign in."), "credential_origin": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The registered form or frame origin where values will be entered."), "fields": _b.check(_b.check(_b.array(BrowserAuthenticationFieldResource).annotate(description="Controls to render. All submitted values are sensitive."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "options": _b.check(_b.check(_b.array(BrowserAuthenticationOptionResource).annotate(description="Sign-in methods. Empty for a plain form."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000"))}).annotate(description="A registered form awaiting the application's response.", identifier="BrowserAuthenticationHistoryRequestKindResourceBrowserAuthentication")
|
|
156
|
+
ComputerUseApprovalRequestKindResourceBrowserAuthentication: _StructSchema[_T.ComputerUseApprovalRequestKindResourceBrowserAuthentication, _t.Never, _t.Never] = _b.struct(_T.ComputerUseApprovalRequestKindResourceBrowserAuthentication, {"type": _b.literal("browser_authentication").annotate(description="The type of the object. Always `browser_authentication`."), "reason": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="Why the agent needs the user to sign in."), "credential_origin": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The registered form or frame origin where values will be entered."), "fields": _b.check(_b.check(_b.array(BrowserAuthenticationFieldResource).annotate(description="Controls to render. All submitted values are sensitive."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "options": _b.check(_b.check(_b.array(BrowserAuthenticationOptionResource).annotate(description="Sign-in methods. Empty for a plain form."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000"))}).annotate(description="A registered form awaiting the application's response.", identifier="ComputerUseApprovalRequestKindResourceBrowserAuthentication")
|
|
157
|
+
ComputerUseApprovalResponseKindResource: _S.Bottom[_T.ComputerUseApprovalResponseKindResource, _t.Any] = _b.union(ComputerUseApprovalResponseKindResourceBrowserAuthenticationSubmitResource, ComputerUseApprovalResponseKindResourceBrowserAuthenticationCancelResource, mode="one_of").annotate(identifier="ComputerUseApprovalResponseKindResource")
|
|
158
|
+
WebSearchActionResource: _S.Bottom[_T.WebSearchActionResource, _t.Any] = _b.union(WebSearchActionResourceSearch, WebSearchActionResourceOpenPage, WebSearchActionResourceFindInPage, WebSearchActionResourceOther, mode="one_of").annotate(description="An action performed by the web search tool.", identifier="WebSearchActionResource")
|
|
159
|
+
SessionTurnErrorResource: _StructSchema[_T.SessionTurnErrorResource, _t.Never, _t.Never] = _b.struct(_T.SessionTurnErrorResource, {"code": _b.suspend(lambda: SessionTurnErrorCodeResource).annotate(description="A stable, machine-readable failure category."), "message": _b.check(_S.String.annotate(description="A customer-safe explanation of the failure."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A customer-safe error describing why a session request failed.", identifier="SessionTurnErrorResource")
|
|
160
|
+
TokenUsageResource: _StructSchema[_T.TokenUsageResource, _t.Never, _t.Never] = _b.struct(_T.TokenUsageResource, {"input_tokens": _b.check(_S.Number.annotate(description="The number of input tokens used by the agent.", format="int64"), _S.is_int().annotate(expected="an integer")), "input_tokens_details": _b.suspend(lambda: InputTokensDetailsResource_2).annotate(description="A breakdown of the agent's input token usage."), "output_tokens": _b.check(_S.Number.annotate(description="The number of output tokens generated by the agent.", format="int64"), _S.is_int().annotate(expected="an integer")), "output_tokens_details": _b.suspend(lambda: OutputTokensDetailsResource_2).annotate(description="A breakdown of the agent's output token usage."), "total_tokens": _b.check(_S.Number.annotate(description="The total number of input and output tokens used by the agent.", format="int64"), _S.is_int().annotate(expected="an integer"))}).annotate(description="Recorded token usage for a session or turn. Usage is best effort and may change.", identifier="TokenUsageResource")
|
|
161
|
+
ReasoningResource: _StructSchema[_T.ReasoningResource, _t.Never, _t.Never] = _b.struct(_T.ReasoningResource, {"effort": _b.union(ReasoningEffortResource, _S.Null).annotate(description="The requested reasoning effort, or `null` when the model selects its own default."), "summary": _b.union(ReasoningSummaryResource, _S.Null).annotate(description="The requested reasoning summary format, or `null` when summaries are disabled.")}).annotate(description="The reasoning configuration used by an agent.", identifier="ReasoningResource")
|
|
162
|
+
TextFormatResource: _S.Bottom[_T.TextFormatResource, _t.Any] = _b.union(TextFormatResourceText, TextFormatResourceJsonSchema, mode="one_of").annotate(description="The effective output format for generated text.", identifier="TextFormatResource")
|
|
163
|
+
PersistedMcpTransportResource: _S.Bottom[_T.PersistedMcpTransportResource, _t.Any] = _b.union(PersistedMcpTransportResourceHttp, PersistedMcpTransportResourceStdio, mode="one_of").annotate(description="A credential-free transport used to connect to an MCP server.", identifier="PersistedMcpTransportResource")
|
|
164
|
+
PersistedAgentToolResourceWebSearch: _StructSchema[_T.PersistedAgentToolResourceWebSearch, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolResourceWebSearch, {"type": _b.literal("web_search").annotate(description="The type of the object. Always `web_search`."), "mode": _b.suspend(lambda: WebSearchModeResource).annotate(description="The source used for web search results."), "context_size": _b.suspend(lambda: WebSearchContextSizeResource).annotate(description="The amount of search context made available to the model. Defaults to `medium`."), "allowed_domains": _b.union(_b.check(_b.check(_b.array(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), _S.Null).annotate(description="Allowed search domains, or `null` when the search is unrestricted."), "location": _b.union(WebSearchLocationResource, _S.Null).annotate(description="Approximate location used to localize search results, if provided.")}).annotate(description="Web search.", identifier="PersistedAgentToolResourceWebSearch")
|
|
165
|
+
AgentToolResourceWebSearch: _StructSchema[_T.AgentToolResourceWebSearch, _t.Never, _t.Never] = _b.struct(_T.AgentToolResourceWebSearch, {"type": _b.literal("web_search").annotate(description="The type of the object. Always `web_search`."), "mode": _b.suspend(lambda: WebSearchModeResource).annotate(description="The source used for web search results."), "context_size": _b.suspend(lambda: WebSearchContextSizeResource).annotate(description="The amount of search context made available to the model. Defaults to `medium`."), "allowed_domains": _b.union(_b.check(_b.check(_b.array(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), _S.Null).annotate(description="Allowed search domains, or `null` when the search is unrestricted."), "location": _b.union(WebSearchLocationResource, _S.Null).annotate(description="Approximate location used to localize search results, if provided.")}).annotate(description="Web search.", identifier="AgentToolResourceWebSearch")
|
|
166
|
+
UpdateSessionReasoningParam: _StructSchema[_T.UpdateSessionReasoningParam, _t.Never, _t.Never] = _b.struct(_T.UpdateSessionReasoningParam, {"effort": _b.union(ReasoningEffortParam, _S.Null).annotate(description="Omit to keep the current effort. Null selects the model's default effort.")}, optional=("effort",)).annotate(description="Reasoning effort for subsequent turns. The reasoning summary stays unchanged.", identifier="UpdateSessionReasoningParam")
|
|
167
|
+
ReasoningParam: _StructSchema[_T.ReasoningParam, _t.Never, _t.Never] = _b.struct(_T.ReasoningParam, {"effort": _b.union(ReasoningEffortParam, _S.Null).annotate(description="The amount of reasoning effort the model should use. Omission lets the model select it."), "summary": _b.union(ReasoningSummaryParam, _S.Null).annotate(description="Controls whether the response includes a reasoning summary.")}, optional=("effort", "summary",)).annotate(description="Reasoning configuration for the agent.", identifier="ReasoningParam")
|
|
168
|
+
TextFormatParam: _S.Bottom[_T.TextFormatParam, _t.Any] = _b.union(TextFormatParamText, TextFormatParamJsonSchema, mode="one_of").annotate(description="The output format for generated text.", identifier="TextFormatParam")
|
|
169
|
+
PersistedMcpTransportConfigParam: _S.Bottom[_T.PersistedMcpTransportConfigParam, _t.Any] = _b.union(PersistedMcpTransportConfigParamHttp, PersistedMcpTransportConfigParamStdio, mode="one_of").annotate(description="A credential-free transport used to connect to an MCP server.", identifier="PersistedMcpTransportConfigParam")
|
|
170
|
+
PersistedAgentToolConfigParamWebSearch: _StructSchema[_T.PersistedAgentToolConfigParamWebSearch, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolConfigParamWebSearch, {"type": _b.literal("web_search").annotate(description="The type of the object. Always `web_search`."), "mode": _b.union(WebSearchModeParam, _S.Null).annotate(description="The source used for web search results. Defaults to `live`."), "context_size": _b.union(WebSearchContextSizeParam, _S.Null).annotate(description="The amount of search context made available to the model. Defaults to `medium`."), "allowed_domains": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="Domains the search may include."), "location": _b.union(WebSearchLocationParam, _S.Null).annotate(description="Approximate location used to localize search results.")}, optional=("mode", "context_size", "allowed_domains", "location",)).annotate(description="Web search.", identifier="PersistedAgentToolConfigParamWebSearch")
|
|
171
|
+
AgentToolConfigParamWebSearch: _StructSchema[_T.AgentToolConfigParamWebSearch, _t.Never, _t.Never] = _b.struct(_T.AgentToolConfigParamWebSearch, {"type": _b.literal("web_search").annotate(description="The type of the object. Always `web_search`."), "mode": _b.union(WebSearchModeParam, _S.Null).annotate(description="The source used for web search results. Defaults to `live`."), "context_size": _b.union(WebSearchContextSizeParam, _S.Null).annotate(description="The amount of search context made available to the model. Defaults to `medium`."), "allowed_domains": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="Domains the search may include."), "location": _b.union(WebSearchLocationParam, _S.Null).annotate(description="Approximate location used to localize search results.")}, optional=("mode", "context_size", "allowed_domains", "location",)).annotate(description="Web search.", identifier="AgentToolConfigParamWebSearch")
|
|
172
|
+
NetworkPolicyResource: _StructSchema[_T.NetworkPolicyResource, _t.Never, _t.Never] = _b.struct(_T.NetworkPolicyResource, {"access": _b.suspend(lambda: NetworkAccessResource).annotate(description="The environment's network access mode."), "allowed_domains": _b.check(_b.check(_b.array(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(description="Domains the environment may access when network access is restricted."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000"))}).annotate(description="Network access for an OpenAI-hosted environment.", identifier="NetworkPolicyResource")
|
|
173
|
+
HostedTemplateSkillResource: _S.Bottom[_T.HostedTemplateSkillResource, _t.Any] = _b.union(HostedTemplateSkillResourceSkillReference, HostedTemplateSkillResourceInline, mode="one_of").annotate(description="Safe metadata for a skill configured by an environment template.", identifier="HostedTemplateSkillResource")
|
|
174
|
+
HostedTemplateFileResource: _S.Bottom[_T.HostedTemplateFileResource, _t.Any] = _b.union(HostedTemplateFileResourceFileId, HostedTemplateFileResourceInline, mode="one_of").annotate(description="Safe metadata for a file configured by an environment template.", identifier="HostedTemplateFileResource")
|
|
175
|
+
McpTransportResource: _S.Bottom[_T.McpTransportResource, _t.Any] = _b.union(McpTransportResourceHttp, McpTransportResourceStdio, mode="one_of").annotate(description="The transport used to connect to an MCP server.", identifier="McpTransportResource")
|
|
176
|
+
McpTransportConfigParam: _S.Bottom[_T.McpTransportConfigParam, _t.Any] = _b.union(McpTransportConfigParamHttp, McpTransportConfigParamStdio, mode="one_of").annotate(description="The transport used to connect to an MCP server.", identifier="McpTransportConfigParam")
|
|
177
|
+
InputContentParam: _S.Bottom[_T.InputContentParam, _t.Any] = _b.union(InputContentParamInputText, InputContentParamInputImage, mode="one_of").annotate(description="Content included in an input message.", identifier="InputContentParam")
|
|
178
|
+
SessionEventError: _StructSchema[_T.SessionEventError, _t.Never, _t.Never] = _b.struct(_T.SessionEventError, {"type": _b.literal("error").annotate(description="The type of the object. Always `error`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "error": _b.suspend(lambda: SessionErrorResource).annotate(description="The error that occurred.")}).annotate(description="Emitted when a turn or session fails.", identifier="SessionEventError")
|
|
179
|
+
SessionEnvironmentStateResource: _StructSchema[_T.SessionEnvironmentStateResource, _t.Never, _t.Never] = _b.struct(_T.SessionEnvironmentStateResource, {"id": _b.check(_S.String.annotate(description="The public ID of the environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "type": _b.check(_S.String.annotate(description="The environment type."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "status": _b.suspend(lambda: SessionEnvironmentStatusResource).annotate(description="The environment's connection status."), "error": _b.union(SessionEnvironmentErrorResource, _S.Null).annotate(description="The error reported while preparing the environment, if any.")}).annotate(description="The current state of a session environment.", identifier="SessionEnvironmentStateResource")
|
|
180
|
+
SessionArtifactListResource: _StructSchema[_T.SessionArtifactListResource, _t.Never, _t.Never] = _b.struct(_T.SessionArtifactListResource, {"object": _b.literal("list").annotate(description="The object type, which is always `list`."), "data": _b.check(_b.check(_b.array(SessionArtifactResource).annotate(description="The resources returned in this page, in the requested sort order."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "first_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the first resource in `data`, or `null` if the page is empty."), "last_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters."), "has_more": _S.Boolean.annotate(description="Whether there are more resources to retrieve after this page.")}).annotate(description="A page of Agents API resources, with IDs for retrieving additional pages.", identifier="SessionArtifactListResource")
|
|
181
|
+
ComputerUseApprovalResponseParamBrowserAuthentication: _S.Bottom[_T.ComputerUseApprovalResponseParamBrowserAuthentication, _t.Any] = _b.union(_b.struct(_T.ComputerUseApprovalResponseParamBrowserAuthentication__0, {"type": _b.literal("browser_authentication"), "action": _b.literal("submit"), "fields": _b.check(_b.check(_b.array(BrowserAuthenticationFieldValueParam).annotate(description="Values for up to six active fields in the required action. The submitted field-value mapping and selected option must fit within 120 KiB of JSON."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(6).annotate(expected="a value with a length of at most 6")), "selected_option": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="The chosen method. Required when the required action contains options.")}, optional=("selected_option",)), _b.struct(_T.ComputerUseApprovalResponseParamBrowserAuthentication__1, {"type": _b.literal("browser_authentication"), "action": _b.literal("cancel")}), mode="one_of").annotate(identifier="ComputerUseApprovalResponseParamBrowserAuthentication")
|
|
182
|
+
ComputerUseApprovalResponseParamBrowserOriginAccessParam: _StructSchema[_T.ComputerUseApprovalResponseParamBrowserOriginAccessParam, _t.Never, _t.Never] = _b.struct(_T.ComputerUseApprovalResponseParamBrowserOriginAccessParam, {"type": _b.literal("browser_origin_access"), "decision": _b.suspend(lambda: BrowserOriginAccessDecisionParam).annotate(description="Whether to allow, deny, or cancel the requested origin access.")}).annotate(identifier="ComputerUseApprovalResponseParamBrowserOriginAccessParam")
|
|
183
|
+
SessionTraceListResource: _StructSchema[_T.SessionTraceListResource, _t.Never, _t.Never] = _b.struct(_T.SessionTraceListResource, {"object": _b.literal("list").annotate(description="The object type, which is always `list`."), "data": _b.check(_b.check(_b.array(SessionTurnTraceResource).annotate(description="The resources returned in this page, in the requested sort order."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "first_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the first resource in `data`, or `null` if the page is empty."), "last_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters."), "has_more": _S.Boolean.annotate(description="Whether there are more resources to retrieve after this page.")}).annotate(description="A page of Agents API resources, with IDs for retrieving additional pages.", identifier="SessionTraceListResource")
|
|
184
|
+
VaultStatusFilterParam: _S.Bottom[_T.VaultStatusFilterParam, _t.Any] = _b.union(VaultStatusParam, _b.check(_b.check(_b.array(VaultStatusParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), mode="one_of").annotate(description="One or more lifecycle statuses to include when listing vaults or credentials.", identifier="VaultStatusFilterParam")
|
|
185
|
+
VaultListResource: _StructSchema[_T.VaultListResource, _t.Never, _t.Never] = _b.struct(_T.VaultListResource, {"object": _b.literal("list").annotate(description="The object type, which is always `list`."), "data": _b.check(_b.check(_b.array(VaultResource).annotate(description="The resources returned in this page, in the requested sort order."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "first_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the first resource in `data`, or `null` if the page is empty."), "last_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters."), "has_more": _S.Boolean.annotate(description="Whether there are more resources to retrieve after this page.")}).annotate(description="A page of Agents API resources, with IDs for retrieving additional pages.", identifier="VaultListResource")
|
|
186
|
+
McpOauthTokenEndpointAuthResource: _S.Bottom[_T.McpOauthTokenEndpointAuthResource, _t.Any] = _b.union(McpOauthTokenEndpointAuthResourceNone, McpOauthTokenEndpointAuthResourceClientSecretBasic, McpOauthTokenEndpointAuthResourceClientSecretPost, mode="one_of").annotate(description="The client authentication method used for OAuth token refresh.", identifier="McpOauthTokenEndpointAuthResource")
|
|
187
|
+
VaultCredentialNetworkingResource: _S.Bottom[_T.VaultCredentialNetworkingResource, _t.Any] = _b.union(VaultCredentialNetworkingResourceUnrestricted, VaultCredentialNetworkingResourceLimited, mode="one_of").annotate(description="Destination permissions for an environment-variable credential. These do not grant network access to the environment.", identifier="VaultCredentialNetworkingResource")
|
|
188
|
+
CreateMcpOauthTokenEndpointAuthParam: _S.Bottom[_T.CreateMcpOauthTokenEndpointAuthParam, _t.Any] = _b.union(CreateMcpOauthTokenEndpointAuthParamNone, CreateMcpOauthTokenEndpointAuthParamClientSecretBasic, CreateMcpOauthTokenEndpointAuthParamClientSecretPost, mode="one_of").annotate(description="Client authentication credentials for OAuth token refresh.", identifier="CreateMcpOauthTokenEndpointAuthParam")
|
|
189
|
+
VaultCredentialNetworkingParam: _S.Bottom[_T.VaultCredentialNetworkingParam, _t.Any] = _b.union(VaultCredentialNetworkingParamUnrestricted, VaultCredentialNetworkingParamLimited, mode="one_of").annotate(description="Destination permissions for an environment-variable credential. These do not grant network access to the environment.", identifier="VaultCredentialNetworkingParam")
|
|
190
|
+
RotateMcpOauthTokenEndpointAuthParam: _S.Bottom[_T.RotateMcpOauthTokenEndpointAuthParam, _t.Any] = _b.union(RotateMcpOauthTokenEndpointAuthParamClientSecretBasic, RotateMcpOauthTokenEndpointAuthParamClientSecretPost, mode="one_of").annotate(description="Client-secret updates that preserve the credential's OAuth authentication method.", identifier="RotateMcpOauthTokenEndpointAuthParam")
|
|
191
|
+
WebhookEndpointListResource: _StructSchema[_T.WebhookEndpointListResource, _t.Never, _t.Never] = _b.struct(_T.WebhookEndpointListResource, {"object": _b.literal("list").annotate(description="The object type, which is always list."), "data": _b.array(WebhookEndpointBody).annotate(description="The webhook endpoints in this page."), "first_id": _b.union(_S.String.annotate(description="The ID of the first endpoint in this page."), _S.Null), "last_id": _b.union(_S.String.annotate(description="The ID of the last endpoint in this page."), _S.Null), "has_more": _S.Boolean.annotate(description="Whether more webhook endpoints are available.")}).annotate(identifier="WebhookEndpointListResource")
|
|
192
|
+
PublicCreateEndpointBody: _StructSchema[_T.PublicCreateEndpointBody, _t.Never, _t.Never] = _b.struct(_T.PublicCreateEndpointBody, {"name": _b.check(_b.check(_S.String.annotate(description="A human-readable name for the webhook endpoint."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points")), "url": _b.check(_b.check(_S.String.annotate(description="The HTTPS URL that receives webhook deliveries."), _S.is_max_code_points(2048).annotate(expected="a string with at most 2048 code points")), _b.js_pattern('^https:\\/\\/', '^https:\\/\\/').annotate(expected="a string matching the RegExp ^https:\\/\\/")), "event_types": _b.check(_b.array(ProjectEventTypeEnum).annotate(description="The event types that trigger deliveries to this endpoint."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(identifier="PublicCreateEndpointBody")
|
|
193
|
+
PublicUpdateEndpointBody: _StructSchema[_T.PublicUpdateEndpointBody, _t.Never, _t.Never] = _b.struct(_T.PublicUpdateEndpointBody, {"name": _b.check(_b.check(_S.String.annotate(description="A new human-readable name for the webhook endpoint."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points")), "url": _b.check(_b.check(_S.String.annotate(description="A new HTTPS URL that receives webhook deliveries."), _S.is_max_code_points(2048).annotate(expected="a string with at most 2048 code points")), _b.js_pattern('^https:\\/\\/', '^https:\\/\\/').annotate(expected="a string matching the RegExp ^https:\\/\\/")), "event_types": _b.check(_b.array(ProjectEventTypeEnum).annotate(description="The complete set of event types that should trigger deliveries."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("name", "url", "event_types",)).annotate(identifier="PublicUpdateEndpointBody")
|
|
194
|
+
PublicTestEndpointBody: _StructSchema[_T.PublicTestEndpointBody, _t.Never, _t.Never] = _b.struct(_T.PublicTestEndpointBody, {"event_type": _b.suspend(lambda: ProjectEventTypeEnum).annotate(description="The event type to send as a sample delivery.")}).annotate(identifier="PublicTestEndpointBody")
|
|
195
|
+
BetaPromptCacheOptions: _StructSchema[_T.BetaPromptCacheOptions, _t.Never, _t.Never] = _b.struct(_T.BetaPromptCacheOptions, {"ttl": _b.suspend(lambda: BetaPromptCacheTTLEnum).annotate(description="The minimum lifetime applied to each cache breakpoint."), "mode": _b.suspend(lambda: BetaPromptCacheModeEnum).annotate(description="Whether implicit prompt-cache breakpoints were enabled."), "comparison_response_id": _b.union(_S.String.annotate(description="The response ID supplied as the prompt cache diagnostics comparison."), _S.Null)}, optional=("comparison_response_id",)).annotate(title="Prompt cache options", description="The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.", identifier="BetaPromptCacheOptions")
|
|
196
|
+
BetaPromptCacheOptionsParam: _StructSchema[_T.BetaPromptCacheOptionsParam, _t.Never, _t.Never] = _b.struct(_T.BetaPromptCacheOptionsParam, {"ttl": _b.suspend(lambda: BetaPromptCacheTTLEnum).annotate(description="The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer."), "mode": _b.suspend(lambda: BetaPromptCacheModeEnum).annotate(description="Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching.")}, optional=("ttl", "mode",)).annotate(title="Prompt cache options", description="Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details.", identifier="BetaPromptCacheOptionsParam")
|
|
197
|
+
BetaModelIdsResponses: _S.Bottom[_T.BetaModelIdsResponses, _t.Any] = _b.union(BetaModelIdsShared, _b.literals(["o1-pro", "o1-pro-2025-03-19", "o3-pro", "o3-pro-2025-06-10", "o3-deep-research", "o3-deep-research-2025-06-26", "o4-mini-deep-research", "o4-mini-deep-research-2025-06-26", "computer-use-preview", "computer-use-preview-2025-03-11", "gpt-5.5-pro", "gpt-5.5-pro-2026-04-23", "gpt-5-codex", "gpt-5-pro", "gpt-5-pro-2025-10-06", "gpt-5.1-codex-max", "gpt-daybreak-blue-latest", "gpt-daybreak-red-latest", "gpt-5.6-cyber", "gpt-rosalind-research"]).annotate(title="ResponsesOnlyModel")).annotate(identifier="BetaModelIdsResponses")
|
|
198
|
+
BetaTextResponseFormatJsonSchema: _StructSchema[_T.BetaTextResponseFormatJsonSchema, _t.Never, _t.Never] = _b.struct(_T.BetaTextResponseFormatJsonSchema, {"type": _b.literal("json_schema").annotate(description="The type of response format being defined. Always `json_schema`."), "description": _S.String.annotate(description="A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"), "name": _S.String.annotate(description="The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"), "schema": BetaResponseFormatJsonSchemaSchema, "strict": _b.union(_S.Boolean.annotate(description="Whether to enable strict schema adherence when generating the output.\nIf set to true, the model will always follow the exact schema defined\nin the `schema` field. Only a subset of JSON Schema is supported when\n`strict` is `true`. To learn more, read the [Structured Outputs\nguide](https://developers.openai.com/api/docs/guides/structured-outputs).\n"), _S.Null)}, optional=("description", "strict",)).annotate(title="JSON schema", description="JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs).\n", identifier="BetaTextResponseFormatJsonSchema")
|
|
199
|
+
BetaFunctionTool: _StructSchema[_T.BetaFunctionTool, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionTool, {"type": _b.literal("function").annotate(description="The type of the function tool. Always `function`."), "name": _S.String.annotate(description="The name of the function to call."), "async": _S.Boolean, "description": _b.union(_S.String.annotate(description="A description of the function. Used by the model to determine whether or not to call the function."), _S.Null), "parameters": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A JSON schema object describing the parameters of the function."), _S.Null), "output_schema": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A JSON schema object describing the JSON value encoded in string outputs for this function."), _S.Null), "strict": _b.union(_S.Boolean.annotate(description="Whether strict parameter validation is enforced for this function tool."), _S.Null), "defer_loading": _S.Boolean.annotate(description="Whether this function is deferred and loaded via tool search."), "allowed_callers": _b.union(_b.array(BetaCallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.Null)}, optional=("async", "description", "output_schema", "defer_loading", "allowed_callers",)).annotate(title="Function", description="Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling).", identifier="BetaFunctionTool")
|
|
200
|
+
BetaApplyPatchToolParam: _StructSchema[_T.BetaApplyPatchToolParam, _t.Never, _t.Never] = _b.struct(_T.BetaApplyPatchToolParam, {"type": _b.literal("apply_patch").annotate(description="The type of the tool. Always `apply_patch`."), "allowed_callers": _b.union(_b.check(_b.array(BetaCallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null)}, optional=("allowed_callers",)).annotate(title="Apply patch tool", description="Allows the assistant to create, delete, or update files using unified diffs.", identifier="BetaApplyPatchToolParam")
|
|
201
|
+
BetaRankingOptions: _StructSchema[_T.BetaRankingOptions, _t.Never, _t.Never] = _b.struct(_T.BetaRankingOptions, {"ranker": _b.suspend(lambda: BetaRankerVersionType).annotate(description="The ranker to use for the file search."), "score_threshold": _b.check(_S.Number.annotate(description="The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results."), _S.is_finite().annotate(expected="a finite number")), "hybrid_search": _b.suspend(lambda: BetaHybridSearchOptions).annotate(description="Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.")}, optional=("ranker", "score_threshold", "hybrid_search",)).annotate(identifier="BetaRankingOptions")
|
|
202
|
+
BetaFilters: _S.Bottom[_T.BetaFilters, _t.Any] = _b.union(BetaComparisonFilter, BetaCompoundFilter).annotate(identifier="BetaFilters")
|
|
203
|
+
BetaComputerUsePreviewTool: _StructSchema[_T.BetaComputerUsePreviewTool, _t.Never, _t.Never] = _b.struct(_T.BetaComputerUsePreviewTool, {"type": _b.literal("computer_use_preview").annotate(description="The type of the computer use tool. Always `computer_use_preview`."), "environment": _b.suspend(lambda: BetaComputerEnvironment).annotate(description="The type of computer environment to control."), "display_width": _b.check(_S.Number.annotate(description="The width of the computer display."), _S.is_int().annotate(expected="an integer")), "display_height": _b.check(_S.Number.annotate(description="The height of the computer display."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Computer use preview", description="A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).", identifier="BetaComputerUsePreviewTool")
|
|
204
|
+
BetaWebSearchTool: _StructSchema[_T.BetaWebSearchTool, _t.Never, _t.Never] = _b.struct(_T.BetaWebSearchTool, {"type": _b.literals(["web_search", "web_search_2025_08_26"]).annotate(description="The type of the web search tool. One of `web_search` or `web_search_2025_08_26`."), "external_web_access": _S.Boolean.annotate(description="Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content."), "filters": _b.union(_b.struct(_T.BetaWebSearchTool__filters__0, {"allowed_domains": _b.union(_b.array(_S.String.annotate(description="Allowed domain for the search.")).annotate(title="Allowed domains for the search.", description="Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well.\n\nExample: `[\"pubmed.ncbi.nlm.nih.gov\"]`\n"), _S.Null)}, optional=("allowed_domains",)).annotate(description="Filters for the search.\n"), _S.Null), "user_location": _b.suspend(lambda: BetaWebSearchApproximateLocation).annotate(description="The approximate location of the user. If omitted or null, defaults to the\nUnited States. To avoid this fallback, pass `{\"type\": \"approximate\"}` without\nlocation fields. To localize results, provide the relevant location fields.\n"), "search_context_size": _b.literals(["low", "medium", "high"]).annotate(description="High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.")}, optional=("external_web_access", "filters", "user_location", "search_context_size",)).annotate(title="Web search", description="Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).\n", identifier="BetaWebSearchTool")
|
|
205
|
+
BetaMCPTool: _StructSchema[_T.BetaMCPTool, _t.Never, _t.Never] = _b.struct(_T.BetaMCPTool, {"type": _b.literal("mcp").annotate(description="The type of the MCP tool. Always `mcp`."), "server_label": _S.String.annotate(description="A label for this MCP server, used to identify it in tool calls.\n"), "server_url": _S.String.annotate(description="The URL for the MCP server. One of `server_url`, `connector_id`, or\n`tunnel_id` must be provided.\n", format="uri"), "connector_id": _b.literals(["connector_dropbox", "connector_gmail", "connector_googlecalendar", "connector_googledrive", "connector_microsoftteams", "connector_outlookcalendar", "connector_outlookemail", "connector_sharepoint"]).annotate(description="Identifier for service connectors, like those available in ChatGPT. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more\nabout service connectors [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).\n\nThis field is deprecated for models released after September 1, 2026.\nUse `server_url` to connect to a remote MCP server, or `tunnel_id` to\nconnect through a Secure MCP Tunnel.\n\nCurrently supported `connector_id` values are:\n\n- Dropbox: `connector_dropbox`\n- Gmail: `connector_gmail`\n- Google Calendar: `connector_googlecalendar`\n- Google Drive: `connector_googledrive`\n- Microsoft Teams: `connector_microsoftteams`\n- Outlook Calendar: `connector_outlookcalendar`\n- Outlook Email: `connector_outlookemail`\n- SharePoint: `connector_sharepoint`\n"), "tunnel_id": _b.check(_S.String.annotate(description="The Secure MCP Tunnel ID to use instead of a direct server URL. One of\n`server_url`, `connector_id`, or `tunnel_id` must be provided.\n"), _b.js_pattern('^tunnel_[a-z0-9]{32}\\Z', '^tunnel_[a-z0-9]{32}$').annotate(expected="a string matching the RegExp ^tunnel_[a-z0-9]{32}$")), "authorization": _S.String.annotate(description="An OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.\n"), "server_description": _S.String.annotate(description="Optional description of the MCP server, used to provide more context.\n"), "headers": _b.union(_b.record(_S.String, _S.String).annotate(description="Optional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.\n"), _S.Null), "allowed_tools": _b.union(_b.union(_b.array(_S.String).annotate(title="MCP allowed tools", description="A string array of allowed tool names"), BetaMCPToolFilter, mode="one_of").annotate(description="List of allowed tool names or a filter object.\n"), _S.Null), "allowed_callers": _b.union(_b.check(_b.array(BetaCallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null), "require_approval": _b.union(_b.union(_b.struct(_T.BetaMCPTool__require_approval__0__0, {"always": BetaMCPToolFilter, "never": BetaMCPToolFilter}, optional=("always", "never",)).annotate(title="MCP tool approval filter", description="Specify which of the MCP server's tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.\n"), _b.literals(["always", "never"]).annotate(title="MCP tool approval setting", description="Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.\n"), mode="one_of").annotate(description="Specify which of the MCP server's tools require approval."), _S.Null), "defer_loading": _S.Boolean.annotate(description="Whether this MCP tool is deferred and discovered via tool search.\n")}, optional=("server_url", "connector_id", "tunnel_id", "authorization", "server_description", "headers", "allowed_tools", "allowed_callers", "require_approval", "defer_loading",)).annotate(title="MCP tool", description="Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).\n", identifier="BetaMCPTool")
|
|
206
|
+
BetaContainerNetworkPolicyAllowlistParam: _StructSchema[_T.BetaContainerNetworkPolicyAllowlistParam, _t.Never, _t.Never] = _b.struct(_T.BetaContainerNetworkPolicyAllowlistParam, {"type": _b.literal("allowlist").annotate(description="Allow outbound network access only to specified domains. Always `allowlist`."), "allowed_domains": _b.check(_b.array(_S.String).annotate(description="A list of allowed domains when type is `allowlist`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "domain_secrets": _b.check(_b.array(BetaContainerNetworkPolicyDomainSecretParam).annotate(description="Optional domain-scoped secrets for allowlisted domains."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}, optional=("domain_secrets",)).annotate(identifier="BetaContainerNetworkPolicyAllowlistParam")
|
|
207
|
+
BetaImageGenTool: _StructSchema[_T.BetaImageGenTool, _t.Never, _t.Never] = _b.struct(_T.BetaImageGenTool, {"type": _b.literal("image_generation").annotate(description="The type of the image generation tool. Always `image_generation`.\n"), "model": _b.union(_S.String, _b.literals(["gpt-image-1", "gpt-image-1-mini", "gpt-image-1.5", "gpt-image-2", "gpt-image-2-2026-04-21", "gpt-image-2.5-sunburst", "gpt-image-2.5-sunburst-2026-09-08", "gpt-image-2.5-flare", "gpt-image-2.5-flare-2026-09-08"]).annotate(description="The image generation model to use. One of `gpt-image-1`,\n`gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,\n`gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,\n`gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,\n`gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:\n`gpt-image-1`.\n")), "quality": _b.literals(["low", "medium", "high", "xhigh", "max", "auto"]).annotate(description="The quality of the generated image. The GPT image models support `low`,\n`medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,\nincluding their `2026-09-08` snapshots, also support `xhigh` and `max`.\nDefault: `auto`.\n"), "size": _b.union(_S.String, _b.literals(["1024x1024", "1024x1536", "1536x1024", "auto"])).annotate(description="The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing."), "output_format": _b.literals(["png", "webp", "jpeg"]).annotate(description="The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.\n"), "output_compression": _b.check(_b.check(_b.check(_S.Number.annotate(description="Compression level for the output image. Default: 100.\n"), _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(100).annotate(expected="a value less than or equal to 100")), "moderation": _b.literals(["auto", "low"]).annotate(description="Moderation level for the generated image. Default: `auto`.\n"), "background": _b.literals(["transparent", "opaque", "auto"]).annotate(description="Set the background of the generated image. One of `transparent`, `opaque`,\nor `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including\ntheir `2026-09-08` snapshots, support `opaque` and `transparent`\nbackgrounds. Transparent backgrounds are available for supported GPT Image\nmodels. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in\npreview. When using `transparent`, set the output format to `png` or `webp`.\nDefault: `auto`.\n"), "input_fidelity": _b.union(BetaInputFidelity, _S.Null), "input_image_mask": _b.struct(_T.BetaImageGenTool__input_image_mask, {"image_url": _S.String.annotate(description="Base64-encoded mask image.\n"), "file_id": _S.String.annotate(description="File ID for the mask image.\n")}, optional=("image_url", "file_id",)).annotate(description="Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).\n"), "partial_images": _b.check(_b.check(_b.check(_S.Number.annotate(description="Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n"), _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(3).annotate(expected="a value less than or equal to 3")), "action": _b.suspend(lambda: BetaImageGenActionEnum).annotate(description="Whether to generate a new image or edit an existing image. Default: `auto`.\n")}, optional=("model", "quality", "size", "output_format", "output_compression", "moderation", "background", "input_fidelity", "input_image_mask", "partial_images", "action",)).annotate(title="Image generation tool", description="A tool that generates images using the GPT image models.\n", identifier="BetaImageGenTool")
|
|
208
|
+
BetaInlineSkillParam: _StructSchema[_T.BetaInlineSkillParam, _t.Never, _t.Never] = _b.struct(_T.BetaInlineSkillParam, {"type": _b.literal("inline").annotate(description="Defines an inline skill for this request."), "name": _S.String.annotate(description="The name of the skill."), "description": _S.String.annotate(description="The description of the skill."), "source": _b.suspend(lambda: BetaInlineSkillSourceParam).annotate(description="Inline skill payload")}).annotate(identifier="BetaInlineSkillParam")
|
|
209
|
+
BetaLocalEnvironmentParam: _StructSchema[_T.BetaLocalEnvironmentParam, _t.Never, _t.Never] = _b.struct(_T.BetaLocalEnvironmentParam, {"type": _b.literal("local").annotate(description="Use a local computer environment."), "skills": _b.check(_b.array(BetaLocalSkillParam).annotate(description="An optional list of skills."), _S.is_max_length(200).annotate(expected="a value with a length of at most 200"))}, optional=("skills",)).annotate(identifier="BetaLocalEnvironmentParam")
|
|
210
|
+
BetaCustomGrammarFormatParam: _StructSchema[_T.BetaCustomGrammarFormatParam, _t.Never, _t.Never] = _b.struct(_T.BetaCustomGrammarFormatParam, {"type": _b.literal("grammar").annotate(description="Grammar format. Always `grammar`."), "syntax": _b.suspend(lambda: BetaGrammarSyntax1).annotate(description="The syntax of the grammar definition. One of `lark` or `regex`."), "definition": _S.String.annotate(description="The grammar definition.")}).annotate(title="Grammar format", description="A grammar defined by the user.", identifier="BetaCustomGrammarFormatParam")
|
|
211
|
+
BetaFunctionToolParam: _StructSchema[_T.BetaFunctionToolParam, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionToolParam, {"name": _b.check(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _b.js_pattern('^[a-zA-Z0-9_-]+\\Z', '^[a-zA-Z0-9_-]+$').annotate(expected="a string matching the RegExp ^[a-zA-Z0-9_-]+$")), "description": _b.union(_S.String, _S.Null), "parameters": _b.union(BetaEmptyModelParam, _S.Null), "strict": _b.union(_S.Boolean.annotate(description="Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise."), _S.Null), "type": _b.literal("function"), "async": _S.Boolean.annotate(description="Whether the tool response can be returned asynchronously versus immediately returned on next response creation."), "output_schema": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs."), _S.Null), "defer_loading": _S.Boolean.annotate(description="Whether this function should be deferred and discovered via tool search."), "allowed_callers": _b.union(_b.check(_b.array(BetaCallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null)}, optional=("description", "parameters", "strict", "async", "output_schema", "defer_loading", "allowed_callers",)).annotate(identifier="BetaFunctionToolParam")
|
|
212
|
+
BetaToolSearchOutputFunctionToolParam: _StructSchema[_T.BetaToolSearchOutputFunctionToolParam, _t.Never, _t.Never] = _b.struct(_T.BetaToolSearchOutputFunctionToolParam, {"name": _b.check(_b.check(_b.check(_S.String.annotate(description="The name of the loaded function tool."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _b.js_pattern('^(?![\\s\\S]*[\\r\\n])[a-zA-Z0-9_.-]+\\Z', '^(?![\\s\\S]*[\\r\\n])[a-zA-Z0-9_.-]+$').annotate(expected="a string matching the RegExp ^(?![\\s\\S]*[\\r\\n])[a-zA-Z0-9_.-]+$")), "description": _b.union(_S.String, _S.Null), "parameters": _b.union(BetaEmptyModelParam, _S.Null), "strict": _b.union(_S.Boolean.annotate(description="Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise."), _S.Null), "type": _b.literal("function"), "async": _S.Boolean.annotate(description="Whether the tool response can be returned asynchronously versus immediately returned on next response creation."), "output_schema": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs."), _S.Null), "defer_loading": _S.Boolean.annotate(description="Whether this function should be deferred and discovered via tool search."), "allowed_callers": _b.union(_b.check(_b.array(BetaCallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null)}, optional=("description", "parameters", "strict", "async", "output_schema", "defer_loading", "allowed_callers",)).annotate(identifier="BetaToolSearchOutputFunctionToolParam")
|
|
213
|
+
BetaToolSearchToolParam: _StructSchema[_T.BetaToolSearchToolParam, _t.Never, _t.Never] = _b.struct(_T.BetaToolSearchToolParam, {"type": _b.literal("tool_search").annotate(description="The type of the tool. Always `tool_search`."), "execution": _b.suspend(lambda: BetaToolSearchExecutionType).annotate(description="Whether tool search is executed by the server or by the client."), "description": _b.union(_S.String.annotate(description="Description shown to the model for a client-executed tool search tool."), _S.Null), "parameters": _b.union(_b.suspend(lambda: BetaEmptyModelParam).annotate(description="Parameter schema for a client-executed tool search tool."), _S.Null)}, optional=("execution", "description", "parameters",)).annotate(title="Tool search tool", description="Hosted or BYOT tool search configuration for deferred tools.", identifier="BetaToolSearchToolParam")
|
|
214
|
+
BetaWebSearchPreviewTool: _StructSchema[_T.BetaWebSearchPreviewTool, _t.Never, _t.Never] = _b.struct(_T.BetaWebSearchPreviewTool, {"type": _b.literals(["web_search_preview", "web_search_preview_2025_03_11"]).annotate(description="The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`."), "user_location": _b.union(_b.suspend(lambda: BetaApproximateLocation).annotate(description="The approximate location of the user. If omitted or null, defaults to the United States. To avoid this fallback, pass `{\"type\": \"approximate\"}` without location fields. To localize results, provide the relevant location fields."), _S.Null), "search_context_size": _b.suspend(lambda: BetaSearchContextSize).annotate(description="High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."), "search_content_types": _b.array(BetaSearchContentType)}, optional=("user_location", "search_context_size", "search_content_types",)).annotate(title="Web search preview", description="This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).", identifier="BetaWebSearchPreviewTool")
|
|
215
|
+
BetaToolChoiceParam: _S.Bottom[_T.BetaToolChoiceParam, _t.Any] = _b.union(BetaToolChoiceOptions, BetaToolChoiceAllowed, BetaToolChoiceTypes, BetaToolChoiceFunction, BetaToolChoiceMCP, BetaToolChoiceCustom, BetaSpecificProgrammaticToolCallingParam, BetaSpecificApplyPatchParam, BetaSpecificFunctionShellParam, mode="one_of").annotate(description="How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n", identifier="BetaToolChoiceParam")
|
|
216
|
+
BetaInputTextContent: _StructSchema[_T.BetaInputTextContent, _t.Never, _t.Never] = _b.struct(_T.BetaInputTextContent, {"type": _b.literal("input_text").annotate(description="The type of the input item. Always `input_text`."), "text": _S.String.annotate(description="The text input to the model."), "prompt_cache_breakpoint": BetaPromptCacheBreakpointConfig}, optional=("prompt_cache_breakpoint",)).annotate(title="Input text", description="A text input to the model.", identifier="BetaInputTextContent")
|
|
217
|
+
BetaInputImageContent: _StructSchema[_T.BetaInputImageContent, _t.Never, _t.Never] = _b.struct(_T.BetaInputImageContent, {"type": _b.literal("input_image").annotate(description="The type of the input item. Always `input_image`."), "image_url": _b.union(_S.String.annotate(description="The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.", format="uri"), _S.Null), "file_id": _b.union(_S.String.annotate(description="The ID of the file to be sent to the model."), _S.Null), "detail": _b.suspend(lambda: BetaImageDetail).annotate(description="The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`."), "prompt_cache_breakpoint": BetaPromptCacheBreakpointConfig}, optional=("image_url", "file_id", "prompt_cache_breakpoint",)).annotate(title="Input image", description="An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision).", identifier="BetaInputImageContent")
|
|
218
|
+
BetaComputerScreenshotContent: _StructSchema[_T.BetaComputerScreenshotContent, _t.Never, _t.Never] = _b.struct(_T.BetaComputerScreenshotContent, {"type": _b.literal("computer_screenshot").annotate(description="Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`."), "image_url": _b.union(_S.String.annotate(description="The URL of the screenshot image.", format="uri"), _S.Null), "file_id": _b.union(_S.String.annotate(description="The identifier of an uploaded file that contains the screenshot."), _S.Null), "detail": _b.suspend(lambda: BetaImageDetail).annotate(description="The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`."), "prompt_cache_breakpoint": BetaPromptCacheBreakpointConfig}, optional=("prompt_cache_breakpoint",)).annotate(title="Computer screenshot", description="A screenshot of a computer.", identifier="BetaComputerScreenshotContent")
|
|
219
|
+
BetaInputFileContent: _StructSchema[_T.BetaInputFileContent, _t.Never, _t.Never] = _b.struct(_T.BetaInputFileContent, {"type": _b.literal("input_file").annotate(description="The type of the input item. Always `input_file`."), "file_id": _b.union(_S.String.annotate(description="The ID of the file to be sent to the model."), _S.Null), "filename": _S.String.annotate(description="The name of the file to be sent to the model."), "file_data": _S.String.annotate(description="The content of the file to be sent to the model.\n"), "prompt_cache_breakpoint": BetaPromptCacheBreakpointConfig, "file_url": _S.String.annotate(description="The URL of the file to be sent to the model.", format="uri"), "detail": _b.suspend(lambda: BetaFileInputDetail).annotate(description="The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.")}, optional=("file_id", "filename", "file_data", "prompt_cache_breakpoint", "file_url", "detail",)).annotate(title="Input file", description="A file input to the model.", identifier="BetaInputFileContent")
|
|
220
|
+
BetaAccessProgramsParam: _StructSchema[_T.BetaAccessProgramsParam, _t.Never, _t.Never] = _b.struct(_T.BetaAccessProgramsParam, {"cyber": _b.suspend(lambda: BetaCyberAccessProgramEnum).annotate(description="The Cyber access program to use for this request. Supported values are `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves the program from the model's Cyber tier and your organization and project access, subject to model-specific eligibility restrictions. By default, models without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when authorized; otherwise they fall back to Standard unless the model requires Daybreak access. Red-tier models use Daybreak Red and require authorization. Requests that require unavailable Daybreak access return 403. An implicit Standard fallback is represented by null in the response's access_programs field, rather than an explicit Standard selection.")}, optional=("cyber",)).annotate(description="Domain-specific access programs to use for this request.", identifier="BetaAccessProgramsParam")
|
|
221
|
+
BetaAccessProgramsBody: _StructSchema[_T.BetaAccessProgramsBody, _t.Never, _t.Never] = _b.struct(_T.BetaAccessProgramsBody, {"cyber": _b.suspend(lambda: BetaCyberAccessProgramEnum).annotate(description="The effective Cyber access program used for this response.")}).annotate(identifier="BetaAccessProgramsBody")
|
|
222
|
+
BetaReasoning: _StructSchema[_T.BetaReasoning, _t.Never, _t.Never] = _b.struct(_T.BetaReasoning, {"mode": _b.suspend(lambda: BetaReasoningModeEnum).annotate(description="Controls the reasoning execution mode for the request.\n\nWhen returned on a response, this is the effective execution mode.\n"), "effort": BetaReasoningEffort, "summary": _b.union(_b.literals(["auto", "concise", "detailed"]).annotate(description="A summary of the reasoning performed by the model. This can be\nuseful for debugging and understanding the model's reasoning process.\nOne of `auto`, `concise`, or `detailed`.\n\n`concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.\n"), _S.Null), "context": _b.union(_b.literals(["auto", "current_turn", "all_turns"]).annotate(description="Controls which reasoning items are rendered back to the model on later turns.\nIf omitted or set to `auto`, the model determines the context mode. The\n`gpt-5.6` model family defaults to `all_turns`; earlier models default to\n`current_turn`.\n\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n"), _S.Null), "generate_summary": _b.union(_b.literals(["auto", "concise", "detailed"]).annotate(description="**Deprecated:** use `summary` instead.\n\nA summary of the reasoning performed by the model. This can be\nuseful for debugging and understanding the model's reasoning process.\nOne of `auto`, `concise`, or `detailed`.\n"), _S.Null)}, optional=("mode", "effort", "summary", "context", "generate_summary",)).annotate(title="Reasoning", description="Configuration options for\n[reasoning models](https://developers.openai.com/api/docs/guides/reasoning).\n", identifier="BetaReasoning")
|
|
223
|
+
BetaProgram: _StructSchema[_T.BetaProgram, _t.Never, _t.Never] = _b.struct(_T.BetaProgram, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("program").annotate(description="The type of the item. Always `program`."), "id": _S.String.annotate(description="The unique ID of the program item."), "call_id": _S.String.annotate(description="The stable call ID of the program item."), "code": _S.String.annotate(description="The JavaScript source executed by programmatic tool calling."), "fingerprint": _S.String.annotate(description="Opaque program replay fingerprint that must be round-tripped.")}, optional=("agent",)).annotate(identifier="BetaProgram")
|
|
224
|
+
BetaCompactionBody: _StructSchema[_T.BetaCompactionBody, _t.Never, _t.Never] = _b.struct(_T.BetaCompactionBody, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("compaction").annotate(description="The type of the item. Always `compaction`."), "id": _S.String.annotate(description="The unique ID of the compaction item."), "encrypted_content": _S.String.annotate(description="The encrypted content that was produced by compaction."), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.")}, optional=("agent", "created_by",)).annotate(title="Compaction item", description="A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact).", identifier="BetaCompactionBody")
|
|
225
|
+
BetaLocalShellToolCallOutput: _StructSchema[_T.BetaLocalShellToolCallOutput, _t.Never, _t.Never] = _b.struct(_T.BetaLocalShellToolCallOutput, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("local_shell_call_output").annotate(description="The type of the local shell tool call output. Always `local_shell_call_output`.\n"), "id": _S.String.annotate(description="The unique ID of the local shell tool call generated by the model.\n"), "output": _S.String.annotate(description="A JSON string of the output of the local shell tool call.\n"), "status": _b.union(_b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n"), _S.Null), "call_id": _S.Json.annotate(expected="JSON value")}, optional=("agent", "status",)).annotate(title="Local shell call output", description="The output of a local shell tool call.\n", identifier="BetaLocalShellToolCallOutput")
|
|
226
|
+
BetaMCPApprovalRequest: _StructSchema[_T.BetaMCPApprovalRequest, _t.Never, _t.Never] = _b.struct(_T.BetaMCPApprovalRequest, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("mcp_approval_request").annotate(description="The type of the item. Always `mcp_approval_request`.\n"), "id": _S.String.annotate(description="The unique ID of the approval request.\n"), "server_label": _S.String.annotate(description="The label of the MCP server making the request.\n"), "name": _S.String.annotate(description="The name of the tool to run.\n"), "arguments": _S.String.annotate(description="A JSON string of arguments for the tool.\n")}, optional=("agent",)).annotate(title="MCP approval request", description="A request for human approval of a tool invocation.\n", identifier="BetaMCPApprovalRequest")
|
|
227
|
+
BetaMCPApprovalResponseResource: _StructSchema[_T.BetaMCPApprovalResponseResource, _t.Never, _t.Never] = _b.struct(_T.BetaMCPApprovalResponseResource, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("mcp_approval_response").annotate(description="The type of the item. Always `mcp_approval_response`.\n"), "id": _S.String.annotate(description="The unique ID of the approval response\n"), "approval_request_id": _S.String.annotate(description="The ID of the approval request being answered.\n"), "approve": _S.Boolean.annotate(description="Whether the request was approved.\n"), "reason": _b.union(_S.String.annotate(description="Optional reason for the decision.\n"), _S.Null), "request_id": _S.Json.annotate(expected="JSON value")}, optional=("agent", "reason",)).annotate(title="MCP approval response", description="A response to an MCP approval request.\n", identifier="BetaMCPApprovalResponseResource")
|
|
228
|
+
BetaResponseAudioDeltaEvent: _StructSchema[_T.BetaResponseAudioDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseAudioDeltaEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.audio.delta").annotate(description="The type of the event. Always `response.audio.delta`.\n"), "sequence_number": _b.check(_S.Number.annotate(description="A sequence number for this chunk of the stream response.\n"), _S.is_int().annotate(expected="an integer")), "delta": _S.String.annotate(description="A chunk of Base64 encoded response audio bytes.\n")}, optional=("agent",)).annotate(description="Emitted when there is a partial audio response.", identifier="BetaResponseAudioDeltaEvent")
|
|
229
|
+
BetaResponseAudioDoneEvent: _StructSchema[_T.BetaResponseAudioDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseAudioDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.audio.done").annotate(description="The type of the event. Always `response.audio.done`.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the delta.\n"), _S.is_int().annotate(expected="an integer")), "response_id": _S.Json.annotate(expected="JSON value")}, optional=("agent",)).annotate(description="Emitted when the audio response is complete.", identifier="BetaResponseAudioDoneEvent")
|
|
230
|
+
BetaResponseAudioTranscriptDeltaEvent: _StructSchema[_T.BetaResponseAudioTranscriptDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseAudioTranscriptDeltaEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.audio.transcript.delta").annotate(description="The type of the event. Always `response.audio.transcript.delta`.\n"), "delta": _S.String.annotate(description="The partial transcript of the audio response.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "response_id": _S.Json.annotate(expected="JSON value")}, optional=("agent",)).annotate(description="Emitted when there is a partial transcript of audio.", identifier="BetaResponseAudioTranscriptDeltaEvent")
|
|
231
|
+
BetaResponseAudioTranscriptDoneEvent: _StructSchema[_T.BetaResponseAudioTranscriptDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseAudioTranscriptDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.audio.transcript.done").annotate(description="The type of the event. Always `response.audio.transcript.done`.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "response_id": _S.Json.annotate(expected="JSON value")}, optional=("agent",)).annotate(description="Emitted when the full audio transcript is completed.", identifier="BetaResponseAudioTranscriptDoneEvent")
|
|
232
|
+
BetaResponseCodeInterpreterCallCodeDeltaEvent: _StructSchema[_T.BetaResponseCodeInterpreterCallCodeDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseCodeInterpreterCallCodeDeltaEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.code_interpreter_call_code.delta").annotate(description="The type of the event. Always `response.code_interpreter_call_code.delta`."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response for which the code is being streamed."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the code interpreter tool call item."), "delta": _S.String.annotate(description="The partial code snippet being streamed by the code interpreter."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event, used to order streaming events."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a partial code snippet is streamed by the code interpreter.", identifier="BetaResponseCodeInterpreterCallCodeDeltaEvent")
|
|
233
|
+
BetaResponseCodeInterpreterCallCodeDoneEvent: _StructSchema[_T.BetaResponseCodeInterpreterCallCodeDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseCodeInterpreterCallCodeDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.code_interpreter_call_code.done").annotate(description="The type of the event. Always `response.code_interpreter_call_code.done`."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response for which the code is finalized."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the code interpreter tool call item."), "code": _S.String.annotate(description="The final code snippet output by the code interpreter."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event, used to order streaming events."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when the code snippet is finalized by the code interpreter.", identifier="BetaResponseCodeInterpreterCallCodeDoneEvent")
|
|
234
|
+
BetaResponseCodeInterpreterCallCompletedEvent: _StructSchema[_T.BetaResponseCodeInterpreterCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseCodeInterpreterCallCompletedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.code_interpreter_call.completed").annotate(description="The type of the event. Always `response.code_interpreter_call.completed`."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response for which the code interpreter call is completed."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the code interpreter tool call item."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event, used to order streaming events."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when the code interpreter call is completed.", identifier="BetaResponseCodeInterpreterCallCompletedEvent")
|
|
235
|
+
BetaResponseCodeInterpreterCallInProgressEvent: _StructSchema[_T.BetaResponseCodeInterpreterCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseCodeInterpreterCallInProgressEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.code_interpreter_call.in_progress").annotate(description="The type of the event. Always `response.code_interpreter_call.in_progress`."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response for which the code interpreter call is in progress."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the code interpreter tool call item."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event, used to order streaming events."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a code interpreter call is in progress.", identifier="BetaResponseCodeInterpreterCallInProgressEvent")
|
|
236
|
+
BetaResponseCodeInterpreterCallInterpretingEvent: _StructSchema[_T.BetaResponseCodeInterpreterCallInterpretingEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseCodeInterpreterCallInterpretingEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.code_interpreter_call.interpreting").annotate(description="The type of the event. Always `response.code_interpreter_call.interpreting`."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response for which the code interpreter is interpreting code."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the code interpreter tool call item."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event, used to order streaming events."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when the code interpreter is actively interpreting the code snippet.", identifier="BetaResponseCodeInterpreterCallInterpretingEvent")
|
|
237
|
+
BetaResponseCompactionCompactingStreamingEvent: _StructSchema[_T.BetaResponseCompactionCompactingStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseCompactionCompactingStreamingEvent, {"type": _b.literal("response.compaction.compacting").annotate(description="The type of the event, always `response.compaction.compacting`."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the event that was emitted."), _S.is_int().annotate(expected="an integer")), "agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that owns this multi-agent streaming event."), "output_index": _b.check(_S.Number.annotate(description="The index of the compaction output item."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The ID of the compaction output item.")}, optional=("agent",)).annotate(title="Response compaction compacting event", description="Emitted when new summary content is sampled for a compaction trigger. Contains no summary content.", identifier="BetaResponseCompactionCompactingStreamingEvent")
|
|
238
|
+
BetaResponseErrorEvent: _StructSchema[_T.BetaResponseErrorEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseErrorEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("error").annotate(description="The type of the event. Always `error`.\n"), "code": _b.union(_S.String.annotate(description="The error code.\n"), _S.Null), "message": _S.String.annotate(description="The error message.\n"), "param": _b.union(_S.String.annotate(description="The error parameter.\n"), _S.Null), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when an error occurs.", identifier="BetaResponseErrorEvent")
|
|
239
|
+
BetaResponseFileSearchCallCompletedEvent: _StructSchema[_T.BetaResponseFileSearchCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseFileSearchCallCompletedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.file_search_call.completed").annotate(description="The type of the event. Always `response.file_search_call.completed`.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the file search call is initiated.\n"), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The ID of the output item that the file search call is initiated.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a file search call is completed (results found).", identifier="BetaResponseFileSearchCallCompletedEvent")
|
|
240
|
+
BetaResponseFileSearchCallInProgressEvent: _StructSchema[_T.BetaResponseFileSearchCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseFileSearchCallInProgressEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.file_search_call.in_progress").annotate(description="The type of the event. Always `response.file_search_call.in_progress`.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the file search call is initiated.\n"), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The ID of the output item that the file search call is initiated.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a file search call is initiated.", identifier="BetaResponseFileSearchCallInProgressEvent")
|
|
241
|
+
BetaResponseFileSearchCallSearchingEvent: _StructSchema[_T.BetaResponseFileSearchCallSearchingEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseFileSearchCallSearchingEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.file_search_call.searching").annotate(description="The type of the event. Always `response.file_search_call.searching`.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the file search call is searching.\n"), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The ID of the output item that the file search call is initiated.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a file search is currently searching.", identifier="BetaResponseFileSearchCallSearchingEvent")
|
|
242
|
+
BetaResponseFunctionCallArgumentsDeltaEvent: _StructSchema[_T.BetaResponseFunctionCallArgumentsDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseFunctionCallArgumentsDeltaEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.function_call_arguments.delta").annotate(description="The type of the event. Always `response.function_call_arguments.delta`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the function-call arguments delta is added to.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the function-call arguments delta is added to.\n"), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "delta": _S.String.annotate(description="The function-call arguments delta that is added.\n")}, optional=("agent",)).annotate(description="Emitted when there is a partial function-call arguments delta.", identifier="BetaResponseFunctionCallArgumentsDeltaEvent")
|
|
243
|
+
BetaResponseFunctionCallArgumentsDoneEvent: _StructSchema[_T.BetaResponseFunctionCallArgumentsDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseFunctionCallArgumentsDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.function_call_arguments.done"), "item_id": _S.String.annotate(description="The ID of the item."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item."), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "arguments": _S.String.annotate(description="The function-call arguments.")}, optional=("agent",)).annotate(description="Emitted when function-call arguments are finalized.", identifier="BetaResponseFunctionCallArgumentsDoneEvent")
|
|
244
|
+
BetaResponseShellCallCommandAddedStreamingEvent: _StructSchema[_T.BetaResponseShellCallCommandAddedStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseShellCallCommandAddedStreamingEvent, {"type": _b.literal("response.shell_call_command.added").annotate(description="The type of the event, always `response.shell_call_command.added`."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the event that was emitted."), _S.is_int().annotate(expected="an integer")), "agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that owns this multi-agent streaming event."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was updated."), _S.is_int().annotate(expected="an integer")), "command_index": _b.check(_S.Number.annotate(description="The index of the shell command that was added."), _S.is_int().annotate(expected="an integer")), "command": _S.String.annotate(description="The shell command that was added.")}, optional=("agent",)).annotate(title="Response shell command added event", description="A streaming event that indicated a shell command was added to a tool call.", identifier="BetaResponseShellCallCommandAddedStreamingEvent")
|
|
245
|
+
BetaResponseShellCallCommandDeltaStreamingEvent: _StructSchema[_T.BetaResponseShellCallCommandDeltaStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseShellCallCommandDeltaStreamingEvent, {"type": _b.literal("response.shell_call_command.delta").annotate(description="The type of the event, always `response.shell_call_command.delta`."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the event that was emitted."), _S.is_int().annotate(expected="an integer")), "agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that owns this multi-agent streaming event."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was updated."), _S.is_int().annotate(expected="an integer")), "command_index": _b.check(_S.Number.annotate(description="The index of the shell command that was updated."), _S.is_int().annotate(expected="an integer")), "delta": _S.String.annotate(description="The shell command delta that was appended."), "obfuscation": _S.String.annotate(description="An obfuscation string that was added to pad the event payload.")}, optional=("agent", "obfuscation",)).annotate(title="Response shell command delta event", description="A streaming event that indicated a shell command was incrementally updated.", identifier="BetaResponseShellCallCommandDeltaStreamingEvent")
|
|
246
|
+
BetaResponseShellCallCommandDoneStreamingEvent: _StructSchema[_T.BetaResponseShellCallCommandDoneStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseShellCallCommandDoneStreamingEvent, {"type": _b.literal("response.shell_call_command.done").annotate(description="The type of the event, always `response.shell_call_command.done`."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the event that was emitted."), _S.is_int().annotate(expected="an integer")), "agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that owns this multi-agent streaming event."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was updated."), _S.is_int().annotate(expected="an integer")), "command_index": _b.check(_S.Number.annotate(description="The index of the shell command that was completed."), _S.is_int().annotate(expected="an integer")), "command": _S.String.annotate(description="The final shell command that was emitted.")}, optional=("agent",)).annotate(title="Response shell command done event", description="A streaming event that indicated a shell command was completed.", identifier="BetaResponseShellCallCommandDoneStreamingEvent")
|
|
247
|
+
BetaResponseReasoningSummaryPartAddedEvent: _StructSchema[_T.BetaResponseReasoningSummaryPartAddedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseReasoningSummaryPartAddedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.reasoning_summary_part.added").annotate(description="The type of the event. Always `response.reasoning_summary_part.added`.\n"), "item_id": _S.String.annotate(description="The ID of the item this summary part is associated with.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item this summary part is associated with.\n"), _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number.annotate(description="The index of the summary part within the reasoning summary.\n"), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer")), "part": _b.struct(_T.BetaResponseReasoningSummaryPartAddedEvent__part, {"type": _b.literal("summary_text").annotate(description="The type of the summary part. Always `summary_text`."), "text": _S.String.annotate(description="The text of the summary part.")}).annotate(description="The summary part that was added.\n")}, optional=("agent",)).annotate(description="Emitted when a new reasoning summary part is added.", identifier="BetaResponseReasoningSummaryPartAddedEvent")
|
|
248
|
+
BetaResponseReasoningSummaryPartDoneEvent: _StructSchema[_T.BetaResponseReasoningSummaryPartDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseReasoningSummaryPartDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.reasoning_summary_part.done").annotate(description="The type of the event. Always `response.reasoning_summary_part.done`.\n"), "item_id": _S.String.annotate(description="The ID of the item this summary part is associated with.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item this summary part is associated with.\n"), _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number.annotate(description="The index of the summary part within the reasoning summary.\n"), _S.is_int().annotate(expected="an integer")), "status": _b.literal("incomplete").annotate(description="The completion status of the summary part. Omitted when the part completed\nnormally and set to `incomplete` when generation was interrupted.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer")), "part": _b.struct(_T.BetaResponseReasoningSummaryPartDoneEvent__part, {"type": _b.literal("summary_text").annotate(description="The type of the summary part. Always `summary_text`."), "text": _S.String.annotate(description="The text of the summary part.")}).annotate(description="The completed summary part.\n")}, optional=("agent", "status",)).annotate(description="Emitted when a reasoning summary part is completed.", identifier="BetaResponseReasoningSummaryPartDoneEvent")
|
|
249
|
+
BetaResponseReasoningSummaryTextDeltaEvent: _StructSchema[_T.BetaResponseReasoningSummaryTextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseReasoningSummaryTextDeltaEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.reasoning_summary_text.delta").annotate(description="The type of the event. Always `response.reasoning_summary_text.delta`.\n"), "item_id": _S.String.annotate(description="The ID of the item this summary text delta is associated with.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item this summary text delta is associated with.\n"), _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number.annotate(description="The index of the summary part within the reasoning summary.\n"), _S.is_int().annotate(expected="an integer")), "delta": _S.String.annotate(description="The text delta that was added to the summary.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a delta is added to a reasoning summary text.", identifier="BetaResponseReasoningSummaryTextDeltaEvent")
|
|
250
|
+
BetaResponseReasoningSummaryTextDoneEvent: _StructSchema[_T.BetaResponseReasoningSummaryTextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseReasoningSummaryTextDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.reasoning_summary_text.done").annotate(description="The type of the event. Always `response.reasoning_summary_text.done`.\n"), "item_id": _S.String.annotate(description="The ID of the item this summary text is associated with.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item this summary text is associated with.\n"), _S.is_int().annotate(expected="an integer")), "summary_index": _b.check(_S.Number.annotate(description="The index of the summary part within the reasoning summary.\n"), _S.is_int().annotate(expected="an integer")), "text": _S.String.annotate(description="The full text of the completed reasoning summary.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a reasoning summary text is completed.", identifier="BetaResponseReasoningSummaryTextDoneEvent")
|
|
251
|
+
BetaResponseReasoningTextDeltaEvent: _StructSchema[_T.BetaResponseReasoningTextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseReasoningTextDeltaEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.reasoning_text.delta").annotate(description="The type of the event. Always `response.reasoning_text.delta`.\n"), "item_id": _S.String.annotate(description="The ID of the item this reasoning text delta is associated with.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item this reasoning text delta is associated with.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the reasoning content part this delta is associated with.\n"), _S.is_int().annotate(expected="an integer")), "delta": _S.String.annotate(description="The text delta that was added to the reasoning content.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a delta is added to a reasoning text.", identifier="BetaResponseReasoningTextDeltaEvent")
|
|
252
|
+
BetaResponseReasoningTextDoneEvent: _StructSchema[_T.BetaResponseReasoningTextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseReasoningTextDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.reasoning_text.done").annotate(description="The type of the event. Always `response.reasoning_text.done`.\n"), "item_id": _S.String.annotate(description="The ID of the item this reasoning text is associated with.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item this reasoning text is associated with.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the reasoning content part.\n"), _S.is_int().annotate(expected="an integer")), "text": _S.String.annotate(description="The full text of the completed reasoning content.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a reasoning text is completed.", identifier="BetaResponseReasoningTextDoneEvent")
|
|
253
|
+
BetaResponseRefusalDeltaEvent: _StructSchema[_T.BetaResponseRefusalDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseRefusalDeltaEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.refusal.delta").annotate(description="The type of the event. Always `response.refusal.delta`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the refusal text is added to.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the refusal text is added to.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part that the refusal text is added to.\n"), _S.is_int().annotate(expected="an integer")), "delta": _S.String.annotate(description="The refusal text that is added.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when there is a partial refusal text.", identifier="BetaResponseRefusalDeltaEvent")
|
|
254
|
+
BetaResponseRefusalDoneEvent: _StructSchema[_T.BetaResponseRefusalDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseRefusalDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.refusal.done").annotate(description="The type of the event. Always `response.refusal.done`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the refusal text is finalized.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the refusal text is finalized.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part that the refusal text is finalized.\n"), _S.is_int().annotate(expected="an integer")), "refusal": _S.String.annotate(description="The refusal text that is finalized.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when refusal text is finalized.", identifier="BetaResponseRefusalDoneEvent")
|
|
255
|
+
BetaResponseWebSearchCallCompletedEvent: _StructSchema[_T.BetaResponseWebSearchCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseWebSearchCallCompletedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.web_search_call.completed").annotate(description="The type of the event. Always `response.web_search_call.completed`.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the web search call is associated with.\n"), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="Unique ID for the output item associated with the web search call.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the web search call being processed."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a web search call is completed.", identifier="BetaResponseWebSearchCallCompletedEvent")
|
|
256
|
+
BetaResponseWebSearchCallInProgressEvent: _StructSchema[_T.BetaResponseWebSearchCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseWebSearchCallInProgressEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.web_search_call.in_progress").annotate(description="The type of the event. Always `response.web_search_call.in_progress`.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the web search call is associated with.\n"), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="Unique ID for the output item associated with the web search call.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the web search call being processed."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a web search call is initiated.", identifier="BetaResponseWebSearchCallInProgressEvent")
|
|
257
|
+
BetaResponseWebSearchCallSearchingEvent: _StructSchema[_T.BetaResponseWebSearchCallSearchingEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseWebSearchCallSearchingEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.web_search_call.searching").annotate(description="The type of the event. Always `response.web_search_call.searching`.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the web search call is associated with.\n"), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="Unique ID for the output item associated with the web search call.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the web search call being processed."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a web search call is executing.", identifier="BetaResponseWebSearchCallSearchingEvent")
|
|
258
|
+
BetaResponseImageGenCallCompletedEvent: _StructSchema[_T.BetaResponseImageGenCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseImageGenCallCompletedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.image_generation_call.completed").annotate(description="The type of the event. Always 'response.image_generation_call.completed'."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response's output array."), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the image generation item being processed.")}, optional=("agent",)).annotate(title="ResponseImageGenCallCompletedEvent", description="Emitted when an image generation tool call has completed and the final image is available.\n", identifier="BetaResponseImageGenCallCompletedEvent")
|
|
259
|
+
BetaResponseImageGenCallGeneratingEvent: _StructSchema[_T.BetaResponseImageGenCallGeneratingEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseImageGenCallGeneratingEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.image_generation_call.generating").annotate(description="The type of the event. Always 'response.image_generation_call.generating'."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response's output array."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the image generation item being processed."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the image generation item being processed."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(title="ResponseImageGenCallGeneratingEvent", description="Emitted when an image generation tool call is actively generating an image (intermediate state).\n", identifier="BetaResponseImageGenCallGeneratingEvent")
|
|
260
|
+
BetaResponseImageGenCallInProgressEvent: _StructSchema[_T.BetaResponseImageGenCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseImageGenCallInProgressEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.image_generation_call.in_progress").annotate(description="The type of the event. Always 'response.image_generation_call.in_progress'."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response's output array."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the image generation item being processed."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the image generation item being processed."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(title="ResponseImageGenCallInProgressEvent", description="Emitted when an image generation tool call is in progress.\n", identifier="BetaResponseImageGenCallInProgressEvent")
|
|
261
|
+
BetaResponseImageGenCallPartialImageEvent: _StructSchema[_T.BetaResponseImageGenCallPartialImageEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseImageGenCallPartialImageEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.image_generation_call.partial_image").annotate(description="The type of the event. Always 'response.image_generation_call.partial_image'."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response's output array."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the image generation item being processed."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the image generation item being processed."), _S.is_int().annotate(expected="an integer")), "partial_image_index": _b.check(_S.Number.annotate(description="0-based index for the partial image (backend is 1-based, but this is 0-based for the user)."), _S.is_int().annotate(expected="an integer")), "partial_image_b64": _S.String.annotate(description="Base64-encoded partial image data, suitable for rendering as an image."), "size": _S.String.annotate(description="The image size that was used."), "quality": _S.String.annotate(description="The image quality that was used."), "background": _S.String.annotate(description="The background setting that was used."), "output_format": _S.String.annotate(description="The output format that was used.")}, optional=("agent", "size", "quality", "background", "output_format",)).annotate(title="ResponseImageGenCallPartialImageEvent", description="Emitted when a partial image is available during image generation streaming.\n", identifier="BetaResponseImageGenCallPartialImageEvent")
|
|
262
|
+
BetaResponseMCPCallArgumentsDeltaEvent: _StructSchema[_T.BetaResponseMCPCallArgumentsDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseMCPCallArgumentsDeltaEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.mcp_call_arguments.delta").annotate(description="The type of the event. Always 'response.mcp_call_arguments.delta'."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response's output array."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the MCP tool call item being processed."), "delta": _S.String.annotate(description="A JSON string containing the partial update to the arguments for the MCP tool call.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(title="ResponseMCPCallArgumentsDeltaEvent", description="Emitted when there is a delta (partial update) to the arguments of an MCP tool call.\n", identifier="BetaResponseMCPCallArgumentsDeltaEvent")
|
|
263
|
+
BetaResponseMCPCallArgumentsDoneEvent: _StructSchema[_T.BetaResponseMCPCallArgumentsDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseMCPCallArgumentsDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.mcp_call_arguments.done").annotate(description="The type of the event. Always 'response.mcp_call_arguments.done'."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response's output array."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the MCP tool call item being processed."), "arguments": _S.String.annotate(description="A JSON string containing the finalized arguments for the MCP tool call.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(title="ResponseMCPCallArgumentsDoneEvent", description="Emitted when the arguments for an MCP tool call are finalized.\n", identifier="BetaResponseMCPCallArgumentsDoneEvent")
|
|
264
|
+
BetaResponseMCPCallCompletedEvent: _StructSchema[_T.BetaResponseMCPCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseMCPCallCompletedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.mcp_call.completed").annotate(description="The type of the event. Always 'response.mcp_call.completed'."), "item_id": _S.String.annotate(description="The ID of the MCP tool call item that completed."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that completed."), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(title="ResponseMCPCallCompletedEvent", description="Emitted when an MCP tool call has completed successfully.\n", identifier="BetaResponseMCPCallCompletedEvent")
|
|
265
|
+
BetaResponseMCPCallFailedEvent: _StructSchema[_T.BetaResponseMCPCallFailedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseMCPCallFailedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.mcp_call.failed").annotate(description="The type of the event. Always 'response.mcp_call.failed'."), "item_id": _S.String.annotate(description="The ID of the MCP tool call item that failed."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that failed."), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(title="ResponseMCPCallFailedEvent", description="Emitted when an MCP tool call has failed.\n", identifier="BetaResponseMCPCallFailedEvent")
|
|
266
|
+
BetaResponseMCPCallInProgressEvent: _StructSchema[_T.BetaResponseMCPCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseMCPCallInProgressEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.mcp_call.in_progress").annotate(description="The type of the event. Always 'response.mcp_call.in_progress'."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response's output array."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The unique identifier of the MCP tool call item being processed.")}, optional=("agent",)).annotate(title="ResponseMCPCallInProgressEvent", description="Emitted when an MCP tool call is in progress.\n", identifier="BetaResponseMCPCallInProgressEvent")
|
|
267
|
+
BetaResponseMCPListToolsCompletedEvent: _StructSchema[_T.BetaResponseMCPListToolsCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseMCPListToolsCompletedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.mcp_list_tools.completed").annotate(description="The type of the event. Always 'response.mcp_list_tools.completed'."), "item_id": _S.String.annotate(description="The ID of the MCP tool call item that produced this output."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was processed."), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(title="ResponseMCPListToolsCompletedEvent", description="Emitted when the list of available MCP tools has been successfully retrieved.\n", identifier="BetaResponseMCPListToolsCompletedEvent")
|
|
268
|
+
BetaResponseMCPListToolsFailedEvent: _StructSchema[_T.BetaResponseMCPListToolsFailedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseMCPListToolsFailedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.mcp_list_tools.failed").annotate(description="The type of the event. Always 'response.mcp_list_tools.failed'."), "item_id": _S.String.annotate(description="The ID of the MCP tool call item that failed."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that failed."), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(title="ResponseMCPListToolsFailedEvent", description="Emitted when the attempt to list available MCP tools has failed.\n", identifier="BetaResponseMCPListToolsFailedEvent")
|
|
269
|
+
BetaResponseMCPListToolsInProgressEvent: _StructSchema[_T.BetaResponseMCPListToolsInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseMCPListToolsInProgressEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.mcp_list_tools.in_progress").annotate(description="The type of the event. Always 'response.mcp_list_tools.in_progress'."), "item_id": _S.String.annotate(description="The ID of the MCP tool call item that is being processed."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that is being processed."), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(title="ResponseMCPListToolsInProgressEvent", description="Emitted when the system is in the process of retrieving the list of available MCP tools.\n", identifier="BetaResponseMCPListToolsInProgressEvent")
|
|
270
|
+
BetaResponseCustomToolCallInputDeltaEvent: _StructSchema[_T.BetaResponseCustomToolCallInputDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseCustomToolCallInputDeltaEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.custom_tool_call_input.delta").annotate(description="The event type identifier."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "output_index": _b.check(_S.Number.annotate(description="The index of the output this delta applies to."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="Unique identifier for the API item associated with this event."), "delta": _S.String.annotate(description="The incremental input data (delta) for the custom tool call.")}, optional=("agent",)).annotate(title="ResponseCustomToolCallInputDelta", description="Event representing a delta (partial update) to the input of a custom tool call.\n", identifier="BetaResponseCustomToolCallInputDeltaEvent")
|
|
271
|
+
BetaResponseCustomToolCallInputDoneEvent: _StructSchema[_T.BetaResponseCustomToolCallInputDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseCustomToolCallInputDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.custom_tool_call_input.done").annotate(description="The event type identifier."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "output_index": _b.check(_S.Number.annotate(description="The index of the output this event applies to."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="Unique identifier for the API item associated with this event."), "input": _S.String.annotate(description="The complete input data for the custom tool call.")}, optional=("agent",)).annotate(title="ResponseCustomToolCallInputDone", description="Event indicating that input for a custom tool call is complete.\n", identifier="BetaResponseCustomToolCallInputDoneEvent")
|
|
272
|
+
BetaResponseConfigurationUpdate: _StructSchema[_T.BetaResponseConfigurationUpdate, _t.Never, _t.Never] = _b.struct(_T.BetaResponseConfigurationUpdate, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the configuration update item."), "type": _b.literal("configuration_update").annotate(description="The item type. Always `configuration_update`."), "reasoning": _b.struct(_T.BetaResponseConfigurationUpdate__reasoning, {"effort": _b.suspend(lambda: BetaReasoningEffort).annotate(description="The reasoning effort used for subsequent responses until another\nconfiguration update replaces it.\n")}, optional=("effort",)).annotate(description="The reasoning configuration applied by this update.")}, optional=("agent", "reasoning",)).annotate(description="A configuration update that applies to subsequent responses until it is\nreplaced by another configuration update.\n", identifier="BetaResponseConfigurationUpdate")
|
|
273
|
+
BetaAnnotation: _S.Bottom[_T.BetaAnnotation, _t.Any] = _b.union(BetaFileCitationBody, BetaUrlCitationBody, BetaContainerFileCitationBody, BetaFilePath, mode="one_of").annotate(description="An annotation that applies to a span of output text.", identifier="BetaAnnotation")
|
|
274
|
+
BetaLogProb: _StructSchema[_T.BetaLogProb, _t.Never, _t.Never] = _b.struct(_T.BetaLogProb, {"token": _S.String, "logprob": _S.Finite, "bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "top_logprobs": _b.array(BetaTopLogProb)}).annotate(title="Log probability", description="The log probability of a token.", identifier="BetaLogProb")
|
|
275
|
+
BetaFileSearchToolCall: _StructSchema[_T.BetaFileSearchToolCall, _t.Never, _t.Never] = _b.struct(_T.BetaFileSearchToolCall, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the file search tool call.\n"), "type": _b.literal("file_search_call").annotate(description="The type of the file search tool call. Always `file_search_call`.\n"), "status": _b.literals(["in_progress", "searching", "completed", "incomplete", "failed"]).annotate(description="The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n"), "queries": _b.array(_S.String).annotate(description="The queries used to search for files.\n"), "results": _b.union(_b.array(_b.struct(_T.BetaFileSearchToolCall__results__0__item, {"file_id": _S.String.annotate(description="The unique ID of the file.\n"), "text": _S.String.annotate(description="The text that was retrieved from the file.\n"), "filename": _S.String.annotate(description="The name of the file.\n"), "attributes": BetaVectorStoreFileAttributes, "score": _b.check(_S.Number.annotate(description="The relevance score of the file - a value between 0 and 1.\n", format="float"), _S.is_finite().annotate(expected="a finite number"))}, optional=("file_id", "text", "filename", "attributes", "score",))).annotate(description="The results of the file search tool call.\n"), _S.Null)}, optional=("agent", "results",)).annotate(title="File search tool call", description="The results of a file search tool call. See the\n[file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information.\n", identifier="BetaFileSearchToolCall")
|
|
276
|
+
BetaClickParam: _StructSchema[_T.BetaClickParam, _t.Never, _t.Never] = _b.struct(_T.BetaClickParam, {"type": _b.literal("click").annotate(description="Specifies the event type. For a click action, this property is always `click`."), "button": _b.suspend(lambda: BetaClickButtonType).annotate(description="Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."), "x": _b.check(_S.Number.annotate(description="The x-coordinate where the click occurred."), _S.is_int().annotate(expected="an integer")), "y": _b.check(_S.Number.annotate(description="The y-coordinate where the click occurred."), _S.is_int().annotate(expected="an integer")), "keys": _b.union(_b.array(_S.String).annotate(description="The keys being held while clicking."), _S.Null)}, optional=("keys",)).annotate(title="Click", description="A click action.", identifier="BetaClickParam")
|
|
277
|
+
BetaDragParam: _StructSchema[_T.BetaDragParam, _t.Never, _t.Never] = _b.struct(_T.BetaDragParam, {"type": _b.literal("drag").annotate(description="Specifies the event type. For a drag action, this property is always set to `drag`."), "path": _b.array(BetaCoordParam).annotate(description="An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg\n```\n[\n { x: 100, y: 200 },\n { x: 200, y: 300 }\n]\n```"), "keys": _b.union(_b.array(_S.String).annotate(description="The keys being held while dragging the mouse."), _S.Null)}, optional=("keys",)).annotate(title="Drag", description="A drag action.", identifier="BetaDragParam")
|
|
278
|
+
BetaCompactionTriggerItemParam: _StructSchema[_T.BetaCompactionTriggerItemParam, _t.Never, _t.Never] = _b.struct(_T.BetaCompactionTriggerItemParam, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of this compaction trigger."), _S.Null), "type": _b.literal("compaction_trigger").annotate(description="The type of the item. Always `compaction_trigger`.")}, optional=("agent", "id",)).annotate(title="Compaction trigger", description="Compacts the current context. Must be the final input item.", identifier="BetaCompactionTriggerItemParam")
|
|
279
|
+
BetaItemReferenceParam: _StructSchema[_T.BetaItemReferenceParam, _t.Never, _t.Never] = _b.struct(_T.BetaItemReferenceParam, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "type": _b.union(_b.literal("item_reference").annotate(description="The type of item to reference. Always `item_reference`."), _S.Null), "id": _S.String.annotate(description="The ID of the item to reference.")}, optional=("agent", "type",)).annotate(title="Item reference", description="An internal identifier for an item to reference.", identifier="BetaItemReferenceParam")
|
|
280
|
+
BetaProgramItemParam: _StructSchema[_T.BetaProgramItemParam, _t.Never, _t.Never] = _b.struct(_T.BetaProgramItemParam, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _S.String.annotate(description="The unique ID of this program item."), "type": _b.literal("program").annotate(description="The item type. Always `program`."), "call_id": _b.check(_b.check(_S.String.annotate(description="The stable call ID of the program item."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "code": _b.check(_S.String.annotate(description="The JavaScript source executed by programmatic tool calling."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), "fingerprint": _b.check(_S.String.annotate(description="Opaque program replay fingerprint that must be round-tripped."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points"))}, optional=("agent",)).annotate(identifier="BetaProgramItemParam")
|
|
281
|
+
BetaComputerToolCallOutputResource: _StructSchema[_T.BetaComputerToolCallOutputResource, _t.Never, _t.Never] = _b.struct(_T.BetaComputerToolCallOutputResource, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("computer_call_output").annotate(description="The type of the computer tool call output. Always `computer_call_output`.\n"), "id": _S.String.annotate(description="The ID of the computer tool call output.\n"), "call_id": _S.String.annotate(description="The ID of the computer tool call that produced the output.\n"), "acknowledged_safety_checks": _b.array(BetaComputerCallSafetyCheckParam).annotate(description="The safety checks reported by the API that have been acknowledged by the\ndeveloper.\n"), "output": BetaComputerScreenshotImage, "status": _b.literals(["completed", "incomplete"]).annotate(description="The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n"), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.\n")}, optional=("agent", "acknowledged_safety_checks", "created_by",)).annotate(identifier="BetaComputerToolCallOutputResource")
|
|
282
|
+
BetaWebSearchToolCall: _StructSchema[_T.BetaWebSearchToolCall, _t.Never, _t.Never] = _b.struct(_T.BetaWebSearchToolCall, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the web search tool call.\n"), "type": _b.literal("web_search_call").annotate(description="The type of the web search tool call. Always `web_search_call`.\n"), "status": _b.suspend(lambda: BetaWebSearchCallStatus).annotate(description="The status of the web search tool call.\n"), "action": _b.union(BetaWebSearchActionSearch, BetaWebSearchActionOpenPage, BetaWebSearchActionFind, mode="one_of").annotate(description="An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find_in_page).\n")}, optional=("agent", "action",)).annotate(title="Web search tool call", description="The results of a web search tool call. See the\n[web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information.\n", identifier="BetaWebSearchToolCall")
|
|
283
|
+
BetaToolCallCaller: _S.Bottom[_T.BetaToolCallCaller, _t.Any] = _b.union(BetaDirectToolCallCaller, BetaProgramToolCallCaller, mode="one_of").annotate(description="The execution context that produced this tool call.", identifier="BetaToolCallCaller")
|
|
284
|
+
BetaInputTextContentParam: _StructSchema[_T.BetaInputTextContentParam, _t.Never, _t.Never] = _b.struct(_T.BetaInputTextContentParam, {"type": _b.literal("input_text").annotate(description="The type of the input item. Always `input_text`."), "text": _b.check(_S.String.annotate(description="The text input to the model."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), "prompt_cache_breakpoint": _b.union(BetaPromptCacheBreakpointParam, _S.Null)}, optional=("prompt_cache_breakpoint",)).annotate(title="Input text", description="A text input to the model.", identifier="BetaInputTextContentParam")
|
|
285
|
+
BetaInputImageContentParamAutoParam: _StructSchema[_T.BetaInputImageContentParamAutoParam, _t.Never, _t.Never] = _b.struct(_T.BetaInputImageContentParamAutoParam, {"type": _b.literal("input_image").annotate(description="The type of the input item. Always `input_image`."), "image_url": _b.union(_b.check(_S.String.annotate(description="The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.", format="uri"), _S.is_max_code_points(20971520).annotate(expected="a string with at most 20971520 code points")), _S.Null), "file_id": _b.union(_S.String.annotate(description="The ID of the file to be sent to the model."), _S.Null), "detail": _b.union(_b.suspend(lambda: BetaDetailEnum).annotate(description="The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`."), _S.Null), "prompt_cache_breakpoint": _b.union(BetaPromptCacheBreakpointParam, _S.Null)}, optional=("image_url", "file_id", "detail", "prompt_cache_breakpoint",)).annotate(title="Input image", description="An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision)", identifier="BetaInputImageContentParamAutoParam")
|
|
286
|
+
BetaInputFileContentParam: _StructSchema[_T.BetaInputFileContentParam, _t.Never, _t.Never] = _b.struct(_T.BetaInputFileContentParam, {"type": _b.literal("input_file").annotate(description="The type of the input item. Always `input_file`."), "file_id": _b.union(_S.String.annotate(description="The ID of the file to be sent to the model."), _S.Null), "filename": _b.union(_S.String.annotate(description="The name of the file to be sent to the model."), _S.Null), "file_data": _b.union(_b.check(_S.String.annotate(description="The base64-encoded data of the file to be sent to the model."), _S.is_max_code_points(73400320).annotate(expected="a string with at most 73400320 code points")), _S.Null), "file_url": _b.union(_S.String.annotate(description="The URL of the file to be sent to the model.", format="uri"), _S.Null), "detail": _b.suspend(lambda: BetaFileDetailEnum).annotate(description="The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`."), "prompt_cache_breakpoint": _b.union(BetaPromptCacheBreakpointParam, _S.Null)}, optional=("file_id", "filename", "file_data", "file_url", "detail", "prompt_cache_breakpoint",)).annotate(title="Input file", description="A file input to the model.", identifier="BetaInputFileContentParam")
|
|
287
|
+
BetaToolCallCallerParam: _S.Bottom[_T.BetaToolCallCallerParam, _t.Any] = _b.union(BetaDirectToolCallCallerParam, BetaProgramToolCallCallerParam, mode="one_of").annotate(description="The execution context that produced this tool call.", identifier="BetaToolCallCallerParam")
|
|
288
|
+
BetaOutputTextContentParam: _StructSchema[_T.BetaOutputTextContentParam, _t.Never, _t.Never] = _b.struct(_T.BetaOutputTextContentParam, {"type": _b.literal("output_text").annotate(description="The content type. Always `output_text`."), "text": _b.check(_S.String.annotate(description="The text content."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), "annotations": _b.array(_b.union(BetaFileCitationParam, BetaUrlCitationParam, BetaContainerFileCitationParam, mode="one_of")).annotate(description="Citations associated with the text content.")}, optional=("annotations",)).annotate(identifier="BetaOutputTextContentParam")
|
|
289
|
+
BetaReasoningItem: _StructSchema[_T.BetaReasoningItem, _t.Never, _t.Never] = _b.struct(_T.BetaReasoningItem, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("reasoning").annotate(description="The type of the object. Always `reasoning`.\n"), "id": _S.String.annotate(description="The unique identifier of the reasoning content.\n"), "encrypted_content": _b.union(_S.String.annotate(description="The encrypted content of the reasoning item. This is populated by default\nfor reasoning items returned by `POST /v1/responses` and WebSocket\n`response.create` requests.\n\nWhen streaming, use the completed reasoning item and its\n`encrypted_content` from the `response.output_item.done` event in\nsubsequent requests. The `encrypted_content` in\n`response.output_item.added` may be incomplete. This is especially\nimportant when `store` is `false` or when using Zero Data Retention.\n"), _S.Null), "summary": _b.array(BetaSummaryTextContent).annotate(description="Reasoning summary content.\n"), "content": _b.array(BetaReasoningTextContent).annotate(description="Reasoning text content.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n")}, optional=("agent", "encrypted_content", "content", "status",)).annotate(title="Reasoning", description="A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](https://developers.openai.com/api/docs/guides/conversation-state).\n", identifier="BetaReasoningItem")
|
|
290
|
+
BetaImageGenToolCall: _StructSchema[_T.BetaImageGenToolCall, _t.Never, _t.Never] = _b.struct(_T.BetaImageGenToolCall, {"agent": _b.union(_b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), _S.Null), "type": _b.literal("image_generation_call").annotate(description="The type of the image generation call. Always `image_generation_call`."), "id": _S.String.annotate(description="The unique ID of the image generation call."), "status": _b.literals(["in_progress", "completed", "generating", "failed"]).annotate(description="The status of the image generation call."), "result": _b.union(_S.String.annotate(description="The generated image encoded in base64."), _S.Null), "size": _b.union(_b.union(_S.String, _b.literals(["1024x1024", "1024x1536", "1536x1024"])).annotate(description="The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`."), _S.Null), "quality": _b.union(_b.literals(["low", "medium", "high", "xhigh", "max", "auto"]).annotate(description="The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`."), _S.Null), "action": _b.union(_b.suspend(lambda: BetaImageGenActionEnum).annotate(description="The action used for image generation."), _S.Null), "background": _b.union(_b.suspend(lambda: BetaImageBackground).annotate(description="The background setting used for generation."), _S.Null), "output_format": _b.union(_b.suspend(lambda: BetaImageOutputFormat).annotate(description="The output format used for generation."), _S.Null), "revised_prompt": _b.union(_S.String.annotate(description="The prompt that was used after any model prompt rewriting."), _S.Null)}, optional=("agent", "size", "quality", "action", "background", "output_format", "revised_prompt",)).annotate(title="Image generation call", description="An image generation request made by the model.", identifier="BetaImageGenToolCall")
|
|
291
|
+
BetaCodeInterpreterToolCall: _StructSchema[_T.BetaCodeInterpreterToolCall, _t.Never, _t.Never] = _b.struct(_T.BetaCodeInterpreterToolCall, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("code_interpreter_call").annotate(description="The type of the code interpreter tool call. Always `code_interpreter_call`.\n"), "id": _S.String.annotate(description="The unique ID of the code interpreter tool call.\n"), "status": _b.literals(["in_progress", "completed", "incomplete", "interpreting", "failed"]).annotate(description="The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"), "container_id": _S.String.annotate(description="The ID of the container used to run the code.\n"), "code": _b.union(_S.String.annotate(description="The code to run, or null if not available.\n"), _S.Null), "outputs": _b.union(_b.array(_b.union(BetaCodeInterpreterOutputLogs, BetaCodeInterpreterOutputImage, mode="one_of")).annotate(description="The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n"), _S.Null)}, optional=("agent",)).annotate(title="Code interpreter tool call", description="A tool call to run code.\n", identifier="BetaCodeInterpreterToolCall")
|
|
292
|
+
BetaLocalShellToolCall: _StructSchema[_T.BetaLocalShellToolCall, _t.Never, _t.Never] = _b.struct(_T.BetaLocalShellToolCall, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("local_shell_call").annotate(description="The type of the local shell call. Always `local_shell_call`.\n"), "id": _S.String.annotate(description="The unique ID of the local shell call.\n"), "call_id": _S.String.annotate(description="The unique ID of the local shell tool call generated by the model.\n"), "action": BetaLocalShellExecAction, "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the local shell call.\n")}, optional=("agent",)).annotate(title="Local shell call", description="A tool call to run a command on the local shell.\n", identifier="BetaLocalShellToolCall")
|
|
293
|
+
BetaFunctionShellCallOutputOutcomeParam: _S.Bottom[_T.BetaFunctionShellCallOutputOutcomeParam, _t.Any] = _b.union(BetaFunctionShellCallOutputTimeoutOutcomeParam, BetaFunctionShellCallOutputExitOutcomeParam, mode="one_of").annotate(title="Shell call outcome", description="The exit or timeout outcome associated with this shell call.", identifier="BetaFunctionShellCallOutputOutcomeParam")
|
|
294
|
+
BetaApplyPatchOperationParam: _S.Bottom[_T.BetaApplyPatchOperationParam, _t.Any] = _b.union(BetaApplyPatchCreateFileOperationParam, BetaApplyPatchDeleteFileOperationParam, BetaApplyPatchUpdateFileOperationParam, mode="one_of").annotate(title="Apply patch operation", description="One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.", identifier="BetaApplyPatchOperationParam")
|
|
295
|
+
BetaMCPListTools: _StructSchema[_T.BetaMCPListTools, _t.Never, _t.Never] = _b.struct(_T.BetaMCPListTools, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("mcp_list_tools").annotate(description="The type of the item. Always `mcp_list_tools`.\n"), "id": _S.String.annotate(description="The unique ID of the list.\n"), "server_label": _S.String.annotate(description="The label of the MCP server.\n"), "tools": _b.array(BetaMCPListToolsTool).annotate(description="The tools available on the server.\n"), "error": _b.union(_S.String.annotate(description="Error message if the server could not list tools.\n"), _S.Null)}, optional=("agent", "error",)).annotate(title="MCP list tools", description="A list of tools available on an MCP server.\n", identifier="BetaMCPListTools")
|
|
296
|
+
BetaMCPToolCallError: _S.Bottom[_T.BetaMCPToolCallError, _t.Any] = _b.union(BetaMCPProtocolError, BetaMCPToolExecutionError, BetaHTTPError, mode="one_of").annotate(identifier="BetaMCPToolCallError")
|
|
297
|
+
BetaProgramOutputItemParam: _StructSchema[_T.BetaProgramOutputItemParam, _t.Never, _t.Never] = _b.struct(_T.BetaProgramOutputItemParam, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _S.String.annotate(description="The unique ID of this program output item."), "type": _b.literal("program_output").annotate(description="The item type. Always `program_output`."), "call_id": _b.check(_b.check(_S.String.annotate(description="The call ID of the program item."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "result": _b.check(_S.String.annotate(description="The result produced by the program item."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), "status": _b.suspend(lambda: BetaProgramOutputItemStatus).annotate(description="The terminal status of the program output.")}, optional=("agent",)).annotate(identifier="BetaProgramOutputItemParam")
|
|
298
|
+
BetaModerationConfigParam: _StructSchema[_T.BetaModerationConfigParam, _t.Never, _t.Never] = _b.struct(_T.BetaModerationConfigParam, {"mode": BetaModerationMode}).annotate(description="The moderation policy for the response input.", identifier="BetaModerationConfigParam")
|
|
299
|
+
BetaConversationParam: _S.Bottom[_T.BetaConversationParam, _t.Any] = _b.union(_S.String.annotate(title="Conversation ID", description="The unique ID of the conversation.\n"), BetaConversationParam_2, mode="one_of").annotate(description="The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.\nInput items and output items from this response are automatically added to this conversation after this response completes.\n", identifier="BetaConversationParam")
|
|
300
|
+
BetaMisalignmentErrorDetailsResource: _StructSchema[_T.BetaMisalignmentErrorDetailsResource, _t.Never, _t.Never] = _b.struct(_T.BetaMisalignmentErrorDetailsResource, {"review_target": _b.union(_b.check(_b.check(_b.check(_S.String.annotate(description="An opaque target for explicitly continuing this review, or null when unavailable."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(96).annotate(expected="a string with at most 96 code points")), _b.js_pattern('^[A-Za-z0-9._~:-]+\\Z', '^[A-Za-z0-9._~:-]+$').annotate(expected="a string matching the RegExp ^[A-Za-z0-9._~:-]+$")), _S.Null), "error_type": _b.suspend(lambda: Beta_MisalignmentErrorType).annotate(description="An optional classification; clients must accept additional values."), "detailed_explanation": _S.String.annotate(description="The public explanation for this block."), "steer": _b.suspend(lambda: Beta_MisalignmentSteer).annotate(description="An optional public continuation instruction.")}, optional=("review_target", "error_type", "detailed_explanation", "steer",)).annotate(identifier="BetaMisalignmentErrorDetailsResource")
|
|
301
|
+
BetaMultiAgentCall: _StructSchema[_T.BetaMultiAgentCall, _t.Never, _t.Never] = _b.struct(_T.BetaMultiAgentCall, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("multi_agent_call").annotate(description="The type of the multi-agent call. Always `multi_agent_call`."), "id": _S.String.annotate(description="The unique ID of the multi-agent call item."), "call_id": _S.String.annotate(description="The unique ID linking this call to its output."), "action": _b.suspend(lambda: BetaMultiAgentAction).annotate(description="The multi-agent action to execute."), "arguments": _S.String.annotate(description="The JSON string of arguments generated for the action.")}, optional=("agent",)).annotate(identifier="BetaMultiAgentCall")
|
|
302
|
+
BetaProgramOutput: _StructSchema[_T.BetaProgramOutput, _t.Never, _t.Never] = _b.struct(_T.BetaProgramOutput, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("program_output").annotate(description="The type of the item. Always `program_output`."), "id": _S.String.annotate(description="The unique ID of the program output item."), "call_id": _S.String.annotate(description="The call ID of the program item."), "result": _S.String.annotate(description="The result produced by the program item."), "status": _b.suspend(lambda: BetaProgramOutputStatus).annotate(description="The terminal status of the program output item.")}, optional=("agent",)).annotate(identifier="BetaProgramOutput")
|
|
303
|
+
BetaToolSearchCall: _StructSchema[_T.BetaToolSearchCall, _t.Never, _t.Never] = _b.struct(_T.BetaToolSearchCall, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("tool_search_call").annotate(description="The type of the item. Always `tool_search_call`."), "id": _S.String.annotate(description="The unique ID of the tool search call item."), "call_id": _b.union(_S.String.annotate(description="The unique ID of the tool search call generated by the model."), _S.Null), "execution": _b.suspend(lambda: BetaToolSearchExecutionType).annotate(description="Whether tool search was executed by the server or by the client."), "arguments": _S.Json.annotate(expected="JSON value", description="Arguments used for the tool search call."), "status": _b.suspend(lambda: BetaFunctionCallStatus).annotate(description="The status of the tool search call item that was recorded."), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.")}, optional=("agent", "created_by",)).annotate(identifier="BetaToolSearchCall")
|
|
304
|
+
BetaFunctionShellCallOutputContent: _StructSchema[_T.BetaFunctionShellCallOutputContent, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellCallOutputContent, {"stdout": _S.String.annotate(description="The standard output that was captured."), "stderr": _S.String.annotate(description="The standard error output that was captured."), "outcome": _b.union(BetaFunctionShellCallOutputTimeoutOutcome, BetaFunctionShellCallOutputExitOutcome, mode="one_of").annotate(title="Shell call outcome", description="Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk."), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.")}, optional=("created_by",)).annotate(title="Shell call output content", description="The content of a shell tool call output that was emitted.", identifier="BetaFunctionShellCallOutputContent")
|
|
305
|
+
BetaPromptCacheMissDiagnosticsBody: _StructSchema[_T.BetaPromptCacheMissDiagnosticsBody, _t.Never, _t.Never] = _b.struct(_T.BetaPromptCacheMissDiagnosticsBody, {"type": _b.literal("cache_miss"), "reason": _b.suspend(lambda: BetaCacheMissReasonTypeEnum).annotate(description="The reason prompt cache reuse did not occur."), "cache_missed_tokens": _b.check(_S.Number.annotate(description="The estimated number of input tokens affected after the first detected divergence."), _S.is_int().annotate(expected="an integer")), "comparison_reusable_tokens": _b.check(_S.Number.annotate(description="The raw token count of the reusable prefix in the compared response."), _S.is_int().annotate(expected="an integer"))}, optional=("comparison_reusable_tokens",)).annotate(identifier="BetaPromptCacheMissDiagnosticsBody")
|
|
306
|
+
BetaModerationResultBody: _StructSchema[_T.BetaModerationResultBody, _t.Never, _t.Never] = _b.struct(_T.BetaModerationResultBody, {"type": _b.literal("moderation_result").annotate(description="The object type, which was always `moderation_result` for successful moderation results."), "model": _S.String.annotate(description="The moderation model that produced this result."), "flagged": _S.Boolean.annotate(description="A boolean indicating whether the content was flagged by any category."), "categories": _b.record(_S.String, _S.Boolean).annotate(description="A dictionary of moderation categories to booleans, True if the input is flagged under this category."), "category_scores": _b.record(_S.String, _S.Finite).annotate(description="A dictionary of moderation categories to scores."), "category_applied_input_types": _b.record(_S.String, _b.array(BetaModerationInputType)).annotate(description="Which modalities of input are reflected by the score for each category.")}).annotate(title="Moderation result", description="A moderation result produced for the response input or output.", identifier="BetaModerationResultBody")
|
|
307
|
+
BetaResponseShellCallOutputContentDeltaStreamingEvent: _StructSchema[_T.BetaResponseShellCallOutputContentDeltaStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseShellCallOutputContentDeltaStreamingEvent, {"type": _b.literal("response.shell_call_output_content.delta").annotate(description="The type of the event, always `response.shell_call_output_content.delta`."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the event that was emitted."), _S.is_int().annotate(expected="an integer")), "agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that owns this multi-agent streaming event."), "item_id": _S.String.annotate(description="The ID of the output item that was updated."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was updated."), _S.is_int().annotate(expected="an integer")), "command_index": _b.check(_S.Number.annotate(description="The index of the shell command that produced output."), _S.is_int().annotate(expected="an integer")), "delta": _b.suspend(lambda: BetaShellCallOutputDelta).annotate(description="The stdout/stderr delta that was emitted.")}, optional=("agent",)).annotate(title="Response shell call output content delta event", description="A streaming event that indicated shell call output was incrementally added.", identifier="BetaResponseShellCallOutputContentDeltaStreamingEvent")
|
|
308
|
+
BetaResponseTextDeltaEvent: _StructSchema[_T.BetaResponseTextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseTextDeltaEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.output_text.delta").annotate(description="The type of the event. Always `response.output_text.delta`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the text delta was added to.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the text delta was added to.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part that the text delta was added to.\n"), _S.is_int().annotate(expected="an integer")), "delta": _S.String.annotate(description="The text delta that was added.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number for this event."), _S.is_int().annotate(expected="an integer")), "logprobs": _b.array(BetaResponseLogProb).annotate(description="The log probabilities of the tokens in the delta.\n")}, optional=("agent",)).annotate(description="Emitted when there is an additional text delta.", identifier="BetaResponseTextDeltaEvent")
|
|
309
|
+
BetaResponseTextDoneEvent: _StructSchema[_T.BetaResponseTextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseTextDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.output_text.done").annotate(description="The type of the event. Always `response.output_text.done`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the text content is finalized.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the text content is finalized.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part that the text content is finalized.\n"), _S.is_int().annotate(expected="an integer")), "text": _S.String.annotate(description="The text content that is finalized.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number for this event."), _S.is_int().annotate(expected="an integer")), "logprobs": _b.array(BetaResponseLogProb).annotate(description="The log probabilities of the tokens in the delta.\n")}, optional=("agent",)).annotate(description="Emitted when text content is finalized.", identifier="BetaResponseTextDoneEvent")
|
|
310
|
+
AssistantToolsFileSearch: _StructSchema[_T.AssistantToolsFileSearch, _t.Never, _t.Never] = _b.struct(_T.AssistantToolsFileSearch, {"type": _b.literal("file_search").annotate(description="The type of tool being defined: `file_search`"), "file_search": _b.struct(_T.AssistantToolsFileSearch__file_search, {"max_num_results": _b.check(_b.check(_b.check(_S.Number.annotate(description="The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information.\n"), _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(50).annotate(expected="a value less than or equal to 50")), "ranking_options": FileSearchRankingOptions}, optional=("max_num_results", "ranking_options",)).annotate(description="Overrides for the file search tool.")}, optional=("file_search",)).annotate(title="FileSearch tool", identifier="AssistantToolsFileSearch")
|
|
311
|
+
RunStepDetailsToolCallsFileSearchObject: _StructSchema[_T.RunStepDetailsToolCallsFileSearchObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDetailsToolCallsFileSearchObject, {"id": _S.String.annotate(description="The ID of the tool call object."), "type": _b.literal("file_search").annotate(description="The type of tool call. This is always going to be `file_search` for this type of tool call."), "file_search": _b.struct(_T.RunStepDetailsToolCallsFileSearchObject__file_search, {"ranking_options": RunStepDetailsToolCallsFileSearchRankingOptionsObject, "results": _b.array(RunStepDetailsToolCallsFileSearchResultObject).annotate(description="The results of the file search.")}, optional=("ranking_options", "results",)).annotate(description="For now, this is always going to be an empty object.")}).annotate(title="File search tool call", identifier="RunStepDetailsToolCallsFileSearchObject")
|
|
312
|
+
AssistantToolsFunction: _StructSchema[_T.AssistantToolsFunction, _t.Never, _t.Never] = _b.struct(_T.AssistantToolsFunction, {"type": _b.literal("function").annotate(description="The type of tool being defined: `function`"), "function": FunctionObject}).annotate(title="Function tool", identifier="AssistantToolsFunction")
|
|
313
|
+
ChatCompletionTool: _StructSchema[_T.ChatCompletionTool, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionTool, {"type": _b.literal("function").annotate(description="The type of the tool. Currently, only `function` is supported."), "function": FunctionObject}).annotate(title="Function tool", description="A function tool that can be used to generate a response.\n", identifier="ChatCompletionTool")
|
|
314
|
+
ThreadStreamEvent: _S.Bottom[_T.ThreadStreamEvent, _t.Any] = _b.union(_b.struct(_T.ThreadStreamEvent__0, {"enabled": _S.Boolean.annotate(description="Whether to enable input audio transcription."), "event": _b.literal("thread.created"), "data": ThreadObject}, optional=("enabled",)).annotate(description="Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) is created."), mode="one_of").annotate(identifier="ThreadStreamEvent")
|
|
315
|
+
AssistantsApiResponseFormatOption: _S.Bottom[_T.AssistantsApiResponseFormatOption, _t.Any] = _b.union(_b.literal("auto").annotate(description="`auto` is the default value\n"), ResponseFormatText, ResponseFormatJsonObject, ResponseFormatJsonSchema, mode="one_of").annotate(description="Specifies the format that the model must output. Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n", identifier="AssistantsApiResponseFormatOption")
|
|
316
|
+
TextResponseFormatConfiguration: _S.Bottom[_T.TextResponseFormatConfiguration, _t.Any] = _b.union(ResponseFormatText, TextResponseFormatJsonSchema, ResponseFormatJsonObject, mode="one_of").annotate(description="An object specifying the format that the model must output.\n\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs,\nwhich ensures the model will match your supplied JSON schema. Learn more in the\n[Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).\n\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n\n**Not recommended for gpt-4o and newer models:**\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n", identifier="TextResponseFormatConfiguration")
|
|
317
|
+
Error: _StructSchema[_T.Error, _t.Never, _t.Never] = _b.struct(_T.Error, {"code": _b.union(_S.String, _S.Null), "message": _S.String, "param": _b.union(_S.String, _S.Null), "type": _S.String, "misalignment": MisalignmentErrorDetailsResource}, optional=("misalignment",)).annotate(identifier="Error")
|
|
318
|
+
ResponseError: _S.Bottom[_T.ResponseError, _t.Any] = _b.union(_b.struct(_T.ResponseError__0, {"code": ResponseErrorCode, "message": _S.String.annotate(description="A human-readable description of the error.\n"), "misalignment": MisalignmentErrorDetailsResource}, optional=("misalignment",)).annotate(description="An error object returned when the model fails to generate a Response.\n"), _S.Null).annotate(identifier="ResponseError")
|
|
319
|
+
Error_2: _StructSchema[_T.Error_2, _t.Never, _t.Never] = _b.struct(_T.Error_2, {"code": _S.String.annotate(description="A machine-readable error code that was returned."), "message": _S.String.annotate(description="A human-readable description of the error that was returned."), "headers": _b.record(_S.String, _S.String.annotate(description="The retry header value.")).annotate(description="The Retry-After and Retry-After-Ms headers returned with the original error, if any."), "misalignment": MisalignmentErrorDetailsResource}, optional=("headers", "misalignment",)).annotate(title="Error", description="An error that occurred while generating the response.", identifier="Error-2")
|
|
320
|
+
CreateVoiceRequestMultipart: _S.Bottom[_T.CreateVoiceRequestMultipart, _t.Any] = _b.union(CreateVoiceFromConsentRequestMultipart, mode="one_of").annotate(identifier="CreateVoiceRequestMultipart")
|
|
321
|
+
CreateTranscriptionResponseStreamEvent: _S.Bottom[_T.CreateTranscriptionResponseStreamEvent, _t.Any] = _b.union(TranscriptTextSegmentEvent, TranscriptTextDeltaEvent, TranscriptTextDoneEvent).annotate(identifier="CreateTranscriptionResponseStreamEvent")
|
|
322
|
+
ListBatchesResponse: _StructSchema[_T.ListBatchesResponse, _t.Never, _t.Never] = _b.struct(_T.ListBatchesResponse, {"data": _b.array(Batch), "first_id": _S.String, "last_id": _S.String, "has_more": _S.Boolean, "object": _b.literal("list")}, optional=("first_id", "last_id",)).annotate(identifier="ListBatchesResponse")
|
|
323
|
+
ChatCompletionResponseMessage: _StructSchema[_T.ChatCompletionResponseMessage, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionResponseMessage, {"content": _b.union(_S.String.annotate(description="The contents of the message."), _S.Null), "refusal": _b.union(_S.String.annotate(description="The refusal message generated by the model."), _S.Null), "tool_calls": _b.union(ChatCompletionMessageToolCalls, _S.Null), "annotations": _b.array(_b.struct(_T.ChatCompletionResponseMessage__annotations__item, {"type": _b.literal("url_citation").annotate(description="The type of the URL citation. Always `url_citation`."), "url_citation": _b.struct(_T.ChatCompletionResponseMessage__annotations__item__url_citation, {"end_index": _b.check(_S.Number.annotate(description="The index of the last character of the URL citation in the message."), _S.is_int().annotate(expected="an integer")), "start_index": _b.check(_S.Number.annotate(description="The index of the first character of the URL citation in the message."), _S.is_int().annotate(expected="an integer")), "url": _S.String.annotate(description="The URL of the web resource.", format="uri"), "title": _S.String.annotate(description="The title of the web resource.")}).annotate(description="A URL citation when using web search.")}).annotate(description="A URL citation when using web search.\n")).annotate(description="Annotations for the message, when applicable, as when using the\n[web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).\n"), "role": _b.literal("assistant").annotate(description="The role of the author of this message."), "function_call": _b.union(_b.struct_with_rest(_b.struct(_T.ChatCompletionResponseMessage__function_call__0, {"arguments": _S.String.annotate(description="The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."), "name": _S.String.annotate(description="The name of the function to call.")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model."), "audio": _b.union(_b.struct(_T.ChatCompletionResponseMessage__audio__0, {"id": _S.String.annotate(description="Unique identifier for this audio response."), "expires_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when this audio response will\nno longer be accessible on the server for use in multi-turn\nconversations.\n", format="unixtime"), _S.is_int().annotate(expected="an integer")), "data": _S.String.annotate(description="Base64 encoded audio bytes generated by the model, in the format\nspecified in the request.\n"), "transcript": _S.String.annotate(description="Transcript of the audio generated by the model.")}).annotate(description="If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](https://developers.openai.com/api/docs/guides/audio).\n"), _S.Null)}, optional=("refusal", "tool_calls", "annotations", "function_call", "audio",)).annotate(description="A chat completion message generated by the model.", identifier="ChatCompletionResponseMessage")
|
|
324
|
+
ChatCompletionModerationResults: _StructSchema[_T.ChatCompletionModerationResults, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionModerationResults, {"type": _b.literal("moderation_results").annotate(description="The object type, which is always `moderation_results`."), "model": _S.String.annotate(description="The moderation model used to generate the results."), "results": _b.array(ModerationResultBody).annotate(description="A list of moderation results.")}).annotate(description="Successful moderation results for the request input or generated output.", identifier="ChatCompletionModerationResults")
|
|
325
|
+
Moderation: _StructSchema[_T.Moderation, _t.Never, _t.Never] = _b.struct(_T.Moderation, {"input": _b.union(ModerationResultBody, ModerationErrorBody, mode="one_of").annotate(description="Moderation for the response input."), "output": _b.union(ModerationResultBody, ModerationErrorBody, mode="one_of").annotate(description="Moderation for the response output.")}).annotate(title="Moderation", description="Moderation results or errors for the response input and output.", identifier="Moderation")
|
|
326
|
+
ChatCompletionRequestDeveloperMessage: _StructSchema[_T.ChatCompletionRequestDeveloperMessage, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestDeveloperMessage, {"content": _b.union(_S.String.annotate(title="Text content", description="The contents of the developer message."), _b.check(_b.array(ChatCompletionRequestMessageContentPartText).annotate(title="Array of content parts", description="An array of content parts with a defined type. For developer messages, only type `text` is supported."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), mode="one_of").annotate(description="The contents of the developer message."), "role": _b.literal("developer").annotate(description="The role of the messages author, in this case `developer`."), "name": _S.String.annotate(description="An optional name for the participant. Provides the model information to differentiate between participants of the same role.")}, optional=("name",)).annotate(title="Developer message", description="Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, `developer` messages\nreplace the previous `system` messages.\n", identifier="ChatCompletionRequestDeveloperMessage")
|
|
327
|
+
ChatCompletionRequestSystemMessageContentPart: _S.Bottom[_T.ChatCompletionRequestSystemMessageContentPart, _t.Any] = _b.union(ChatCompletionRequestMessageContentPartText, mode="one_of").annotate(identifier="ChatCompletionRequestSystemMessageContentPart")
|
|
328
|
+
ChatCompletionRequestAssistantMessageContentPart: _S.Bottom[_T.ChatCompletionRequestAssistantMessageContentPart, _t.Any] = _b.union(ChatCompletionRequestMessageContentPartText, ChatCompletionRequestMessageContentPartRefusal, mode="one_of").annotate(identifier="ChatCompletionRequestAssistantMessageContentPart")
|
|
329
|
+
ChatCompletionRequestToolMessageContentPart: _S.Bottom[_T.ChatCompletionRequestToolMessageContentPart, _t.Any] = _b.union(ChatCompletionRequestMessageContentPartText, mode="one_of").annotate(identifier="ChatCompletionRequestToolMessageContentPart")
|
|
330
|
+
PredictionContent: _StructSchema[_T.PredictionContent, _t.Never, _t.Never] = _b.struct(_T.PredictionContent, {"type": _b.literal("content").annotate(description="The type of the predicted content you want to provide. This type is\ncurrently always `content`.\n"), "content": _b.union(_S.String.annotate(title="Text content", description="The content used for a Predicted Output. This is often the\ntext of a file you are regenerating with minor changes.\n"), _b.check(_b.array(ChatCompletionRequestMessageContentPartText).annotate(title="Array of content parts", description="An array of content parts with a defined type. Supported options differ based on the [model](https://developers.openai.com/api/docs/models) being used to generate the response. Can contain text inputs."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), mode="one_of").annotate(description="The content that should be matched when generating a model response.\nIf generated tokens would match this content, the entire model response\ncan be returned much more quickly.\n")}).annotate(title="Static Content", description="Static predicted output content, such as the content of a text file that is\nbeing regenerated.\n", identifier="PredictionContent")
|
|
331
|
+
ChatCompletionRequestUserMessageContentPart: _S.Bottom[_T.ChatCompletionRequestUserMessageContentPart, _t.Any] = _b.union(ChatCompletionRequestMessageContentPartText, ChatCompletionRequestMessageContentPartImage, ChatCompletionRequestMessageContentPartAudio, ChatCompletionRequestMessageContentPartFile, mode="one_of").annotate(identifier="ChatCompletionRequestUserMessageContentPart")
|
|
332
|
+
ModelIdsCompaction: _S.Bottom[_T.ModelIdsCompaction, _t.Any] = _b.union(ModelIdsResponses, _S.String, _S.Null).annotate(description="Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models.", identifier="ModelIdsCompaction")
|
|
333
|
+
ModerationPolicyParam: _StructSchema[_T.ModerationPolicyParam, _t.Never, _t.Never] = _b.struct(_T.ModerationPolicyParam, {"input": _b.union(_b.suspend(lambda: ModerationConfigParam).annotate(description="The moderation policy for the response input."), _S.Null), "output": _b.union(_b.suspend(lambda: ModerationConfigParam).annotate(description="The moderation policy for the response output."), _S.Null)}, optional=("input", "output",)).annotate(description="The policy to apply to moderated response input and output.", identifier="ModerationPolicyParam")
|
|
334
|
+
ChatCompletionToolChoiceOption: _S.Bottom[_T.ChatCompletionToolChoiceOption, _t.Any] = _b.union(_b.literals(["none", "auto", "required"]).annotate(title="Tool choice mode", description="`none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.\n"), ChatCompletionAllowedToolsChoice, ChatCompletionNamedToolChoice, ChatCompletionNamedToolChoiceCustom, mode="one_of").annotate(description="Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n", identifier="ChatCompletionToolChoiceOption")
|
|
335
|
+
CreateContainerBody: _StructSchema[_T.CreateContainerBody, _t.Never, _t.Never] = _b.struct(_T.CreateContainerBody, {"name": _S.String.annotate(description="Name of the container to create."), "file_ids": _b.array(_S.String).annotate(description="IDs of files to copy to the container."), "expires_after": _b.struct(_T.CreateContainerBody__expires_after, {"anchor": _b.literal("last_active_at").annotate(description="Time anchor for the expiration time. Currently only 'last_active_at' is supported."), "minutes": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(description="Container expiration time in seconds relative to the 'anchor' time."), "skills": _b.array(_b.union(SkillReferenceParam, InlineSkillParam, mode="one_of")).annotate(description="An optional list of skills referenced by id or inline data."), "memory_limit": _b.literals(["1g", "4g", "16g", "64g"]).annotate(description="Optional memory limit for the container. Defaults to \"1g\"."), "network_policy": _b.union(ContainerNetworkPolicyDisabledParam, ContainerNetworkPolicyAllowlistParam, mode="one_of").annotate(description="Network access policy for the container.")}, optional=("file_ids", "expires_after", "skills", "memory_limit", "network_policy",)).annotate(identifier="CreateContainerBody")
|
|
336
|
+
AutoCodeInterpreterToolParam: _StructSchema[_T.AutoCodeInterpreterToolParam, _t.Never, _t.Never] = _b.struct(_T.AutoCodeInterpreterToolParam, {"type": _b.literal("auto").annotate(description="Always `auto`."), "file_ids": _b.check(_b.array(_S.String).annotate(description="An optional list of uploaded files to make available to your code."), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), "memory_limit": _b.union(_b.suspend(lambda: ContainerMemoryLimit).annotate(description="The memory limit for the code interpreter container."), _S.Null), "network_policy": _b.union(ContainerNetworkPolicyDisabledParam, ContainerNetworkPolicyAllowlistParam, mode="one_of").annotate(description="Network access policy for the container.")}, optional=("file_ids", "memory_limit", "network_policy",)).annotate(title="CodeInterpreterToolAuto", description="Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.", identifier="AutoCodeInterpreterToolParam")
|
|
337
|
+
ContainerAutoParam: _StructSchema[_T.ContainerAutoParam, _t.Never, _t.Never] = _b.struct(_T.ContainerAutoParam, {"type": _b.literal("container_auto").annotate(description="Automatically creates a container for this request"), "file_ids": _b.check(_b.array(_S.String).annotate(description="An optional list of uploaded files to make available to your code."), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), "memory_limit": _b.union(_b.suspend(lambda: ContainerMemoryLimit).annotate(description="The memory limit for the container."), _S.Null), "network_policy": _b.union(ContainerNetworkPolicyDisabledParam, ContainerNetworkPolicyAllowlistParam, mode="one_of").annotate(description="Network access policy for the container."), "skills": _b.check(_b.array(_b.union(SkillReferenceParam, InlineSkillParam, mode="one_of")).annotate(description="An optional list of skills referenced by id or inline data."), _S.is_max_length(200).annotate(expected="a value with a length of at most 200"))}, optional=("file_ids", "memory_limit", "network_policy", "skills",)).annotate(identifier="ContainerAutoParam")
|
|
338
|
+
EvalItemContentItem: _S.Bottom[_T.EvalItemContentItem, _t.Any] = _b.union(EvalItemContentText, InputTextContent, EvalItemContentOutputText, EvalItemInputImage, InputAudio, mode="one_of").annotate(title="Eval content item", description="A single content item: input text, output text, input image, or input audio.\n", identifier="EvalItemContentItem")
|
|
339
|
+
ResponseOutputTextAnnotationAddedEvent: _StructSchema[_T.ResponseOutputTextAnnotationAddedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseOutputTextAnnotationAddedEvent, {"type": _b.literal("response.output_text.annotation.added").annotate(description="The type of the event. Always 'response.output_text.annotation.added'."), "item_id": _S.String.annotate(description="The unique identifier of the item to which the annotation is being added."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response's output array."), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part within the output item."), _S.is_int().annotate(expected="an integer")), "annotation_index": _b.check(_S.Number.annotate(description="The index of the annotation within the content part."), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "annotation": _b.union(Annotation, _S.Null).annotate(description="The annotation object being added. (See annotation schema for details.)")}).annotate(title="ResponseOutputTextAnnotationAddedEvent", description="Emitted when an annotation is added to output text content.\n", identifier="ResponseOutputTextAnnotationAddedEvent")
|
|
340
|
+
OutputTextContent: _StructSchema[_T.OutputTextContent, _t.Never, _t.Never] = _b.struct(_T.OutputTextContent, {"type": _b.literal("output_text").annotate(description="The type of the output text. Always `output_text`."), "text": _S.String.annotate(description="The text output from the model."), "annotations": _b.array(Annotation).annotate(description="The annotations of the text output."), "logprobs": _b.array(LogProb)}).annotate(title="Output text", description="A text output from the model.", identifier="OutputTextContent")
|
|
341
|
+
FunctionAndCustomToolCallOutput: _S.Bottom[_T.FunctionAndCustomToolCallOutput, _t.Any] = _b.union(InputTextContent, InputImageContent, InputFileContent, mode="one_of").annotate(identifier="FunctionAndCustomToolCallOutput")
|
|
342
|
+
InputContent: _S.Bottom[_T.InputContent, _t.Any] = _b.union(InputTextContent, InputImageContent, InputFileContent, mode="one_of").annotate(identifier="InputContent")
|
|
343
|
+
ResponsePromptVariables: _S.Bottom[_T.ResponsePromptVariables, _t.Any] = _b.union(_b.record(_S.String, _b.union(_S.String, InputTextContent, InputImageContent, InputFileContent, mode="one_of")).annotate(title="Prompt Variables", description="Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n"), _S.Null).annotate(identifier="ResponsePromptVariables")
|
|
344
|
+
FunctionToolCallResource: _StructSchema[_T.FunctionToolCallResource, _t.Never, _t.Never] = _b.struct(_T.FunctionToolCallResource, {"id": _S.String.annotate(description="The unique ID of the function tool call.\n"), "type": _b.literal("function_call").annotate(description="The type of the function tool call. Always `function_call`.\n"), "call_id": _S.String.annotate(description="The unique ID of the function tool call generated by the model.\n"), "caller": _b.union(ToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the function to run.\n"), "name": _S.String.annotate(description="The name of the function to run.\n"), "arguments": _S.String.annotate(description="A JSON string of the arguments to pass to the function.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "async": _S.Boolean.annotate(description="Whether the function tool call runs asynchronously.\n"), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.\n")}, optional=("caller", "namespace", "async", "created_by",)).annotate(identifier="FunctionToolCallResource")
|
|
345
|
+
FunctionShellCall: _StructSchema[_T.FunctionShellCall, _t.Never, _t.Never] = _b.struct(_T.FunctionShellCall, {"type": _b.literal("shell_call").annotate(description="The type of the item. Always `shell_call`."), "id": _S.String.annotate(description="The unique ID of the shell tool call. Populated when this item is returned via API."), "call_id": _S.String.annotate(description="The unique ID of the shell tool call generated by the model."), "caller": _b.union(_b.suspend(lambda: ToolCallCaller).annotate(description="The execution context that produced this tool call."), _S.Null), "action": _b.suspend(lambda: FunctionShellAction).annotate(description="The shell commands and limits that describe how to run the tool call."), "status": _b.suspend(lambda: FunctionShellCallStatus).annotate(description="The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."), "environment": _b.union(_b.union(LocalEnvironmentResource, ContainerReferenceResource, mode="one_of"), _S.Null), "created_by": _S.String.annotate(description="The ID of the entity that created this tool call.")}, optional=("caller", "created_by",)).annotate(title="Shell tool call", description="A tool call that executes one or more shell commands in a managed environment.", identifier="FunctionShellCall")
|
|
346
|
+
ApplyPatchToolCall: _StructSchema[_T.ApplyPatchToolCall, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchToolCall, {"type": _b.literal("apply_patch_call").annotate(description="The type of the item. Always `apply_patch_call`."), "id": _S.String.annotate(description="The unique ID of the apply patch tool call. Populated when this item is returned via API."), "call_id": _S.String.annotate(description="The unique ID of the apply patch tool call generated by the model."), "caller": _b.union(_b.suspend(lambda: ToolCallCaller).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.suspend(lambda: ApplyPatchCallStatus).annotate(description="The status of the apply patch tool call. One of `in_progress` or `completed`."), "operation": _b.union(ApplyPatchCreateFileOperation, ApplyPatchDeleteFileOperation, ApplyPatchUpdateFileOperation, mode="one_of").annotate(title="Apply patch operation", description="One of the create_file, delete_file, or update_file operations applied via apply_patch."), "created_by": _S.String.annotate(description="The ID of the entity that created this tool call.")}, optional=("caller", "created_by",)).annotate(title="Apply patch tool call", description="A tool call that applies file diffs by creating, deleting, or updating files.", identifier="ApplyPatchToolCall")
|
|
347
|
+
ApplyPatchToolCallOutput: _StructSchema[_T.ApplyPatchToolCallOutput, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchToolCallOutput, {"type": _b.literal("apply_patch_call_output").annotate(description="The type of the item. Always `apply_patch_call_output`."), "id": _S.String.annotate(description="The unique ID of the apply patch tool call output. Populated when this item is returned via API."), "call_id": _S.String.annotate(description="The unique ID of the apply patch tool call generated by the model."), "caller": _b.union(_b.suspend(lambda: ToolCallCaller).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.suspend(lambda: ApplyPatchCallOutputStatus).annotate(description="The status of the apply patch tool call output. One of `completed` or `failed`."), "output": _b.union(_S.String.annotate(description="Optional textual output returned by the apply patch tool."), _S.Null), "created_by": _S.String.annotate(description="The ID of the entity that created this tool call output.")}, optional=("caller", "output", "created_by",)).annotate(title="Apply patch tool call output", description="The output emitted by an apply patch tool call.", identifier="ApplyPatchToolCallOutput")
|
|
348
|
+
CustomToolCall: _StructSchema[_T.CustomToolCall, _t.Never, _t.Never] = _b.struct(_T.CustomToolCall, {"type": _b.literal("custom_tool_call").annotate(description="The type of the custom tool call. Always `custom_tool_call`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call in the OpenAI platform.\n"), "call_id": _S.String.annotate(description="An identifier used to map this custom tool call to a tool call output.\n"), "caller": _b.union(ToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the custom tool being called.\n"), "name": _S.String.annotate(description="The name of the custom tool being called.\n"), "input": _S.String.annotate(description="The input for the custom tool call generated by the model.\n"), "async": _S.Boolean.annotate(description="Whether the custom tool call runs asynchronously.\n")}, optional=("id", "caller", "namespace", "async",)).annotate(title="Custom tool call", description="A call to a custom tool created by the model.\n", identifier="CustomToolCall")
|
|
349
|
+
FunctionToolCall: _StructSchema[_T.FunctionToolCall, _t.Never, _t.Never] = _b.struct(_T.FunctionToolCall, {"id": _S.String.annotate(description="The unique ID of the function tool call.\n"), "type": _b.literal("function_call").annotate(description="The type of the function tool call. Always `function_call`.\n"), "call_id": _S.String.annotate(description="The unique ID of the function tool call generated by the model.\n"), "caller": _b.union(ToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the function to run.\n"), "name": _S.String.annotate(description="The name of the function to run.\n"), "arguments": _S.String.annotate(description="A JSON string of the arguments to pass to the function.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "async": _S.Boolean.annotate(description="Whether the function tool call runs asynchronously.\n")}, optional=("id", "caller", "namespace", "status", "async",)).annotate(title="Function tool call", description="A tool call to run a function. See the\n[function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information.\n", identifier="FunctionToolCall")
|
|
350
|
+
CustomToolCallResource: _StructSchema[_T.CustomToolCallResource, _t.Never, _t.Never] = _b.struct(_T.CustomToolCallResource, {"type": _b.literal("custom_tool_call").annotate(description="The type of the custom tool call. Always `custom_tool_call`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call item.\n"), "call_id": _S.String.annotate(description="An identifier used to map this custom tool call to a tool call output.\n"), "caller": _b.union(ToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the custom tool being called.\n"), "name": _S.String.annotate(description="The name of the custom tool being called.\n"), "input": _S.String.annotate(description="The input for the custom tool call generated by the model.\n"), "async": _S.Boolean.annotate(description="Whether the custom tool call runs asynchronously.\n"), "status": _b.suspend(lambda: FunctionCallStatus).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.\n")}, optional=("caller", "namespace", "async", "created_by",)).annotate(title="ResponseCustomToolCallItem", identifier="CustomToolCallResource")
|
|
351
|
+
ComputerAction: _S.Bottom[_T.ComputerAction, _t.Any] = _b.union(ClickParam, DoubleClickAction, DragParam, KeyPressAction, MoveParam, ScreenshotParam, ScrollParam, TypeParam, WaitParam, mode="one_of").annotate(identifier="ComputerAction")
|
|
352
|
+
FileSearchTool: _StructSchema[_T.FileSearchTool, _t.Never, _t.Never] = _b.struct(_T.FileSearchTool, {"type": _b.literal("file_search").annotate(description="The type of the file search tool. Always `file_search`."), "vector_store_ids": _b.array(_S.String).annotate(description="The IDs of the vector stores to search."), "max_num_results": _b.check(_S.Number.annotate(description="The maximum number of results to return. This number should be between 1 and 50 inclusive."), _S.is_int().annotate(expected="an integer")), "ranking_options": _b.suspend(lambda: RankingOptions).annotate(description="Ranking options for search."), "filters": _b.union(_b.suspend(lambda: Filters).annotate(description="A filter to apply."), _S.Null)}, optional=("max_num_results", "ranking_options", "filters",)).annotate(title="File search", description="A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search).", identifier="FileSearchTool")
|
|
353
|
+
CustomToolParam: _StructSchema[_T.CustomToolParam, _t.Never, _t.Never] = _b.struct(_T.CustomToolParam, {"type": _b.literal("custom").annotate(description="The type of the custom tool. Always `custom`."), "name": _S.String.annotate(description="The name of the custom tool, used to identify it in tool calls."), "async": _S.Boolean.annotate(description="Whether the tool response can be returned asynchronously versus immediately returned on next response creation."), "description": _S.String.annotate(description="Optional description of the custom tool, used to provide more context."), "format": _b.union(CustomTextFormatParam, CustomGrammarFormatParam, mode="one_of").annotate(description="The input format for the custom tool. Default is unconstrained text."), "defer_loading": _S.Boolean.annotate(description="Whether this tool should be deferred and discovered via tool search."), "allowed_callers": _b.union(_b.check(_b.array(CallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null)}, optional=("async", "description", "format", "defer_loading", "allowed_callers",)).annotate(title="Custom tool", description="A custom tool that processes input using a specified format. Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)", identifier="CustomToolParam")
|
|
354
|
+
FunctionShellCallOutput: _StructSchema[_T.FunctionShellCallOutput, _t.Never, _t.Never] = _b.struct(_T.FunctionShellCallOutput, {"type": _b.literal("shell_call_output").annotate(description="The type of the shell call output. Always `shell_call_output`."), "id": _S.String.annotate(description="The unique ID of the shell call output. Populated when this item is returned via API."), "call_id": _S.String.annotate(description="The unique ID of the shell tool call generated by the model."), "caller": _b.union(_b.suspend(lambda: ToolCallCaller).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.suspend(lambda: FunctionShellCallOutputStatusEnum).annotate(description="The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`."), "output": _b.array(FunctionShellCallOutputContent).annotate(description="An array of shell call output contents"), "max_output_length": _b.union(_b.check(_S.Number.annotate(description="The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output."), _S.is_int().annotate(expected="an integer")), _S.Null), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.")}, optional=("caller", "created_by",)).annotate(title="Shell call output", description="The output of a shell tool call that was emitted.", identifier="FunctionShellCallOutput")
|
|
355
|
+
ResponseShellCallOutputContentDoneStreamingEvent: _StructSchema[_T.ResponseShellCallOutputContentDoneStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseShellCallOutputContentDoneStreamingEvent, {"type": _b.literal("response.shell_call_output_content.done").annotate(description="The type of the event, always `response.shell_call_output_content.done`."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the event that was emitted."), _S.is_int().annotate(expected="an integer")), "item_id": _S.String.annotate(description="The ID of the output item that was updated."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was updated."), _S.is_int().annotate(expected="an integer")), "command_index": _b.check(_S.Number.annotate(description="The index of the shell command that produced output."), _S.is_int().annotate(expected="an integer")), "output": _b.array(FunctionShellCallOutputContent).annotate(description="The output contents emitted for the shell command.")}).annotate(title="Response shell call output content done event", description="A streaming event that indicated shell call output was completed.", identifier="ResponseShellCallOutputContentDoneStreamingEvent")
|
|
356
|
+
MCPToolCall: _StructSchema[_T.MCPToolCall, _t.Never, _t.Never] = _b.struct(_T.MCPToolCall, {"type": _b.literal("mcp_call").annotate(description="The type of the item. Always `mcp_call`.\n"), "id": _S.String.annotate(description="The unique ID of the tool call.\n"), "server_label": _S.String.annotate(description="The label of the MCP server running the tool.\n"), "name": _S.String.annotate(description="The name of the tool that was run.\n"), "arguments": _S.String.annotate(description="A JSON string of the arguments passed to the tool.\n"), "output": _b.union(_S.String.annotate(description="The output from the tool call.\n"), _S.Null), "error": _b.union(MCPToolCallError, _S.Null).annotate(description="The error from the tool call, if any."), "status": _b.suspend(lambda: MCPToolCallStatus).annotate(description="The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"), "approval_request_id": _b.union(_S.String.annotate(description="Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n"), _S.Null)}, optional=("output", "error", "status", "approval_request_id",)).annotate(title="MCP tool call", description="An invocation of a tool on an MCP server.\n", identifier="MCPToolCall")
|
|
357
|
+
FunctionShellCallOutputContentParam: _StructSchema[_T.FunctionShellCallOutputContentParam, _t.Never, _t.Never] = _b.struct(_T.FunctionShellCallOutputContentParam, {"stdout": _b.check(_S.String.annotate(description="Captured stdout output for the shell call."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), "stderr": _b.check(_S.String.annotate(description="Captured stderr output for the shell call."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), "outcome": _b.suspend(lambda: FunctionShellCallOutputOutcomeParam).annotate(description="The exit or timeout outcome associated with this shell call.")}).annotate(title="Shell output content", description="Captured stdout and stderr for a portion of a shell tool call output.", identifier="FunctionShellCallOutputContentParam")
|
|
358
|
+
EvalRunOutputItemList: _StructSchema[_T.EvalRunOutputItemList, _t.Never, _t.Never] = _b.struct(_T.EvalRunOutputItemList, {"object": _b.literal("list").annotate(description="The type of this object. It is always set to \"list\".\n"), "data": _b.array(EvalRunOutputItem).annotate(description="An array of eval run output item objects.\n"), "first_id": _S.String.annotate(description="The identifier of the first eval run output item in the data array."), "last_id": _S.String.annotate(description="The identifier of the last eval run output item in the data array."), "has_more": _S.Boolean.annotate(description="Indicates whether there are more eval run output items available.")}).annotate(title="EvalRunOutputItemList", description="An object representing a list of output items for an evaluation run.\n", identifier="EvalRunOutputItemList")
|
|
359
|
+
ImagesResponse: _StructSchema[_T.ImagesResponse, _t.Never, _t.Never] = _b.struct(_T.ImagesResponse, {"created": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the image was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "data": _b.array(Image).annotate(description="The list of generated images."), "background": _b.literals(["transparent", "opaque"]).annotate(description="The background parameter used for the image generation. Either `transparent` or `opaque`."), "output_format": _b.literals(["png", "webp", "jpeg"]).annotate(description="The output format of the image generation. Either `png`, `webp`, or `jpeg`."), "size": _b.union(_S.String, _b.literals(["1024x1024", "1024x1536", "1536x1024"])).annotate(description="The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`."), "quality": _b.literals(["low", "medium", "high", "xhigh", "max"]).annotate(description="The quality of the image generated. One of `low`, `medium`, `high`, `xhigh`, or `max`."), "usage": ImageGenUsage}, optional=("data", "background", "output_format", "size", "quality", "usage",)).annotate(title="Image generation response", description="The response from the image generation endpoint.", identifier="ImagesResponse")
|
|
360
|
+
ImageEditStreamEvent: _S.Bottom[_T.ImageEditStreamEvent, _t.Any] = _b.union(ImageEditPartialImageEvent, ImageEditCompletedEvent).annotate(identifier="ImageEditStreamEvent")
|
|
361
|
+
ImageGenStreamEvent: _S.Bottom[_T.ImageGenStreamEvent, _t.Any] = _b.union(ImageGenPartialImageEvent, ImageGenCompletedEvent).annotate(identifier="ImageGenStreamEvent")
|
|
362
|
+
LiveMediaSessionAudioParam: _StructSchema[_T.LiveMediaSessionAudioParam, _t.Never, _t.Never] = _b.struct(_T.LiveMediaSessionAudioParam, {"output": LiveInitialSessionAudioOutputParam}, optional=("output",)).annotate(description="Startup audio output configuration. WebRTC and SIP negotiate the media format; audio.format is only accepted for primary WebSockets. Voice cannot change after startup.", identifier="LiveMediaSessionAudioParam")
|
|
363
|
+
LiveHostedShellContainerAutoParam: _StructSchema[_T.LiveHostedShellContainerAutoParam, _t.Never, _t.Never] = _b.struct(_T.LiveHostedShellContainerAutoParam, {"type": _b.literal("container_auto").annotate(description="Automatically creates a container for this request"), "file_ids": _b.union(_b.check(_b.array(_S.String).annotate(description="An optional list of uploaded files to make available to your code."), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), _S.Null), "memory_limit": _b.union(_b.suspend(lambda: LiveContainerMemoryLimit).annotate(description="The memory limit for the container."), _S.Null), "network_policy": _b.union(_b.union(LiveContainerNetworkPolicyDisabledParam, LiveHostedShellNetworkPolicyAllowlistParam, mode="one_of").annotate(description="Network access policy for the container."), _S.Null), "skills": _b.union(_b.check(_b.array(_b.union(LiveSkillReferenceParam, LiveInlineSkillParam, mode="one_of")).annotate(description="An optional list of skills referenced by id or inline data."), _S.is_max_length(200).annotate(expected="a value with a length of at most 200")), _S.Null)}, optional=("file_ids", "memory_limit", "network_policy", "skills",)).annotate(identifier="LiveHostedShellContainerAutoParam")
|
|
364
|
+
LiveInitialItem: _S.Bottom[_T.LiveInitialItem, _t.Any] = _b.union(LiveInitialDeveloperMessageItemParam, LiveInitialUserMessageItemParam, LiveInitialAssistantMessageItemParam, mode="one_of").annotate(description="A developer, user, or assistant message supplied as text history before the Live session starts.", identifier="LiveInitialItem")
|
|
365
|
+
LiveClientConfigParam: _StructSchema[_T.LiveClientConfigParam, _t.Never, _t.Never] = _b.struct(_T.LiveClientConfigParam, {"data_channel": _b.suspend(lambda: LiveDataChannelConfigParam).annotate(description="Client and server event permissions for the WebRTC frontend data channel.")}).annotate(description="Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.", identifier="LiveClientConfigParam")
|
|
366
|
+
LiveSIPTransport: _StructSchema[_T.LiveSIPTransport, _t.Never, _t.Never] = _b.struct(_T.LiveSIPTransport, {"type": _b.literal("sip").annotate(description="The transport used for the Live session. Always `sip`."), "destination": _b.check(_S.String.annotate(description="Phone number to call in E.164 format. SIP URI destinations are not supported."), _b.js_pattern('^\\+[1-9][0-9]{1,14}\\Z', '^\\+[1-9][0-9]{1,14}$').annotate(expected="a string matching the RegExp ^\\+[1-9][0-9]{1,14}$")), "trunk": LiveSIPTrunk}).annotate(description="Place an outbound SIP call using your provider's trunk. Outbound SIP calling must be enabled for your organization. The trunk must support TLS signaling, Opus audio, and SDES-SRTP media. See [Telephony and SIP](https://developers.openai.com/api/docs/guides/voice-sip?api=live#place-an-outbound-call).", identifier="LiveSIPTransport")
|
|
367
|
+
AuditLogActor: _StructSchema[_T.AuditLogActor, _t.Never, _t.Never] = _b.struct(_T.AuditLogActor, {"type": _b.literals(["session", "api_key"]).annotate(description="The type of actor. Is either `session` or `api_key`."), "session": AuditLogActorSession, "api_key": AuditLogActorApiKey}, optional=("type", "session", "api_key",)).annotate(description="The actor who performed the audit logged action.", identifier="AuditLogActor")
|
|
368
|
+
UsageResponse: _StructSchema[_T.UsageResponse, _t.Never, _t.Never] = _b.struct(_T.UsageResponse, {"object": _b.literal("page"), "data": _b.array(UsageTimeBucket), "has_more": _S.Boolean, "next_page": _b.union(_S.String, _S.Null)}).annotate(identifier="UsageResponse")
|
|
369
|
+
ProjectListResponse: _StructSchema[_T.ProjectListResponse, _t.Never, _t.Never] = _b.struct(_T.ProjectListResponse, {"object": _b.literal("list"), "data": _b.array(Project), "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean}, optional=("first_id", "last_id",)).annotate(identifier="ProjectListResponse")
|
|
370
|
+
ProjectApiKeyListResponse: _StructSchema[_T.ProjectApiKeyListResponse, _t.Never, _t.Never] = _b.struct(_T.ProjectApiKeyListResponse, {"object": _b.literal("list"), "data": _b.array(ProjectApiKey), "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean}, optional=("first_id", "last_id",)).annotate(identifier="ProjectApiKeyListResponse")
|
|
371
|
+
ProjectSpendAlertListResource: _StructSchema[_T.ProjectSpendAlertListResource, _t.Never, _t.Never] = _b.struct(_T.ProjectSpendAlertListResource, {"object": _b.literal("list").annotate(description="Always `list`."), "data": _b.array(ProjectSpendAlert).annotate(description="Spend alerts returned in the current page."), "first_id": _b.union(_S.String, _S.Null).annotate(description="The ID of the first spend alert in this page."), "last_id": _b.union(_S.String, _S.Null).annotate(description="The ID of the last spend alert in this page."), "has_more": _S.Boolean.annotate(description="Whether more spend alerts are available when paginating.")}).annotate(description="Paginated list of project spend alerts.", identifier="ProjectSpendAlertListResource")
|
|
372
|
+
OrganizationSpendAlertListResource: _StructSchema[_T.OrganizationSpendAlertListResource, _t.Never, _t.Never] = _b.struct(_T.OrganizationSpendAlertListResource, {"object": _b.literal("list").annotate(description="Always `list`."), "data": _b.array(OrganizationSpendAlert).annotate(description="Spend alerts returned in the current page."), "first_id": _b.union(_S.String, _S.Null).annotate(description="The ID of the first spend alert in this page."), "last_id": _b.union(_S.String, _S.Null).annotate(description="The ID of the last spend alert in this page."), "has_more": _S.Boolean.annotate(description="Whether more spend alerts are available when paginating.")}).annotate(description="Paginated list of organization spend alerts.", identifier="OrganizationSpendAlertListResource")
|
|
373
|
+
RealtimeTranslationClientSecretCreateRequest: _StructSchema[_T.RealtimeTranslationClientSecretCreateRequest, _t.Never, _t.Never] = _b.struct(_T.RealtimeTranslationClientSecretCreateRequest, {"expires_after": _b.struct(_T.RealtimeTranslationClientSecretCreateRequest__expires_after, {"anchor": _b.literal("created_at").annotate(description="The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.\n"), "seconds": _b.check(_b.check(_b.check(_S.Number.annotate(description="The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.\n", format="int64"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(10).annotate(expected="a value greater than or equal to 10")), _S.is_less_than_or_equal_to(7200).annotate(expected="a value less than or equal to 7200"))}, optional=("anchor", "seconds",)).annotate(title="Client secret expiration", description="Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.\n"), "session": RealtimeTranslationSessionCreateRequest}, optional=("expires_after",)).annotate(title="Realtime translation client secret creation request", description="Create a translation session and client secret for the Realtime API.\n", identifier="RealtimeTranslationClientSecretCreateRequest")
|
|
374
|
+
RealtimeTranslationClientSecretCreateResponse: _StructSchema[_T.RealtimeTranslationClientSecretCreateResponse, _t.Never, _t.Never] = _b.struct(_T.RealtimeTranslationClientSecretCreateResponse, {"value": _S.String.annotate(description="The generated client secret value."), "expires_at": _b.check(_S.Number.annotate(description="Expiration timestamp for the client secret, in seconds since epoch.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "session": RealtimeTranslationSession}).annotate(title="Realtime translation session and client secret", description="Response from creating a translation session and client secret for the Realtime API.\n", identifier="RealtimeTranslationClientSecretCreateResponse")
|
|
375
|
+
PromptCacheDiagnostics: _S.Bottom[_T.PromptCacheDiagnostics, _t.Any] = _b.union(PromptCacheMissDiagnosticsBody, PromptCacheHitDiagnosticsBody, PromptCacheComparisonResponseNotFoundDiagnosticsBody, PromptCacheUnavailableDiagnosticsBody, mode="one_of").annotate(description="Prompt cache diagnostics requested for this response.", identifier="PromptCacheDiagnostics")
|
|
376
|
+
CreateThreadRequest: _StructSchema[_T.CreateThreadRequest, _t.Never, _t.Never] = _b.struct(_T.CreateThreadRequest, {"messages": _b.array(CreateMessageRequest).annotate(description="A list of [messages](https://developers.openai.com/api/docs/assistants/migration) to start the thread with."), "tool_resources": _b.union(_b.struct(_T.CreateThreadRequest__tool_resources__0, {"code_interpreter": _b.struct(_T.CreateThreadRequest__tool_resources__0__code_interpreter, {"file_ids": _b.check(_b.array(_S.String).annotate(description="A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n"), _S.is_max_length(20).annotate(expected="a value with a length of at most 20"))}, optional=("file_ids",)), "file_search": _b.union(_b.struct(_T.CreateThreadRequest__tool_resources__0__file_search__0, {"vector_store_ids": _b.check(_b.array(_S.String).annotate(description="The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1")), "vector_stores": _b.check(_b.array(_b.struct(_T.CreateThreadRequest__tool_resources__0__file_search__0__vector_stores__item, {"file_ids": _b.check(_b.array(_S.String).annotate(description="A list of [file](https://developers.openai.com/api/reference/resources/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files.\n"), _S.is_max_length(100000000).annotate(expected="a value with a length of at most 100000000")), "chunking_strategy": _b.union(_b.struct(_T.CreateThreadRequest__tool_resources__0__file_search__0__vector_stores__item__chunking_strategy__0, {"type": _b.literal("auto").annotate(description="Always `auto`.")}).annotate(title="Auto Chunking Strategy", description="The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`."), _b.struct(_T.CreateThreadRequest__tool_resources__0__file_search__0__vector_stores__item__chunking_strategy__1, {"type": _b.literal("static").annotate(description="Always `static`."), "static": _b.struct(_T.CreateThreadRequest__tool_resources__0__file_search__0__vector_stores__item__chunking_strategy__1__static, {"max_chunk_size_tokens": _b.check(_b.check(_b.check(_S.Number.annotate(description="The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(100).annotate(expected="a value greater than or equal to 100")), _S.is_less_than_or_equal_to(4096).annotate(expected="a value less than or equal to 4096")), "chunk_overlap_tokens": _b.check(_S.Number.annotate(description="The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.\n"), _S.is_int().annotate(expected="an integer"))})}).annotate(title="Static Chunking Strategy"), mode="one_of").annotate(description="The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy."), "metadata": Metadata}, optional=("file_ids", "chunking_strategy", "metadata",))).annotate(description="A helper to create a [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1"))}, optional=("vector_stores",)), _b.struct(_T.CreateThreadRequest__tool_resources__0__file_search__1, {"vector_store_ids": _b.check(_b.array(_S.String).annotate(description="The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1")), "vector_stores": _b.check(_b.array(_b.struct(_T.CreateThreadRequest__tool_resources__0__file_search__1__vector_stores__item, {"file_ids": _b.check(_b.array(_S.String).annotate(description="A list of [file](https://developers.openai.com/api/reference/resources/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files.\n"), _S.is_max_length(100000000).annotate(expected="a value with a length of at most 100000000")), "chunking_strategy": _b.union(_b.struct(_T.CreateThreadRequest__tool_resources__0__file_search__1__vector_stores__item__chunking_strategy__0, {"type": _b.literal("auto").annotate(description="Always `auto`.")}).annotate(title="Auto Chunking Strategy", description="The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`."), _b.struct(_T.CreateThreadRequest__tool_resources__0__file_search__1__vector_stores__item__chunking_strategy__1, {"type": _b.literal("static").annotate(description="Always `static`."), "static": _b.struct(_T.CreateThreadRequest__tool_resources__0__file_search__1__vector_stores__item__chunking_strategy__1__static, {"max_chunk_size_tokens": _b.check(_b.check(_b.check(_S.Number.annotate(description="The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(100).annotate(expected="a value greater than or equal to 100")), _S.is_less_than_or_equal_to(4096).annotate(expected="a value less than or equal to 4096")), "chunk_overlap_tokens": _b.check(_S.Number.annotate(description="The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.\n"), _S.is_int().annotate(expected="an integer"))})}).annotate(title="Static Chunking Strategy"), mode="one_of").annotate(description="The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy."), "metadata": Metadata}, optional=("file_ids", "chunking_strategy", "metadata",))).annotate(description="A helper to create a [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1"))}, optional=("vector_store_ids",)), mode="one_of")}, optional=("code_interpreter", "file_search",)).annotate(description="A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n"), _S.Null), "metadata": Metadata}, optional=("messages", "tool_resources", "metadata",)).annotate(description="Options to create a new thread. If no thread is provided when running a\nrequest, an empty thread will be created.\n", identifier="CreateThreadRequest")
|
|
377
|
+
RunStepDeltaStepDetailsToolCallsObject: _StructSchema[_T.RunStepDeltaStepDetailsToolCallsObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDeltaStepDetailsToolCallsObject, {"type": _b.literal("tool_calls").annotate(description="Always `tool_calls`."), "tool_calls": _b.array(_b.union(RunStepDeltaStepDetailsToolCallsCodeObject, RunStepDeltaStepDetailsToolCallsFileSearchObject, RunStepDeltaStepDetailsToolCallsFunctionObject, mode="one_of")).annotate(description="An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.\n")}, optional=("tool_calls",)).annotate(title="Tool calls", description="Details of the tool call.", identifier="RunStepDeltaStepDetailsToolCallsObject")
|
|
378
|
+
MessageObject: _StructSchema[_T.MessageObject, _t.Never, _t.Never] = _b.struct(_T.MessageObject, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints."), "object": _b.literal("thread.message").annotate(description="The object type, which is always `thread.message`."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the message was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "thread_id": _S.String.annotate(description="The [thread](https://developers.openai.com/api/docs/assistants/migration) ID that this message belongs to."), "status": _b.literals(["in_progress", "incomplete", "completed"]).annotate(description="The status of the message, which can be either `in_progress`, `incomplete`, or `completed`."), "incomplete_details": _b.union(_b.struct(_T.MessageObject__incomplete_details__0, {"reason": _b.literals(["content_filter", "max_tokens", "run_cancelled", "run_expired", "run_failed"]).annotate(description="The reason the message is incomplete.")}).annotate(description="On an incomplete message, details about why the message is incomplete."), _S.Null), "completed_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the message was completed.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "incomplete_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the message was marked as incomplete.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "role": _b.literals(["user", "assistant"]).annotate(description="The entity that produced the message. One of `user` or `assistant`."), "content": _b.array(_b.union(MessageContentImageFileObject, MessageContentImageUrlObject, MessageContentTextObject, MessageContentRefusalObject, mode="one_of")).annotate(description="The content of the message in array of text and/or images."), "assistant_id": _b.union(_S.String.annotate(description="If applicable, the ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) that authored this message."), _S.Null), "run_id": _b.union(_S.String.annotate(description="The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints."), _S.Null), "attachments": _b.union(_b.array(_b.struct(_T.MessageObject__attachments__0__item, {"file_id": _S.String.annotate(description="The ID of the file to attach to the message."), "tools": _b.array(_b.union(AssistantToolsCode, AssistantToolsFileSearchTypeOnly, mode="one_of")).annotate(description="The tools to add this file to.")}, optional=("file_id", "tools",))).annotate(description="A list of files attached to the message, and the tools they were added to."), _S.Null), "metadata": Metadata}).annotate(title="The message object", description="Represents a message within a [thread](https://developers.openai.com/api/docs/assistants/migration).", identifier="MessageObject")
|
|
379
|
+
MessageDeltaObject: _StructSchema[_T.MessageDeltaObject, _t.Never, _t.Never] = _b.struct(_T.MessageDeltaObject, {"id": _S.String.annotate(description="The identifier of the message, which can be referenced in API endpoints."), "object": _b.literal("thread.message.delta").annotate(description="The object type, which is always `thread.message.delta`."), "delta": _b.struct(_T.MessageDeltaObject__delta, {"role": _b.literals(["user", "assistant"]).annotate(description="The entity that produced the message. One of `user` or `assistant`."), "content": _b.array(_b.union(MessageDeltaContentImageFileObject, MessageDeltaContentTextObject, MessageDeltaContentRefusalObject, MessageDeltaContentImageUrlObject, mode="one_of")).annotate(description="The content of the message in array of text and/or images.")}, optional=("role", "content",)).annotate(description="The delta containing the fields that have changed on the Message.")}).annotate(title="Message delta object", description="Represents a message delta i.e. any changed fields on a message during streaming.\n", identifier="MessageDeltaObject")
|
|
380
|
+
ListVectorStoresResponse: _S.Bottom[_T.ListVectorStoresResponse, _t.Any] = _b.union(_S.Null, _S.String, _S.Finite, _S.Boolean, _b.struct_with_rest(_b.struct(_T.ListVectorStoresResponse__4, {"object": _S.String, "data": _b.array(VectorStoreObject), "first_id": _S.String, "last_id": _S.String, "has_more": _S.Boolean}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _b.array(_S.Json.annotate(expected="JSON value"))).annotate(identifier="ListVectorStoresResponse")
|
|
381
|
+
CreateVectorStoreRequest: _StructSchema[_T.CreateVectorStoreRequest, _t.Never, _t.Never] = _b.struct(_T.CreateVectorStoreRequest, {"file_ids": _b.check(_b.array(_S.String).annotate(description="A list of [File](https://developers.openai.com/api/reference/resources/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files."), _S.is_max_length(500).annotate(expected="a value with a length of at most 500")), "name": _S.String.annotate(description="The name of the vector store."), "description": _S.String.annotate(description="A description for the vector store. Can be used to describe the vector store's purpose."), "expires_after": VectorStoreExpirationAfter, "chunking_strategy": _b.union(AutoChunkingStrategyRequestParam, StaticChunkingStrategyRequestParam, mode="one_of").annotate(description="The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty."), "metadata": Metadata}, optional=("file_ids", "name", "description", "expires_after", "chunking_strategy", "metadata",)).annotate(identifier="CreateVectorStoreRequest")
|
|
382
|
+
ChunkingStrategyRequestParam: _S.Bottom[_T.ChunkingStrategyRequestParam, _t.Any] = _b.union(AutoChunkingStrategyRequestParam, StaticChunkingStrategyRequestParam, mode="one_of").annotate(description="The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.", identifier="ChunkingStrategyRequestParam")
|
|
383
|
+
VectorStoreFileObject: _StructSchema[_T.VectorStoreFileObject, _t.Never, _t.Never] = _b.struct(_T.VectorStoreFileObject, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints."), "object": _b.literal("vector_store.file").annotate(description="The object type, which is always `vector_store.file`."), "usage_bytes": _b.check(_S.Number.annotate(description="The total vector store usage in bytes. Note that this may be different from the original file size."), _S.is_int().annotate(expected="an integer")), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the vector store file was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "vector_store_id": _S.String.annotate(description="The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) that the [File](https://developers.openai.com/api/reference/resources/files) is attached to."), "status": _b.literals(["in_progress", "completed", "cancelled", "failed"]).annotate(description="The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use."), "last_error": _b.union(_b.struct(_T.VectorStoreFileObject__last_error__0, {"code": _b.literals(["server_error", "unsupported_file", "invalid_file"]).annotate(description="One of `server_error`, `unsupported_file`, or `invalid_file`."), "message": _S.String.annotate(description="A human-readable description of the error.")}).annotate(description="The last error associated with this vector store file. Will be `null` if there are no errors."), _S.Null), "chunking_strategy": _b.union(StaticChunkingStrategyResponseParam, OtherChunkingStrategyResponseParam, mode="one_of").annotate(description="The strategy used to chunk the file."), "attributes": VectorStoreFileAttributes}, optional=("chunking_strategy", "attributes",)).annotate(title="Vector store files", description="A list of files attached to a vector store.", identifier="VectorStoreFileObject")
|
|
384
|
+
VectorStoreSearchResultsPage: _StructSchema[_T.VectorStoreSearchResultsPage, _t.Never, _t.Never] = _b.struct(_T.VectorStoreSearchResultsPage, {"object": _b.literal("vector_store.search_results.page").annotate(description="The object type, which is always `vector_store.search_results.page`"), "search_query": _b.array(_S.String.annotate(description="The query used for this search.")), "data": _b.array(VectorStoreSearchResultItem).annotate(description="The list of search result items."), "has_more": _S.Boolean.annotate(description="Indicates if there are more results to fetch."), "next_page": _b.union(_S.String.annotate(description="The token for the next page, if any."), _S.Null)}).annotate(identifier="VectorStoreSearchResultsPage")
|
|
385
|
+
SafetyCaseResource: _StructSchema[_T.SafetyCaseResource, _t.Never, _t.Never] = _b.struct(_T.SafetyCaseResource, {"id": _S.String, "object": _b.literal("safety.case"), "created_at": _b.check(_S.Number.annotate(format="unixtime"), _S.is_int().annotate(expected="an integer")), "entity_identifier": _S.String, "reason": _b.union(_S.String, _S.Null), "notice": SafetyCaseNotice}).annotate(identifier="SafetyCaseResource")
|
|
386
|
+
DecisionsUsageBucket: _StructSchema[_T.DecisionsUsageBucket, _t.Never, _t.Never] = _b.struct(_T.DecisionsUsageBucket, {"object": _b.literal("bucket"), "start_time": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "end_time": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "results": _b.array(DecisionsUsageResult)}).annotate(identifier="DecisionsUsageBucket")
|
|
387
|
+
ExternalStorageListResource: _StructSchema[_T.ExternalStorageListResource, _t.Never, _t.Never] = _b.struct(_T.ExternalStorageListResource, {"object": _b.literal("list"), "data": _b.array(ExternalStorageResponse), "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean}).annotate(identifier="ExternalStorageListResource")
|
|
388
|
+
OrganizationSpendLimitResource: _StructSchema[_T.OrganizationSpendLimitResource, _t.Never, _t.Never] = _b.struct(_T.OrganizationSpendLimitResource, {"object": _b.literal("organization.spend_limit").annotate(description="The object type, which is always `organization.spend_limit`."), "threshold_amount": _b.check(_S.Number.annotate(description="The hard spend limit amount, in cents."), _S.is_int().annotate(expected="an integer")), "currency": _b.suspend(lambda: SpendLimitCurrency).annotate(description="The currency for the threshold amount. Currently, only `USD` is supported."), "interval": _b.suspend(lambda: SpendLimitInterval).annotate(description="The time interval for evaluating spend against the threshold. Currently, only `month` is supported."), "enforcement": _b.suspend(lambda: SpendLimitEnforcement).annotate(description="The current enforcement state of the hard spend limit.")}).annotate(description="Represents a hard spend limit configured at the organization level.", identifier="OrganizationSpendLimitResource")
|
|
389
|
+
ProjectSpendLimitResource: _StructSchema[_T.ProjectSpendLimitResource, _t.Never, _t.Never] = _b.struct(_T.ProjectSpendLimitResource, {"object": _b.literal("project.spend_limit").annotate(description="The object type, which is always `project.spend_limit`."), "threshold_amount": _b.check(_S.Number.annotate(description="The hard spend limit amount, in cents."), _S.is_int().annotate(expected="an integer")), "currency": _b.suspend(lambda: SpendLimitCurrency).annotate(description="The currency for the threshold amount. Currently, only `USD` is supported."), "interval": _b.suspend(lambda: SpendLimitInterval).annotate(description="The time interval for evaluating spend against the threshold. Currently, only `month` is supported."), "enforcement": _b.suspend(lambda: SpendLimitEnforcement).annotate(description="The current enforcement state of the hard spend limit.")}).annotate(description="Represents a hard spend limit configured at the project level.", identifier="ProjectSpendLimitResource")
|
|
390
|
+
ProvenanceResource: _StructSchema[_T.ProvenanceResource, _t.Never, _t.Never] = _b.struct(_T.ProvenanceResource, {"object": _b.suspend(lambda: ProvenanceCheckObject).annotate(description="The object type. Always `content_provenance_check` for this endpoint."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the provenance check was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "results": _b.array(_b.union(C2PAProvenanceResult, SynthIDProvenanceResult, mode="one_of")).annotate(description="The provenance results that apply to the uploaded file. Image results include C2PA and SynthID; audio results include SynthID.")}).annotate(identifier="ProvenanceResource")
|
|
391
|
+
ChatSessionResource: _StructSchema[_T.ChatSessionResource, _t.Never, _t.Never] = _b.struct(_T.ChatSessionResource, {"id": _S.String.annotate(description="Identifier for the ChatKit session."), "object": _b.literal("chatkit.session").annotate(description="Type discriminator that is always `chatkit.session`."), "expires_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) for when the session expires.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "client_secret": _S.String.annotate(description="Ephemeral client secret that authenticates session requests."), "workflow": _b.suspend(lambda: ChatkitWorkflow).annotate(description="Workflow metadata for the session."), "user": _S.String.annotate(description="User identifier associated with the session."), "rate_limits": _b.suspend(lambda: ChatSessionRateLimits).annotate(description="Resolved rate limit values."), "max_requests_per_1_minute": _b.check(_S.Number.annotate(description="Convenience copy of the per-minute request limit."), _S.is_int().annotate(expected="an integer")), "status": _b.suspend(lambda: ChatSessionStatus).annotate(description="Current lifecycle state of the session."), "chatkit_configuration": _b.suspend(lambda: ChatSessionChatkitConfiguration).annotate(description="Resolved ChatKit feature configuration for the session.")}).annotate(title="The chat session object", description="Represents a ChatKit session and its resolved configuration.", identifier="ChatSessionResource")
|
|
392
|
+
CreateChatSessionBody: _StructSchema[_T.CreateChatSessionBody, _t.Never, _t.Never] = _b.struct(_T.CreateChatSessionBody, {"workflow": _b.suspend(lambda: WorkflowParam).annotate(description="Workflow that powers the session."), "user": _b.check(_S.String.annotate(description="A free-form string that identifies your end user; ensures this Session can access other objects that have the same `user` scope."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "expires_after": _b.suspend(lambda: ExpiresAfterParam).annotate(description="Optional override for session expiration timing in seconds from creation. Defaults to 10 minutes."), "rate_limits": _b.suspend(lambda: RateLimitsParam).annotate(description="Optional override for per-minute request limits. When omitted, defaults to 10."), "chatkit_configuration": _b.suspend(lambda: ChatkitConfigurationParam).annotate(description="Optional overrides for ChatKit runtime configuration features")}, optional=("expires_after", "rate_limits", "chatkit_configuration",)).annotate(title="Create chat session request", description="Parameters for provisioning a new ChatKit session.", identifier="CreateChatSessionBody")
|
|
393
|
+
UserMessageItem: _StructSchema[_T.UserMessageItem, _t.Never, _t.Never] = _b.struct(_T.UserMessageItem, {"id": _S.String.annotate(description="Identifier of the thread item."), "object": _b.literal("chatkit.thread_item").annotate(description="Type discriminator that is always `chatkit.thread_item`."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) for when the item was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "thread_id": _S.String.annotate(description="Identifier of the parent thread."), "type": _b.literal("chatkit.user_message"), "content": _b.array(_b.union(UserMessageInputText, UserMessageQuotedText, mode="one_of").annotate(description="Content blocks that comprise a user message.")).annotate(description="Ordered content elements supplied by the user."), "attachments": _b.array(Attachment).annotate(description="Attachments associated with the user message. Defaults to an empty list."), "inference_options": _b.union(_b.suspend(lambda: InferenceOptions).annotate(description="Inference overrides applied to the message. Defaults to null when unset."), _S.Null)}).annotate(title="User Message Item", description="User-authored messages within a thread.", identifier="UserMessageItem")
|
|
394
|
+
ResponseOutputText: _StructSchema[_T.ResponseOutputText, _t.Never, _t.Never] = _b.struct(_T.ResponseOutputText, {"type": _b.literal("output_text").annotate(description="Type discriminator that is always `output_text`."), "text": _S.String.annotate(description="Assistant generated text."), "annotations": _b.array(_b.union(FileAnnotation, UrlAnnotation, mode="one_of").annotate(description="Annotation object describing a cited source.")).annotate(description="Ordered list of annotations attached to the response text.")}).annotate(title="Assistant message content", description="Assistant response text accompanied by optional annotations.", identifier="ResponseOutputText")
|
|
395
|
+
TaskGroupItem: _StructSchema[_T.TaskGroupItem, _t.Never, _t.Never] = _b.struct(_T.TaskGroupItem, {"id": _S.String.annotate(description="Identifier of the thread item."), "object": _b.literal("chatkit.thread_item").annotate(description="Type discriminator that is always `chatkit.thread_item`."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) for when the item was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "thread_id": _S.String.annotate(description="Identifier of the parent thread."), "type": _b.literal("chatkit.task_group").annotate(description="Type discriminator that is always `chatkit.task_group`."), "tasks": _b.array(TaskGroupTask).annotate(description="Tasks included in the group.")}).annotate(title="Task group", description="Collection of workflow tasks grouped together in the thread.", identifier="TaskGroupItem")
|
|
396
|
+
ThreadListResource: _StructSchema[_T.ThreadListResource, _t.Never, _t.Never] = _b.struct(_T.ThreadListResource, {"object": _b.literal("list").annotate(description="The type of object returned, must be `list`."), "data": _b.array(ThreadResource).annotate(description="A list of items"), "first_id": _b.union(_S.String.annotate(description="The ID of the first item in the list."), _S.Null), "last_id": _b.union(_S.String.annotate(description="The ID of the last item in the list."), _S.Null), "has_more": _S.Boolean.annotate(description="Whether there are more items available.")}).annotate(title="Threads", description="A paginated list of ChatKit threads.", identifier="ThreadListResource")
|
|
397
|
+
DecisionInputContentParts: _S.Bottom[_T.DecisionInputContentParts, _t.Any] = _b.check(_b.check(_b.array(_b.union(DecisionInputText, DecisionInputImage, mode="one_of")), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384", identifier="DecisionInputContentParts"))
|
|
398
|
+
QuestionParamChoice: _StructSchema[_T.QuestionParamChoice, _t.Never, _t.Never] = _b.struct(_T.QuestionParamChoice, {"type": _b.literal("choice").annotate(description="The type of the object. Always `choice`."), "name": _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "instructions": _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "choices": _b.check(_b.check(_b.array(ChoiceOptionParam).annotate(description="Provide between 2 and 255 choices. Each choice must be unique."), _S.is_min_length(2).annotate(expected="a value with a length of at least 2")), _S.is_max_length(255).annotate(expected="a value with a length of at most 255"))}, optional=("name",)).annotate(description="Choose from the supplied options based on the input.", identifier="QuestionParamChoice")
|
|
399
|
+
AnswerResourceChoice: _StructSchema[_T.AnswerResourceChoice, _t.Never, _t.Never] = _b.struct(_T.AnswerResourceChoice, {"type": _b.literal("choice").annotate(description="The type of the object. Always `choice`."), "name": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null), "choice": ChoiceValueResource, "probabilities": _b.check(_b.check(_b.array(ChoiceProbabilityResource), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "confidence": _S.Finite}).annotate(identifier="AnswerResourceChoice")
|
|
400
|
+
PublicEnvironmentResource: _StructSchema[_T.PublicEnvironmentResource, _t.Never, _t.Never] = _b.struct(_T.PublicEnvironmentResource, {"type": _b.suspend(lambda: EnvironmentTypeResource).annotate(description="Whether the environment is hosted by OpenAI or by the application."), "id": _b.check(_S.String.annotate(description="The ID of the environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("agent.environment").annotate(description="The object type. Always `agent.environment`."), "status": _b.suspend(lambda: EnvironmentStatusResource).annotate(description="The current environment connection status."), "files": _b.check(_b.check(_b.array(HostedEnvironmentFileResource).annotate(description="Files installed in the environment, without their contents."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "skills": _b.check(_b.check(_b.array(HostedSkillResource).annotate(description="Skills installed in the environment, without their archive contents."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "plugins": _b.check(_b.check(_b.array(HostedPluginResource).annotate(description="Plugins installed in the environment, without their archive contents."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000"))}).annotate(description="Safe metadata for a first-class execution environment.", identifier="PublicEnvironmentResource")
|
|
401
|
+
HostedSkillParamInline: _StructSchema[_T.HostedSkillParamInline, _t.Never, _t.Never] = _b.struct(_T.HostedSkillParamInline, {"type": _b.literal("inline").annotate(description="The type of the object. Always `inline`."), "name": _b.check(_b.check(_S.String.annotate(description="The skill name declared in `SKILL.md`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "description": _b.check(_b.check(_S.String.annotate(description="The skill description declared in `SKILL.md`."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "source": _b.suspend(lambda: InlineCapabilitySourceParam).annotate(description="The inline ZIP archive.")}).annotate(description="Supplies a skill ZIP directly in the session request.", identifier="HostedSkillParamInline")
|
|
402
|
+
HostedPluginParamInline: _StructSchema[_T.HostedPluginParamInline, _t.Never, _t.Never] = _b.struct(_T.HostedPluginParamInline, {"type": _b.literal("inline").annotate(description="The type of the object. Always `inline`."), "name": _b.check(_b.check(_S.String.annotate(description="The plugin name declared in `.codex-plugin/plugin.json`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "description": _b.check(_b.check(_S.String.annotate(description="The plugin description declared in `.codex-plugin/plugin.json`."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "source": _b.suspend(lambda: InlineCapabilitySourceParam).annotate(description="The inline ZIP archive.")}).annotate(description="Supplies a plugin ZIP directly in the session request.", identifier="HostedPluginParamInline")
|
|
403
|
+
SubagentResource: _StructSchema[_T.SubagentResource, _t.Never, _t.Never] = _b.struct(_T.SubagentResource, {"id": _b.check(_S.String.annotate(description="The ID of the subagent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.suspend(lambda: SubagentObjectResource).annotate(description="The object type. Always `agent.session.subagent`."), "session_id": _b.check(_S.String.annotate(description="The ID of the session that owns the subagent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "name": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The runner-assigned nickname, or null when unavailable."), "instructions": _b.union(_b.check(_b.check(_b.array(AgentContentResource), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), _S.Null).annotate(description="Initial task content, or null when unavailable. Text may contain placeholders for images or audio when only a preview is available."), "parent_agent_id": _b.check(_S.String.annotate(description="The ID of the agent that created this subagent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "status": _b.suspend(lambda: SubagentStatusResource).annotate(description="The current status of the subagent."), "opened_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the subagent was first opened. Resuming does not change it.", format="int64"), _S.is_int().annotate(expected="an integer")), "closed_at": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The Unix timestamp, in seconds, when the subagent was closed. Null while active, including after resume.", format="int64")}).annotate(description="A subagent created within a session.", identifier="SubagentResource")
|
|
404
|
+
AgentMessageItemResource: _StructSchema[_T.AgentMessageItemResource, _t.Never, _t.Never] = _b.struct(_T.AgentMessageItemResource, {"id": _b.check(_S.String.annotate(description="The ID of the message."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "type": _b.literal("agent_message").annotate(description="The item type. Always `agent_message`."), "sender_agent_id": _b.check(_S.String.annotate(description="The ID or name of the sending agent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "recipient_agent_id": _b.check(_S.String.annotate(description="The ID or name of the receiving agent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "content": _b.check(_b.check(_b.array(AgentContentResource).annotate(description="The content exchanged between the agents."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000"))}).annotate(description="A message exchanged between agent threads.", identifier="AgentMessageItemResource")
|
|
405
|
+
CreateSubagentCallItemResource: _StructSchema[_T.CreateSubagentCallItemResource, _t.Never, _t.Never] = _b.struct(_T.CreateSubagentCallItemResource, {"type": _b.literal("create_subagent_call").annotate(description="The item type. Always `create_subagent_call`."), "id": _b.check(_S.String.annotate(description="The ID of the tool call item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The status of the tool call."), "agent_id": _b.check(_S.String.annotate(description="The ID of the agent that requested the subagent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "content": _b.check(_b.check(_b.array(AgentContentResource).annotate(description="The task given to the spawned agent."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "model": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The model requested for the spawned agent."), "reasoning_effort": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The reasoning effort requested for the spawned agent.")}).annotate(description="A request to spawn a subagent.", identifier="CreateSubagentCallItemResource")
|
|
406
|
+
SendSubagentInputCallItemResource: _StructSchema[_T.SendSubagentInputCallItemResource, _t.Never, _t.Never] = _b.struct(_T.SendSubagentInputCallItemResource, {"type": _b.literal("send_subagent_input_call").annotate(description="The item type. Always `send_subagent_input_call`."), "id": _b.check(_S.String.annotate(description="The ID of the tool call item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The status of the tool call."), "sender_agent_id": _b.check(_S.String.annotate(description="The ID of the agent sending the input."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "recipient_agent_id": _b.check(_S.String.annotate(description="The ID of the agent receiving the input."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "content": _b.check(_b.check(_b.array(AgentContentResource).annotate(description="The input sent to the receiving agent."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000"))}).annotate(description="A request to send input to another agent.", identifier="SendSubagentInputCallItemResource")
|
|
407
|
+
MessageItemResource: _StructSchema[_T.MessageItemResource, _t.Never, _t.Never] = _b.struct(_T.MessageItemResource, {"type": _b.literal("message").annotate(description="The item type. Always `message`."), "id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of this item, or null for legacy user messages whose ID was not recorded."), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "role": _b.suspend(lambda: SessionMessageRoleResource).annotate(description="The role of the message author."), "content": _b.check(_b.check(_b.array(MessageContentResource).annotate(description="The content of the message. User messages contain input text or images; assistant messages contain output text."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "status": _b.suspend(lambda: OutputItemStatusResource).annotate(description="The status of the message. User messages are always `completed`."), "phase": _b.union(MessagePhaseResource, _S.Null).annotate(description="The phase of an assistant message. Null for user messages.")}).annotate(description="A user or assistant message recorded in a session.", identifier="MessageItemResource")
|
|
408
|
+
FunctionCallOutputResource: _S.Bottom[_T.FunctionCallOutputResource, _t.Any] = _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _b.check(_b.check(_b.array(InputContentResource), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), mode="one_of").annotate(description="The text or model-input content supplied as a function result.", identifier="FunctionCallOutputResource")
|
|
409
|
+
BrowserAuthenticationHistoryRequestKindResource: _S.Bottom[_T.BrowserAuthenticationHistoryRequestKindResource, _t.Any] = _b.union(BrowserAuthenticationHistoryRequestKindResourceBrowserAuthentication, mode="one_of").annotate(identifier="BrowserAuthenticationHistoryRequestKindResource")
|
|
410
|
+
ComputerUseApprovalRequestKindResource: _S.Bottom[_T.ComputerUseApprovalRequestKindResource, _t.Any] = _b.union(ComputerUseApprovalRequestKindResourceBrowserAuthentication, ComputerUseApprovalRequestKindResourceBrowserOriginAccess, mode="one_of").annotate(identifier="ComputerUseApprovalRequestKindResource")
|
|
411
|
+
ComputerUseApprovalRequestResultItemResource: _StructSchema[_T.ComputerUseApprovalRequestResultItemResource, _t.Never, _t.Never] = _b.struct(_T.ComputerUseApprovalRequestResultItemResource, {"id": _b.check(_S.String.annotate(description="The stable history item ID."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "type": _b.literal("computer_use_approval_request_result"), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "request_id": _b.check(_S.String.annotate(description="The registered request answered by this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "response": _b.suspend(lambda: ComputerUseApprovalResponseKindResource).annotate(description="The admitted response, without submitted credential values.")}).annotate(description="A credential-free record of an admitted response, not proof of completion.", identifier="ComputerUseApprovalRequestResultItemResource")
|
|
412
|
+
WebSearchCallItemResource: _StructSchema[_T.WebSearchCallItemResource, _t.Never, _t.Never] = _b.struct(_T.WebSearchCallItemResource, {"type": _b.literal("web_search_call").annotate(description="The item type. Always `web_search_call`."), "id": _b.check(_S.String.annotate(description="The ID of the web search call."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "status": _b.suspend(lambda: OutputItemStatusResource).annotate(description="The status of the web search call."), "action": _b.union(WebSearchActionResource, _S.Null).annotate(description="The action performed by the web search tool.")}).annotate(description="A web search call produced by the agent.", identifier="WebSearchCallItemResource")
|
|
413
|
+
TurnResource: _StructSchema[_T.TurnResource, _t.Never, _t.Never] = _b.struct(_T.TurnResource, {"id": _b.check(_S.String.annotate(description="The ID of the turn."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.suspend(lambda: TurnObjectResource).annotate(description="The object type. Always `agent.session.turn`."), "session_id": _b.check(_S.String.annotate(description="The ID of the session that owns the turn."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "agent_id": _b.check(_S.String.annotate(description="The ID of the agent that ran the turn."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "subagent_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the subagent that ran the turn, if applicable."), "status": _b.suspend(lambda: TurnStatusResource).annotate(description="The current status of the turn."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, used to order the turn by creation time. Subagent turns use their start time, falling back to completion time or the subagent opening time when the preceding timestamps are unavailable.", format="int64"), _S.is_int().annotate(expected="an integer")), "started_at": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The Unix timestamp, in seconds, when the turn started.", format="int64"), "completed_at": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The Unix timestamp, in seconds, when the turn reached a terminal state.", format="int64"), "error": _b.union(SessionTurnErrorResource, _S.Null).annotate(description="A customer-safe error. Non-null only for a failed turn."), "usage": _b.union(TokenUsageResource, _S.Null).annotate(description="Best-effort token usage for the turn, or null if unknown. Recorded usage may change.")}).annotate(description="The canonical public representation of a session turn.", identifier="TurnResource")
|
|
414
|
+
TextResource: _StructSchema[_T.TextResource, _t.Never, _t.Never] = _b.struct(_T.TextResource, {"format": _b.suspend(lambda: TextFormatResource).annotate(description="The effective output format. Defaults to ordinary text."), "verbosity": _b.suspend(lambda: VerbosityResource).annotate(description="The amount of text produced by the agent. Defaults to `medium`.")}).annotate(description="The text configuration used by an agent.", identifier="TextResource")
|
|
415
|
+
PersistedAgentToolResourceMcp: _StructSchema[_T.PersistedAgentToolResourceMcp, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolResourceMcp, {"type": _b.literal("mcp").annotate(description="The type of the object. Always `mcp`."), "server_label": _b.check(_S.String.annotate(description="A label used to identify the MCP server in tool calls."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "credential_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The vault credential selected for this MCP server, if any."), "transport": _b.suspend(lambda: PersistedMcpTransportResource).annotate(description="The credential-free transport used to connect to the MCP server."), "request_metadata": _b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="Metadata included with requests to this MCP server."), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_property_names(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(expected="an object with property names matching the schema")), "allowed_tools": _b.union(_b.check(_b.check(_b.array(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), _S.Null).annotate(description="The MCP tools the agent may call, or null when all server tools are allowed."), "required": _S.Boolean.annotate(description="Whether this MCP server must initialize before the first turn."), "connection_origin": _b.suspend(lambda: McpConnectionOriginResource).annotate(description="Where outbound MCP HTTP connections originate.")}).annotate(description="Tools provided by a remote MCP server without stored credentials.", identifier="PersistedAgentToolResourceMcp")
|
|
416
|
+
UpdateSessionAgentParam: _StructSchema[_T.UpdateSessionAgentParam, _t.Never, _t.Never] = _b.struct(_T.UpdateSessionAgentParam, {"model": _b.check(_b.check(_S.String.annotate(description="The model for subsequent turns. Omit to keep the current model."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "reasoning": _b.suspend(lambda: UpdateSessionReasoningParam).annotate(description="Reasoning settings to update. Omit to keep the current effort."), "service_tier": _b.union(ServiceTierParam, _S.Null).annotate(description="Omit to keep the current tier. Null resets it to auto.")}, optional=("model", "reasoning", "service_tier",)).annotate(description="Model settings that can change after session creation.", identifier="UpdateSessionAgentParam")
|
|
417
|
+
TextParam: _StructSchema[_T.TextParam, _t.Never, _t.Never] = _b.struct(_T.TextParam, {"format": _b.union(TextFormatParam, _S.Null).annotate(description="The output format. Omission uses ordinary text (`{\"type\": \"text\"}`)."), "verbosity": _b.union(VerbosityParam, _S.Null).annotate(description="The amount of text the model should produce. Defaults to `medium`, matching Responses.")}, optional=("format", "verbosity",)).annotate(description="Configuration for text generated by the agent.", identifier="TextParam")
|
|
418
|
+
PersistedAgentToolConfigParamMcp: _StructSchema[_T.PersistedAgentToolConfigParamMcp, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolConfigParamMcp, {"type": _b.literal("mcp").annotate(description="The type of the object. Always `mcp`."), "server_label": _b.check(_b.check(_S.String.annotate(description="A label used to identify the MCP server in tool calls."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "credential_id": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="The vault credential selected for this MCP server. Optional when exactly one attached credential matches the server URL."), "transport": _b.suspend(lambda: PersistedMcpTransportConfigParam).annotate(description="The credential-free transport used to connect to the MCP server."), "request_metadata": _b.union(_b.check(_b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(1024).annotate(expected="a value with at most 1024 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points"))).annotate(expected="an object with property names matching the schema")), _S.Null).annotate(description="Metadata included with requests to this MCP server."), "allowed_tools": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="The MCP tools the agent may call. All server tools are allowed when omitted."), "required": _S.Boolean.annotate(description="Whether this MCP server must initialize before the first turn. Defaults to `false`."), "connection_origin": _b.union(McpConnectionOriginParam, _S.Null).annotate(description="Selects where outbound MCP HTTP connections originate.")}, optional=("credential_id", "request_metadata", "allowed_tools", "required", "connection_origin",)).annotate(description="Tools provided by a remote MCP server without stored credentials.", identifier="PersistedAgentToolConfigParamMcp")
|
|
419
|
+
EnvironmentResourceOpenaiHosted: _StructSchema[_T.EnvironmentResourceOpenaiHosted, _t.Never, _t.Never] = _b.struct(_T.EnvironmentResourceOpenaiHosted, {"type": _b.literal("openai_hosted").annotate(description="The type of the object. Always `openai_hosted`."), "id": _b.check(_S.String.annotate(description="The public ID of the environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "container_size": _b.union(ContainerSizeResource, _S.Null).annotate(description="The effective CPU and memory tier, or null when unknown or outside the public tiers."), "packages": _b.suspend(lambda: EnvironmentPackagesResource).annotate(description="Packages installed in the environment."), "network": _b.suspend(lambda: NetworkPolicyResource).annotate(description="The effective network access policy for the environment."), "desktop": _b.suspend(lambda: DesktopResource).annotate(description="The effective desktop configuration."), "capability_directories": _b.check(_b.check(_b.array(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(description="Directories that contain capabilities exposed to the agent."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "skills": _b.check(_b.check(_b.array(HostedSkillResource).annotate(description="Skills installed in the environment, excluding their archive contents."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "plugins": _b.check(_b.check(_b.array(HostedPluginResource).annotate(description="Plugins installed in the environment, excluding their archive contents."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "files": _b.check(_b.check(_b.array(HostedEnvironmentFileResource).annotate(description="Files available in the environment, excluding their contents."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(50).annotate(expected="a value with a length of at most 50"))}, optional=("container_size",)).annotate(description="An environment hosted by OpenAI.", identifier="EnvironmentResourceOpenaiHosted")
|
|
420
|
+
EnvironmentTemplateResource: _StructSchema[_T.EnvironmentTemplateResource, _t.Never, _t.Never] = _b.struct(_T.EnvironmentTemplateResource, {"id": _b.check(_S.String.annotate(description="The ID of the reusable environment template."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "name": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="An optional human-readable display name for the template."), "object": _b.literal("agent.environment.template").annotate(description="The object type. Always `agent.environment.template`."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the template was created.", format="int64"), _S.is_int().annotate(expected="an integer")), "updated_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the template was last updated.", format="int64"), _S.is_int().annotate(expected="an integer")), "packages": _b.suspend(lambda: EnvironmentPackagesResource).annotate(description="Packages installed in each fresh OpenAI-hosted environment."), "network": _b.suspend(lambda: NetworkPolicyResource).annotate(description="Runtime network access for each OpenAI-hosted environment."), "desktop": _b.suspend(lambda: DesktopResource).annotate(description="Desktop configuration for each OpenAI-hosted environment."), "capability_directories": _b.check(_b.check(_b.array(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(description="Directories that expose capabilities to the agent."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "skills": _b.check(_b.check(_b.array(HostedTemplateSkillResource).annotate(description="Safe skill metadata, preserving unresolved version selectors."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(200).annotate(expected="a value with a length of at most 200")), "plugins": _b.check(_b.check(_b.array(HostedPluginResource).annotate(description="Safe plugin metadata, excluding inline archive contents."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(32).annotate(expected="a value with a length of at most 32")), "files": _b.check(_b.check(_b.array(HostedTemplateFileResource).annotate(description="Safe file metadata, excluding contents and session-scoped file IDs."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(50).annotate(expected="a value with a length of at most 50"))}).annotate(description="Reusable configuration that provisions a fresh OpenAI-hosted environment for each session.", identifier="EnvironmentTemplateResource")
|
|
421
|
+
AgentToolResourceMcp: _StructSchema[_T.AgentToolResourceMcp, _t.Never, _t.Never] = _b.struct(_T.AgentToolResourceMcp, {"type": _b.literal("mcp").annotate(description="The type of the object. Always `mcp`."), "server_label": _b.check(_S.String.annotate(description="A label used to identify the MCP server in tool calls."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "credential_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The attached vault credential selected for this MCP server, if any. Optional when exactly one attached credential matches the server URL."), "transport": _b.suspend(lambda: McpTransportResource).annotate(description="The transport used to connect to the MCP server."), "request_metadata": _b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="Metadata included with requests to this MCP server."), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_property_names(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(expected="an object with property names matching the schema")), "allowed_tools": _b.union(_b.check(_b.check(_b.array(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), _S.Null).annotate(description="The MCP tools the agent may call."), "required": _S.Boolean.annotate(description="Whether this MCP server must initialize before the first turn."), "connection_origin": _b.suspend(lambda: McpConnectionOriginResource).annotate(description="Where outbound MCP HTTP connections originate.")}).annotate(description="Tools provided by a remote MCP server.", identifier="AgentToolResourceMcp")
|
|
422
|
+
AgentToolConfigParamMcp: _StructSchema[_T.AgentToolConfigParamMcp, _t.Never, _t.Never] = _b.struct(_T.AgentToolConfigParamMcp, {"type": _b.literal("mcp").annotate(description="The type of the object. Always `mcp`."), "server_label": _b.check(_b.check(_S.String.annotate(description="A label used to identify the MCP server in tool calls."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "credential_id": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="The attached vault credential used to authenticate this MCP server. Optional when exactly one attached credential matches the server URL."), "transport": _b.suspend(lambda: McpTransportConfigParam).annotate(description="The transport used to connect to the MCP server."), "request_metadata": _b.union(_b.check(_b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(1024).annotate(expected="a value with at most 1024 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points"))).annotate(expected="an object with property names matching the schema")), _S.Null).annotate(description="Metadata included with requests to this MCP server."), "allowed_tools": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="The MCP tools the agent may call. All server tools are allowed when omitted."), "required": _S.Boolean.annotate(description="Whether this MCP server must initialize before the first turn. Defaults to `false`."), "connection_origin": _b.union(McpConnectionOriginParam, _S.Null).annotate(description="Selects where outbound MCP HTTP connections originate. Omitted or `service` uses the Managed Agents service network; `environment` uses the session's selected environment.")}, optional=("credential_id", "request_metadata", "allowed_tools", "required", "connection_origin",)).annotate(description="Tools provided by a remote MCP server.", identifier="AgentToolConfigParamMcp")
|
|
423
|
+
InputMessageParam: _StructSchema[_T.InputMessageParam, _t.Never, _t.Never] = _b.struct(_T.InputMessageParam, {"type": _b.literal("message").annotate(description="The type of the input item. Always `message`."), "role": _b.literal("user").annotate(description="The role of the message author. Always `user`."), "content": _b.check(_b.check(_b.array(InputContentParam).annotate(description="The content of the message."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384"))}, optional=("type",)).annotate(description="A user message submitted to a session.", identifier="InputMessageParam")
|
|
424
|
+
FunctionCallOutputParam: _S.Bottom[_T.FunctionCallOutputParam, _t.Any] = _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _b.check(_b.check(_b.array(InputContentParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), mode="one_of").annotate(description="A function result represented as text or supported model-input content.", identifier="FunctionCallOutputParam")
|
|
425
|
+
SessionEventAgentSessionEnvironmentReady: _StructSchema[_T.SessionEventAgentSessionEnvironmentReady, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionEnvironmentReady, {"type": _b.literal("agent.session.environment.ready").annotate(description="The type of the object. Always `agent.session.environment.ready`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "environment": _b.suspend(lambda: SessionEnvironmentStateResource).annotate(description="The current environment state.")}).annotate(description="Emitted when a hosted session environment is ready to connect.", identifier="SessionEventAgentSessionEnvironmentReady")
|
|
426
|
+
SessionEventAgentSessionEnvironmentSuspended: _StructSchema[_T.SessionEventAgentSessionEnvironmentSuspended, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionEnvironmentSuspended, {"type": _b.literal("agent.session.environment.suspended").annotate(description="The type of the object. Always `agent.session.environment.suspended`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "environment": _b.suspend(lambda: SessionEnvironmentStateResource).annotate(description="The current environment state.")}).annotate(description="Emitted after an idle hosted session environment is checkpointed and stopped.", identifier="SessionEventAgentSessionEnvironmentSuspended")
|
|
427
|
+
SessionEventAgentSessionEnvironmentExpired: _StructSchema[_T.SessionEventAgentSessionEnvironmentExpired, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionEnvironmentExpired, {"type": _b.literal("agent.session.environment.expired").annotate(description="The type of the object. Always `agent.session.environment.expired`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "environment": _b.suspend(lambda: SessionEnvironmentStateResource).annotate(description="The current environment state.")}).annotate(description="Emitted after a suspended hosted session environment and its checkpoint expire.", identifier="SessionEventAgentSessionEnvironmentExpired")
|
|
428
|
+
SessionEventAgentSessionEnvironmentPending: _StructSchema[_T.SessionEventAgentSessionEnvironmentPending, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionEnvironmentPending, {"type": _b.literal("agent.session.environment.pending").annotate(description="The type of the object. Always `agent.session.environment.pending`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "environment": _b.suspend(lambda: SessionEnvironmentStateResource).annotate(description="The current environment state.")}).annotate(description="Emitted while a session environment is being prepared.", identifier="SessionEventAgentSessionEnvironmentPending")
|
|
429
|
+
SessionEventAgentSessionEnvironmentConnected: _StructSchema[_T.SessionEventAgentSessionEnvironmentConnected, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionEnvironmentConnected, {"type": _b.literal("agent.session.environment.connected").annotate(description="The type of the object. Always `agent.session.environment.connected`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "environment": _b.suspend(lambda: SessionEnvironmentStateResource).annotate(description="The current environment state.")}).annotate(description="Emitted when a session environment connects.", identifier="SessionEventAgentSessionEnvironmentConnected")
|
|
430
|
+
SessionEventAgentSessionEnvironmentDisconnected: _StructSchema[_T.SessionEventAgentSessionEnvironmentDisconnected, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionEnvironmentDisconnected, {"type": _b.literal("agent.session.environment.disconnected").annotate(description="The type of the object. Always `agent.session.environment.disconnected`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "environment": _b.suspend(lambda: SessionEnvironmentStateResource).annotate(description="The current environment state.")}).annotate(description="Emitted when a session environment disconnects.", identifier="SessionEventAgentSessionEnvironmentDisconnected")
|
|
431
|
+
SessionEventAgentSessionEnvironmentFailed: _StructSchema[_T.SessionEventAgentSessionEnvironmentFailed, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionEnvironmentFailed, {"type": _b.literal("agent.session.environment.failed").annotate(description="The type of the object. Always `agent.session.environment.failed`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "environment": _b.suspend(lambda: SessionEnvironmentStateResource).annotate(description="The current environment state.")}).annotate(description="Emitted when a session environment fails.", identifier="SessionEventAgentSessionEnvironmentFailed")
|
|
432
|
+
ComputerUseApprovalResponseParam: _S.Bottom[_T.ComputerUseApprovalResponseParam, _t.Any] = _b.union(ComputerUseApprovalResponseParamBrowserAuthentication, ComputerUseApprovalResponseParamBrowserOriginAccessParam, mode="one_of").annotate(identifier="ComputerUseApprovalResponseParam")
|
|
433
|
+
McpOauthRefreshResource: _StructSchema[_T.McpOauthRefreshResource, _t.Never, _t.Never] = _b.struct(_T.McpOauthRefreshResource, {"token_endpoint": _b.check(_S.String.annotate(description="The HTTPS OAuth token endpoint used for refresh."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "client_id": _b.check(_S.String.annotate(description="The OAuth client ID used when requesting a new access token."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "resource": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The resource URI sent to the OAuth token endpoint during refresh, if configured."), "scope": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="Space-separated OAuth scopes requested during refresh, if configured."), "token_endpoint_auth": _b.suspend(lambda: McpOauthTokenEndpointAuthResource).annotate(description="How the OAuth client authenticates to the token endpoint, excluding its client secret.")}).annotate(description="Configuration used to refresh an MCP OAuth access token, excluding secret values.", identifier="McpOauthRefreshResource")
|
|
434
|
+
VaultCredentialAuthResourceEnvironmentVariable: _StructSchema[_T.VaultCredentialAuthResourceEnvironmentVariable, _t.Never, _t.Never] = _b.struct(_T.VaultCredentialAuthResourceEnvironmentVariable, {"type": _b.literal("environment_variable").annotate(description="The type of the object. Always `environment_variable`."), "secret_name": _b.check(_S.String.annotate(description="The environment variable name that receives the placeholder in the sandbox."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "networking": _b.suspend(lambda: VaultCredentialNetworkingResource).annotate(description="The destinations where the proxy can substitute the secret, subject to the environment network policy.")}).annotate(description="Metadata for an HTTP credential used only in OpenAI-hosted environments. Sandbox code receives a placeholder. The proxy substitutes the secret for allowed HTTPS destinations on ports 443 and 8443. The real secret is not available to sandbox code for local computation and is never returned in this resource.", identifier="VaultCredentialAuthResourceEnvironmentVariable")
|
|
435
|
+
CreateMcpOauthRefreshParam: _StructSchema[_T.CreateMcpOauthRefreshParam, _t.Never, _t.Never] = _b.struct(_T.CreateMcpOauthRefreshParam, {"token_endpoint": _b.check(_b.check(_S.String.annotate(description="The HTTPS OAuth token endpoint used to exchange the refresh token for a new access token."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "client_id": _b.check(_b.check(_S.String.annotate(description="The OAuth client ID used when requesting a new access token."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "resource": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="The resource URI to send to the OAuth token endpoint during refresh, if required."), "scope": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="Space-separated OAuth scopes to request during refresh, if required."), "refresh_token": _b.check(_b.check(_S.String.annotate(description="The refresh token to store. This secret is never returned in credential resources."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "token_endpoint_auth": _b.suspend(lambda: CreateMcpOauthTokenEndpointAuthParam).annotate(description="How the OAuth client authenticates to the token endpoint.")}, optional=("resource", "scope",)).annotate(description="Configuration for refreshing the access token of an MCP OAuth credential.", identifier="CreateMcpOauthRefreshParam")
|
|
436
|
+
CreateVaultCredentialAuthParamEnvironmentVariable: _StructSchema[_T.CreateVaultCredentialAuthParamEnvironmentVariable, _t.Never, _t.Never] = _b.struct(_T.CreateVaultCredentialAuthParamEnvironmentVariable, {"type": _b.literal("environment_variable").annotate(description="The type of the object. Always `environment_variable`."), "secret_name": _b.check(_b.check(_S.String.annotate(description="The environment variable name that receives the placeholder, such as `SERVICE_API_KEY`. Use ASCII letters, digits, and underscores, starting with a letter or underscore. Names starting with `CODEX_` and managed proxy or certificate variable names are reserved."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "secret_value": _b.check(_b.check(_S.String.annotate(description="The write-only secret to store. Never returned in credential resources or supplied directly to sandbox code. Must be nonempty and must not contain carriage returns, newlines, or NUL bytes."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "networking": _b.suspend(lambda: VaultCredentialNetworkingParam).annotate(description="The destinations where the proxy can substitute this secret. The environment network policy must also allow them.")}).annotate(description="An HTTP credential for OpenAI-hosted environments only. The sandbox receives an environment variable containing a placeholder, not the secret. Use the placeholder unchanged in outgoing requests. The egress proxy replaces the placeholder with the secret for allowed HTTPS destinations on ports 443 and 8443. Sandbox code cannot read the real secret or use it for local computation, such as signing a request.", identifier="CreateVaultCredentialAuthParamEnvironmentVariable")
|
|
437
|
+
RotateMcpOauthRefreshParam: _StructSchema[_T.RotateMcpOauthRefreshParam, _t.Never, _t.Never] = _b.struct(_T.RotateMcpOauthRefreshParam, {"refresh_token": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="The replacement refresh token. Omit or pass `null` to keep the stored token. This secret is never returned in resources."), "scope": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="Replacement space-separated OAuth scopes for refresh requests. Omit to keep the scopes, or pass `null` to stop sending a scope parameter."), "token_endpoint_auth": _b.union(RotateMcpOauthTokenEndpointAuthParam, _S.Null).annotate(description="Client-secret updates for the existing token endpoint authentication method.")}, optional=("refresh_token", "scope", "token_endpoint_auth",)).annotate(description="Updates to an MCP credential's existing OAuth refresh configuration.", identifier="RotateMcpOauthRefreshParam")
|
|
438
|
+
BetaModelIdsCompaction: _S.Bottom[_T.BetaModelIdsCompaction, _t.Any] = _b.union(BetaModelIdsResponses, _S.String, _S.Null).annotate(description="Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models.", identifier="BetaModelIdsCompaction")
|
|
439
|
+
BetaTextResponseFormatConfiguration: _S.Bottom[_T.BetaTextResponseFormatConfiguration, _t.Any] = _b.union(BetaResponseFormatText, BetaTextResponseFormatJsonSchema, BetaResponseFormatJsonObject, mode="one_of").annotate(description="An object specifying the format that the model must output.\n\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs,\nwhich ensures the model will match your supplied JSON schema. Learn more in the\n[Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).\n\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n\n**Not recommended for gpt-4o and newer models:**\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n", identifier="BetaTextResponseFormatConfiguration")
|
|
440
|
+
BetaFileSearchTool: _StructSchema[_T.BetaFileSearchTool, _t.Never, _t.Never] = _b.struct(_T.BetaFileSearchTool, {"type": _b.literal("file_search").annotate(description="The type of the file search tool. Always `file_search`."), "vector_store_ids": _b.array(_S.String).annotate(description="The IDs of the vector stores to search."), "max_num_results": _b.check(_S.Number.annotate(description="The maximum number of results to return. This number should be between 1 and 50 inclusive."), _S.is_int().annotate(expected="an integer")), "ranking_options": _b.suspend(lambda: BetaRankingOptions).annotate(description="Ranking options for search."), "filters": _b.union(_b.suspend(lambda: BetaFilters).annotate(description="A filter to apply."), _S.Null)}, optional=("max_num_results", "ranking_options", "filters",)).annotate(title="File search", description="A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search).", identifier="BetaFileSearchTool")
|
|
441
|
+
BetaAutoCodeInterpreterToolParam: _StructSchema[_T.BetaAutoCodeInterpreterToolParam, _t.Never, _t.Never] = _b.struct(_T.BetaAutoCodeInterpreterToolParam, {"type": _b.literal("auto").annotate(description="Always `auto`."), "file_ids": _b.check(_b.array(_S.String).annotate(description="An optional list of uploaded files to make available to your code."), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), "memory_limit": _b.union(_b.suspend(lambda: BetaContainerMemoryLimit).annotate(description="The memory limit for the code interpreter container."), _S.Null), "network_policy": _b.union(BetaContainerNetworkPolicyDisabledParam, BetaContainerNetworkPolicyAllowlistParam, mode="one_of").annotate(description="Network access policy for the container.")}, optional=("file_ids", "memory_limit", "network_policy",)).annotate(title="CodeInterpreterToolAuto", description="Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.", identifier="BetaAutoCodeInterpreterToolParam")
|
|
442
|
+
BetaContainerAutoParam: _StructSchema[_T.BetaContainerAutoParam, _t.Never, _t.Never] = _b.struct(_T.BetaContainerAutoParam, {"type": _b.literal("container_auto").annotate(description="Automatically creates a container for this request"), "file_ids": _b.check(_b.array(_S.String).annotate(description="An optional list of uploaded files to make available to your code."), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), "memory_limit": _b.union(_b.suspend(lambda: BetaContainerMemoryLimit).annotate(description="The memory limit for the container."), _S.Null), "network_policy": _b.union(BetaContainerNetworkPolicyDisabledParam, BetaContainerNetworkPolicyAllowlistParam, mode="one_of").annotate(description="Network access policy for the container."), "skills": _b.check(_b.array(_b.union(BetaSkillReferenceParam, BetaInlineSkillParam, mode="one_of")).annotate(description="An optional list of skills referenced by id or inline data."), _S.is_max_length(200).annotate(expected="a value with a length of at most 200"))}, optional=("file_ids", "memory_limit", "network_policy", "skills",)).annotate(identifier="BetaContainerAutoParam")
|
|
443
|
+
BetaCustomToolParam: _StructSchema[_T.BetaCustomToolParam, _t.Never, _t.Never] = _b.struct(_T.BetaCustomToolParam, {"type": _b.literal("custom").annotate(description="The type of the custom tool. Always `custom`."), "name": _S.String.annotate(description="The name of the custom tool, used to identify it in tool calls."), "async": _S.Boolean.annotate(description="Whether the tool response can be returned asynchronously versus immediately returned on next response creation."), "description": _S.String.annotate(description="Optional description of the custom tool, used to provide more context."), "format": _b.union(BetaCustomTextFormatParam, BetaCustomGrammarFormatParam, mode="one_of").annotate(description="The input format for the custom tool. Default is unconstrained text."), "defer_loading": _S.Boolean.annotate(description="Whether this tool should be deferred and discovered via tool search."), "allowed_callers": _b.union(_b.check(_b.array(BetaCallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null)}, optional=("async", "description", "format", "defer_loading", "allowed_callers",)).annotate(title="Custom tool", description="A custom tool that processes input using a specified format. Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)", identifier="BetaCustomToolParam")
|
|
444
|
+
BetaResponsePromptVariables: _S.Bottom[_T.BetaResponsePromptVariables, _t.Any] = _b.union(_b.record(_S.String, _b.union(_S.String, BetaInputTextContent, BetaInputImageContent, BetaInputFileContent, mode="one_of")).annotate(title="Prompt Variables", description="Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n"), _S.Null).annotate(identifier="BetaResponsePromptVariables")
|
|
445
|
+
BetaInputContent: _S.Bottom[_T.BetaInputContent, _t.Any] = _b.union(BetaInputTextContent, BetaInputImageContent, BetaInputFileContent, mode="one_of").annotate(identifier="BetaInputContent")
|
|
446
|
+
BetaFunctionAndCustomToolCallOutput: _S.Bottom[_T.BetaFunctionAndCustomToolCallOutput, _t.Any] = _b.union(BetaInputTextContent, BetaInputImageContent, BetaInputFileContent, mode="one_of").annotate(identifier="BetaFunctionAndCustomToolCallOutput")
|
|
447
|
+
BetaResponseOutputTextAnnotationAddedEvent: _StructSchema[_T.BetaResponseOutputTextAnnotationAddedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseOutputTextAnnotationAddedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.output_text.annotation.added").annotate(description="The type of the event. Always 'response.output_text.annotation.added'."), "item_id": _S.String.annotate(description="The unique identifier of the item to which the annotation is being added."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item in the response's output array."), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part within the output item."), _S.is_int().annotate(expected="an integer")), "annotation_index": _b.check(_S.Number.annotate(description="The index of the annotation within the content part."), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "annotation": _b.union(BetaAnnotation, _S.Null).annotate(description="The annotation object being added. (See annotation schema for details.)")}, optional=("agent",)).annotate(title="ResponseOutputTextAnnotationAddedEvent", description="Emitted when an annotation is added to output text content.\n", identifier="BetaResponseOutputTextAnnotationAddedEvent")
|
|
448
|
+
BetaOutputTextContent: _StructSchema[_T.BetaOutputTextContent, _t.Never, _t.Never] = _b.struct(_T.BetaOutputTextContent, {"type": _b.literal("output_text").annotate(description="The type of the output text. Always `output_text`."), "text": _S.String.annotate(description="The text output from the model."), "annotations": _b.array(BetaAnnotation).annotate(description="The annotations of the text output."), "logprobs": _b.array(BetaLogProb)}).annotate(title="Output text", description="A text output from the model.", identifier="BetaOutputTextContent")
|
|
449
|
+
BetaComputerAction: _S.Bottom[_T.BetaComputerAction, _t.Any] = _b.union(BetaClickParam, BetaDoubleClickAction, BetaDragParam, BetaKeyPressAction, BetaMoveParam, BetaScreenshotParam, BetaScrollParam, BetaTypeParam, BetaWaitParam, mode="one_of").annotate(identifier="BetaComputerAction")
|
|
450
|
+
BetaFunctionToolCall: _StructSchema[_T.BetaFunctionToolCall, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionToolCall, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the function tool call.\n"), "type": _b.literal("function_call").annotate(description="The type of the function tool call. Always `function_call`.\n"), "call_id": _S.String.annotate(description="The unique ID of the function tool call generated by the model.\n"), "caller": _b.union(BetaToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the function to run.\n"), "name": _S.String.annotate(description="The name of the function to run.\n"), "arguments": _S.String.annotate(description="A JSON string of the arguments to pass to the function.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "async": _S.Boolean.annotate(description="Whether the function tool call runs asynchronously.\n")}, optional=("agent", "id", "caller", "namespace", "status", "async",)).annotate(title="Function tool call", description="A tool call to run a function. See the\n[function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information.\n", identifier="BetaFunctionToolCall")
|
|
451
|
+
BetaFunctionShellCall: _StructSchema[_T.BetaFunctionShellCall, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellCall, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("shell_call").annotate(description="The type of the item. Always `shell_call`."), "id": _S.String.annotate(description="The unique ID of the shell tool call. Populated when this item is returned via API."), "call_id": _S.String.annotate(description="The unique ID of the shell tool call generated by the model."), "caller": _b.union(_b.suspend(lambda: BetaToolCallCaller).annotate(description="The execution context that produced this tool call."), _S.Null), "action": _b.suspend(lambda: BetaFunctionShellAction).annotate(description="The shell commands and limits that describe how to run the tool call."), "status": _b.suspend(lambda: BetaFunctionShellCallStatus).annotate(description="The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."), "environment": _b.union(_b.union(BetaLocalEnvironmentResource, BetaContainerReferenceResource, mode="one_of"), _S.Null), "created_by": _S.String.annotate(description="The ID of the entity that created this tool call.")}, optional=("agent", "caller", "created_by",)).annotate(title="Shell tool call", description="A tool call that executes one or more shell commands in a managed environment.", identifier="BetaFunctionShellCall")
|
|
452
|
+
BetaApplyPatchToolCall: _StructSchema[_T.BetaApplyPatchToolCall, _t.Never, _t.Never] = _b.struct(_T.BetaApplyPatchToolCall, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("apply_patch_call").annotate(description="The type of the item. Always `apply_patch_call`."), "id": _S.String.annotate(description="The unique ID of the apply patch tool call. Populated when this item is returned via API."), "call_id": _S.String.annotate(description="The unique ID of the apply patch tool call generated by the model."), "caller": _b.union(_b.suspend(lambda: BetaToolCallCaller).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.suspend(lambda: BetaApplyPatchCallStatus).annotate(description="The status of the apply patch tool call. One of `in_progress` or `completed`."), "operation": _b.union(BetaApplyPatchCreateFileOperation, BetaApplyPatchDeleteFileOperation, BetaApplyPatchUpdateFileOperation, mode="one_of").annotate(title="Apply patch operation", description="One of the create_file, delete_file, or update_file operations applied via apply_patch."), "created_by": _S.String.annotate(description="The ID of the entity that created this tool call.")}, optional=("agent", "caller", "created_by",)).annotate(title="Apply patch tool call", description="A tool call that applies file diffs by creating, deleting, or updating files.", identifier="BetaApplyPatchToolCall")
|
|
453
|
+
BetaApplyPatchToolCallOutput: _StructSchema[_T.BetaApplyPatchToolCallOutput, _t.Never, _t.Never] = _b.struct(_T.BetaApplyPatchToolCallOutput, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("apply_patch_call_output").annotate(description="The type of the item. Always `apply_patch_call_output`."), "id": _S.String.annotate(description="The unique ID of the apply patch tool call output. Populated when this item is returned via API."), "call_id": _S.String.annotate(description="The unique ID of the apply patch tool call generated by the model."), "caller": _b.union(_b.suspend(lambda: BetaToolCallCaller).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.suspend(lambda: BetaApplyPatchCallOutputStatus).annotate(description="The status of the apply patch tool call output. One of `completed` or `failed`."), "output": _b.union(_S.String.annotate(description="Optional textual output returned by the apply patch tool."), _S.Null), "created_by": _S.String.annotate(description="The ID of the entity that created this tool call output.")}, optional=("agent", "caller", "output", "created_by",)).annotate(title="Apply patch tool call output", description="The output emitted by an apply patch tool call.", identifier="BetaApplyPatchToolCallOutput")
|
|
454
|
+
BetaCustomToolCall: _StructSchema[_T.BetaCustomToolCall, _t.Never, _t.Never] = _b.struct(_T.BetaCustomToolCall, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("custom_tool_call").annotate(description="The type of the custom tool call. Always `custom_tool_call`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call in the OpenAI platform.\n"), "call_id": _S.String.annotate(description="An identifier used to map this custom tool call to a tool call output.\n"), "caller": _b.union(BetaToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the custom tool being called.\n"), "name": _S.String.annotate(description="The name of the custom tool being called.\n"), "input": _S.String.annotate(description="The input for the custom tool call generated by the model.\n"), "async": _S.Boolean.annotate(description="Whether the custom tool call runs asynchronously.\n")}, optional=("agent", "id", "caller", "namespace", "async",)).annotate(title="Custom tool call", description="A call to a custom tool created by the model.\n", identifier="BetaCustomToolCall")
|
|
455
|
+
BetaFunctionToolCallResource: _StructSchema[_T.BetaFunctionToolCallResource, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionToolCallResource, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the function tool call.\n"), "type": _b.literal("function_call").annotate(description="The type of the function tool call. Always `function_call`.\n"), "call_id": _S.String.annotate(description="The unique ID of the function tool call generated by the model.\n"), "caller": _b.union(BetaToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the function to run.\n"), "name": _S.String.annotate(description="The name of the function to run.\n"), "arguments": _S.String.annotate(description="A JSON string of the arguments to pass to the function.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "async": _S.Boolean.annotate(description="Whether the function tool call runs asynchronously.\n"), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.\n")}, optional=("agent", "caller", "namespace", "async", "created_by",)).annotate(identifier="BetaFunctionToolCallResource")
|
|
456
|
+
BetaCustomToolCallResource: _StructSchema[_T.BetaCustomToolCallResource, _t.Never, _t.Never] = _b.struct(_T.BetaCustomToolCallResource, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("custom_tool_call").annotate(description="The type of the custom tool call. Always `custom_tool_call`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call item.\n"), "call_id": _S.String.annotate(description="An identifier used to map this custom tool call to a tool call output.\n"), "caller": _b.union(BetaToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the custom tool being called.\n"), "name": _S.String.annotate(description="The name of the custom tool being called.\n"), "input": _S.String.annotate(description="The input for the custom tool call generated by the model.\n"), "async": _S.Boolean.annotate(description="Whether the custom tool call runs asynchronously.\n"), "status": _b.suspend(lambda: BetaFunctionCallStatus).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.\n")}, optional=("agent", "caller", "namespace", "async", "created_by",)).annotate(title="ResponseCustomToolCallItem", identifier="BetaCustomToolCallResource")
|
|
457
|
+
BetaFunctionShellCallOutputContentParam: _StructSchema[_T.BetaFunctionShellCallOutputContentParam, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellCallOutputContentParam, {"stdout": _b.check(_S.String.annotate(description="Captured stdout output for the shell call."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), "stderr": _b.check(_S.String.annotate(description="Captured stderr output for the shell call."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), "outcome": _b.suspend(lambda: BetaFunctionShellCallOutputOutcomeParam).annotate(description="The exit or timeout outcome associated with this shell call.")}).annotate(title="Shell output content", description="Captured stdout and stderr for a portion of a shell tool call output.", identifier="BetaFunctionShellCallOutputContentParam")
|
|
458
|
+
BetaMCPToolCall: _StructSchema[_T.BetaMCPToolCall, _t.Never, _t.Never] = _b.struct(_T.BetaMCPToolCall, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("mcp_call").annotate(description="The type of the item. Always `mcp_call`.\n"), "id": _S.String.annotate(description="The unique ID of the tool call.\n"), "server_label": _S.String.annotate(description="The label of the MCP server running the tool.\n"), "name": _S.String.annotate(description="The name of the tool that was run.\n"), "arguments": _S.String.annotate(description="A JSON string of the arguments passed to the tool.\n"), "output": _b.union(_S.String.annotate(description="The output from the tool call.\n"), _S.Null), "error": _b.union(BetaMCPToolCallError, _S.Null).annotate(description="The error from the tool call, if any."), "status": _b.suspend(lambda: BetaMCPToolCallStatus).annotate(description="The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"), "approval_request_id": _b.union(_S.String.annotate(description="Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n"), _S.Null)}, optional=("agent", "output", "error", "status", "approval_request_id",)).annotate(title="MCP tool call", description="An invocation of a tool on an MCP server.\n", identifier="BetaMCPToolCall")
|
|
459
|
+
BetaModerationPolicyParam: _StructSchema[_T.BetaModerationPolicyParam, _t.Never, _t.Never] = _b.struct(_T.BetaModerationPolicyParam, {"input": _b.union(_b.suspend(lambda: BetaModerationConfigParam).annotate(description="The moderation policy for the response input."), _S.Null), "output": _b.union(_b.suspend(lambda: BetaModerationConfigParam).annotate(description="The moderation policy for the response output."), _S.Null)}, optional=("input", "output",)).annotate(description="The policy to apply to moderated response input and output.", identifier="BetaModerationPolicyParam")
|
|
460
|
+
BetaResponseError: _S.Bottom[_T.BetaResponseError, _t.Any] = _b.union(_b.struct(_T.BetaResponseError__0, {"code": BetaResponseErrorCode, "message": _S.String.annotate(description="A human-readable description of the error.\n"), "misalignment": BetaMisalignmentErrorDetailsResource}, optional=("misalignment",)).annotate(description="An error object returned when the model fails to generate a Response.\n"), _S.Null).annotate(identifier="BetaResponseError")
|
|
461
|
+
BetaError: _StructSchema[_T.BetaError, _t.Never, _t.Never] = _b.struct(_T.BetaError, {"code": _b.union(_S.String, _S.Null), "message": _S.String, "param": _b.union(_S.String, _S.Null), "type": _S.String, "misalignment": BetaMisalignmentErrorDetailsResource}, optional=("misalignment",)).annotate(identifier="BetaError")
|
|
462
|
+
BetaFunctionShellCallOutput: _StructSchema[_T.BetaFunctionShellCallOutput, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellCallOutput, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("shell_call_output").annotate(description="The type of the shell call output. Always `shell_call_output`."), "id": _S.String.annotate(description="The unique ID of the shell call output. Populated when this item is returned via API."), "call_id": _S.String.annotate(description="The unique ID of the shell tool call generated by the model."), "caller": _b.union(_b.suspend(lambda: BetaToolCallCaller).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.suspend(lambda: BetaFunctionShellCallOutputStatusEnum).annotate(description="The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`."), "output": _b.array(BetaFunctionShellCallOutputContent).annotate(description="An array of shell call output contents"), "max_output_length": _b.union(_b.check(_S.Number.annotate(description="The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output."), _S.is_int().annotate(expected="an integer")), _S.Null), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.")}, optional=("agent", "caller", "created_by",)).annotate(title="Shell call output", description="The output of a shell tool call that was emitted.", identifier="BetaFunctionShellCallOutput")
|
|
463
|
+
BetaResponseShellCallOutputContentDoneStreamingEvent: _StructSchema[_T.BetaResponseShellCallOutputContentDoneStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseShellCallOutputContentDoneStreamingEvent, {"type": _b.literal("response.shell_call_output_content.done").annotate(description="The type of the event, always `response.shell_call_output_content.done`."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of the event that was emitted."), _S.is_int().annotate(expected="an integer")), "agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that owns this multi-agent streaming event."), "item_id": _S.String.annotate(description="The ID of the output item that was updated."), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was updated."), _S.is_int().annotate(expected="an integer")), "command_index": _b.check(_S.Number.annotate(description="The index of the shell command that produced output."), _S.is_int().annotate(expected="an integer")), "output": _b.array(BetaFunctionShellCallOutputContent).annotate(description="The output contents emitted for the shell command.")}, optional=("agent",)).annotate(title="Response shell call output content done event", description="A streaming event that indicated shell call output was completed.", identifier="BetaResponseShellCallOutputContentDoneStreamingEvent")
|
|
464
|
+
BetaPromptCacheDiagnostics: _S.Bottom[_T.BetaPromptCacheDiagnostics, _t.Any] = _b.union(BetaPromptCacheMissDiagnosticsBody, BetaPromptCacheHitDiagnosticsBody, BetaPromptCacheComparisonResponseNotFoundDiagnosticsBody, BetaPromptCacheUnavailableDiagnosticsBody, mode="one_of").annotate(description="Prompt cache diagnostics requested for this response.", identifier="BetaPromptCacheDiagnostics")
|
|
465
|
+
BetaModeration: _StructSchema[_T.BetaModeration, _t.Never, _t.Never] = _b.struct(_T.BetaModeration, {"input": _b.union(BetaModerationResultBody, BetaModerationErrorBody, mode="one_of").annotate(description="Moderation for the response input."), "output": _b.union(BetaModerationResultBody, BetaModerationErrorBody, mode="one_of").annotate(description="Moderation for the response output.")}).annotate(title="Moderation", description="Moderation results or errors for the response input and output.", identifier="BetaModeration")
|
|
466
|
+
RunStepDetailsToolCallsObject: _StructSchema[_T.RunStepDetailsToolCallsObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDetailsToolCallsObject, {"type": _b.literal("tool_calls").annotate(description="Always `tool_calls`."), "tool_calls": _b.array(_b.union(RunStepDetailsToolCallsCodeObject, RunStepDetailsToolCallsFileSearchObject, RunStepDetailsToolCallsFunctionObject, mode="one_of")).annotate(description="An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.\n")}).annotate(title="Tool calls", description="Details of the tool call.", identifier="RunStepDetailsToolCallsObject")
|
|
467
|
+
AssistantObject: _StructSchema[_T.AssistantObject, _t.Never, _t.Never] = _b.struct(_T.AssistantObject, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints."), "object": _b.literal("assistant").annotate(description="The object type, which is always `assistant`."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the assistant was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "name": _b.union(_b.check(_S.String.annotate(description="The name of the assistant. The maximum length is 256 characters.\n"), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points")), _S.Null), "description": _b.union(_b.check(_S.String.annotate(description="The description of the assistant. The maximum length is 512 characters.\n"), _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points")), _S.Null), "model": _S.String.annotate(description="ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them.\n"), "instructions": _b.union(_b.check(_S.String.annotate(description="The system instructions that the assistant uses. The maximum length is 256,000 characters.\n"), _S.is_max_code_points(256000).annotate(expected="a string with at most 256000 code points")), _S.Null), "tools": _b.check(_b.array(_b.union(AssistantToolsCode, AssistantToolsFileSearch, AssistantToolsFunction, mode="one_of")).annotate(description="A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.\n"), _S.is_max_length(128).annotate(expected="a value with a length of at most 128")), "tool_resources": _b.union(_b.struct(_T.AssistantObject__tool_resources__0, {"code_interpreter": _b.struct(_T.AssistantObject__tool_resources__0__code_interpreter, {"file_ids": _b.check(_b.array(_S.String).annotate(description="A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.\n"), _S.is_max_length(20).annotate(expected="a value with a length of at most 20"))}, optional=("file_ids",)), "file_search": _b.struct(_T.AssistantObject__tool_resources__0__file_search, {"vector_store_ids": _b.check(_b.array(_S.String).annotate(description="The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1"))}, optional=("vector_store_ids",))}, optional=("code_interpreter", "file_search",)).annotate(description="A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n"), _S.Null), "metadata": Metadata, "temperature": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n"), _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(2).annotate(expected="a value less than or equal to 2")), _S.Null), "top_p": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n"), _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")), _S.Null), "response_format": _b.union(AssistantsApiResponseFormatOption, _S.Null)}, optional=("tool_resources", "temperature", "top_p", "response_format",)).annotate(title="Assistant", description="Represents an `assistant` that can call the model and use tools.", identifier="AssistantObject")
|
|
468
|
+
CreateAssistantRequest: _StructSchema[_T.CreateAssistantRequest, _t.Never, _t.Never] = _b.struct(_T.CreateAssistantRequest, {"model": _b.union(_S.String, AssistantSupportedModels).annotate(description="ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them.\n"), "name": _b.union(_b.check(_S.String.annotate(description="The name of the assistant. The maximum length is 256 characters.\n"), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points")), _S.Null), "description": _b.union(_b.check(_S.String.annotate(description="The description of the assistant. The maximum length is 512 characters.\n"), _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points")), _S.Null), "instructions": _b.union(_b.check(_S.String.annotate(description="The system instructions that the assistant uses. The maximum length is 256,000 characters.\n"), _S.is_max_code_points(256000).annotate(expected="a string with at most 256000 code points")), _S.Null), "reasoning_effort": ReasoningEffort, "tools": _b.check(_b.array(_b.union(AssistantToolsCode, AssistantToolsFileSearch, AssistantToolsFunction, mode="one_of")).annotate(description="A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.\n"), _S.is_max_length(128).annotate(expected="a value with a length of at most 128")), "tool_resources": _b.union(_b.struct(_T.CreateAssistantRequest__tool_resources__0, {"code_interpreter": _b.struct(_T.CreateAssistantRequest__tool_resources__0__code_interpreter, {"file_ids": _b.check(_b.array(_S.String).annotate(description="A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n"), _S.is_max_length(20).annotate(expected="a value with a length of at most 20"))}, optional=("file_ids",)), "file_search": _b.union(_b.struct(_T.CreateAssistantRequest__tool_resources__0__file_search__0, {"vector_store_ids": _b.check(_b.array(_S.String).annotate(description="The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1")), "vector_stores": _b.check(_b.array(_b.struct(_T.CreateAssistantRequest__tool_resources__0__file_search__0__vector_stores__item, {"file_ids": _b.check(_b.array(_S.String).annotate(description="A list of [file](https://developers.openai.com/api/reference/resources/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files.\n"), _S.is_max_length(100000000).annotate(expected="a value with a length of at most 100000000")), "chunking_strategy": _b.union(_b.struct(_T.CreateAssistantRequest__tool_resources__0__file_search__0__vector_stores__item__chunking_strategy__0, {"type": _b.literal("auto").annotate(description="Always `auto`.")}).annotate(title="Auto Chunking Strategy", description="The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`."), _b.struct(_T.CreateAssistantRequest__tool_resources__0__file_search__0__vector_stores__item__chunking_strategy__1, {"type": _b.literal("static").annotate(description="Always `static`."), "static": _b.struct(_T.CreateAssistantRequest__tool_resources__0__file_search__0__vector_stores__item__chunking_strategy__1__static, {"max_chunk_size_tokens": _b.check(_b.check(_b.check(_S.Number.annotate(description="The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(100).annotate(expected="a value greater than or equal to 100")), _S.is_less_than_or_equal_to(4096).annotate(expected="a value less than or equal to 4096")), "chunk_overlap_tokens": _b.check(_S.Number.annotate(description="The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.\n"), _S.is_int().annotate(expected="an integer"))})}).annotate(title="Static Chunking Strategy"), mode="one_of").annotate(description="The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy."), "metadata": Metadata}, optional=("file_ids", "chunking_strategy", "metadata",))).annotate(description="A helper to create a [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1"))}, optional=("vector_stores",)), _b.struct(_T.CreateAssistantRequest__tool_resources__0__file_search__1, {"vector_store_ids": _b.check(_b.array(_S.String).annotate(description="The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1")), "vector_stores": _b.check(_b.array(_b.struct(_T.CreateAssistantRequest__tool_resources__0__file_search__1__vector_stores__item, {"file_ids": _b.check(_b.array(_S.String).annotate(description="A list of [file](https://developers.openai.com/api/reference/resources/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files.\n"), _S.is_max_length(100000000).annotate(expected="a value with a length of at most 100000000")), "chunking_strategy": _b.union(_b.struct(_T.CreateAssistantRequest__tool_resources__0__file_search__1__vector_stores__item__chunking_strategy__0, {"type": _b.literal("auto").annotate(description="Always `auto`.")}).annotate(title="Auto Chunking Strategy", description="The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`."), _b.struct(_T.CreateAssistantRequest__tool_resources__0__file_search__1__vector_stores__item__chunking_strategy__1, {"type": _b.literal("static").annotate(description="Always `static`."), "static": _b.struct(_T.CreateAssistantRequest__tool_resources__0__file_search__1__vector_stores__item__chunking_strategy__1__static, {"max_chunk_size_tokens": _b.check(_b.check(_b.check(_S.Number.annotate(description="The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(100).annotate(expected="a value greater than or equal to 100")), _S.is_less_than_or_equal_to(4096).annotate(expected="a value less than or equal to 4096")), "chunk_overlap_tokens": _b.check(_S.Number.annotate(description="The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.\n"), _S.is_int().annotate(expected="an integer"))})}).annotate(title="Static Chunking Strategy"), mode="one_of").annotate(description="The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy."), "metadata": Metadata}, optional=("file_ids", "chunking_strategy", "metadata",))).annotate(description="A helper to create a [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1"))}, optional=("vector_store_ids",)), mode="one_of")}, optional=("code_interpreter", "file_search",)).annotate(description="A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n"), _S.Null), "metadata": Metadata, "temperature": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n"), _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(2).annotate(expected="a value less than or equal to 2")), _S.Null), "top_p": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n"), _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")), _S.Null), "response_format": _b.union(AssistantsApiResponseFormatOption, _S.Null)}, optional=("name", "description", "instructions", "reasoning_effort", "tools", "tool_resources", "metadata", "temperature", "top_p", "response_format",)).annotate(identifier="CreateAssistantRequest")
|
|
469
|
+
ModifyAssistantRequest: _StructSchema[_T.ModifyAssistantRequest, _t.Never, _t.Never] = _b.struct(_T.ModifyAssistantRequest, {"model": _b.union(_S.String, AssistantSupportedModels).annotate(description="ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them.\n"), "reasoning_effort": ReasoningEffort, "name": _b.union(_b.check(_S.String.annotate(description="The name of the assistant. The maximum length is 256 characters.\n"), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points")), _S.Null), "description": _b.union(_b.check(_S.String.annotate(description="The description of the assistant. The maximum length is 512 characters.\n"), _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points")), _S.Null), "instructions": _b.union(_b.check(_S.String.annotate(description="The system instructions that the assistant uses. The maximum length is 256,000 characters.\n"), _S.is_max_code_points(256000).annotate(expected="a string with at most 256000 code points")), _S.Null), "tools": _b.check(_b.array(_b.union(AssistantToolsCode, AssistantToolsFileSearch, AssistantToolsFunction, mode="one_of")).annotate(description="A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.\n"), _S.is_max_length(128).annotate(expected="a value with a length of at most 128")), "tool_resources": _b.union(_b.struct(_T.ModifyAssistantRequest__tool_resources__0, {"code_interpreter": _b.struct(_T.ModifyAssistantRequest__tool_resources__0__code_interpreter, {"file_ids": _b.check(_b.array(_S.String).annotate(description="Overrides the list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n"), _S.is_max_length(20).annotate(expected="a value with a length of at most 20"))}, optional=("file_ids",)), "file_search": _b.struct(_T.ModifyAssistantRequest__tool_resources__0__file_search, {"vector_store_ids": _b.check(_b.array(_S.String).annotate(description="Overrides the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1"))}, optional=("vector_store_ids",))}, optional=("code_interpreter", "file_search",)).annotate(description="A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n"), _S.Null), "metadata": Metadata, "temperature": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n"), _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(2).annotate(expected="a value less than or equal to 2")), _S.Null), "top_p": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n"), _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")), _S.Null), "response_format": _b.union(AssistantsApiResponseFormatOption, _S.Null)}, optional=("model", "reasoning_effort", "name", "description", "instructions", "tools", "tool_resources", "metadata", "temperature", "top_p", "response_format",)).annotate(identifier="ModifyAssistantRequest")
|
|
470
|
+
RunObject: _StructSchema[_T.RunObject, _t.Never, _t.Never] = _b.struct(_T.RunObject, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints."), "object": _b.literal("thread.run").annotate(description="The object type, which is always `thread.run`."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the run was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "thread_id": _S.String.annotate(description="The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was executed on as a part of this run."), "assistant_id": _S.String.annotate(description="The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for execution of this run."), "status": _b.literals(["queued", "in_progress", "requires_action", "cancelling", "cancelled", "failed", "completed", "incomplete", "expired"]).annotate(description="The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`."), "required_action": _b.union(_b.struct_with_rest(_b.struct(_T.RunObject__required_action__0, {"type": _b.literal("submit_tool_outputs").annotate(description="For now, this is always `submit_tool_outputs`."), "submit_tool_outputs": _b.struct(_T.RunObject__required_action__0__submit_tool_outputs, {"tool_calls": _b.array(RunToolCallObject).annotate(description="A list of the relevant tool calls.")}).annotate(description="Details on the tool outputs needed for this run to continue.")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Details on the action required to continue the run. Will be `null` if no action is required."), "last_error": _b.union(_b.struct_with_rest(_b.struct(_T.RunObject__last_error__0, {"code": _b.literals(["server_error", "rate_limit_exceeded", "invalid_prompt"]).annotate(description="One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`."), "message": _S.String.annotate(description="A human-readable description of the error.")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="The last error associated with this run. Will be `null` if there are no errors."), "expires_at": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The Unix timestamp (in seconds) for when the run will expire.", format="unixtime"), "started_at": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The Unix timestamp (in seconds) for when the run was started.", format="unixtime"), "cancelled_at": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The Unix timestamp (in seconds) for when the run was cancelled.", format="unixtime"), "failed_at": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The Unix timestamp (in seconds) for when the run failed.", format="unixtime"), "completed_at": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The Unix timestamp (in seconds) for when the run was completed.", format="unixtime"), "incomplete_details": _b.union(_b.struct_with_rest(_b.struct(_T.RunObject__incomplete_details__0, {"reason": _b.literals(["max_completion_tokens", "max_prompt_tokens"]).annotate(description="The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.")}, optional=("reason",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Details on why the run is incomplete. Will be `null` if the run is not incomplete."), "model": _S.String.annotate(description="The model that the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for this run."), "instructions": _S.String.annotate(description="The instructions that the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for this run."), "tools": _b.check(_b.array(_b.union(AssistantToolsCode, AssistantToolsFileSearch, AssistantToolsFunction, mode="one_of")).annotate(description="The list of tools that the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for this run."), _S.is_max_length(20).annotate(expected="a value with a length of at most 20")), "metadata": Metadata, "usage": RunCompletionUsage, "temperature": _b.union(_S.Finite, _S.Null).annotate(description="The sampling temperature used for this run. If not set, defaults to 1."), "top_p": _b.union(_S.Finite, _S.Null).annotate(description="The nucleus sampling value used for this run. If not set, defaults to 1."), "max_prompt_tokens": _b.union(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(256).annotate(expected="a value greater than or equal to 256")), _S.Null).annotate(description="The maximum number of prompt tokens specified to have been used over the course of the run.\n"), "max_completion_tokens": _b.union(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(256).annotate(expected="a value greater than or equal to 256")), _S.Null).annotate(description="The maximum number of completion tokens specified to have been used over the course of the run.\n"), "truncation_strategy": _b.union(TruncationObject, _S.Null), "tool_choice": _b.union(AssistantsApiToolChoiceOption, _S.Null), "parallel_tool_calls": ParallelToolCalls, "response_format": _b.union(AssistantsApiResponseFormatOption, _S.Null)}, optional=("temperature", "top_p",)).annotate(title="A run on a thread", description="Represents an execution run on a [thread](https://developers.openai.com/api/docs/assistants/migration).", identifier="RunObject")
|
|
471
|
+
CreateRunRequest: _StructSchema[_T.CreateRunRequest, _t.Never, _t.Never] = _b.struct(_T.CreateRunRequest, {"assistant_id": _S.String.annotate(description="The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to execute this run."), "model": _b.union(_S.String, AssistantSupportedModels, _S.Null).annotate(description="The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used."), "reasoning_effort": ReasoningEffort, "instructions": _b.union(_S.String, _S.Null).annotate(description="Overrides the [instructions](https://developers.openai.com/api/docs/assistants/migration) of the assistant. This is useful for modifying the behavior on a per-run basis."), "additional_instructions": _b.union(_S.String, _S.Null).annotate(description="Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions."), "additional_messages": _b.union(_b.array(CreateMessageRequest), _S.Null).annotate(description="Adds additional messages to the thread before creating the run."), "tools": _b.union(_b.check(_b.array(_b.union(AssistantToolsCode, AssistantToolsFileSearch, AssistantToolsFunction, mode="one_of")), _S.is_max_length(20).annotate(expected="a value with a length of at most 20")), _S.Null).annotate(description="Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis."), "metadata": Metadata, "temperature": _b.union(_b.check(_b.check(_S.Finite, _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(2).annotate(expected="a value less than or equal to 2")), _S.Null).annotate(description="What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n"), "top_p": _b.union(_b.check(_b.check(_S.Finite, _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")), _S.Null).annotate(description="An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n"), "stream": _b.union(_S.Boolean, _S.Null).annotate(description="If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.\n"), "max_prompt_tokens": _b.union(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(256).annotate(expected="a value greater than or equal to 256")), _S.Null).annotate(description="The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n"), "max_completion_tokens": _b.union(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(256).annotate(expected="a value greater than or equal to 256")), _S.Null).annotate(description="The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n"), "truncation_strategy": _b.union(TruncationObject, _S.Null), "tool_choice": _b.union(AssistantsApiToolChoiceOption, _S.Null), "parallel_tool_calls": ParallelToolCalls, "response_format": _b.union(AssistantsApiResponseFormatOption, _S.Null)}, optional=("model", "reasoning_effort", "instructions", "additional_instructions", "additional_messages", "tools", "metadata", "temperature", "top_p", "stream", "max_prompt_tokens", "max_completion_tokens", "truncation_strategy", "tool_choice", "parallel_tool_calls", "response_format",)).annotate(identifier="CreateRunRequest")
|
|
472
|
+
ResponseTextParam: _StructSchema[_T.ResponseTextParam, _t.Never, _t.Never] = _b.struct(_T.ResponseTextParam, {"format": TextResponseFormatConfiguration, "verbosity": Verbosity}, optional=("format", "verbosity",)).annotate(description="Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)\n- [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)\n", identifier="ResponseTextParam")
|
|
473
|
+
ErrorResponse: _StructSchema[_T.ErrorResponse, _t.Never, _t.Never] = _b.struct(_T.ErrorResponse, {"error": Error}).annotate(identifier="ErrorResponse")
|
|
474
|
+
PermissionErrorResponse: _StructSchema[_T.PermissionErrorResponse, _t.Never, _t.Never] = _b.struct(_T.PermissionErrorResponse, {"error": _b.union(Error, _S.String.annotate(description="An explanation of the missing API permissions.")).annotate(description="Details about the permission error.")}).annotate(identifier="PermissionErrorResponse")
|
|
475
|
+
ErrorEvent: _StructSchema[_T.ErrorEvent, _t.Never, _t.Never] = _b.struct(_T.ErrorEvent, {"event": _b.literal("error"), "data": Error}).annotate(description="Occurs when an [error](https://developers.openai.com/api/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout.", identifier="ErrorEvent")
|
|
476
|
+
VideoResource: _StructSchema[_T.VideoResource, _t.Never, _t.Never] = _b.struct(_T.VideoResource, {"id": _S.String.annotate(description="Unique identifier for the video job."), "object": _b.literal("video").annotate(description="The object type, which is always `video`."), "model": _b.suspend(lambda: VideoModel).annotate(description="The video generation model that produced the job."), "status": _b.suspend(lambda: VideoStatus).annotate(description="Current lifecycle status of the video job."), "progress": _b.check(_S.Number.annotate(description="Approximate completion percentage for the generation task."), _S.is_int().annotate(expected="an integer")), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (seconds) for when the job was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "completed_at": _b.union(_b.check(_S.Number.annotate(description="Unix timestamp (seconds) for when the job completed, if finished.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "expires_at": _b.union(_b.check(_S.Number.annotate(description="Unix timestamp (seconds) for when the downloadable assets expire, if set.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "prompt": _b.union(_S.String.annotate(description="The prompt that was used to generate the video."), _S.Null), "size": _b.suspend(lambda: VideoSize).annotate(description="The resolution of the generated video."), "seconds": _S.String.annotate(description="Duration of the generated clip in seconds. For extensions, this is the stitched total duration."), "remixed_from_video_id": _b.union(_S.String.annotate(description="Identifier of the source video if this video is a remix."), _S.Null), "error": _b.union(_b.suspend(lambda: Error_2).annotate(description="Error payload that explains why generation failed, if applicable."), _S.Null)}).annotate(title="Video job", description="Structured information describing a generated video job.", identifier="VideoResource")
|
|
477
|
+
ChatCompletionModeration: _StructSchema[_T.ChatCompletionModeration, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionModeration, {"input": _b.union(ChatCompletionModerationResults, ChatCompletionModerationError, mode="one_of").annotate(description="Moderation for the request input."), "output": _b.union(ChatCompletionModerationResults, ChatCompletionModerationError, mode="one_of").annotate(description="Moderation for the generated output.")}).annotate(description="Moderation results or errors for the request input and generated output.", identifier="ChatCompletionModeration")
|
|
478
|
+
ChatCompletionRequestSystemMessage: _StructSchema[_T.ChatCompletionRequestSystemMessage, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestSystemMessage, {"content": _b.union(_S.String.annotate(title="Text content", description="The contents of the system message."), _b.check(_b.array(ChatCompletionRequestSystemMessageContentPart).annotate(title="Array of content parts", description="An array of content parts with a defined type. For system messages, only type `text` is supported."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), mode="one_of").annotate(description="The contents of the system message."), "role": _b.literal("system").annotate(description="The role of the messages author, in this case `system`."), "name": _S.String.annotate(description="An optional name for the participant. Provides the model information to differentiate between participants of the same role.")}, optional=("name",)).annotate(title="System message", description="Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, use `developer` messages\nfor this purpose instead.\n", identifier="ChatCompletionRequestSystemMessage")
|
|
479
|
+
ChatCompletionRequestAssistantMessage: _StructSchema[_T.ChatCompletionRequestAssistantMessage, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestAssistantMessage, {"content": _b.union(_b.union(_S.String.annotate(title="Text content", description="The contents of the assistant message."), _b.check(_b.array(ChatCompletionRequestAssistantMessageContentPart).annotate(title="Array of content parts", description="An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), mode="one_of").annotate(description="The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n"), _S.Null), "refusal": _b.union(_S.String.annotate(description="The refusal message by the assistant."), _S.Null), "role": _b.literal("assistant").annotate(description="The role of the messages author, in this case `assistant`."), "name": _S.String.annotate(description="An optional name for the participant. Provides the model information to differentiate between participants of the same role."), "audio": _b.union(_b.struct(_T.ChatCompletionRequestAssistantMessage__audio__0, {"id": _S.String.annotate(description="Unique identifier for a previous audio response from the model.\n")}).annotate(description="Data about a previous audio response from the model.\n[Learn more](https://developers.openai.com/api/docs/guides/audio).\n"), _S.Null), "tool_calls": ChatCompletionMessageToolCalls, "function_call": _b.union(_b.struct(_T.ChatCompletionRequestAssistantMessage__function_call__0, {"arguments": _S.String.annotate(description="The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."), "name": _S.String.annotate(description="The name of the function to call.")}).annotate(description="Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model."), _S.Null)}, optional=("content", "refusal", "name", "audio", "tool_calls", "function_call",)).annotate(title="Assistant message", description="Messages sent by the model in response to user messages.\n", identifier="ChatCompletionRequestAssistantMessage")
|
|
480
|
+
ChatCompletionRequestToolMessage: _StructSchema[_T.ChatCompletionRequestToolMessage, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestToolMessage, {"role": _b.literal("tool").annotate(description="The role of the messages author, in this case `tool`."), "content": _b.union(_S.String.annotate(title="Text content", description="The contents of the tool message."), _b.check(_b.array(ChatCompletionRequestToolMessageContentPart).annotate(title="Array of content parts", description="An array of content parts with a defined type. For tool messages, only type `text` is supported."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), mode="one_of").annotate(description="The contents of the tool message."), "tool_call_id": _S.String.annotate(description="Tool call that this message is responding to.")}).annotate(title="Tool message", identifier="ChatCompletionRequestToolMessage")
|
|
481
|
+
ChatCompletionRequestUserMessage: _StructSchema[_T.ChatCompletionRequestUserMessage, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestUserMessage, {"content": _b.union(_S.String.annotate(title="Text content", description="The text contents of the message."), _b.check(_b.array(ChatCompletionRequestUserMessageContentPart).annotate(title="Array of content parts", description="An array of content parts with a defined type. Supported options differ based on the [model](https://developers.openai.com/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), mode="one_of").annotate(description="The contents of the user message.\n"), "role": _b.literal("user").annotate(description="The role of the messages author, in this case `user`."), "name": _S.String.annotate(description="An optional name for the participant. Provides the model information to differentiate between participants of the same role.")}, optional=("name",)).annotate(title="User message", description="Messages sent by an end user, containing prompts or additional context\ninformation.\n", identifier="ChatCompletionRequestUserMessage")
|
|
482
|
+
ModerationParam: _StructSchema[_T.ModerationParam, _t.Never, _t.Never] = _b.struct(_T.ModerationParam, {"model": _S.String.annotate(description="The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'."), "policy": _b.union(_b.suspend(lambda: ModerationPolicyParam).annotate(description="The policy to apply to moderated response input and output."), _S.Null)}, optional=("policy",)).annotate(description="Configuration for running moderation on the input and output of this response.", identifier="ModerationParam")
|
|
483
|
+
CodeInterpreterTool: _StructSchema[_T.CodeInterpreterTool, _t.Never, _t.Never] = _b.struct(_T.CodeInterpreterTool, {"type": _b.literal("code_interpreter").annotate(description="The type of the code interpreter tool. Always `code_interpreter`.\n"), "container": _b.union(_S.String.annotate(description="The container ID."), AutoCodeInterpreterToolParam, mode="one_of").annotate(description="The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.\n"), "allowed_callers": _b.union(_b.check(_b.array(CallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null)}, optional=("allowed_callers",)).annotate(title="Code interpreter", description="A tool that runs Python code to help generate a response to a prompt.\n", identifier="CodeInterpreterTool")
|
|
484
|
+
FunctionShellToolParam: _StructSchema[_T.FunctionShellToolParam, _t.Never, _t.Never] = _b.struct(_T.FunctionShellToolParam, {"type": _b.literal("shell").annotate(description="The type of the shell tool. Always `shell`."), "environment": _b.union(_b.union(ContainerAutoParam, LocalEnvironmentParam, ContainerReferenceParam, mode="one_of"), _S.Null), "allowed_callers": _b.union(_b.check(_b.array(CallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null)}, optional=("environment", "allowed_callers",)).annotate(title="Shell tool", description="A tool that allows the model to execute shell commands.", identifier="FunctionShellToolParam")
|
|
485
|
+
EvalItemContentArray: _S.Bottom[_T.EvalItemContentArray, _t.Any] = _b.array(EvalItemContentItem).annotate(title="An array of Input text, Output text, Input image, and Input audio", description="A list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.\n", identifier="EvalItemContentArray")
|
|
486
|
+
Message: _StructSchema[_T.Message, _t.Never, _t.Never] = _b.struct(_T.Message, {"type": _b.literal("message").annotate(description="The type of the message. Always set to `message`."), "id": _S.String.annotate(description="The unique ID of the message."), "status": _b.suspend(lambda: MessageStatus).annotate(description="The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API."), "role": _b.suspend(lambda: MessageRole).annotate(description="The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`."), "content": _b.array(_b.union(InputTextContent, OutputTextContent, TextContent, SummaryTextContent, ReasoningTextContent, RefusalContent, InputImageContent, ComputerScreenshotContent, InputFileContent, mode="one_of").annotate(description="A content part that makes up an input or output item.")).annotate(description="The content of the message"), "phase": _b.union(_b.suspend(lambda: MessagePhase_2).annotate(description="Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages."), _S.Null)}, optional=("phase",)).annotate(title="Message", description="A message to or from the model.", identifier="Message")
|
|
487
|
+
OutputMessageContent: _S.Bottom[_T.OutputMessageContent, _t.Any] = _b.union(OutputTextContent, RefusalContent, mode="one_of").annotate(identifier="OutputMessageContent")
|
|
488
|
+
OutputContent: _S.Bottom[_T.OutputContent, _t.Any] = _b.union(OutputTextContent, RefusalContent, ReasoningTextContent, mode="one_of").annotate(identifier="OutputContent")
|
|
489
|
+
FunctionToolCallOutputResource: _StructSchema[_T.FunctionToolCallOutputResource, _t.Never, _t.Never] = _b.struct(_T.FunctionToolCallOutputResource, {"id": _S.String.annotate(description="The unique ID of the function call tool output.\n"), "type": _b.literal("function_call_output").annotate(description="The type of the function tool call output. Always `function_call_output`.\n"), "call_id": _S.String.annotate(description="The unique ID of the function tool call generated by the model.\n"), "name": _S.String.annotate(description="The name of the tool that produced the output.\n"), "namespace": _S.String.annotate(description="The namespace of the tool that produced the output.\n"), "caller": _b.union(ToolCallCallerParam, _S.Null), "output": _b.union(_S.String.annotate(title="string output", description="A string of the output of the function call.\n"), _b.array(FunctionAndCustomToolCallOutput).annotate(title="output content list", description="Text, image, or file output of the function call.\n"), mode="one_of").annotate(description="The output from the function call generated by your code.\nCan be a string or an list of output content.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.\n")}, optional=("call_id", "name", "namespace", "caller", "created_by",)).annotate(identifier="FunctionToolCallOutputResource")
|
|
490
|
+
CustomToolCallOutput: _StructSchema[_T.CustomToolCallOutput, _t.Never, _t.Never] = _b.struct(_T.CustomToolCallOutput, {"type": _b.literal("custom_tool_call_output").annotate(description="The type of the custom tool call output. Always `custom_tool_call_output`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call output in the OpenAI platform.\n"), "call_id": _S.String.annotate(description="The call ID, used to map this custom tool call output to a custom tool call.\n"), "caller": _b.union(ToolCallCallerParam, _S.Null), "output": _b.union(_S.String.annotate(title="string output", description="A string of the output of the custom tool call.\n"), _b.array(FunctionAndCustomToolCallOutput).annotate(title="output content list", description="Text, image, or file output of the custom tool call.\n"), mode="one_of").annotate(description="The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n")}, optional=("id", "caller",)).annotate(title="Custom tool call output", description="The output of a custom tool call from your code, being sent back to the model.\n", identifier="CustomToolCallOutput")
|
|
491
|
+
CustomToolCallOutputResource: _StructSchema[_T.CustomToolCallOutputResource, _t.Never, _t.Never] = _b.struct(_T.CustomToolCallOutputResource, {"type": _b.literal("custom_tool_call_output").annotate(description="The type of the custom tool call output. Always `custom_tool_call_output`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call output item.\n"), "call_id": _S.String.annotate(description="The call ID, used to map this custom tool call output to a custom tool call.\n"), "caller": _b.union(ToolCallCallerParam, _S.Null), "output": _b.union(_S.String.annotate(title="string output", description="A string of the output of the custom tool call.\n"), _b.array(FunctionAndCustomToolCallOutput).annotate(title="output content list", description="Text, image, or file output of the custom tool call.\n"), mode="one_of").annotate(description="The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n"), "status": _b.suspend(lambda: FunctionCallOutputStatusEnum).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.\n")}, optional=("caller", "created_by",)).annotate(title="ResponseCustomToolCallOutputItem", identifier="CustomToolCallOutputResource")
|
|
492
|
+
FunctionToolCallOutput: _StructSchema[_T.FunctionToolCallOutput, _t.Never, _t.Never] = _b.struct(_T.FunctionToolCallOutput, {"id": _S.String.annotate(description="The unique ID of the function tool call output. Populated when this item\nis returned via API.\n"), "type": _b.literal("function_call_output").annotate(description="The type of the function tool call output. Always `function_call_output`.\n"), "call_id": _S.String.annotate(description="The unique ID of the function tool call generated by the model.\n"), "name": _S.String.annotate(description="The name of the tool that produced the output.\n"), "namespace": _S.String.annotate(description="The namespace of the tool that produced the output.\n"), "caller": _b.union(ToolCallCallerParam, _S.Null), "output": _b.union(_S.String.annotate(title="string output", description="A string of the output of the function call.\n"), _b.array(FunctionAndCustomToolCallOutput).annotate(title="output content list", description="Text, image, or file output of the function call.\n"), mode="one_of").annotate(description="The output from the function call generated by your code.\nCan be a string or an list of output content.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n")}, optional=("id", "call_id", "name", "namespace", "caller", "status",)).annotate(title="Function tool call output", description="The output of a function tool call.\n", identifier="FunctionToolCallOutput")
|
|
493
|
+
InputMessageContentList: _S.Bottom[_T.InputMessageContentList, _t.Any] = _b.array(InputContent).annotate(title="Input item content list", description="A list of one or many input items to the model, containing different content \ntypes.\n", identifier="InputMessageContentList")
|
|
494
|
+
Prompt: _S.Bottom[_T.Prompt, _t.Any] = _b.union(_b.struct(_T.Prompt__0, {"id": _S.String.annotate(description="The unique identifier of the prompt template to use."), "version": _b.union(_S.String.annotate(description="Optional version of the prompt template."), _S.Null), "variables": ResponsePromptVariables}, optional=("version", "variables",)).annotate(description="Reference to a prompt template and its variables.\n[Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).\n"), _S.Null).annotate(identifier="Prompt")
|
|
495
|
+
ComputerActionList: _S.Bottom[_T.ComputerActionList, _t.Any] = _b.array(ComputerAction).annotate(title="Computer Action List", description="Flattened batched actions for `computer_use`. Each action includes an\n`type` discriminator and action-specific fields.\n", identifier="ComputerActionList")
|
|
496
|
+
NamespaceToolParam: _StructSchema[_T.NamespaceToolParam, _t.Never, _t.Never] = _b.struct(_T.NamespaceToolParam, {"type": _b.literal("namespace").annotate(description="The type of the tool. Always `namespace`."), "name": _b.check(_S.String.annotate(description="The namespace name used in tool calls (for example, `crm`)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "description": _S.String.annotate(description="A description of the namespace shown to the model."), "tools": _b.check(_b.array(_b.union(FunctionToolParam, CustomToolParam, mode="one_of").annotate(description="A function or custom tool that belongs to a namespace.")).annotate(description="The function/custom tools available inside this namespace."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(title="Namespace", description="Groups function/custom tools under a shared namespace.", identifier="NamespaceToolParam")
|
|
497
|
+
ToolSearchOutputNamespaceToolParam: _StructSchema[_T.ToolSearchOutputNamespaceToolParam, _t.Never, _t.Never] = _b.struct(_T.ToolSearchOutputNamespaceToolParam, {"type": _b.literal("namespace").annotate(description="The type of the tool. Always `namespace`."), "name": _b.check(_S.String.annotate(description="The namespace name used in tool calls (for example, `crm`)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "description": _S.String.annotate(description="A description of the namespace shown to the model."), "tools": _b.check(_b.array(_b.union(ToolSearchOutputFunctionToolParam, CustomToolParam, mode="one_of").annotate(description="A function or custom tool loaded into a namespace by tool search.")).annotate(description="The function/custom tools loaded inside this namespace."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(title="Namespace", description="Groups function/custom tools under a shared namespace.", identifier="ToolSearchOutputNamespaceToolParam")
|
|
498
|
+
LiveHostedShellToolInputParam: _StructSchema[_T.LiveHostedShellToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveHostedShellToolInputParam, {"type": _b.literal("shell"), "environment": _b.union(_b.union(LiveHostedShellContainerAutoParam, LiveContainerReferenceParam, LiveLocalEnvironmentParam, mode="one_of"), _S.Null)}, optional=("environment",)).annotate(description="A Responses shell tool. Use a hosted container or return local shell results with response.item.create. Domain secrets are not supported.", identifier="LiveHostedShellToolInputParam")
|
|
499
|
+
Input: _S.Bottom[_T.Input, _t.Any] = _b.check(_b.array(LiveInitialItem).annotate(description="Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and 8,192 rendered tokens in total."), _S.is_max_length(128).annotate(expected="a value with a length of at most 128", identifier="input"))
|
|
500
|
+
AuditLog: _StructSchema[_T.AuditLog, _t.Never, _t.Never] = _b.struct(_T.AuditLog, {"id": _S.String.annotate(description="The ID of this log."), "type": AuditLogEventType, "effective_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of the event.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "project": _b.struct(_T.AuditLog__project, {"id": _S.String.annotate(description="The project ID."), "name": _S.String.annotate(description="The project title.")}, optional=("id", "name",)).annotate(description="The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project."), "actor": _b.union(AuditLogActor, _S.Null), "api_key.created": _b.struct(_T.AuditLog__api_key_created, {"id": _S.String.annotate(description="The tracking ID of the API key."), "data": _b.struct(_T.AuditLog__api_key_created__data, {"scopes": _b.array(_S.String).annotate(description="A list of scopes allowed for the API key, e.g. `[\"api.model.request\"]`")}, optional=("scopes",)).annotate(description="The payload used to create the API key.")}, optional=("id", "data",)).annotate(description="The details for events with this `type`."), "api_key.updated": _b.struct(_T.AuditLog__api_key_updated, {"id": _S.String.annotate(description="The tracking ID of the API key."), "changes_requested": _b.struct(_T.AuditLog__api_key_updated__changes_requested, {"scopes": _b.array(_S.String).annotate(description="A list of scopes allowed for the API key, e.g. `[\"api.model.request\"]`")}, optional=("scopes",)).annotate(description="The payload used to update the API key.")}, optional=("id", "changes_requested",)).annotate(description="The details for events with this `type`."), "api_key.deleted": _b.struct(_T.AuditLog__api_key_deleted, {"id": _S.String.annotate(description="The tracking ID of the API key.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "checkpoint.permission.created": _b.struct(_T.AuditLog__checkpoint_permission_created, {"id": _S.String.annotate(description="The ID of the checkpoint permission."), "data": _b.struct(_T.AuditLog__checkpoint_permission_created__data, {"project_id": _S.String.annotate(description="The ID of the project that the checkpoint permission was created for."), "fine_tuned_model_checkpoint": _S.String.annotate(description="The ID of the fine-tuned model checkpoint.")}, optional=("project_id", "fine_tuned_model_checkpoint",)).annotate(description="The payload used to create the checkpoint permission.")}, optional=("id", "data",)).annotate(description="The project and fine-tuned model checkpoint that the checkpoint permission was created for."), "checkpoint.permission.deleted": _b.struct(_T.AuditLog__checkpoint_permission_deleted, {"id": _S.String.annotate(description="The ID of the checkpoint permission.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "external_key.registered": _b.struct(_T.AuditLog__external_key_registered, {"id": _S.String.annotate(description="The ID of the external key configuration."), "data": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The configuration for the external key.")}, optional=("id", "data",)).annotate(description="The details for events with this `type`."), "external_key.removed": _b.struct(_T.AuditLog__external_key_removed, {"id": _S.String.annotate(description="The ID of the external key configuration.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "external_storage.registered": _b.struct(_T.AuditLog__external_storage_registered, {"id": _S.String.annotate(description="The ID of the external storage configuration."), "data": _b.struct(_T.AuditLog__external_storage_registered__data, {"provider": _b.suspend(lambda: Provider).annotate(description="The external storage provider configuration."), "geography": _S.String.annotate(description="The OpenAI geography derived from the storage region.")}, optional=("provider", "geography",)).annotate(description="The configuration for the external storage.")}, optional=("id", "data",)).annotate(description="The details for events with this `type`."), "external_storage.removed": _b.struct(_T.AuditLog__external_storage_removed, {"id": _S.String.annotate(description="The ID of the external storage configuration.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "group.created": _b.struct(_T.AuditLog__group_created, {"id": _S.String.annotate(description="The ID of the group."), "data": _b.struct(_T.AuditLog__group_created__data, {"group_name": _S.String.annotate(description="The group name.")}, optional=("group_name",)).annotate(description="Information about the created group.")}, optional=("id", "data",)).annotate(description="The details for events with this `type`."), "group.updated": _b.struct(_T.AuditLog__group_updated, {"id": _S.String.annotate(description="The ID of the group."), "changes_requested": _b.struct(_T.AuditLog__group_updated__changes_requested, {"group_name": _S.String.annotate(description="The updated group name.")}, optional=("group_name",)).annotate(description="The payload used to update the group.")}, optional=("id", "changes_requested",)).annotate(description="The details for events with this `type`."), "group.deleted": _b.struct(_T.AuditLog__group_deleted, {"id": _S.String.annotate(description="The ID of the group.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "scim.enabled": _b.struct(_T.AuditLog__scim_enabled, {"id": _S.String.annotate(description="The ID of the SCIM was enabled for.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "scim.disabled": _b.struct(_T.AuditLog__scim_disabled, {"id": _S.String.annotate(description="The ID of the SCIM was disabled for.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "invite.sent": _b.struct(_T.AuditLog__invite_sent, {"id": _S.String.annotate(description="The ID of the invite."), "data": _b.struct(_T.AuditLog__invite_sent__data, {"email": _S.String.annotate(description="The email invited to the organization."), "role": _S.String.annotate(description="The role the email was invited to be. Is either `owner` or `member`.")}, optional=("email", "role",)).annotate(description="The payload used to create the invite.")}, optional=("id", "data",)).annotate(description="The details for events with this `type`."), "invite.accepted": _b.struct(_T.AuditLog__invite_accepted, {"id": _S.String.annotate(description="The ID of the invite.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "invite.deleted": _b.struct(_T.AuditLog__invite_deleted, {"id": _S.String.annotate(description="The ID of the invite.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "ip_allowlist.created": _b.struct(_T.AuditLog__ip_allowlist_created, {"id": _S.String.annotate(description="The ID of the IP allowlist configuration."), "name": _S.String.annotate(description="The name of the IP allowlist configuration."), "allowed_ips": _b.array(_S.String).annotate(description="The IP addresses or CIDR ranges included in the configuration.")}, optional=("id", "name", "allowed_ips",)).annotate(description="The details for events with this `type`."), "ip_allowlist.updated": _b.struct(_T.AuditLog__ip_allowlist_updated, {"id": _S.String.annotate(description="The ID of the IP allowlist configuration."), "allowed_ips": _b.array(_S.String).annotate(description="The updated set of IP addresses or CIDR ranges in the configuration.")}, optional=("id", "allowed_ips",)).annotate(description="The details for events with this `type`."), "ip_allowlist.deleted": _b.struct(_T.AuditLog__ip_allowlist_deleted, {"id": _S.String.annotate(description="The ID of the IP allowlist configuration."), "name": _S.String.annotate(description="The name of the IP allowlist configuration."), "allowed_ips": _b.array(_S.String).annotate(description="The IP addresses or CIDR ranges that were in the configuration.")}, optional=("id", "name", "allowed_ips",)).annotate(description="The details for events with this `type`."), "ip_allowlist.config.activated": _b.struct(_T.AuditLog__ip_allowlist_config_activated, {"configs": _b.array(_b.struct(_T.AuditLog__ip_allowlist_config_activated__configs__item, {"id": _S.String.annotate(description="The ID of the IP allowlist configuration."), "name": _S.String.annotate(description="The name of the IP allowlist configuration.")}, optional=("id", "name",))).annotate(description="The configurations that were activated.")}, optional=("configs",)).annotate(description="The details for events with this `type`."), "ip_allowlist.config.deactivated": _b.struct(_T.AuditLog__ip_allowlist_config_deactivated, {"configs": _b.array(_b.struct(_T.AuditLog__ip_allowlist_config_deactivated__configs__item, {"id": _S.String.annotate(description="The ID of the IP allowlist configuration."), "name": _S.String.annotate(description="The name of the IP allowlist configuration.")}, optional=("id", "name",))).annotate(description="The configurations that were deactivated.")}, optional=("configs",)).annotate(description="The details for events with this `type`."), "login.succeeded": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="This event has no additional fields beyond the standard audit log attributes."), "login.failed": _b.struct(_T.AuditLog__login_failed, {"error_code": _S.String.annotate(description="The error code of the failure."), "error_message": _S.String.annotate(description="The error message of the failure.")}, optional=("error_code", "error_message",)).annotate(description="The details for events with this `type`."), "logout.succeeded": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="This event has no additional fields beyond the standard audit log attributes."), "logout.failed": _b.struct(_T.AuditLog__logout_failed, {"error_code": _S.String.annotate(description="The error code of the failure."), "error_message": _S.String.annotate(description="The error message of the failure.")}, optional=("error_code", "error_message",)).annotate(description="The details for events with this `type`."), "organization.updated": _b.struct(_T.AuditLog__organization_updated, {"id": _S.String.annotate(description="The organization ID."), "changes_requested": _b.struct(_T.AuditLog__organization_updated__changes_requested, {"title": _S.String.annotate(description="The organization title."), "description": _S.String.annotate(description="The organization description."), "name": _S.String.annotate(description="The organization name."), "threads_ui_visibility": _S.String.annotate(description="Visibility of the threads page which shows messages created with the Assistants API and Playground. One of `ANY_ROLE`, `OWNERS`, or `NONE`."), "usage_dashboard_visibility": _S.String.annotate(description="Visibility of the usage dashboard which shows activity and costs for your organization. One of `ANY_ROLE` or `OWNERS`."), "api_call_logging": _S.String.annotate(description="How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects`"), "api_call_logging_project_ids": _S.String.annotate(description="The list of project ids if api_call_logging is set to `enabled_for_selected_projects`")}, optional=("title", "description", "name", "threads_ui_visibility", "usage_dashboard_visibility", "api_call_logging", "api_call_logging_project_ids",)).annotate(description="The payload used to update the organization settings.")}, optional=("id", "changes_requested",)).annotate(description="The details for events with this `type`."), "project.created": _b.struct(_T.AuditLog__project_created, {"id": _S.String.annotate(description="The project ID."), "data": _b.struct(_T.AuditLog__project_created__data, {"name": _S.String.annotate(description="The project name."), "title": _S.String.annotate(description="The title of the project as seen on the dashboard.")}, optional=("name", "title",)).annotate(description="The payload used to create the project.")}, optional=("id", "data",)).annotate(description="The details for events with this `type`."), "project.updated": _b.struct(_T.AuditLog__project_updated, {"id": _S.String.annotate(description="The project ID."), "changes_requested": _b.struct(_T.AuditLog__project_updated__changes_requested, {"title": _S.String.annotate(description="The title of the project as seen on the dashboard.")}, optional=("title",)).annotate(description="The payload used to update the project.")}, optional=("id", "changes_requested",)).annotate(description="The details for events with this `type`."), "project.archived": _b.struct(_T.AuditLog__project_archived, {"id": _S.String.annotate(description="The project ID.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "project.deleted": _b.struct(_T.AuditLog__project_deleted, {"id": _S.String.annotate(description="The project ID.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "rate_limit.updated": _b.struct(_T.AuditLog__rate_limit_updated, {"id": _S.String.annotate(description="The rate limit ID"), "changes_requested": _b.struct(_T.AuditLog__rate_limit_updated__changes_requested, {"max_requests_per_1_minute": _b.check(_S.Number.annotate(description="The maximum requests per minute."), _S.is_int().annotate(expected="an integer")), "max_tokens_per_1_minute": _b.check(_S.Number.annotate(description="The maximum tokens per minute."), _S.is_int().annotate(expected="an integer")), "max_images_per_1_minute": _b.check(_S.Number.annotate(description="The maximum images per minute. Only relevant for certain models."), _S.is_int().annotate(expected="an integer")), "max_audio_megabytes_per_1_minute": _b.check(_S.Number.annotate(description="The maximum audio megabytes per minute. Only relevant for certain models."), _S.is_int().annotate(expected="an integer")), "max_requests_per_1_day": _b.check(_S.Number.annotate(description="The maximum requests per day. Only relevant for certain models."), _S.is_int().annotate(expected="an integer")), "batch_1_day_max_input_tokens": _b.check(_S.Number.annotate(description="The maximum batch input tokens per day. Only relevant for certain models."), _S.is_int().annotate(expected="an integer"))}, optional=("max_requests_per_1_minute", "max_tokens_per_1_minute", "max_images_per_1_minute", "max_audio_megabytes_per_1_minute", "max_requests_per_1_day", "batch_1_day_max_input_tokens",)).annotate(description="The payload used to update the rate limits.")}, optional=("id", "changes_requested",)).annotate(description="The details for events with this `type`."), "rate_limit.deleted": _b.struct(_T.AuditLog__rate_limit_deleted, {"id": _S.String.annotate(description="The rate limit ID")}, optional=("id",)).annotate(description="The details for events with this `type`."), "role.created": _b.struct(_T.AuditLog__role_created, {"id": _S.String.annotate(description="The role ID."), "role_name": _S.String.annotate(description="The name of the role."), "permissions": _b.array(_S.String).annotate(description="The permissions granted by the role."), "resource_type": _S.String.annotate(description="The type of resource the role belongs to."), "resource_id": _S.String.annotate(description="The resource the role is scoped to.")}, optional=("id", "role_name", "permissions", "resource_type", "resource_id",)).annotate(description="The details for events with this `type`."), "role.updated": _b.struct(_T.AuditLog__role_updated, {"id": _S.String.annotate(description="The role ID."), "changes_requested": _b.struct(_T.AuditLog__role_updated__changes_requested, {"role_name": _S.String.annotate(description="The updated role name, when provided."), "resource_id": _S.String.annotate(description="The resource the role is scoped to."), "resource_type": _S.String.annotate(description="The type of resource the role belongs to."), "permissions_added": _b.array(_S.String).annotate(description="The permissions added to the role."), "permissions_removed": _b.array(_S.String).annotate(description="The permissions removed from the role."), "description": _S.String.annotate(description="The updated role description, when provided."), "metadata": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="Additional metadata stored on the role.")}, optional=("role_name", "resource_id", "resource_type", "permissions_added", "permissions_removed", "description", "metadata",)).annotate(description="The payload used to update the role.")}, optional=("id", "changes_requested",)).annotate(description="The details for events with this `type`."), "role.deleted": _b.struct(_T.AuditLog__role_deleted, {"id": _S.String.annotate(description="The role ID.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "role.assignment.created": _b.struct(_T.AuditLog__role_assignment_created, {"id": _S.String.annotate(description="The identifier of the role assignment."), "principal_id": _S.String.annotate(description="The principal (user or group) that received the role."), "principal_type": _S.String.annotate(description="The type of principal (user or group) that received the role."), "resource_id": _S.String.annotate(description="The resource the role assignment is scoped to."), "resource_type": _S.String.annotate(description="The type of resource the role assignment is scoped to.")}, optional=("id", "principal_id", "principal_type", "resource_id", "resource_type",)).annotate(description="The details for events with this `type`."), "role.assignment.deleted": _b.struct(_T.AuditLog__role_assignment_deleted, {"id": _S.String.annotate(description="The identifier of the role assignment."), "principal_id": _S.String.annotate(description="The principal (user or group) that had the role removed."), "principal_type": _S.String.annotate(description="The type of principal (user or group) that had the role removed."), "resource_id": _S.String.annotate(description="The resource the role assignment was scoped to."), "resource_type": _S.String.annotate(description="The type of resource the role assignment was scoped to.")}, optional=("id", "principal_id", "principal_type", "resource_id", "resource_type",)).annotate(description="The details for events with this `type`."), "role.bound_to_resource": _b.struct(_T.AuditLog__role_bound_to_resource, {"id": _S.String.annotate(description="The ID of the resource the role was bound to. ChatGPT workspace connector resources use `<workspace_id>__<connector_id>`."), "role_id": _S.String.annotate(description="The ID of the role that was bound to the resource."), "resource_id": _S.String.annotate(description="The ID of the resource the role was bound to."), "resource_type": _S.String.annotate(description="The type of resource the role was bound to."), "permissions": _b.array(_S.String).annotate(description="The permissions granted to the role for the resource."), "workspace_id": _S.String.annotate(description="The workspace ID for a ChatGPT workspace connector resource."), "connector_id": _S.String.annotate(description="The connector ID for a ChatGPT workspace connector resource."), "connector_name": _S.String.annotate(description="The connector display name for a ChatGPT workspace connector resource, or the connector ID when the display name could not be resolved."), "enabled": _S.Boolean.annotate(description="Whether the connector is enabled for the role."), "source": _b.literals(["role_toggle", "role_connector_update", "role_delete", "workspace_permissions", "connector_publish"]).annotate(description="The connector role mutation path that produced the event.")}, optional=("id", "role_id", "resource_id", "resource_type", "permissions", "workspace_id", "connector_id", "connector_name", "enabled", "source",)).annotate(description="The details for events with this `type`."), "role.unbound_from_resource": _b.struct(_T.AuditLog__role_unbound_from_resource, {"id": _S.String.annotate(description="The ID of the resource the role was unbound from. ChatGPT workspace connector resources use `<workspace_id>__<connector_id>`."), "role_id": _S.String.annotate(description="The ID of the role that was unbound from the resource."), "resource_id": _S.String.annotate(description="The ID of the resource the role was unbound from."), "resource_type": _S.String.annotate(description="The type of resource the role was unbound from."), "permissions": _b.array(_S.String).annotate(description="The permissions remaining for the role after the change."), "workspace_id": _S.String.annotate(description="The workspace ID for a ChatGPT workspace connector resource."), "connector_id": _S.String.annotate(description="The connector ID for a ChatGPT workspace connector resource."), "connector_name": _S.String.annotate(description="The connector display name for a ChatGPT workspace connector resource, or the connector ID when the display name could not be resolved."), "enabled": _S.Boolean.annotate(description="Whether the connector is enabled for the role."), "source": _b.literals(["role_toggle", "role_connector_update", "role_delete", "workspace_permissions", "connector_publish"]).annotate(description="The connector role mutation path that produced the event.")}, optional=("id", "role_id", "resource_id", "resource_type", "permissions", "workspace_id", "connector_id", "connector_name", "enabled", "source",)).annotate(description="The details for events with this `type`."), "service_account.created": _b.struct(_T.AuditLog__service_account_created, {"id": _S.String.annotate(description="The service account ID."), "data": _b.struct(_T.AuditLog__service_account_created__data, {"role": _S.String.annotate(description="The role of the service account. Is either `owner` or `member`.")}, optional=("role",)).annotate(description="The payload used to create the service account.")}, optional=("id", "data",)).annotate(description="The details for events with this `type`."), "service_account.updated": _b.struct(_T.AuditLog__service_account_updated, {"id": _S.String.annotate(description="The service account ID."), "changes_requested": _b.struct(_T.AuditLog__service_account_updated__changes_requested, {"role": _S.String.annotate(description="The role of the service account. Is either `owner` or `member`.")}, optional=("role",)).annotate(description="The payload used to updated the service account.")}, optional=("id", "changes_requested",)).annotate(description="The details for events with this `type`."), "service_account.deleted": _b.struct(_T.AuditLog__service_account_deleted, {"id": _S.String.annotate(description="The service account ID.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "workload_identity_provider.created": _b.struct(_T.AuditLog__workload_identity_provider_created, {"id": _S.String.annotate(description="The workload identity provider ID."), "data": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The payload used to create the workload identity provider.")}, optional=("id", "data",)).annotate(description="The details for events with this `type`."), "workload_identity_provider.updated": _b.struct(_T.AuditLog__workload_identity_provider_updated, {"id": _S.String.annotate(description="The workload identity provider ID."), "changes_requested": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The payload used to update the workload identity provider.")}, optional=("id", "changes_requested",)).annotate(description="The details for events with this `type`."), "workload_identity_provider.deleted": _b.struct(_T.AuditLog__workload_identity_provider_deleted, {"id": _S.String.annotate(description="The workload identity provider ID."), "name": _S.String.annotate(description="The workload identity provider name.")}, optional=("id", "name",)).annotate(description="The details for events with this `type`."), "workload_identity_provider_mapping.created": _b.struct(_T.AuditLog__workload_identity_provider_mapping_created, {"id": _S.String.annotate(description="The workload identity provider mapping ID."), "identity_provider_id": _S.String.annotate(description="The workload identity provider ID."), "data": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The payload used to create the workload identity provider mapping.")}, optional=("id", "identity_provider_id", "data",)).annotate(description="The details for events with this `type`."), "workload_identity_provider_mapping.updated": _b.struct(_T.AuditLog__workload_identity_provider_mapping_updated, {"id": _S.String.annotate(description="The workload identity provider mapping ID."), "identity_provider_id": _S.String.annotate(description="The workload identity provider ID."), "changes_requested": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The payload used to update the workload identity provider mapping.")}, optional=("id", "identity_provider_id", "changes_requested",)).annotate(description="The details for events with this `type`."), "workload_identity_provider_mapping.deleted": _b.struct(_T.AuditLog__workload_identity_provider_mapping_deleted, {"id": _S.String.annotate(description="The workload identity provider mapping ID."), "identity_provider_id": _S.String.annotate(description="The workload identity provider ID."), "project_id": _S.String.annotate(description="The project ID."), "service_account_id": _S.String.annotate(description="The mapped service account ID.")}, optional=("id", "identity_provider_id", "project_id", "service_account_id",)).annotate(description="The details for events with this `type`."), "user.added": _b.struct(_T.AuditLog__user_added, {"id": _S.String.annotate(description="The user ID."), "data": _b.struct(_T.AuditLog__user_added__data, {"role": _S.String.annotate(description="The role of the user. Is either `owner` or `member`.")}, optional=("role",)).annotate(description="The payload used to add the user to the project.")}, optional=("id", "data",)).annotate(description="The details for events with this `type`."), "user.updated": _b.struct(_T.AuditLog__user_updated, {"id": _S.String.annotate(description="The project ID."), "changes_requested": _b.struct(_T.AuditLog__user_updated__changes_requested, {"role": _S.String.annotate(description="The role of the user. Is either `owner` or `member`.")}, optional=("role",)).annotate(description="The payload used to update the user.")}, optional=("id", "changes_requested",)).annotate(description="The details for events with this `type`."), "user.deleted": _b.struct(_T.AuditLog__user_deleted, {"id": _S.String.annotate(description="The user ID.")}, optional=("id",)).annotate(description="The details for events with this `type`."), "certificate.created": _b.struct(_T.AuditLog__certificate_created, {"id": _S.String.annotate(description="The certificate ID."), "name": _S.String.annotate(description="The name of the certificate.")}, optional=("id", "name",)).annotate(description="The details for events with this `type`."), "certificate.updated": _b.struct(_T.AuditLog__certificate_updated, {"id": _S.String.annotate(description="The certificate ID."), "name": _S.String.annotate(description="The name of the certificate.")}, optional=("id", "name",)).annotate(description="The details for events with this `type`."), "certificate.deleted": _b.struct(_T.AuditLog__certificate_deleted, {"id": _S.String.annotate(description="The certificate ID."), "name": _S.String.annotate(description="The name of the certificate."), "certificate": _S.String.annotate(description="The certificate content in PEM format.")}, optional=("id", "name", "certificate",)).annotate(description="The details for events with this `type`."), "certificates.activated": _b.struct(_T.AuditLog__certificates_activated, {"certificates": _b.array(_b.struct(_T.AuditLog__certificates_activated__certificates__item, {"id": _S.String.annotate(description="The certificate ID."), "name": _S.String.annotate(description="The name of the certificate.")}, optional=("id", "name",)))}, optional=("certificates",)).annotate(description="The details for events with this `type`."), "certificates.deactivated": _b.struct(_T.AuditLog__certificates_deactivated, {"certificates": _b.array(_b.struct(_T.AuditLog__certificates_deactivated__certificates__item, {"id": _S.String.annotate(description="The certificate ID."), "name": _S.String.annotate(description="The name of the certificate.")}, optional=("id", "name",)))}, optional=("certificates",)).annotate(description="The details for events with this `type`.")}, optional=("project", "actor", "api_key.created", "api_key.updated", "api_key.deleted", "checkpoint.permission.created", "checkpoint.permission.deleted", "external_key.registered", "external_key.removed", "external_storage.registered", "external_storage.removed", "group.created", "group.updated", "group.deleted", "scim.enabled", "scim.disabled", "invite.sent", "invite.accepted", "invite.deleted", "ip_allowlist.created", "ip_allowlist.updated", "ip_allowlist.deleted", "ip_allowlist.config.activated", "ip_allowlist.config.deactivated", "login.succeeded", "login.failed", "logout.succeeded", "logout.failed", "organization.updated", "project.created", "project.updated", "project.archived", "project.deleted", "rate_limit.updated", "rate_limit.deleted", "role.created", "role.updated", "role.deleted", "role.assignment.created", "role.assignment.deleted", "role.bound_to_resource", "role.unbound_from_resource", "service_account.created", "service_account.updated", "service_account.deleted", "workload_identity_provider.created", "workload_identity_provider.updated", "workload_identity_provider.deleted", "workload_identity_provider_mapping.created", "workload_identity_provider_mapping.updated", "workload_identity_provider_mapping.deleted", "user.added", "user.updated", "user.deleted", "certificate.created", "certificate.updated", "certificate.deleted", "certificates.activated", "certificates.deactivated",)).annotate(description="A log of a user action or configuration change within this organization.", identifier="AuditLog")
|
|
501
|
+
CreateThreadAndRunRequest: _StructSchema[_T.CreateThreadAndRunRequest, _t.Never, _t.Never] = _b.struct(_T.CreateThreadAndRunRequest, {"assistant_id": _S.String.annotate(description="The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to execute this run."), "thread": CreateThreadRequest, "model": _b.union(_S.String, _b.literals(["gpt-5", "gpt-5-mini", "gpt-5-nano", "gpt-5-2025-08-07", "gpt-5-mini-2025-08-07", "gpt-5-nano-2025-08-07", "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", "gpt-4.1-2025-04-14", "gpt-4.1-mini-2025-04-14", "gpt-4.1-nano-2025-04-14", "gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4.5-preview", "gpt-4.5-preview-2025-02-27", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613"]), _S.Null).annotate(description="The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used."), "instructions": _b.union(_S.String, _S.Null).annotate(description="Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis."), "tools": _b.union(_b.check(_b.array(_b.union(AssistantToolsCode, AssistantToolsFileSearch, AssistantToolsFunction, mode="one_of")), _S.is_max_length(20).annotate(expected="a value with a length of at most 20")), _S.Null).annotate(description="Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis."), "tool_resources": _b.union(_b.struct_with_rest(_b.struct(_T.CreateThreadAndRunRequest__tool_resources__0, {"code_interpreter": _b.struct(_T.CreateThreadAndRunRequest__tool_resources__0__code_interpreter, {"file_ids": _b.check(_b.array(_S.String).annotate(description="A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n"), _S.is_max_length(20).annotate(expected="a value with a length of at most 20"))}, optional=("file_ids",)), "file_search": _b.struct(_T.CreateThreadAndRunRequest__tool_resources__0__file_search, {"vector_store_ids": _b.check(_b.array(_S.String).annotate(description="The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n"), _S.is_max_length(1).annotate(expected="a value with a length of at most 1"))}, optional=("vector_store_ids",))}, optional=("code_interpreter", "file_search",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n"), "metadata": Metadata, "temperature": _b.union(_b.check(_b.check(_S.Finite, _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(2).annotate(expected="a value less than or equal to 2")), _S.Null).annotate(description="What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n"), "top_p": _b.union(_b.check(_b.check(_S.Finite, _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")), _S.Null).annotate(description="An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n"), "stream": _b.union(_S.Boolean, _S.Null).annotate(description="If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.\n"), "max_prompt_tokens": _b.union(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(256).annotate(expected="a value greater than or equal to 256")), _S.Null).annotate(description="The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n"), "max_completion_tokens": _b.union(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(256).annotate(expected="a value greater than or equal to 256")), _S.Null).annotate(description="The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n"), "truncation_strategy": _b.union(TruncationObject, _S.Null), "tool_choice": _b.union(AssistantsApiToolChoiceOption, _S.Null), "parallel_tool_calls": ParallelToolCalls, "response_format": _b.union(AssistantsApiResponseFormatOption, _S.Null)}, optional=("thread", "model", "instructions", "tools", "tool_resources", "metadata", "temperature", "top_p", "stream", "max_prompt_tokens", "max_completion_tokens", "truncation_strategy", "tool_choice", "parallel_tool_calls", "response_format",)).annotate(identifier="CreateThreadAndRunRequest")
|
|
502
|
+
RunStepDeltaObject: _StructSchema[_T.RunStepDeltaObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDeltaObject, {"id": _S.String.annotate(description="The identifier of the run step, which can be referenced in API endpoints."), "object": _b.literal("thread.run.step.delta").annotate(description="The object type, which is always `thread.run.step.delta`."), "delta": _b.struct(_T.RunStepDeltaObject__delta, {"step_details": _b.union(RunStepDeltaStepDetailsMessageCreationObject, RunStepDeltaStepDetailsToolCallsObject, mode="one_of").annotate(description="The details of the run step.")}, optional=("step_details",)).annotate(description="The delta containing the fields that have changed on the run step.")}).annotate(title="Run step delta object", description="Represents a run step delta i.e. any changed fields on a run step during streaming.\n", identifier="RunStepDeltaObject")
|
|
503
|
+
ListMessagesResponse: _S.Bottom[_T.ListMessagesResponse, _t.Any] = _b.union(_S.Null, _S.String, _S.Finite, _S.Boolean, _b.struct_with_rest(_b.struct(_T.ListMessagesResponse__4, {"object": _S.String, "data": _b.array(MessageObject), "first_id": _S.String, "last_id": _S.String, "has_more": _S.Boolean}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _b.array(_S.Json.annotate(expected="JSON value"))).annotate(identifier="ListMessagesResponse")
|
|
504
|
+
MessageStreamEvent: _S.Bottom[_T.MessageStreamEvent, _t.Any] = _b.union(_b.struct(_T.MessageStreamEvent__0, {"event": _b.literal("thread.message.created"), "data": MessageObject}).annotate(description="Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is created."), _b.struct(_T.MessageStreamEvent__1, {"event": _b.literal("thread.message.in_progress"), "data": MessageObject}).annotate(description="Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state."), _b.struct(_T.MessageStreamEvent__2, {"event": _b.literal("thread.message.delta"), "data": MessageDeltaObject}).annotate(description="Occurs when parts of a [Message](https://developers.openai.com/api/docs/assistants/migration) are being streamed."), _b.struct(_T.MessageStreamEvent__3, {"event": _b.literal("thread.message.completed"), "data": MessageObject}).annotate(description="Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is completed."), _b.struct(_T.MessageStreamEvent__4, {"event": _b.literal("thread.message.incomplete"), "data": MessageObject}).annotate(description="Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends before it is completed."), mode="one_of").annotate(identifier="MessageStreamEvent")
|
|
505
|
+
CreateVectorStoreFileRequest: _StructSchema[_T.CreateVectorStoreFileRequest, _t.Never, _t.Never] = _b.struct(_T.CreateVectorStoreFileRequest, {"file_id": _S.String.annotate(description="A [File](https://developers.openai.com/api/reference/resources/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. For multi-file ingestion, we recommend [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) to minimize per-vector-store write requests."), "chunking_strategy": ChunkingStrategyRequestParam, "attributes": VectorStoreFileAttributes}, optional=("chunking_strategy", "attributes",)).annotate(identifier="CreateVectorStoreFileRequest")
|
|
506
|
+
ListVectorStoreFilesResponse: _S.Bottom[_T.ListVectorStoreFilesResponse, _t.Any] = _b.union(_S.Null, _S.String, _S.Finite, _S.Boolean, _b.struct_with_rest(_b.struct(_T.ListVectorStoreFilesResponse__4, {"object": _S.String, "data": _b.array(VectorStoreFileObject), "first_id": _S.String, "last_id": _S.String, "has_more": _S.Boolean}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _b.array(_S.Json.annotate(expected="JSON value"))).annotate(identifier="ListVectorStoreFilesResponse")
|
|
507
|
+
PublicDecisionsUsageResponseResource: _StructSchema[_T.PublicDecisionsUsageResponseResource, _t.Never, _t.Never] = _b.struct(_T.PublicDecisionsUsageResponseResource, {"object": _b.literal("page"), "has_more": _S.Boolean, "next_page": _b.union(_S.String, _S.Null), "data": _b.array(DecisionsUsageBucket)}).annotate(identifier="PublicDecisionsUsageResponseResource")
|
|
508
|
+
AssistantMessageItem: _StructSchema[_T.AssistantMessageItem, _t.Never, _t.Never] = _b.struct(_T.AssistantMessageItem, {"id": _S.String.annotate(description="Identifier of the thread item."), "object": _b.literal("chatkit.thread_item").annotate(description="Type discriminator that is always `chatkit.thread_item`."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) for when the item was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "thread_id": _S.String.annotate(description="Identifier of the parent thread."), "type": _b.literal("chatkit.assistant_message").annotate(description="Type discriminator that is always `chatkit.assistant_message`."), "content": _b.array(ResponseOutputText).annotate(description="Ordered assistant response segments.")}).annotate(title="Assistant message", description="Assistant-authored message within a thread.", identifier="AssistantMessageItem")
|
|
509
|
+
DecisionInputContent: _S.Bottom[_T.DecisionInputContent, _t.Any] = _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _b.suspend(lambda: DecisionInputContentParts).annotate(title="Parts"), mode="one_of").annotate(description="Text evidence or an ordered list of text and image parts.", identifier="DecisionInputContent")
|
|
510
|
+
QuestionParam: _S.Bottom[_T.QuestionParam, _t.Any] = _b.union(QuestionParamPredicate, QuestionParamChoice, QuestionParamScore, mode="one_of").annotate(description="A question about the request's input, with an optional correlation name.", identifier="QuestionParam")
|
|
511
|
+
AnswerResource: _S.Bottom[_T.AnswerResource, _t.Any] = _b.union(AnswerResourcePredicate, AnswerResourceChoice, AnswerResourceScore, AnswerResourceRefusal, mode="one_of").annotate(description="A completed question always includes its name, including null when unnamed.", identifier="AnswerResource")
|
|
512
|
+
AgentEnvironmentListResource: _StructSchema[_T.AgentEnvironmentListResource, _t.Never, _t.Never] = _b.struct(_T.AgentEnvironmentListResource, {"object": _b.literal("list").annotate(description="The object type, which is always `list`."), "data": _b.check(_b.check(_b.array(PublicEnvironmentResource).annotate(description="The resources returned in this page, in the requested sort order."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "first_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the first resource in `data`, or `null` if the page is empty."), "last_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters."), "has_more": _S.Boolean.annotate(description="Whether there are more resources to retrieve after this page.")}).annotate(description="A page of Agents API resources, with IDs for retrieving additional pages.", identifier="AgentEnvironmentListResource")
|
|
513
|
+
HostedSkillParam: _S.Bottom[_T.HostedSkillParam, _t.Any] = _b.union(HostedSkillParamSkillReference, HostedSkillParamInline, mode="one_of").annotate(description="A skill installed in an OpenAI-hosted environment.", identifier="HostedSkillParam")
|
|
514
|
+
HostedPluginParam: _S.Bottom[_T.HostedPluginParam, _t.Any] = _b.union(HostedPluginParamInline, mode="one_of").annotate(description="A plugin installed in an OpenAI-hosted environment.", identifier="HostedPluginParam")
|
|
515
|
+
SessionEventAgentSessionSubagentCreated: _StructSchema[_T.SessionEventAgentSessionSubagentCreated, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionSubagentCreated, {"type": _b.literal("agent.session.subagent.created").annotate(description="The type of the object. Always `agent.session.subagent.created`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "subagent": _b.suspend(lambda: SubagentResource).annotate(description="The subagent that was created.")}).annotate(description="Emitted when a subagent is created.", identifier="SessionEventAgentSessionSubagentCreated")
|
|
516
|
+
SessionEventAgentSessionSubagentActive: _StructSchema[_T.SessionEventAgentSessionSubagentActive, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionSubagentActive, {"type": _b.literal("agent.session.subagent.active").annotate(description="The type of the object. Always `agent.session.subagent.active`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "subagent": _b.suspend(lambda: SubagentResource).annotate(description="The subagent that resumed.")}).annotate(description="Emitted when a closed subagent successfully resumes.", identifier="SessionEventAgentSessionSubagentActive")
|
|
517
|
+
SessionEventAgentSessionSubagentClosed: _StructSchema[_T.SessionEventAgentSessionSubagentClosed, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionSubagentClosed, {"type": _b.literal("agent.session.subagent.closed").annotate(description="The type of the object. Always `agent.session.subagent.closed`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "subagent": _b.suspend(lambda: SubagentResource).annotate(description="The subagent that was closed.")}).annotate(description="Emitted when a subagent is closed.", identifier="SessionEventAgentSessionSubagentClosed")
|
|
518
|
+
FunctionCallOutputItemResource: _StructSchema[_T.FunctionCallOutputItemResource, _t.Never, _t.Never] = _b.struct(_T.FunctionCallOutputItemResource, {"id": _b.check(_S.String.annotate(description="The ID of the function call output item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn that contains this item."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "type": _b.literal("function_call_output").annotate(description="The item type. Always `function_call_output`."), "call_id": _b.check(_S.String.annotate(description="The ID of the function call that produced this output."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "status": _b.suspend(lambda: FunctionCallStatusResource).annotate(description="The status of the function call."), "output": _b.union(FunctionCallOutputResource, _S.Null).annotate(description="The function result, if the call succeeded."), "error": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The error message, if the call failed.")}).annotate(description="The result supplied for a function call.", identifier="FunctionCallOutputItemResource")
|
|
519
|
+
BrowserAuthenticationRequestItemResource: _StructSchema[_T.BrowserAuthenticationRequestItemResource, _t.Never, _t.Never] = _b.struct(_T.BrowserAuthenticationRequestItemResource, {"turn_id": _b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "request_id": _b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "request": BrowserAuthenticationHistoryRequestKindResource, "id": _b.check(_S.String.annotate(description="The stable history item ID."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "type": _b.literal("computer_use_approval_request").annotate(description="The item type. Always computer_use_approval_request.")}).annotate(description="A credential-free history record of the emitted login request.", identifier="BrowserAuthenticationRequestItemResource")
|
|
520
|
+
SessionRequiredActionResourceComputerUseApprovalRequest: _StructSchema[_T.SessionRequiredActionResourceComputerUseApprovalRequest, _t.Never, _t.Never] = _b.struct(_T.SessionRequiredActionResourceComputerUseApprovalRequest, {"type": _b.literal("computer_use_approval_request").annotate(description="The type of the object. Always `computer_use_approval_request`."), "turn_id": _b.check(_S.String.annotate(description="The turn that requested approval."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "request_id": _b.check(_S.String.annotate(description="The registered request ID to echo when responding."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "request": _b.suspend(lambda: ComputerUseApprovalRequestKindResource).annotate(description="The information needed to render the request.")}).annotate(description="Respond to a computer-use request.", identifier="SessionRequiredActionResourceComputerUseApprovalRequest")
|
|
521
|
+
SessionTurnListResource: _StructSchema[_T.SessionTurnListResource, _t.Never, _t.Never] = _b.struct(_T.SessionTurnListResource, {"object": _b.literal("list").annotate(description="The object type, which is always `list`."), "data": _b.check(_b.check(_b.array(TurnResource).annotate(description="The resources returned in this page, in the requested sort order."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "first_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the first resource in `data`, or `null` if the page is empty."), "last_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters."), "has_more": _S.Boolean.annotate(description="Whether there are more resources to retrieve after this page.")}).annotate(description="A page of Agents API resources, with IDs for retrieving additional pages.", identifier="SessionTurnListResource")
|
|
522
|
+
SessionEventAgentSessionTurnCreated: _StructSchema[_T.SessionEventAgentSessionTurnCreated, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnCreated, {"type": _b.literal("agent.session.turn.created").annotate(description="The type of the object. Always `agent.session.turn.created`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn": _b.suspend(lambda: TurnResource).annotate(description="The turn at the time it was created.")}).annotate(description="Emitted when a turn is created.", identifier="SessionEventAgentSessionTurnCreated")
|
|
523
|
+
SessionEventAgentSessionTurnInProgress: _StructSchema[_T.SessionEventAgentSessionTurnInProgress, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnInProgress, {"type": _b.literal("agent.session.turn.in_progress").annotate(description="The type of the object. Always `agent.session.turn.in_progress`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn": _b.suspend(lambda: TurnResource).annotate(description="The turn at the time it started running.")}).annotate(description="Emitted when a turn starts running.", identifier="SessionEventAgentSessionTurnInProgress")
|
|
524
|
+
SessionEventAgentSessionTurnCompleted: _StructSchema[_T.SessionEventAgentSessionTurnCompleted, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnCompleted, {"type": _b.literal("agent.session.turn.completed").annotate(description="The type of the object. Always `agent.session.turn.completed`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn": _b.suspend(lambda: TurnResource).annotate(description="The completed turn."), "usage": _b.union(TokenUsageResource, _S.Null).annotate(description="Token usage by the root agent during the turn, when available.")}).annotate(description="Emitted when a turn completes.", identifier="SessionEventAgentSessionTurnCompleted")
|
|
525
|
+
SessionEventAgentSessionTurnFailed: _StructSchema[_T.SessionEventAgentSessionTurnFailed, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnFailed, {"type": _b.literal("agent.session.turn.failed").annotate(description="The type of the object. Always `agent.session.turn.failed`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn": _b.suspend(lambda: TurnResource).annotate(description="The failed turn."), "usage": _b.union(TokenUsageResource, _S.Null).annotate(description="Token usage by the root agent during the turn, when available.")}).annotate(description="Emitted when a turn fails.", identifier="SessionEventAgentSessionTurnFailed")
|
|
526
|
+
SessionEventAgentSessionTurnCancelled: _StructSchema[_T.SessionEventAgentSessionTurnCancelled, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnCancelled, {"type": _b.literal("agent.session.turn.cancelled").annotate(description="The type of the object. Always `agent.session.turn.cancelled`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.check(_S.String.annotate(description="The ID of the turn associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn": _b.suspend(lambda: TurnResource).annotate(description="The cancelled turn."), "usage": _b.union(TokenUsageResource, _S.Null).annotate(description="Token usage by the root agent during the turn, when available.")}).annotate(description="Emitted when a turn is cancelled.", identifier="SessionEventAgentSessionTurnCancelled")
|
|
527
|
+
PersistedAgentToolResource: _S.Bottom[_T.PersistedAgentToolResource, _t.Any] = _b.union(PersistedAgentToolResourceFunction, PersistedAgentToolResourceToolSearch, PersistedAgentToolResourceProgrammaticToolCalling, PersistedAgentToolResourceMcp, PersistedAgentToolResourceWebSearch, PersistedAgentToolResourceComputerUse, mode="one_of").annotate(description="A credential-free tool available to a reusable agent.", identifier="PersistedAgentToolResource")
|
|
528
|
+
UpdateAgentSessionParams: _StructSchema[_T.UpdateAgentSessionParams, _t.Never, _t.Never] = _b.struct(_T.UpdateAgentSessionParams, {"spend_control": _b.union(SessionSpendControlParam, _S.Null).annotate(description="Omit to retain the limit; null or a null limit removes it without resetting spend."), "agent": _b.suspend(lambda: UpdateSessionAgentParam).annotate(description="Model settings for subsequent turns. Omitted fields stay unchanged."), "metadata": _b.union(_b.check(_b.check(_b.check(_b.record(_S.String, _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points"))), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(16).annotate(expected="a value with at most 16 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points"))).annotate(expected="an object with property names matching the schema")), _S.Null).annotate(description="Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters.")}, optional=("spend_control", "agent", "metadata",)).annotate(description="Fields to update on an existing session.", identifier="UpdateAgentSessionParams")
|
|
529
|
+
PersistedAgentToolConfigParam: _S.Bottom[_T.PersistedAgentToolConfigParam, _t.Any] = _b.union(PersistedAgentToolConfigParamFunction, PersistedAgentToolConfigParamToolSearch, PersistedAgentToolConfigParamProgrammaticToolCalling, PersistedAgentToolConfigParamMcp, PersistedAgentToolConfigParamWebSearch, PersistedAgentToolConfigParamComputerUse, mode="one_of").annotate(description="A tool that can be stored on a reusable agent without session credentials.", identifier="PersistedAgentToolConfigParam")
|
|
530
|
+
EnvironmentResource: _S.Bottom[_T.EnvironmentResource, _t.Any] = _b.union(EnvironmentResourceNone, EnvironmentResourceOpenaiHosted, EnvironmentResourceSelfHosted, mode="one_of").annotate(description="The execution environment for a session.", identifier="EnvironmentResource")
|
|
531
|
+
EnvironmentTemplateListResource: _StructSchema[_T.EnvironmentTemplateListResource, _t.Never, _t.Never] = _b.struct(_T.EnvironmentTemplateListResource, {"object": _b.literal("list").annotate(description="The object type, which is always `list`."), "data": _b.check(_b.check(_b.array(EnvironmentTemplateResource).annotate(description="The resources returned in this page, in the requested sort order."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "first_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the first resource in `data`, or `null` if the page is empty."), "last_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters."), "has_more": _S.Boolean.annotate(description="Whether there are more resources to retrieve after this page.")}).annotate(description="A page of Agents API resources, with IDs for retrieving additional pages.", identifier="EnvironmentTemplateListResource")
|
|
532
|
+
AgentToolResource: _S.Bottom[_T.AgentToolResource, _t.Any] = _b.union(AgentToolResourceFunction, AgentToolResourceProgrammaticToolCalling, AgentToolResourceMcp, AgentToolResourceWebSearch, AgentToolResourceComputerUse, mode="one_of").annotate(description="A tool available to the agent.", identifier="AgentToolResource")
|
|
533
|
+
AgentToolConfigParam: _S.Bottom[_T.AgentToolConfigParam, _t.Any] = _b.union(AgentToolConfigParamFunction, AgentToolConfigParamToolSearch, AgentToolConfigParamProgrammaticToolCalling, AgentToolConfigParamMcp, AgentToolConfigParamWebSearch, AgentToolConfigParamComputerUse, mode="one_of").annotate(description="A tool available to the agent.", identifier="AgentToolConfigParam")
|
|
534
|
+
CreateSessionInputParam: _S.Bottom[_T.CreateSessionInputParam, _t.Any] = _b.union(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _b.check(_b.check(_b.array(InputMessageParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), mode="one_of").annotate(description="Initial input submitted when creating a session.", identifier="CreateSessionInputParam")
|
|
535
|
+
SessionInputParamAgentSessionInputMessage: _StructSchema[_T.SessionInputParamAgentSessionInputMessage, _t.Never, _t.Never] = _b.struct(_T.SessionInputParamAgentSessionInputMessage, {"type": _b.literal("agent.session.input.message").annotate(description="The type of the object. Always `agent.session.input.message`."), "input": _b.check(_b.check(_b.array(InputMessageParam).annotate(description="The user messages to add to the session."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384"))}).annotate(description="Adds one or more user messages and starts a turn.", identifier="SessionInputParamAgentSessionInputMessage")
|
|
536
|
+
SessionInputParamAgentSessionInputToolResult: _StructSchema[_T.SessionInputParamAgentSessionInputToolResult, _t.Never, _t.Never] = _b.struct(_T.SessionInputParamAgentSessionInputToolResult, {"type": _b.literal("agent.session.input.tool_result").annotate(description="The type of the object. Always `agent.session.input.tool_result`."), "turn_id": _b.check(_b.check(_S.String.annotate(description="The ID of the turn that requested the function call."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "call_id": _b.check(_b.check(_S.String.annotate(description="The ID of the function call."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "success": _S.Boolean.annotate(description="Whether the function call succeeded."), "output": _b.union(FunctionCallOutputParam, _S.Null).annotate(description="The function result when the call succeeded."), "error": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="The error message when the call failed.")}, optional=("output", "error",)).annotate(description="Submits the result of a function call.", identifier="SessionInputParamAgentSessionInputToolResult")
|
|
537
|
+
SessionInputParamAgentSessionInputComputerUseApprovalRequestResult: _StructSchema[_T.SessionInputParamAgentSessionInputComputerUseApprovalRequestResult, _t.Never, _t.Never] = _b.struct(_T.SessionInputParamAgentSessionInputComputerUseApprovalRequestResult, {"type": _b.literal("agent.session.input.computer_use_approval_request_result").annotate(description="The type of the object. Always `agent.session.input.computer_use_approval_request_result`."), "request_id": _b.check(_b.check(_S.String.annotate(description="The registered request ID from the required action."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "response": _b.suspend(lambda: ComputerUseApprovalResponseParam).annotate(description="The response for this request type.")}).annotate(description="Responds to a pending Computer Use approval request.", identifier="SessionInputParamAgentSessionInputComputerUseApprovalRequestResult")
|
|
538
|
+
VaultCredentialAuthResourceMcpOauth: _StructSchema[_T.VaultCredentialAuthResourceMcpOauth, _t.Never, _t.Never] = _b.struct(_T.VaultCredentialAuthResourceMcpOauth, {"type": _b.literal("mcp_oauth").annotate(description="The type of the object. Always `mcp_oauth`."), "mcp_server_url": _b.check(_S.String.annotate(description="The HTTPS MCP server URL authorized by this credential."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "expires_at": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="When the OAuth access token expires, as an RFC 3339 timestamp, if known."), "refresh": _b.union(McpOauthRefreshResource, _S.Null).annotate(description="Public refresh metadata without refresh tokens or OAuth client secrets.")}).annotate(description="Public metadata for an OAuth credential; tokens and client secrets are never returned.", identifier="VaultCredentialAuthResourceMcpOauth")
|
|
539
|
+
CreateVaultCredentialAuthParamMcpOauth: _StructSchema[_T.CreateVaultCredentialAuthParamMcpOauth, _t.Never, _t.Never] = _b.struct(_T.CreateVaultCredentialAuthParamMcpOauth, {"type": _b.literal("mcp_oauth").annotate(description="The type of the object. Always `mcp_oauth`."), "mcp_server_url": _b.check(_b.check(_S.String.annotate(description="The HTTPS MCP server URL authorized by this credential."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "access_token": _b.check(_b.check(_S.String.annotate(description="A write-only OAuth access token; never returned by credential resources."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "expires_at": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="When the OAuth access token expires, as an RFC 3339 timestamp, if known."), "refresh": _b.union(CreateMcpOauthRefreshParam, _S.Null).annotate(description="Optional refresh configuration for an HTTPS OAuth token endpoint.")}, optional=("expires_at", "refresh",)).annotate(description="An OAuth credential for an HTTPS MCP destination.", identifier="CreateVaultCredentialAuthParamMcpOauth")
|
|
540
|
+
RotateVaultCredentialAuthParamMcpOauth: _StructSchema[_T.RotateVaultCredentialAuthParamMcpOauth, _t.Never, _t.Never] = _b.struct(_T.RotateVaultCredentialAuthParamMcpOauth, {"type": _b.literal("mcp_oauth").annotate(description="The type of the object. Always `mcp_oauth`."), "access_token": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="A write-only replacement OAuth access token."), "expires_at": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="The replacement expiry as an RFC 3339 timestamp, or `null` to clear it. Omitting this field preserves the expiry unless a new access token is supplied, in which case the expiry is cleared."), "refresh": _b.union(RotateMcpOauthRefreshParam, _S.Null).annotate(description="Optional write-only refresh-token and client-secret updates.")}, optional=("access_token", "expires_at", "refresh",)).annotate(description="Rotate an OAuth credential for an HTTPS MCP destination.", identifier="RotateVaultCredentialAuthParamMcpOauth")
|
|
541
|
+
BetaResponseTextParam: _StructSchema[_T.BetaResponseTextParam, _t.Never, _t.Never] = _b.struct(_T.BetaResponseTextParam, {"format": BetaTextResponseFormatConfiguration, "verbosity": BetaVerbosity}, optional=("format", "verbosity",)).annotate(description="Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)\n- [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)\n", identifier="BetaResponseTextParam")
|
|
542
|
+
BetaCodeInterpreterTool: _StructSchema[_T.BetaCodeInterpreterTool, _t.Never, _t.Never] = _b.struct(_T.BetaCodeInterpreterTool, {"type": _b.literal("code_interpreter").annotate(description="The type of the code interpreter tool. Always `code_interpreter`.\n"), "container": _b.union(_S.String.annotate(description="The container ID."), BetaAutoCodeInterpreterToolParam, mode="one_of").annotate(description="The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.\n"), "allowed_callers": _b.union(_b.check(_b.array(BetaCallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null)}, optional=("allowed_callers",)).annotate(title="Code interpreter", description="A tool that runs Python code to help generate a response to a prompt.\n", identifier="BetaCodeInterpreterTool")
|
|
543
|
+
BetaFunctionShellToolParam: _StructSchema[_T.BetaFunctionShellToolParam, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellToolParam, {"type": _b.literal("shell").annotate(description="The type of the shell tool. Always `shell`."), "environment": _b.union(_b.union(BetaContainerAutoParam, BetaLocalEnvironmentParam, BetaContainerReferenceParam, mode="one_of"), _S.Null), "allowed_callers": _b.union(_b.check(_b.array(BetaCallableToolAllowedCaller).annotate(description="The tool invocation context(s)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null)}, optional=("environment", "allowed_callers",)).annotate(title="Shell tool", description="A tool that allows the model to execute shell commands.", identifier="BetaFunctionShellToolParam")
|
|
544
|
+
BetaNamespaceToolParam: _StructSchema[_T.BetaNamespaceToolParam, _t.Never, _t.Never] = _b.struct(_T.BetaNamespaceToolParam, {"type": _b.literal("namespace").annotate(description="The type of the tool. Always `namespace`."), "name": _b.check(_S.String.annotate(description="The namespace name used in tool calls (for example, `crm`)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "description": _S.String.annotate(description="A description of the namespace shown to the model."), "tools": _b.check(_b.array(_b.union(BetaFunctionToolParam, BetaCustomToolParam, mode="one_of").annotate(description="A function or custom tool that belongs to a namespace.")).annotate(description="The function/custom tools available inside this namespace."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(title="Namespace", description="Groups function/custom tools under a shared namespace.", identifier="BetaNamespaceToolParam")
|
|
545
|
+
BetaToolSearchOutputNamespaceToolParam: _StructSchema[_T.BetaToolSearchOutputNamespaceToolParam, _t.Never, _t.Never] = _b.struct(_T.BetaToolSearchOutputNamespaceToolParam, {"type": _b.literal("namespace").annotate(description="The type of the tool. Always `namespace`."), "name": _b.check(_S.String.annotate(description="The namespace name used in tool calls (for example, `crm`)."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "description": _S.String.annotate(description="A description of the namespace shown to the model."), "tools": _b.check(_b.array(_b.union(BetaToolSearchOutputFunctionToolParam, BetaCustomToolParam, mode="one_of").annotate(description="A function or custom tool loaded into a namespace by tool search.")).annotate(description="The function/custom tools loaded inside this namespace."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(title="Namespace", description="Groups function/custom tools under a shared namespace.", identifier="BetaToolSearchOutputNamespaceToolParam")
|
|
546
|
+
BetaPrompt: _S.Bottom[_T.BetaPrompt, _t.Any] = _b.union(_b.struct(_T.BetaPrompt__0, {"id": _S.String.annotate(description="The unique identifier of the prompt template to use."), "version": _b.union(_S.String.annotate(description="Optional version of the prompt template."), _S.Null), "variables": BetaResponsePromptVariables}, optional=("version", "variables",)).annotate(description="Reference to a prompt template and its variables.\n[Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).\n"), _S.Null).annotate(identifier="BetaPrompt")
|
|
547
|
+
BetaInputMessageContentList: _S.Bottom[_T.BetaInputMessageContentList, _t.Any] = _b.array(BetaInputContent).annotate(title="Input item content list", description="A list of one or many input items to the model, containing different content \ntypes.\n", identifier="BetaInputMessageContentList")
|
|
548
|
+
BetaFunctionToolCallOutputResource: _StructSchema[_T.BetaFunctionToolCallOutputResource, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionToolCallOutputResource, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the function call tool output.\n"), "type": _b.literal("function_call_output").annotate(description="The type of the function tool call output. Always `function_call_output`.\n"), "call_id": _S.String.annotate(description="The unique ID of the function tool call generated by the model.\n"), "name": _S.String.annotate(description="The name of the tool that produced the output.\n"), "namespace": _S.String.annotate(description="The namespace of the tool that produced the output.\n"), "caller": _b.union(BetaToolCallCallerParam, _S.Null), "output": _b.union(_S.String.annotate(title="string output", description="A string of the output of the function call.\n"), _b.array(BetaFunctionAndCustomToolCallOutput).annotate(title="output content list", description="Text, image, or file output of the function call.\n"), mode="one_of").annotate(description="The output from the function call generated by your code.\nCan be a string or an list of output content.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.\n")}, optional=("agent", "call_id", "name", "namespace", "caller", "created_by",)).annotate(identifier="BetaFunctionToolCallOutputResource")
|
|
549
|
+
BetaCustomToolCallOutputResource: _StructSchema[_T.BetaCustomToolCallOutputResource, _t.Never, _t.Never] = _b.struct(_T.BetaCustomToolCallOutputResource, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("custom_tool_call_output").annotate(description="The type of the custom tool call output. Always `custom_tool_call_output`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call output item.\n"), "call_id": _S.String.annotate(description="The call ID, used to map this custom tool call output to a custom tool call.\n"), "caller": _b.union(BetaToolCallCallerParam, _S.Null), "output": _b.union(_S.String.annotate(title="string output", description="A string of the output of the custom tool call.\n"), _b.array(BetaFunctionAndCustomToolCallOutput).annotate(title="output content list", description="Text, image, or file output of the custom tool call.\n"), mode="one_of").annotate(description="The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n"), "status": _b.suspend(lambda: BetaFunctionCallOutputStatusEnum).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.\n")}, optional=("agent", "caller", "created_by",)).annotate(title="ResponseCustomToolCallOutputItem", identifier="BetaCustomToolCallOutputResource")
|
|
550
|
+
BetaFunctionToolCallOutput: _StructSchema[_T.BetaFunctionToolCallOutput, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionToolCallOutput, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the function tool call output. Populated when this item\nis returned via API.\n"), "type": _b.literal("function_call_output").annotate(description="The type of the function tool call output. Always `function_call_output`.\n"), "call_id": _S.String.annotate(description="The unique ID of the function tool call generated by the model.\n"), "name": _S.String.annotate(description="The name of the tool that produced the output.\n"), "namespace": _S.String.annotate(description="The namespace of the tool that produced the output.\n"), "caller": _b.union(BetaToolCallCallerParam, _S.Null), "output": _b.union(_S.String.annotate(title="string output", description="A string of the output of the function call.\n"), _b.array(BetaFunctionAndCustomToolCallOutput).annotate(title="output content list", description="Text, image, or file output of the function call.\n"), mode="one_of").annotate(description="The output from the function call generated by your code.\nCan be a string or an list of output content.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n")}, optional=("agent", "id", "call_id", "name", "namespace", "caller", "status",)).annotate(title="Function tool call output", description="The output of a function tool call.\n", identifier="BetaFunctionToolCallOutput")
|
|
551
|
+
BetaCustomToolCallOutput: _StructSchema[_T.BetaCustomToolCallOutput, _t.Never, _t.Never] = _b.struct(_T.BetaCustomToolCallOutput, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("custom_tool_call_output").annotate(description="The type of the custom tool call output. Always `custom_tool_call_output`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call output in the OpenAI platform.\n"), "call_id": _S.String.annotate(description="The call ID, used to map this custom tool call output to a custom tool call.\n"), "caller": _b.union(BetaToolCallCallerParam, _S.Null), "output": _b.union(_S.String.annotate(title="string output", description="A string of the output of the custom tool call.\n"), _b.array(BetaFunctionAndCustomToolCallOutput).annotate(title="output content list", description="Text, image, or file output of the custom tool call.\n"), mode="one_of").annotate(description="The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n")}, optional=("agent", "id", "caller",)).annotate(title="Custom tool call output", description="The output of a custom tool call from your code, being sent back to the model.\n", identifier="BetaCustomToolCallOutput")
|
|
552
|
+
BetaOutputMessageContent: _S.Bottom[_T.BetaOutputMessageContent, _t.Any] = _b.union(BetaOutputTextContent, BetaRefusalContent, mode="one_of").annotate(identifier="BetaOutputMessageContent")
|
|
553
|
+
BetaAgentMessage: _StructSchema[_T.BetaAgentMessage, _t.Never, _t.Never] = _b.struct(_T.BetaAgentMessage, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("agent_message").annotate(description="The type of the item. Always `agent_message`."), "id": _S.String.annotate(description="The unique ID of the agent message."), "author": _S.String.annotate(description="The sending agent identity."), "recipient": _S.String.annotate(description="The destination agent identity."), "content": _b.array(_b.union(BetaInputTextContent, BetaOutputTextContent, BetaTextContent, BetaSummaryTextContent, BetaReasoningTextContent, BetaRefusalContent, BetaInputImageContent, BetaComputerScreenshotContent, BetaInputFileContent, BetaEncryptedContent, mode="one_of").annotate(description="A content part that makes up an input or output item.")).annotate(description="Encrypted content sent between agents.")}, optional=("agent",)).annotate(identifier="BetaAgentMessage")
|
|
554
|
+
BetaMultiAgentCallOutput: _StructSchema[_T.BetaMultiAgentCallOutput, _t.Never, _t.Never] = _b.struct(_T.BetaMultiAgentCallOutput, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("multi_agent_call_output").annotate(description="The type of the multi-agent result. Always `multi_agent_call_output`."), "id": _S.String.annotate(description="The unique ID of the multi-agent call output item."), "call_id": _S.String.annotate(description="The unique ID of the multi-agent call."), "action": _b.suspend(lambda: BetaMultiAgentAction).annotate(description="The multi-agent action that produced this result."), "output": _b.array(BetaOutputTextContent).annotate(description="Text output returned by the multi-agent action.")}, optional=("agent",)).annotate(identifier="BetaMultiAgentCallOutput")
|
|
555
|
+
BetaOutputContent: _S.Bottom[_T.BetaOutputContent, _t.Any] = _b.union(BetaOutputTextContent, BetaRefusalContent, BetaReasoningTextContent, mode="one_of").annotate(identifier="BetaOutputContent")
|
|
556
|
+
BetaMessage: _StructSchema[_T.BetaMessage, _t.Never, _t.Never] = _b.struct(_T.BetaMessage, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("message").annotate(description="The type of the message. Always set to `message`."), "id": _S.String.annotate(description="The unique ID of the message."), "status": _b.suspend(lambda: BetaMessageStatus).annotate(description="The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API."), "role": _b.suspend(lambda: BetaMessageRole).annotate(description="The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`."), "content": _b.array(_b.union(BetaInputTextContent, BetaOutputTextContent, BetaTextContent, BetaSummaryTextContent, BetaReasoningTextContent, BetaRefusalContent, BetaInputImageContent, BetaComputerScreenshotContent, BetaInputFileContent, BetaEncryptedContent, mode="one_of").annotate(description="A content part that makes up an input or output item.")).annotate(description="The content of the message"), "phase": _b.union(_b.suspend(lambda: BetaMessagePhase_2).annotate(description="Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages."), _S.Null)}, optional=("agent", "phase",)).annotate(title="Message", description="A message to or from the model.", identifier="BetaMessage")
|
|
557
|
+
BetaComputerActionList: _S.Bottom[_T.BetaComputerActionList, _t.Any] = _b.array(BetaComputerAction).annotate(title="Computer Action List", description="Flattened batched actions for `computer_use`. Each action includes an\n`type` discriminator and action-specific fields.\n", identifier="BetaComputerActionList")
|
|
558
|
+
BetaModerationParam: _StructSchema[_T.BetaModerationParam, _t.Never, _t.Never] = _b.struct(_T.BetaModerationParam, {"model": _S.String.annotate(description="The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'."), "policy": _b.union(_b.suspend(lambda: BetaModerationPolicyParam).annotate(description="The policy to apply to moderated response input and output."), _S.Null)}, optional=("policy",)).annotate(description="Configuration for running moderation on the input and output of this response.", identifier="BetaModerationParam")
|
|
559
|
+
BetaErrorResponse: _StructSchema[_T.BetaErrorResponse, _t.Never, _t.Never] = _b.struct(_T.BetaErrorResponse, {"error": BetaError}).annotate(identifier="BetaErrorResponse")
|
|
560
|
+
RunStepObject: _StructSchema[_T.RunStepObject, _t.Never, _t.Never] = _b.struct(_T.RunStepObject, {"id": _S.String.annotate(description="The identifier of the run step, which can be referenced in API endpoints."), "object": _b.literal("thread.run.step").annotate(description="The object type, which is always `thread.run.step`."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the run step was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "assistant_id": _S.String.annotate(description="The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) associated with the run step."), "thread_id": _S.String.annotate(description="The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was run."), "run_id": _S.String.annotate(description="The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) that this run step is a part of."), "type": _b.literals(["message_creation", "tool_calls"]).annotate(description="The type of run step, which can be either `message_creation` or `tool_calls`."), "status": _b.literals(["in_progress", "cancelled", "failed", "completed", "expired"]).annotate(description="The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`."), "step_details": _b.union(RunStepDetailsMessageCreationObject, RunStepDetailsToolCallsObject, mode="one_of").annotate(description="The details of the run step."), "last_error": _b.union(_b.struct(_T.RunStepObject__last_error__0, {"code": _b.literals(["server_error", "rate_limit_exceeded"]).annotate(description="One of `server_error` or `rate_limit_exceeded`."), "message": _S.String.annotate(description="A human-readable description of the error.")}).annotate(description="The last error associated with this run step. Will be `null` if there are no errors."), _S.Null), "expired_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "cancelled_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the run step was cancelled.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "failed_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the run step failed.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "completed_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the run step completed.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "metadata": Metadata, "usage": RunStepCompletionUsage}).annotate(title="Run steps", description="Represents a step in execution of a run.\n", identifier="RunStepObject")
|
|
561
|
+
ListAssistantsResponse: _StructSchema[_T.ListAssistantsResponse, _t.Never, _t.Never] = _b.struct(_T.ListAssistantsResponse, {"object": _S.String, "data": _b.array(AssistantObject), "first_id": _S.String, "last_id": _S.String, "has_more": _S.Boolean}).annotate(identifier="ListAssistantsResponse")
|
|
562
|
+
RunStreamEvent: _S.Bottom[_T.RunStreamEvent, _t.Any] = _b.union(_b.struct(_T.RunStreamEvent__0, {"event": _b.literal("thread.run.created"), "data": RunObject}).annotate(description="Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is created."), _b.struct(_T.RunStreamEvent__1, {"event": _b.literal("thread.run.queued"), "data": RunObject}).annotate(description="Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `queued` status."), _b.struct(_T.RunStreamEvent__2, {"event": _b.literal("thread.run.in_progress"), "data": RunObject}).annotate(description="Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` status."), _b.struct(_T.RunStreamEvent__3, {"event": _b.literal("thread.run.requires_action"), "data": RunObject}).annotate(description="Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `requires_action` status."), _b.struct(_T.RunStreamEvent__4, {"event": _b.literal("thread.run.completed"), "data": RunObject}).annotate(description="Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is completed."), _b.struct(_T.RunStreamEvent__5, {"event": _b.literal("thread.run.incomplete"), "data": RunObject}).annotate(description="Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with status `incomplete`."), _b.struct(_T.RunStreamEvent__6, {"event": _b.literal("thread.run.failed"), "data": RunObject}).annotate(description="Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) fails."), _b.struct(_T.RunStreamEvent__7, {"event": _b.literal("thread.run.cancelling"), "data": RunObject}).annotate(description="Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `cancelling` status."), _b.struct(_T.RunStreamEvent__8, {"event": _b.literal("thread.run.cancelled"), "data": RunObject}).annotate(description="Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is cancelled."), _b.struct(_T.RunStreamEvent__9, {"event": _b.literal("thread.run.expired"), "data": RunObject}).annotate(description="Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) expires."), mode="one_of").annotate(identifier="RunStreamEvent")
|
|
563
|
+
ListRunsResponse: _StructSchema[_T.ListRunsResponse, _t.Never, _t.Never] = _b.struct(_T.ListRunsResponse, {"object": _S.String, "data": _b.array(RunObject), "first_id": _S.String, "last_id": _S.String, "has_more": _S.Boolean}).annotate(identifier="ListRunsResponse")
|
|
564
|
+
VideoListResource: _StructSchema[_T.VideoListResource, _t.Never, _t.Never] = _b.struct(_T.VideoListResource, {"object": _b.literal("list").annotate(description="The type of object returned, must be `list`."), "data": _b.array(VideoResource).annotate(description="A list of items"), "first_id": _b.union(_S.String.annotate(description="The ID of the first item in the list."), _S.Null), "last_id": _b.union(_S.String.annotate(description="The ID of the last item in the list."), _S.Null), "has_more": _S.Boolean.annotate(description="Whether there are more items available.")}).annotate(identifier="VideoListResource")
|
|
565
|
+
CreateChatCompletionResponse: _StructSchema[_T.CreateChatCompletionResponse, _t.Never, _t.Never] = _b.struct(_T.CreateChatCompletionResponse, {"id": _S.String.annotate(description="A unique identifier for the chat completion."), "choices": _b.array(_b.struct(_T.CreateChatCompletionResponse__choices__item, {"finish_reason": _b.literals(["stop", "length", "tool_calls", "content_filter", "function_call"]).annotate(description="The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\nRead the [Model Spec](https://model-spec.openai.com/2025-12-18.html) for more.\n"), "index": _b.check(_S.Number.annotate(description="The index of the choice in the list of choices."), _S.is_int().annotate(expected="an integer")), "message": ChatCompletionResponseMessage, "logprobs": _b.union(_b.struct(_T.CreateChatCompletionResponse__choices__item__logprobs__0, {"content": _b.union(_b.array(ChatCompletionTokenLogprob).annotate(description="A list of message content tokens with log probability information."), _S.Null), "refusal": _b.union(_b.array(ChatCompletionTokenLogprob).annotate(description="A list of message refusal tokens with log probability information."), _S.Null)}).annotate(description="Log probability information for the choice."), _S.Null)})).annotate(description="A list of chat completion choices. Can be more than one if `n` is greater than 1."), "created": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the chat completion was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "model": _S.String.annotate(description="The model used for the chat completion."), "metadata": Metadata, "service_tier": ServiceTier, "system_fingerprint": _S.String.annotate(description="This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n"), "object": _b.literal("chat.completion").annotate(description="The object type, which is always `chat.completion`."), "usage": CompletionUsage, "moderation": _b.union(_b.suspend(lambda: ChatCompletionModeration).annotate(description="Moderation results for the request input and generated output, if moderated\ncompletions were requested.\n"), _S.Null)}, optional=("metadata", "service_tier", "system_fingerprint", "usage", "moderation",)).annotate(description="Represents a chat completion response returned by model, based on the provided input.", identifier="CreateChatCompletionResponse")
|
|
566
|
+
CreateChatCompletionStreamResponse: _StructSchema[_T.CreateChatCompletionStreamResponse, _t.Never, _t.Never] = _b.struct(_T.CreateChatCompletionStreamResponse, {"id": _S.String.annotate(description="A unique identifier for the chat completion. Each chunk has the same ID."), "choices": _b.array(_b.struct(_T.CreateChatCompletionStreamResponse__choices__item, {"delta": ChatCompletionStreamResponseDelta, "logprobs": _b.union(_b.struct_with_rest(_b.struct(_T.CreateChatCompletionStreamResponse__choices__item__logprobs__0, {"content": _b.union(_b.array(ChatCompletionTokenLogprob), _S.Null).annotate(description="A list of message content tokens with log probability information."), "refusal": _b.union(_b.array(ChatCompletionTokenLogprob), _S.Null).annotate(description="A list of message refusal tokens with log probability information.")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Log probability information for the choice."), "finish_reason": _b.union(_b.literals(["stop", "length", "tool_calls", "content_filter", "function_call"]), _S.Null).annotate(description="The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\nOmitted from the final audio update containing only `delta.audio.expires_at`.\n"), "index": _b.check(_S.Number.annotate(description="The index of the choice in the list of choices."), _S.is_int().annotate(expected="an integer"))}, optional=("logprobs", "finish_reason",))).annotate(description="A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.\n"), "created": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "model": _S.String.annotate(description="The model to generate the completion."), "obfuscation": _S.String.annotate(description="An obfuscation string added to normalize the size of streamed chunks as a\nmitigation to certain side-channel attacks. The field is included by\ndefault and omitted when `stream_options.include_obfuscation` is `false`.\n"), "service_tier": ServiceTier, "system_fingerprint": _S.String.annotate(description="This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n"), "object": _b.literal("chat.completion.chunk").annotate(description="The object type, which is always `chat.completion.chunk`."), "usage": _b.union(CompletionUsage, _S.Null).annotate(description="An optional field that will only be present when you set\n`stream_options: {\"include_usage\": true}` in your request. When present, it\ncontains a null value **except for the last chunk** which contains the\ntoken usage statistics for the entire request.\n\n**NOTE:** If the stream is interrupted or cancelled, you may not\nreceive the final usage chunk which contains the total token usage for\nthe request.\n"), "moderation": _b.union(_b.suspend(lambda: ChatCompletionModeration).annotate(description="Moderation results for the request input and generated output. Present\non the moderation chunk when moderated completions are requested.\n"), _S.Null)}, optional=("obfuscation", "service_tier", "system_fingerprint", "usage", "moderation",)).annotate(description="Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input.\n[Learn more](https://developers.openai.com/api/docs/guides/streaming-responses).\n", identifier="CreateChatCompletionStreamResponse")
|
|
567
|
+
ChatCompletionRequestMessage: _S.Bottom[_T.ChatCompletionRequestMessage, _t.Any] = _b.union(ChatCompletionRequestDeveloperMessage, ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage, ChatCompletionRequestAssistantMessage, ChatCompletionRequestToolMessage, ChatCompletionRequestFunctionMessage, mode="one_of").annotate(identifier="ChatCompletionRequestMessage")
|
|
568
|
+
EvalItemContent: _S.Bottom[_T.EvalItemContent, _t.Any] = _b.union(EvalItemContentItem, EvalItemContentArray, mode="one_of").annotate(title="Eval content", description="Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.\n", identifier="EvalItemContent")
|
|
569
|
+
OutputMessage: _StructSchema[_T.OutputMessage, _t.Never, _t.Never] = _b.struct(_T.OutputMessage, {"id": _S.String.annotate(description="The unique ID of the output message.\n"), "type": _b.literal("message").annotate(description="The type of the output message. Always `message`.\n"), "role": _b.literal("assistant").annotate(description="The role of the output message. Always `assistant`.\n"), "content": _b.array(OutputMessageContent).annotate(description="The content of the output message.\n"), "phase": _b.union(MessagePhase, _S.Null), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n")}, optional=("phase",)).annotate(title="Output message", description="An output message from the model.\n", identifier="OutputMessage")
|
|
570
|
+
ResponseContentPartAddedEvent: _StructSchema[_T.ResponseContentPartAddedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseContentPartAddedEvent, {"type": _b.literal("response.content_part.added").annotate(description="The type of the event. Always `response.content_part.added`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the content part was added to.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the content part was added to.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part that was added.\n"), _S.is_int().annotate(expected="an integer")), "part": _b.suspend(lambda: OutputContent).annotate(description="The content part that was added.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}).annotate(description="Emitted when a new content part is added.", identifier="ResponseContentPartAddedEvent")
|
|
571
|
+
ResponseContentPartDoneEvent: _StructSchema[_T.ResponseContentPartDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseContentPartDoneEvent, {"type": _b.literal("response.content_part.done").annotate(description="The type of the event. Always `response.content_part.done`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the content part was added to.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the content part was added to.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part that is done.\n"), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "part": _b.suspend(lambda: OutputContent).annotate(description="The content part that is done.\n")}).annotate(description="Emitted when a content part is done.", identifier="ResponseContentPartDoneEvent")
|
|
572
|
+
EasyInputMessage: _StructSchema[_T.EasyInputMessage, _t.Never, _t.Never] = _b.struct(_T.EasyInputMessage, {"role": _b.literals(["user", "assistant", "system", "developer"]).annotate(description="The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n"), "content": _b.union(_S.String.annotate(title="Text input", description="A text input to the model.\n"), InputMessageContentList, mode="one_of").annotate(description="Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n"), "phase": _b.union(MessagePhase, _S.Null), "type": _b.literal("message").annotate(description="The type of the message input. Always `message`.\n")}, optional=("phase", "type",)).annotate(title="Input message", description="A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n", identifier="EasyInputMessage")
|
|
573
|
+
InputMessageResource: _StructSchema[_T.InputMessageResource, _t.Never, _t.Never] = _b.struct(_T.InputMessageResource, {"type": _b.literal("message").annotate(description="The type of the message input. Always set to `message`.\n"), "role": _b.literals(["user", "system", "developer"]).annotate(description="The role of the message input. One of `user`, `system`, or `developer`.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "content": InputMessageContentList, "id": _S.String.annotate(description="The unique ID of the message input.\n")}, optional=("status",)).annotate(identifier="InputMessageResource")
|
|
574
|
+
RealtimeSessionCreateRequestGA: _StructSchema[_T.RealtimeSessionCreateRequestGA, _t.Never, _t.Never] = _b.struct(_T.RealtimeSessionCreateRequestGA, {"type": _b.literal("realtime").annotate(description="The type of session to create. Always `realtime` for the Realtime API.\n"), "output_modalities": _b.array(_b.literals(["text", "audio"])).annotate(description="The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.\n"), "model": _b.union(_S.String, _b.literals(["gpt-realtime", "gpt-realtime-1.5", "gpt-realtime-2", "gpt-realtime-2.1", "gpt-realtime-2.1-mini", "gpt-realtime-2025-08-28", "gpt-4o-realtime-preview", "gpt-4o-realtime-preview-2024-10-01", "gpt-4o-realtime-preview-2024-12-17", "gpt-4o-realtime-preview-2025-06-03", "gpt-4o-mini-realtime-preview", "gpt-4o-mini-realtime-preview-2024-12-17", "gpt-realtime-mini", "gpt-realtime-mini-2025-10-06", "gpt-realtime-mini-2025-12-15", "gpt-audio-1.5", "gpt-audio-mini", "gpt-audio-mini-2025-10-06", "gpt-audio-mini-2025-12-15"])).annotate(description="The Realtime model used for this session.\n"), "instructions": _S.String.annotate(description="The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh frequently\"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\n\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.\n"), "audio": _b.struct(_T.RealtimeSessionCreateRequestGA__audio, {"input": _b.struct(_T.RealtimeSessionCreateRequestGA__audio__input, {"format": _b.suspend(lambda: RealtimeAudioFormats).annotate(description="The format of the input audio."), "transcription": _b.suspend(lambda: AudioTranscription).annotate(description="Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.\n"), "noise_reduction": _b.union(_S.Null, _b.struct_with_rest(_b.struct(_T.RealtimeSessionCreateRequestGA__audio__input__noise_reduction__1, {"type": NoiseReductionType}, optional=("type",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value")))).annotate(description="Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.\n"), "turn_detection": RealtimeTurnDetection}, optional=("format", "transcription", "noise_reduction", "turn_detection",)), "output": _b.struct(_T.RealtimeSessionCreateRequestGA__audio__output, {"format": _b.suspend(lambda: RealtimeAudioFormats).annotate(description="The format of the output audio."), "voice": _b.suspend(lambda: VoiceIdsOrCustomVoice).annotate(description="The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with\nan `id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed\nduring the session once the model has responded with audio at least once.\nCustom voices must be created from audio samples.\nWe recommend `marin` and `cedar` for best quality.\n"), "speed": _b.check(_b.check(_b.check(_S.Number.annotate(description="The speed of the model's spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.\n\nThis parameter is a post-processing adjustment to the audio after it is generated, it's\nalso possible to prompt the model to speak faster or slower.\n"), _S.is_finite().annotate(expected="a finite number")), _S.is_greater_than_or_equal_to(0.25).annotate(expected="a value greater than or equal to 0.25")), _S.is_less_than_or_equal_to(1.5).annotate(expected="a value less than or equal to 1.5"))}, optional=("format", "voice", "speed",))}, optional=("input", "output",)).annotate(description="Configuration for input and output audio.\n"), "include": _b.array(_b.literal("item.input_audio_transcription.logprobs")).annotate(description="Additional fields to include in server outputs.\n\n`item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n"), "tracing": _b.union(_b.literal("auto").annotate(title="auto", description="Enables tracing and sets default values for tracing configuration options. Always `auto`.\n"), _b.struct(_T.RealtimeSessionCreateRequestGA__tracing__1, {"workflow_name": _S.String.annotate(description="The name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n"), "group_id": _S.String.annotate(description="The group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.\n"), "metadata": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.\n")}, optional=("workflow_name", "group_id", "metadata",)).annotate(title="Tracing Configuration", description="Granular configuration for tracing.\n"), _S.Null, mode="one_of").annotate(title="Tracing Configuration", description="Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified.\n\n`auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.\n"), "tools": _b.array(_b.union(RealtimeFunctionTool, MCPTool, mode="one_of")).annotate(description="Tools available to the model."), "tool_choice": _b.union(ToolChoiceOptions, ToolChoiceFunction, ToolChoiceMCP, mode="one_of").annotate(description="How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.\n"), "parallel_tool_calls": _S.Boolean.annotate(description="Whether the model may call multiple tools in parallel. Only supported by\nreasoning Realtime models such as `gpt-realtime-2`.\n"), "reasoning": RealtimeReasoning, "max_output_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _b.literal("inf"), mode="one_of").annotate(description="Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.\n"), "truncation": RealtimeTruncation, "prompt": Prompt}, optional=("output_modalities", "model", "instructions", "audio", "include", "tracing", "tools", "tool_choice", "parallel_tool_calls", "reasoning", "max_output_tokens", "truncation", "prompt",)).annotate(title="Realtime session configuration", description="Realtime session object configuration.", identifier="RealtimeSessionCreateRequestGA")
|
|
575
|
+
RealtimeSessionCreateResponseGA: _StructSchema[_T.RealtimeSessionCreateResponseGA, _t.Never, _t.Never] = _b.struct(_T.RealtimeSessionCreateResponseGA, {"type": _b.literal("realtime").annotate(description="The type of session to create. Always `realtime` for the Realtime API.\n"), "id": _S.String.annotate(description="Unique identifier for the session that looks like `sess_1234567890abcdef`.\n"), "object": _b.literal("realtime.session").annotate(description="The object type. Always `realtime.session`."), "expires_at": _b.check(_S.Number.annotate(description="Expiration timestamp for the session, in seconds since epoch.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "output_modalities": _b.array(_b.literals(["text", "audio"])).annotate(description="The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating\nthat the model will respond with audio plus a transcript. `[\"text\"]` can be used to make\nthe model respond with text only. It is not possible to request both `text` and `audio` at the same time.\n"), "model": _b.union(_S.String, _b.literals(["gpt-realtime", "gpt-realtime-1.5", "gpt-realtime-2", "gpt-realtime-2.1", "gpt-realtime-2.1-mini", "gpt-realtime-2025-08-28", "gpt-4o-realtime-preview", "gpt-4o-realtime-preview-2024-10-01", "gpt-4o-realtime-preview-2024-12-17", "gpt-4o-realtime-preview-2025-06-03", "gpt-4o-mini-realtime-preview", "gpt-4o-mini-realtime-preview-2024-12-17", "gpt-realtime-mini", "gpt-realtime-mini-2025-10-06", "gpt-realtime-mini-2025-12-15", "gpt-audio-1.5", "gpt-audio-mini", "gpt-audio-mini-2025-10-06", "gpt-audio-mini-2025-12-15"])).annotate(description="The Realtime model used for this session.\n"), "instructions": _S.String.annotate(description="The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh frequently\"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\n\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.\n"), "audio": _b.struct(_T.RealtimeSessionCreateResponseGA__audio, {"input": _b.struct(_T.RealtimeSessionCreateResponseGA__audio__input, {"format": _b.suspend(lambda: RealtimeAudioFormats).annotate(description="The format of the input audio."), "transcription": _b.union(AudioTranscriptionResponse, _S.Null).annotate(description="Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.\n"), "noise_reduction": _b.union(_b.struct_with_rest(_b.struct(_T.RealtimeSessionCreateResponseGA__audio__input__noise_reduction__0, {"type": NoiseReductionType}, optional=("type",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.\n"), "turn_detection": RealtimeTurnDetection}, optional=("format", "transcription", "noise_reduction", "turn_detection",)), "output": _b.struct(_T.RealtimeSessionCreateResponseGA__audio__output, {"format": _b.suspend(lambda: RealtimeAudioFormats).annotate(description="The format of the output audio."), "voice": _b.suspend(lambda: VoiceIdsShared).annotate(description="The voice the model uses to respond. Voice cannot be changed during the\nsession once the model has responded with audio at least once. Current\nvoice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,\n`shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for\nbest quality.\n"), "speed": _b.check(_b.check(_b.check(_S.Number.annotate(description="The speed of the model's spoken response as a multiple of the original speed.\n1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.\n\nThis parameter is a post-processing adjustment to the audio after it is generated, it's\nalso possible to prompt the model to speak faster or slower.\n"), _S.is_finite().annotate(expected="a finite number")), _S.is_greater_than_or_equal_to(0.25).annotate(expected="a value greater than or equal to 0.25")), _S.is_less_than_or_equal_to(1.5).annotate(expected="a value less than or equal to 1.5"))}, optional=("format", "voice", "speed",))}, optional=("input", "output",)).annotate(description="Configuration for input and output audio.\n"), "include": _b.union(_b.array(_b.literal("item.input_audio_transcription.logprobs")), _S.Null).annotate(description="Additional fields to include in server outputs.\n\n`item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.\n"), "tracing": _b.union(_b.union(_b.literal("auto").annotate(title="auto", description="Enables tracing and sets default values for tracing configuration options. Always `auto`.\n"), _b.struct(_T.RealtimeSessionCreateResponseGA__tracing__0__1, {"workflow_name": _S.String.annotate(description="The name of the workflow to attach to this trace. This is used to\nname the trace in the Traces Dashboard.\n"), "group_id": _S.String.annotate(description="The group id to attach to this trace to enable filtering and\ngrouping in the Traces Dashboard.\n"), "metadata": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The arbitrary metadata to attach to this trace to enable\nfiltering in the Traces Dashboard.\n")}, optional=("workflow_name", "group_id", "metadata",)).annotate(title="Tracing Configuration", description="Granular configuration for tracing.\n"), mode="one_of").annotate(title="Tracing Configuration", description="Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified.\n\n`auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.\n"), _S.Null), "tools": _b.array(_b.union(RealtimeFunctionTool, MCPTool, mode="one_of")).annotate(description="Tools available to the model."), "tool_choice": _b.union(ToolChoiceOptions, ToolChoiceFunction, ToolChoiceMCP, mode="one_of").annotate(description="How the model chooses tools. Provide one of the string modes or force a specific\nfunction/MCP tool.\n"), "reasoning": RealtimeReasoning, "max_output_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _b.literal("inf"), mode="one_of").annotate(description="Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.\n"), "truncation": RealtimeTruncation, "prompt": Prompt}, optional=("expires_at", "output_modalities", "model", "instructions", "audio", "include", "tracing", "tools", "tool_choice", "reasoning", "max_output_tokens", "truncation", "prompt",)).annotate(title="Realtime session configuration object", description="A Realtime session configuration object.\n", identifier="RealtimeSessionCreateResponseGA")
|
|
576
|
+
RealtimeSessionCreateRequest: _StructSchema[_T.RealtimeSessionCreateRequest, _t.Never, _t.Never] = _b.struct(_T.RealtimeSessionCreateRequest, {"client_secret": _b.struct(_T.RealtimeSessionCreateRequest__client_secret, {"value": _S.String.annotate(description="Ephemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.\n"), "expires_at": _b.check(_S.Number.annotate(description="Timestamp for when the token expires. Currently, all tokens expire\nafter one minute.\n", format="unixtime"), _S.is_int().annotate(expected="an integer"))}).annotate(description="Ephemeral key returned by the API."), "modalities": _b.array(_b.literals(["text", "audio"])).annotate(description="The set of modalities the model can respond with. To disable audio,\nset this to [\"text\"].\n"), "instructions": _S.String.annotate(description="The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh frequently\"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.\nNote that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.\n"), "voice": _b.suspend(lambda: VoiceIdsOrCustomVoice).annotate(description="The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,\n`marin`, and `cedar`. You may also provide a custom voice object with an\n`id`, for example `{ \"id\": \"voice_1234\" }`. Voice cannot be changed during\nthe session once the model has responded with audio at least once.\nCustom voices must be created from audio samples.\n"), "input_audio_format": _S.String.annotate(description="The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n"), "output_audio_format": _S.String.annotate(description="The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n"), "input_audio_transcription": _b.struct(_T.RealtimeSessionCreateRequest__input_audio_transcription, {"model": _S.String.annotate(description="The model to use for transcription.\n")}, optional=("model",)).annotate(description="Configuration for input audio transcription, defaults to off and can be\nset to `null` to turn off once on. Input audio transcription is not native\nto the model, since the model consumes audio directly. Transcription runs\nasynchronously and should be treated as rough guidance\nrather than the representation understood by the model.\n"), "speed": _b.check(_b.check(_b.check(_S.Number.annotate(description="The speed of the model's spoken response. 1.0 is the default speed. 0.25 is\nthe minimum speed. 1.5 is the maximum speed. This value can only be changed\nin between model turns, not while a response is in progress.\n"), _S.is_finite().annotate(expected="a finite number")), _S.is_greater_than_or_equal_to(0.25).annotate(expected="a value greater than or equal to 0.25")), _S.is_less_than_or_equal_to(1.5).annotate(expected="a value less than or equal to 1.5")), "tracing": _b.union(_b.literal("auto").annotate(description="Default tracing mode for the session.\n"), _b.struct(_T.RealtimeSessionCreateRequest__tracing__1, {"workflow_name": _S.String.annotate(description="The name of the workflow to attach to this trace. This is used to\nname the trace in the traces dashboard.\n"), "group_id": _S.String.annotate(description="The group id to attach to this trace to enable filtering and\ngrouping in the traces dashboard.\n"), "metadata": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The arbitrary metadata to attach to this trace to enable\nfiltering in the traces dashboard.\n")}, optional=("workflow_name", "group_id", "metadata",)).annotate(title="Tracing Configuration", description="Granular configuration for tracing.\n"), mode="one_of").annotate(title="Tracing Configuration", description="Configuration options for tracing. Set to null to disable tracing. Once\ntracing is enabled for a session, the configuration cannot be modified.\n\n`auto` will create a trace for the session with default values for the\nworkflow name, group id, and metadata.\n"), "turn_detection": _b.struct(_T.RealtimeSessionCreateRequest__turn_detection, {"type": _S.String.annotate(description="Type of turn detection, only `server_vad` is currently supported.\n"), "threshold": _b.check(_S.Number.annotate(description="Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.\n"), _S.is_finite().annotate(expected="a finite number")), "prefix_padding_ms": _b.check(_S.Number.annotate(description="Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.\n"), _S.is_int().annotate(expected="an integer")), "silence_duration_ms": _b.check(_S.Number.annotate(description="Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("type", "threshold", "prefix_padding_ms", "silence_duration_ms",)).annotate(description="Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.\n"), "tools": _b.array(_b.struct(_T.RealtimeSessionCreateRequest__tools__item, {"type": _b.literal("function").annotate(description="The type of the tool, i.e. `function`."), "name": _S.String.annotate(description="The name of the function."), "description": _S.String.annotate(description="The description of the function, including guidance on when and how\nto call it, and guidance about what to tell the user when calling\n(if anything).\n"), "parameters": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="Parameters of the function in JSON Schema.")}, optional=("type", "name", "description", "parameters",))).annotate(description="Tools (functions) available to the model."), "tool_choice": _S.String.annotate(description="How the model chooses tools. Options are `auto`, `none`, `required`, or\nspecify a function.\n"), "temperature": _b.check(_S.Number.annotate(description="Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.\n"), _S.is_finite().annotate(expected="a finite number")), "max_response_output_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _b.literal("inf"), mode="one_of").annotate(description="Maximum number of output tokens for a single assistant response,\ninclusive of tool calls. Provide an integer between 1 and 4096 to\nlimit output tokens, or `inf` for the maximum available tokens for a\ngiven model. Defaults to `inf`.\n"), "truncation": RealtimeTruncation, "prompt": Prompt}, optional=("modalities", "instructions", "voice", "input_audio_format", "output_audio_format", "input_audio_transcription", "speed", "tracing", "turn_detection", "tools", "tool_choice", "temperature", "max_response_output_tokens", "truncation", "prompt",)).annotate(description="A new Realtime session configuration, with an ephemeral key. Default TTL\nfor keys is one minute.\n", identifier="RealtimeSessionCreateRequest")
|
|
577
|
+
ComputerToolCall: _StructSchema[_T.ComputerToolCall, _t.Never, _t.Never] = _b.struct(_T.ComputerToolCall, {"type": _b.literal("computer_call").annotate(description="The type of the computer call. Always `computer_call`."), "id": _S.String.annotate(description="The unique ID of the computer call."), "call_id": _S.String.annotate(description="An identifier used when responding to the tool call with output.\n"), "action": ComputerAction, "actions": ComputerActionList, "pending_safety_checks": _b.array(ComputerCallSafetyCheckParam).annotate(description="The pending safety checks for the computer call.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n")}, optional=("action", "actions",)).annotate(title="Computer tool call", description="A tool call to a computer use tool. See the\n[computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information.\n", identifier="ComputerToolCall")
|
|
578
|
+
Tool: _S.Bottom[_T.Tool, _t.Any] = _b.union(FunctionTool, FileSearchTool, ComputerTool, ComputerUsePreviewTool, WebSearchTool, MCPTool, CodeInterpreterTool, ProgrammaticToolCallingParam, ImageGenTool, LocalShellToolParam, FunctionShellToolParam, CustomToolParam, NamespaceToolParam, ToolSearchToolParam, WebSearchPreviewTool, ApplyPatchToolParam, mode="one_of").annotate(description="A tool that can be used to generate a response.\n", identifier="Tool")
|
|
579
|
+
ToolSearchOutputTool: _S.Bottom[_T.ToolSearchOutputTool, _t.Any] = _b.union(FunctionTool, FileSearchTool, ComputerTool, ComputerUsePreviewTool, WebSearchTool, MCPTool, CodeInterpreterTool, ProgrammaticToolCallingParam, ImageGenTool, LocalShellToolParam, FunctionShellToolParam, CustomToolParam, ToolSearchOutputNamespaceToolParam, ToolSearchToolParam, WebSearchPreviewTool, ApplyPatchToolParam, mode="one_of").annotate(description="A tool definition returned by a tool search output.\n", identifier="ToolSearchOutputTool")
|
|
580
|
+
LiveResponsesDelegationSettingsInputParam: _StructSchema[_T.LiveResponsesDelegationSettingsInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveResponsesDelegationSettingsInputParam, {"model": _S.String.annotate(description="The model used for server-owned Responses delegations."), "instructions": _b.union(_S.String.annotate(description="Instructions for the delegated Responses model, separate from Live instructions. See [backend prompting](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt)."), _S.Null), "max_output_tokens": _b.union(_b.check(_b.check(_S.Number.annotate(description="Maximum number of output tokens for each delegated response."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(16).annotate(expected="a value greater than or equal to 16")), _S.Null), "service_tier": _b.union(_b.suspend(lambda: LiveResponsesServiceTier).annotate(description="Service tier for delegated Responses requests."), _S.Null), "reasoning": _b.union(_b.suspend(lambda: LiveDelegationReasoningInputParam).annotate(description="Reasoning settings passed to each delegated Responses request."), _S.Null), "text": _b.union(_b.suspend(lambda: LiveDelegationTextInputParam).annotate(description="Text generation settings passed to each delegated Responses request."), _S.Null), "tools": _b.array(_b.union(LiveFunctionToolInputParam, LiveWebSearchToolInputParam, LiveFileSearchToolInputParam, LiveCodeInterpreterToolInputParam, LiveHostedShellToolInputParam, LiveImageGenerationToolInputParam, LiveMCPToolInputParam, LiveCustomToolInputParam, LiveNamespaceToolInputParam, LiveToolSearchToolInputParam, LiveProgrammaticToolInputParam, LiveComputerToolInputParam, LiveApplyPatchToolInputParam, mode="one_of")).annotate(description="Tools available to the Responses backend while it handles tasks delegated by the Live model."), "tool_choice": _b.union(LiveToolChoiceEnum, _b.union(LiveFunctionToolChoiceParam, LiveMCPToolChoiceParam, LiveSpecificFileSearchParam, LiveSpecificWebSearchParam, LiveSpecificWebSearchPreviewParam, LiveSpecificImageGenParam, LiveSpecificComputerParam, LiveSpecificCodeInterpreterParam, LiveSpecificProgrammaticToolCallingParam, LiveSpecificFunctionShellParam, LiveSpecificCustomToolParam, LiveSpecificApplyPatchParam, mode="one_of"), LiveAllowedToolsChoiceParam, mode="one_of").annotate(description="Controls which tool the Responses backend uses when handling a task delegated by the Live model."), "parallel_tool_calls": _b.union(_S.Boolean.annotate(description="Whether the delegated Responses model may request multiple tool calls in a single response."), _S.Null)}, optional=("instructions", "max_output_tokens", "service_tier", "reasoning", "text", "tools", "tool_choice", "parallel_tool_calls",)).annotate(description="Model, prompt, and tool settings for tasks delegated by the Live session to a Responses backend.", identifier="LiveResponsesDelegationSettingsInputParam")
|
|
581
|
+
LiveResponsesDelegationSettingsUpdateInputParam: _StructSchema[_T.LiveResponsesDelegationSettingsUpdateInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveResponsesDelegationSettingsUpdateInputParam, {"model": _S.String.annotate(description="The Responses backend model to use for subsequent delegated requests. Omit to keep the current backend model."), "instructions": _b.union(_S.String.annotate(description="Instructions for the delegated Responses model, separate from Live instructions. See [backend prompting](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt)."), _S.Null), "max_output_tokens": _b.union(_b.check(_b.check(_S.Number.annotate(description="Maximum number of output tokens for each delegated response."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(16).annotate(expected="a value greater than or equal to 16")), _S.Null), "service_tier": _b.union(_b.suspend(lambda: LiveResponsesServiceTier).annotate(description="Service tier for delegated Responses requests."), _S.Null), "reasoning": _b.union(_b.suspend(lambda: LiveDelegationReasoningInputParam).annotate(description="Reasoning settings passed to each delegated Responses request."), _S.Null), "text": _b.union(_b.suspend(lambda: LiveDelegationTextInputParam).annotate(description="Text generation settings passed to each delegated Responses request."), _S.Null), "tools": _b.array(_b.union(LiveFunctionToolInputParam, LiveWebSearchToolInputParam, LiveFileSearchToolInputParam, LiveCodeInterpreterToolInputParam, LiveHostedShellToolInputParam, LiveImageGenerationToolInputParam, LiveMCPToolInputParam, LiveCustomToolInputParam, LiveNamespaceToolInputParam, LiveToolSearchToolInputParam, LiveProgrammaticToolInputParam, LiveComputerToolInputParam, LiveApplyPatchToolInputParam, mode="one_of")).annotate(description="Tools available to the Responses backend while it handles tasks delegated by the Live model."), "tool_choice": _b.union(LiveToolChoiceEnum, _b.union(LiveFunctionToolChoiceParam, LiveMCPToolChoiceParam, LiveSpecificFileSearchParam, LiveSpecificWebSearchParam, LiveSpecificWebSearchPreviewParam, LiveSpecificImageGenParam, LiveSpecificComputerParam, LiveSpecificCodeInterpreterParam, LiveSpecificProgrammaticToolCallingParam, LiveSpecificFunctionShellParam, LiveSpecificCustomToolParam, LiveSpecificApplyPatchParam, mode="one_of"), LiveAllowedToolsChoiceParam, mode="one_of").annotate(description="Controls which tool the Responses backend uses when handling a task delegated by the Live model."), "parallel_tool_calls": _b.union(_S.Boolean.annotate(description="Whether the delegated Responses model may request multiple tool calls in a single response."), _S.Null)}, optional=("model", "instructions", "max_output_tokens", "service_tier", "reasoning", "text", "tools", "tool_choice", "parallel_tool_calls",)).annotate(description="Updates to the Responses backend of an existing Live session. Omitted settings retain their current values.", identifier="LiveResponsesDelegationSettingsUpdateInputParam")
|
|
582
|
+
ListAuditLogsResponse: _StructSchema[_T.ListAuditLogsResponse, _t.Never, _t.Never] = _b.struct(_T.ListAuditLogsResponse, {"object": _b.literal("list"), "data": _b.array(AuditLog), "first_id": _b.union(_S.String, _S.Null), "last_id": _b.union(_S.String, _S.Null), "has_more": _S.Boolean}, optional=("first_id", "last_id",)).annotate(identifier="ListAuditLogsResponse")
|
|
583
|
+
CreateVectorStoreFileBatchRequest: _S.Bottom[_T.CreateVectorStoreFileBatchRequest, _t.Any] = _b.union(_b.struct(_T.CreateVectorStoreFileBatchRequest__0, {"file_ids": _b.check(_b.check(_b.array(_S.String).annotate(description="A list of [File](https://developers.openai.com/api/reference/resources/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. If `attributes` or `chunking_strategy` are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with `files`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "files": _b.check(_b.check(_b.array(CreateVectorStoreFileRequest).annotate(description="A list of objects that each include a `file_id` plus optional `attributes` or `chunking_strategy`. Use this when you need to override metadata for specific files. The global `attributes` or `chunking_strategy` will be ignored and must be specified for each file. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with `file_ids`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "chunking_strategy": ChunkingStrategyRequestParam, "attributes": VectorStoreFileAttributes}, optional=("files", "chunking_strategy", "attributes",)), _b.struct(_T.CreateVectorStoreFileBatchRequest__1, {"file_ids": _b.check(_b.check(_b.array(_S.String).annotate(description="A list of [File](https://developers.openai.com/api/reference/resources/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. If `attributes` or `chunking_strategy` are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with `files`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "files": _b.check(_b.check(_b.array(CreateVectorStoreFileRequest).annotate(description="A list of objects that each include a `file_id` plus optional `attributes` or `chunking_strategy`. Use this when you need to override metadata for specific files. The global `attributes` or `chunking_strategy` will be ignored and must be specified for each file. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with `file_ids`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "chunking_strategy": ChunkingStrategyRequestParam, "attributes": VectorStoreFileAttributes}, optional=("file_ids", "chunking_strategy", "attributes",))).annotate(identifier="CreateVectorStoreFileBatchRequest")
|
|
584
|
+
ThreadItem: _S.Bottom[_T.ThreadItem, _t.Any] = _b.union(UserMessageItem, AssistantMessageItem, WidgetMessageItem, ClientToolCallItem, TaskItem, TaskGroupItem, mode="one_of").annotate(title="The thread item", identifier="ThreadItem")
|
|
585
|
+
DecisionInputMessage: _StructSchema[_T.DecisionInputMessage, _t.Never, _t.Never] = _b.struct(_T.DecisionInputMessage, {"role": _b.literal("user"), "content": DecisionInputContent, "type": _b.literal("message")}, optional=("type",)).annotate(description="A user message containing text or images.", identifier="DecisionInputMessage")
|
|
586
|
+
DecisionResponse: _StructSchema[_T.DecisionResponse, _t.Never, _t.Never] = _b.struct(_T.DecisionResponse, {"model": _b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "answers": _b.check(_b.check(_b.array(AnswerResource), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "usage": ResponseUsageResource}).annotate(identifier="DecisionResponse")
|
|
587
|
+
CreateEnvironmentParamOpenaiHosted: _StructSchema[_T.CreateEnvironmentParamOpenaiHosted, _t.Never, _t.Never] = _b.struct(_T.CreateEnvironmentParamOpenaiHosted, {"type": _b.literal("openai_hosted").annotate(description="The type of the object. Always `openai_hosted`."), "packages": _b.union(EnvironmentPackagesParam, _S.Null).annotate(description="Packages to install in the environment. Defaults to empty package lists."), "setup_commands": _b.union(_b.check(_b.check(_b.array(SetupCommandParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16).annotate(expected="a value with a length of at most 16")), _S.Null).annotate(description="Ordered, confidential setup commands. Command bodies are never returned."), "network": _b.union(NetworkPolicyParam, _S.Null).annotate(description="Network access policy for the environment. If omitted, the API version determines whether network access is enabled or disabled."), "desktop": _b.union(DesktopParam, _S.Null).annotate(description="Desktop provisioning. Omission or null inherits the template setting, or defaults to disabled."), "env": _b.union(_b.check(_b.check(_b.check(_b.record(_S.String, _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(1024).annotate(expected="a value with at most 1024 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points"))).annotate(expected="an object with property names matching the schema")), _S.Null).annotate(description="Environment variables made available to the agent."), "capability_directories": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="Directories that contain capabilities exposed to the agent. Defaults to an empty list."), "skills": _b.union(_b.check(_b.check(_b.array(HostedSkillParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(200).annotate(expected="a value with a length of at most 200")), _S.Null).annotate(description="Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty list."), "plugins": _b.union(_b.check(_b.check(_b.array(HostedPluginParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(32).annotate(expected="a value with a length of at most 32")), _S.Null).annotate(description="Plugins provided as inline ZIP archives. Defaults to an empty list."), "files": _b.union(_b.check(_b.check(_b.array(HostedEnvironmentFileParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), _S.Null).annotate(description="Files available before the agent starts. Defaults to an empty list."), "environment_template_id": _b.check(_b.check(_S.String.annotate(description="A reusable hosted template applied before inline configuration. Omitted fields inherit the template; network overrides cannot broaden its policy."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points"))}, optional=("packages", "setup_commands", "network", "desktop", "env", "capability_directories", "skills", "plugins", "files", "environment_template_id",)).annotate(description="Provision an OpenAI-hosted environment from inline configuration or a template.", identifier="CreateEnvironmentParamOpenaiHosted")
|
|
588
|
+
CreateEnvironmentTemplateParams: _StructSchema[_T.CreateEnvironmentTemplateParams, _t.Never, _t.Never] = _b.struct(_T.CreateEnvironmentTemplateParams, {"packages": _b.union(EnvironmentPackagesParam, _S.Null).annotate(description="Packages to install in the environment. Defaults to empty package lists."), "setup_commands": _b.union(_b.check(_b.check(_b.array(SetupCommandParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16).annotate(expected="a value with a length of at most 16")), _S.Null).annotate(description="Ordered, confidential setup commands. Command bodies are never returned."), "network": _b.union(NetworkPolicyParam, _S.Null).annotate(description="Network access policy for the environment. If omitted, the API version determines whether network access is enabled or disabled."), "desktop": _b.union(DesktopParam, _S.Null).annotate(description="Desktop provisioning. Omission or null inherits the template setting, or defaults to disabled."), "env": _b.union(_b.check(_b.check(_b.check(_b.record(_S.String, _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(1024).annotate(expected="a value with at most 1024 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points"))).annotate(expected="an object with property names matching the schema")), _S.Null).annotate(description="Environment variables made available to the agent."), "capability_directories": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="Directories that contain capabilities exposed to the agent. Defaults to an empty list."), "skills": _b.union(_b.check(_b.check(_b.array(HostedSkillParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(200).annotate(expected="a value with a length of at most 200")), _S.Null).annotate(description="Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty list."), "plugins": _b.union(_b.check(_b.check(_b.array(HostedPluginParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(32).annotate(expected="a value with a length of at most 32")), _S.Null).annotate(description="Plugins provided as inline ZIP archives. Defaults to an empty list."), "files": _b.union(_b.check(_b.check(_b.array(HostedEnvironmentFileParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), _S.Null).annotate(description="Files available before the agent starts. Defaults to an empty list."), "name": _b.union(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points")), _S.Null).annotate(description="An optional human-readable display name for the template.")}, optional=("packages", "setup_commands", "network", "desktop", "env", "capability_directories", "skills", "plugins", "files", "name",)).annotate(description="Parameters for creating a reusable, project-scoped OpenAI-hosted environment template.", identifier="CreateEnvironmentTemplateParams")
|
|
589
|
+
UpdateEnvironmentTemplateParams: _StructSchema[_T.UpdateEnvironmentTemplateParams, _t.Never, _t.Never] = _b.struct(_T.UpdateEnvironmentTemplateParams, {"name": _b.union(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points")), _S.Null).annotate(description="A replacement human-readable display name, or `null` to clear the name."), "packages": _b.union(EnvironmentPackagesParam, _S.Null).annotate(description="Packages installed before the runtime network policy applies."), "setup_commands": _b.union(_b.check(_b.check(_b.array(SetupCommandParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16).annotate(expected="a value with a length of at most 16")), _S.Null).annotate(description="Replacement confidential setup commands, never included in returned resources."), "network": _b.union(NetworkPolicyParam, _S.Null).annotate(description="Network access available after setup completes. Omit to preserve the current policy, or pass `null` to reset to the default policy."), "desktop": _b.union(DesktopParam, _S.Null).annotate(description="Replacement desktop configuration, or null to disable the desktop."), "env": _b.union(_b.check(_b.check(_b.check(_b.record(_S.String, _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(1024).annotate(expected="a value with at most 1024 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points"))).annotate(expected="an object with property names matching the schema")), _S.Null).annotate(description="Replacement confidential environment values."), "capability_directories": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="Directories that expose capabilities to the agent."), "skills": _b.union(_b.check(_b.check(_b.array(HostedSkillParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(200).annotate(expected="a value with a length of at most 200")), _S.Null).annotate(description="Replacement skill configuration installed for each new session."), "plugins": _b.union(_b.check(_b.check(_b.array(HostedPluginParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(32).annotate(expected="a value with a length of at most 32")), _S.Null).annotate(description="Replacement plugin configuration installed for each new session."), "files": _b.union(_b.check(_b.check(_b.array(HostedEnvironmentFileParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), _S.Null).annotate(description="Replacement file configuration materialized for each new session.")}, optional=("name", "packages", "setup_commands", "network", "desktop", "env", "capability_directories", "skills", "plugins", "files",)).annotate(description="Fields to replace on an existing reusable OpenAI-hosted environment template.", identifier="UpdateEnvironmentTemplateParams")
|
|
590
|
+
EnvironmentParamOpenaiHosted: _S.Bottom[_T.EnvironmentParamOpenaiHosted, _t.Any] = _b.union(_b.struct(_T.EnvironmentParamOpenaiHosted__0, {"type": _b.literal("openai_hosted").annotate(description="The type of the object. Always `openai_hosted`."), "packages": _b.union(EnvironmentPackagesParam, _S.Null).annotate(description="Packages to install in the environment. Defaults to empty package lists."), "setup_commands": _b.union(_b.check(_b.check(_b.array(SetupCommandParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16).annotate(expected="a value with a length of at most 16")), _S.Null).annotate(description="Ordered, confidential setup commands. Command bodies are never returned."), "network": _b.union(NetworkPolicyParam, _S.Null).annotate(description="Network access policy for the environment. If omitted, the API version determines whether network access is enabled or disabled."), "desktop": _b.union(DesktopParam, _S.Null).annotate(description="Desktop provisioning. Omission or null inherits the template setting, or defaults to disabled."), "env": _b.union(_b.check(_b.check(_b.check(_b.record(_S.String, _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(1024).annotate(expected="a value with at most 1024 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points"))).annotate(expected="an object with property names matching the schema")), _S.Null).annotate(description="Environment variables made available to the agent."), "capability_directories": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="Directories that contain capabilities exposed to the agent. Defaults to an empty list."), "skills": _b.union(_b.check(_b.check(_b.array(HostedSkillParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(200).annotate(expected="a value with a length of at most 200")), _S.Null).annotate(description="Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty list."), "plugins": _b.union(_b.check(_b.check(_b.array(HostedPluginParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(32).annotate(expected="a value with a length of at most 32")), _S.Null).annotate(description="Plugins provided as inline ZIP archives. Defaults to an empty list."), "files": _b.union(_b.check(_b.check(_b.array(HostedEnvironmentFileParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(50).annotate(expected="a value with a length of at most 50")), _S.Null).annotate(description="Files available before the agent starts. Defaults to an empty list."), "environment_id": _S.Never, "environment_template_id": _b.check(_b.check(_S.String.annotate(description="A reusable hosted template applied before inline session configuration. Omitted fields inherit the template; network overrides cannot broaden its policy."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "container_size": _b.suspend(lambda: ContainerSizeParam).annotate(description="The hosted container size. Omission selects the medium tier.")}, optional=("packages", "setup_commands", "network", "desktop", "env", "capability_directories", "skills", "plugins", "files", "environment_id", "environment_template_id", "container_size",)), _b.struct(_T.EnvironmentParamOpenaiHosted__1, {"type": _b.literal("openai_hosted").annotate(description="The type of the object. Always `openai_hosted`."), "packages": _S.Never, "setup_commands": _S.Never, "network": _S.Never, "desktop": _S.Never, "env": _S.Never, "capability_directories": _S.Never, "skills": _S.Never, "plugins": _S.Never, "files": _S.Never, "environment_id": _b.check(_b.check(_S.String.annotate(description="An existing prewarmed environment. Cannot be combined with a template or inline configuration."), _S.is_min_code_points(9).annotate(expected="a string with at least 9 code points")), _S.is_max_code_points(256).annotate(expected="a string with at most 256 code points")), "environment_template_id": _S.Never, "container_size": _S.Never}, optional=("packages", "setup_commands", "network", "desktop", "env", "capability_directories", "skills", "plugins", "files", "environment_id", "environment_template_id", "container_size",))).annotate(description="An existing OpenAI-hosted environment or new inline/template-based hosted configuration.", identifier="EnvironmentParamOpenaiHosted")
|
|
591
|
+
SessionTurnItemResource: _S.Bottom[_T.SessionTurnItemResource, _t.Any] = _b.union(MessageItemResource, ReasoningItemResource, FunctionCallItemResource, FunctionCallOutputItemResource, AgentMessageItemResource, McpCallItemResource, ComputerUseCallItemResource, BrowserAuthenticationRequestItemResource, ComputerUseApprovalRequestResultItemResource, WebSearchCallItemResource, CommandExecutionItemResource, CreateSubagentCallItemResource, SendSubagentInputCallItemResource, ResumeSubagentCallItemResource, WaitForSubagentsCallItemResource, InterruptSubagentCallItemResource, CloseSubagentCallItemResource, mode="one_of").annotate(description="An item associated with a session turn.", identifier="SessionTurnItemResource")
|
|
592
|
+
AgentOutputItemResource: _S.Bottom[_T.AgentOutputItemResource, _t.Any] = _b.union(AssistantMessageItemResource, ReasoningItemResource, FunctionCallItemResource, McpCallItemResource, ComputerUseCallItemResource, BrowserAuthenticationRequestItemResource, WebSearchCallItemResource, CommandExecutionItemResource, CreateSubagentCallItemResource, SendSubagentInputCallItemResource, ResumeSubagentCallItemResource, WaitForSubagentsCallItemResource, InterruptSubagentCallItemResource, CloseSubagentCallItemResource, mode="one_of").annotate(description="An output item produced by an agent.", identifier="AgentOutputItemResource")
|
|
593
|
+
SessionRequiredActionResource: _S.Bottom[_T.SessionRequiredActionResource, _t.Any] = _b.union(SessionRequiredActionResourceComputerUseApprovalRequest, SessionRequiredActionResourceFunctionCall, SessionRequiredActionResourceEnvironmentConnection, mode="one_of").annotate(description="An action that must be completed before a session can continue.", identifier="SessionRequiredActionResource")
|
|
594
|
+
AgentResource: _StructSchema[_T.AgentResource, _t.Never, _t.Never] = _b.struct(_T.AgentResource, {"id": _b.check(_S.String.annotate(description="The ID of the reusable agent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("agent").annotate(description="The object type. Always `agent`."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the agent was created.", format="int64"), _S.is_int().annotate(expected="an integer")), "updated_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the agent was last updated.", format="int64"), _S.is_int().annotate(expected="an integer")), "name": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="A human-readable name for the agent, or null if it is unnamed."), "metadata": _b.check(_b.check(_b.record(_S.String, _b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(description="Custom string key-value pairs attached to the agent."), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_property_names(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(expected="an object with property names matching the schema")), "model": _b.check(_S.String.annotate(description="The requested model name used for inference."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "reasoning": _b.suspend(lambda: ReasoningResource).annotate(description="The resolved reasoning configuration, including the model default for an omitted effort."), "text": _b.suspend(lambda: TextResource).annotate(description="The resolved configuration for text generated by the agent."), "service_tier": _b.suspend(lambda: ServiceTierResource).annotate(description="The resolved service-tier policy used for model requests."), "instructions": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="Custom instructions appended to the agent's default base instructions."), "tools": _b.check(_b.check(_b.array(PersistedAgentToolResource).annotate(description="Tools available to the agent."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "multi_agent": _b.suspend(lambda: MultiAgentConfigResource).annotate(description="The resolved configuration for creating and coordinating subagents.")}).annotate(description="A reusable agent scoped to the caller's project.", identifier="AgentResource")
|
|
595
|
+
CreateAgentParams: _StructSchema[_T.CreateAgentParams, _t.Never, _t.Never] = _b.struct(_T.CreateAgentParams, {"metadata": _b.union(_b.check(_b.check(_b.check(_b.record(_S.String, _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points"))), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(16).annotate(expected="a value with at most 16 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points"))).annotate(expected="an object with property names matching the schema")), _S.Null).annotate(description="Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. Omission or null defaults to an empty map."), "name": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _S.Null).annotate(description="A human-readable name for the agent. Omission or null leaves the agent unnamed."), "model": _b.check(_b.check(_S.String.annotate(description="The model to use for the agent. The requested model name is preserved."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "reasoning": _b.union(ReasoningParam, _S.Null).annotate(description="Configuration for model reasoning. Omission uses the model's default effort."), "text": _b.union(TextParam, _S.Null).annotate(description="Configuration for generated text. Defaults to the `text` format and medium verbosity."), "service_tier": _b.union(ServiceTierParam, _S.Null).annotate(description="The service tier used for model requests. Defaults to `auto`."), "instructions": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="Additional instructions appended to the agent's default base instructions. Omit or set to null to add no custom instructions."), "tools": _b.union(_b.check(_b.check(_b.array(PersistedAgentToolConfigParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), _S.Null).annotate(description="Tools available to the agent. Defaults to an empty list. The tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON."), "multi_agent": _b.union(MultiAgentConfigCurrentParam, _S.Null).annotate(description="Configuration for creating and coordinating subagents. Subagent tools are disabled by default.")}, optional=("metadata", "name", "reasoning", "text", "service_tier", "instructions", "tools", "multi_agent",)).annotate(description="Parameters for creating a reusable agent.", identifier="CreateAgentParams")
|
|
596
|
+
UpdateAgentParams: _StructSchema[_T.UpdateAgentParams, _t.Never, _t.Never] = _b.struct(_T.UpdateAgentParams, {"model": _b.check(_b.check(_S.String.annotate(description="The model to use for the agent. The requested model name is preserved."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "reasoning": _b.union(ReasoningParam, _S.Null).annotate(description="Configuration for model reasoning. Omit to keep the current settings; pass `null` to reset to the model's default effort."), "text": _b.union(TextParam, _S.Null).annotate(description="Configuration for text generated by the agent."), "service_tier": _b.union(ServiceTierParam, _S.Null).annotate(description="The service tier used for model requests."), "instructions": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="Additional instructions appended to the agent's default base instructions. Omit to leave unchanged."), "multi_agent": _b.union(MultiAgentConfigCurrentParam, _S.Null).annotate(description="Configuration for creating and coordinating subagents."), "metadata": _b.union(_b.check(_b.check(_b.check(_b.record(_S.String, _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points"))), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(16).annotate(expected="a value with at most 16 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points"))).annotate(expected="an object with property names matching the schema")), _S.Null).annotate(description="Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters."), "name": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _S.Null).annotate(description="A replacement name. Omit to leave unchanged, or pass null to clear it."), "tools": _b.union(_b.check(_b.check(_b.array(PersistedAgentToolConfigParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), _S.Null).annotate(description="Replaces the tool list. Omit to leave it unchanged, or pass null to clear it. The replacement must fit within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON.")}, optional=("model", "reasoning", "text", "service_tier", "instructions", "multi_agent", "metadata", "name", "tools",)).annotate(description="Fields to replace on an existing reusable agent.", identifier="UpdateAgentParams")
|
|
597
|
+
SessionAgentResource: _StructSchema[_T.SessionAgentResource, _t.Never, _t.Never] = _b.struct(_T.SessionAgentResource, {"id": _b.check(_S.String.annotate(description="The ID of the agent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "name": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The reusable agent's name when the session was created, or null if no name was saved. Later changes to the agent's name do not affect this value."), "model": _b.check(_S.String.annotate(description="The model used by the agent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "reasoning": _b.suspend(lambda: ReasoningResource).annotate(description="The agent's reasoning configuration."), "text": _b.suspend(lambda: TextResource).annotate(description="Configuration for text generated by the agent."), "service_tier": _b.suspend(lambda: ServiceTierResource).annotate(description="The effective service-tier policy for model requests. Defaults to `auto`."), "instructions": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="Custom instructions appended to the agent's default base instructions."), "tools": _b.check(_b.check(_b.array(AgentToolResource).annotate(description="Tools available to the agent."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "multi_agent": _b.suspend(lambda: MultiAgentConfigResource).annotate(description="Configuration for creating and coordinating subagents.")}).annotate(description="The effective agent configuration for a session.", identifier="SessionAgentResource")
|
|
598
|
+
SessionAgentConfigParam: _StructSchema[_T.SessionAgentConfigParam, _t.Never, _t.Never] = _b.struct(_T.SessionAgentConfigParam, {"model": _b.check(_b.check(_S.String.annotate(description="The model to use for the agent. The requested model name is preserved."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "reasoning": _b.union(ReasoningParam, _S.Null).annotate(description="Configuration for model reasoning. Omit to keep the current settings; pass `null` to reset to the model's default effort."), "text": _b.union(TextParam, _S.Null).annotate(description="Configuration for text generated by the agent."), "service_tier": _b.union(ServiceTierParam, _S.Null).annotate(description="The service tier used for model requests."), "instructions": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="Additional instructions appended to the agent's default base instructions. Omit to leave unchanged."), "multi_agent": _b.union(MultiAgentConfigCurrentParam, _S.Null).annotate(description="Configuration for creating and coordinating subagents."), "tools": _b.union(_b.check(_b.check(_b.array(AgentToolConfigParam), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="Tools available to the agent. Omit to inherit, or pass null to clear them. The resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON.")}, optional=("model", "reasoning", "text", "service_tier", "instructions", "multi_agent", "tools",)).annotate(description="Agent configuration for a session. Omitted fields inherit from `agent_id` when supplied. Supplied objects and arrays replace the whole field; null resets nullable fields.", identifier="SessionAgentConfigParam")
|
|
599
|
+
SessionInputParam: _S.Bottom[_T.SessionInputParam, _t.Any] = _b.union(SessionInputParamAgentSessionInputComputerUseApprovalRequestResult, SessionInputParamAgentSessionInputMessage, SessionInputParamAgentSessionInputCancel, SessionInputParamAgentSessionInputToolResult, mode="one_of").annotate(description="Input submitted to an existing session.", identifier="SessionInputParam")
|
|
600
|
+
VaultCredentialAuthResource: _S.Bottom[_T.VaultCredentialAuthResource, _t.Any] = _b.union(VaultCredentialAuthResourceMcpOauth, VaultCredentialAuthResourceStaticBearer, VaultCredentialAuthResourceEnvironmentVariable, mode="one_of").annotate(description="The authentication configuration of a vault credential, excluding secrets.", identifier="VaultCredentialAuthResource")
|
|
601
|
+
CreateVaultCredentialAuthParam: _S.Bottom[_T.CreateVaultCredentialAuthParam, _t.Any] = _b.union(CreateVaultCredentialAuthParamMcpOauth, CreateVaultCredentialAuthParamStaticBearer, CreateVaultCredentialAuthParamEnvironmentVariable, mode="one_of").annotate(description="Authentication credentials for an MCP server or an OpenAI-hosted environment.", identifier="CreateVaultCredentialAuthParam")
|
|
602
|
+
RotateVaultCredentialAuthParam: _S.Bottom[_T.RotateVaultCredentialAuthParam, _t.Any] = _b.union(RotateVaultCredentialAuthParamMcpOauth, RotateVaultCredentialAuthParamStaticBearer, RotateVaultCredentialAuthParamEnvironmentVariable, mode="one_of").annotate(description="Updates to a vault credential without changing its authentication method or destination configuration.", identifier="RotateVaultCredentialAuthParam")
|
|
603
|
+
BetaTool: _S.Bottom[_T.BetaTool, _t.Any] = _b.union(BetaFunctionTool, BetaFileSearchTool, BetaComputerTool, BetaComputerUsePreviewTool, BetaWebSearchTool, BetaMCPTool, BetaCodeInterpreterTool, BetaProgrammaticToolCallingParam, BetaImageGenTool, BetaLocalShellToolParam, BetaFunctionShellToolParam, BetaCustomToolParam, BetaNamespaceToolParam, BetaToolSearchToolParam, BetaWebSearchPreviewTool, BetaApplyPatchToolParam, mode="one_of").annotate(description="A tool that can be used to generate a response.\n", identifier="BetaTool")
|
|
604
|
+
BetaToolSearchOutputTool: _S.Bottom[_T.BetaToolSearchOutputTool, _t.Any] = _b.union(BetaFunctionTool, BetaFileSearchTool, BetaComputerTool, BetaComputerUsePreviewTool, BetaWebSearchTool, BetaMCPTool, BetaCodeInterpreterTool, BetaProgrammaticToolCallingParam, BetaImageGenTool, BetaLocalShellToolParam, BetaFunctionShellToolParam, BetaCustomToolParam, BetaToolSearchOutputNamespaceToolParam, BetaToolSearchToolParam, BetaWebSearchPreviewTool, BetaApplyPatchToolParam, mode="one_of").annotate(description="A tool definition returned by a tool search output.\n", identifier="BetaToolSearchOutputTool")
|
|
605
|
+
BetaEasyInputMessage: _StructSchema[_T.BetaEasyInputMessage, _t.Never, _t.Never] = _b.struct(_T.BetaEasyInputMessage, {"role": _b.literals(["user", "assistant", "system", "developer"]).annotate(description="The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n"), "content": _b.union(_S.String.annotate(title="Text input", description="A text input to the model.\n"), BetaInputMessageContentList, mode="one_of").annotate(description="Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n"), "phase": _b.union(BetaMessagePhase, _S.Null), "type": _b.literal("message").annotate(description="The type of the message input. Always `message`.\n")}, optional=("phase", "type",)).annotate(title="Input message", description="A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n", identifier="BetaEasyInputMessage")
|
|
606
|
+
BetaInputMessageResource: _StructSchema[_T.BetaInputMessageResource, _t.Never, _t.Never] = _b.struct(_T.BetaInputMessageResource, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("message").annotate(description="The type of the message input. Always set to `message`.\n"), "role": _b.literals(["user", "system", "developer"]).annotate(description="The role of the message input. One of `user`, `system`, or `developer`.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "content": BetaInputMessageContentList, "id": _S.String.annotate(description="The unique ID of the message input.\n")}, optional=("agent", "status",)).annotate(identifier="BetaInputMessageResource")
|
|
607
|
+
BetaOutputMessage: _StructSchema[_T.BetaOutputMessage, _t.Never, _t.Never] = _b.struct(_T.BetaOutputMessage, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the output message.\n"), "type": _b.literal("message").annotate(description="The type of the output message. Always `message`.\n"), "role": _b.literal("assistant").annotate(description="The role of the output message. Always `assistant`.\n"), "content": _b.array(BetaOutputMessageContent).annotate(description="The content of the output message.\n"), "phase": _b.union(BetaMessagePhase, _S.Null), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n")}, optional=("agent", "phase",)).annotate(title="Output message", description="An output message from the model.\n", identifier="BetaOutputMessage")
|
|
608
|
+
BetaResponseContentPartAddedEvent: _StructSchema[_T.BetaResponseContentPartAddedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseContentPartAddedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.content_part.added").annotate(description="The type of the event. Always `response.content_part.added`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the content part was added to.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the content part was added to.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part that was added.\n"), _S.is_int().annotate(expected="an integer")), "part": _b.suspend(lambda: BetaOutputContent).annotate(description="The content part that was added.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when a new content part is added.", identifier="BetaResponseContentPartAddedEvent")
|
|
609
|
+
BetaResponseContentPartDoneEvent: _StructSchema[_T.BetaResponseContentPartDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseContentPartDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.content_part.done").annotate(description="The type of the event. Always `response.content_part.done`.\n"), "item_id": _S.String.annotate(description="The ID of the output item that the content part was added to.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that the content part was added to.\n"), _S.is_int().annotate(expected="an integer")), "content_index": _b.check(_S.Number.annotate(description="The index of the content part that is done.\n"), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "part": _b.suspend(lambda: BetaOutputContent).annotate(description="The content part that is done.\n")}, optional=("agent",)).annotate(description="Emitted when a content part is done.", identifier="BetaResponseContentPartDoneEvent")
|
|
610
|
+
BetaComputerToolCall: _StructSchema[_T.BetaComputerToolCall, _t.Never, _t.Never] = _b.struct(_T.BetaComputerToolCall, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("computer_call").annotate(description="The type of the computer call. Always `computer_call`."), "id": _S.String.annotate(description="The unique ID of the computer call."), "call_id": _S.String.annotate(description="An identifier used when responding to the tool call with output.\n"), "action": BetaComputerAction, "actions": BetaComputerActionList, "pending_safety_checks": _b.array(BetaComputerCallSafetyCheckParam).annotate(description="The pending safety checks for the computer call.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n")}, optional=("agent", "action", "actions",)).annotate(title="Computer tool call", description="A tool call to a computer use tool. See the\n[computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information.\n", identifier="BetaComputerToolCall")
|
|
611
|
+
RunStepStreamEvent: _S.Bottom[_T.RunStepStreamEvent, _t.Any] = _b.union(_b.struct(_T.RunStepStreamEvent__0, {"event": _b.literal("thread.run.step.created"), "data": RunStepObject}).annotate(description="Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is created."), _b.struct(_T.RunStepStreamEvent__1, {"event": _b.literal("thread.run.step.in_progress"), "data": RunStepObject}).annotate(description="Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state."), _b.struct(_T.RunStepStreamEvent__2, {"event": _b.literal("thread.run.step.delta"), "data": RunStepDeltaObject}).annotate(description="Occurs when parts of a [run step](https://developers.openai.com/api/docs/assistants/migration) are being streamed."), _b.struct(_T.RunStepStreamEvent__3, {"event": _b.literal("thread.run.step.completed"), "data": RunStepObject}).annotate(description="Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is completed."), _b.struct(_T.RunStepStreamEvent__4, {"event": _b.literal("thread.run.step.failed"), "data": RunStepObject}).annotate(description="Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) fails."), _b.struct(_T.RunStepStreamEvent__5, {"event": _b.literal("thread.run.step.cancelled"), "data": RunStepObject}).annotate(description="Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is cancelled."), _b.struct(_T.RunStepStreamEvent__6, {"event": _b.literal("thread.run.step.expired"), "data": RunStepObject}).annotate(description="Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) expires."), mode="one_of").annotate(identifier="RunStepStreamEvent")
|
|
612
|
+
ListRunStepsResponse: _S.Bottom[_T.ListRunStepsResponse, _t.Any] = _b.union(_S.Null, _S.String, _S.Finite, _S.Boolean, _b.struct_with_rest(_b.struct(_T.ListRunStepsResponse__4, {"object": _S.String, "data": _b.array(RunStepObject), "first_id": _S.String, "last_id": _S.String, "has_more": _S.Boolean}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _b.array(_S.Json.annotate(expected="JSON value"))).annotate(identifier="ListRunStepsResponse")
|
|
613
|
+
ChatCompletionList: _StructSchema[_T.ChatCompletionList, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionList, {"object": _b.literal("list").annotate(description="The type of this object. It is always set to \"list\".\n"), "data": _b.array(CreateChatCompletionResponse).annotate(description="An array of chat completion objects.\n"), "first_id": _b.union(_S.String, _S.Null).annotate(description="The identifier of the first chat completion in the data array."), "last_id": _b.union(_S.String, _S.Null).annotate(description="The identifier of the last chat completion in the data array."), "has_more": _S.Boolean.annotate(description="Indicates whether there are more Chat Completions available.")}).annotate(title="ChatCompletionList", description="An object representing a list of Chat Completions.\n", identifier="ChatCompletionList")
|
|
614
|
+
CreateChatCompletionRequest: _StructSchema[_T.CreateChatCompletionRequest, _t.Never, _t.Never] = _b.struct(_T.CreateChatCompletionRequest, {"metadata": Metadata, "top_logprobs": _b.check(_b.check(_b.check(_b.check(_b.check(_S.Number.annotate(description="An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n"), _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(20).annotate(expected="a value less than or equal to 20")), _S.make_filter_group(_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(20).annotate(expected="a value less than or equal to 20")).annotate(description="An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n")), _S.make_filter_group(_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(20).annotate(expected="a value less than or equal to 20")).annotate(description="An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n`logprobs` must be set to `true` if this parameter is used.\n")), "temperature": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n"), _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(2).annotate(expected="a value less than or equal to 2")), _S.Null), "top_p": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n"), _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")), _S.Null), "user": _b.union(_S.String, _S.Null).annotate(description="This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\nA stable identifier for your end-users.\nUsed to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), "safety_identifier": _b.union(_b.check(_S.String.annotate(description="A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 128 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _S.Null), "prompt_cache_key": _b.union(_S.String.annotate(description="Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).\n"), _S.Null), "prompt_cache_retention": _b.union(_b.literals(["in_memory", "24h"]).annotate(description="Deprecated. Use `prompt_cache_options.ttl` instead.\n\nThe retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).\nThis field expresses a maximum retention policy, while\n`prompt_cache_options.ttl` expresses a minimum cache lifetime. The two\nfields are independent and do not interact.\nFor `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.\n\nFor older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:\n - Organizations without ZDR enabled default to `24h`.\n - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.\n"), _S.Null), "prompt_cache_options": PromptCacheOptionsParam, "messages": _b.check(_b.array(ChatCompletionRequestMessage).annotate(description="A list of messages comprising the conversation so far. Depending on the\n[model](https://developers.openai.com/api/docs/models) you use, different message types (modalities) are\nsupported, like [text](https://developers.openai.com/api/docs/guides/text),\n[images](https://developers.openai.com/api/docs/guides/images-vision), and [audio](https://developers.openai.com/api/docs/guides/audio).\n"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "model": _b.suspend(lambda: ModelIdsShared).annotate(description="Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models)\nto browse and compare available models.\n"), "service_tier": ServiceTier, "modalities": ResponseModalities, "verbosity": Verbosity, "reasoning_effort": ReasoningEffort, "max_completion_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).\n"), "frequency_penalty": _b.union(_b.check(_b.check(_S.Finite, _S.is_greater_than_or_equal_to(-2).annotate(expected="a value greater than or equal to -2")), _S.is_less_than_or_equal_to(2).annotate(expected="a value less than or equal to 2")), _S.Null).annotate(description="Number between -2.0 and 2.0. Positive values penalize new tokens based on\ntheir existing frequency in the text so far, decreasing the model's\nlikelihood to repeat the same line verbatim.\n"), "presence_penalty": _b.union(_b.check(_b.check(_S.Finite, _S.is_greater_than_or_equal_to(-2).annotate(expected="a value greater than or equal to -2")), _S.is_less_than_or_equal_to(2).annotate(expected="a value less than or equal to 2")), _S.Null).annotate(description="Number between -2.0 and 2.0. Positive values penalize new tokens based on\nwhether they appear in the text so far, increasing the model's likelihood\nto talk about new topics.\n"), "web_search_options": _b.struct(_T.CreateChatCompletionRequest__web_search_options, {"user_location": _b.union(_b.struct_with_rest(_b.struct(_T.CreateChatCompletionRequest__web_search_options__user_location__0, {"type": _b.literal("approximate").annotate(description="The type of location approximation. Always `approximate`.\n"), "approximate": WebSearchLocation}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Approximate location parameters for the search.\n"), "search_context_size": WebSearchContextSize}, optional=("user_location", "search_context_size",)).annotate(title="Web search", description="This tool searches the web for relevant results to use in a response.\nLearn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).\n"), "response_format": _b.union(ResponseFormatText, ResponseFormatJsonSchema, ResponseFormatJsonObject, mode="one_of").annotate(description="An object specifying the format that the model must output.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\nStructured Outputs which ensures the model will match your supplied JSON\nschema. Learn more in the [Structured Outputs\nguide](https://developers.openai.com/api/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n"), "audio": _b.union(_b.struct_with_rest(_b.struct(_T.CreateChatCompletionRequest__audio__0, {"voice": _b.suspend(lambda: VoiceIdsOrCustomVoice).annotate(description="The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`,\n`sage`, `shimmer`, `marin`, and `cedar`. You may also provide a\ncustom voice object with an `id`, for example `{ \"id\": \"voice_1234\" }`.\nCustom voices must be created from audio samples.\n"), "format": _b.literals(["wav", "aac", "mp3", "flac", "opus", "pcm16"]).annotate(description="Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.\n")}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`. [Learn more](https://developers.openai.com/api/docs/guides/audio).\n"), "store": _b.union(_S.Boolean, _S.Null).annotate(description="Whether or not to store the output of this chat completion request for\nuse in our [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) or\n[evals](https://developers.openai.com/api/docs/guides/evals) products.\n\nSupports text and image inputs. Note: image inputs over 8MB will be dropped.\n"), "moderation": _b.union(_b.suspend(lambda: ModerationParam).annotate(description="Configuration for running moderation on the request input and generated output.\n"), _S.Null), "stream": _b.union(_S.Boolean, _S.Null).annotate(description="If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events)\nfor more information, along with the [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses)\nguide for more information on how to handle the streaming events.\n"), "stop": StopConfiguration, "logit_bias": _b.union(_b.record(_S.String, _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _S.Null).annotate(description="Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the\ntokenizer) to an associated bias value from -100 to 100. Mathematically,\nthe bias is added to the logits generated by the model prior to sampling.\nThe exact effect will vary per model, but values between -1 and 1 should\ndecrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.\n"), "logprobs": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to return log probabilities of the output tokens or not. If true,\nreturns the log probabilities of each output token returned in the\n`content` of `message`.\n"), "max_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the\nchat completion. This value can be used to control\n[costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is\nnot compatible with [o-series models](https://developers.openai.com/api/docs/guides/reasoning).\n"), "n": _b.union(_b.check(_b.check(_b.check(_S.Number, _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(128).annotate(expected="a value less than or equal to 128")), _S.Null).annotate(description="How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs."), "prediction": _b.union(PredictionContent, _S.Null).annotate(description="Configuration for a [Predicted Output](https://developers.openai.com/api/docs/guides/predicted-outputs),\nwhich can greatly improve response times when large parts of the model\nresponse are known ahead of time. This is most common when you are\nregenerating a file with only minor changes to most of the content.\n"), "seed": _b.union(_b.check(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(-9223372036854775808).annotate(expected="a value greater than or equal to -9223372036854776000")), _S.is_less_than_or_equal_to(9223372036854775808).annotate(expected="a value less than or equal to 9223372036854776000")), _S.Null).annotate(description="This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n", format="int64"), "stream_options": ChatCompletionStreamOptions, "tools": _b.array(_b.union(ChatCompletionTool, CustomToolChatCompletions, mode="one_of")).annotate(description="A list of tools the model may call. You can provide either\n[custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) or\n[function tools](https://developers.openai.com/api/docs/guides/function-calling).\n"), "tool_choice": ChatCompletionToolChoiceOption, "parallel_tool_calls": ParallelToolCalls, "function_call": _b.union(_b.literals(["none", "auto"]).annotate(description="`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.\n"), ChatCompletionFunctionCallOption, mode="one_of").annotate(description="Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n\n`none` means the model will not call a function and instead generates a\nmessage.\n\n`auto` means the model can pick between generating a message or calling a\nfunction.\n\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the\nmodel to call that function.\n\n`none` is the default when no functions are present. `auto` is the default\nif functions are present.\n"), "functions": _b.check(_b.check(_b.array(ChatCompletionFunctions).annotate(description="Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(128).annotate(expected="a value with a length of at most 128"))}, optional=("metadata", "top_logprobs", "temperature", "top_p", "user", "safety_identifier", "prompt_cache_key", "prompt_cache_retention", "prompt_cache_options", "service_tier", "modalities", "verbosity", "reasoning_effort", "max_completion_tokens", "frequency_penalty", "presence_penalty", "web_search_options", "response_format", "audio", "store", "moderation", "stream", "stop", "logit_bias", "logprobs", "max_tokens", "n", "prediction", "seed", "stream_options", "tools", "tool_choice", "parallel_tool_calls", "function_call", "functions",)).annotate(identifier="CreateChatCompletionRequest")
|
|
615
|
+
EvalItem: _StructSchema[_T.EvalItem, _t.Never, _t.Never] = _b.struct(_T.EvalItem, {"role": _b.literals(["user", "assistant", "system", "developer"]).annotate(description="The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n"), "content": EvalItemContent, "type": _b.literal("message").annotate(description="The type of the message input. Always `message`.\n")}, optional=("type",)).annotate(title="Eval message object", description="A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n", identifier="EvalItem")
|
|
616
|
+
RealtimeCallCreateRequest: _StructSchema[_T.RealtimeCallCreateRequest, _t.Never, _t.Never] = _b.struct(_T.RealtimeCallCreateRequest, {"sdp": _S.String.annotate(description="WebRTC Session Description Protocol (SDP) offer generated by the caller."), "session": _b.suspend(lambda: RealtimeSessionCreateRequestGA).annotate(title="Session configuration", description="Optional session configuration to apply before the realtime session is\ncreated. Use the same parameters you would send in a [`create client secret`](https://developers.openai.com/api/reference/resources/realtime/subresources/client_secrets/methods/create)\nrequest.")}, optional=("session",)).annotate(title="Realtime call creation request", description="Parameters required to initiate a realtime call and receive the SDP answer\nneeded to complete a WebRTC peer connection. Provide an SDP offer generated\nby your client and optionally configure the session that will answer the call.", identifier="RealtimeCallCreateRequest")
|
|
617
|
+
RealtimeCreateClientSecretRequest: _StructSchema[_T.RealtimeCreateClientSecretRequest, _t.Never, _t.Never] = _b.struct(_T.RealtimeCreateClientSecretRequest, {"expires_after": _b.struct(_T.RealtimeCreateClientSecretRequest__expires_after, {"anchor": _b.literal("created_at").annotate(description="The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.\n"), "seconds": _b.check(_b.check(_b.check(_S.Number.annotate(description="The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.\n", format="int64"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(10).annotate(expected="a value greater than or equal to 10")), _S.is_less_than_or_equal_to(7200).annotate(expected="a value less than or equal to 7200"))}, optional=("anchor", "seconds",)).annotate(title="Client secret expiration", description="Configuration for the client secret expiration. Expiration refers to the time after which\na client secret will no longer be valid for creating sessions. The session itself may\ncontinue after that time once started. A secret can be used to create multiple sessions\nuntil it expires.\n"), "session": _b.union(RealtimeSessionCreateRequestGA, RealtimeTranscriptionSessionCreateRequestGA, mode="one_of").annotate(title="Session configuration", description="Session configuration to use for the client secret. Choose either a realtime\nsession or a transcription session.\n")}, optional=("expires_after", "session",)).annotate(title="Realtime client secret creation request", description="Create a session and client secret for the Realtime API. The request can specify\neither a realtime or a transcription session configuration.\n[Learn more about the Realtime API](https://developers.openai.com/api/docs/guides/realtime).\n", identifier="RealtimeCreateClientSecretRequest")
|
|
618
|
+
RealtimeCreateClientSecretResponse: _StructSchema[_T.RealtimeCreateClientSecretResponse, _t.Never, _t.Never] = _b.struct(_T.RealtimeCreateClientSecretResponse, {"value": _S.String.annotate(description="The generated client secret value."), "expires_at": _b.check(_S.Number.annotate(description="Expiration timestamp for the client secret, in seconds since epoch.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "session": _b.union(RealtimeSessionCreateResponseGA, RealtimeTranscriptionSessionCreateResponseGA, mode="one_of").annotate(title="Session configuration", description="The session configuration for either a realtime or transcription session.\n")}).annotate(title="Realtime session and client secret", description="Response from creating a session and client secret for the Realtime API.\n", identifier="RealtimeCreateClientSecretResponse")
|
|
619
|
+
ToolSearchOutput: _StructSchema[_T.ToolSearchOutput, _t.Never, _t.Never] = _b.struct(_T.ToolSearchOutput, {"type": _b.literal("tool_search_output").annotate(description="The type of the item. Always `tool_search_output`."), "id": _S.String.annotate(description="The unique ID of the tool search output item."), "call_id": _b.union(_S.String.annotate(description="The unique ID of the tool search call generated by the model."), _S.Null), "execution": _b.suspend(lambda: ToolSearchExecutionType).annotate(description="Whether tool search was executed by the server or by the client."), "tools": _b.array(Tool).annotate(description="The loaded tool definitions returned by tool search."), "status": _b.suspend(lambda: FunctionCallOutputStatusEnum).annotate(description="The status of the tool search output item that was recorded."), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.")}, optional=("created_by",)).annotate(identifier="ToolSearchOutput")
|
|
620
|
+
AdditionalTools: _StructSchema[_T.AdditionalTools, _t.Never, _t.Never] = _b.struct(_T.AdditionalTools, {"type": _b.literal("additional_tools").annotate(description="The type of the item. Always `additional_tools`."), "id": _S.String.annotate(description="The unique ID of the additional tools item."), "role": _b.suspend(lambda: MessageRole).annotate(description="The role that provided the additional tools."), "tools": _b.array(Tool).annotate(description="The additional tool definitions made available at this item.")}).annotate(identifier="AdditionalTools")
|
|
621
|
+
ToolsArray: _S.Bottom[_T.ToolsArray, _t.Any] = _b.array(Tool).annotate(description="An array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter.\n\nWe support the following categories of tools:\n- **Built-in tools**: Tools that are provided by OpenAI that extend the\n model's capabilities, like [web search](https://developers.openai.com/api/docs/guides/tools-web-search)\n or [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about\n [built-in tools](https://developers.openai.com/api/docs/guides/tools).\n- **MCP Tools**: Integrations with third-party systems via custom MCP servers\n or predefined connectors such as Google Drive and SharePoint. Learn more about\n [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).\n- **Function calls (custom tools)**: Functions that are defined by you,\n enabling the model to call your own code with strongly typed arguments\n and outputs. Learn more about\n [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use\n custom tools to call your own code.\n", identifier="ToolsArray")
|
|
622
|
+
InputItem: _S.Bottom[_T.InputItem, _t.Any] = _b.union(EasyInputMessage, _b.union(_b.struct(_T.InputItem__1__0, {"type": _b.literal("message").annotate(description="The type of the message input. Always set to `message`.\n"), "role": _b.literals(["user", "system", "developer"]).annotate(description="The role of the message input. One of `user`, `system`, or `developer`.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "content": InputMessageContentList}, optional=("type", "status",)).annotate(title="Input message", description="A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n"), _b.struct(_T.InputItem__1__1, {"id": _S.String.annotate(description="The unique ID of the output message.\n"), "type": _b.literal("message").annotate(description="The type of the output message. Always `message`.\n"), "role": _b.literal("assistant").annotate(description="The role of the output message. Always `assistant`.\n"), "content": _b.array(OutputMessageContent).annotate(description="The content of the output message.\n"), "phase": _b.union(MessagePhase, _S.Null), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n")}, optional=("phase",)).annotate(title="Output message", description="An output message from the model.\n"), _b.struct(_T.InputItem__1__2, {"id": _S.String.annotate(description="The unique ID of the file search tool call.\n"), "type": _b.literal("file_search_call").annotate(description="The type of the file search tool call. Always `file_search_call`.\n"), "status": _b.literals(["in_progress", "searching", "completed", "incomplete", "failed"]).annotate(description="The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n"), "queries": _b.array(_S.String).annotate(description="The queries used to search for files.\n"), "results": _b.union(_b.array(_b.struct(_T.InputItem__1__2__results__0__item, {"file_id": _S.String.annotate(description="The unique ID of the file.\n"), "text": _S.String.annotate(description="The text that was retrieved from the file.\n"), "filename": _S.String.annotate(description="The name of the file.\n"), "attributes": VectorStoreFileAttributes, "score": _b.check(_S.Number.annotate(description="The relevance score of the file - a value between 0 and 1.\n", format="float"), _S.is_finite().annotate(expected="a finite number"))}, optional=("file_id", "text", "filename", "attributes", "score",))).annotate(description="The results of the file search tool call.\n"), _S.Null)}, optional=("results",)).annotate(title="File search tool call", description="The results of a file search tool call. See the\n[file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information.\n"), _b.struct(_T.InputItem__1__3, {"type": _b.literal("computer_call").annotate(description="The type of the computer call. Always `computer_call`."), "id": _S.String.annotate(description="The unique ID of the computer call."), "call_id": _S.String.annotate(description="An identifier used when responding to the tool call with output.\n"), "action": ComputerAction, "actions": ComputerActionList, "pending_safety_checks": _b.array(ComputerCallSafetyCheckParam).annotate(description="The pending safety checks for the computer call.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n")}, optional=("action", "actions",)).annotate(title="Computer tool call", description="A tool call to a computer use tool. See the\n[computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information.\n"), _b.struct(_T.InputItem__1__4, {"id": _b.union(_S.String.annotate(description="The ID of the computer tool call output."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The ID of the computer tool call that produced the output."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "type": _b.literal("computer_call_output").annotate(description="The type of the computer tool call output. Always `computer_call_output`."), "output": ComputerScreenshotImage, "acknowledged_safety_checks": _b.union(_b.array(ComputerCallSafetyCheckParam).annotate(description="The safety checks reported by the API that have been acknowledged by the developer."), _S.Null), "status": _b.union(_b.suspend(lambda: FunctionCallItemStatus).annotate(description="The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API."), _S.Null)}, optional=("id", "acknowledged_safety_checks", "status",)).annotate(title="Computer tool call output", description="The output of a computer tool call."), _b.struct(_T.InputItem__1__5, {"id": _S.String.annotate(description="The unique ID of the web search tool call.\n"), "type": _b.literal("web_search_call").annotate(description="The type of the web search tool call. Always `web_search_call`.\n"), "status": _b.suspend(lambda: WebSearchCallStatus).annotate(description="The status of the web search tool call.\n"), "action": _b.union(WebSearchActionSearch, WebSearchActionOpenPage, WebSearchActionFind, mode="one_of").annotate(description="An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find_in_page).\n")}, optional=("action",)).annotate(title="Web search tool call", description="The results of a web search tool call. See the\n[web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information.\n"), _b.struct(_T.InputItem__1__6, {"id": _S.String.annotate(description="The unique ID of the function tool call.\n"), "type": _b.literal("function_call").annotate(description="The type of the function tool call. Always `function_call`.\n"), "call_id": _S.String.annotate(description="The unique ID of the function tool call generated by the model.\n"), "caller": _b.union(ToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the function to run.\n"), "name": _S.String.annotate(description="The name of the function to run.\n"), "arguments": _S.String.annotate(description="A JSON string of the arguments to pass to the function.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "async": _S.Boolean.annotate(description="Whether the function tool call runs asynchronously.\n")}, optional=("id", "caller", "namespace", "status", "async",)).annotate(title="Function tool call", description="A tool call to run a function. See the\n[function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information.\n"), _b.struct(_T.InputItem__1__7, {"id": _b.union(_S.String.annotate(description="The unique ID of the function tool call output. Populated when this item is returned via API."), _S.Null), "call_id": _b.union(_b.check(_b.check(_S.String.annotate(description="The unique ID of the function tool call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _S.Null), "type": _b.literal("function_call_output").annotate(description="The type of the function tool call output. Always `function_call_output`."), "output": _b.union(_b.check(_S.String.annotate(description="A JSON string of the output of the function tool call."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _b.array(_b.union(InputTextContentParam, InputImageContentParamAutoParam, InputFileContentParam, mode="one_of").annotate(description="A piece of message content, such as text, an image, or a file.")).annotate(description="An array of content outputs (text, image, file) for the function tool call."), mode="one_of").annotate(description="Text, image, or file output of the function tool call."), "name": _b.union(_b.check(_b.check(_S.String.annotate(description="The name of the tool that produced the output."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _S.Null), "namespace": _b.union(_b.check(_b.check(_b.check(_S.String.annotate(description="The namespace of the tool that produced the output."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _b.js_pattern('^[a-zA-Z0-9_-]+\\Z', '^[a-zA-Z0-9_-]+$').annotate(expected="a string matching the RegExp ^[a-zA-Z0-9_-]+$")), _S.Null), "caller": _b.union(_b.suspend(lambda: ToolCallCallerParam).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.union(_b.suspend(lambda: FunctionCallItemStatus).annotate(description="The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API."), _S.Null)}, optional=("id", "call_id", "name", "namespace", "caller", "status",)).annotate(title="Function tool call output", description="The output of a function tool call."), _b.struct(_T.InputItem__1__8, {"id": _b.union(_S.String.annotate(description="The unique ID of this tool search call."), _S.Null), "call_id": _b.union(_b.check(_b.check(_S.String.annotate(description="The unique ID of the tool search call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _S.Null), "type": _b.literal("tool_search_call").annotate(description="The item type. Always `tool_search_call`."), "execution": _b.suspend(lambda: ToolSearchExecutionType).annotate(description="Whether tool search was executed by the server or by the client."), "arguments": _b.suspend(lambda: EmptyModelParam).annotate(description="The arguments supplied to the tool search call."), "status": _b.union(_b.suspend(lambda: FunctionCallItemStatus).annotate(description="The status of the tool search call."), _S.Null)}, optional=("id", "call_id", "execution", "status",)), _b.struct(_T.InputItem__1__9, {"id": _b.union(_S.String.annotate(description="The unique ID of this tool search output."), _S.Null), "call_id": _b.union(_b.check(_b.check(_S.String.annotate(description="The unique ID of the tool search call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _S.Null), "type": _b.literal("tool_search_output").annotate(description="The item type. Always `tool_search_output`."), "execution": _b.suspend(lambda: ToolSearchExecutionType).annotate(description="Whether tool search was executed by the server or by the client."), "tools": _b.array(ToolSearchOutputTool).annotate(description="The loaded tool definitions returned by the tool search output."), "status": _b.union(_b.suspend(lambda: FunctionCallItemStatus).annotate(description="The status of the tool search output."), _S.Null)}, optional=("id", "call_id", "execution", "status",)), _b.struct(_T.InputItem__1__10, {"id": _b.union(_S.String.annotate(description="The unique ID of this additional tools item."), _S.Null), "type": _b.literal("additional_tools").annotate(description="The item type. Always `additional_tools`."), "role": _b.literal("developer").annotate(description="The role that provided the additional tools. Only `developer` is supported."), "tools": _b.array(Tool).annotate(description="A list of additional tools made available at this item.")}, optional=("id",)), _b.struct(_T.InputItem__1__11, {"id": _b.union(_S.String.annotate(description="The unique ID of the configuration update item."), _S.Null), "type": _b.literal("configuration_update").annotate(description="The item type. Always `configuration_update`."), "reasoning": _b.struct(_T.InputItem__1__11__reasoning, {"effort": _b.suspend(lambda: ReasoningEffort).annotate(description="The reasoning effort to use for subsequent responses until another\nconfiguration update replaces it.\n")}, optional=("effort",)).annotate(description="Updates to reasoning configuration. Only effort is supported.")}, optional=("id", "reasoning",)).annotate(description="An update to the conversation's response configuration. The configuration\nremains in effect for subsequent responses until it is replaced by another\nconfiguration update.\n"), _b.struct(_T.InputItem__1__12, {"type": _b.literal("reasoning").annotate(description="The type of the object. Always `reasoning`.\n"), "id": _S.String.annotate(description="The unique identifier of the reasoning content.\n"), "encrypted_content": _b.union(_S.String.annotate(description="The encrypted content of the reasoning item. This is populated by default\nfor reasoning items returned by `POST /v1/responses` and WebSocket\n`response.create` requests.\n\nWhen streaming, use the completed reasoning item and its\n`encrypted_content` from the `response.output_item.done` event in\nsubsequent requests. The `encrypted_content` in\n`response.output_item.added` may be incomplete. This is especially\nimportant when `store` is `false` or when using Zero Data Retention.\n"), _S.Null), "summary": _b.array(SummaryTextContent).annotate(description="Reasoning summary content.\n"), "content": _b.array(ReasoningTextContent).annotate(description="Reasoning text content.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n")}, optional=("encrypted_content", "content", "status",)).annotate(title="Reasoning", description="A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](https://developers.openai.com/api/docs/guides/conversation-state).\n"), _b.struct(_T.InputItem__1__13, {"id": _b.union(_S.String.annotate(description="The ID of the compaction item."), _S.Null), "type": _b.literal("compaction").annotate(description="The type of the item. Always `compaction`."), "encrypted_content": _b.check(_S.String.annotate(description="The encrypted content of the compaction summary."), _S.is_max_code_points(104857600).annotate(expected="a string with at most 104857600 code points"))}, optional=("id",)).annotate(title="Compaction item", description="A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact)."), _b.struct(_T.InputItem__1__14, {"type": _b.literal("image_generation_call").annotate(description="The type of the image generation call. Always `image_generation_call`."), "id": _S.String.annotate(description="The unique ID of the image generation call."), "status": _b.literals(["in_progress", "completed", "generating", "failed"]).annotate(description="The status of the image generation call."), "result": _b.union(_S.String.annotate(description="The generated image encoded in base64."), _S.Null), "size": _b.union(_b.union(_S.String, _b.literals(["1024x1024", "1024x1536", "1536x1024"])).annotate(description="The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`."), _S.Null), "quality": _b.union(_b.literals(["low", "medium", "high", "xhigh", "max", "auto"]).annotate(description="The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`."), _S.Null), "action": _b.union(_b.suspend(lambda: ImageGenActionEnum).annotate(description="The action used for image generation."), _S.Null), "background": _b.union(_b.suspend(lambda: ImageBackground).annotate(description="The background setting used for generation."), _S.Null), "output_format": _b.union(_b.suspend(lambda: ImageOutputFormat).annotate(description="The output format used for generation."), _S.Null), "revised_prompt": _b.union(_S.String.annotate(description="The prompt that was used after any model prompt rewriting."), _S.Null)}, optional=("size", "quality", "action", "background", "output_format", "revised_prompt",)).annotate(title="Image generation call", description="An image generation request made by the model."), _b.struct(_T.InputItem__1__15, {"type": _b.literal("code_interpreter_call").annotate(description="The type of the code interpreter tool call. Always `code_interpreter_call`.\n"), "id": _S.String.annotate(description="The unique ID of the code interpreter tool call.\n"), "status": _b.literals(["in_progress", "completed", "incomplete", "interpreting", "failed"]).annotate(description="The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"), "container_id": _S.String.annotate(description="The ID of the container used to run the code.\n"), "code": _b.union(_S.String.annotate(description="The code to run, or null if not available.\n"), _S.Null), "outputs": _b.union(_b.array(_b.union(CodeInterpreterOutputLogs, CodeInterpreterOutputImage, mode="one_of")).annotate(description="The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n"), _S.Null)}).annotate(title="Code interpreter tool call", description="A tool call to run code.\n"), _b.struct(_T.InputItem__1__16, {"type": _b.literal("local_shell_call").annotate(description="The type of the local shell call. Always `local_shell_call`.\n"), "id": _S.String.annotate(description="The unique ID of the local shell call.\n"), "call_id": _S.String.annotate(description="The unique ID of the local shell tool call generated by the model.\n"), "action": LocalShellExecAction, "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the local shell call.\n")}).annotate(title="Local shell call", description="A tool call to run a command on the local shell.\n"), _b.struct(_T.InputItem__1__17, {"type": _b.literal("local_shell_call_output").annotate(description="The type of the local shell tool call output. Always `local_shell_call_output`.\n"), "id": _S.String.annotate(description="The unique ID of the local shell tool call generated by the model.\n"), "output": _S.String.annotate(description="A JSON string of the output of the local shell tool call.\n"), "status": _b.union(_b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n"), _S.Null), "call_id": _S.Json.annotate(expected="JSON value")}, optional=("status",)).annotate(title="Local shell call output", description="The output of a local shell tool call.\n"), _b.struct(_T.InputItem__1__18, {"id": _b.union(_S.String.annotate(description="The unique ID of the shell tool call. Populated when this item is returned via API."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The unique ID of the shell tool call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "caller": _b.union(_b.suspend(lambda: ToolCallCallerParam).annotate(description="The execution context that produced this tool call."), _S.Null), "type": _b.literal("shell_call").annotate(description="The type of the item. Always `shell_call`."), "action": _b.suspend(lambda: FunctionShellActionParam).annotate(description="The shell commands and limits that describe how to run the tool call."), "status": _b.union(_b.suspend(lambda: FunctionShellCallItemStatus).annotate(description="The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."), _S.Null), "environment": _b.union(_b.union(LocalEnvironmentParam, ContainerReferenceParam, mode="one_of").annotate(description="The environment to execute the shell commands in."), _S.Null)}, optional=("id", "caller", "status", "environment",)).annotate(title="Shell tool call", description="A tool representing a request to execute one or more shell commands."), _b.struct(_T.InputItem__1__19, {"id": _b.union(_S.String.annotate(description="The unique ID of the shell tool call output. Populated when this item is returned via API."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The unique ID of the shell tool call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "caller": _b.union(_b.suspend(lambda: ToolCallCallerParam).annotate(description="The execution context that produced this tool call."), _S.Null), "type": _b.literal("shell_call_output").annotate(description="The type of the item. Always `shell_call_output`."), "output": _b.array(FunctionShellCallOutputContentParam).annotate(description="Captured chunks of stdout and stderr output, along with their associated outcomes."), "status": _b.union(_b.suspend(lambda: FunctionShellCallItemStatus).annotate(description="The status of the shell call output."), _S.Null), "max_output_length": _b.union(_b.check(_S.Number.annotate(description="The maximum number of UTF-8 characters captured for this shell call's combined output."), _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("id", "caller", "status", "max_output_length",)).annotate(title="Shell tool call output", description="The streamed output items emitted by a shell tool call."), _b.struct(_T.InputItem__1__20, {"type": _b.literal("apply_patch_call").annotate(description="The type of the item. Always `apply_patch_call`."), "id": _b.union(_S.String.annotate(description="The unique ID of the apply patch tool call. Populated when this item is returned via API."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The unique ID of the apply patch tool call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "caller": _b.union(_b.suspend(lambda: ToolCallCallerParam).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.suspend(lambda: ApplyPatchCallStatusParam).annotate(description="The status of the apply patch tool call. One of `in_progress` or `completed`."), "operation": _b.suspend(lambda: ApplyPatchOperationParam).annotate(description="The specific create, delete, or update instruction for the apply_patch tool call.")}, optional=("id", "caller",)).annotate(title="Apply patch tool call", description="A tool call representing a request to create, delete, or update files using diff patches."), _b.struct(_T.InputItem__1__21, {"type": _b.literal("apply_patch_call_output").annotate(description="The type of the item. Always `apply_patch_call_output`."), "id": _b.union(_S.String.annotate(description="The unique ID of the apply patch tool call output. Populated when this item is returned via API."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The unique ID of the apply patch tool call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "caller": _b.union(_b.suspend(lambda: ToolCallCallerParam).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.suspend(lambda: ApplyPatchCallOutputStatusParam).annotate(description="The status of the apply patch tool call output. One of `completed` or `failed`."), "output": _b.union(_b.check(_S.String.annotate(description="Optional human-readable log text from the apply patch tool (e.g., patch results or errors)."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _S.Null)}, optional=("id", "caller", "output",)).annotate(title="Apply patch tool call output", description="The streamed output emitted by an apply patch tool call."), _b.struct(_T.InputItem__1__22, {"type": _b.literal("mcp_list_tools").annotate(description="The type of the item. Always `mcp_list_tools`.\n"), "id": _S.String.annotate(description="The unique ID of the list.\n"), "server_label": _S.String.annotate(description="The label of the MCP server.\n"), "tools": _b.array(MCPListToolsTool).annotate(description="The tools available on the server.\n"), "error": _b.union(_S.String.annotate(description="Error message if the server could not list tools.\n"), _S.Null)}, optional=("error",)).annotate(title="MCP list tools", description="A list of tools available on an MCP server.\n"), _b.struct(_T.InputItem__1__23, {"type": _b.literal("mcp_approval_request").annotate(description="The type of the item. Always `mcp_approval_request`.\n"), "id": _S.String.annotate(description="The unique ID of the approval request.\n"), "server_label": _S.String.annotate(description="The label of the MCP server making the request.\n"), "name": _S.String.annotate(description="The name of the tool to run.\n"), "arguments": _S.String.annotate(description="A JSON string of arguments for the tool.\n")}).annotate(title="MCP approval request", description="A request for human approval of a tool invocation.\n"), _b.struct(_T.InputItem__1__24, {"type": _b.literal("mcp_approval_response").annotate(description="The type of the item. Always `mcp_approval_response`.\n"), "id": _b.union(_S.String.annotate(description="The unique ID of the approval response\n"), _S.Null), "approval_request_id": _S.String.annotate(description="The ID of the approval request being answered.\n"), "approve": _S.Boolean.annotate(description="Whether the request was approved.\n"), "reason": _b.union(_S.String.annotate(description="Optional reason for the decision.\n"), _S.Null), "request_id": _S.Json.annotate(expected="JSON value")}, optional=("id", "reason",)).annotate(title="MCP approval response", description="A response to an MCP approval request.\n"), _b.struct(_T.InputItem__1__25, {"type": _b.literal("mcp_call").annotate(description="The type of the item. Always `mcp_call`.\n"), "id": _S.String.annotate(description="The unique ID of the tool call.\n"), "server_label": _S.String.annotate(description="The label of the MCP server running the tool.\n"), "name": _S.String.annotate(description="The name of the tool that was run.\n"), "arguments": _S.String.annotate(description="A JSON string of the arguments passed to the tool.\n"), "output": _b.union(_S.String.annotate(description="The output from the tool call.\n"), _S.Null), "error": _b.union(MCPToolCallError, _S.Null).annotate(description="The error from the tool call, if any."), "status": _b.suspend(lambda: MCPToolCallStatus).annotate(description="The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"), "approval_request_id": _b.union(_S.String.annotate(description="Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n"), _S.Null)}, optional=("output", "error", "status", "approval_request_id",)).annotate(title="MCP tool call", description="An invocation of a tool on an MCP server.\n"), _b.struct(_T.InputItem__1__26, {"type": _b.literal("custom_tool_call_output").annotate(description="The type of the custom tool call output. Always `custom_tool_call_output`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call output in the OpenAI platform.\n"), "call_id": _S.String.annotate(description="The call ID, used to map this custom tool call output to a custom tool call.\n"), "caller": _b.union(ToolCallCallerParam, _S.Null), "output": _b.union(_S.String.annotate(title="string output", description="A string of the output of the custom tool call.\n"), _b.array(FunctionAndCustomToolCallOutput).annotate(title="output content list", description="Text, image, or file output of the custom tool call.\n"), mode="one_of").annotate(description="The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n")}, optional=("id", "caller",)).annotate(title="Custom tool call output", description="The output of a custom tool call from your code, being sent back to the model.\n"), _b.struct(_T.InputItem__1__27, {"type": _b.literal("custom_tool_call").annotate(description="The type of the custom tool call. Always `custom_tool_call`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call in the OpenAI platform.\n"), "call_id": _S.String.annotate(description="An identifier used to map this custom tool call to a tool call output.\n"), "caller": _b.union(ToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the custom tool being called.\n"), "name": _S.String.annotate(description="The name of the custom tool being called.\n"), "input": _S.String.annotate(description="The input for the custom tool call generated by the model.\n"), "async": _S.Boolean.annotate(description="Whether the custom tool call runs asynchronously.\n")}, optional=("id", "caller", "namespace", "async",)).annotate(title="Custom tool call", description="A call to a custom tool created by the model.\n"), mode="one_of").annotate(description="An item representing part of the context for the response to be\ngenerated by the model. Can contain text, images, and audio inputs,\nas well as previous assistant responses and tool call outputs.\n", title="Item"), CompactionTriggerItemParam, ItemReferenceParam, ProgramItemParam, ProgramOutputItemParam, mode="one_of").annotate(identifier="InputItem")
|
|
623
|
+
LiveResponsesDelegationParam: _StructSchema[_T.LiveResponsesDelegationParam, _t.Never, _t.Never] = _b.struct(_T.LiveResponsesDelegationParam, {"type": _b.literal("responses").annotate(description="The delegation owner. Always `responses` for tasks handled by the Responses API."), "responses": _b.suspend(lambda: LiveResponsesDelegationSettingsInputParam).annotate(description="Backend model, prompt, and tools used when the Live session delegates a task to Responses.")}).annotate(description="Delegate tasks to a Responses model managed by the Live session.", identifier="LiveResponsesDelegationParam")
|
|
624
|
+
LiveResponsesDelegationUpdateParam: _StructSchema[_T.LiveResponsesDelegationUpdateParam, _t.Never, _t.Never] = _b.struct(_T.LiveResponsesDelegationUpdateParam, {"type": _b.literal("responses").annotate(description="The delegation owner. Always `responses` for tasks handled by the Responses API."), "responses": _b.suspend(lambda: LiveResponsesDelegationSettingsUpdateInputParam).annotate(description="Responses backend settings to update. Omitted settings keep their existing values.")}, optional=("responses",)).annotate(description="Update the Responses backend for an existing Live session without changing delegation ownership.", identifier="LiveResponsesDelegationUpdateParam")
|
|
625
|
+
ThreadItemListResource: _StructSchema[_T.ThreadItemListResource, _t.Never, _t.Never] = _b.struct(_T.ThreadItemListResource, {"object": _b.literal("list").annotate(description="The type of object returned, must be `list`."), "data": _b.array(ThreadItem).annotate(description="A list of items"), "first_id": _b.union(_S.String.annotate(description="The ID of the first item in the list."), _S.Null), "last_id": _b.union(_S.String.annotate(description="The ID of the last item in the list."), _S.Null), "has_more": _S.Boolean.annotate(description="Whether there are more items available.")}).annotate(title="Thread Items", description="A paginated list of thread items rendered for the ChatKit API.", identifier="ThreadItemListResource")
|
|
626
|
+
DecisionInput: _S.Bottom[_T.DecisionInput, _t.Any] = _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _b.check(_b.check(_b.array(_b.union(DecisionInputMessage, mode="one_of")), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(131072).annotate(expected="a value with a length of at most 131072")), mode="one_of").annotate(description="The text or images to evaluate for every question. Provide a text string or user messages containing text and images. Images can be base64 data URLs or publicly accessible HTTP(S) URLs; at most 128 images are allowed across all messages in one request. Files, audio, tools, and item references are not supported.", identifier="DecisionInput")
|
|
627
|
+
CreateEnvironmentParam: _S.Bottom[_T.CreateEnvironmentParam, _t.Any] = _b.union(CreateEnvironmentParamOpenaiHosted, mode="one_of").annotate(description="Configuration for a new prewarmed OpenAI-hosted environment.", identifier="CreateEnvironmentParam")
|
|
628
|
+
EnvironmentParam: _S.Bottom[_T.EnvironmentParam, _t.Any] = _b.union(EnvironmentParamNone, EnvironmentParamOpenaiHosted, EnvironmentParamSelfHosted, mode="one_of").annotate(description="The execution environment and optional reusable template for a session.", identifier="EnvironmentParam")
|
|
629
|
+
SessionItemListResource: _StructSchema[_T.SessionItemListResource, _t.Never, _t.Never] = _b.struct(_T.SessionItemListResource, {"object": _b.literal("list").annotate(description="The object type, which is always `list`."), "data": _b.check(_b.check(_b.array(SessionTurnItemResource).annotate(description="The resources returned in this page, in the requested sort order."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "first_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the first resource in `data`, or `null` if the page is empty."), "last_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters."), "has_more": _S.Boolean.annotate(description="Whether there are more resources to retrieve after this page.")}).annotate(description="A page of messages, reasoning, and tool calls from a session's item history.", identifier="SessionItemListResource")
|
|
630
|
+
SessionEventAgentSessionTurnItemAdded: _StructSchema[_T.SessionEventAgentSessionTurnItemAdded, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnItemAdded, {"type": _b.literal("agent.session.turn.item.added").annotate(description="The type of the object. Always `agent.session.turn.item.added`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "output_index": _b.union(_b.check(_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.is_less_than_or_equal_to(4294967295).annotate(expected="a value less than or equal to 4294967295")), _S.Null).annotate(description="The index of the item in the turn output, when the item is agent output.", format="int64"), "item": _b.suspend(lambda: SessionTurnItemResource).annotate(description="The item that was added.")}).annotate(description="Emitted when an item is added to a turn.", identifier="SessionEventAgentSessionTurnItemAdded")
|
|
631
|
+
SessionEventAgentSessionTurnItemDone: _StructSchema[_T.SessionEventAgentSessionTurnItemDone, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnItemDone, {"type": _b.literal("agent.session.turn.item.done").annotate(description="The type of the object. Always `agent.session.turn.item.done`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session_id": _b.check(_S.String.annotate(description="The ID of the session associated with the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "turn_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the turn associated with the event, when applicable."), "output_index": _b.check(_b.check(_b.check(_S.Number.annotate(description="The index of the output item in the turn output.", format="int64"), _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(4294967295).annotate(expected="a value less than or equal to 4294967295")), "item": _b.suspend(lambda: AgentOutputItemResource).annotate(description="The completed output item.")}).annotate(description="Emitted when an output item is complete.", identifier="SessionEventAgentSessionTurnItemDone")
|
|
632
|
+
AgentListResource: _StructSchema[_T.AgentListResource, _t.Never, _t.Never] = _b.struct(_T.AgentListResource, {"object": _b.literal("list").annotate(description="The object type, which is always `list`."), "data": _b.check(_b.check(_b.array(AgentResource).annotate(description="The resources returned in this page, in the requested sort order."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "first_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the first resource in `data`, or `null` if the page is empty."), "last_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters."), "has_more": _S.Boolean.annotate(description="Whether there are more resources to retrieve after this page.")}).annotate(description="A page of Agents API resources, with IDs for retrieving additional pages.", identifier="AgentListResource")
|
|
633
|
+
SessionResource: _StructSchema[_T.SessionResource, _t.Never, _t.Never] = _b.struct(_T.SessionResource, {"spend_control": _b.suspend(lambda: SessionSpendControlResource).annotate(description="Configured spending limit and best-effort consumption, in USD cents. Unlimited sessions omit this object."), "metadata": _b.check(_b.check(_b.record(_S.String, _b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(description="Custom string key-value pairs attached to the session."), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_property_names(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(expected="an object with property names matching the schema")), "id": _b.check(_S.String.annotate(description="The ID of the session."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("agent.session").annotate(description="The object type. Always `agent.session`."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the session was created.", format="int64"), _S.is_int().annotate(expected="an integer")), "last_active_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the session was last active.", format="int64"), _S.is_int().annotate(expected="an integer")), "status": _b.suspend(lambda: SessionStatusResource).annotate(description="The current status of the session."), "required_actions": _b.check(_b.check(_b.array(SessionRequiredActionResource).annotate(description="Actions that must be completed before the session can continue."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "error": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The error that caused the session to fail, if any."), "agent": _b.suspend(lambda: SessionAgentResource).annotate(description="The agent running in the session."), "environment": _b.suspend(lambda: EnvironmentResource).annotate(description="The execution environment for the session."), "vault_ids": _b.check(_b.check(_b.array(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(description="The IDs of vaults made available to the session."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "usage": _b.union(TokenUsageResource, _S.Null).annotate(description="Best-effort token usage for the session, or null if unknown. Recorded usage may change.")}, optional=("spend_control",)).annotate(description="A Managed Agents session.", identifier="SessionResource")
|
|
634
|
+
CreateSessionEventsParams: _StructSchema[_T.CreateSessionEventsParams, _t.Never, _t.Never] = _b.struct(_T.CreateSessionEventsParams, {"events": _b.check(_b.check(_b.array(SessionInputParam).annotate(description="The input events to submit to the session."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384"))}).annotate(description="Input events submitted to an existing session.", identifier="CreateSessionEventsParams")
|
|
635
|
+
VaultCredentialResource: _StructSchema[_T.VaultCredentialResource, _t.Never, _t.Never] = _b.struct(_T.VaultCredentialResource, {"id": _b.check(_S.String.annotate(description="The ID of the credential."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("vault.credential").annotate(description="The object type. Always `vault.credential`."), "vault_id": _b.check(_S.String.annotate(description="The ID of the vault containing this credential."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "name": _b.check(_S.String.annotate(description="The human-readable name of the credential."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "auth": _b.suspend(lambda: VaultCredentialAuthResource).annotate(description="The authentication method and non-secret configuration of the credential."), "metadata": _b.check(_b.check(_b.record(_S.String, _b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(description="Application-defined key-value pairs associated with this credential."), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_property_names(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))).annotate(expected="an object with property names matching the schema")), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the credential was created.", format="int64"), _S.is_int().annotate(expected="an integer")), "updated_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the credential was last updated.", format="int64"), _S.is_int().annotate(expected="an integer"))}).annotate(description="Metadata for a stored credential. Secret values are never returned.", identifier="VaultCredentialResource")
|
|
636
|
+
CreateVaultCredentialParams: _StructSchema[_T.CreateVaultCredentialParams, _t.Never, _t.Never] = _b.struct(_T.CreateVaultCredentialParams, {"name": _b.check(_b.check(_S.String.annotate(description="The name is trimmed before storage. It must contain 1 to 256 UTF-8 bytes after trimming."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "auth": _b.suspend(lambda: CreateVaultCredentialAuthParam).annotate(description="The authentication method and write-only secret values to store."), "metadata": _b.check(_b.check(_b.check(_b.record(_S.String, _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points"))).annotate(description="Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. Defaults to an empty map."), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(16).annotate(expected="a value with at most 16 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points"))).annotate(expected="an object with property names matching the schema"))}, optional=("metadata",)).annotate(description="Parameters for storing a credential for an MCP server or an OpenAI-hosted environment.", identifier="CreateVaultCredentialParams")
|
|
637
|
+
RotateVaultCredentialParams: _StructSchema[_T.RotateVaultCredentialParams, _t.Never, _t.Never] = _b.check(_b.struct(_T.RotateVaultCredentialParams, {"auth": _b.suspend(lambda: RotateVaultCredentialAuthParam).annotate(description="Replacement values for the credential's existing authentication method."), "metadata": _b.check(_b.check(_b.check(_b.record(_S.String, _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points"))).annotate(description="Replaces all metadata. Omit to preserve it, or pass {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters."), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(16).annotate(expected="a value with at most 16 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points"))).annotate(expected="an object with property names matching the schema"))}, optional=("auth", "metadata",)).annotate(description="Metadata, secret, expiry, and OAuth refresh scope updates for an existing vault credential. Supply at least one of `auth` or `metadata`."), _S.is_min_properties(1).annotate(expected="a value with at least 1 entry", identifier="RotateVaultCredentialParams"))
|
|
638
|
+
BetaToolsArray: _S.Bottom[_T.BetaToolsArray, _t.Any] = _b.array(BetaTool).annotate(description="An array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter.\n\nWe support the following categories of tools:\n- **Built-in tools**: Tools that are provided by OpenAI that extend the\n model's capabilities, like [web search](https://developers.openai.com/api/docs/guides/tools-web-search)\n or [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about\n [built-in tools](https://developers.openai.com/api/docs/guides/tools).\n- **MCP Tools**: Integrations with third-party systems via custom MCP servers\n or predefined connectors such as Google Drive and SharePoint. Learn more about\n [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).\n- **Function calls (custom tools)**: Functions that are defined by you,\n enabling the model to call your own code with strongly typed arguments\n and outputs. Learn more about\n [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use\n custom tools to call your own code.\n", identifier="BetaToolsArray")
|
|
639
|
+
BetaToolSearchOutput: _StructSchema[_T.BetaToolSearchOutput, _t.Never, _t.Never] = _b.struct(_T.BetaToolSearchOutput, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("tool_search_output").annotate(description="The type of the item. Always `tool_search_output`."), "id": _S.String.annotate(description="The unique ID of the tool search output item."), "call_id": _b.union(_S.String.annotate(description="The unique ID of the tool search call generated by the model."), _S.Null), "execution": _b.suspend(lambda: BetaToolSearchExecutionType).annotate(description="Whether tool search was executed by the server or by the client."), "tools": _b.array(BetaTool).annotate(description="The loaded tool definitions returned by tool search."), "status": _b.suspend(lambda: BetaFunctionCallOutputStatusEnum).annotate(description="The status of the tool search output item that was recorded."), "created_by": _S.String.annotate(description="The identifier of the actor that created the item.")}, optional=("agent", "created_by",)).annotate(identifier="BetaToolSearchOutput")
|
|
640
|
+
BetaAdditionalTools: _StructSchema[_T.BetaAdditionalTools, _t.Never, _t.Never] = _b.struct(_T.BetaAdditionalTools, {"agent": _b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), "type": _b.literal("additional_tools").annotate(description="The type of the item. Always `additional_tools`."), "id": _S.String.annotate(description="The unique ID of the additional tools item."), "role": _b.suspend(lambda: BetaMessageRole).annotate(description="The role that provided the additional tools."), "tools": _b.array(BetaTool).annotate(description="The additional tool definitions made available at this item.")}, optional=("agent",)).annotate(identifier="BetaAdditionalTools")
|
|
641
|
+
BetaInputItem: _S.Bottom[_T.BetaInputItem, _t.Any] = _b.union(BetaEasyInputMessage, _b.union(_b.struct(_T.BetaInputItem__1__0, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("message").annotate(description="The type of the message input. Always set to `message`.\n"), "role": _b.literals(["user", "system", "developer"]).annotate(description="The role of the message input. One of `user`, `system`, or `developer`.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "content": BetaInputMessageContentList}, optional=("agent", "type", "status",)).annotate(title="Input message", description="A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n"), _b.struct(_T.BetaInputItem__1__1, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the output message.\n"), "type": _b.literal("message").annotate(description="The type of the output message. Always `message`.\n"), "role": _b.literal("assistant").annotate(description="The role of the output message. Always `assistant`.\n"), "content": _b.array(BetaOutputMessageContent).annotate(description="The content of the output message.\n"), "phase": _b.union(BetaMessagePhase, _S.Null), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n")}, optional=("agent", "phase",)).annotate(title="Output message", description="An output message from the model.\n"), _b.struct(_T.BetaInputItem__1__2, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the file search tool call.\n"), "type": _b.literal("file_search_call").annotate(description="The type of the file search tool call. Always `file_search_call`.\n"), "status": _b.literals(["in_progress", "searching", "completed", "incomplete", "failed"]).annotate(description="The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n"), "queries": _b.array(_S.String).annotate(description="The queries used to search for files.\n"), "results": _b.union(_b.array(_b.struct(_T.BetaInputItem__1__2__results__0__item, {"file_id": _S.String.annotate(description="The unique ID of the file.\n"), "text": _S.String.annotate(description="The text that was retrieved from the file.\n"), "filename": _S.String.annotate(description="The name of the file.\n"), "attributes": BetaVectorStoreFileAttributes, "score": _b.check(_S.Number.annotate(description="The relevance score of the file - a value between 0 and 1.\n", format="float"), _S.is_finite().annotate(expected="a finite number"))}, optional=("file_id", "text", "filename", "attributes", "score",))).annotate(description="The results of the file search tool call.\n"), _S.Null)}, optional=("agent", "results",)).annotate(title="File search tool call", description="The results of a file search tool call. See the\n[file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information.\n"), _b.struct(_T.BetaInputItem__1__3, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("computer_call").annotate(description="The type of the computer call. Always `computer_call`."), "id": _S.String.annotate(description="The unique ID of the computer call."), "call_id": _S.String.annotate(description="An identifier used when responding to the tool call with output.\n"), "action": BetaComputerAction, "actions": BetaComputerActionList, "pending_safety_checks": _b.array(BetaComputerCallSafetyCheckParam).annotate(description="The pending safety checks for the computer call.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n")}, optional=("agent", "action", "actions",)).annotate(title="Computer tool call", description="A tool call to a computer use tool. See the\n[computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information.\n"), _b.struct(_T.BetaInputItem__1__4, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The ID of the computer tool call output."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The ID of the computer tool call that produced the output."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "type": _b.literal("computer_call_output").annotate(description="The type of the computer tool call output. Always `computer_call_output`."), "output": BetaComputerScreenshotImage, "acknowledged_safety_checks": _b.union(_b.array(BetaComputerCallSafetyCheckParam).annotate(description="The safety checks reported by the API that have been acknowledged by the developer."), _S.Null), "status": _b.union(_b.suspend(lambda: BetaFunctionCallItemStatus).annotate(description="The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API."), _S.Null)}, optional=("agent", "id", "acknowledged_safety_checks", "status",)).annotate(title="Computer tool call output", description="The output of a computer tool call."), _b.struct(_T.BetaInputItem__1__5, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the web search tool call.\n"), "type": _b.literal("web_search_call").annotate(description="The type of the web search tool call. Always `web_search_call`.\n"), "status": _b.suspend(lambda: BetaWebSearchCallStatus).annotate(description="The status of the web search tool call.\n"), "action": _b.union(BetaWebSearchActionSearch, BetaWebSearchActionOpenPage, BetaWebSearchActionFind, mode="one_of").annotate(description="An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find_in_page).\n")}, optional=("agent", "action",)).annotate(title="Web search tool call", description="The results of a web search tool call. See the\n[web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information.\n"), _b.struct(_T.BetaInputItem__1__6, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "id": _S.String.annotate(description="The unique ID of the function tool call.\n"), "type": _b.literal("function_call").annotate(description="The type of the function tool call. Always `function_call`.\n"), "call_id": _S.String.annotate(description="The unique ID of the function tool call generated by the model.\n"), "caller": _b.union(BetaToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the function to run.\n"), "name": _S.String.annotate(description="The name of the function to run.\n"), "arguments": _S.String.annotate(description="A JSON string of the arguments to pass to the function.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n"), "async": _S.Boolean.annotate(description="Whether the function tool call runs asynchronously.\n")}, optional=("agent", "id", "caller", "namespace", "status", "async",)).annotate(title="Function tool call", description="A tool call to run a function. See the\n[function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information.\n"), _b.struct(_T.BetaInputItem__1__7, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of the function tool call output. Populated when this item is returned via API."), _S.Null), "call_id": _b.union(_b.check(_b.check(_S.String.annotate(description="The unique ID of the function tool call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _S.Null), "type": _b.literal("function_call_output").annotate(description="The type of the function tool call output. Always `function_call_output`."), "output": _b.union(_b.check(_S.String.annotate(description="A JSON string of the output of the function tool call."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _b.array(_b.union(BetaInputTextContentParam, BetaInputImageContentParamAutoParam, BetaInputFileContentParam, mode="one_of").annotate(description="A piece of message content, such as text, an image, or a file.")).annotate(description="An array of content outputs (text, image, file) for the function tool call."), mode="one_of").annotate(description="Text, image, or file output of the function tool call."), "name": _b.union(_b.check(_b.check(_S.String.annotate(description="The name of the tool that produced the output."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _S.Null), "namespace": _b.union(_b.check(_b.check(_b.check(_S.String.annotate(description="The namespace of the tool that produced the output."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _b.js_pattern('^[a-zA-Z0-9_-]+\\Z', '^[a-zA-Z0-9_-]+$').annotate(expected="a string matching the RegExp ^[a-zA-Z0-9_-]+$")), _S.Null), "caller": _b.union(_b.suspend(lambda: BetaToolCallCallerParam).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.union(_b.suspend(lambda: BetaFunctionCallItemStatus).annotate(description="The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API."), _S.Null)}, optional=("agent", "id", "call_id", "name", "namespace", "caller", "status",)).annotate(title="Function tool call output", description="The output of a function tool call."), _b.struct(_T.BetaInputItem__1__8, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of this agent message item."), _S.Null), "type": _b.literal("agent_message").annotate(description="The item type. Always `agent_message`."), "author": _S.String.annotate(description="The sending agent identity."), "recipient": _S.String.annotate(description="The destination agent identity."), "content": _b.array(_b.union(BetaInputTextContentParam, BetaInputImageContentParamAutoParam, BetaEncryptedContentParam, mode="one_of").annotate(description="A plaintext, image, or encrypted agent message content part.")).annotate(description="Plaintext, image, or encrypted content sent between agents.")}, optional=("agent", "id",)).annotate(title="Agent message", description="A message routed between agents."), _b.struct(_T.BetaInputItem__1__9, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of this multi-agent call."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The unique ID linking this call to its output."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "type": _b.literal("multi_agent_call").annotate(description="The item type. Always `multi_agent_call`."), "action": _b.suspend(lambda: BetaMultiAgentAction1).annotate(description="The multi-agent action that was executed."), "arguments": _S.String.annotate(description="The action arguments as a JSON string.")}, optional=("agent", "id",)), _b.struct(_T.BetaInputItem__1__10, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of this multi-agent call output."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The unique ID of the multi-agent call."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "type": _b.literal("multi_agent_call_output").annotate(description="The item type. Always `multi_agent_call_output`."), "action": _b.suspend(lambda: BetaMultiAgentAction1).annotate(description="The multi-agent action that produced this result."), "output": _b.array(BetaOutputTextContentParam).annotate(description="Text output returned by the multi-agent action.")}, optional=("agent", "id",)), _b.struct(_T.BetaInputItem__1__11, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of this tool search call."), _S.Null), "call_id": _b.union(_b.check(_b.check(_S.String.annotate(description="The unique ID of the tool search call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _S.Null), "type": _b.literal("tool_search_call").annotate(description="The item type. Always `tool_search_call`."), "execution": _b.suspend(lambda: BetaToolSearchExecutionType).annotate(description="Whether tool search was executed by the server or by the client."), "arguments": _b.suspend(lambda: BetaEmptyModelParam).annotate(description="The arguments supplied to the tool search call."), "status": _b.union(_b.suspend(lambda: BetaFunctionCallItemStatus).annotate(description="The status of the tool search call."), _S.Null)}, optional=("agent", "id", "call_id", "execution", "status",)), _b.struct(_T.BetaInputItem__1__12, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of this tool search output."), _S.Null), "call_id": _b.union(_b.check(_b.check(_S.String.annotate(description="The unique ID of the tool search call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _S.Null), "type": _b.literal("tool_search_output").annotate(description="The item type. Always `tool_search_output`."), "execution": _b.suspend(lambda: BetaToolSearchExecutionType).annotate(description="Whether tool search was executed by the server or by the client."), "tools": _b.array(BetaToolSearchOutputTool).annotate(description="The loaded tool definitions returned by the tool search output."), "status": _b.union(_b.suspend(lambda: BetaFunctionCallItemStatus).annotate(description="The status of the tool search output."), _S.Null)}, optional=("agent", "id", "call_id", "execution", "status",)), _b.struct(_T.BetaInputItem__1__13, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of this additional tools item."), _S.Null), "type": _b.literal("additional_tools").annotate(description="The item type. Always `additional_tools`."), "role": _b.literal("developer").annotate(description="The role that provided the additional tools. Only `developer` is supported."), "tools": _b.array(BetaTool).annotate(description="A list of additional tools made available at this item.")}, optional=("agent", "id",)), _b.struct(_T.BetaInputItem__1__14, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of the configuration update item."), _S.Null), "type": _b.literal("configuration_update").annotate(description="The item type. Always `configuration_update`."), "reasoning": _b.struct(_T.BetaInputItem__1__14__reasoning, {"effort": _b.suspend(lambda: BetaReasoningEffort).annotate(description="The reasoning effort to use for subsequent responses until another\nconfiguration update replaces it.\n")}, optional=("effort",)).annotate(description="Updates to reasoning configuration. Only effort is supported.")}, optional=("agent", "id", "reasoning",)).annotate(description="An update to the conversation's response configuration. The configuration\nremains in effect for subsequent responses until it is replaced by another\nconfiguration update.\n"), _b.struct(_T.BetaInputItem__1__15, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("reasoning").annotate(description="The type of the object. Always `reasoning`.\n"), "id": _S.String.annotate(description="The unique identifier of the reasoning content.\n"), "encrypted_content": _b.union(_S.String.annotate(description="The encrypted content of the reasoning item. This is populated by default\nfor reasoning items returned by `POST /v1/responses` and WebSocket\n`response.create` requests.\n\nWhen streaming, use the completed reasoning item and its\n`encrypted_content` from the `response.output_item.done` event in\nsubsequent requests. The `encrypted_content` in\n`response.output_item.added` may be incomplete. This is especially\nimportant when `store` is `false` or when using Zero Data Retention.\n"), _S.Null), "summary": _b.array(BetaSummaryTextContent).annotate(description="Reasoning summary content.\n"), "content": _b.array(BetaReasoningTextContent).annotate(description="Reasoning text content.\n"), "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n")}, optional=("agent", "encrypted_content", "content", "status",)).annotate(title="Reasoning", description="A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](https://developers.openai.com/api/docs/guides/conversation-state).\n"), _b.struct(_T.BetaInputItem__1__16, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The ID of the compaction item."), _S.Null), "type": _b.literal("compaction").annotate(description="The type of the item. Always `compaction`."), "encrypted_content": _b.check(_S.String.annotate(description="The encrypted content of the compaction summary."), _S.is_max_code_points(104857600).annotate(expected="a string with at most 104857600 code points"))}, optional=("agent", "id",)).annotate(title="Compaction item", description="A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact)."), _b.struct(_T.BetaInputItem__1__17, {"agent": _b.union(_b.suspend(lambda: BetaAgentTag).annotate(description="The agent that produced this item."), _S.Null), "type": _b.literal("image_generation_call").annotate(description="The type of the image generation call. Always `image_generation_call`."), "id": _S.String.annotate(description="The unique ID of the image generation call."), "status": _b.literals(["in_progress", "completed", "generating", "failed"]).annotate(description="The status of the image generation call."), "result": _b.union(_S.String.annotate(description="The generated image encoded in base64."), _S.Null), "size": _b.union(_b.union(_S.String, _b.literals(["1024x1024", "1024x1536", "1536x1024"])).annotate(description="The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`."), _S.Null), "quality": _b.union(_b.literals(["low", "medium", "high", "xhigh", "max", "auto"]).annotate(description="The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`."), _S.Null), "action": _b.union(_b.suspend(lambda: BetaImageGenActionEnum).annotate(description="The action used for image generation."), _S.Null), "background": _b.union(_b.suspend(lambda: BetaImageBackground).annotate(description="The background setting used for generation."), _S.Null), "output_format": _b.union(_b.suspend(lambda: BetaImageOutputFormat).annotate(description="The output format used for generation."), _S.Null), "revised_prompt": _b.union(_S.String.annotate(description="The prompt that was used after any model prompt rewriting."), _S.Null)}, optional=("agent", "size", "quality", "action", "background", "output_format", "revised_prompt",)).annotate(title="Image generation call", description="An image generation request made by the model."), _b.struct(_T.BetaInputItem__1__18, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("code_interpreter_call").annotate(description="The type of the code interpreter tool call. Always `code_interpreter_call`.\n"), "id": _S.String.annotate(description="The unique ID of the code interpreter tool call.\n"), "status": _b.literals(["in_progress", "completed", "incomplete", "interpreting", "failed"]).annotate(description="The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"), "container_id": _S.String.annotate(description="The ID of the container used to run the code.\n"), "code": _b.union(_S.String.annotate(description="The code to run, or null if not available.\n"), _S.Null), "outputs": _b.union(_b.array(_b.union(BetaCodeInterpreterOutputLogs, BetaCodeInterpreterOutputImage, mode="one_of")).annotate(description="The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n"), _S.Null)}, optional=("agent",)).annotate(title="Code interpreter tool call", description="A tool call to run code.\n"), _b.struct(_T.BetaInputItem__1__19, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("local_shell_call").annotate(description="The type of the local shell call. Always `local_shell_call`.\n"), "id": _S.String.annotate(description="The unique ID of the local shell call.\n"), "call_id": _S.String.annotate(description="The unique ID of the local shell tool call generated by the model.\n"), "action": BetaLocalShellExecAction, "status": _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the local shell call.\n")}, optional=("agent",)).annotate(title="Local shell call", description="A tool call to run a command on the local shell.\n"), _b.struct(_T.BetaInputItem__1__20, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("local_shell_call_output").annotate(description="The type of the local shell tool call output. Always `local_shell_call_output`.\n"), "id": _S.String.annotate(description="The unique ID of the local shell tool call generated by the model.\n"), "output": _S.String.annotate(description="A JSON string of the output of the local shell tool call.\n"), "status": _b.union(_b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n"), _S.Null), "call_id": _S.Json.annotate(expected="JSON value")}, optional=("agent", "status",)).annotate(title="Local shell call output", description="The output of a local shell tool call.\n"), _b.struct(_T.BetaInputItem__1__21, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of the shell tool call. Populated when this item is returned via API."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The unique ID of the shell tool call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "caller": _b.union(_b.suspend(lambda: BetaToolCallCallerParam).annotate(description="The execution context that produced this tool call."), _S.Null), "type": _b.literal("shell_call").annotate(description="The type of the item. Always `shell_call`."), "action": _b.suspend(lambda: BetaFunctionShellActionParam).annotate(description="The shell commands and limits that describe how to run the tool call."), "status": _b.union(_b.suspend(lambda: BetaFunctionShellCallItemStatus).annotate(description="The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."), _S.Null), "environment": _b.union(_b.union(BetaLocalEnvironmentParam, BetaContainerReferenceParam, mode="one_of").annotate(description="The environment to execute the shell commands in."), _S.Null)}, optional=("agent", "id", "caller", "status", "environment",)).annotate(title="Shell tool call", description="A tool representing a request to execute one or more shell commands."), _b.struct(_T.BetaInputItem__1__22, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "id": _b.union(_S.String.annotate(description="The unique ID of the shell tool call output. Populated when this item is returned via API."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The unique ID of the shell tool call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "caller": _b.union(_b.suspend(lambda: BetaToolCallCallerParam).annotate(description="The execution context that produced this tool call."), _S.Null), "type": _b.literal("shell_call_output").annotate(description="The type of the item. Always `shell_call_output`."), "output": _b.array(BetaFunctionShellCallOutputContentParam).annotate(description="Captured chunks of stdout and stderr output, along with their associated outcomes."), "status": _b.union(_b.suspend(lambda: BetaFunctionShellCallItemStatus).annotate(description="The status of the shell call output."), _S.Null), "max_output_length": _b.union(_b.check(_S.Number.annotate(description="The maximum number of UTF-8 characters captured for this shell call's combined output."), _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("agent", "id", "caller", "status", "max_output_length",)).annotate(title="Shell tool call output", description="The streamed output items emitted by a shell tool call."), _b.struct(_T.BetaInputItem__1__23, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "type": _b.literal("apply_patch_call").annotate(description="The type of the item. Always `apply_patch_call`."), "id": _b.union(_S.String.annotate(description="The unique ID of the apply patch tool call. Populated when this item is returned via API."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The unique ID of the apply patch tool call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "caller": _b.union(_b.suspend(lambda: BetaToolCallCallerParam).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.suspend(lambda: BetaApplyPatchCallStatusParam).annotate(description="The status of the apply patch tool call. One of `in_progress` or `completed`."), "operation": _b.suspend(lambda: BetaApplyPatchOperationParam).annotate(description="The specific create, delete, or update instruction for the apply_patch tool call.")}, optional=("agent", "id", "caller",)).annotate(title="Apply patch tool call", description="A tool call representing a request to create, delete, or update files using diff patches."), _b.struct(_T.BetaInputItem__1__24, {"agent": _b.union(_b.suspend(lambda: Beta_AgentTagParam).annotate(description="The agent that produced this item."), _S.Null), "type": _b.literal("apply_patch_call_output").annotate(description="The type of the item. Always `apply_patch_call_output`."), "id": _b.union(_S.String.annotate(description="The unique ID of the apply patch tool call output. Populated when this item is returned via API."), _S.Null), "call_id": _b.check(_b.check(_S.String.annotate(description="The unique ID of the apply patch tool call generated by the model."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "caller": _b.union(_b.suspend(lambda: BetaToolCallCallerParam).annotate(description="The execution context that produced this tool call."), _S.Null), "status": _b.suspend(lambda: BetaApplyPatchCallOutputStatusParam).annotate(description="The status of the apply patch tool call output. One of `completed` or `failed`."), "output": _b.union(_b.check(_S.String.annotate(description="Optional human-readable log text from the apply patch tool (e.g., patch results or errors)."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _S.Null)}, optional=("agent", "id", "caller", "output",)).annotate(title="Apply patch tool call output", description="The streamed output emitted by an apply patch tool call."), _b.struct(_T.BetaInputItem__1__25, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("mcp_list_tools").annotate(description="The type of the item. Always `mcp_list_tools`.\n"), "id": _S.String.annotate(description="The unique ID of the list.\n"), "server_label": _S.String.annotate(description="The label of the MCP server.\n"), "tools": _b.array(BetaMCPListToolsTool).annotate(description="The tools available on the server.\n"), "error": _b.union(_S.String.annotate(description="Error message if the server could not list tools.\n"), _S.Null)}, optional=("agent", "error",)).annotate(title="MCP list tools", description="A list of tools available on an MCP server.\n"), _b.struct(_T.BetaInputItem__1__26, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("mcp_approval_request").annotate(description="The type of the item. Always `mcp_approval_request`.\n"), "id": _S.String.annotate(description="The unique ID of the approval request.\n"), "server_label": _S.String.annotate(description="The label of the MCP server making the request.\n"), "name": _S.String.annotate(description="The name of the tool to run.\n"), "arguments": _S.String.annotate(description="A JSON string of arguments for the tool.\n")}, optional=("agent",)).annotate(title="MCP approval request", description="A request for human approval of a tool invocation.\n"), _b.struct(_T.BetaInputItem__1__27, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("mcp_approval_response").annotate(description="The type of the item. Always `mcp_approval_response`.\n"), "id": _b.union(_S.String.annotate(description="The unique ID of the approval response\n"), _S.Null), "approval_request_id": _S.String.annotate(description="The ID of the approval request being answered.\n"), "approve": _S.Boolean.annotate(description="Whether the request was approved.\n"), "reason": _b.union(_S.String.annotate(description="Optional reason for the decision.\n"), _S.Null), "request_id": _S.Json.annotate(expected="JSON value")}, optional=("agent", "id", "reason",)).annotate(title="MCP approval response", description="A response to an MCP approval request.\n"), _b.struct(_T.BetaInputItem__1__28, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("mcp_call").annotate(description="The type of the item. Always `mcp_call`.\n"), "id": _S.String.annotate(description="The unique ID of the tool call.\n"), "server_label": _S.String.annotate(description="The label of the MCP server running the tool.\n"), "name": _S.String.annotate(description="The name of the tool that was run.\n"), "arguments": _S.String.annotate(description="A JSON string of the arguments passed to the tool.\n"), "output": _b.union(_S.String.annotate(description="The output from the tool call.\n"), _S.Null), "error": _b.union(BetaMCPToolCallError, _S.Null).annotate(description="The error from the tool call, if any."), "status": _b.suspend(lambda: BetaMCPToolCallStatus).annotate(description="The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"), "approval_request_id": _b.union(_S.String.annotate(description="Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n"), _S.Null)}, optional=("agent", "output", "error", "status", "approval_request_id",)).annotate(title="MCP tool call", description="An invocation of a tool on an MCP server.\n"), _b.struct(_T.BetaInputItem__1__29, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("custom_tool_call_output").annotate(description="The type of the custom tool call output. Always `custom_tool_call_output`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call output in the OpenAI platform.\n"), "call_id": _S.String.annotate(description="The call ID, used to map this custom tool call output to a custom tool call.\n"), "caller": _b.union(BetaToolCallCallerParam, _S.Null), "output": _b.union(_S.String.annotate(title="string output", description="A string of the output of the custom tool call.\n"), _b.array(BetaFunctionAndCustomToolCallOutput).annotate(title="output content list", description="Text, image, or file output of the custom tool call.\n"), mode="one_of").annotate(description="The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n")}, optional=("agent", "id", "caller",)).annotate(title="Custom tool call output", description="The output of a custom tool call from your code, being sent back to the model.\n"), _b.struct(_T.BetaInputItem__1__30, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that produced this item."), "type": _b.literal("custom_tool_call").annotate(description="The type of the custom tool call. Always `custom_tool_call`.\n"), "id": _S.String.annotate(description="The unique ID of the custom tool call in the OpenAI platform.\n"), "call_id": _S.String.annotate(description="An identifier used to map this custom tool call to a tool call output.\n"), "caller": _b.union(BetaToolCallCaller, _S.Null), "namespace": _S.String.annotate(description="The namespace of the custom tool being called.\n"), "name": _S.String.annotate(description="The name of the custom tool being called.\n"), "input": _S.String.annotate(description="The input for the custom tool call generated by the model.\n"), "async": _S.Boolean.annotate(description="Whether the custom tool call runs asynchronously.\n")}, optional=("agent", "id", "caller", "namespace", "async",)).annotate(title="Custom tool call", description="A call to a custom tool created by the model.\n"), mode="one_of").annotate(description="An item representing part of the context for the response to be\ngenerated by the model. Can contain text, images, and audio inputs,\nas well as previous assistant responses and tool call outputs.\n", title="Item"), BetaCompactionTriggerItemParam, BetaItemReferenceParam, BetaProgramItemParam, BetaProgramOutputItemParam, mode="one_of").annotate(identifier="BetaInputItem")
|
|
642
|
+
AssistantStreamEvent: _S.Bottom[_T.AssistantStreamEvent, _t.Any] = _b.union(ThreadStreamEvent, RunStreamEvent, RunStepStreamEvent, MessageStreamEvent, ErrorEvent, DoneEvent, mode="one_of").annotate(description="Represents an event emitted when streaming a Run.\n\nEach event in a server-sent events stream has an `event` and `data` property:\n\n```\nevent: thread.created\ndata: {\"id\": \"thread_123\", \"object\": \"thread\", ...}\n```\n\nWe emit events whenever a new object is created, transitions to a new state, or is being\nstreamed in parts (deltas). For example, we emit `thread.run.created` when a new run\nis created, `thread.run.completed` when a run completes, and so on. When an Assistant chooses\nto create a message during a run, we emit a `thread.message.created event`, a\n`thread.message.in_progress` event, many `thread.message.delta` events, and finally a\n`thread.message.completed` event.\n\nWe may add additional events over time, so we recommend handling unknown events gracefully\nin your code. See the [Assistants API quickstart](https://developers.openai.com/api/docs/assistants/migration) to learn how to\nintegrate the Assistants API with streaming.\n", identifier="AssistantStreamEvent")
|
|
643
|
+
EvalGraderLabelModel: _StructSchema[_T.EvalGraderLabelModel, _t.Never, _t.Never] = _b.struct(_T.EvalGraderLabelModel, {"type": _b.literal("label_model").annotate(description="The object type, which is always `label_model`."), "name": _S.String.annotate(description="The name of the grader."), "model": _S.String.annotate(description="The model to use for the evaluation. Must support structured outputs."), "input": _b.array(EvalItem), "labels": _b.array(_S.String).annotate(description="The labels to assign to each item in the evaluation."), "passing_labels": _b.array(_S.String).annotate(description="The labels that indicate a passing result. Must be a subset of labels.")}).annotate(title="LabelModelGrader", description="A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.\n", identifier="EvalGraderLabelModel")
|
|
644
|
+
EvalGraderScoreModel: _StructSchema[_T.EvalGraderScoreModel, _t.Never, _t.Never] = _b.struct(_T.EvalGraderScoreModel, {"type": _b.literal("score_model").annotate(description="The object type, which is always `score_model`."), "name": _S.String.annotate(description="The name of the grader."), "model": _S.String.annotate(description="The model to use for the evaluation."), "sampling_params": _b.struct(_T.EvalGraderScoreModel__sampling_params, {"seed": _b.union(_b.check(_S.Number.annotate(description="A seed value to initialize the randomness, during sampling.\n"), _S.is_int().annotate(expected="an integer")), _S.Null), "top_p": _b.union(_b.check(_S.Number.annotate(description="An alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n"), _S.is_finite().annotate(expected="a finite number")), _S.Null), "temperature": _b.union(_b.check(_S.Number.annotate(description="A higher temperature increases randomness in the outputs.\n"), _S.is_finite().annotate(expected="a finite number")), _S.Null), "max_completions_tokens": _b.union(_b.check(_b.check(_S.Number.annotate(description="The maximum number of tokens the grader model may generate in its response.\n"), _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.Null), "reasoning_effort": ReasoningEffort}, optional=("seed", "top_p", "temperature", "max_completions_tokens", "reasoning_effort",)).annotate(description="The sampling parameters for the model."), "input": _b.array(EvalItem).annotate(description="The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.\n"), "range": _b.array(_S.Finite).annotate(description="The service requires two numbers for the score range. Defaults to `[0, 1]`.\n"), "pass_threshold": _b.check(_S.Number.annotate(description="The threshold for the score."), _S.is_finite().annotate(expected="a finite number"))}, optional=("sampling_params", "range", "pass_threshold",)).annotate(title="ScoreModelGrader", identifier="EvalGraderScoreModel")
|
|
645
|
+
CreateEvalItem: _S.Bottom[_T.CreateEvalItem, _t.Any] = _b.union(_b.struct(_T.CreateEvalItem__0, {"role": _S.String.annotate(description="The role of the message (e.g. \"system\", \"assistant\", \"user\")."), "content": _S.String.annotate(description="The content of the message.")}).annotate(title="SimpleInputMessage"), EvalItem, mode="one_of").annotate(title="CreateEvalItem", description="A chat message that makes up the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.", identifier="CreateEvalItem")
|
|
646
|
+
CreateEvalCompletionsRunDataSource: _StructSchema[_T.CreateEvalCompletionsRunDataSource, _t.Never, _t.Never] = _b.struct(_T.CreateEvalCompletionsRunDataSource, {"type": _b.literal("completions").annotate(description="The type of run data source. Always `completions`."), "input_messages": _b.union(_b.struct(_T.CreateEvalCompletionsRunDataSource__input_messages__0, {"type": _b.literal("template").annotate(description="The type of input messages. Always `template`."), "template": _b.array(_b.union(EasyInputMessage, EvalItem, mode="one_of")).annotate(description="A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.")}).annotate(title="TemplateInputMessages"), _b.struct(_T.CreateEvalCompletionsRunDataSource__input_messages__1, {"type": _b.literal("item_reference").annotate(description="The type of input messages. Always `item_reference`."), "item_reference": _S.String.annotate(description="A reference to a variable in the `item` namespace. Ie, \"item.input_trajectory\"")}).annotate(title="ItemReferenceInputMessages"), mode="one_of").annotate(description="Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace."), "sampling_params": _b.struct(_T.CreateEvalCompletionsRunDataSource__sampling_params, {"reasoning_effort": ReasoningEffort, "temperature": _b.check(_S.Number.annotate(description="A higher temperature increases randomness in the outputs."), _S.is_finite().annotate(expected="a finite number")), "max_completion_tokens": _b.check(_S.Number.annotate(description="The maximum number of tokens in the generated output."), _S.is_int().annotate(expected="an integer")), "top_p": _b.check(_S.Number.annotate(description="An alternative to temperature for nucleus sampling; 1.0 includes all tokens."), _S.is_finite().annotate(expected="a finite number")), "seed": _b.check(_S.Number.annotate(description="A seed value to initialize the randomness, during sampling."), _S.is_int().annotate(expected="an integer")), "response_format": _b.union(ResponseFormatText, ResponseFormatJsonSchema, ResponseFormatJsonObject, mode="one_of").annotate(description="An object specifying the format that the model must output.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\nStructured Outputs which ensures the model will match your supplied JSON\nschema. Learn more in the [Structured Outputs\nguide](https://developers.openai.com/api/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n"), "tools": _b.array(ChatCompletionTool).annotate(description="A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.\n")}, optional=("reasoning_effort", "temperature", "max_completion_tokens", "top_p", "seed", "response_format", "tools",)), "model": _S.String.annotate(description="The name of the model to use for generating completions (e.g. \"o3-mini\")."), "source": _b.union(EvalJsonlFileContentSource, EvalJsonlFileIdSource, EvalStoredCompletionsSource, mode="one_of").annotate(description="Determines what populates the `item` namespace in this run's data source.")}, optional=("input_messages", "sampling_params", "model",)).annotate(title="CompletionsRunDataSource", description="A CompletionsRunDataSource object describing a model sampling configuration.\n", identifier="CreateEvalCompletionsRunDataSource")
|
|
647
|
+
CreateEvalResponsesRunDataSource: _StructSchema[_T.CreateEvalResponsesRunDataSource, _t.Never, _t.Never] = _b.struct(_T.CreateEvalResponsesRunDataSource, {"type": _b.literal("responses").annotate(description="The type of run data source. Always `responses`."), "input_messages": _b.union(_b.struct(_T.CreateEvalResponsesRunDataSource__input_messages__0, {"type": _b.literal("template").annotate(description="The type of input messages. Always `template`."), "template": _b.array(_b.union(_b.struct(_T.CreateEvalResponsesRunDataSource__input_messages__0__template__item__0, {"role": _S.String.annotate(description="The role of the message (e.g. \"system\", \"assistant\", \"user\")."), "content": _S.String.annotate(description="The content of the message.")}).annotate(title="ChatMessage"), EvalItem, mode="one_of")).annotate(description="A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.")}).annotate(title="InputMessagesTemplate"), _b.struct(_T.CreateEvalResponsesRunDataSource__input_messages__1, {"type": _b.literal("item_reference").annotate(description="The type of input messages. Always `item_reference`."), "item_reference": _S.String.annotate(description="A reference to a variable in the `item` namespace. Ie, \"item.name\"")}).annotate(title="InputMessagesItemReference"), mode="one_of").annotate(description="Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace."), "sampling_params": _b.struct(_T.CreateEvalResponsesRunDataSource__sampling_params, {"reasoning_effort": ReasoningEffort, "temperature": _b.check(_S.Number.annotate(description="A higher temperature increases randomness in the outputs."), _S.is_finite().annotate(expected="a finite number")), "max_completion_tokens": _b.check(_S.Number.annotate(description="The maximum number of tokens in the generated output."), _S.is_int().annotate(expected="an integer")), "top_p": _b.check(_S.Number.annotate(description="An alternative to temperature for nucleus sampling; 1.0 includes all tokens."), _S.is_finite().annotate(expected="a finite number")), "seed": _b.check(_S.Number.annotate(description="A seed value to initialize the randomness, during sampling."), _S.is_int().annotate(expected="an integer")), "tools": _b.array(Tool).annotate(description="An array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter.\n\nThe two categories of tools you can provide the model are:\n\n- **Built-in tools**: Tools that are provided by OpenAI that extend the\n model's capabilities, like [web search](https://developers.openai.com/api/docs/guides/tools-web-search)\n or [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about\n [built-in tools](https://developers.openai.com/api/docs/guides/tools).\n- **Function calls (custom tools)**: Functions that are defined by you,\n enabling the model to call your own code. Learn more about\n [function calling](https://developers.openai.com/api/docs/guides/function-calling).\n"), "text": _b.struct(_T.CreateEvalResponsesRunDataSource__sampling_params__text, {"format": TextResponseFormatConfiguration}, optional=("format",)).annotate(description="Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)\n- [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)\n")}, optional=("reasoning_effort", "temperature", "max_completion_tokens", "top_p", "seed", "tools", "text",)), "model": _S.String.annotate(description="The name of the model to use for generating completions (e.g. \"o3-mini\")."), "source": _b.union(EvalJsonlFileContentSource, EvalJsonlFileIdSource, EvalResponsesSource, mode="one_of").annotate(description="Determines what populates the `item` namespace in this run's data source.")}, optional=("input_messages", "sampling_params", "model",)).annotate(title="ResponsesRunDataSource", description="A ResponsesRunDataSource object describing a model sampling configuration.\n", identifier="CreateEvalResponsesRunDataSource")
|
|
648
|
+
GraderScoreModel: _StructSchema[_T.GraderScoreModel, _t.Never, _t.Never] = _b.struct(_T.GraderScoreModel, {"type": _b.literal("score_model").annotate(description="The object type, which is always `score_model`."), "name": _S.String.annotate(description="The name of the grader."), "model": _S.String.annotate(description="The model to use for the evaluation."), "sampling_params": _b.struct(_T.GraderScoreModel__sampling_params, {"seed": _b.union(_b.check(_S.Number.annotate(description="A seed value to initialize the randomness, during sampling.\n"), _S.is_int().annotate(expected="an integer")), _S.Null), "top_p": _b.union(_b.check(_S.Number.annotate(description="An alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n"), _S.is_finite().annotate(expected="a finite number")), _S.Null), "temperature": _b.union(_b.check(_S.Number.annotate(description="A higher temperature increases randomness in the outputs.\n"), _S.is_finite().annotate(expected="a finite number")), _S.Null), "max_completions_tokens": _b.union(_b.check(_b.check(_S.Number.annotate(description="The maximum number of tokens the grader model may generate in its response.\n"), _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.Null), "reasoning_effort": ReasoningEffort}, optional=("seed", "top_p", "temperature", "max_completions_tokens", "reasoning_effort",)).annotate(description="The sampling parameters for the model."), "input": _b.array(EvalItem).annotate(description="The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.\n"), "range": _b.array(_S.Finite).annotate(description="The service requires two numbers for the score range. Defaults to `[0, 1]`.\n")}, optional=("sampling_params", "range",)).annotate(title="ScoreModelGrader", description="A ScoreModelGrader object that uses a model to assign a score to the input.\n", identifier="GraderScoreModel")
|
|
649
|
+
GraderLabelModel: _StructSchema[_T.GraderLabelModel, _t.Never, _t.Never] = _b.struct(_T.GraderLabelModel, {"type": _b.literal("label_model").annotate(description="The object type, which is always `label_model`."), "name": _S.String.annotate(description="The name of the grader."), "model": _S.String.annotate(description="The model to use for the evaluation. Must support structured outputs."), "input": _b.array(EvalItem), "labels": _b.array(_S.String).annotate(description="The labels to assign to each item in the evaluation."), "passing_labels": _b.array(_S.String).annotate(description="The labels that indicate a passing result. Must be a subset of labels.")}).annotate(title="LabelModelGrader", description="A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.\n", identifier="GraderLabelModel")
|
|
650
|
+
ConversationItem: _S.Bottom[_T.ConversationItem, _t.Any] = _b.union(Message, FunctionToolCallResource, FunctionToolCallOutputResource, FileSearchToolCall, WebSearchToolCall, ImageGenToolCall, ComputerToolCall, ComputerToolCallOutputResource, ToolSearchCall, ToolSearchOutput, AdditionalTools, ResponseConfigurationUpdate, ReasoningItem, Program, ProgramOutput, CompactionBody, CodeInterpreterToolCall, LocalShellToolCall, LocalShellToolCallOutput, FunctionShellCall, FunctionShellCallOutput, ApplyPatchToolCall, ApplyPatchToolCallOutput, MCPListTools, MCPApprovalRequest, MCPApprovalResponseResource, MCPToolCall, CustomToolCall, CustomToolCallOutput, mode="one_of").annotate(title="Conversation item", description="A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](https://developers.openai.com/api/reference/resources/responses#%28resource%29%20responses%20%3E%20%28model%29%20response%20%3E%20%28schema%29%20%3E%20%28property%29%20output).", identifier="ConversationItem")
|
|
651
|
+
OutputItem: _S.Bottom[_T.OutputItem, _t.Any] = _b.union(OutputMessage, FileSearchToolCall, FunctionToolCall, FunctionToolCallOutputResource, WebSearchToolCall, ComputerToolCall, ComputerToolCallOutputResource, ReasoningItem, Program, ProgramOutput, ToolSearchCall, ToolSearchOutput, AdditionalTools, CompactionBody, ImageGenToolCall, CodeInterpreterToolCall, LocalShellToolCall, LocalShellToolCallOutput, FunctionShellCall, FunctionShellCallOutput, ApplyPatchToolCall, ApplyPatchToolCallOutput, MCPToolCall, MCPListTools, MCPApprovalRequest, MCPApprovalResponseResource, CustomToolCall, CustomToolCallOutputResource, mode="one_of").annotate(identifier="OutputItem")
|
|
652
|
+
ItemResource: _S.Bottom[_T.ItemResource, _t.Any] = _b.union(InputMessageResource, OutputMessage, FileSearchToolCall, ComputerToolCall, ComputerToolCallOutputResource, WebSearchToolCall, FunctionToolCallResource, FunctionToolCallOutputResource, ToolSearchCall, ToolSearchOutput, AdditionalTools, ResponseConfigurationUpdate, ReasoningItem, Program, ProgramOutput, CompactionBody, ImageGenToolCall, CodeInterpreterToolCall, LocalShellToolCall, LocalShellToolCallOutput, FunctionShellCall, FunctionShellCallOutput, ApplyPatchToolCall, ApplyPatchToolCallOutput, MCPListTools, MCPApprovalRequest, MCPApprovalResponseResource, MCPToolCall, CustomToolCallResource, CustomToolCallOutputResource, mode="one_of").annotate(description="Content item used to generate a response.\n", identifier="ItemResource")
|
|
653
|
+
ItemField: _S.Bottom[_T.ItemField, _t.Any] = _b.union(Message, Program, ProgramOutput, FunctionToolCall, ToolSearchCall, ToolSearchOutput, AdditionalTools, FunctionToolCallOutput, FileSearchToolCall, WebSearchToolCall, ImageGenToolCall, ComputerToolCall, ComputerToolCallOutputResource, ReasoningItem, CompactionBody, CodeInterpreterToolCall, LocalShellToolCall, LocalShellToolCallOutput, FunctionShellCall, FunctionShellCallOutput, ApplyPatchToolCall, ApplyPatchToolCallOutput, MCPListTools, MCPApprovalRequest, MCPApprovalResponseResource, MCPToolCall, CustomToolCall, CustomToolCallOutput, mode="one_of").annotate(description="An item representing a message, tool call, tool output, reasoning, or other response element.", identifier="ItemField")
|
|
654
|
+
InputParam: _S.Bottom[_T.InputParam, _t.Any] = _b.union(_S.String.annotate(title="Text input", description="A text input to the model, equivalent to a text input with the\n`user` role.\n"), _b.array(InputItem).annotate(title="Input item list", description="A list of one or many input items to the model, containing\ndifferent content types.\n"), mode="one_of").annotate(description="Text, image, or file inputs to the model, used to generate a response.\n\nLearn more:\n- [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)\n- [Image inputs](https://developers.openai.com/api/docs/guides/images-vision)\n- [File inputs](https://developers.openai.com/api/docs/guides/file-inputs)\n- [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state)\n- [Function calling](https://developers.openai.com/api/docs/guides/function-calling)\n", identifier="InputParam")
|
|
655
|
+
CreateConversationBody: _StructSchema[_T.CreateConversationBody, _t.Never, _t.Never] = _b.struct(_T.CreateConversationBody, {"metadata": _b.union(_b.suspend(lambda: Metadata).annotate(description="Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters."), _S.Null), "items": _b.union(_b.check(_b.array(InputItem).annotate(description="Initial items to include in the conversation context. You may add up to 20 items at a time."), _S.is_max_length(20).annotate(expected="a value with a length of at most 20")), _S.Null)}, optional=("metadata", "items",)).annotate(identifier="CreateConversationBody")
|
|
656
|
+
TokenCountsBody: _StructSchema[_T.TokenCountsBody, _t.Never, _t.Never] = _b.struct(_T.TokenCountsBody, {"model": _b.union(_S.String.annotate(description="Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models."), _S.Null), "input": _b.union(_b.union(_b.check(_S.String.annotate(description="A text input to the model, equivalent to a text input with the `user` role."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _b.check(_b.array(InputItem).annotate(description="A list of one or many input items to the model, containing different content types."), _S.is_max_length(131072).annotate(expected="a value with a length of at most 131072")), mode="one_of").annotate(description="Text, image, or file inputs to the model, used to generate a response"), _S.Null), "previous_response_id": _b.union(_S.String.annotate(description="The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`."), _S.Null), "tools": _b.union(_b.array(Tool).annotate(description="An array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter."), _S.Null), "text": _b.union(ResponseTextParam, _S.Null), "reasoning": _b.union(_b.suspend(lambda: Reasoning).annotate(description="**gpt-5 and o-series models only** Configuration options for [reasoning models](https://developers.openai.com/api/docs/guides/reasoning)."), _S.Null), "truncation": _b.suspend(lambda: TruncationEnum).annotate(description="The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error."), "instructions": _b.union(_S.String.annotate(description="A system (or developer) message inserted into the model's context.\nWhen used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses."), _S.Null), "personality": _b.suspend(lambda: PersonalityEnum).annotate(description="A model-owned style preset to apply to this request. Omit this parameter to use the model's default style. Supported values may expand over time. Values must be at most 64 characters."), "conversation": _b.union(ConversationParam, _S.Null), "tool_choice": _b.union(_b.suspend(lambda: ToolChoiceParam).annotate(description="Controls which tool the model should use, if any."), _S.Null), "parallel_tool_calls": _b.union(_S.Boolean.annotate(description="Whether to allow the model to run tool calls in parallel."), _S.Null)}, optional=("model", "input", "previous_response_id", "tools", "text", "reasoning", "truncation", "instructions", "personality", "conversation", "tool_choice", "parallel_tool_calls",)).annotate(identifier="TokenCountsBody")
|
|
657
|
+
CompactResponseMethodPublicBody: _StructSchema[_T.CompactResponseMethodPublicBody, _t.Never, _t.Never] = _b.struct(_T.CompactResponseMethodPublicBody, {"model": ModelIdsCompaction, "input": _b.union(_b.union(_b.check(_S.String.annotate(description="A text input to the model, equivalent to a text input with the `user` role."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _b.check(_b.array(InputItem).annotate(description="A list of one or many input items to the model, containing different content types."), _S.is_max_length(131072).annotate(expected="a value with a length of at most 131072")), mode="one_of").annotate(description="Text, image, or file inputs to the model, used to generate a response"), _S.Null), "previous_response_id": _b.union(_S.String.annotate(description="The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`."), _S.Null), "instructions": _b.union(_S.String.annotate(description="A system (or developer) message inserted into the model's context.\nWhen used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses."), _S.Null), "prompt_cache_key": _b.union(_b.check(_S.String.annotate(description="A key to use when reading from or writing to the prompt cache."), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _S.Null), "prompt_cache_retention": _b.union(_b.suspend(lambda: PromptCacheRetentionEnum).annotate(description="How long to retain a prompt cache entry created by this request."), _S.Null), "prompt_cache_options": _b.union(PromptCacheOptionsParam, _S.Null), "service_tier": _b.union(_b.suspend(lambda: ServiceTierEnum).annotate(description="Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'.\n When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter."), _S.Null)}, optional=("input", "previous_response_id", "instructions", "prompt_cache_key", "prompt_cache_retention", "prompt_cache_options", "service_tier",)).annotate(identifier="CompactResponseMethodPublicBody")
|
|
658
|
+
Delegation: _S.Bottom[_T.Delegation, _t.Any] = _b.union(_b.union(LiveClientDelegationParam, LiveResponsesDelegationParam, mode="one_of").annotate(description="Who handles tasks delegated by the Live model. Omitted or null selects your application; use `responses` to let the API manage a Responses backend."), _S.Null).annotate(identifier="delegation")
|
|
659
|
+
LiveMediaSessionForkParams: _StructSchema[_T.LiveMediaSessionForkParams, _t.Never, _t.Never] = _b.struct(_T.LiveMediaSessionForkParams, {"store": Properties_store, "delegation": LiveResponsesDelegationUpdateParam, "client": LiveClientConfigParam}, optional=("store", "delegation", "client",)).annotate(description="Optional overrides for a stored Live session. Omitted settings are inherited. The model, voice, frontend instructions, and prior conversation come from the stored session. WebRTC negotiates its audio format; audio.format is only supported on WebSocket forks.", identifier="LiveMediaSessionForkParams")
|
|
660
|
+
DecisionRequest: _StructSchema[_T.DecisionRequest, _t.Never, _t.Never] = _b.struct(_T.DecisionRequest, {"model": _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points")), "input": DecisionInput, "questions": _b.check(_b.check(_b.array(QuestionParam), _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")), "safety_identifier": _b.union(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _S.Null).annotate(description="Opaque caller-provided end-user identifier, scoped by the verified org. Match Responses' limit; this is never the authenticated user identity.")}, optional=("safety_identifier",)).annotate(identifier="DecisionRequest")
|
|
661
|
+
CreateAgentEnvironmentParams: _StructSchema[_T.CreateAgentEnvironmentParams, _t.Never, _t.Never] = _b.struct(_T.CreateAgentEnvironmentParams, {"environment": _b.suspend(lambda: CreateEnvironmentParam).annotate(description="The required hosting type and its configuration."), "vault_ids": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(10).annotate(expected="a value with a length of at most 10")), _S.Null).annotate(description="The IDs of up to 10 vaults made available to an OpenAI-hosted environment.")}, optional=("vault_ids",)).annotate(description="Parameters for creating an execution environment before its sessions.", identifier="CreateAgentEnvironmentParams")
|
|
662
|
+
CreateAgentSessionParams: _StructSchema[_T.CreateAgentSessionParams, _t.Never, _t.Never] = _b.struct(_T.CreateAgentSessionParams, {"spend_control": _b.union(SessionSpendControlParam, _S.Null).annotate(description="Optional spending limit in USD cents. Omission or null creates an unlimited session."), "metadata": _b.union(_b.check(_b.check(_b.check(_b.record(_S.String, _b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points"))), _S.is_min_properties(0).annotate(expected="a value with at least 0 entries")), _S.is_max_properties(16).annotate(expected="a value with at most 16 entries")), _S.is_property_names(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points"))).annotate(expected="an object with property names matching the schema")), _S.Null).annotate(description="Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. Omission or null defaults to an empty map."), "agent": _b.suspend(lambda: SessionAgentConfigParam).annotate(description="Agent configuration. With `agent_id`, supplied fields override the saved agent for this session. Without `agent_id`, `model` is required."), "agent_id": _b.check(_b.check(_S.String.annotate(description="The ID of a saved reusable agent. Omit `agent` to use its configuration unchanged."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), "environment": _b.suspend(lambda: EnvironmentParam).annotate(description="An inline execution environment or a reference to an environment template."), "vault_ids": _b.union(_b.check(_b.check(_b.array(_b.check(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(1048576).annotate(expected="a string with at most 1048576 code points"))), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(16384).annotate(expected="a value with a length of at most 16384")), _S.Null).annotate(description="The IDs of vaults made available to the session."), "input": _b.union(CreateSessionInputParam, _S.Null).annotate(description="Initial input to submit when the session is created. A string is shorthand for a single user message. Required when `environment.type` is `none`, or when `stream` is `true` for an environment that is not `self_hosted`; optional for self-hosted and non-streaming execution environments."), "stream": _S.Boolean.annotate(description="Whether to stream session events as server-sent events. Defaults to `false`.")}, optional=("spend_control", "metadata", "agent", "agent_id", "vault_ids", "input", "stream",)).annotate(description="Parameters for creating a Managed Agents session.", identifier="CreateAgentSessionParams")
|
|
663
|
+
SessionListResource: _StructSchema[_T.SessionListResource, _t.Never, _t.Never] = _b.struct(_T.SessionListResource, {"object": _b.literal("list").annotate(description="The object type, which is always `list`."), "data": _b.check(_b.check(_b.array(SessionResource).annotate(description="The resources returned in this page, in the requested sort order."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "first_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the first resource in `data`, or `null` if the page is empty."), "last_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters."), "has_more": _S.Boolean.annotate(description="Whether there are more resources to retrieve after this page.")}).annotate(description="A page of Agents API resources, with IDs for retrieving additional pages.", identifier="SessionListResource")
|
|
664
|
+
SessionEventAgentSessionCreated: _StructSchema[_T.SessionEventAgentSessionCreated, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionCreated, {"type": _b.literal("agent.session.created").annotate(description="The type of the object. Always `agent.session.created`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session": _b.suspend(lambda: SessionResource).annotate(description="The session that was created.")}).annotate(description="Emitted when a session is created.", identifier="SessionEventAgentSessionCreated")
|
|
665
|
+
SessionEventAgentSessionIdle: _StructSchema[_T.SessionEventAgentSessionIdle, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionIdle, {"type": _b.literal("agent.session.idle").annotate(description="The type of the object. Always `agent.session.idle`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session": _b.suspend(lambda: SessionResource).annotate(description="The session that became idle.")}).annotate(description="Emitted when a session becomes idle.", identifier="SessionEventAgentSessionIdle")
|
|
666
|
+
SessionEventAgentSessionInProgress: _StructSchema[_T.SessionEventAgentSessionInProgress, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionInProgress, {"type": _b.literal("agent.session.in_progress").annotate(description="The type of the object. Always `agent.session.in_progress`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session": _b.suspend(lambda: SessionResource).annotate(description="The session that started processing.")}).annotate(description="Emitted when a session starts processing a turn.", identifier="SessionEventAgentSessionInProgress")
|
|
667
|
+
SessionEventAgentSessionRequiresAction: _StructSchema[_T.SessionEventAgentSessionRequiresAction, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionRequiresAction, {"type": _b.literal("agent.session.requires_action").annotate(description="The type of the object. Always `agent.session.requires_action`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session": _b.suspend(lambda: SessionResource).annotate(description="The session and its current required actions.")}).annotate(description="Emitted when a session is waiting for one or more required actions.", identifier="SessionEventAgentSessionRequiresAction")
|
|
668
|
+
SessionEventAgentSessionFailed: _StructSchema[_T.SessionEventAgentSessionFailed, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionFailed, {"type": _b.literal("agent.session.failed").annotate(description="The type of the object. Always `agent.session.failed`."), "event_id": _b.check(_S.String.annotate(description="The unique ID of the event."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "session": _b.suspend(lambda: SessionResource).annotate(description="The failed session.")}).annotate(description="Emitted when a session fails.", identifier="SessionEventAgentSessionFailed")
|
|
669
|
+
VaultCredentialListResource: _StructSchema[_T.VaultCredentialListResource, _t.Never, _t.Never] = _b.struct(_T.VaultCredentialListResource, {"object": _b.literal("list").annotate(description="The object type, which is always `list`."), "data": _b.check(_b.check(_b.array(VaultCredentialResource).annotate(description="The resources returned in this page, in the requested sort order."), _S.is_min_length(0).annotate(expected="a value with a length of at least 0")), _S.is_max_length(2000).annotate(expected="a value with a length of at most 2000")), "first_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the first resource in `data`, or `null` if the page is empty."), "last_id": _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Null).annotate(description="The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters."), "has_more": _S.Boolean.annotate(description="Whether there are more resources to retrieve after this page.")}).annotate(description="A page of Agents API resources, with IDs for retrieving additional pages.", identifier="VaultCredentialListResource")
|
|
670
|
+
BetaOutputItem: _S.Bottom[_T.BetaOutputItem, _t.Any] = _b.union(BetaOutputMessage, BetaFileSearchToolCall, BetaFunctionToolCall, BetaFunctionToolCallOutputResource, BetaAgentMessage, BetaMultiAgentCall, BetaMultiAgentCallOutput, BetaWebSearchToolCall, BetaComputerToolCall, BetaComputerToolCallOutputResource, BetaReasoningItem, BetaProgram, BetaProgramOutput, BetaToolSearchCall, BetaToolSearchOutput, BetaAdditionalTools, BetaCompactionBody, BetaImageGenToolCall, BetaCodeInterpreterToolCall, BetaLocalShellToolCall, BetaLocalShellToolCallOutput, BetaFunctionShellCall, BetaFunctionShellCallOutput, BetaApplyPatchToolCall, BetaApplyPatchToolCallOutput, BetaMCPToolCall, BetaMCPListTools, BetaMCPApprovalRequest, BetaMCPApprovalResponseResource, BetaCustomToolCall, BetaCustomToolCallOutputResource, mode="one_of").annotate(identifier="BetaOutputItem")
|
|
671
|
+
BetaItemField: _S.Bottom[_T.BetaItemField, _t.Any] = _b.union(BetaMessage, BetaProgram, BetaProgramOutput, BetaFunctionToolCall, BetaMultiAgentCall, BetaMultiAgentCallOutput, BetaToolSearchCall, BetaToolSearchOutput, BetaAdditionalTools, BetaAgentMessage, BetaFunctionToolCallOutput, BetaFileSearchToolCall, BetaWebSearchToolCall, BetaImageGenToolCall, BetaComputerToolCall, BetaComputerToolCallOutputResource, BetaReasoningItem, BetaCompactionBody, BetaCodeInterpreterToolCall, BetaLocalShellToolCall, BetaLocalShellToolCallOutput, BetaFunctionShellCall, BetaFunctionShellCallOutput, BetaApplyPatchToolCall, BetaApplyPatchToolCallOutput, BetaMCPListTools, BetaMCPApprovalRequest, BetaMCPApprovalResponseResource, BetaMCPToolCall, BetaCustomToolCall, BetaCustomToolCallOutput, mode="one_of").annotate(description="An item representing a message, tool call, tool output, reasoning, or other response element.", identifier="BetaItemField")
|
|
672
|
+
BetaItemResource: _S.Bottom[_T.BetaItemResource, _t.Any] = _b.union(BetaInputMessageResource, BetaOutputMessage, BetaFileSearchToolCall, BetaComputerToolCall, BetaComputerToolCallOutputResource, BetaWebSearchToolCall, BetaFunctionToolCallResource, BetaFunctionToolCallOutputResource, BetaAgentMessage, BetaMultiAgentCall, BetaMultiAgentCallOutput, BetaToolSearchCall, BetaToolSearchOutput, BetaAdditionalTools, BetaResponseConfigurationUpdate, BetaReasoningItem, BetaProgram, BetaProgramOutput, BetaCompactionBody, BetaImageGenToolCall, BetaCodeInterpreterToolCall, BetaLocalShellToolCall, BetaLocalShellToolCallOutput, BetaFunctionShellCall, BetaFunctionShellCallOutput, BetaApplyPatchToolCall, BetaApplyPatchToolCallOutput, BetaMCPListTools, BetaMCPApprovalRequest, BetaMCPApprovalResponseResource, BetaMCPToolCall, BetaCustomToolCallResource, BetaCustomToolCallOutputResource, mode="one_of").annotate(description="Content item used to generate a response.\n", identifier="BetaItemResource")
|
|
673
|
+
BetaInputParam: _S.Bottom[_T.BetaInputParam, _t.Any] = _b.union(_S.String.annotate(title="Text input", description="A text input to the model, equivalent to a text input with the\n`user` role.\n"), _b.array(BetaInputItem).annotate(title="Input item list", description="A list of one or many input items to the model, containing\ndifferent content types.\n"), mode="one_of").annotate(description="Text, image, or file inputs to the model, used to generate a response.\n\nLearn more:\n- [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)\n- [Image inputs](https://developers.openai.com/api/docs/guides/images-vision)\n- [File inputs](https://developers.openai.com/api/docs/guides/file-inputs)\n- [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state)\n- [Function calling](https://developers.openai.com/api/docs/guides/function-calling)\n", identifier="BetaInputParam")
|
|
674
|
+
BetaCompactResponseMethodPublicBody: _StructSchema[_T.BetaCompactResponseMethodPublicBody, _t.Never, _t.Never] = _b.struct(_T.BetaCompactResponseMethodPublicBody, {"model": BetaModelIdsCompaction, "input": _b.union(_b.union(_b.check(_S.String.annotate(description="A text input to the model, equivalent to a text input with the `user` role."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _b.check(_b.array(BetaInputItem).annotate(description="A list of one or many input items to the model, containing different content types."), _S.is_max_length(131072).annotate(expected="a value with a length of at most 131072")), mode="one_of").annotate(description="Text, image, or file inputs to the model, used to generate a response"), _S.Null), "previous_response_id": _b.union(_S.String.annotate(description="The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`."), _S.Null), "instructions": _b.union(_S.String.annotate(description="A system (or developer) message inserted into the model's context.\nWhen used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses."), _S.Null), "prompt_cache_key": _b.union(_b.check(_S.String.annotate(description="A key to use when reading from or writing to the prompt cache."), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _S.Null), "prompt_cache_retention": _b.union(_b.suspend(lambda: BetaPromptCacheRetentionEnum).annotate(description="How long to retain a prompt cache entry created by this request."), _S.Null), "prompt_cache_options": _b.union(BetaPromptCacheOptionsParam, _S.Null), "service_tier": _b.union(_b.suspend(lambda: BetaServiceTierEnum).annotate(description="Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'.\n When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter."), _S.Null)}, optional=("input", "previous_response_id", "instructions", "prompt_cache_key", "prompt_cache_retention", "prompt_cache_options", "service_tier",)).annotate(identifier="BetaCompactResponseMethodPublicBody")
|
|
675
|
+
BetaTokenCountsBody: _StructSchema[_T.BetaTokenCountsBody, _t.Never, _t.Never] = _b.struct(_T.BetaTokenCountsBody, {"model": _b.union(_S.String.annotate(description="Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models."), _S.Null), "input": _b.union(_b.union(_b.check(_S.String.annotate(description="A text input to the model, equivalent to a text input with the `user` role."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points")), _b.check(_b.array(BetaInputItem).annotate(description="A list of one or many input items to the model, containing different content types."), _S.is_max_length(131072).annotate(expected="a value with a length of at most 131072")), mode="one_of").annotate(description="Text, image, or file inputs to the model, used to generate a response"), _S.Null), "previous_response_id": _b.union(_S.String.annotate(description="The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`."), _S.Null), "tools": _b.union(_b.array(BetaTool).annotate(description="An array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter."), _S.Null), "text": _b.union(BetaResponseTextParam, _S.Null), "reasoning": _b.union(_b.suspend(lambda: BetaReasoning).annotate(description="**gpt-5 and o-series models only** Configuration options for [reasoning models](https://developers.openai.com/api/docs/guides/reasoning)."), _S.Null), "truncation": _b.suspend(lambda: BetaTruncationEnum).annotate(description="The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error."), "instructions": _b.union(_S.String.annotate(description="A system (or developer) message inserted into the model's context.\nWhen used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses."), _S.Null), "personality": _b.suspend(lambda: BetaPersonalityEnum).annotate(description="A model-owned style preset to apply to this request. Omit this parameter to use the model's default style. Supported values may expand over time. Values must be at most 64 characters."), "conversation": _b.union(BetaConversationParam, _S.Null), "tool_choice": _b.union(_b.suspend(lambda: BetaToolChoiceParam).annotate(description="Controls which tool the model should use, if any."), _S.Null), "parallel_tool_calls": _b.union(_S.Boolean.annotate(description="Whether to allow the model to run tool calls in parallel."), _S.Null)}, optional=("model", "input", "previous_response_id", "tools", "text", "reasoning", "truncation", "instructions", "personality", "conversation", "tool_choice", "parallel_tool_calls",)).annotate(identifier="BetaTokenCountsBody")
|
|
676
|
+
Eval: _StructSchema[_T.Eval, _t.Never, _t.Never] = _b.struct(_T.Eval, {"object": _b.literal("eval").annotate(description="The object type."), "id": _S.String.annotate(description="Unique identifier for the evaluation."), "name": _S.String.annotate(description="The name of the evaluation."), "data_source_config": _b.union(EvalCustomDataSourceConfig, EvalLogsDataSourceConfig, EvalStoredCompletionsDataSourceConfig, mode="one_of").annotate(description="Configuration of data sources used in runs of the evaluation."), "testing_criteria": _b.array(_b.union(EvalGraderLabelModel, EvalGraderStringCheck, EvalGraderTextSimilarity, EvalGraderPython, EvalGraderScoreModel, mode="one_of")).annotate(description="A list of testing criteria."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the eval was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "metadata": Metadata}).annotate(title="Eval", description="An Eval object with a data source config and testing criteria.\nAn Eval represents a task to be done for your LLM integration.\nLike:\n - Improve the quality of my chatbot\n - See how well my chatbot handles customer support\n - Check if o4-mini is better at my usecase than gpt-6-astra\n", identifier="Eval")
|
|
677
|
+
CreateEvalLabelModelGrader: _StructSchema[_T.CreateEvalLabelModelGrader, _t.Never, _t.Never] = _b.struct(_T.CreateEvalLabelModelGrader, {"type": _b.literal("label_model").annotate(description="The object type, which is always `label_model`."), "name": _S.String.annotate(description="The name of the grader."), "model": _S.String.annotate(description="The model to use for the evaluation. Must support structured outputs."), "input": _b.array(CreateEvalItem).annotate(description="A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}."), "labels": _b.array(_S.String).annotate(description="The labels to classify to each item in the evaluation."), "passing_labels": _b.array(_S.String).annotate(description="The labels that indicate a passing result. Must be a subset of labels.")}).annotate(title="LabelModelGrader", description="A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.\n", identifier="CreateEvalLabelModelGrader")
|
|
678
|
+
EvalRun: _StructSchema[_T.EvalRun, _t.Never, _t.Never] = _b.struct(_T.EvalRun, {"object": _b.literal("eval.run").annotate(description="The type of the object. Always \"eval.run\"."), "id": _S.String.annotate(description="Unique identifier for the evaluation run."), "eval_id": _S.String.annotate(description="The identifier of the associated evaluation."), "status": _S.String.annotate(description="The status of the evaluation run."), "model": _b.union(_S.String, _S.Null).annotate(description="The model that is evaluated, if applicable."), "name": _b.union(_S.String, _S.Null).annotate(description="The name of the evaluation run."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the evaluation run was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "report_url": _S.String.annotate(description="The URL to the rendered evaluation run report on the UI dashboard.", format="uri"), "result_counts": _b.struct(_T.EvalRun__result_counts, {"total": _b.check(_S.Number.annotate(description="Total number of executed output items."), _S.is_int().annotate(expected="an integer")), "errored": _b.check(_S.Number.annotate(description="Number of output items that resulted in an error."), _S.is_int().annotate(expected="an integer")), "failed": _b.check(_S.Number.annotate(description="Number of output items that failed to pass the evaluation."), _S.is_int().annotate(expected="an integer")), "passed": _b.check(_S.Number.annotate(description="Number of output items that passed the evaluation."), _S.is_int().annotate(expected="an integer"))}).annotate(description="Counters summarizing the outcomes of the evaluation run."), "per_model_usage": _b.union(_b.array(_b.struct(_T.EvalRun__per_model_usage__0__item, {"model_name": _S.String.annotate(description="The name of the model."), "invocation_count": _b.check(_S.Number.annotate(description="The number of invocations."), _S.is_int().annotate(expected="an integer")), "prompt_tokens": _b.check(_S.Number.annotate(description="The number of prompt tokens used."), _S.is_int().annotate(expected="an integer")), "completion_tokens": _b.check(_S.Number.annotate(description="The number of completion tokens generated."), _S.is_int().annotate(expected="an integer")), "total_tokens": _b.check(_S.Number.annotate(description="The total number of tokens used."), _S.is_int().annotate(expected="an integer")), "cached_tokens": _b.check(_S.Number.annotate(description="The number of tokens retrieved from cache."), _S.is_int().annotate(expected="an integer"))})), _S.Null).annotate(description="Usage statistics for each model during the evaluation run."), "per_testing_criteria_results": _b.union(_b.array(_b.struct(_T.EvalRun__per_testing_criteria_results__0__item, {"testing_criteria": _S.String.annotate(description="A description of the testing criteria."), "passed": _b.check(_S.Number.annotate(description="Number of tests passed for this criteria."), _S.is_int().annotate(expected="an integer")), "failed": _b.check(_S.Number.annotate(description="Number of tests failed for this criteria."), _S.is_int().annotate(expected="an integer"))})), _S.Null).annotate(description="Results per testing criteria applied during the evaluation run."), "data_source": _b.union(CreateEvalJsonlRunDataSource, CreateEvalCompletionsRunDataSource, CreateEvalResponsesRunDataSource, mode="one_of").annotate(description="Information about the run's data source."), "metadata": Metadata, "error": _b.union(EvalApiError, _S.Null)}).annotate(title="EvalRun", description="A schema representing an evaluation run.\n", identifier="EvalRun")
|
|
679
|
+
CreateEvalRunRequest: _StructSchema[_T.CreateEvalRunRequest, _t.Never, _t.Never] = _b.struct(_T.CreateEvalRunRequest, {"name": _S.String.annotate(description="The name of the run."), "metadata": Metadata, "data_source": _b.union(CreateEvalJsonlRunDataSource, CreateEvalCompletionsRunDataSource, CreateEvalResponsesRunDataSource, mode="one_of").annotate(description="Details about the run's data source.")}, optional=("name", "metadata",)).annotate(title="CreateEvalRunRequest", identifier="CreateEvalRunRequest")
|
|
680
|
+
GraderMulti: _StructSchema[_T.GraderMulti, _t.Never, _t.Never] = _b.struct(_T.GraderMulti, {"type": _b.literal("multi").annotate(description="The object type, which is always `multi`."), "name": _S.String.annotate(description="The name of the grader."), "graders": _b.check(_b.record(_S.String, _b.union(GraderStringCheck, GraderTextSimilarity, GraderPython, GraderScoreModel, GraderLabelModel, mode="one_of")), _S.is_min_properties(1).annotate(expected="a value with at least 1 entry")), "calculate_output": _S.String.annotate(description="A formula to calculate the output based on grader results.")}).annotate(title="MultiGrader", description="A MultiGrader object combines the output of multiple graders to produce a single score.", identifier="GraderMulti")
|
|
681
|
+
ConversationItemList: _StructSchema[_T.ConversationItemList, _t.Never, _t.Never] = _b.struct(_T.ConversationItemList, {"object": _b.literal("list").annotate(description="The type of object returned, must be `list`."), "data": _b.array(ConversationItem).annotate(description="A list of conversation items."), "has_more": _S.Boolean.annotate(description="Whether there are more items available."), "first_id": _S.String.annotate(description="The ID of the first item in the list."), "last_id": _S.String.annotate(description="The ID of the last item in the list.")}).annotate(title="The conversation item list", description="A list of Conversation items.", identifier="ConversationItemList")
|
|
682
|
+
Response: _StructSchema[_T.Response, _t.Never, _t.Never] = _b.struct(_T.Response, {"metadata": Metadata, "top_logprobs": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n"), _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(20).annotate(expected="a value less than or equal to 20")), _S.Null), "temperature": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n"), _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(2).annotate(expected="a value less than or equal to 2")), _S.Null), "top_p": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n"), _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")), _S.Null), "user": _b.union(_S.String, _S.Null).annotate(description="This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\nA stable identifier for your end-users.\nUsed to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), "safety_identifier": _b.union(_b.check(_S.String.annotate(description="A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 128 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _S.Null), "prompt_cache_key": _b.union(_S.String.annotate(description="Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).\n"), _S.Null), "prompt_cache_retention": _b.union(_b.literals(["in_memory", "24h"]).annotate(description="Deprecated. Use `prompt_cache_options.ttl` instead.\n\nThe retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).\nThis field expresses a maximum retention policy, while\n`prompt_cache_options.ttl` expresses a minimum cache lifetime. The two\nfields are independent and do not interact.\nFor `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.\n\nFor older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:\n - Organizations without ZDR enabled default to `24h`.\n - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.\n"), _S.Null), "previous_response_id": _b.union(_S.String.annotate(description="The unique ID of the previous response to the model. Use this to\ncreate multi-turn conversations. Learn more about\n[conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.\n"), _S.Null), "model": _b.suspend(lambda: ModelIdsResponses).annotate(description="Model ID used to generate the response, like `gpt-6-astra`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models)\nto browse and compare available models.\n"), "background": _b.union(_S.Boolean.annotate(description="Whether to run the model response in the background.\n[Learn more](https://developers.openai.com/api/docs/guides/background).\n"), _S.Null), "max_tool_calls": _b.union(_b.check(_S.Number.annotate(description="The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n"), _S.is_int().annotate(expected="an integer")), _S.Null), "text": ResponseTextParam, "tools": ToolsArray, "tool_choice": ToolChoiceParam, "prompt": Prompt, "service_tier": ServiceTierResponses, "truncation": _b.union(_b.literals(["auto", "disabled"]).annotate(description="The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n the model's context window size, the model will truncate the\n response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n size for a model, the request will fail with a 400 error.\n"), _S.Null), "id": _S.String.annotate(description="Unique identifier for this Response.\n"), "object": _b.literal("response").annotate(description="The object type of this resource - always set to `response`.\n"), "status": _b.literals(["completed", "failed", "in_progress", "cancelled", "queued", "incomplete"]).annotate(description="The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n"), "access_programs": _b.union(AccessProgramsBody, _S.Null), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) of when this Response was created.\n", format="unixtime"), _S.is_finite().annotate(expected="a finite number")), "completed_at": _b.union(_b.check(_S.Number.annotate(description="Unix timestamp (in seconds) of when this Response was completed.\nOnly present when the status is `completed`.\n", format="unixtime"), _S.is_finite().annotate(expected="a finite number")), _S.Null), "error": ResponseError, "incomplete_details": _b.union(_b.struct(_T.Response__incomplete_details__0, {"reason": _b.literals(["max_output_tokens", "max_messages", "content_filter", "steered"]).annotate(description="The reason why the response is incomplete. `steered` means\nthe response stopped at a safe output boundary after a\nWebSocket `response.steer` event. The server can then create\na successor response automatically with the queued input.\n")}, optional=("reason",)).annotate(description="Details about why the response is incomplete.\n"), _S.Null), "output": _b.array(OutputItem).annotate(description="An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n on the model's response.\n- Rather than accessing the first item in the `output` array and\n assuming it's an `assistant` message with the content generated by\n the model, you might consider using the `output_text` property where\n supported in SDKs.\n"), "reasoning": _b.union(Reasoning, _S.Null), "instructions": _b.union(_b.union(_S.String.annotate(description="A text input to the model, equivalent to a text input with the\n`developer` role.\n"), _b.array(InputItem).annotate(title="Input item list", description="A list of one or many input items to the model, containing\ndifferent content types.\n"), mode="one_of").annotate(description="A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n"), _S.Null), "output_text": _b.union(_S.String.annotate(description="SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n"), _S.Null), "usage": _b.union(ResponseUsage, _S.Null), "prompt_cache_options": PromptCacheOptions, "prompt_cache_diagnostics": PromptCacheDiagnostics, "moderation": _b.union(_b.suspend(lambda: Moderation).annotate(description="Moderation results for the response input and output, if moderated completions were requested.\n"), _S.Null), "parallel_tool_calls": _S.Boolean.annotate(description="Whether to allow the model to run tool calls in parallel.\n"), "conversation": _b.union(ResponseConversation, _S.Null), "max_output_tokens": _b.union(_b.check(_S.Number.annotate(description="An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).\n"), _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("top_logprobs", "user", "safety_identifier", "prompt_cache_key", "prompt_cache_retention", "previous_response_id", "background", "max_tool_calls", "text", "prompt", "service_tier", "truncation", "status", "access_programs", "completed_at", "reasoning", "output_text", "usage", "prompt_cache_options", "prompt_cache_diagnostics", "moderation", "conversation", "max_output_tokens",)).annotate(title="The response object", identifier="Response")
|
|
683
|
+
ResponseOutputItemAddedEvent: _StructSchema[_T.ResponseOutputItemAddedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseOutputItemAddedEvent, {"type": _b.literal("response.output_item.added").annotate(description="The type of the event. Always `response.output_item.added`.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was added.\n"), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer")), "item": _b.suspend(lambda: OutputItem).annotate(description="The output item that was added. For reasoning items, `encrypted_content`\nmay be incomplete while the item is in progress. Use the reasoning item\nfrom the corresponding `response.output_item.done` event when passing it\nas input to a subsequent request.\n")}).annotate(description="Emitted when a new output item is added.", identifier="ResponseOutputItemAddedEvent")
|
|
684
|
+
ResponseOutputItemDoneEvent: _StructSchema[_T.ResponseOutputItemDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseOutputItemDoneEvent, {"type": _b.literal("response.output_item.done").annotate(description="The type of the event. Always `response.output_item.done`.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was marked done.\n"), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer")), "item": _b.suspend(lambda: OutputItem).annotate(description="The output item that was marked done.\n")}).annotate(description="Emitted when an output item is marked done.", identifier="ResponseOutputItemDoneEvent")
|
|
685
|
+
ResponseItemList: _StructSchema[_T.ResponseItemList, _t.Never, _t.Never] = _b.struct(_T.ResponseItemList, {"object": _b.literal("list").annotate(description="The type of object returned, must be `list`."), "data": _b.array(ItemResource).annotate(description="A list of items used to generate this response."), "has_more": _S.Boolean.annotate(description="Whether there are more items available."), "first_id": _S.String.annotate(description="The ID of the first item in the list."), "last_id": _S.String.annotate(description="The ID of the last item in the list.")}).annotate(description="A list of Response items.", identifier="ResponseItemList")
|
|
686
|
+
CompactResource: _StructSchema[_T.CompactResource, _t.Never, _t.Never] = _b.struct(_T.CompactResource, {"id": _S.String.annotate(description="The unique identifier for the compacted response."), "object": _b.literal("response.compaction").annotate(description="The object type. Always `response.compaction`."), "output": _b.array(ItemField).annotate(description="The compacted list of output items."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the compacted conversation was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "usage": _b.suspend(lambda: ResponseUsage).annotate(description="Token accounting for the compaction pass, including cached, reasoning, and total tokens.")}).annotate(title="The compacted response object", identifier="CompactResource")
|
|
687
|
+
CreateResponse: _StructSchema[_T.CreateResponse, _t.Never, _t.Never] = _b.struct(_T.CreateResponse, {"metadata": Metadata, "top_logprobs": _b.check(_b.check(_b.check(_b.check(_S.Number.annotate(description="An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n"), _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(20).annotate(expected="a value less than or equal to 20")), _S.make_filter_group(_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(20).annotate(expected="a value less than or equal to 20")).annotate(description="An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n")), "temperature": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n"), _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(2).annotate(expected="a value less than or equal to 2")), _S.Null), "top_p": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n"), _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")), _S.Null), "user": _b.union(_S.String, _S.Null).annotate(description="This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\nA stable identifier for your end-users.\nUsed to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), "safety_identifier": _b.union(_b.check(_S.String.annotate(description="A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 128 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _S.Null), "prompt_cache_key": _b.union(_S.String.annotate(description="Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).\n"), _S.Null), "prompt_cache_retention": _b.union(_b.literals(["in_memory", "24h"]).annotate(description="Deprecated. Use `prompt_cache_options.ttl` instead.\n\nThe retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).\nThis field expresses a maximum retention policy, while\n`prompt_cache_options.ttl` expresses a minimum cache lifetime. The two\nfields are independent and do not interact.\nFor `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.\n\nFor older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:\n - Organizations without ZDR enabled default to `24h`.\n - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.\n"), _S.Null), "prompt_cache_options": _b.struct(_T.CreateResponse__prompt_cache_options, {"ttl": _b.suspend(lambda: PromptCacheTTLEnum).annotate(description="The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer."), "mode": _b.suspend(lambda: PromptCacheModeEnum).annotate(description="Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching."), "prewarm": _S.Boolean.annotate(description="Prepares the prompt cache without generating output. Defaults to `false`. When set to `true`, overrides the `generate` field to `false`."), "comparison_response_id": _b.union(_S.String.annotate(description="The ID of a response to compare when diagnosing prompt cache reuse. Supplying this field requests prompt cache diagnostics when the feature is enabled."), _S.Null)}, optional=("ttl", "mode", "prewarm", "comparison_response_id",)), "previous_response_id": _b.union(_S.String.annotate(description="The unique ID of the previous response to the model. Use this to\ncreate multi-turn conversations. Learn more about\n[conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.\n"), _S.Null), "model": _b.suspend(lambda: ModelIdsResponses).annotate(description="Model ID used to generate the response, like `gpt-6-astra`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models)\nto browse and compare available models.\n"), "background": _b.union(_S.Boolean.annotate(description="Whether to run the model response in the background.\n[Learn more](https://developers.openai.com/api/docs/guides/background).\n"), _S.Null), "max_tool_calls": _b.union(_b.check(_S.Number.annotate(description="The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n"), _S.is_int().annotate(expected="an integer")), _S.Null), "text": ResponseTextParam, "tools": ToolsArray, "tool_choice": ToolChoiceParam, "prompt": Prompt, "access_programs": AccessProgramsParam, "service_tier": ServiceTierResponses, "truncation": _b.union(_b.literals(["auto", "disabled"]).annotate(description="The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n the model's context window size, the model will truncate the\n response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n size for a model, the request will fail with a 400 error.\n"), _S.Null), "reasoning": _b.union(Reasoning, _S.Null), "input": InputParam, "include": _b.union(_b.array(IncludeEnum).annotate(description="Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)."), _S.Null), "parallel_tool_calls": _b.union(_S.Boolean.annotate(description="Whether to allow the model to run tool calls in parallel.\n"), _S.Null), "store": _b.union(_S.Boolean.annotate(description="Whether to store the generated model response for later retrieval via\nAPI.\nDefaults to true when omitted.\nIf set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses).\n"), _S.Null), "instructions": _b.union(_S.String.annotate(description="A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n"), _S.Null), "moderation": _b.union(_b.suspend(lambda: ModerationParam).annotate(description="Configuration for running moderation on the input and output of this response.\n"), _S.Null), "stream": _b.union(_S.Boolean.annotate(description="If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)\nfor more information.\n"), _S.Null), "stream_options": ResponseStreamOptions, "conversation": _b.union(ConversationParam, _S.Null), "context_management": _b.union(_b.check(_b.array(ContextManagementParam).annotate(description="Context management configuration for this request.\n"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null), "max_output_tokens": _b.union(_b.check(_b.check(_S.Number.annotate(description="An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).\n"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(16).annotate(expected="a value greater than or equal to 16")), _S.Null)}, optional=("metadata", "top_logprobs", "temperature", "top_p", "user", "safety_identifier", "prompt_cache_key", "prompt_cache_retention", "prompt_cache_options", "previous_response_id", "model", "background", "max_tool_calls", "text", "tools", "tool_choice", "prompt", "access_programs", "service_tier", "truncation", "reasoning", "input", "include", "parallel_tool_calls", "store", "instructions", "moderation", "stream", "stream_options", "conversation", "context_management", "max_output_tokens",)).annotate(identifier="CreateResponse")
|
|
688
|
+
LiveMediaSessionCreateParams: _StructSchema[_T.LiveMediaSessionCreateParams, _t.Never, _t.Never] = _b.struct(_T.LiveMediaSessionCreateParams, {"model": ModelIdsLive, "instructions": Instructions, "audio": _b.suspend(lambda: LiveMediaSessionAudioParam).annotate(description="Startup audio configuration. WebRTC and SIP negotiate their audio format on the media transport."), "delegation": Delegation, "store": Store, "input": Input, "client": LiveClientConfigParam}, optional=("instructions", "audio", "delegation", "store", "input", "client",)).annotate(description="Startup configuration for a Live media session. Follow the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting) when writing frontend instructions and the backend prompt under delegation.responses.instructions.", identifier="LiveMediaSessionCreateParams")
|
|
689
|
+
LiveCallAcceptSession: _StructSchema[_T.LiveCallAcceptSession, _t.Never, _t.Never] = _b.struct(_T.LiveCallAcceptSession, {"model": _b.union(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _b.literal("gpt-live-1")).annotate(description="The Live model to use for the accepted call."), "instructions": Instructions, "audio": _b.suspend(lambda: LiveMediaSessionAudioParam).annotate(description="Startup audio output configuration. SIP negotiates the media format; audio.format is only accepted for primary WebSockets. Voice cannot change after startup."), "delegation": Delegation, "store": Store, "input": Input, "type": _b.literal("live").annotate(description="The session type. Always `live`.")}, optional=("instructions", "audio", "delegation", "store", "input",)).annotate(description="Startup configuration for accepting an incoming Live SIP call. Follow the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting) when writing frontend and backend instructions.", identifier="LiveCallAcceptSession")
|
|
690
|
+
LiveForkRequest: _StructSchema[_T.LiveForkRequest, _t.Never, _t.Never] = _b.struct(_T.LiveForkRequest, {"session": _b.suspend(lambda: LiveMediaSessionForkParams).annotate(description="Optional configuration overrides for the new Live session. Omit this object or send an empty object to inherit the stored session's settings."), "transport": _b.suspend(lambda: LiveWebRTCTransport).annotate(description="WebRTC transport with an SDP offer for the new connection to the forked session.")}, optional=("session",)).annotate(description="Fork a stored Live session onto a new WebRTC connection. Omit session or send an empty object to inherit its configuration.", identifier="LiveForkRequest")
|
|
691
|
+
SessionEvent: _S.Bottom[_T.SessionEvent, _t.Any] = _b.union(SessionEventError, SessionEventAgentSessionEnvironmentReady, SessionEventAgentSessionEnvironmentSuspended, SessionEventAgentSessionEnvironmentExpired, SessionEventAgentSessionEnvironmentReset, SessionEventAgentOutputCommandExecutionOutputDelta, SessionEventAgentSessionCreated, SessionEventAgentSessionTurnCreated, SessionEventAgentSessionTurnInProgress, SessionEventAgentSessionTurnCompleted, SessionEventAgentSessionTurnFailed, SessionEventAgentSessionTurnCancelled, SessionEventAgentSessionTurnItemAdded, SessionEventAgentSessionIdle, SessionEventAgentSessionInProgress, SessionEventAgentSessionRequiresAction, SessionEventAgentSessionFailed, SessionEventAgentSessionEnvironmentPending, SessionEventAgentSessionEnvironmentConnected, SessionEventAgentSessionEnvironmentDisconnected, SessionEventAgentSessionEnvironmentFailed, SessionEventAgentSessionSubagentCreated, SessionEventAgentSessionSubagentActive, SessionEventAgentSessionSubagentClosed, SessionEventAgentSessionTurnItemDone, SessionEventAgentSessionTurnContentPartAdded, SessionEventAgentSessionTurnContentPartDone, SessionEventAgentSessionTurnOutputTextDelta, SessionEventAgentSessionTurnOutputTextDone, SessionEventAgentSessionTurnReasoningSummaryPartAdded, SessionEventAgentSessionTurnReasoningSummaryPartDone, SessionEventAgentSessionTurnReasoningSummaryTextDelta, SessionEventAgentSessionTurnReasoningSummaryTextDone, mode="one_of").annotate(description="An event emitted by a Managed Agents session.", identifier="SessionEvent")
|
|
692
|
+
BetaResponse: _StructSchema[_T.BetaResponse, _t.Never, _t.Never] = _b.struct(_T.BetaResponse, {"metadata": BetaMetadata, "top_logprobs": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n"), _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(20).annotate(expected="a value less than or equal to 20")), _S.Null), "temperature": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n"), _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(2).annotate(expected="a value less than or equal to 2")), _S.Null), "top_p": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n"), _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")), _S.Null), "user": _b.union(_S.String, _S.Null).annotate(description="This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\nA stable identifier for your end-users.\nUsed to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), "safety_identifier": _b.union(_b.check(_S.String.annotate(description="A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 128 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _S.Null), "prompt_cache_key": _b.union(_S.String.annotate(description="Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).\n"), _S.Null), "prompt_cache_retention": _b.union(_b.literals(["in_memory", "24h"]).annotate(description="Deprecated. Use `prompt_cache_options.ttl` instead.\n\nThe retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).\nThis field expresses a maximum retention policy, while\n`prompt_cache_options.ttl` expresses a minimum cache lifetime. The two\nfields are independent and do not interact.\nFor `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.\n\nFor older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:\n - Organizations without ZDR enabled default to `24h`.\n - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.\n"), _S.Null), "previous_response_id": _b.union(_S.String.annotate(description="The unique ID of the previous response to the model. Use this to\ncreate multi-turn conversations. Learn more about\n[conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.\n"), _S.Null), "model": _b.suspend(lambda: BetaModelIdsResponses).annotate(description="Model ID used to generate the response, like `gpt-6-astra`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models)\nto browse and compare available models.\n"), "background": _b.union(_S.Boolean.annotate(description="Whether to run the model response in the background.\n[Learn more](https://developers.openai.com/api/docs/guides/background).\n"), _S.Null), "max_tool_calls": _b.union(_b.check(_S.Number.annotate(description="The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n"), _S.is_int().annotate(expected="an integer")), _S.Null), "text": BetaResponseTextParam, "tools": BetaToolsArray, "tool_choice": BetaToolChoiceParam, "prompt": BetaPrompt, "service_tier": BetaServiceTierResponses, "truncation": _b.union(_b.literals(["auto", "disabled"]).annotate(description="The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n the model's context window size, the model will truncate the\n response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n size for a model, the request will fail with a 400 error.\n"), _S.Null), "id": _S.String.annotate(description="Unique identifier for this Response.\n"), "object": _b.literal("response").annotate(description="The object type of this resource - always set to `response`.\n"), "status": _b.literals(["completed", "failed", "in_progress", "cancelled", "queued", "incomplete"]).annotate(description="The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n"), "access_programs": _b.union(BetaAccessProgramsBody, _S.Null), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) of when this Response was created.\n", format="unixtime"), _S.is_finite().annotate(expected="a finite number")), "completed_at": _b.union(_b.check(_S.Number.annotate(description="Unix timestamp (in seconds) of when this Response was completed.\nOnly present when the status is `completed`.\n", format="unixtime"), _S.is_finite().annotate(expected="a finite number")), _S.Null), "error": BetaResponseError, "incomplete_details": _b.union(_b.struct(_T.BetaResponse__incomplete_details__0, {"reason": _b.literals(["max_output_tokens", "max_messages", "content_filter", "steered"]).annotate(description="The reason why the response is incomplete. `steered` means\nthe response stopped at a safe output boundary after a\nWebSocket `response.steer` event. The server can then create\na successor response automatically with the queued input.\n")}, optional=("reason",)).annotate(description="Details about why the response is incomplete.\n"), _S.Null), "output": _b.array(BetaOutputItem).annotate(description="An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n on the model's response.\n- Rather than accessing the first item in the `output` array and\n assuming it's an `assistant` message with the content generated by\n the model, you might consider using the `output_text` property where\n supported in SDKs.\n"), "reasoning": _b.union(BetaReasoning, _S.Null), "instructions": _b.union(_b.union(_S.String.annotate(description="A text input to the model, equivalent to a text input with the\n`developer` role.\n"), _b.array(BetaInputItem).annotate(title="Input item list", description="A list of one or many input items to the model, containing\ndifferent content types.\n"), mode="one_of").annotate(description="A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n"), _S.Null), "output_text": _b.union(_S.String.annotate(description="SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n"), _S.Null), "usage": _b.union(BetaResponseUsage, _S.Null), "prompt_cache_options": BetaPromptCacheOptions, "prompt_cache_diagnostics": BetaPromptCacheDiagnostics, "moderation": _b.union(_b.suspend(lambda: BetaModeration).annotate(description="Moderation results for the response input and output, if moderated completions were requested.\n"), _S.Null), "parallel_tool_calls": _S.Boolean.annotate(description="Whether to allow the model to run tool calls in parallel.\n"), "conversation": _b.union(BetaResponseConversation, _S.Null), "max_output_tokens": _b.union(_b.check(_S.Number.annotate(description="An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).\n"), _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("top_logprobs", "user", "safety_identifier", "prompt_cache_key", "prompt_cache_retention", "previous_response_id", "background", "max_tool_calls", "text", "prompt", "service_tier", "truncation", "status", "completed_at", "reasoning", "output_text", "usage", "prompt_cache_options", "prompt_cache_diagnostics", "moderation", "conversation", "max_output_tokens",)).annotate(title="The response object", identifier="BetaResponse")
|
|
693
|
+
BetaResponseOutputItemAddedEvent: _StructSchema[_T.BetaResponseOutputItemAddedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseOutputItemAddedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.output_item.added").annotate(description="The type of the event. Always `response.output_item.added`.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was added.\n"), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer")), "item": _b.suspend(lambda: BetaOutputItem).annotate(description="The output item that was added. For reasoning items, `encrypted_content`\nmay be incomplete while the item is in progress. Use the reasoning item\nfrom the corresponding `response.output_item.done` event when passing it\nas input to a subsequent request.\n")}, optional=("agent",)).annotate(description="Emitted when a new output item is added.", identifier="BetaResponseOutputItemAddedEvent")
|
|
694
|
+
BetaResponseOutputItemDoneEvent: _StructSchema[_T.BetaResponseOutputItemDoneEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseOutputItemDoneEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.output_item.done").annotate(description="The type of the event. Always `response.output_item.done`.\n"), "output_index": _b.check(_S.Number.annotate(description="The index of the output item that was marked done.\n"), _S.is_int().annotate(expected="an integer")), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event.\n"), _S.is_int().annotate(expected="an integer")), "item": _b.suspend(lambda: BetaOutputItem).annotate(description="The output item that was marked done.\n")}, optional=("agent",)).annotate(description="Emitted when an output item is marked done.", identifier="BetaResponseOutputItemDoneEvent")
|
|
695
|
+
BetaCompactResource: _StructSchema[_T.BetaCompactResource, _t.Never, _t.Never] = _b.struct(_T.BetaCompactResource, {"id": _S.String.annotate(description="The unique identifier for the compacted response."), "object": _b.literal("response.compaction").annotate(description="The object type. Always `response.compaction`."), "output": _b.array(BetaItemField).annotate(description="The compacted list of output items."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the compacted conversation was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "usage": _b.suspend(lambda: BetaResponseUsage).annotate(description="Token accounting for the compaction pass, including cached, reasoning, and total tokens.")}).annotate(title="The compacted response object", identifier="BetaCompactResource")
|
|
696
|
+
BetaResponseItemList: _StructSchema[_T.BetaResponseItemList, _t.Never, _t.Never] = _b.struct(_T.BetaResponseItemList, {"object": _b.literal("list").annotate(description="The type of object returned, must be `list`."), "data": _b.array(BetaItemResource).annotate(description="A list of items used to generate this response."), "has_more": _S.Boolean.annotate(description="Whether there are more items available."), "first_id": _S.String.annotate(description="The ID of the first item in the list."), "last_id": _S.String.annotate(description="The ID of the last item in the list.")}).annotate(description="A list of Response items.", identifier="BetaResponseItemList")
|
|
697
|
+
BetaCreateResponse: _StructSchema[_T.BetaCreateResponse, _t.Never, _t.Never] = _b.struct(_T.BetaCreateResponse, {"metadata": BetaMetadata, "top_logprobs": _b.check(_b.check(_b.check(_b.check(_S.Number.annotate(description="An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n"), _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(20).annotate(expected="a value less than or equal to 20")), _S.make_filter_group(_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(20).annotate(expected="a value less than or equal to 20")).annotate(description="An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n")), "temperature": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n"), _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(2).annotate(expected="a value less than or equal to 2")), _S.Null), "top_p": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n"), _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")), _S.Null), "user": _b.union(_S.String, _S.Null).annotate(description="This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\nA stable identifier for your end-users.\nUsed to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), "safety_identifier": _b.union(_b.check(_S.String.annotate(description="A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 128 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), _S.is_max_code_points(128).annotate(expected="a string with at most 128 code points")), _S.Null), "prompt_cache_key": _b.union(_S.String.annotate(description="Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).\n"), _S.Null), "prompt_cache_retention": _b.union(_b.literals(["in_memory", "24h"]).annotate(description="Deprecated. Use `prompt_cache_options.ttl` instead.\n\nThe retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).\nThis field expresses a maximum retention policy, while\n`prompt_cache_options.ttl` expresses a minimum cache lifetime. The two\nfields are independent and do not interact.\nFor `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.\n\nFor older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:\n - Organizations without ZDR enabled default to `24h`.\n - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.\n"), _S.Null), "prompt_cache_options": _b.struct(_T.BetaCreateResponse__prompt_cache_options, {"ttl": _b.suspend(lambda: BetaPromptCacheTTLEnum).annotate(description="The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer."), "mode": _b.suspend(lambda: BetaPromptCacheModeEnum).annotate(description="Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching."), "prewarm": _S.Boolean.annotate(description="Prepares the prompt cache without generating output. Defaults to `false`. When set to `true`, overrides the `generate` field to `false`."), "comparison_response_id": _b.union(_S.String.annotate(description="The ID of a response to compare when diagnosing prompt cache reuse. Supplying this field requests prompt cache diagnostics when the feature is enabled."), _S.Null)}, optional=("ttl", "mode", "prewarm", "comparison_response_id",)), "previous_response_id": _b.union(_S.String.annotate(description="The unique ID of the previous response to the model. Use this to\ncreate multi-turn conversations. Learn more about\n[conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.\n"), _S.Null), "model": _b.suspend(lambda: BetaModelIdsResponses).annotate(description="Model ID used to generate the response, like `gpt-6-astra`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models)\nto browse and compare available models.\n"), "background": _b.union(_S.Boolean.annotate(description="Whether to run the model response in the background.\n[Learn more](https://developers.openai.com/api/docs/guides/background).\n"), _S.Null), "max_tool_calls": _b.union(_b.check(_S.Number.annotate(description="The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n"), _S.is_int().annotate(expected="an integer")), _S.Null), "text": BetaResponseTextParam, "tools": BetaToolsArray, "tool_choice": BetaToolChoiceParam, "prompt": BetaPrompt, "access_programs": BetaAccessProgramsParam, "service_tier": BetaServiceTierResponses, "truncation": _b.union(_b.literals(["auto", "disabled"]).annotate(description="The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n the model's context window size, the model will truncate the\n response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n size for a model, the request will fail with a 400 error.\n"), _S.Null), "reasoning": _b.union(BetaReasoning, _S.Null), "input": BetaInputParam, "include": _b.union(_b.array(BetaIncludeEnum).annotate(description="Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)."), _S.Null), "parallel_tool_calls": _b.union(_S.Boolean.annotate(description="Whether to allow the model to run tool calls in parallel.\n"), _S.Null), "store": _b.union(_S.Boolean.annotate(description="Whether to store the generated model response for later retrieval via\nAPI.\nDefaults to true when omitted.\nIf set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses).\n"), _S.Null), "instructions": _b.union(_S.String.annotate(description="A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n"), _S.Null), "moderation": _b.union(_b.suspend(lambda: BetaModerationParam).annotate(description="Configuration for running moderation on the input and output of this response.\n"), _S.Null), "stream": _b.union(_S.Boolean.annotate(description="If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)\nfor more information.\n"), _S.Null), "stream_options": BetaResponseStreamOptions, "conversation": _b.union(BetaConversationParam, _S.Null), "context_management": _b.union(_b.check(_b.array(BetaContextManagementParam).annotate(description="Context management configuration for this request.\n"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.Null), "max_output_tokens": _b.union(_b.check(_b.check(_S.Number.annotate(description="An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).\n"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(16).annotate(expected="a value greater than or equal to 16")), _S.Null), "multi_agent": _b.union(_b.suspend(lambda: BetaMultiAgentParam).annotate(description="Configuration for server-hosted multi-agent execution."), _S.Null)}, optional=("metadata", "top_logprobs", "temperature", "top_p", "user", "safety_identifier", "prompt_cache_key", "prompt_cache_retention", "prompt_cache_options", "previous_response_id", "model", "background", "max_tool_calls", "text", "tools", "tool_choice", "prompt", "access_programs", "service_tier", "truncation", "reasoning", "input", "include", "parallel_tool_calls", "store", "instructions", "moderation", "stream", "stream_options", "conversation", "context_management", "max_output_tokens", "multi_agent",)).annotate(identifier="BetaCreateResponse")
|
|
698
|
+
EvalList: _StructSchema[_T.EvalList, _t.Never, _t.Never] = _b.struct(_T.EvalList, {"object": _b.literal("list").annotate(description="The type of this object. It is always set to \"list\".\n"), "data": _b.array(Eval).annotate(description="An array of eval objects.\n"), "first_id": _S.String.annotate(description="The identifier of the first eval in the data array."), "last_id": _S.String.annotate(description="The identifier of the last eval in the data array."), "has_more": _S.Boolean.annotate(description="Indicates whether there are more evals available.")}).annotate(title="EvalList", description="An object representing a list of evals.\n", identifier="EvalList")
|
|
699
|
+
CreateEvalRequest: _StructSchema[_T.CreateEvalRequest, _t.Never, _t.Never] = _b.struct(_T.CreateEvalRequest, {"name": _S.String.annotate(description="The name of the evaluation."), "metadata": Metadata, "data_source_config": _b.union(CreateEvalCustomDataSourceConfig, CreateEvalLogsDataSourceConfig, CreateEvalStoredCompletionsDataSourceConfig, mode="one_of").annotate(description="The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation."), "testing_criteria": _b.array(_b.union(CreateEvalLabelModelGrader, EvalGraderStringCheck, EvalGraderTextSimilarity, EvalGraderPython, EvalGraderScoreModel, mode="one_of")).annotate(description="A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`).")}, optional=("name", "metadata",)).annotate(title="CreateEvalRequest", identifier="CreateEvalRequest")
|
|
700
|
+
EvalRunList: _StructSchema[_T.EvalRunList, _t.Never, _t.Never] = _b.struct(_T.EvalRunList, {"object": _b.literal("list").annotate(description="The type of this object. It is always set to \"list\".\n"), "data": _b.array(EvalRun).annotate(description="An array of eval run objects.\n"), "first_id": _S.String.annotate(description="The identifier of the first eval run in the data array."), "last_id": _S.String.annotate(description="The identifier of the last eval run in the data array."), "has_more": _S.Boolean.annotate(description="Indicates whether there are more evals available.")}).annotate(title="EvalRunList", description="An object representing a list of runs for an evaluation.\n", identifier="EvalRunList")
|
|
701
|
+
RunGraderRequest: _StructSchema[_T.RunGraderRequest, _t.Never, _t.Never] = _b.struct(_T.RunGraderRequest, {"grader": _b.union(GraderStringCheck, GraderTextSimilarity, GraderPython, GraderScoreModel, GraderMulti, mode="one_of").annotate(description="The grader used for the fine-tuning job."), "item": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The dataset item provided to the grader. This will be used to populate\nthe `item` namespace. See [the guide](https://developers.openai.com/api/docs/guides/graders) for more details.\n"), "model_sample": _S.String.annotate(description="The model sample to be evaluated. This value will be used to populate\nthe `sample` namespace. See [the guide](https://developers.openai.com/api/docs/guides/graders) for more details.\nThe `output_json` variable will be populated if the model sample is a\nvalid JSON string.\n")}, optional=("item",)).annotate(title="RunGraderRequest", identifier="RunGraderRequest")
|
|
702
|
+
ValidateGraderRequest: _StructSchema[_T.ValidateGraderRequest, _t.Never, _t.Never] = _b.struct(_T.ValidateGraderRequest, {"grader": _b.union(GraderStringCheck, GraderTextSimilarity, GraderPython, GraderScoreModel, GraderMulti, mode="one_of").annotate(description="The grader used for the fine-tuning job.")}).annotate(title="ValidateGraderRequest", identifier="ValidateGraderRequest")
|
|
703
|
+
ValidateGraderResponse: _StructSchema[_T.ValidateGraderResponse, _t.Never, _t.Never] = _b.struct(_T.ValidateGraderResponse, {"grader": _b.union(GraderStringCheck, GraderTextSimilarity, GraderPython, GraderScoreModel, GraderMulti, mode="one_of").annotate(description="The grader used for the fine-tuning job.")}, optional=("grader",)).annotate(title="ValidateGraderResponse", identifier="ValidateGraderResponse")
|
|
704
|
+
FineTuneReinforcementMethod: _StructSchema[_T.FineTuneReinforcementMethod, _t.Never, _t.Never] = _b.struct(_T.FineTuneReinforcementMethod, {"grader": _b.union(GraderStringCheck, GraderTextSimilarity, GraderPython, GraderScoreModel, GraderMulti, mode="one_of").annotate(description="The grader used for the fine-tuning job."), "hyperparameters": FineTuneReinforcementHyperparameters}, optional=("hyperparameters",)).annotate(description="Configuration for the reinforcement fine-tuning method.", identifier="FineTuneReinforcementMethod")
|
|
705
|
+
ResponseCompletedEvent: _StructSchema[_T.ResponseCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseCompletedEvent, {"type": _b.literal("response.completed").annotate(description="The type of the event. Always `response.completed`.\n"), "response": _b.suspend(lambda: Response).annotate(description="Properties of the completed response.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number for this event."), _S.is_int().annotate(expected="an integer"))}).annotate(description="Emitted when the model response is complete.", identifier="ResponseCompletedEvent")
|
|
706
|
+
ResponseCreatedEvent: _StructSchema[_T.ResponseCreatedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseCreatedEvent, {"type": _b.literal("response.created").annotate(description="The type of the event. Always `response.created`.\n"), "response": _b.suspend(lambda: Response).annotate(description="The response that was created.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number for this event."), _S.is_int().annotate(expected="an integer"))}).annotate(description="An event that is emitted when a response is created.\n", identifier="ResponseCreatedEvent")
|
|
707
|
+
ResponseInProgressEvent: _StructSchema[_T.ResponseInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseInProgressEvent, {"type": _b.literal("response.in_progress").annotate(description="The type of the event. Always `response.in_progress`.\n"), "response": _b.suspend(lambda: Response).annotate(description="The response that is in progress.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}).annotate(description="Emitted when the response is in progress.", identifier="ResponseInProgressEvent")
|
|
708
|
+
ResponseFailedEvent: _StructSchema[_T.ResponseFailedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseFailedEvent, {"type": _b.literal("response.failed").annotate(description="The type of the event. Always `response.failed`.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "response": _b.suspend(lambda: Response).annotate(description="The response that failed.\n")}).annotate(description="An event that is emitted when a response fails.\n", identifier="ResponseFailedEvent")
|
|
709
|
+
ResponseIncompleteEvent: _StructSchema[_T.ResponseIncompleteEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseIncompleteEvent, {"type": _b.literal("response.incomplete").annotate(description="The type of the event. Always `response.incomplete`.\n"), "response": _b.suspend(lambda: Response).annotate(description="The response that was incomplete.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}).annotate(description="An event that is emitted when a response finishes as incomplete.\n\nOver WebSocket, steering can finish a response with\n`response.incomplete_details.reason` set to `steered`, followed automatically\nby a successor `response.created` that commits the queued steering input.\n", identifier="ResponseIncompleteEvent")
|
|
710
|
+
ResponseQueuedEvent: _StructSchema[_T.ResponseQueuedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseQueuedEvent, {"type": _b.literal("response.queued").annotate(description="The type of the event. Always 'response.queued'."), "response": _b.suspend(lambda: Response).annotate(description="The full response object that is queued."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number for this event."), _S.is_int().annotate(expected="an integer"))}).annotate(title="ResponseQueuedEvent", description="Emitted when a response is queued and waiting to be processed.\n", identifier="ResponseQueuedEvent")
|
|
711
|
+
LiveSessionCreateRequest: _StructSchema[_T.LiveSessionCreateRequest, _t.Never, _t.Never] = _b.struct(_T.LiveSessionCreateRequest, {"session": _b.suspend(lambda: LiveMediaSessionCreateParams).annotate(description="Startup configuration for the Live session."), "transport": _b.union(LiveWebRTCTransport, LiveSIPTransport, mode="one_of").annotate(description="WebRTC transport with an SDP offer, or SIP transport with a destination and per-call trunk credentials.")}).annotate(description="Create a Live session with a WebRTC SDP offer or place an outbound SIP call. Follow the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting) before choosing frontend and backend instructions. The request starts the session; do not send session.start again on the data channel or sideband.", identifier="LiveSessionCreateRequest")
|
|
712
|
+
LiveCallAcceptRequest: _StructSchema[_T.LiveCallAcceptRequest, _t.Never, _t.Never] = _b.struct(_T.LiveCallAcceptRequest, {"session": _b.suspend(lambda: LiveCallAcceptSession).annotate(description="Model and startup configuration for the Live session that answers the incoming SIP call.")}).annotate(description="Accept an incoming SIP call with Live startup configuration.", identifier="LiveCallAcceptRequest")
|
|
713
|
+
BetaResponseCompletedEvent: _StructSchema[_T.BetaResponseCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseCompletedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.completed").annotate(description="The type of the event. Always `response.completed`.\n"), "response": _b.suspend(lambda: BetaResponse).annotate(description="Properties of the completed response.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number for this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when the model response is complete.", identifier="BetaResponseCompletedEvent")
|
|
714
|
+
BetaResponseCreatedEvent: _StructSchema[_T.BetaResponseCreatedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseCreatedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.created").annotate(description="The type of the event. Always `response.created`.\n"), "response": _b.suspend(lambda: BetaResponse).annotate(description="The response that was created.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number for this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="An event that is emitted when a response is created.\n", identifier="BetaResponseCreatedEvent")
|
|
715
|
+
BetaResponseInProgressEvent: _StructSchema[_T.BetaResponseInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseInProgressEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.in_progress").annotate(description="The type of the event. Always `response.in_progress`.\n"), "response": _b.suspend(lambda: BetaResponse).annotate(description="The response that is in progress.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="Emitted when the response is in progress.", identifier="BetaResponseInProgressEvent")
|
|
716
|
+
BetaResponseFailedEvent: _StructSchema[_T.BetaResponseFailedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseFailedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.failed").annotate(description="The type of the event. Always `response.failed`.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer")), "response": _b.suspend(lambda: BetaResponse).annotate(description="The response that failed.\n")}, optional=("agent",)).annotate(description="An event that is emitted when a response fails.\n", identifier="BetaResponseFailedEvent")
|
|
717
|
+
BetaResponseIncompleteEvent: _StructSchema[_T.BetaResponseIncompleteEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseIncompleteEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.incomplete").annotate(description="The type of the event. Always `response.incomplete`.\n"), "response": _b.suspend(lambda: BetaResponse).annotate(description="The response that was incomplete.\n"), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(description="An event that is emitted when a response finishes as incomplete.\n\nOver WebSocket, steering can finish a response with\n`response.incomplete_details.reason` set to `steered`, followed automatically\nby a successor `response.created` that commits the queued steering input.\n", identifier="BetaResponseIncompleteEvent")
|
|
718
|
+
BetaResponseQueuedEvent: _StructSchema[_T.BetaResponseQueuedEvent, _t.Never, _t.Never] = _b.struct(_T.BetaResponseQueuedEvent, {"agent": _b.union(BetaAgentTag, _S.Null).annotate(description="The agent that owns this multi-agent streaming event."), "type": _b.literal("response.queued").annotate(description="The type of the event. Always 'response.queued'."), "response": _b.suspend(lambda: BetaResponse).annotate(description="The full response object that is queued."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number for this event."), _S.is_int().annotate(expected="an integer"))}, optional=("agent",)).annotate(title="ResponseQueuedEvent", description="Emitted when a response is queued and waiting to be processed.\n", identifier="BetaResponseQueuedEvent")
|
|
719
|
+
FineTuneMethod: _StructSchema[_T.FineTuneMethod, _t.Never, _t.Never] = _b.struct(_T.FineTuneMethod, {"type": _b.literals(["supervised", "dpo", "reinforcement"]).annotate(description="The type of method. Is either `supervised`, `dpo`, or `reinforcement`."), "supervised": FineTuneSupervisedMethod, "dpo": FineTuneDPOMethod, "reinforcement": FineTuneReinforcementMethod}, optional=("supervised", "dpo", "reinforcement",)).annotate(description="The method used for fine-tuning.", identifier="FineTuneMethod")
|
|
720
|
+
ResponseStreamEvent: _S.Bottom[_T.ResponseStreamEvent, _t.Any] = _b.union(ResponseAudioDeltaEvent, ResponseAudioDoneEvent, ResponseAudioTranscriptDeltaEvent, ResponseAudioTranscriptDoneEvent, ResponseCodeInterpreterCallCodeDeltaEvent, ResponseCodeInterpreterCallCodeDoneEvent, ResponseCodeInterpreterCallCompletedEvent, ResponseCodeInterpreterCallInProgressEvent, ResponseCodeInterpreterCallInterpretingEvent, ResponseCompactionCompactingStreamingEvent, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseContentPartDoneEvent, ResponseCreatedEvent, ResponseErrorEvent, ResponseFileSearchCallCompletedEvent, ResponseFileSearchCallInProgressEvent, ResponseFileSearchCallSearchingEvent, ResponseFunctionCallArgumentsDeltaEvent, ResponseFunctionCallArgumentsDoneEvent, ResponseShellCallCommandAddedStreamingEvent, ResponseShellCallCommandDeltaStreamingEvent, ResponseShellCallCommandDoneStreamingEvent, ResponseShellCallOutputContentDeltaStreamingEvent, ResponseShellCallOutputContentDoneStreamingEvent, ResponseInProgressEvent, ResponseFailedEvent, ResponseIncompleteEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseReasoningSummaryPartAddedEvent, ResponseReasoningSummaryPartDoneEvent, ResponseReasoningSummaryTextDeltaEvent, ResponseReasoningSummaryTextDoneEvent, ResponseReasoningTextDeltaEvent, ResponseReasoningTextDoneEvent, ResponseRefusalDeltaEvent, ResponseRefusalDoneEvent, ResponseTextDeltaEvent, ResponseTextDoneEvent, ResponseWebSearchCallCompletedEvent, ResponseWebSearchCallInProgressEvent, ResponseWebSearchCallSearchingEvent, ResponseImageGenCallCompletedEvent, ResponseImageGenCallGeneratingEvent, ResponseImageGenCallInProgressEvent, ResponseImageGenCallPartialImageEvent, ResponseMCPCallArgumentsDeltaEvent, ResponseMCPCallArgumentsDoneEvent, ResponseMCPCallCompletedEvent, ResponseMCPCallFailedEvent, ResponseMCPCallInProgressEvent, ResponseMCPListToolsCompletedEvent, ResponseMCPListToolsFailedEvent, ResponseMCPListToolsInProgressEvent, ResponseOutputTextAnnotationAddedEvent, ResponseQueuedEvent, ResponseCustomToolCallInputDeltaEvent, ResponseCustomToolCallInputDoneEvent, ResponseKeepAliveEvent, ResponseApplyPatchCallOperationDiffDeltaEvent, ResponseApplyPatchCallOperationDiffDoneEvent).annotate(description="Event emitted while a response is streamed.", identifier="ResponseStreamEvent")
|
|
721
|
+
BetaResponseStreamEvent: _S.Bottom[_T.BetaResponseStreamEvent, _t.Any] = _b.union(BetaResponseAudioDeltaEvent, BetaResponseAudioDoneEvent, BetaResponseAudioTranscriptDeltaEvent, BetaResponseAudioTranscriptDoneEvent, BetaResponseCodeInterpreterCallCodeDeltaEvent, BetaResponseCodeInterpreterCallCodeDoneEvent, BetaResponseCodeInterpreterCallCompletedEvent, BetaResponseCodeInterpreterCallInProgressEvent, BetaResponseCodeInterpreterCallInterpretingEvent, BetaResponseCompactionCompactingStreamingEvent, BetaResponseCompletedEvent, BetaResponseContentPartAddedEvent, BetaResponseContentPartDoneEvent, BetaResponseCreatedEvent, BetaResponseErrorEvent, BetaResponseFileSearchCallCompletedEvent, BetaResponseFileSearchCallInProgressEvent, BetaResponseFileSearchCallSearchingEvent, BetaResponseFunctionCallArgumentsDeltaEvent, BetaResponseFunctionCallArgumentsDoneEvent, BetaResponseShellCallCommandAddedStreamingEvent, BetaResponseShellCallCommandDeltaStreamingEvent, BetaResponseShellCallCommandDoneStreamingEvent, BetaResponseShellCallOutputContentDeltaStreamingEvent, BetaResponseShellCallOutputContentDoneStreamingEvent, BetaResponseInProgressEvent, BetaResponseFailedEvent, BetaResponseIncompleteEvent, BetaResponseOutputItemAddedEvent, BetaResponseOutputItemDoneEvent, BetaResponseReasoningSummaryPartAddedEvent, BetaResponseReasoningSummaryPartDoneEvent, BetaResponseReasoningSummaryTextDeltaEvent, BetaResponseReasoningSummaryTextDoneEvent, BetaResponseReasoningTextDeltaEvent, BetaResponseReasoningTextDoneEvent, BetaResponseRefusalDeltaEvent, BetaResponseRefusalDoneEvent, BetaResponseTextDeltaEvent, BetaResponseTextDoneEvent, BetaResponseWebSearchCallCompletedEvent, BetaResponseWebSearchCallInProgressEvent, BetaResponseWebSearchCallSearchingEvent, BetaResponseImageGenCallCompletedEvent, BetaResponseImageGenCallGeneratingEvent, BetaResponseImageGenCallInProgressEvent, BetaResponseImageGenCallPartialImageEvent, BetaResponseMCPCallArgumentsDeltaEvent, BetaResponseMCPCallArgumentsDoneEvent, BetaResponseMCPCallCompletedEvent, BetaResponseMCPCallFailedEvent, BetaResponseMCPCallInProgressEvent, BetaResponseMCPListToolsCompletedEvent, BetaResponseMCPListToolsFailedEvent, BetaResponseMCPListToolsInProgressEvent, BetaResponseOutputTextAnnotationAddedEvent, BetaResponseQueuedEvent, BetaResponseCustomToolCallInputDeltaEvent, BetaResponseCustomToolCallInputDoneEvent).annotate(description="Event emitted while a response is streamed.", identifier="BetaResponseStreamEvent")
|
|
722
|
+
FineTuningJob: _S.Bottom[_T.FineTuningJob, _t.Any] = _b.union(_b.struct(_T.FineTuningJob__0, {"id": _S.String.annotate(description="The object identifier, which can be referenced in the API endpoints."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the fine-tuning job was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "error": _b.union(_b.struct(_T.FineTuningJob__0__error__0, {"code": _S.String.annotate(description="A machine-readable error code."), "message": _S.String.annotate(description="A human-readable error message."), "param": _b.union(_S.String.annotate(description="The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific."), _S.Null)}).annotate(description="For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure."), _S.Null, _b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.is_max_properties(0).annotate(expected="a value with at most 0 entries"))), "fine_tuned_model": _b.union(_S.String.annotate(description="The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running."), _S.Null), "finished_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "hyperparameters": _b.union(_b.struct_with_rest(_b.struct(_T.FineTuningJob__0__hyperparameters__0, {"batch_size": _b.union(_b.union(_b.literal("auto"), _b.check(_b.check(_b.check(_S.Number, _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(256).annotate(expected="a value less than or equal to 256")), mode="one_of").annotate(description="Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.\n"), _S.Null), "learning_rate_multiplier": _b.union(_b.literal("auto"), _b.check(_S.Finite, _S.is_greater_than(0).annotate(expected="a value greater than 0")), mode="one_of").annotate(description="Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.\n"), "n_epochs": _b.union(_b.literal("auto"), _b.check(_b.check(_b.check(_S.Number, _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(50).annotate(expected="a value less than or equal to 50")), mode="one_of").annotate(description="The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.\n")}, optional=("batch_size", "learning_rate_multiplier", "n_epochs",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs."), "model": _S.String.annotate(description="The base model that is being fine-tuned."), "object": _b.literal("fine_tuning.job").annotate(description="The object type, which is always \"fine_tuning.job\"."), "organization_id": _S.String.annotate(description="The organization that owns the fine-tuning job."), "result_files": _b.array(_S.String).annotate(description="The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content)."), "status": _b.literals(["validating_files", "queued", "running", "succeeded", "failed", "cancelled", "pausing", "paused"]).annotate(description="The current status of the fine-tuning job, which can be `validating_files`, `queued`, `running`, `pausing`, `paused`, `succeeded`, `failed`, or `cancelled`."), "trained_tokens": _b.union(_b.check(_S.Number.annotate(description="The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running."), _S.is_int().annotate(expected="an integer")), _S.Null), "training_file": _S.String.annotate(description="The file ID used for training. You can retrieve the training data with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content)."), "validation_file": _b.union(_S.String.annotate(description="The file ID used for validation. You can retrieve the validation results with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content)."), _S.Null), "integrations": _b.union(_b.check(_b.array(_b.union(FineTuningIntegration, mode="one_of")).annotate(description="A list of integrations to enable for this fine-tuning job."), _S.is_max_length(5).annotate(expected="a value with a length of at most 5")), _S.Null), "seed": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The seed used for the fine-tuning job."), "estimated_finish": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "method": _b.union(_b.struct(_T.FineTuningJob__0__method__0, {"type": _b.union(_b.literal("dpo").annotate(description="The type of method. Is either `supervised`, `dpo`, or `reinforcement`."), _b.literal("reinforcement").annotate(description="The type of method. Is either `supervised`, `dpo`, or `reinforcement`.")), "supervised": FineTuneSupervisedMethod, "dpo": FineTuneDPOMethod, "reinforcement": FineTuneReinforcementMethod}, optional=("supervised", "dpo", "reinforcement",)).annotate(description="The method used for fine-tuning.")), "metadata": Metadata}, optional=("hyperparameters", "integrations", "estimated_finish", "metadata",)), _b.struct(_T.FineTuningJob__1, {"id": _S.String.annotate(description="The object identifier, which can be referenced in the API endpoints."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the fine-tuning job was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "error": _b.union(_b.struct(_T.FineTuningJob__1__error__0, {"code": _S.String.annotate(description="A machine-readable error code."), "message": _S.String.annotate(description="A human-readable error message."), "param": _b.union(_S.String.annotate(description="The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific."), _S.Null)}).annotate(description="For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure."), _S.Null, _b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.is_max_properties(0).annotate(expected="a value with at most 0 entries"))), "fine_tuned_model": _b.union(_S.String.annotate(description="The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running."), _S.Null), "finished_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "hyperparameters": _b.union(_b.struct_with_rest(_b.struct(_T.FineTuningJob__1__hyperparameters__0, {"batch_size": _b.union(_b.union(_b.literal("auto"), _b.check(_b.check(_b.check(_S.Number, _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(256).annotate(expected="a value less than or equal to 256")), mode="one_of").annotate(description="Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.\n"), _S.Null), "learning_rate_multiplier": _b.union(_b.literal("auto"), _b.check(_S.Finite, _S.is_greater_than(0).annotate(expected="a value greater than 0")), mode="one_of").annotate(description="Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.\n"), "n_epochs": _b.union(_b.literal("auto"), _b.check(_b.check(_b.check(_S.Number, _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(50).annotate(expected="a value less than or equal to 50")), mode="one_of").annotate(description="The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.\n")}, optional=("batch_size", "learning_rate_multiplier", "n_epochs",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null).annotate(description="The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs."), "model": _S.String.annotate(description="The base model that is being fine-tuned."), "object": _b.literal("fine_tuning.job").annotate(description="The object type, which is always \"fine_tuning.job\"."), "organization_id": _S.String.annotate(description="The organization that owns the fine-tuning job."), "result_files": _b.array(_S.String).annotate(description="The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content)."), "status": _b.literals(["validating_files", "queued", "running", "succeeded", "failed", "cancelled", "pausing", "paused"]).annotate(description="The current status of the fine-tuning job, which can be `validating_files`, `queued`, `running`, `pausing`, `paused`, `succeeded`, `failed`, or `cancelled`."), "trained_tokens": _b.union(_b.check(_S.Number.annotate(description="The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running."), _S.is_int().annotate(expected="an integer")), _S.Null), "training_file": _S.String.annotate(description="The file ID used for training. You can retrieve the training data with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content)."), "validation_file": _b.union(_S.String.annotate(description="The file ID used for validation. You can retrieve the validation results with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content)."), _S.Null), "integrations": _b.union(_b.check(_b.array(_b.union(FineTuningIntegration, mode="one_of")).annotate(description="A list of integrations to enable for this fine-tuning job."), _S.is_max_length(5).annotate(expected="a value with a length of at most 5")), _S.Null), "seed": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The seed used for the fine-tuning job."), "estimated_finish": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "method": _b.union(FineTuneMethod, _S.Null), "metadata": Metadata}, optional=("integrations", "estimated_finish", "method", "metadata",))).annotate(title="FineTuningJob", description="The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.\n", identifier="FineTuningJob")
|
|
723
|
+
CreateFineTuningJobRequest: _StructSchema[_T.CreateFineTuningJobRequest, _t.Never, _t.Never] = _b.struct(_T.CreateFineTuningJobRequest, {"model": _b.union(_S.String, _b.literals(["babbage-002", "davinci-002", "gpt-3.5-turbo", "gpt-4o-mini"])).annotate(description="The name of the model to fine-tune. You can select one of the\n[supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods).\n"), "training_file": _S.String.annotate(description="The ID of an uploaded file that contains training data.\n\nSee [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) format, or if the fine-tuning method uses the [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) format.\n\nSee the [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details.\n"), "hyperparameters": _b.struct(_T.CreateFineTuningJobRequest__hyperparameters, {"batch_size": _b.union(_b.literal("auto"), _b.check(_b.check(_b.check(_S.Number, _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(256).annotate(expected="a value less than or equal to 256")), mode="one_of").annotate(description="Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.\n"), "learning_rate_multiplier": _b.union(_b.literal("auto"), _b.check(_S.Finite, _S.is_greater_than(0).annotate(expected="a value greater than 0")), mode="one_of").annotate(description="Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.\n"), "n_epochs": _b.union(_b.literal("auto"), _b.check(_b.check(_b.check(_S.Number, _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(50).annotate(expected="a value less than or equal to 50")), mode="one_of").annotate(description="The number of epochs to train the model for. An epoch refers to one full cycle\nthrough the training dataset.\n")}, optional=("batch_size", "learning_rate_multiplier", "n_epochs",)).annotate(description="The hyperparameters used for the fine-tuning job.\nThis value is now deprecated in favor of `method`, and should be passed in under the `method` parameter.\n"), "suffix": _b.union(_b.check(_b.check(_S.String, _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(64).annotate(expected="a string with at most 64 code points")), _S.Null).annotate(description="A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.\n"), "validation_file": _b.union(_S.String, _S.Null).annotate(description="The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details.\n"), "integrations": _b.union(_b.array(_b.struct(_T.CreateFineTuningJobRequest__integrations__0__item, {"type": _b.union(_b.literal("wandb"), mode="one_of").annotate(description="The type of integration to enable. Currently, only \"wandb\" (Weights and Biases) is supported.\n"), "wandb": _b.struct(_T.CreateFineTuningJobRequest__integrations__0__item__wandb, {"project": _S.String.annotate(description="The name of the project that the new run will be created under.\n"), "name": _b.union(_S.String, _S.Null).annotate(description="A display name to set for the run. If not set, we will use the Job ID as the name.\n"), "entity": _b.union(_S.String, _S.Null).annotate(description="The entity to use for the run. This allows you to set the team or username of the WandB user that you would\nlike associated with the run. If not set, the default entity for the registered WandB API key is used.\n"), "tags": _b.array(_S.String).annotate(description="A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some\ndefault tags are generated by OpenAI: \"openai/finetune\", \"openai/{base-model}\", \"openai/{ftjob-abcdef}\".\n")}, optional=("name", "entity", "tags",)).annotate(description="The settings for your integration with Weights and Biases. This payload specifies the project that\nmetrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\nto your run, and set a default entity (team, username, etc) to be associated with your run.\n")})), _S.Null).annotate(description="A list of integrations to enable for your fine-tuning job."), "seed": _b.union(_b.check(_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.is_less_than_or_equal_to(2147483647).annotate(expected="a value less than or equal to 2147483647")), _S.Null).annotate(description="The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.\n"), "method": FineTuneMethod, "metadata": Metadata}, optional=("hyperparameters", "suffix", "validation_file", "integrations", "seed", "method", "metadata",)).annotate(identifier="CreateFineTuningJobRequest")
|
|
724
|
+
ListPaginatedFineTuningJobsResponse: _StructSchema[_T.ListPaginatedFineTuningJobsResponse, _t.Never, _t.Never] = _b.struct(_T.ListPaginatedFineTuningJobsResponse, {"data": _b.array(FineTuningJob), "has_more": _S.Boolean, "object": _b.literal("list")}).annotate(identifier="ListPaginatedFineTuningJobsResponse")
|
|
725
|
+
ListAssistantsParams: _StructSchema[_T.ListAssistantsParams, _t.Never, _t.Never] = _b.struct(_T.ListAssistantsParams, {"limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "order": _b.literals(["asc", "desc"]), "after": _S.String, "before": _S.String}, optional=("limit", "order", "after", "before",))
|
|
726
|
+
ListAssistants200: _S.Bottom[_T.ListAssistants200, _t.Any] = ListAssistantsResponse
|
|
727
|
+
ListAssistants429: _S.Bottom[_T.ListAssistants429, _t.Any] = ErrorResponse
|
|
728
|
+
CreateAssistantRequestJson: _S.Bottom[_T.CreateAssistantRequestJson, _t.Any] = CreateAssistantRequest
|
|
729
|
+
CreateAssistant200: _S.Bottom[_T.CreateAssistant200, _t.Any] = AssistantObject
|
|
730
|
+
CreateAssistant429: _S.Bottom[_T.CreateAssistant429, _t.Any] = ErrorResponse
|
|
731
|
+
GetAssistant200: _S.Bottom[_T.GetAssistant200, _t.Any] = AssistantObject
|
|
732
|
+
GetAssistant429: _S.Bottom[_T.GetAssistant429, _t.Any] = ErrorResponse
|
|
733
|
+
ModifyAssistantRequestJson: _S.Bottom[_T.ModifyAssistantRequestJson, _t.Any] = ModifyAssistantRequest
|
|
734
|
+
ModifyAssistant200: _S.Bottom[_T.ModifyAssistant200, _t.Any] = AssistantObject
|
|
735
|
+
ModifyAssistant429: _S.Bottom[_T.ModifyAssistant429, _t.Any] = ErrorResponse
|
|
736
|
+
DeleteAssistant200: _S.Bottom[_T.DeleteAssistant200, _t.Any] = DeleteAssistantResponse
|
|
737
|
+
DeleteAssistant429: _S.Bottom[_T.DeleteAssistant429, _t.Any] = ErrorResponse
|
|
738
|
+
CreateSpeechRequestJson: _S.Bottom[_T.CreateSpeechRequestJson, _t.Any] = CreateSpeechRequest
|
|
739
|
+
CreateSpeech200Sse: _S.Bottom[_T.CreateSpeech200Sse, _t.Any] = CreateSpeechResponseStreamEvent
|
|
740
|
+
CreateSpeech400: _S.Bottom[_T.CreateSpeech400, _t.Any] = ErrorResponse
|
|
741
|
+
CreateSpeech401: _S.Bottom[_T.CreateSpeech401, _t.Any] = ErrorResponse
|
|
742
|
+
CreateSpeech429: _S.Bottom[_T.CreateSpeech429, _t.Any] = ErrorResponse
|
|
743
|
+
CreateSpeech500: _S.Bottom[_T.CreateSpeech500, _t.Any] = ErrorResponse
|
|
744
|
+
CreateSpeech503: _S.Bottom[_T.CreateSpeech503, _t.Any] = ErrorResponse
|
|
745
|
+
CreateTranscriptionRequestFormData: _S.Bottom[_T.CreateTranscriptionRequestFormData, _t.Any] = CreateTranscriptionRequestMultipart
|
|
746
|
+
CreateTranscription200: _S.Bottom[_T.CreateTranscription200, _t.Any] = _b.union(CreateTranscriptionResponseJson, CreateTranscriptionResponseDiarizedJson, CreateTranscriptionResponseVerboseJson)
|
|
747
|
+
CreateTranscription200Sse: _S.Bottom[_T.CreateTranscription200Sse, _t.Any] = CreateTranscriptionResponseStreamEvent
|
|
748
|
+
CreateTranscription400: _S.Bottom[_T.CreateTranscription400, _t.Any] = ErrorResponse
|
|
749
|
+
CreateTranscription401: _S.Bottom[_T.CreateTranscription401, _t.Any] = ErrorResponse
|
|
750
|
+
CreateTranscription413: _S.Bottom[_T.CreateTranscription413, _t.Any] = ErrorResponse
|
|
751
|
+
CreateTranscription429: _S.Bottom[_T.CreateTranscription429, _t.Any] = ErrorResponse
|
|
752
|
+
CreateTranscription500: _S.Bottom[_T.CreateTranscription500, _t.Any] = ErrorResponse
|
|
753
|
+
CreateTranscription502: _S.Bottom[_T.CreateTranscription502, _t.Any] = ErrorResponse
|
|
754
|
+
CreateTranscription503: _S.Bottom[_T.CreateTranscription503, _t.Any] = ErrorResponse
|
|
755
|
+
CreateTranslationRequestFormData: _S.Bottom[_T.CreateTranslationRequestFormData, _t.Any] = CreateTranslationRequestMultipart
|
|
756
|
+
CreateTranslation200: _S.Bottom[_T.CreateTranslation200, _t.Any] = _b.union(CreateTranslationResponseJson, CreateTranslationResponseVerboseJson, mode="one_of")
|
|
757
|
+
CreateTranslation400: _S.Bottom[_T.CreateTranslation400, _t.Any] = ErrorResponse
|
|
758
|
+
CreateTranslation401: _S.Bottom[_T.CreateTranslation401, _t.Any] = ErrorResponse
|
|
759
|
+
CreateTranslation413: _S.Bottom[_T.CreateTranslation413, _t.Any] = ErrorResponse
|
|
760
|
+
CreateTranslation429: _S.Bottom[_T.CreateTranslation429, _t.Any] = ErrorResponse
|
|
761
|
+
CreateTranslation500: _S.Bottom[_T.CreateTranslation500, _t.Any] = ErrorResponse
|
|
762
|
+
CreateTranslation502: _S.Bottom[_T.CreateTranslation502, _t.Any] = ErrorResponse
|
|
763
|
+
CreateTranslation503: _S.Bottom[_T.CreateTranslation503, _t.Any] = ErrorResponse
|
|
764
|
+
ListVoiceConsentsParams: _StructSchema[_T.ListVoiceConsentsParams, _t.Never, _t.Never] = _b.struct(_T.ListVoiceConsentsParams, {"after": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("after", "limit",))
|
|
765
|
+
ListVoiceConsents200: _S.Bottom[_T.ListVoiceConsents200, _t.Any] = VoiceConsentListResource
|
|
766
|
+
ListVoiceConsents400: _S.Bottom[_T.ListVoiceConsents400, _t.Any] = ErrorResponse
|
|
767
|
+
ListVoiceConsents404: _S.Bottom[_T.ListVoiceConsents404, _t.Any] = ErrorResponse
|
|
768
|
+
CreateVoiceConsentRequestFormData: _S.Bottom[_T.CreateVoiceConsentRequestFormData, _t.Any] = CreateVoiceConsentRequestMultipart
|
|
769
|
+
CreateVoiceConsent200: _S.Bottom[_T.CreateVoiceConsent200, _t.Any] = VoiceConsentResource
|
|
770
|
+
CreateVoiceConsent400: _S.Bottom[_T.CreateVoiceConsent400, _t.Any] = ErrorResponse
|
|
771
|
+
CreateVoiceConsent404: _S.Bottom[_T.CreateVoiceConsent404, _t.Any] = ErrorResponse
|
|
772
|
+
GetVoiceConsent200: _S.Bottom[_T.GetVoiceConsent200, _t.Any] = VoiceConsentResource
|
|
773
|
+
GetVoiceConsent400: _S.Bottom[_T.GetVoiceConsent400, _t.Any] = ErrorResponse
|
|
774
|
+
GetVoiceConsent404: _S.Bottom[_T.GetVoiceConsent404, _t.Any] = ErrorResponse
|
|
775
|
+
UpdateVoiceConsentRequestJson: _S.Bottom[_T.UpdateVoiceConsentRequestJson, _t.Any] = UpdateVoiceConsentRequest
|
|
776
|
+
UpdateVoiceConsent200: _S.Bottom[_T.UpdateVoiceConsent200, _t.Any] = VoiceConsentResource
|
|
777
|
+
UpdateVoiceConsent400: _S.Bottom[_T.UpdateVoiceConsent400, _t.Any] = ErrorResponse
|
|
778
|
+
UpdateVoiceConsent404: _S.Bottom[_T.UpdateVoiceConsent404, _t.Any] = ErrorResponse
|
|
779
|
+
DeleteVoiceConsent200: _S.Bottom[_T.DeleteVoiceConsent200, _t.Any] = VoiceConsentDeletedResource
|
|
780
|
+
DeleteVoiceConsent400: _S.Bottom[_T.DeleteVoiceConsent400, _t.Any] = ErrorResponse
|
|
781
|
+
DeleteVoiceConsent404: _S.Bottom[_T.DeleteVoiceConsent404, _t.Any] = ErrorResponse
|
|
782
|
+
CreateVoiceRequestFormData: _S.Bottom[_T.CreateVoiceRequestFormData, _t.Any] = CreateVoiceRequestMultipart
|
|
783
|
+
CreateVoice200: _S.Bottom[_T.CreateVoice200, _t.Any] = VoiceResource
|
|
784
|
+
CreateVoice400: _S.Bottom[_T.CreateVoice400, _t.Any] = ErrorResponse
|
|
785
|
+
CreateVoice404: _S.Bottom[_T.CreateVoice404, _t.Any] = ErrorResponse
|
|
786
|
+
CreateVoice500: _S.Bottom[_T.CreateVoice500, _t.Any] = ErrorResponse
|
|
787
|
+
ListBatchesParams: _StructSchema[_T.ListBatchesParams, _t.Never, _t.Never] = _b.struct(_T.ListBatchesParams, {"after": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("after", "limit",))
|
|
788
|
+
ListBatches200: _S.Bottom[_T.ListBatches200, _t.Any] = ListBatchesResponse
|
|
789
|
+
ListBatches400: _S.Bottom[_T.ListBatches400, _t.Any] = ErrorResponse
|
|
790
|
+
ListBatches404: _S.Bottom[_T.ListBatches404, _t.Any] = ErrorResponse
|
|
791
|
+
ListBatches429: _S.Bottom[_T.ListBatches429, _t.Any] = ErrorResponse
|
|
792
|
+
CreateBatchRequestJson: _S.Bottom[_T.CreateBatchRequestJson, _t.Any] = CreateBatchRequest
|
|
793
|
+
CreateBatch200: _S.Bottom[_T.CreateBatch200, _t.Any] = Batch
|
|
794
|
+
CreateBatch400: _S.Bottom[_T.CreateBatch400, _t.Any] = ErrorResponse
|
|
795
|
+
CreateBatch429: _S.Bottom[_T.CreateBatch429, _t.Any] = ErrorResponse
|
|
796
|
+
CreateBatch500: _S.Bottom[_T.CreateBatch500, _t.Any] = ErrorResponse
|
|
797
|
+
CreateBatch503: _S.Bottom[_T.CreateBatch503, _t.Any] = ErrorResponse
|
|
798
|
+
RetrieveBatch200: _S.Bottom[_T.RetrieveBatch200, _t.Any] = Batch
|
|
799
|
+
RetrieveBatch400: _S.Bottom[_T.RetrieveBatch400, _t.Any] = ErrorResponse
|
|
800
|
+
RetrieveBatch404: _S.Bottom[_T.RetrieveBatch404, _t.Any] = ErrorResponse
|
|
801
|
+
RetrieveBatch429: _S.Bottom[_T.RetrieveBatch429, _t.Any] = ErrorResponse
|
|
802
|
+
CancelBatch200: _S.Bottom[_T.CancelBatch200, _t.Any] = Batch
|
|
803
|
+
CancelBatch400: _S.Bottom[_T.CancelBatch400, _t.Any] = ErrorResponse
|
|
804
|
+
CancelBatch404: _S.Bottom[_T.CancelBatch404, _t.Any] = ErrorResponse
|
|
805
|
+
CancelBatch409: _S.Bottom[_T.CancelBatch409, _t.Any] = ErrorResponse
|
|
806
|
+
CancelBatch429: _S.Bottom[_T.CancelBatch429, _t.Any] = ErrorResponse
|
|
807
|
+
ListChatCompletionsParams: _StructSchema[_T.ListChatCompletionsParams, _t.Never, _t.Never] = _b.struct(_T.ListChatCompletionsParams, {"model": _S.String, "metadata": Metadata, "after": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "order": _b.literals(["asc", "desc"])}, optional=("model", "metadata", "after", "limit", "order",))
|
|
808
|
+
ListChatCompletions200: _S.Bottom[_T.ListChatCompletions200, _t.Any] = ChatCompletionList
|
|
809
|
+
ListChatCompletions400: _S.Bottom[_T.ListChatCompletions400, _t.Any] = ErrorResponse
|
|
810
|
+
ListChatCompletions429: _S.Bottom[_T.ListChatCompletions429, _t.Any] = ErrorResponse
|
|
811
|
+
ListChatCompletions500: _S.Bottom[_T.ListChatCompletions500, _t.Any] = ErrorResponse
|
|
812
|
+
CreateChatCompletionRequestJson: _S.Bottom[_T.CreateChatCompletionRequestJson, _t.Any] = CreateChatCompletionRequest
|
|
813
|
+
CreateChatCompletion200: _S.Bottom[_T.CreateChatCompletion200, _t.Any] = CreateChatCompletionResponse
|
|
814
|
+
CreateChatCompletion200Sse: _S.Bottom[_T.CreateChatCompletion200Sse, _t.Any] = CreateChatCompletionStreamResponse
|
|
815
|
+
CreateChatCompletion400: _S.Bottom[_T.CreateChatCompletion400, _t.Any] = ErrorResponse
|
|
816
|
+
CreateChatCompletion401: _S.Bottom[_T.CreateChatCompletion401, _t.Any] = ErrorResponse
|
|
817
|
+
CreateChatCompletion404: _S.Bottom[_T.CreateChatCompletion404, _t.Any] = ErrorResponse
|
|
818
|
+
CreateChatCompletion429: _S.Bottom[_T.CreateChatCompletion429, _t.Any] = ErrorResponse
|
|
819
|
+
CreateChatCompletion500: _S.Bottom[_T.CreateChatCompletion500, _t.Any] = ErrorResponse
|
|
820
|
+
CreateChatCompletion503: _S.Bottom[_T.CreateChatCompletion503, _t.Any] = ErrorResponse
|
|
821
|
+
GetChatCompletion200: _S.Bottom[_T.GetChatCompletion200, _t.Any] = CreateChatCompletionResponse
|
|
822
|
+
GetChatCompletion404: _S.Bottom[_T.GetChatCompletion404, _t.Any] = ErrorResponse
|
|
823
|
+
GetChatCompletion429: _S.Bottom[_T.GetChatCompletion429, _t.Any] = ErrorResponse
|
|
824
|
+
GetChatCompletion500: _S.Bottom[_T.GetChatCompletion500, _t.Any] = ErrorResponse
|
|
825
|
+
UpdateChatCompletionRequestJson: _StructSchema[_T.UpdateChatCompletionRequestJson, _t.Never, _t.Never] = _b.struct(_T.UpdateChatCompletionRequestJson, {"metadata": Metadata})
|
|
826
|
+
UpdateChatCompletion200: _S.Bottom[_T.UpdateChatCompletion200, _t.Any] = CreateChatCompletionResponse
|
|
827
|
+
UpdateChatCompletion400: _S.Bottom[_T.UpdateChatCompletion400, _t.Any] = ErrorResponse
|
|
828
|
+
UpdateChatCompletion404: _S.Bottom[_T.UpdateChatCompletion404, _t.Any] = ErrorResponse
|
|
829
|
+
UpdateChatCompletion429: _S.Bottom[_T.UpdateChatCompletion429, _t.Any] = ErrorResponse
|
|
830
|
+
UpdateChatCompletion500: _S.Bottom[_T.UpdateChatCompletion500, _t.Any] = ErrorResponse
|
|
831
|
+
DeleteChatCompletion200: _S.Bottom[_T.DeleteChatCompletion200, _t.Any] = ChatCompletionDeleted
|
|
832
|
+
DeleteChatCompletion404: _S.Bottom[_T.DeleteChatCompletion404, _t.Any] = ErrorResponse
|
|
833
|
+
DeleteChatCompletion429: _S.Bottom[_T.DeleteChatCompletion429, _t.Any] = ErrorResponse
|
|
834
|
+
DeleteChatCompletion500: _S.Bottom[_T.DeleteChatCompletion500, _t.Any] = ErrorResponse
|
|
835
|
+
GetChatCompletionMessagesParams: _StructSchema[_T.GetChatCompletionMessagesParams, _t.Never, _t.Never] = _b.struct(_T.GetChatCompletionMessagesParams, {"after": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "order": _b.literals(["asc", "desc"])}, optional=("after", "limit", "order",))
|
|
836
|
+
GetChatCompletionMessages200: _S.Bottom[_T.GetChatCompletionMessages200, _t.Any] = ChatCompletionMessageList
|
|
837
|
+
GetChatCompletionMessages400: _S.Bottom[_T.GetChatCompletionMessages400, _t.Any] = ErrorResponse
|
|
838
|
+
GetChatCompletionMessages404: _S.Bottom[_T.GetChatCompletionMessages404, _t.Any] = ErrorResponse
|
|
839
|
+
GetChatCompletionMessages429: _S.Bottom[_T.GetChatCompletionMessages429, _t.Any] = ErrorResponse
|
|
840
|
+
GetChatCompletionMessages500: _S.Bottom[_T.GetChatCompletionMessages500, _t.Any] = ErrorResponse
|
|
841
|
+
CreateCompletionRequestJson: _S.Bottom[_T.CreateCompletionRequestJson, _t.Any] = CreateCompletionRequest
|
|
842
|
+
CreateCompletion200: _S.Bottom[_T.CreateCompletion200, _t.Any] = CreateCompletionResponse
|
|
843
|
+
CreateCompletion400: _S.Bottom[_T.CreateCompletion400, _t.Any] = ErrorResponse
|
|
844
|
+
CreateCompletion401: _S.Bottom[_T.CreateCompletion401, _t.Any] = ErrorResponse
|
|
845
|
+
CreateCompletion404: _S.Bottom[_T.CreateCompletion404, _t.Any] = ErrorResponse
|
|
846
|
+
CreateCompletion429: _S.Bottom[_T.CreateCompletion429, _t.Any] = ErrorResponse
|
|
847
|
+
CreateCompletion500: _S.Bottom[_T.CreateCompletion500, _t.Any] = ErrorResponse
|
|
848
|
+
CreateCompletion503: _S.Bottom[_T.CreateCompletion503, _t.Any] = ErrorResponse
|
|
849
|
+
ListContainersParams: _StructSchema[_T.ListContainersParams, _t.Never, _t.Never] = _b.struct(_T.ListContainersParams, {"limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "order": _b.literals(["asc", "desc"]), "after": _S.String, "name": _S.String}, optional=("limit", "order", "after", "name",))
|
|
850
|
+
ListContainers200: _S.Bottom[_T.ListContainers200, _t.Any] = ContainerListResource
|
|
851
|
+
ListContainers404: _S.Bottom[_T.ListContainers404, _t.Any] = ErrorResponse
|
|
852
|
+
ListContainers429: _S.Bottom[_T.ListContainers429, _t.Any] = ErrorResponse
|
|
853
|
+
CreateContainerRequestJson: _S.Bottom[_T.CreateContainerRequestJson, _t.Any] = CreateContainerBody
|
|
854
|
+
CreateContainer200: _S.Bottom[_T.CreateContainer200, _t.Any] = ContainerResource
|
|
855
|
+
CreateContainer400: _S.Bottom[_T.CreateContainer400, _t.Any] = ErrorResponse
|
|
856
|
+
CreateContainer429: _S.Bottom[_T.CreateContainer429, _t.Any] = ErrorResponse
|
|
857
|
+
RetrieveContainer200: _S.Bottom[_T.RetrieveContainer200, _t.Any] = ContainerResource
|
|
858
|
+
RetrieveContainer404: _S.Bottom[_T.RetrieveContainer404, _t.Any] = ErrorResponse
|
|
859
|
+
RetrieveContainer429: _S.Bottom[_T.RetrieveContainer429, _t.Any] = ErrorResponse
|
|
860
|
+
DeleteContainer200: _StructSchema[_T.DeleteContainer200, _t.Never, _t.Never] = _b.struct(_T.DeleteContainer200, {"object": _b.literal("container.deleted"), "deleted": _S.Boolean, "id": _S.String})
|
|
861
|
+
DeleteContainer404: _S.Bottom[_T.DeleteContainer404, _t.Any] = ErrorResponse
|
|
862
|
+
DeleteContainer429: _S.Bottom[_T.DeleteContainer429, _t.Any] = ErrorResponse
|
|
863
|
+
ListContainerFilesParams: _StructSchema[_T.ListContainerFilesParams, _t.Never, _t.Never] = _b.struct(_T.ListContainerFilesParams, {"limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "order": _b.literals(["asc", "desc"]), "after": _S.String}, optional=("limit", "order", "after",))
|
|
864
|
+
ListContainerFiles200: _S.Bottom[_T.ListContainerFiles200, _t.Any] = ContainerFileListResource
|
|
865
|
+
ListContainerFiles404: _S.Bottom[_T.ListContainerFiles404, _t.Any] = ErrorResponse
|
|
866
|
+
ListContainerFiles429: _S.Bottom[_T.ListContainerFiles429, _t.Any] = ErrorResponse
|
|
867
|
+
CreateContainerFileRequestJson: _S.Bottom[_T.CreateContainerFileRequestJson, _t.Any] = CreateContainerFileBody
|
|
868
|
+
CreateContainerFileRequestFormData: _S.Bottom[_T.CreateContainerFileRequestFormData, _t.Any] = CreateContainerFileBodyMultipart
|
|
869
|
+
CreateContainerFile200: _S.Bottom[_T.CreateContainerFile200, _t.Any] = ContainerFileResource
|
|
870
|
+
CreateContainerFile400: _S.Bottom[_T.CreateContainerFile400, _t.Any] = ErrorResponse
|
|
871
|
+
CreateContainerFile404: _S.Bottom[_T.CreateContainerFile404, _t.Any] = ErrorResponse
|
|
872
|
+
CreateContainerFile429: _S.Bottom[_T.CreateContainerFile429, _t.Any] = ErrorResponse
|
|
873
|
+
RetrieveContainerFile200: _S.Bottom[_T.RetrieveContainerFile200, _t.Any] = ContainerFileResource
|
|
874
|
+
RetrieveContainerFile404: _S.Bottom[_T.RetrieveContainerFile404, _t.Any] = ErrorResponse
|
|
875
|
+
RetrieveContainerFile429: _S.Bottom[_T.RetrieveContainerFile429, _t.Any] = ErrorResponse
|
|
876
|
+
DeleteContainerFile200: _StructSchema[_T.DeleteContainerFile200, _t.Never, _t.Never] = _b.struct(_T.DeleteContainerFile200, {"object": _b.literal("container.file.deleted"), "deleted": _S.Boolean, "id": _S.String})
|
|
877
|
+
DeleteContainerFile404: _S.Bottom[_T.DeleteContainerFile404, _t.Any] = ErrorResponse
|
|
878
|
+
DeleteContainerFile429: _S.Bottom[_T.DeleteContainerFile429, _t.Any] = ErrorResponse
|
|
879
|
+
RetrieveContainerFileContent404: _S.Bottom[_T.RetrieveContainerFileContent404, _t.Any] = ErrorResponse
|
|
880
|
+
RetrieveContainerFileContent429: _S.Bottom[_T.RetrieveContainerFileContent429, _t.Any] = ErrorResponse
|
|
881
|
+
ListConversationItemsParams: _StructSchema[_T.ListConversationItemsParams, _t.Never, _t.Never] = _b.struct(_T.ListConversationItemsParams, {"limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "order": _b.literals(["asc", "desc"]), "after": _S.String, "include": _b.array(IncludeEnum)}, optional=("limit", "order", "after", "include",))
|
|
882
|
+
ListConversationItems200: _S.Bottom[_T.ListConversationItems200, _t.Any] = ConversationItemList
|
|
883
|
+
ListConversationItems400: _S.Bottom[_T.ListConversationItems400, _t.Any] = ErrorResponse
|
|
884
|
+
ListConversationItems404: _S.Bottom[_T.ListConversationItems404, _t.Any] = ErrorResponse
|
|
885
|
+
ListConversationItems429: _S.Bottom[_T.ListConversationItems429, _t.Any] = ErrorResponse
|
|
886
|
+
CreateConversationItemsParams: _StructSchema[_T.CreateConversationItemsParams, _t.Never, _t.Never] = _b.struct(_T.CreateConversationItemsParams, {"include": _b.array(IncludeEnum)}, optional=("include",))
|
|
887
|
+
CreateConversationItemsRequestJson: _S.Bottom[_T.CreateConversationItemsRequestJson, _t.Any] = _b.union(_S.Null, _S.String, _S.Finite, _S.Boolean, _b.struct_with_rest(_b.struct(_T.CreateConversationItemsRequestJson__4, {"items": _b.check(_b.array(InputItem).annotate(description="The items to add to the conversation. You may add up to 20 items at a time.\n"), _S.is_max_length(20).annotate(expected="a value with a length of at most 20"))}), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _b.array(_S.Json.annotate(expected="JSON value")))
|
|
888
|
+
CreateConversationItems200: _S.Bottom[_T.CreateConversationItems200, _t.Any] = ConversationItemList
|
|
889
|
+
CreateConversationItems400: _S.Bottom[_T.CreateConversationItems400, _t.Any] = ErrorResponse
|
|
890
|
+
CreateConversationItems404: _S.Bottom[_T.CreateConversationItems404, _t.Any] = ErrorResponse
|
|
891
|
+
CreateConversationItems429: _S.Bottom[_T.CreateConversationItems429, _t.Any] = ErrorResponse
|
|
892
|
+
CreateConversationItems500: _S.Bottom[_T.CreateConversationItems500, _t.Any] = ErrorResponse
|
|
893
|
+
GetConversationItemParams: _StructSchema[_T.GetConversationItemParams, _t.Never, _t.Never] = _b.struct(_T.GetConversationItemParams, {"include": _b.array(IncludeEnum)}, optional=("include",))
|
|
894
|
+
GetConversationItem200: _S.Bottom[_T.GetConversationItem200, _t.Any] = ConversationItem
|
|
895
|
+
GetConversationItem404: _S.Bottom[_T.GetConversationItem404, _t.Any] = ErrorResponse
|
|
896
|
+
GetConversationItem429: _S.Bottom[_T.GetConversationItem429, _t.Any] = ErrorResponse
|
|
897
|
+
DeleteConversationItem200: _S.Bottom[_T.DeleteConversationItem200, _t.Any] = ConversationResource
|
|
898
|
+
DeleteConversationItem400: _S.Bottom[_T.DeleteConversationItem400, _t.Any] = ErrorResponse
|
|
899
|
+
DeleteConversationItem404: _S.Bottom[_T.DeleteConversationItem404, _t.Any] = ErrorResponse
|
|
900
|
+
DeleteConversationItem429: _S.Bottom[_T.DeleteConversationItem429, _t.Any] = ErrorResponse
|
|
901
|
+
DeleteConversationItem500: _S.Bottom[_T.DeleteConversationItem500, _t.Any] = ErrorResponse
|
|
902
|
+
CreateEmbeddingRequestJson: _S.Bottom[_T.CreateEmbeddingRequestJson, _t.Any] = CreateEmbeddingRequest
|
|
903
|
+
CreateEmbedding200: _S.Bottom[_T.CreateEmbedding200, _t.Any] = CreateEmbeddingResponse
|
|
904
|
+
CreateEmbedding400: _S.Bottom[_T.CreateEmbedding400, _t.Any] = ErrorResponse
|
|
905
|
+
CreateEmbedding401: _S.Bottom[_T.CreateEmbedding401, _t.Any] = ErrorResponse
|
|
906
|
+
CreateEmbedding429: _S.Bottom[_T.CreateEmbedding429, _t.Any] = ErrorResponse
|
|
907
|
+
CreateEmbedding500: _S.Bottom[_T.CreateEmbedding500, _t.Any] = ErrorResponse
|
|
908
|
+
CreateEmbedding503: _S.Bottom[_T.CreateEmbedding503, _t.Any] = ErrorResponse
|
|
909
|
+
ListEvalsParams: _StructSchema[_T.ListEvalsParams, _t.Never, _t.Never] = _b.struct(_T.ListEvalsParams, {"after": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "order": _b.literals(["asc", "desc"]), "order_by": _b.literals(["created_at", "updated_at"])}, optional=("after", "limit", "order", "order_by",))
|
|
910
|
+
ListEvals200: _S.Bottom[_T.ListEvals200, _t.Any] = EvalList
|
|
911
|
+
ListEvals429: _S.Bottom[_T.ListEvals429, _t.Any] = ErrorResponse
|
|
912
|
+
CreateEvalRequestJson: _S.Bottom[_T.CreateEvalRequestJson, _t.Any] = CreateEvalRequest
|
|
913
|
+
CreateEval201: _S.Bottom[_T.CreateEval201, _t.Any] = Eval
|
|
914
|
+
CreateEval400: _S.Bottom[_T.CreateEval400, _t.Any] = ErrorResponse
|
|
915
|
+
CreateEval429: _S.Bottom[_T.CreateEval429, _t.Any] = ErrorResponse
|
|
916
|
+
GetEval200: _S.Bottom[_T.GetEval200, _t.Any] = Eval
|
|
917
|
+
GetEval404: _S.Bottom[_T.GetEval404, _t.Any] = ErrorResponse
|
|
918
|
+
GetEval429: _S.Bottom[_T.GetEval429, _t.Any] = ErrorResponse
|
|
919
|
+
UpdateEvalRequestJson: _StructSchema[_T.UpdateEvalRequestJson, _t.Never, _t.Never] = _b.struct(_T.UpdateEvalRequestJson, {"name": _S.String.annotate(description="Rename the evaluation."), "metadata": Metadata}, optional=("name", "metadata",))
|
|
920
|
+
UpdateEval200: _S.Bottom[_T.UpdateEval200, _t.Any] = Eval
|
|
921
|
+
UpdateEval400: _S.Bottom[_T.UpdateEval400, _t.Any] = ErrorResponse
|
|
922
|
+
UpdateEval404: _S.Bottom[_T.UpdateEval404, _t.Any] = ErrorResponse
|
|
923
|
+
UpdateEval429: _S.Bottom[_T.UpdateEval429, _t.Any] = ErrorResponse
|
|
924
|
+
DeleteEval200: _StructSchema[_T.DeleteEval200, _t.Never, _t.Never] = _b.struct(_T.DeleteEval200, {"object": _S.String, "deleted": _S.Boolean, "eval_id": _S.String})
|
|
925
|
+
DeleteEval400: _S.Bottom[_T.DeleteEval400, _t.Any] = ErrorResponse
|
|
926
|
+
DeleteEval404: _S.Bottom[_T.DeleteEval404, _t.Any] = ErrorResponse
|
|
927
|
+
DeleteEval429: _S.Bottom[_T.DeleteEval429, _t.Any] = ErrorResponse
|
|
928
|
+
GetEvalRunsParams: _StructSchema[_T.GetEvalRunsParams, _t.Never, _t.Never] = _b.struct(_T.GetEvalRunsParams, {"after": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "order": _b.literals(["asc", "desc"]), "status": _b.literals(["queued", "in_progress", "completed", "canceled", "failed"])}, optional=("after", "limit", "order", "status",))
|
|
929
|
+
GetEvalRuns200: _S.Bottom[_T.GetEvalRuns200, _t.Any] = EvalRunList
|
|
930
|
+
GetEvalRuns400: _S.Bottom[_T.GetEvalRuns400, _t.Any] = ErrorResponse
|
|
931
|
+
GetEvalRuns404: _S.Bottom[_T.GetEvalRuns404, _t.Any] = ErrorResponse
|
|
932
|
+
GetEvalRuns429: _S.Bottom[_T.GetEvalRuns429, _t.Any] = ErrorResponse
|
|
933
|
+
CreateEvalRunRequestJson: _S.Bottom[_T.CreateEvalRunRequestJson, _t.Any] = CreateEvalRunRequest
|
|
934
|
+
CreateEvalRun201: _S.Bottom[_T.CreateEvalRun201, _t.Any] = EvalRun
|
|
935
|
+
CreateEvalRun400: _S.Bottom[_T.CreateEvalRun400, _t.Any] = ErrorResponse
|
|
936
|
+
CreateEvalRun404: _S.Bottom[_T.CreateEvalRun404, _t.Any] = ErrorResponse
|
|
937
|
+
CreateEvalRun429: _S.Bottom[_T.CreateEvalRun429, _t.Any] = ErrorResponse
|
|
938
|
+
CreateEvalRun500: _S.Bottom[_T.CreateEvalRun500, _t.Any] = ErrorResponse
|
|
939
|
+
GetEvalRun200: _S.Bottom[_T.GetEvalRun200, _t.Any] = EvalRun
|
|
940
|
+
GetEvalRun400: _S.Bottom[_T.GetEvalRun400, _t.Any] = ErrorResponse
|
|
941
|
+
GetEvalRun404: _S.Bottom[_T.GetEvalRun404, _t.Any] = ErrorResponse
|
|
942
|
+
GetEvalRun429: _S.Bottom[_T.GetEvalRun429, _t.Any] = ErrorResponse
|
|
943
|
+
DeleteEvalRun200: _StructSchema[_T.DeleteEvalRun200, _t.Never, _t.Never] = _b.struct(_T.DeleteEvalRun200, {"object": _S.String, "deleted": _S.Boolean, "run_id": _S.String}, optional=("object", "deleted", "run_id",))
|
|
944
|
+
DeleteEvalRun400: _S.Bottom[_T.DeleteEvalRun400, _t.Any] = ErrorResponse
|
|
945
|
+
DeleteEvalRun404: _S.Bottom[_T.DeleteEvalRun404, _t.Any] = ErrorResponse
|
|
946
|
+
DeleteEvalRun429: _S.Bottom[_T.DeleteEvalRun429, _t.Any] = ErrorResponse
|
|
947
|
+
CancelEvalRun200: _S.Bottom[_T.CancelEvalRun200, _t.Any] = EvalRun
|
|
948
|
+
CancelEvalRun429: _S.Bottom[_T.CancelEvalRun429, _t.Any] = ErrorResponse
|
|
949
|
+
GetEvalRunOutputItemsParams: _StructSchema[_T.GetEvalRunOutputItemsParams, _t.Never, _t.Never] = _b.struct(_T.GetEvalRunOutputItemsParams, {"after": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "status": _b.literals(["fail", "pass"]), "order": _b.literals(["asc", "desc"])}, optional=("after", "limit", "status", "order",))
|
|
950
|
+
GetEvalRunOutputItems200: _S.Bottom[_T.GetEvalRunOutputItems200, _t.Any] = EvalRunOutputItemList
|
|
951
|
+
GetEvalRunOutputItems400: _S.Bottom[_T.GetEvalRunOutputItems400, _t.Any] = ErrorResponse
|
|
952
|
+
GetEvalRunOutputItems404: _S.Bottom[_T.GetEvalRunOutputItems404, _t.Any] = ErrorResponse
|
|
953
|
+
GetEvalRunOutputItems429: _S.Bottom[_T.GetEvalRunOutputItems429, _t.Any] = ErrorResponse
|
|
954
|
+
GetEvalRunOutputItem200: _S.Bottom[_T.GetEvalRunOutputItem200, _t.Any] = EvalRunOutputItem
|
|
955
|
+
GetEvalRunOutputItem400: _S.Bottom[_T.GetEvalRunOutputItem400, _t.Any] = ErrorResponse
|
|
956
|
+
GetEvalRunOutputItem404: _S.Bottom[_T.GetEvalRunOutputItem404, _t.Any] = ErrorResponse
|
|
957
|
+
GetEvalRunOutputItem429: _S.Bottom[_T.GetEvalRunOutputItem429, _t.Any] = ErrorResponse
|
|
958
|
+
ListFilesParams: _StructSchema[_T.ListFilesParams, _t.Never, _t.Never] = _b.struct(_T.ListFilesParams, {"purpose": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "order": _b.literals(["asc", "desc"]), "after": _S.String}, optional=("purpose", "limit", "order", "after",))
|
|
959
|
+
ListFiles200: _S.Bottom[_T.ListFiles200, _t.Any] = ListFilesResponse
|
|
960
|
+
ListFiles400: _S.Bottom[_T.ListFiles400, _t.Any] = ErrorResponse
|
|
961
|
+
ListFiles404: _S.Bottom[_T.ListFiles404, _t.Any] = ErrorResponse
|
|
962
|
+
ListFiles429: _S.Bottom[_T.ListFiles429, _t.Any] = ErrorResponse
|
|
963
|
+
CreateFileRequestFormData: _S.Bottom[_T.CreateFileRequestFormData, _t.Any] = CreateFileRequestMultipart
|
|
964
|
+
CreateFile200: _S.Bottom[_T.CreateFile200, _t.Any] = OpenAIFile
|
|
965
|
+
CreateFile400: _S.Bottom[_T.CreateFile400, _t.Any] = ErrorResponse
|
|
966
|
+
CreateFile429: _S.Bottom[_T.CreateFile429, _t.Any] = ErrorResponse
|
|
967
|
+
CreateFile500: _S.Bottom[_T.CreateFile500, _t.Any] = ErrorResponse
|
|
968
|
+
RetrieveFile200: _S.Bottom[_T.RetrieveFile200, _t.Any] = OpenAIFile
|
|
969
|
+
RetrieveFile404: _S.Bottom[_T.RetrieveFile404, _t.Any] = ErrorResponse
|
|
970
|
+
RetrieveFile429: _S.Bottom[_T.RetrieveFile429, _t.Any] = ErrorResponse
|
|
971
|
+
DeleteFile200: _S.Bottom[_T.DeleteFile200, _t.Any] = DeleteFileResponse
|
|
972
|
+
DeleteFile404: _S.Bottom[_T.DeleteFile404, _t.Any] = ErrorResponse
|
|
973
|
+
DeleteFile429: _S.Bottom[_T.DeleteFile429, _t.Any] = ErrorResponse
|
|
974
|
+
DownloadFile400: _S.Bottom[_T.DownloadFile400, _t.Any] = ErrorResponse
|
|
975
|
+
DownloadFile404: _S.Bottom[_T.DownloadFile404, _t.Any] = ErrorResponse
|
|
976
|
+
DownloadFile429: _S.Bottom[_T.DownloadFile429, _t.Any] = ErrorResponse
|
|
977
|
+
DownloadFile500: _S.Bottom[_T.DownloadFile500, _t.Any] = ErrorResponse
|
|
978
|
+
RunGraderRequestJson: _S.Bottom[_T.RunGraderRequestJson, _t.Any] = RunGraderRequest
|
|
979
|
+
RunGrader200: _S.Bottom[_T.RunGrader200, _t.Any] = RunGraderResponse
|
|
980
|
+
RunGrader400: _S.Bottom[_T.RunGrader400, _t.Any] = ErrorResponse
|
|
981
|
+
RunGrader429: _S.Bottom[_T.RunGrader429, _t.Any] = ErrorResponse
|
|
982
|
+
ValidateGraderRequestJson: _S.Bottom[_T.ValidateGraderRequestJson, _t.Any] = ValidateGraderRequest
|
|
983
|
+
ValidateGrader200: _S.Bottom[_T.ValidateGrader200, _t.Any] = ValidateGraderResponse
|
|
984
|
+
ValidateGrader400: _S.Bottom[_T.ValidateGrader400, _t.Any] = ErrorResponse
|
|
985
|
+
ValidateGrader429: _S.Bottom[_T.ValidateGrader429, _t.Any] = ErrorResponse
|
|
986
|
+
ListFineTuningCheckpointPermissionsParams: _StructSchema[_T.ListFineTuningCheckpointPermissionsParams, _t.Never, _t.Never] = _b.struct(_T.ListFineTuningCheckpointPermissionsParams, {"project_id": _S.String, "after": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "order": _b.literals(["ascending", "descending"])}, optional=("project_id", "after", "limit", "order",))
|
|
987
|
+
ListFineTuningCheckpointPermissions200: _S.Bottom[_T.ListFineTuningCheckpointPermissions200, _t.Any] = ListFineTuningCheckpointPermissionResponse
|
|
988
|
+
ListFineTuningCheckpointPermissions400: _S.Bottom[_T.ListFineTuningCheckpointPermissions400, _t.Any] = ErrorResponse
|
|
989
|
+
ListFineTuningCheckpointPermissions429: _S.Bottom[_T.ListFineTuningCheckpointPermissions429, _t.Any] = ErrorResponse
|
|
990
|
+
CreateFineTuningCheckpointPermissionRequestJson: _S.Bottom[_T.CreateFineTuningCheckpointPermissionRequestJson, _t.Any] = CreateFineTuningCheckpointPermissionRequest
|
|
991
|
+
CreateFineTuningCheckpointPermission200: _S.Bottom[_T.CreateFineTuningCheckpointPermission200, _t.Any] = ListFineTuningCheckpointPermissionResponse
|
|
992
|
+
CreateFineTuningCheckpointPermission400: _S.Bottom[_T.CreateFineTuningCheckpointPermission400, _t.Any] = ErrorResponse
|
|
993
|
+
CreateFineTuningCheckpointPermission404: _S.Bottom[_T.CreateFineTuningCheckpointPermission404, _t.Any] = ErrorResponse
|
|
994
|
+
CreateFineTuningCheckpointPermission429: _S.Bottom[_T.CreateFineTuningCheckpointPermission429, _t.Any] = ErrorResponse
|
|
995
|
+
DeleteFineTuningCheckpointPermission200: _S.Bottom[_T.DeleteFineTuningCheckpointPermission200, _t.Any] = DeleteFineTuningCheckpointPermissionResponse
|
|
996
|
+
DeleteFineTuningCheckpointPermission400: _S.Bottom[_T.DeleteFineTuningCheckpointPermission400, _t.Any] = ErrorResponse
|
|
997
|
+
DeleteFineTuningCheckpointPermission404: _S.Bottom[_T.DeleteFineTuningCheckpointPermission404, _t.Any] = ErrorResponse
|
|
998
|
+
DeleteFineTuningCheckpointPermission429: _S.Bottom[_T.DeleteFineTuningCheckpointPermission429, _t.Any] = ErrorResponse
|
|
999
|
+
ListPaginatedFineTuningJobsParams: _StructSchema[_T.ListPaginatedFineTuningJobsParams, _t.Never, _t.Never] = _b.struct(_T.ListPaginatedFineTuningJobsParams, {"after": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "metadata": _b.union(_b.record(_S.String, _S.String), _S.Null)}, optional=("after", "limit", "metadata",))
|
|
1000
|
+
ListPaginatedFineTuningJobs200: _S.Bottom[_T.ListPaginatedFineTuningJobs200, _t.Any] = ListPaginatedFineTuningJobsResponse
|
|
1001
|
+
ListPaginatedFineTuningJobs400: _S.Bottom[_T.ListPaginatedFineTuningJobs400, _t.Any] = ErrorResponse
|
|
1002
|
+
ListPaginatedFineTuningJobs429: _S.Bottom[_T.ListPaginatedFineTuningJobs429, _t.Any] = ErrorResponse
|
|
1003
|
+
CreateFineTuningJobRequestJson: _S.Bottom[_T.CreateFineTuningJobRequestJson, _t.Any] = CreateFineTuningJobRequest
|
|
1004
|
+
CreateFineTuningJob200: _S.Bottom[_T.CreateFineTuningJob200, _t.Any] = FineTuningJob
|
|
1005
|
+
CreateFineTuningJob400: _S.Bottom[_T.CreateFineTuningJob400, _t.Any] = ErrorResponse
|
|
1006
|
+
CreateFineTuningJob429: _S.Bottom[_T.CreateFineTuningJob429, _t.Any] = ErrorResponse
|
|
1007
|
+
RetrieveFineTuningJob200: _S.Bottom[_T.RetrieveFineTuningJob200, _t.Any] = FineTuningJob
|
|
1008
|
+
RetrieveFineTuningJob404: _S.Bottom[_T.RetrieveFineTuningJob404, _t.Any] = ErrorResponse
|
|
1009
|
+
RetrieveFineTuningJob429: _S.Bottom[_T.RetrieveFineTuningJob429, _t.Any] = ErrorResponse
|
|
1010
|
+
CancelFineTuningJob200: _S.Bottom[_T.CancelFineTuningJob200, _t.Any] = FineTuningJob
|
|
1011
|
+
CancelFineTuningJob400: _S.Bottom[_T.CancelFineTuningJob400, _t.Any] = ErrorResponse
|
|
1012
|
+
CancelFineTuningJob404: _S.Bottom[_T.CancelFineTuningJob404, _t.Any] = ErrorResponse
|
|
1013
|
+
CancelFineTuningJob429: _S.Bottom[_T.CancelFineTuningJob429, _t.Any] = ErrorResponse
|
|
1014
|
+
ListFineTuningJobCheckpointsParams: _StructSchema[_T.ListFineTuningJobCheckpointsParams, _t.Never, _t.Never] = _b.struct(_T.ListFineTuningJobCheckpointsParams, {"after": _S.String, "limit": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}, optional=("after", "limit",))
|
|
1015
|
+
ListFineTuningJobCheckpoints200: _S.Bottom[_T.ListFineTuningJobCheckpoints200, _t.Any] = ListFineTuningJobCheckpointsResponse
|
|
1016
|
+
ListFineTuningJobCheckpoints400: _S.Bottom[_T.ListFineTuningJobCheckpoints400, _t.Any] = ErrorResponse
|