pyfect-dev 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyfect/__init__.py +729 -0
- pyfect/_all.py +242 -0
- pyfect/_background.py +28 -0
- pyfect/_binary_codecs.py +124 -0
- pyfect/_cached.py +165 -0
- pyfect/_catch.py +128 -0
- pyfect/_catch_reason.py +574 -0
- pyfect/_concurrency.py +291 -0
- pyfect/_context_effects.py +163 -0
- pyfect/_context_managers.py +76 -0
- pyfect/_core.py +368 -0
- pyfect/_digits.py +71 -0
- pyfect/_effect_args.py +46 -0
- pyfect/_effect_base.py +71 -0
- pyfect/_effect_concurrency.py +133 -0
- pyfect/_effect_eager.py +103 -0
- pyfect/_effect_errors.py +344 -0
- pyfect/_effect_folding.py +110 -0
- pyfect/_effect_hash.py +140 -0
- pyfect/_effect_logging.py +57 -0
- pyfect/_effect_metrics.py +102 -0
- pyfect/_effect_resources.py +179 -0
- pyfect/_effect_services.py +25 -0
- pyfect/_effect_timing.py +199 -0
- pyfect/_effect_tracing.py +99 -0
- pyfect/_equal.py +195 -0
- pyfect/_extras.py +43 -0
- pyfect/_fiber.py +969 -0
- pyfect/_fiber_all.py +134 -0
- pyfect/_fiber_collections.py +106 -0
- pyfect/_fn.py +706 -0
- pyfect/_hamt.py +174 -0
- pyfect/_interrupt_reason.py +33 -0
- pyfect/_isaac.py +149 -0
- pyfect/_iterables.py +231 -0
- pyfect/_js.py +263 -0
- pyfect/_js_date.py +87 -0
- pyfect/_json_text.py +286 -0
- pyfect/_json_value.py +9 -0
- pyfect/_layer_core.py +403 -0
- pyfect/_layer_for_life.py +33 -0
- pyfect/_layer_tracing.py +70 -0
- pyfect/_locked_ref.py +147 -0
- pyfect/_loop_thread.py +152 -0
- pyfect/_metric_ref.py +29 -0
- pyfect/_one_or_many.py +14 -0
- pyfect/_os_wait.py +118 -0
- pyfect/_path_posix.py +129 -0
- pyfect/_primitives.py +434 -0
- pyfect/_public.py +36 -0
- pyfect/_reasons.py +64 -0
- pyfect/_released.py +67 -0
- pyfect/_root.py +87 -0
- pyfect/_round_robin.py +73 -0
- pyfect/_some.py +17 -0
- pyfect/_stack.py +52 -0
- pyfect/_stack_frame.py +114 -0
- pyfect/_string_hash.py +35 -0
- pyfect/_subscriber_queue.py +47 -0
- pyfect/_tags.py +14 -0
- pyfect/_tracer_ref.py +21 -0
- pyfect/_tx_ops.py +77 -0
- pyfect/_unsubscripted.py +23 -0
- pyfect/_url.py +54 -0
- pyfect/_waiters.py +127 -0
- pyfect/_wake_tracking.py +98 -0
- pyfect/_wire_codec.py +123 -0
- pyfect/ai/__init__.py +73 -0
- pyfect/ai/_approvals.py +249 -0
- pyfect/ai/_decision_answers.py +185 -0
- pyfect/ai/_generated_client.py +298 -0
- pyfect/ai/_generated_support.py +84 -0
- pyfect/ai/_mcp/__init__.py +1 -0
- pyfect/ai/_mcp/batch.py +68 -0
- pyfect/ai/_mcp/client_transport.py +412 -0
- pyfect/ai/_mcp/client_wire.py +284 -0
- pyfect/ai/_mcp/core.py +490 -0
- pyfect/ai/_mcp/dispatch.py +1048 -0
- pyfect/ai/_mcp/http.py +462 -0
- pyfect/ai/_mcp/http_admission.py +269 -0
- pyfect/ai/_mcp/http_status.py +27 -0
- pyfect/ai/_mcp/input_wire.py +226 -0
- pyfect/ai/_mcp/log_levels.py +55 -0
- pyfect/ai/_mcp/param_headers.py +63 -0
- pyfect/ai/_mcp/projection.py +248 -0
- pyfect/ai/_mcp/register.py +683 -0
- pyfect/ai/_mcp/reverse_policy.py +155 -0
- pyfect/ai/_mcp/routing_header.py +24 -0
- pyfect/ai/_mcp/sessions.py +114 -0
- pyfect/ai/_mcp/stdio.py +110 -0
- pyfect/ai/_mcp/subscriptions.py +134 -0
- pyfect/ai/_mcp/tool_schema.py +35 -0
- pyfect/ai/_noul_answers.py +64 -0
- pyfect/ai/_openai_all_of.py +137 -0
- pyfect/ai/_openai_errors.py +233 -0
- pyfect/ai/_provider.py +439 -0
- pyfect/ai/_provider_tools.py +129 -0
- pyfect/ai/_stream_resolution.py +231 -0
- pyfect/ai/_structured_output_checks.py +138 -0
- pyfect/ai/_structured_output_codec.py +229 -0
- pyfect/ai/_structured_output_json.py +109 -0
- pyfect/ai/_tool_call_ids.py +80 -0
- pyfect/ai/ai_error.py +785 -0
- pyfect/ai/anthropic/__init__.py +28 -0
- pyfect/ai/anthropic/_errors.py +164 -0
- pyfect/ai/anthropic/_prompt.py +375 -0
- pyfect/ai/anthropic/_response.py +443 -0
- pyfect/ai/anthropic/_schema.py +206 -0
- pyfect/ai/anthropic/_stream.py +377 -0
- pyfect/ai/anthropic/_tools.py +248 -0
- pyfect/ai/anthropic/client.py +289 -0
- pyfect/ai/anthropic/config.py +32 -0
- pyfect/ai/anthropic/error.py +27 -0
- pyfect/ai/anthropic/language_model.py +366 -0
- pyfect/ai/anthropic/telemetry.py +51 -0
- pyfect/ai/anthropic/tool.py +570 -0
- pyfect/ai/anthropic_structured_output.py +138 -0
- pyfect/ai/chat.py +548 -0
- pyfect/ai/cloudflare/__init__.py +15 -0
- pyfect/ai/cloudflare/_errors.py +108 -0
- pyfect/ai/cloudflare/client.py +174 -0
- pyfect/ai/cloudflare/decision_model.py +117 -0
- pyfect/ai/cloudflare/schema.py +144 -0
- pyfect/ai/decision.py +290 -0
- pyfect/ai/decision_model.py +283 -0
- pyfect/ai/embedding_model.py +177 -0
- pyfect/ai/id_generator.py +79 -0
- pyfect/ai/language_model.py +1077 -0
- pyfect/ai/mcp_client.py +682 -0
- pyfect/ai/mcp_client_error.py +223 -0
- pyfect/ai/mcp_protocol.py +205 -0
- pyfect/ai/mcp_schema.py +1300 -0
- pyfect/ai/mcp_server.py +404 -0
- pyfect/ai/model.py +56 -0
- pyfect/ai/openai/__init__.py +49 -0
- pyfect/ai/openai/_errors.py +89 -0
- pyfect/ai/openai/_prompt.py +527 -0
- pyfect/ai/openai/_requests.py +34 -0
- pyfect/ai/openai/_response.py +569 -0
- pyfect/ai/openai/_schema.py +769 -0
- pyfect/ai/openai/_stream.py +771 -0
- pyfect/ai/openai/_tools.py +128 -0
- pyfect/ai/openai/_web_socket.py +295 -0
- pyfect/ai/openai/client.py +296 -0
- pyfect/ai/openai/client_generated.py +123 -0
- pyfect/ai/openai/config.py +34 -0
- pyfect/ai/openai/decision_model.py +177 -0
- pyfect/ai/openai/embedding_model.py +116 -0
- pyfect/ai/openai/error.py +8 -0
- pyfect/ai/openai/generated/__init__.py +7213 -0
- pyfect/ai/openai/generated/_recursive.py +18 -0
- pyfect/ai/openai/generated/_schemas_0.py +1015 -0
- pyfect/ai/openai/generated/_schemas_1.py +1016 -0
- pyfect/ai/openai/generated/_schemas_2.py +1017 -0
- pyfect/ai/openai/generated/_schemas_3.py +615 -0
- pyfect/ai/openai/generated/client.py +5298 -0
- pyfect/ai/openai/generated/types.py +8123 -0
- pyfect/ai/openai/language_model.py +304 -0
- pyfect/ai/openai/telemetry.py +19 -0
- pyfect/ai/openai/tool.py +391 -0
- pyfect/ai/openai_compat/__init__.py +25 -0
- pyfect/ai/openai_compat/_prompt.py +191 -0
- pyfect/ai/openai_compat/_request.py +153 -0
- pyfect/ai/openai_compat/_response.py +407 -0
- pyfect/ai/openai_compat/_schema.py +97 -0
- pyfect/ai/openai_compat/client.py +234 -0
- pyfect/ai/openai_compat/config.py +32 -0
- pyfect/ai/openai_compat/embedding_model.py +139 -0
- pyfect/ai/openai_compat/error.py +7 -0
- pyfect/ai/openai_compat/language_model.py +245 -0
- pyfect/ai/openai_compat/telemetry.py +51 -0
- pyfect/ai/openai_structured_output.py +118 -0
- pyfect/ai/openrouter/__init__.py +36 -0
- pyfect/ai/openrouter/_errors.py +186 -0
- pyfect/ai/openrouter/_prompt.py +272 -0
- pyfect/ai/openrouter/_response.py +226 -0
- pyfect/ai/openrouter/_stream.py +320 -0
- pyfect/ai/openrouter/client.py +283 -0
- pyfect/ai/openrouter/config.py +36 -0
- pyfect/ai/openrouter/decision_model.py +161 -0
- pyfect/ai/openrouter/error.py +23 -0
- pyfect/ai/openrouter/generated/__init__.py +3029 -0
- pyfect/ai/openrouter/generated/_recursive.py +15 -0
- pyfect/ai/openrouter/generated/_schemas_0.py +1015 -0
- pyfect/ai/openrouter/generated/_schemas_1.py +522 -0
- pyfect/ai/openrouter/generated/client.py +1445 -0
- pyfect/ai/openrouter/generated/types.py +4769 -0
- pyfect/ai/openrouter/language_model.py +345 -0
- pyfect/ai/openrouter/schema.py +165 -0
- pyfect/ai/prompt.py +664 -0
- pyfect/ai/response.py +768 -0
- pyfect/ai/response_id_tracker.py +82 -0
- pyfect/ai/telemetry.py +126 -0
- pyfect/ai/tokenizer.py +61 -0
- pyfect/ai/tool.py +536 -0
- pyfect/ai/toolkit.py +490 -0
- pyfect/ai/typesafe/__init__.py +17 -0
- pyfect/ai/typesafe/_errors.py +120 -0
- pyfect/ai/typesafe/client.py +146 -0
- pyfect/ai/typesafe/config.py +34 -0
- pyfect/ai/typesafe/decision_model.py +90 -0
- pyfect/ai/typesafe/schema.py +140 -0
- pyfect/batching/__init__.py +58 -0
- pyfect/batching/_api.py +71 -0
- pyfect/batching/_engine.py +229 -0
- pyfect/batching/_from_effect.py +76 -0
- pyfect/batching/_persisted.py +98 -0
- pyfect/batching/_request.py +133 -0
- pyfect/batching/_resolver.py +477 -0
- pyfect/batching/_with_cache.py +90 -0
- pyfect/big_decimal.py +500 -0
- pyfect/brand.py +114 -0
- pyfect/byte_size.py +354 -0
- pyfect/cache/__init__.py +29 -0
- pyfect/cache/_cache.py +426 -0
- pyfect/cache/_expiry.py +69 -0
- pyfect/cache/_scoped_cache.py +546 -0
- pyfect/case.py +174 -0
- pyfect/cause.py +462 -0
- pyfect/channel/__init__.py +155 -0
- pyfect/channel/_base.py +92 -0
- pyfect/channel/_catch.py +158 -0
- pyfect/channel/_catch_reason.py +572 -0
- pyfect/channel/_channel.py +158 -0
- pyfect/channel/_combinators.py +220 -0
- pyfect/channel/_concurrency_methods.py +217 -0
- pyfect/channel/_concurrent_map.py +118 -0
- pyfect/channel/_constructors.py +349 -0
- pyfect/channel/_context.py +232 -0
- pyfect/channel/_error_methods.py +336 -0
- pyfect/channel/_errors.py +180 -0
- pyfect/channel/_filters.py +225 -0
- pyfect/channel/_lifecycle.py +71 -0
- pyfect/channel/_lifecycle_methods.py +206 -0
- pyfect/channel/_loop.py +100 -0
- pyfect/channel/_merge.py +246 -0
- pyfect/channel/_repeat.py +154 -0
- pyfect/channel/_run.py +149 -0
- pyfect/channel/_run_methods.py +341 -0
- pyfect/channel/_sinks.py +88 -0
- pyfect/channel/_sources.py +238 -0
- pyfect/channel/_text.py +176 -0
- pyfect/channel/_transform_methods.py +415 -0
- pyfect/channel/_upstream.py +67 -0
- pyfect/channel_schema.py +131 -0
- pyfect/cli/__init__.py +79 -0
- pyfect/cli/_ansi.py +82 -0
- pyfect/cli/_command.py +469 -0
- pyfect/cli/_config.py +164 -0
- pyfect/cli/_environment.py +10 -0
- pyfect/cli/_help.py +195 -0
- pyfect/cli/_lexer.py +81 -0
- pyfect/cli/_parser.py +465 -0
- pyfect/cli/_settings.py +85 -0
- pyfect/cli/_suggest.py +33 -0
- pyfect/cli/_width.py +134 -0
- pyfect/cli/_wizard.py +317 -0
- pyfect/cli/argument.py +212 -0
- pyfect/cli/cli_config.py +40 -0
- pyfect/cli/cli_error.py +242 -0
- pyfect/cli/cli_output.py +305 -0
- pyfect/cli/command.py +440 -0
- pyfect/cli/completions/__init__.py +50 -0
- pyfect/cli/completions/_completer.ps1 +190 -0
- pyfect/cli/completions/_descriptor.py +182 -0
- pyfect/cli/completions/bash.py +300 -0
- pyfect/cli/completions/fish.py +164 -0
- pyfect/cli/completions/powershell.py +156 -0
- pyfect/cli/completions/zsh.py +189 -0
- pyfect/cli/flag.py +246 -0
- pyfect/cli/global_flag.py +99 -0
- pyfect/cli/help_doc.py +63 -0
- pyfect/cli/param.py +789 -0
- pyfect/cli/primitive.py +308 -0
- pyfect/cli/prompt/__init__.py +75 -0
- pyfect/cli/prompt/_auto_complete.py +205 -0
- pyfect/cli/prompt/_choices.py +104 -0
- pyfect/cli/prompt/_confirm.py +195 -0
- pyfect/cli/prompt/_core.py +512 -0
- pyfect/cli/prompt/_date.py +173 -0
- pyfect/cli/prompt/_date_parts.py +387 -0
- pyfect/cli/prompt/_file.py +372 -0
- pyfect/cli/prompt/_multi_select.py +204 -0
- pyfect/cli/prompt/_number.py +257 -0
- pyfect/cli/prompt/_select.py +117 -0
- pyfect/cli/prompt/_text.py +239 -0
- pyfect/cli/terminal_capabilities.py +118 -0
- pyfect/clock.py +150 -0
- pyfect/cluster/__init__.py +155 -0
- pyfect/cluster/_cluster_abandon.py +36 -0
- pyfect/cluster/_cluster_layer.py +122 -0
- pyfect/cluster/_entity_activation.py +16 -0
- pyfect/cluster/_entity_manager/__init__.py +22 -0
- pyfect/cluster/_entity_manager/_activation.py +540 -0
- pyfect/cluster/_entity_manager/_core.py +186 -0
- pyfect/cluster/_entity_manager/_decode.py +60 -0
- pyfect/cluster/_entity_manager/_manager.py +423 -0
- pyfect/cluster/_entity_manager/_state.py +113 -0
- pyfect/cluster/_entity_reaper.py +94 -0
- pyfect/cluster/_hash.py +13 -0
- pyfect/cluster/_interruptors.py +88 -0
- pyfect/cluster/_resource_map.py +179 -0
- pyfect/cluster/_resource_ref.py +266 -0
- pyfect/cluster/_shard_lock.py +14 -0
- pyfect/cluster/cluster_cron.py +230 -0
- pyfect/cluster/cluster_error.py +81 -0
- pyfect/cluster/cluster_http.py +210 -0
- pyfect/cluster/cluster_metrics.py +54 -0
- pyfect/cluster/cluster_schema.py +137 -0
- pyfect/cluster/cluster_socket.py +197 -0
- pyfect/cluster/cluster_workflow_engine/__init__.py +24 -0
- pyfect/cluster/cluster_workflow_engine/_engine.py +1099 -0
- pyfect/cluster/cluster_workflow_engine/_entities.py +298 -0
- pyfect/cluster/deliver_at.py +31 -0
- pyfect/cluster/entity/__init__.py +39 -0
- pyfect/cluster/entity/_entity.py +332 -0
- pyfect/cluster/entity/_handlers.py +168 -0
- pyfect/cluster/entity/_keep_alive.py +74 -0
- pyfect/cluster/entity/_queue.py +103 -0
- pyfect/cluster/entity/_request.py +34 -0
- pyfect/cluster/entity/_services.py +23 -0
- pyfect/cluster/entity/_test_client.py +237 -0
- pyfect/cluster/entity_address.py +25 -0
- pyfect/cluster/entity_id.py +20 -0
- pyfect/cluster/entity_proxy.py +161 -0
- pyfect/cluster/entity_proxy_server.py +103 -0
- pyfect/cluster/entity_resource.py +122 -0
- pyfect/cluster/entity_type.py +20 -0
- pyfect/cluster/envelope.py +307 -0
- pyfect/cluster/http_runner.py +254 -0
- pyfect/cluster/k8s_http_client.py +281 -0
- pyfect/cluster/k8s_types.py +1394 -0
- pyfect/cluster/machine_id.py +21 -0
- pyfect/cluster/message.py +219 -0
- pyfect/cluster/message_storage/__init__.py +67 -0
- pyfect/cluster/message_storage/_encoded.py +393 -0
- pyfect/cluster/message_storage/_memory.py +386 -0
- pyfect/cluster/message_storage/_noop.py +109 -0
- pyfect/cluster/message_storage/_service.py +388 -0
- pyfect/cluster/reply.py +236 -0
- pyfect/cluster/runner.py +32 -0
- pyfect/cluster/runner_address.py +23 -0
- pyfect/cluster/runner_health.py +93 -0
- pyfect/cluster/runner_server.py +286 -0
- pyfect/cluster/runner_storage.py +212 -0
- pyfect/cluster/runners/__init__.py +55 -0
- pyfect/cluster/runners/_local.py +460 -0
- pyfect/cluster/runners/_noop.py +57 -0
- pyfect/cluster/runners/_rpc.py +290 -0
- pyfect/cluster/runners/_service.py +113 -0
- pyfect/cluster/shard_id.py +39 -0
- pyfect/cluster/sharding/__init__.py +12 -0
- pyfect/cluster/sharding/_acquisition.py +490 -0
- pyfect/cluster/sharding/_clients.py +271 -0
- pyfect/cluster/sharding/_make.py +388 -0
- pyfect/cluster/sharding/_routing.py +296 -0
- pyfect/cluster/sharding/_runners_sync.py +198 -0
- pyfect/cluster/sharding/_service.py +91 -0
- pyfect/cluster/sharding/_singletons.py +183 -0
- pyfect/cluster/sharding/_state.py +296 -0
- pyfect/cluster/sharding/_storage_loop.py +421 -0
- pyfect/cluster/sharding_config.py +230 -0
- pyfect/cluster/sharding_registration_event.py +28 -0
- pyfect/cluster/single_runner.py +49 -0
- pyfect/cluster/singleton.py +36 -0
- pyfect/cluster/singleton_address.py +20 -0
- pyfect/cluster/snowflake.py +133 -0
- pyfect/cluster/socket_runner.py +67 -0
- pyfect/cluster/sql_message_storage.py +1001 -0
- pyfect/cluster/sql_runner_storage.py +841 -0
- pyfect/cluster/test_runner.py +23 -0
- pyfect/config/__init__.py +93 -0
- pyfect/config/_all.py +96 -0
- pyfect/config/_collections.py +291 -0
- pyfect/config/_config.py +261 -0
- pyfect/config/_constructors.py +106 -0
- pyfect/config/_error.py +27 -0
- pyfect/config/_leaf.py +92 -0
- pyfect/config/_scalars.py +193 -0
- pyfect/config/_schema.py +340 -0
- pyfect/config_provider/__init__.py +60 -0
- pyfect/config_provider/_dir.py +84 -0
- pyfect/config_provider/_dotenv.py +127 -0
- pyfect/config_provider/_env.py +79 -0
- pyfect/config_provider/_layers.py +80 -0
- pyfect/config_provider/_node.py +90 -0
- pyfect/config_provider/_provider.py +118 -0
- pyfect/config_provider/_unknown.py +62 -0
- pyfect/console/__init__.py +63 -0
- pyfect/console/_effects.py +134 -0
- pyfect/console/_live.py +156 -0
- pyfect/console/_service.py +49 -0
- pyfect/console/_table.py +90 -0
- pyfect/context.py +414 -0
- pyfect/cron/__init__.py +30 -0
- pyfect/cron/_model.py +183 -0
- pyfect/cron/_search.py +268 -0
- pyfect/cron/_text.py +202 -0
- pyfect/cron/_wall.py +42 -0
- pyfect/crypto.py +257 -0
- pyfect/date_time/__init__.py +77 -0
- pyfect/date_time/_calendar.py +209 -0
- pyfect/date_time/_current.py +118 -0
- pyfect/date_time/_epoch.py +22 -0
- pyfect/date_time/_iso.py +80 -0
- pyfect/date_time/_zones.py +135 -0
- pyfect/date_time/intl.py +144 -0
- pyfect/deferred.py +145 -0
- pyfect/devtools/__init__.py +24 -0
- pyfect/devtools/client.py +323 -0
- pyfect/devtools/layers.py +32 -0
- pyfect/devtools/schema.py +301 -0
- pyfect/devtools/server.py +72 -0
- pyfect/duration.py +295 -0
- pyfect/effect.py +565 -0
- pyfect/effectable.py +37 -0
- pyfect/encoding/__init__.py +62 -0
- pyfect/encoding/_archive.py +197 -0
- pyfect/encoding/_json_array_scanner.py +477 -0
- pyfect/encoding/base64.py +23 -0
- pyfect/encoding/base64_url.py +19 -0
- pyfect/encoding/encoding_error.py +17 -0
- pyfect/encoding/hex.py +28 -0
- pyfect/encoding/ini.py +188 -0
- pyfect/encoding/json_array.py +246 -0
- pyfect/encoding/ndjson.py +461 -0
- pyfect/encoding/schema_binary/__init__.py +257 -0
- pyfect/encoding/schema_binary/_channels.py +173 -0
- pyfect/encoding/schema_binary/_compile.py +584 -0
- pyfect/encoding/schema_binary/_decode.py +848 -0
- pyfect/encoding/schema_binary/_dictionary.py +90 -0
- pyfect/encoding/schema_binary/_encode.py +838 -0
- pyfect/encoding/schema_binary/_fingerprint.py +168 -0
- pyfect/encoding/schema_binary/_layout.py +350 -0
- pyfect/encoding/schema_binary/_literals.py +47 -0
- pyfect/encoding/schema_binary/_parser.py +163 -0
- pyfect/encoding/schema_binary/_reader.py +148 -0
- pyfect/encoding/schema_binary/_target.py +310 -0
- pyfect/encoding/schema_binary/_values.py +133 -0
- pyfect/encoding/schema_binary/_wire.py +253 -0
- pyfect/encoding/sse.py +476 -0
- pyfect/encoding/tar/__init__.py +396 -0
- pyfect/encoding/tar/_decoder.py +220 -0
- pyfect/encoding/tar/_encoder.py +83 -0
- pyfect/encoding/tar/_header.py +494 -0
- pyfect/encoding/tar/_model.py +82 -0
- pyfect/encoding/toml.py +375 -0
- pyfect/encoding/xml/__init__.py +222 -0
- pyfect/encoding/xml/_chars.py +119 -0
- pyfect/encoding/xml/_collector.py +106 -0
- pyfect/encoding/xml/_inputs.py +126 -0
- pyfect/encoding/xml/_model.py +114 -0
- pyfect/encoding/xml/_parser.py +694 -0
- pyfect/encoding/xml/_scanner.py +180 -0
- pyfect/encoding/xml/_writer.py +238 -0
- pyfect/encoding/yaml.py +739 -0
- pyfect/encoding/zip/__init__.py +392 -0
- pyfect/encoding/zip/_decoder.py +378 -0
- pyfect/encoding/zip/_format.py +122 -0
- pyfect/encoding/zip/_inflate.py +65 -0
- pyfect/encoding/zip/_model.py +86 -0
- pyfect/encoding/zip/_writer.py +311 -0
- pyfect/error_reporter.py +240 -0
- pyfect/errors.py +321 -0
- pyfect/eventlog/__init__.py +77 -0
- pyfect/eventlog/_conflicts.py +94 -0
- pyfect/eventlog/_crypto.py +64 -0
- pyfect/eventlog/_identity.py +26 -0
- pyfect/eventlog/_identity_derivation.py +79 -0
- pyfect/eventlog/_transferable_bytes.py +55 -0
- pyfect/eventlog/_uuid.py +33 -0
- pyfect/eventlog/event.py +115 -0
- pyfect/eventlog/event_group.py +55 -0
- pyfect/eventlog/event_journal.py +630 -0
- pyfect/eventlog/event_log.py +1039 -0
- pyfect/eventlog/event_log_encryption.py +219 -0
- pyfect/eventlog/event_log_message.py +357 -0
- pyfect/eventlog/event_log_remote.py +465 -0
- pyfect/eventlog/event_log_server.py +442 -0
- pyfect/eventlog/event_log_server_encrypted.py +322 -0
- pyfect/eventlog/event_log_server_unencrypted.py +814 -0
- pyfect/eventlog/event_log_session_auth.py +250 -0
- pyfect/eventlog/event_row.py +423 -0
- pyfect/eventlog/sql_event_journal.py +692 -0
- pyfect/eventlog/sql_event_log_server_encrypted.py +440 -0
- pyfect/eventlog/sql_event_log_server_unencrypted.py +568 -0
- pyfect/execution_plan/__init__.py +42 -0
- pyfect/execution_plan/_events.py +128 -0
- pyfect/execution_plan/_model.py +108 -0
- pyfect/execution_plan/_run.py +176 -0
- pyfect/exit.py +205 -0
- pyfect/fiber_handle.py +305 -0
- pyfect/fiber_map.py +350 -0
- pyfect/fiber_set.py +232 -0
- pyfect/file_system/__init__.py +69 -0
- pyfect/file_system/_copy.py +116 -0
- pyfect/file_system/_errors.py +32 -0
- pyfect/file_system/_file.py +177 -0
- pyfect/file_system/_live.py +351 -0
- pyfect/file_system/_model.py +72 -0
- pyfect/file_system/_noop.py +189 -0
- pyfect/file_system/_service.py +336 -0
- pyfect/file_system/_stat.py +69 -0
- pyfect/file_system/_watch.py +107 -0
- pyfect/filters.py +245 -0
- pyfect/graph/__init__.py +101 -0
- pyfect/graph/_all_pairs.py +150 -0
- pyfect/graph/_combine.py +259 -0
- pyfect/graph/_compact.py +143 -0
- pyfect/graph/_components.py +200 -0
- pyfect/graph/_cycles.py +144 -0
- pyfect/graph/_enumerate.py +168 -0
- pyfect/graph/_errors.py +51 -0
- pyfect/graph/_flow.py +164 -0
- pyfect/graph/_forest.py +109 -0
- pyfect/graph/_graph.py +269 -0
- pyfect/graph/_lowlink.py +98 -0
- pyfect/graph/_matching.py +101 -0
- pyfect/graph/_mutate.py +211 -0
- pyfect/graph/_query.py +138 -0
- pyfect/graph/_records.py +119 -0
- pyfect/graph/_render.py +109 -0
- pyfect/graph/_shortest.py +274 -0
- pyfect/graph/_snapshot.py +50 -0
- pyfect/graph/_store.py +136 -0
- pyfect/graph/_traverse.py +289 -0
- pyfect/graph/_view.py +384 -0
- pyfect/graph/_walker.py +70 -0
- pyfect/graphql/__init__.py +87 -0
- pyfect/graphql/_codec.py +117 -0
- pyfect/graphql/_http.py +309 -0
- pyfect/graphql/_schemas.py +39 -0
- pyfect/graphql/_slices.py +110 -0
- pyfect/graphql/_template.py +111 -0
- pyfect/graphql/_types.py +115 -0
- pyfect/graphql/_ws.py +395 -0
- pyfect/graphql/_ws_messages.py +120 -0
- pyfect/graphql/client.py +428 -0
- pyfect/graphql/client_error.py +285 -0
- pyfect/graphql/group.py +142 -0
- pyfect/graphql/middleware.py +98 -0
- pyfect/graphql/operation.py +409 -0
- pyfect/graphql/protocol.py +119 -0
- pyfect/graphql/resolver.py +574 -0
- pyfect/graphql/template.py +61 -0
- pyfect/hash_map.py +317 -0
- pyfect/hash_ring.py +206 -0
- pyfect/hash_set.py +163 -0
- pyfect/http/__init__.py +125 -0
- pyfect/http/_asgi_listener.py +272 -0
- pyfect/http/_authority.py +63 -0
- pyfect/http/_brotli.py +27 -0
- pyfect/http/_compression.py +52 -0
- pyfect/http/_field.py +18 -0
- pyfect/http/_foreign_path.py +27 -0
- pyfect/http/_form_data.py +34 -0
- pyfect/http/_httpx_options.py +120 -0
- pyfect/http/_in_memory.py +76 -0
- pyfect/http/_request_state.py +59 -0
- pyfect/http/_vary.py +14 -0
- pyfect/http/abort.py +65 -0
- pyfect/http/asgi/__init__.py +59 -0
- pyfect/http/asgi/_app.py +155 -0
- pyfect/http/asgi/_http.py +201 -0
- pyfect/http/asgi/_mount.py +263 -0
- pyfect/http/asgi/_scope.py +86 -0
- pyfect/http/asgi/_serve.py +72 -0
- pyfect/http/asgi/_types.py +13 -0
- pyfect/http/asgi/_web_socket.py +325 -0
- pyfect/http/body.py +437 -0
- pyfect/http/client/__init__.py +111 -0
- pyfect/http/client/_circuit_breaker.py +113 -0
- pyfect/http/client/_cookie_jar.py +120 -0
- pyfect/http/client/_make.py +252 -0
- pyfect/http/client/_rate_limit.py +423 -0
- pyfect/http/client/_redirects.py +93 -0
- pyfect/http/client/_retry.py +115 -0
- pyfect/http/client/_service.py +497 -0
- pyfect/http/cookies.py +444 -0
- pyfect/http/error.py +188 -0
- pyfect/http/etag.py +96 -0
- pyfect/http/file_like.py +49 -0
- pyfect/http/find_my_way/__init__.py +10 -0
- pyfect/http/find_my_way/_nodes.py +186 -0
- pyfect/http/find_my_way/_paths.py +43 -0
- pyfect/http/find_my_way/_query_string.py +67 -0
- pyfect/http/find_my_way/_router.py +401 -0
- pyfect/http/headers.py +343 -0
- pyfect/http/http_effect.py +198 -0
- pyfect/http/httpx_client.py +291 -0
- pyfect/http/hypercorn_server.py +122 -0
- pyfect/http/incoming_message.py +140 -0
- pyfect/http/live_server/__init__.py +191 -0
- pyfect/http/live_server/_body.py +164 -0
- pyfect/http/live_server/_exchange.py +321 -0
- pyfect/http/live_server/_head.py +194 -0
- pyfect/http/live_server/_inbound.py +156 -0
- pyfect/http/live_server/_listener.py +211 -0
- pyfect/http/live_server/_serve.py +225 -0
- pyfect/http/live_server/_timers.py +20 -0
- pyfect/http/live_server/_upgrade.py +108 -0
- pyfect/http/live_server/_websocket.py +286 -0
- pyfect/http/live_server/_ws_frames.py +242 -0
- pyfect/http/method.py +30 -0
- pyfect/http/middleware/__init__.py +61 -0
- pyfect/http/middleware/_compression.py +156 -0
- pyfect/http/middleware/_cors.py +129 -0
- pyfect/http/middleware/_decompression.py +274 -0
- pyfect/http/middleware/_forwarded.py +113 -0
- pyfect/http/middleware/_logger.py +73 -0
- pyfect/http/middleware/_search_params.py +34 -0
- pyfect/http/middleware/_tracer.py +153 -0
- pyfect/http/middleware/_types.py +16 -0
- pyfect/http/mime/__init__.py +69 -0
- pyfect/http/mime/_types.py +361 -0
- pyfect/http/multipart.py +613 -0
- pyfect/http/multipart_parser/__init__.py +348 -0
- pyfect/http/multipart_parser/_content_type.py +109 -0
- pyfect/http/multipart_parser/_headers.py +206 -0
- pyfect/http/multipart_parser/_search.py +85 -0
- pyfect/http/origin.py +146 -0
- pyfect/http/platform.py +593 -0
- pyfect/http/prometheus.py +34 -0
- pyfect/http/request.py +384 -0
- pyfect/http/response.py +474 -0
- pyfect/http/router/__init__.py +82 -0
- pyfect/http/router/_api.py +462 -0
- pyfect/http/router/_in_memory.py +76 -0
- pyfect/http/router/_markers.py +47 -0
- pyfect/http/router/_middleware.py +181 -0
- pyfect/http/router/_middleware_stack.py +51 -0
- pyfect/http/router/_provided.py +31 -0
- pyfect/http/router/_route.py +114 -0
- pyfect/http/router/_router.py +308 -0
- pyfect/http/schema.py +276 -0
- pyfect/http/server.py +199 -0
- pyfect/http/server_error.py +261 -0
- pyfect/http/server_request.py +729 -0
- pyfect/http/server_respondable.py +77 -0
- pyfect/http/server_response.py +569 -0
- pyfect/http/static_server/__init__.py +257 -0
- pyfect/http/static_server/_conditional.py +72 -0
- pyfect/http/static_server/_mime.py +55 -0
- pyfect/http/static_server/_range.py +53 -0
- pyfect/http/status.py +51 -0
- pyfect/http/template.py +161 -0
- pyfect/http/trace_context.py +91 -0
- pyfect/http/url.py +442 -0
- pyfect/http/url_params.py +304 -0
- pyfect/http/uvicorn_server.py +119 -0
- pyfect/http/web.py +171 -0
- pyfect/http/web_handler.py +463 -0
- pyfect/http/wire.py +209 -0
- pyfect/http_api/__init__.py +83 -0
- pyfect/http_api/_assets/scalar.js +8 -0
- pyfect/http_api/_assets/swagger-ui.css +3 -0
- pyfect/http_api/_assets/swagger-ui.js +4 -0
- pyfect/http_api/_client_method.py +220 -0
- pyfect/http_api/_client_payload.py +144 -0
- pyfect/http_api/_client_response.py +377 -0
- pyfect/http_api/_handlers.py +282 -0
- pyfect/http_api/_html.py +38 -0
- pyfect/http_api/_media_type.py +6 -0
- pyfect/http_api/_openapi_responses.py +164 -0
- pyfect/http_api/_openapi_schemas.py +163 -0
- pyfect/http_api/_path.py +102 -0
- pyfect/http_api/_payload.py +260 -0
- pyfect/http_api/_response.py +363 -0
- pyfect/http_api/_security.py +174 -0
- pyfect/http_api/api.py +265 -0
- pyfect/http_api/builder.py +447 -0
- pyfect/http_api/client.py +474 -0
- pyfect/http_api/endpoint.py +969 -0
- pyfect/http_api/error.py +280 -0
- pyfect/http_api/group.py +215 -0
- pyfect/http_api/middleware.py +232 -0
- pyfect/http_api/openapi.py +396 -0
- pyfect/http_api/scalar.py +143 -0
- pyfect/http_api/schema.py +713 -0
- pyfect/http_api/security.py +91 -0
- pyfect/http_api/swagger.py +69 -0
- pyfect/http_api/test.py +105 -0
- pyfect/json_patch.py +255 -0
- pyfect/json_pointer.py +100 -0
- pyfect/json_schema/__init__.py +66 -0
- pyfect/json_schema/_api.py +96 -0
- pyfect/json_schema/_converter.py +258 -0
- pyfect/json_schema/_draft04.py +198 -0
- pyfect/json_schema/_draft07.py +203 -0
- pyfect/json_schema/_keywords.py +202 -0
- pyfect/json_schema/_model.py +201 -0
- pyfect/json_schema/_openapi.py +208 -0
- pyfect/latch.py +127 -0
- pyfect/layer.py +479 -0
- pyfect/layer_map.py +279 -0
- pyfect/layer_ref.py +208 -0
- pyfect/logger/__init__.py +91 -0
- pyfect/logger/_batched.py +49 -0
- pyfect/logger/_console.py +116 -0
- pyfect/logger/_file.py +31 -0
- pyfect/logger/_formats.py +104 -0
- pyfect/logger/_layer.py +50 -0
- pyfect/logger/_level.py +53 -0
- pyfect/logger/_log.py +142 -0
- pyfect/logger/_model.py +163 -0
- pyfect/logger/_refs.py +78 -0
- pyfect/logger/_stdlib.py +54 -0
- pyfect/logger/_text.py +263 -0
- pyfect/logger/_tracer.py +35 -0
- pyfect/managed_runtime.py +393 -0
- pyfect/metric/__init__.py +119 -0
- pyfect/metric/_boundaries.py +27 -0
- pyfect/metric/_kinds.py +417 -0
- pyfect/metric/_metric.py +302 -0
- pyfect/metric/_prometheus.py +150 -0
- pyfect/metric/_refs.py +78 -0
- pyfect/metric/_runtime.py +75 -0
- pyfect/metric/_snapshot.py +97 -0
- pyfect/metric/_state.py +74 -0
- pyfect/msgspec.py +98 -0
- pyfect/mutable_hash_map.py +140 -0
- pyfect/mutable_hash_set.py +95 -0
- pyfect/net/__init__.py +18 -0
- pyfect/net/_errors.py +29 -0
- pyfect/net/address_resolver.py +179 -0
- pyfect/net/dns/__init__.py +92 -0
- pyfect/net/dns/_error.py +43 -0
- pyfect/net/dns/_records.py +335 -0
- pyfect/net/dns/_service.py +287 -0
- pyfect/net/dns/_system.py +89 -0
- pyfect/net/host.py +311 -0
- pyfect/net/ip_interface.py +202 -0
- pyfect/net/ip_network.py +250 -0
- pyfect/net/net_address/__init__.py +245 -0
- pyfect/net/net_address/_inet.py +412 -0
- pyfect/net/net_address/_ip.py +348 -0
- pyfect/net/net_address/_mac.py +119 -0
- pyfect/optic/__init__.py +50 -0
- pyfect/optic/_builtins.py +90 -0
- pyfect/optic/_data.py +97 -0
- pyfect/optic/_optic.py +422 -0
- pyfect/optic/_steps.py +151 -0
- pyfect/option.py +362 -0
- pyfect/otel/__init__.py +22 -0
- pyfect/otel/_attributes.py +67 -0
- pyfect/otel/_producer.py +322 -0
- pyfect/otel/_shutdown.py +26 -0
- pyfect/otel/_span.py +292 -0
- pyfect/otel/_wrapper.py +92 -0
- pyfect/otel/logger.py +154 -0
- pyfect/otel/metrics.py +126 -0
- pyfect/otel/resource.py +111 -0
- pyfect/otel/sdk.py +195 -0
- pyfect/otel/tracer.py +157 -0
- pyfect/partitioned_semaphore.py +211 -0
- pyfect/path.py +304 -0
- pyfect/persistence/__init__.py +77 -0
- pyfect/persistence/_columns.py +32 -0
- pyfect/persistence/_error.py +14 -0
- pyfect/persistence/_seconds.py +68 -0
- pyfect/persistence/_sql_keys.py +47 -0
- pyfect/persistence/circuit_breaker/__init__.py +120 -0
- pyfect/persistence/circuit_breaker/_breaker.py +317 -0
- pyfect/persistence/circuit_breaker/_errors.py +67 -0
- pyfect/persistence/circuit_breaker/_memory.py +243 -0
- pyfect/persistence/circuit_breaker/_redis.py +509 -0
- pyfect/persistence/circuit_breaker/_store.py +60 -0
- pyfect/persistence/circuit_breaker/_types.py +191 -0
- pyfect/persistence/key_value_store/__init__.py +51 -0
- pyfect/persistence/key_value_store/_layers.py +216 -0
- pyfect/persistence/key_value_store/_schema_store.py +91 -0
- pyfect/persistence/key_value_store/_sql.py +197 -0
- pyfect/persistence/key_value_store/_store.py +212 -0
- pyfect/persistence/persistable.py +164 -0
- pyfect/persistence/persisted_cache.py +159 -0
- pyfect/persistence/persisted_queue/__init__.py +75 -0
- pyfect/persistence/persisted_queue/_error.py +42 -0
- pyfect/persistence/persisted_queue/_mailbox.py +101 -0
- pyfect/persistence/persisted_queue/_memory.py +182 -0
- pyfect/persistence/persisted_queue/_queue.py +272 -0
- pyfect/persistence/persisted_queue/_redis.py +455 -0
- pyfect/persistence/persisted_queue/_redis_scripts.py +395 -0
- pyfect/persistence/persisted_queue/_sql.py +334 -0
- pyfect/persistence/persisted_queue/_sql_migrations.py +319 -0
- pyfect/persistence/persisted_queue/_sql_statements.py +441 -0
- pyfect/persistence/persisted_queue/_store.py +147 -0
- pyfect/persistence/persistence/__init__.py +84 -0
- pyfect/persistence/persistence/_kvs.py +135 -0
- pyfect/persistence/persistence/_memory.py +62 -0
- pyfect/persistence/persistence/_redis.py +162 -0
- pyfect/persistence/persistence/_service.py +276 -0
- pyfect/persistence/persistence/_sql.py +499 -0
- pyfect/persistence/rate_limiter/__init__.py +82 -0
- pyfect/persistence/rate_limiter/_errors.py +59 -0
- pyfect/persistence/rate_limiter/_limiter.py +325 -0
- pyfect/persistence/rate_limiter/_memory.py +217 -0
- pyfect/persistence/rate_limiter/_redis.py +485 -0
- pyfect/persistence/rate_limiter/_store.py +89 -0
- pyfect/persistence/redis/__init__.py +52 -0
- pyfect/persistence/redis/_error.py +12 -0
- pyfect/persistence/redis/_make.py +234 -0
- pyfect/persistence/redis/_script.py +78 -0
- pyfect/persistence/redis/_service.py +104 -0
- pyfect/persistence/redis_py.py +303 -0
- pyfect/persistence/user_directories.py +195 -0
- pyfect/platform.py +26 -0
- pyfect/platform_error.py +256 -0
- pyfect/pool/__init__.py +36 -0
- pyfect/pool/_pool.py +707 -0
- pyfect/pool/_state.py +161 -0
- pyfect/pool/_ttl.py +105 -0
- pyfect/pool/_waiters.py +116 -0
- pyfect/primary_key.py +35 -0
- pyfect/process/__init__.py +82 -0
- pyfect/process/_child.py +213 -0
- pyfect/process/_command.py +358 -0
- pyfect/process/_handle.py +77 -0
- pyfect/process/_live.py +455 -0
- pyfect/process/_os.py +78 -0
- pyfect/process/_pipes.py +291 -0
- pyfect/process/_spawner.py +75 -0
- pyfect/pubsub/__init__.py +33 -0
- pyfect/pubsub/_atomic.py +181 -0
- pyfect/pubsub/_hub.py +214 -0
- pyfect/pubsub/_pubsub.py +214 -0
- pyfect/pubsub/_replay.py +107 -0
- pyfect/pubsub/_subscription.py +226 -0
- pyfect/pull.py +132 -0
- pyfect/py.typed +0 -0
- pyfect/pydantic.py +188 -0
- pyfect/queue/__init__.py +33 -0
- pyfect/queue/_queue.py +525 -0
- pyfect/queue/_state.py +111 -0
- pyfect/queue/_views.py +55 -0
- pyfect/random.py +146 -0
- pyfect/rc_map.py +363 -0
- pyfect/rc_ref.py +271 -0
- pyfect/reactivity/__init__.py +53 -0
- pyfect/reactivity/_async_result_schema.py +227 -0
- pyfect/reactivity/_hydration.py +18 -0
- pyfect/reactivity/_live.py +21 -0
- pyfect/reactivity/_reactivity.py +256 -0
- pyfect/reactivity/_result_effect.py +17 -0
- pyfect/reactivity/_time.py +11 -0
- pyfect/reactivity/async_result.py +679 -0
- pyfect/reactivity/atom/__init__.py +143 -0
- pyfect/reactivity/atom/_combinators.py +223 -0
- pyfect/reactivity/atom/_constructors.py +80 -0
- pyfect/reactivity/atom/_conversions.py +79 -0
- pyfect/reactivity/atom/_effect.py +252 -0
- pyfect/reactivity/atom/_fn.py +341 -0
- pyfect/reactivity/atom/_kvs.py +101 -0
- pyfect/reactivity/atom/_optimistic.py +162 -0
- pyfect/reactivity/atom/_runtime.py +323 -0
- pyfect/reactivity/atom/_serializable.py +65 -0
- pyfect/reactivity/atom/_subscription_ref.py +102 -0
- pyfect/reactivity/atom/_swr.py +69 -0
- pyfect/reactivity/atom/_types.py +435 -0
- pyfect/reactivity/atom_http_api.py +667 -0
- pyfect/reactivity/atom_ref.py +260 -0
- pyfect/reactivity/atom_registry/__init__.py +219 -0
- pyfect/reactivity/atom_registry/_batch.py +96 -0
- pyfect/reactivity/atom_registry/_dispatcher.py +60 -0
- pyfect/reactivity/atom_registry/_lifetime.py +202 -0
- pyfect/reactivity/atom_registry/_node.py +423 -0
- pyfect/reactivity/atom_registry/_registry.py +380 -0
- pyfect/reactivity/atom_rpc.py +283 -0
- pyfect/reactivity/hydration.py +200 -0
- pyfect/redacted.py +83 -0
- pyfect/ref.py +129 -0
- pyfect/resource.py +98 -0
- pyfect/result.py +306 -0
- pyfect/rpc/__init__.py +64 -0
- pyfect/rpc/_encoded_schema.py +86 -0
- pyfect/rpc/_json_rpc.py +246 -0
- pyfect/rpc/_methods.py +177 -0
- pyfect/rpc/_rpc.py +498 -0
- pyfect/rpc/client/__init__.py +100 -0
- pyfect/rpc/client/_core.py +449 -0
- pyfect/rpc/client/_http.py +257 -0
- pyfect/rpc/client/_protocol.py +171 -0
- pyfect/rpc/client/_serialized.py +321 -0
- pyfect/rpc/client/_transports.py +328 -0
- pyfect/rpc/client/_worker.py +283 -0
- pyfect/rpc/client_error.py +35 -0
- pyfect/rpc/group.py +296 -0
- pyfect/rpc/message.py +299 -0
- pyfect/rpc/middleware.py +182 -0
- pyfect/rpc/schema.py +89 -0
- pyfect/rpc/serialization.py +366 -0
- pyfect/rpc/server/__init__.py +181 -0
- pyfect/rpc/server/_core.py +549 -0
- pyfect/rpc/server/_protocol.py +123 -0
- pyfect/rpc/server/_serialized.py +363 -0
- pyfect/rpc/server/_stdio.py +101 -0
- pyfect/rpc/server/_transports.py +427 -0
- pyfect/rpc/server/_worker.py +108 -0
- pyfect/rpc/test.py +74 -0
- pyfect/rpc/worker.py +92 -0
- pyfect/run.py +393 -0
- pyfect/schedule/__init__.py +91 -0
- pyfect/schedule/_combinators.py +168 -0
- pyfect/schedule/_constructors.py +223 -0
- pyfect/schedule/_cron.py +49 -0
- pyfect/schedule/_drive.py +191 -0
- pyfect/schedule/_model.py +405 -0
- pyfect/scheduler.py +575 -0
- pyfect/schema/__init__.py +866 -0
- pyfect/schema/_adapters.py +39 -0
- pyfect/schema/_arbitrary_constraint.py +242 -0
- pyfect/schema/_arbitrary_graph.py +325 -0
- pyfect/schema/_arbitrary_links.py +179 -0
- pyfect/schema/_arbitrary_number.py +112 -0
- pyfect/schema/_arrays.py +287 -0
- pyfect/schema/_assignable.py +118 -0
- pyfect/schema/_boolean_literals.py +31 -0
- pyfect/schema/_checks_number.py +216 -0
- pyfect/schema/_checks_order.py +140 -0
- pyfect/schema/_checks_size.py +277 -0
- pyfect/schema/_checks_string.py +241 -0
- pyfect/schema/_class.py +569 -0
- pyfect/schema/_codec_derivation.py +227 -0
- pyfect/schema/_codec_links.py +221 -0
- pyfect/schema/_codecs.py +316 -0
- pyfect/schema/_collections.py +172 -0
- pyfect/schema/_constructor_default.py +89 -0
- pyfect/schema/_data.py +440 -0
- pyfect/schema/_data_codecs.py +145 -0
- pyfect/schema/_decimal_regexp.py +243 -0
- pyfect/schema/_declare.py +68 -0
- pyfect/schema/_derive.py +292 -0
- pyfect/schema/_duration_codecs.py +27 -0
- pyfect/schema/_ecma_pattern.py +416 -0
- pyfect/schema/_error.py +26 -0
- pyfect/schema/_error_instance.py +222 -0
- pyfect/schema/_graph.py +271 -0
- pyfect/schema/_instances.py +240 -0
- pyfect/schema/_jsonschema/__init__.py +90 -0
- pyfect/schema/_jsonschema/_annotations.py +114 -0
- pyfect/schema/_jsonschema/_checks.py +253 -0
- pyfect/schema/_jsonschema/_compile.py +346 -0
- pyfect/schema/_jsonschema/_exact.py +19 -0
- pyfect/schema/_jsonschema/_merge.py +211 -0
- pyfect/schema/_jsonschema/_objects.py +231 -0
- pyfect/schema/_jsonschema/_references.py +221 -0
- pyfect/schema/_jsonschema/_template.py +69 -0
- pyfect/schema/_literals.py +147 -0
- pyfect/schema/_middleware.py +209 -0
- pyfect/schema/_net.py +522 -0
- pyfect/schema/_options.py +49 -0
- pyfect/schema/_parse.py +351 -0
- pyfect/schema/_parsed_text.py +37 -0
- pyfect/schema/_primitives.py +48 -0
- pyfect/schema/_record.py +41 -0
- pyfect/schema/_refine.py +81 -0
- pyfect/schema/_schema.py +158 -0
- pyfect/schema/_semver.py +144 -0
- pyfect/schema/_strategy/__init__.py +258 -0
- pyfect/schema/_strategy/_big_decimal.py +203 -0
- pyfect/schema/_strategy/_composites.py +119 -0
- pyfect/schema/_strategy/_leaves.py +94 -0
- pyfect/schema/_strategy/_net.py +133 -0
- pyfect/schema/_struct.py +87 -0
- pyfect/schema/_struct_keys.py +128 -0
- pyfect/schema/_tagged.py +254 -0
- pyfect/schema/_template_literal.py +172 -0
- pyfect/schema/_to_codec_array_from_single.py +115 -0
- pyfect/schema/_to_codec_go_json.py +174 -0
- pyfect/schema/_to_codec_json.py +73 -0
- pyfect/schema/_to_codec_string_tree.py +115 -0
- pyfect/schema/_to_differ_json_patch.py +44 -0
- pyfect/schema/_to_encoder_xml.py +119 -0
- pyfect/schema/_to_equivalence.py +186 -0
- pyfect/schema/_to_formatter.py +180 -0
- pyfect/schema/_to_iso.py +73 -0
- pyfect/schema/_to_strategy.py +31 -0
- pyfect/schema/_transform.py +210 -0
- pyfect/schema/_tree.py +27 -0
- pyfect/schema/_type_walk.py +53 -0
- pyfect/schema/_undefined.py +58 -0
- pyfect/schema/_value_codecs.py +84 -0
- pyfect/schema/_values.py +123 -0
- pyfect/schema/_void.py +86 -0
- pyfect/schema/ast/__init__.py +227 -0
- pyfect/schema/ast/_annotations.py +43 -0
- pyfect/schema/ast/_arrays.py +210 -0
- pyfect/schema/ast/_base.py +295 -0
- pyfect/schema/ast/_candidates.py +309 -0
- pyfect/schema/ast/_check.py +181 -0
- pyfect/schema/ast/_class.py +159 -0
- pyfect/schema/ast/_constructors.py +65 -0
- pyfect/schema/ast/_declaration.py +97 -0
- pyfect/schema/ast/_encoding.py +111 -0
- pyfect/schema/ast/_json.py +129 -0
- pyfect/schema/ast/_keywords.py +125 -0
- pyfect/schema/ast/_literal.py +157 -0
- pyfect/schema/ast/_objects.py +356 -0
- pyfect/schema/ast/_record.py +36 -0
- pyfect/schema/ast/_result.py +116 -0
- pyfect/schema/ast/_steps.py +209 -0
- pyfect/schema/ast/_suspend.py +65 -0
- pyfect/schema/ast/_template_literal.py +256 -0
- pyfect/schema/ast/_union.py +172 -0
- pyfect/schema/getter/__init__.py +136 -0
- pyfect/schema/getter/_binary.py +104 -0
- pyfect/schema/getter/_coerce.py +196 -0
- pyfect/schema/getter/_getter.py +243 -0
- pyfect/schema/getter/_make.py +151 -0
- pyfect/schema/getter/_text.py +141 -0
- pyfect/schema/getter/_tree_record.py +170 -0
- pyfect/schema/issue.py +420 -0
- pyfect/schema/model/__init__.py +120 -0
- pyfect/schema/model/_class.py +245 -0
- pyfect/schema/model/_dates.py +103 -0
- pyfect/schema/model/_fields.py +77 -0
- pyfect/schema/model/_toolkit.py +114 -0
- pyfect/schema/model/_uuid.py +69 -0
- pyfect/schema/representation/__init__.py +424 -0
- pyfect/schema/representation/_builtin_revivers.py +331 -0
- pyfect/schema/representation/_code.py +106 -0
- pyfect/schema/representation/_code_builtins.py +281 -0
- pyfect/schema/representation/_code_document.py +563 -0
- pyfect/schema/representation/_code_sort.py +111 -0
- pyfect/schema/representation/_from.py +278 -0
- pyfect/schema/representation/_import/__init__.py +78 -0
- pyfect/schema/representation/_import/_finalize.py +121 -0
- pyfect/schema/representation/_import/_intersect.py +467 -0
- pyfect/schema/representation/_import/_js_order.py +66 -0
- pyfect/schema/representation/_import/_keywords.py +224 -0
- pyfect/schema/representation/_import/_nodes.py +199 -0
- pyfect/schema/representation/_import/_translate.py +455 -0
- pyfect/schema/representation/_json.py +520 -0
- pyfect/schema/representation/_json_schema.py +178 -0
- pyfect/schema/representation/_model.py +284 -0
- pyfect/schema/representation/_revivers.py +89 -0
- pyfect/schema/representation/_to.py +249 -0
- pyfect/schema/transformation/__init__.py +99 -0
- pyfect/schema/transformation/_builtins.py +314 -0
- pyfect/schema/transformation/_durations.py +150 -0
- pyfect/schema/transformation/_transformation.py +177 -0
- pyfect/schema/variant_schema/__init__.py +69 -0
- pyfect/schema/variant_schema/_class.py +188 -0
- pyfect/schema/variant_schema/_defaults.py +30 -0
- pyfect/schema/variant_schema/_field.py +32 -0
- pyfect/schema/variant_schema/_struct.py +130 -0
- pyfect/schema/variant_schema/_toolkit.py +160 -0
- pyfect/scope.py +374 -0
- pyfect/scoped_ref.py +124 -0
- pyfect/semaphore.py +276 -0
- pyfect/semver.py +403 -0
- pyfect/semver_range.py +420 -0
- pyfect/sink/__init__.py +131 -0
- pyfect/sink/_combinators.py +151 -0
- pyfect/sink/_constructors.py +187 -0
- pyfect/sink/_context.py +87 -0
- pyfect/sink/_folds.py +336 -0
- pyfect/sink/_for_each.py +87 -0
- pyfect/sink/_sink.py +265 -0
- pyfect/sink/_steps.py +34 -0
- pyfect/sink/_taking.py +183 -0
- pyfect/socket/__init__.py +146 -0
- pyfect/socket/_accepted.py +65 -0
- pyfect/socket/_connection.py +384 -0
- pyfect/socket/_errors.py +135 -0
- pyfect/socket/_loop.py +66 -0
- pyfect/socket/_net.py +281 -0
- pyfect/socket/_socket.py +245 -0
- pyfect/socket/_tls.py +88 -0
- pyfect/socket/_tls_session.py +117 -0
- pyfect/socket/_web_socket.py +555 -0
- pyfect/socket/datagram/__init__.py +110 -0
- pyfect/socket/datagram/_core.py +460 -0
- pyfect/socket/datagram/_errors.py +102 -0
- pyfect/socket/datagram/_live.py +675 -0
- pyfect/socket/datagram/_model.py +217 -0
- pyfect/socket/server.py +258 -0
- pyfect/socket/ws.py +484 -0
- pyfect/sql/__init__.py +60 -0
- pyfect/sql/_loop.py +134 -0
- pyfect/sql/clickhouse/__init__.py +74 -0
- pyfect/sql/clickhouse/_connection.py +237 -0
- pyfect/sql/clickhouse/_rows.py +87 -0
- pyfect/sql/clickhouse/client.py +322 -0
- pyfect/sql/clickhouse/config.py +241 -0
- pyfect/sql/clickhouse/driver.py +434 -0
- pyfect/sql/clickhouse/error.py +106 -0
- pyfect/sql/clickhouse/migrator.py +47 -0
- pyfect/sql/clickhouse/params.py +168 -0
- pyfect/sql/client/__init__.py +35 -0
- pyfect/sql/client/_client.py +309 -0
- pyfect/sql/client/_sqlite_acquirers.py +130 -0
- pyfect/sql/client/_transaction.py +410 -0
- pyfect/sql/connection.py +87 -0
- pyfect/sql/d1/__init__.py +48 -0
- pyfect/sql/d1/api.py +270 -0
- pyfect/sql/d1/client.py +344 -0
- pyfect/sql/d1/config.py +55 -0
- pyfect/sql/error.py +311 -0
- pyfect/sql/libsql/__init__.py +58 -0
- pyfect/sql/libsql/_connection.py +110 -0
- pyfect/sql/libsql/_hrana.py +258 -0
- pyfect/sql/libsql/_local.py +251 -0
- pyfect/sql/libsql/_targets.py +28 -0
- pyfect/sql/libsql/_values.py +46 -0
- pyfect/sql/libsql/client.py +225 -0
- pyfect/sql/libsql/config.py +170 -0
- pyfect/sql/libsql/migrator.py +43 -0
- pyfect/sql/libsql/sdk.py +123 -0
- pyfect/sql/migrator.py +434 -0
- pyfect/sql/model.py +324 -0
- pyfect/sql/mssql/__init__.py +79 -0
- pyfect/sql/mssql/_connection.py +169 -0
- pyfect/sql/mssql/_driver.py +103 -0
- pyfect/sql/mssql/_names.py +9 -0
- pyfect/sql/mssql/_pool.py +125 -0
- pyfect/sql/mssql/_tds.py +447 -0
- pyfect/sql/mssql/_tds_params.py +155 -0
- pyfect/sql/mssql/_worker.py +155 -0
- pyfect/sql/mssql/client.py +344 -0
- pyfect/sql/mssql/config.py +118 -0
- pyfect/sql/mssql/error.py +111 -0
- pyfect/sql/mssql/migrator.py +43 -0
- pyfect/sql/mssql/parameter.py +44 -0
- pyfect/sql/mssql/procedure.py +119 -0
- pyfect/sql/mssql/types.py +137 -0
- pyfect/sql/mysql/__init__.py +60 -0
- pyfect/sql/mysql/_asyncmy.py +168 -0
- pyfect/sql/mysql/_bind.py +76 -0
- pyfect/sql/mysql/_connection.py +156 -0
- pyfect/sql/mysql/_pool.py +63 -0
- pyfect/sql/mysql/_session.py +262 -0
- pyfect/sql/mysql/client.py +244 -0
- pyfect/sql/mysql/config.py +108 -0
- pyfect/sql/mysql/error.py +104 -0
- pyfect/sql/mysql/migrator.py +44 -0
- pyfect/sql/pg/__init__.py +82 -0
- pyfect/sql/pg/_resolve.py +284 -0
- pyfect/sql/pg/_session.py +380 -0
- pyfect/sql/pg/client.py +398 -0
- pyfect/sql/pg/config.py +142 -0
- pyfect/sql/pg/connection.py +585 -0
- pyfect/sql/pg/error.py +131 -0
- pyfect/sql/pg/migrator.py +139 -0
- pyfect/sql/pg/pool.py +265 -0
- pyfect/sql/resolver.py +294 -0
- pyfect/sql/result.py +24 -0
- pyfect/sql/schema.py +116 -0
- pyfect/sql/sqlite/__init__.py +26 -0
- pyfect/sql/sqlite/_connection.py +230 -0
- pyfect/sql/sqlite/_worker.py +71 -0
- pyfect/sql/sqlite/client.py +248 -0
- pyfect/sql/sqlite/migrator.py +43 -0
- pyfect/sql/statement/__init__.py +144 -0
- pyfect/sql/statement/_compiler.py +384 -0
- pyfect/sql/statement/_segments.py +487 -0
- pyfect/sql/statement/_statement.py +526 -0
- pyfect/sql/statement/_transforms.py +93 -0
- pyfect/sql/stream.py +88 -0
- pyfect/stdio.py +206 -0
- pyfect/stream/__init__.py +151 -0
- pyfect/stream/_async_iterable.py +129 -0
- pyfect/stream/_base.py +69 -0
- pyfect/stream/_bridge_methods.py +139 -0
- pyfect/stream/_catch.py +135 -0
- pyfect/stream/_catch_reason.py +558 -0
- pyfect/stream/_channel_methods.py +61 -0
- pyfect/stream/_chunk_methods.py +169 -0
- pyfect/stream/_chunking.py +310 -0
- pyfect/stream/_concat.py +65 -0
- pyfect/stream/_constructors.py +341 -0
- pyfect/stream/_context.py +147 -0
- pyfect/stream/_error_methods.py +254 -0
- pyfect/stream/_execution_plan.py +199 -0
- pyfect/stream/_fanout.py +154 -0
- pyfect/stream/_fanout_methods.py +183 -0
- pyfect/stream/_filter_methods.py +203 -0
- pyfect/stream/_grouping.py +168 -0
- pyfect/stream/_many.py +65 -0
- pyfect/stream/_map_methods.py +233 -0
- pyfect/stream/_mapping.py +126 -0
- pyfect/stream/_run.py +114 -0
- pyfect/stream/_run_methods.py +114 -0
- pyfect/stream/_service_methods.py +36 -0
- pyfect/stream/_sink_methods.py +151 -0
- pyfect/stream/_sinking.py +277 -0
- pyfect/stream/_sources.py +124 -0
- pyfect/stream/_stream.py +162 -0
- pyfect/stream/_taking.py +330 -0
- pyfect/stream/_text.py +43 -0
- pyfect/stream/_timing.py +294 -0
- pyfect/stream/_timing_methods.py +252 -0
- pyfect/stream/_zip_methods.py +279 -0
- pyfect/stream/_zipping.py +213 -0
- pyfect/subscription_ref.py +66 -0
- pyfect/synchronized_ref.py +38 -0
- pyfect/take.py +36 -0
- pyfect/terminal/__init__.py +41 -0
- pyfect/terminal/_keys.py +113 -0
- pyfect/terminal/_live.py +223 -0
- pyfect/terminal/_service.py +73 -0
- pyfect/testing/__init__.py +122 -0
- pyfect/testing/_assertions.py +92 -0
- pyfect/testing/_clock.py +309 -0
- pyfect/testing/_console.py +164 -0
- pyfect/testing/_crypto.py +44 -0
- pyfect/testing/_decorators.py +211 -0
- pyfect/testing/_flaky.py +34 -0
- pyfect/testing/_layers.py +153 -0
- pyfect/testing/_prop.py +255 -0
- pyfect/testing/_runners.py +84 -0
- pyfect/testing/_runtime.py +174 -0
- pyfect/testing/_schema.py +238 -0
- pyfect/testing/plugin.py +59 -0
- pyfect/tracer/__init__.py +107 -0
- pyfect/tracer/_model.py +176 -0
- pyfect/tracer/_native.py +172 -0
- pyfect/tracer/_refs.py +87 -0
- pyfect/tracer/_spans.py +269 -0
- pyfect/transaction.py +340 -0
- pyfect/trie.py +317 -0
- pyfect/tx_chunk.py +127 -0
- pyfect/tx_deferred.py +75 -0
- pyfect/tx_hash_map.py +265 -0
- pyfect/tx_hash_set.py +151 -0
- pyfect/tx_priority_queue.py +224 -0
- pyfect/tx_pubsub.py +194 -0
- pyfect/tx_queue/__init__.py +27 -0
- pyfect/tx_queue/_queue.py +359 -0
- pyfect/tx_queue/_views.py +60 -0
- pyfect/tx_reentrant_lock.py +201 -0
- pyfect/tx_ref.py +79 -0
- pyfect/tx_semaphore.py +136 -0
- pyfect/tx_subscription_ref.py +118 -0
- pyfect/workers/__init__.py +62 -0
- pyfect/workers/_frames.py +82 -0
- pyfect/workers/_mailbox.py +51 -0
- pyfect/workers/_port.py +106 -0
- pyfect/workers/_process.py +155 -0
- pyfect/workers/_thread.py +100 -0
- pyfect/workers/python_worker.py +133 -0
- pyfect/workers/python_worker_runner.py +112 -0
- pyfect/workers/transferable.py +103 -0
- pyfect/workers/worker.py +273 -0
- pyfect/workers/worker_error.py +86 -0
- pyfect/workers/worker_runner.py +85 -0
- pyfect/workflow/__init__.py +78 -0
- pyfect/workflow/_crypto.py +23 -0
- pyfect/workflow/_encoded.py +381 -0
- pyfect/workflow/_memory.py +424 -0
- pyfect/workflow/_result.py +43 -0
- pyfect/workflow/_services.py +241 -0
- pyfect/workflow/_suspension.py +153 -0
- pyfect/workflow/activity.py +427 -0
- pyfect/workflow/durable_clock.py +72 -0
- pyfect/workflow/durable_deferred.py +403 -0
- pyfect/workflow/durable_queue.py +259 -0
- pyfect/workflow/workflow.py +509 -0
- pyfect/workflow/workflow_engine.py +42 -0
- pyfect/workflow/workflow_proxy.py +161 -0
- pyfect/workflow/workflow_proxy_server.py +146 -0
- pyfect_dev-0.1.0.dist-info/METADATA +296 -0
- pyfect_dev-0.1.0.dist-info/RECORD +1265 -0
- pyfect_dev-0.1.0.dist-info/WHEEL +4 -0
- pyfect_dev-0.1.0.dist-info/entry_points.txt +3 -0
- pyfect_dev-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,1015 @@
|
|
|
1
|
+
"""Schemas generated by ``scripts/gen_ai_schemas.py``; do not edit.
|
|
2
|
+
Import them from ``pyfect.ai.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
|
+
|
|
16
|
+
CompoundFilter: _S.Bottom[_T.CompoundFilter, _t.Any] = _b.lazy('pyfect.ai.openai.generated._recursive', '_recursive_CompoundFilter')
|
|
17
|
+
BetaCompoundFilter: _S.Bottom[_T.BetaCompoundFilter, _t.Any] = _b.lazy('pyfect.ai.openai.generated._recursive', '_recursive_BetaCompoundFilter')
|
|
18
|
+
AssistantToolsCode: _StructSchema[_T.AssistantToolsCode, _t.Never, _t.Never] = _b.struct(_T.AssistantToolsCode, {"type": _b.literal("code_interpreter").annotate(description="The type of tool being defined: `code_interpreter`")}).annotate(title="Code interpreter tool", identifier="AssistantToolsCode")
|
|
19
|
+
FileSearchRanker: _S.Bottom[_T.FileSearchRanker, _t.Any] = _b.literals(["auto", "default_2024_08_21"]).annotate(description="The ranker to use for the file search. If not specified will use the `auto` ranker.", identifier="FileSearchRanker")
|
|
20
|
+
FunctionParameters: _S.Bottom[_T.FunctionParameters, _t.Any] = _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://developers.openai.com/api/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.\n\nOmitting `parameters` defines a function with an empty parameter list.", identifier="FunctionParameters")
|
|
21
|
+
Metadata: _S.Bottom[_T.Metadata, _t.Any] = _b.union(_b.record(_S.String, _S.String).annotate(description="Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n"), _S.Null).annotate(identifier="Metadata")
|
|
22
|
+
ResponseFormatText: _StructSchema[_T.ResponseFormatText, _t.Never, _t.Never] = _b.struct(_T.ResponseFormatText, {"type": _b.literal("text").annotate(description="The type of response format being defined. Always `text`.")}).annotate(title="Text", description="Default response format. Used to generate text responses.\n", identifier="ResponseFormatText")
|
|
23
|
+
ResponseFormatJsonObject: _StructSchema[_T.ResponseFormatJsonObject, _t.Never, _t.Never] = _b.struct(_T.ResponseFormatJsonObject, {"type": _b.literal("json_object").annotate(description="The type of response format being defined. Always `json_object`.")}).annotate(title="JSON object", description="JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n", identifier="ResponseFormatJsonObject")
|
|
24
|
+
ResponseFormatJsonSchemaSchema: _S.Bottom[_T.ResponseFormatJsonSchemaSchema, _t.Any] = _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(title="JSON schema", description="The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n", identifier="ResponseFormatJsonSchemaSchema")
|
|
25
|
+
_MisalignmentErrorType: _S.Bottom[_T._MisalignmentErrorType, _t.Any] = _b.union(_S.String, _b.literals(["potentially_unintended_data_transfer", "potentially_unintended_data_access", "potentially_unintended_destructive_activity", "other"])).annotate(identifier="_MisalignmentErrorType")
|
|
26
|
+
_MisalignmentSteer: _StructSchema[_T._MisalignmentSteer, _t.Never, _t.Never] = _b.struct(_T._MisalignmentSteer, {"message": _S.String.annotate(description="The public continuation instruction.")}).annotate(identifier="_MisalignmentSteer")
|
|
27
|
+
AssistantSupportedModels: _S.Bottom[_T.AssistantSupportedModels, _t.Any] = _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", "o3-mini", "o3-mini-2025-01-31", "o1", "o1-2024-12-17", "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"]).annotate(identifier="AssistantSupportedModels")
|
|
28
|
+
ReasoningEffort: _S.Bottom[_T.ReasoningEffort, _t.Any] = _b.union(_b.literals(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).annotate(description="Constrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](https://developers.openai.com/api/docs/guides/reasoning)\nfor model-specific support.\n"), _S.Null).annotate(identifier="ReasoningEffort")
|
|
29
|
+
DeleteAssistantResponse: _StructSchema[_T.DeleteAssistantResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteAssistantResponse, {"id": _S.String, "deleted": _S.Boolean, "object": _b.literal("assistant.deleted")}).annotate(identifier="DeleteAssistantResponse")
|
|
30
|
+
VoiceIdsShared: _S.Bottom[_T.VoiceIdsShared, _t.Any] = _b.union(_S.String, _b.literals(["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse", "marin", "cedar"])).annotate(identifier="VoiceIdsShared")
|
|
31
|
+
SpeechAudioDeltaEvent: _StructSchema[_T.SpeechAudioDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.SpeechAudioDeltaEvent, {"type": _b.literal("speech.audio.delta").annotate(description="The type of the event. Always `speech.audio.delta`.\n"), "audio": _S.String.annotate(description="A chunk of Base64-encoded audio data.\n")}).annotate(description="Emitted for each chunk of audio data generated during speech synthesis.", identifier="SpeechAudioDeltaEvent")
|
|
32
|
+
SpeechAudioDoneEvent: _StructSchema[_T.SpeechAudioDoneEvent, _t.Never, _t.Never] = _b.struct(_T.SpeechAudioDoneEvent, {"type": _b.literal("speech.audio.done").annotate(description="The type of the event. Always `speech.audio.done`.\n"), "usage": _b.struct(_T.SpeechAudioDoneEvent__usage, {"input_tokens": _b.check(_S.Number.annotate(description="Number of input tokens in the prompt."), _S.is_int().annotate(expected="an integer")), "output_tokens": _b.check(_S.Number.annotate(description="Number of output tokens generated."), _S.is_int().annotate(expected="an integer")), "total_tokens": _b.check(_S.Number.annotate(description="Total number of tokens used (input + output)."), _S.is_int().annotate(expected="an integer"))}).annotate(description="Token usage statistics for the request.\n")}).annotate(description="Emitted when the speech synthesis is complete and all audio has been streamed.", identifier="SpeechAudioDoneEvent")
|
|
33
|
+
__ClientMultipartFile: _S.Bottom[_T.__ClientMultipartFile, _t.Any] = _b.instance_of(_File, expected="File | Blob")
|
|
34
|
+
AudioResponseFormat: _S.Bottom[_T.AudioResponseFormat, _t.Any] = _b.literals(["json", "text", "srt", "verbose_json", "vtt", "diarized_json"]).annotate(description="The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.\n", identifier="AudioResponseFormat")
|
|
35
|
+
TranscriptionInclude: _S.Bottom[_T.TranscriptionInclude, _t.Any] = _b.literal("logprobs").annotate(identifier="TranscriptionInclude")
|
|
36
|
+
VadConfig: _StructSchema[_T.VadConfig, _t.Never, _t.Never] = _b.struct(_T.VadConfig, {"type": _b.literal("server_vad").annotate(description="Must be set to `server_vad` to enable manual chunking using server side VAD."), "prefix_padding_ms": _b.check(_S.Number.annotate(description="Amount of audio to include before the VAD detected speech (in \nmilliseconds).\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).\nWith 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")), "threshold": _b.check(_S.Number.annotate(description="Sensitivity threshold (0.0 to 1.0) for voice activity detection. 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"))}, optional=("prefix_padding_ms", "silence_duration_ms", "threshold",)).annotate(identifier="VadConfig")
|
|
37
|
+
TranscriptionLanguage: _StructSchema[_T.TranscriptionLanguage, _t.Never, _t.Never] = _b.struct(_T.TranscriptionLanguage, {"code": _S.String.annotate(description="The code of a language detected in the audio.")}).annotate(description="A language detected in transcribed audio.", identifier="TranscriptionLanguage")
|
|
38
|
+
TranscriptTextUsageTokens: _StructSchema[_T.TranscriptTextUsageTokens, _t.Never, _t.Never] = _b.struct(_T.TranscriptTextUsageTokens, {"type": _b.literal("tokens").annotate(description="The type of the usage object. Always `tokens` for this variant."), "input_tokens": _b.check(_S.Number.annotate(description="Number of input tokens billed for this request."), _S.is_int().annotate(expected="an integer")), "input_token_details": _b.struct(_T.TranscriptTextUsageTokens__input_token_details, {"text_tokens": _b.check(_S.Number.annotate(description="Number of text tokens billed for this request."), _S.is_int().annotate(expected="an integer")), "audio_tokens": _b.check(_S.Number.annotate(description="Number of audio tokens billed for this request."), _S.is_int().annotate(expected="an integer"))}, optional=("text_tokens", "audio_tokens",)).annotate(description="Details about the input tokens billed for this request."), "output_tokens": _b.check(_S.Number.annotate(description="Number of output tokens generated."), _S.is_int().annotate(expected="an integer")), "total_tokens": _b.check(_S.Number.annotate(description="Total number of tokens used (input + output)."), _S.is_int().annotate(expected="an integer"))}, optional=("input_token_details",)).annotate(title="Token Usage", description="Usage statistics for models billed by token usage.", identifier="TranscriptTextUsageTokens")
|
|
39
|
+
TranscriptTextUsageDuration: _StructSchema[_T.TranscriptTextUsageDuration, _t.Never, _t.Never] = _b.struct(_T.TranscriptTextUsageDuration, {"type": _b.literal("duration").annotate(description="The type of the usage object. Always `duration` for this variant."), "seconds": _b.check(_S.Number.annotate(description="Duration of the input audio in seconds.", format="double"), _S.is_finite().annotate(expected="a finite number"))}).annotate(title="Duration Usage", description="Usage statistics for models billed by audio input duration.", identifier="TranscriptTextUsageDuration")
|
|
40
|
+
TranscriptionDiarizedSegment: _StructSchema[_T.TranscriptionDiarizedSegment, _t.Never, _t.Never] = _b.struct(_T.TranscriptionDiarizedSegment, {"type": _b.literal("transcript.text.segment").annotate(description="The type of the segment. Always `transcript.text.segment`.\n"), "id": _S.String.annotate(description="Unique identifier for the segment."), "start": _b.check(_S.Number.annotate(description="Start timestamp of the segment in seconds.", format="double"), _S.is_finite().annotate(expected="a finite number")), "end": _b.check(_S.Number.annotate(description="End timestamp of the segment in seconds.", format="double"), _S.is_finite().annotate(expected="a finite number")), "text": _S.String.annotate(description="Transcript text for this segment."), "speaker": _S.String.annotate(description="Speaker label for this segment. When known speakers are provided, the label matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially using capital letters (`A`, `B`, ...).\n")}).annotate(description="A segment of diarized transcript text with speaker metadata.", identifier="TranscriptionDiarizedSegment")
|
|
41
|
+
TranscriptionWord: _StructSchema[_T.TranscriptionWord, _t.Never, _t.Never] = _b.struct(_T.TranscriptionWord, {"word": _S.String.annotate(description="The text content of the word."), "start": _b.check(_S.Number.annotate(description="Start time of the word in seconds.", format="double"), _S.is_finite().annotate(expected="a finite number")), "end": _b.check(_S.Number.annotate(description="End time of the word in seconds.", format="double"), _S.is_finite().annotate(expected="a finite number"))}).annotate(identifier="TranscriptionWord")
|
|
42
|
+
TranscriptionSegment: _StructSchema[_T.TranscriptionSegment, _t.Never, _t.Never] = _b.struct(_T.TranscriptionSegment, {"id": _b.check(_S.Number.annotate(description="Unique identifier of the segment."), _S.is_int().annotate(expected="an integer")), "seek": _b.check(_S.Number.annotate(description="Seek offset of the segment."), _S.is_int().annotate(expected="an integer")), "start": _b.check(_S.Number.annotate(description="Start time of the segment in seconds.", format="double"), _S.is_finite().annotate(expected="a finite number")), "end": _b.check(_S.Number.annotate(description="End time of the segment in seconds.", format="double"), _S.is_finite().annotate(expected="a finite number")), "text": _S.String.annotate(description="Text content of the segment."), "tokens": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))).annotate(description="Array of token IDs for the text content."), "temperature": _b.check(_S.Number.annotate(description="Temperature parameter used for generating the segment.", format="float"), _S.is_finite().annotate(expected="a finite number")), "avg_logprob": _b.check(_S.Number.annotate(description="Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.", format="float"), _S.is_finite().annotate(expected="a finite number")), "compression_ratio": _b.check(_S.Number.annotate(description="Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.", format="float"), _S.is_finite().annotate(expected="a finite number")), "no_speech_prob": _b.check(_S.Number.annotate(description="Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.", format="float"), _S.is_finite().annotate(expected="a finite number"))}).annotate(identifier="TranscriptionSegment")
|
|
43
|
+
TranscriptTextSegmentEvent: _StructSchema[_T.TranscriptTextSegmentEvent, _t.Never, _t.Never] = _b.struct(_T.TranscriptTextSegmentEvent, {"type": _b.literal("transcript.text.segment").annotate(description="The type of the event. Always `transcript.text.segment`."), "id": _S.String.annotate(description="Unique identifier for the segment."), "start": _b.check(_S.Number.annotate(description="Start timestamp of the segment in seconds.", format="double"), _S.is_finite().annotate(expected="a finite number")), "end": _b.check(_S.Number.annotate(description="End timestamp of the segment in seconds.", format="double"), _S.is_finite().annotate(expected="a finite number")), "text": _S.String.annotate(description="Transcript text for this segment."), "speaker": _S.String.annotate(description="Speaker label for this segment.")}).annotate(description="Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`.\n", identifier="TranscriptTextSegmentEvent")
|
|
44
|
+
TranscriptTextDeltaEvent: _StructSchema[_T.TranscriptTextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.TranscriptTextDeltaEvent, {"type": _b.literal("transcript.text.delta").annotate(description="The type of the event. Always `transcript.text.delta`.\n"), "delta": _S.String.annotate(description="The text delta that was additionally transcribed.\n"), "logprobs": _b.array(_b.struct(_T.TranscriptTextDeltaEvent__logprobs__item, {"token": _S.String.annotate(description="The token that was used to generate the log probability.\n"), "logprob": _b.check(_S.Number.annotate(description="The log probability of the token.\n"), _S.is_finite().annotate(expected="a finite number")), "bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))).annotate(description="The bytes that were used to generate the log probability.\n")}, optional=("token", "logprob", "bytes",))).annotate(description="The log probabilities of the delta. Only included if you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.\n"), "segment_id": _S.String.annotate(description="Identifier of the diarized segment that this delta belongs to. Only present when using `gpt-4o-transcribe-diarize`.\n")}, optional=("logprobs", "segment_id",)).annotate(description="Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.", identifier="TranscriptTextDeltaEvent")
|
|
45
|
+
CreateTranslationResponseJson: _StructSchema[_T.CreateTranslationResponseJson, _t.Never, _t.Never] = _b.struct(_T.CreateTranslationResponseJson, {"text": _S.String}).annotate(identifier="CreateTranslationResponseJson")
|
|
46
|
+
VoiceConsentResource: _StructSchema[_T.VoiceConsentResource, _t.Never, _t.Never] = _b.struct(_T.VoiceConsentResource, {"object": _b.literal("audio.voice_consent").annotate(description="The object type, which is always `audio.voice_consent`."), "id": _S.String.annotate(description="The consent recording identifier."), "name": _S.String.annotate(description="The label provided when the consent recording was uploaded."), "language": _S.String.annotate(description="The BCP 47 language tag for the consent phrase (for example, `en-US`)."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the consent recording was created.", format="unixtime"), _S.is_int().annotate(expected="an integer"))}).annotate(title="Voice consent", description="A consent recording used to authorize creation of a custom voice.", identifier="VoiceConsentResource")
|
|
47
|
+
UpdateVoiceConsentRequest: _StructSchema[_T.UpdateVoiceConsentRequest, _t.Never, _t.Never] = _b.struct(_T.UpdateVoiceConsentRequest, {"name": _S.String.annotate(description="The updated label for this consent recording.")}).annotate(identifier="UpdateVoiceConsentRequest")
|
|
48
|
+
VoiceConsentDeletedResource: _StructSchema[_T.VoiceConsentDeletedResource, _t.Never, _t.Never] = _b.struct(_T.VoiceConsentDeletedResource, {"id": _S.String.annotate(description="The consent recording identifier."), "object": _b.literal("audio.voice_consent"), "deleted": _S.Boolean}).annotate(identifier="VoiceConsentDeletedResource")
|
|
49
|
+
VoiceResource: _StructSchema[_T.VoiceResource, _t.Never, _t.Never] = _b.struct(_T.VoiceResource, {"object": _b.literal("audio.voice").annotate(description="The object type, which is always `audio.voice`."), "id": _S.String.annotate(description="The voice identifier, which can be referenced in API endpoints."), "type": _b.literal("audio_sample").annotate(description="How the voice was created."), "name": _S.String.annotate(description="The name of the voice."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the voice was created.", format="unixtime"), _S.is_int().annotate(expected="an integer"))}).annotate(title="Voice", description="A custom voice that can be used for audio output.", identifier="VoiceResource")
|
|
50
|
+
BatchError: _StructSchema[_T.BatchError, _t.Never, _t.Never] = _b.struct(_T.BatchError, {"code": _S.String.annotate(description="An error code identifying the error type."), "message": _S.String.annotate(description="A human-readable message providing more details about the error."), "param": _b.union(_S.String.annotate(description="The name of the parameter that caused the error, if applicable."), _S.Null), "line": _b.union(_b.check(_S.Number.annotate(description="The line number of the input file where the error occurred, if applicable."), _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("code", "message", "param", "line",)).annotate(identifier="BatchError")
|
|
51
|
+
BatchRequestCounts: _StructSchema[_T.BatchRequestCounts, _t.Never, _t.Never] = _b.struct(_T.BatchRequestCounts, {"total": _b.check(_S.Number.annotate(description="Total number of requests in the batch."), _S.is_int().annotate(expected="an integer")), "completed": _b.check(_S.Number.annotate(description="Number of requests that have been completed successfully."), _S.is_int().annotate(expected="an integer")), "failed": _b.check(_S.Number.annotate(description="Number of requests that have failed."), _S.is_int().annotate(expected="an integer"))}).annotate(description="The request counts for different statuses within the batch.", identifier="BatchRequestCounts")
|
|
52
|
+
BatchFileExpirationAfter: _StructSchema[_T.BatchFileExpirationAfter, _t.Never, _t.Never] = _b.struct(_T.BatchFileExpirationAfter, {"anchor": _b.literal("created_at").annotate(description="Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`. Note that the anchor is the file creation time, not the time the batch is created."), "seconds": _b.check(_b.check(_b.check(_S.Number.annotate(description="The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).", format="int64"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(3600).annotate(expected="a value greater than or equal to 3600")), _S.is_less_than_or_equal_to(2592000).annotate(expected="a value less than or equal to 2592000"))}).annotate(title="File expiration policy", description="The expiration policy for the output and/or error file that are generated for a batch.", identifier="BatchFileExpirationAfter")
|
|
53
|
+
ChatCompletionMessageToolCall: _StructSchema[_T.ChatCompletionMessageToolCall, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionMessageToolCall, {"id": _S.String.annotate(description="The ID of the tool call."), "type": _b.literal("function").annotate(description="The type of the tool. Currently, only `function` is supported."), "function": _b.struct(_T.ChatCompletionMessageToolCall__function, {"name": _S.String.annotate(description="The name of the function to call."), "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.")}).annotate(description="The function that the model called.")}).annotate(title="Function tool call", description="A call to a function tool created by the model.\n", identifier="ChatCompletionMessageToolCall")
|
|
54
|
+
ChatCompletionMessageCustomToolCall: _StructSchema[_T.ChatCompletionMessageCustomToolCall, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionMessageCustomToolCall, {"id": _S.String.annotate(description="The ID of the tool call."), "type": _b.literal("custom").annotate(description="The type of the tool. Always `custom`."), "custom": _b.struct(_T.ChatCompletionMessageCustomToolCall__custom, {"name": _S.String.annotate(description="The name of the custom tool to call."), "input": _S.String.annotate(description="The input for the custom tool call generated by the model.")}).annotate(description="The custom tool that the model called.")}).annotate(title="Custom tool call", description="A call to a custom tool created by the model.\n", identifier="ChatCompletionMessageCustomToolCall")
|
|
55
|
+
ChatCompletionTokenLogprob: _StructSchema[_T.ChatCompletionTokenLogprob, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionTokenLogprob, {"token": _S.String.annotate(description="The token."), "logprob": _b.check(_S.Number.annotate(description="The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely."), _S.is_finite().annotate(expected="a finite number")), "bytes": _b.union(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))).annotate(description="A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token."), _S.Null), "top_logprobs": _b.array(_b.struct(_T.ChatCompletionTokenLogprob__top_logprobs__item, {"token": _S.String.annotate(description="The token."), "logprob": _b.check(_S.Number.annotate(description="The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely."), _S.is_finite().annotate(expected="a finite number")), "bytes": _b.union(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))).annotate(description="A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token."), _S.Null)})).annotate(description="List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.")}).annotate(identifier="ChatCompletionTokenLogprob")
|
|
56
|
+
ServiceTier: _S.Bottom[_T.ServiceTier, _t.Any] = _b.union(_b.literals(["auto", "default", "flex", "scale", "priority", "fast"]).annotate(description="Specifies the processing type used for serving the request.\n - 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'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - 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.\n - 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. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request.\n - When not set, the default behavior is 'auto'.\n\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.\n"), _S.Null).annotate(identifier="ServiceTier")
|
|
57
|
+
CompletionUsage: _StructSchema[_T.CompletionUsage, _t.Never, _t.Never] = _b.struct(_T.CompletionUsage, {"completion_tokens": _b.check(_S.Number.annotate(description="Number of tokens in the generated completion."), _S.is_int().annotate(expected="an integer")), "prompt_tokens": _b.check(_S.Number.annotate(description="Number of tokens in the prompt."), _S.is_int().annotate(expected="an integer")), "total_tokens": _b.check(_S.Number.annotate(description="Total number of tokens used in the request (prompt + completion)."), _S.is_int().annotate(expected="an integer")), "completion_tokens_details": _b.struct(_T.CompletionUsage__completion_tokens_details, {"accepted_prediction_tokens": _b.check(_S.Number.annotate(description="When using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.\n"), _S.is_int().annotate(expected="an integer")), "audio_tokens": _b.check(_S.Number.annotate(description="Audio input tokens generated by the model."), _S.is_int().annotate(expected="an integer")), "reasoning_tokens": _b.check(_S.Number.annotate(description="Tokens generated by the model for reasoning."), _S.is_int().annotate(expected="an integer")), "text_tokens": _b.check(_S.Number.annotate(description="Text output tokens generated by the model."), _S.is_int().annotate(expected="an integer")), "rejected_prediction_tokens": _b.check(_S.Number.annotate(description="When using Predicted Outputs, the number of tokens in the\nprediction that did not appear in the completion. However, like\nreasoning tokens, these tokens are still counted in the total\ncompletion tokens for purposes of billing, output, and context window\nlimits.\n"), _S.is_int().annotate(expected="an integer"))}, optional=("accepted_prediction_tokens", "audio_tokens", "reasoning_tokens", "text_tokens", "rejected_prediction_tokens",)).annotate(description="Breakdown of tokens used in a completion."), "prompt_tokens_details": _b.struct(_T.CompletionUsage__prompt_tokens_details, {"audio_tokens": _b.check(_S.Number.annotate(description="Audio input tokens present in the prompt."), _S.is_int().annotate(expected="an integer")), "cached_tokens": _b.check(_S.Number.annotate(description="Cached tokens present in the prompt."), _S.is_int().annotate(expected="an integer")), "text_tokens": _b.check(_S.Number.annotate(description="Text input tokens present in the prompt."), _S.is_int().annotate(expected="an integer")), "image_tokens": _b.check(_S.Number.annotate(description="Image input tokens present in the prompt."), _S.is_int().annotate(expected="an integer")), "cache_write_tokens": _b.check(_S.Number.annotate(description="The unadjusted number of prompt tokens written to cache."), _S.is_int().annotate(expected="an integer"))}, optional=("audio_tokens", "cached_tokens", "text_tokens", "image_tokens", "cache_write_tokens",)).annotate(description="Breakdown of tokens used in the prompt.")}, optional=("completion_tokens_details", "prompt_tokens_details",)).annotate(description="Usage statistics for the completion request.", identifier="CompletionUsage")
|
|
58
|
+
ModerationInputType: _S.Bottom[_T.ModerationInputType, _t.Any] = _b.literals(["text", "image"]).annotate(identifier="ModerationInputType")
|
|
59
|
+
ChatCompletionModerationError: _StructSchema[_T.ChatCompletionModerationError, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionModerationError, {"type": _b.literal("error").annotate(description="The object type, which is always `error`."), "code": _S.String.annotate(description="The error code."), "message": _S.String.annotate(description="The error message.")}).annotate(description="An error produced while attempting moderation.", identifier="ChatCompletionModerationError")
|
|
60
|
+
PromptCacheTTLEnum: _S.Bottom[_T.PromptCacheTTLEnum, _t.Any] = _b.literal("30m").annotate(identifier="PromptCacheTTLEnum")
|
|
61
|
+
PromptCacheModeEnum: _S.Bottom[_T.PromptCacheModeEnum, _t.Any] = _b.literals(["implicit", "explicit"]).annotate(identifier="PromptCacheModeEnum")
|
|
62
|
+
PromptCacheBreakpointParam: _StructSchema[_T.PromptCacheBreakpointParam, _t.Never, _t.Never] = _b.struct(_T.PromptCacheBreakpointParam, {"mode": _b.literal("explicit").annotate(description="The breakpoint mode. Always `explicit`.")}).annotate(title="Prompt cache breakpoint", description="Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.", identifier="PromptCacheBreakpointParam")
|
|
63
|
+
ChatCompletionRequestMessageContentPartRefusal: _StructSchema[_T.ChatCompletionRequestMessageContentPartRefusal, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestMessageContentPartRefusal, {"type": _b.literal("refusal").annotate(description="The type of the content part."), "refusal": _S.String.annotate(description="The refusal message generated by the model.")}).annotate(title="Refusal content part", identifier="ChatCompletionRequestMessageContentPartRefusal")
|
|
64
|
+
ChatCompletionRequestFunctionMessage: _StructSchema[_T.ChatCompletionRequestFunctionMessage, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestFunctionMessage, {"role": _b.literal("function").annotate(description="The role of the messages author, in this case `function`."), "content": _b.union(_S.String.annotate(description="The contents of the function message."), _S.Null), "name": _S.String.annotate(description="The name of the function to call.")}).annotate(title="Function message", identifier="ChatCompletionRequestFunctionMessage")
|
|
65
|
+
ModelIdsShared: _S.Bottom[_T.ModelIdsShared, _t.Any] = _b.union(_S.String, _b.literals(["gpt-6-astra", "gpt-6.1-sol", "gpt-6-sol", "gpt-6-luna", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.5-2026-04-23", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.4-mini-2026-03-17", "gpt-5.4-nano-2026-03-17", "gpt-5.3-chat-latest", "gpt-5.2", "gpt-5.2-2025-12-11", "gpt-5.2-chat-latest", "gpt-5.2-pro", "gpt-5.2-pro-2025-12-11", "gpt-5.1", "gpt-5.1-2025-11-13", "gpt-5.1-codex", "gpt-5.1-mini", "gpt-5.1-chat-latest", "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-5-chat-latest", "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", "o4-mini", "o4-mini-2025-04-16", "o3", "o3-2025-04-16", "o3-mini", "o3-mini-2025-01-31", "o1", "o1-2024-12-17", "o1-preview", "o1-preview-2024-09-12", "o1-mini", "o1-mini-2024-09-12", "gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-audio-mini", "gpt-audio-mini-2025-12-15", "gpt-4o-audio-preview", "gpt-4o-audio-preview-2024-10-01", "gpt-4o-audio-preview-2024-12-17", "gpt-4o-audio-preview-2025-06-03", "gpt-4o-mini-audio-preview", "gpt-4o-mini-audio-preview-2024-12-17", "gpt-4o-search-preview", "gpt-4o-mini-search-preview", "gpt-4o-search-preview-2025-03-11", "gpt-4o-mini-search-preview-2025-03-11", "chatgpt-4o-latest", "codex-mini-latest", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "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-0301", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613"])).annotate(identifier="ModelIdsShared")
|
|
66
|
+
ResponseModalities: _S.Bottom[_T.ResponseModalities, _t.Any] = _b.union(_b.array(_b.literals(["text", "audio"])).annotate(description="Output types that you would like the model to generate.\nMost models are capable of generating text, which is the default:\n\n`[\"text\"]`\n\nThe `gpt-4o-audio-preview` model can also be used to\n[generate audio](https://developers.openai.com/api/docs/guides/audio). To request that this model generate\nboth text and audio responses, you can use:\n\n`[\"text\", \"audio\"]`\n"), _S.Null).annotate(identifier="ResponseModalities")
|
|
67
|
+
Verbosity: _S.Bottom[_T.Verbosity, _t.Any] = _b.union(_b.literals(["low", "medium", "high"]).annotate(description="Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`. The default is\n`medium`.\n"), _S.Null).annotate(identifier="Verbosity")
|
|
68
|
+
WebSearchLocation: _StructSchema[_T.WebSearchLocation, _t.Never, _t.Never] = _b.struct(_T.WebSearchLocation, {"country": _S.String.annotate(description="The two-letter \n[ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\ne.g. `US`.\n"), "region": _S.String.annotate(description="Free text input for the region of the user, e.g. `California`.\n"), "city": _S.String.annotate(description="Free text input for the city of the user, e.g. `San Francisco`.\n"), "timezone": _S.String.annotate(description="The [IANA timezone](https://timeapi.io/documentation/iana-timezones) \nof the user, e.g. `America/Los_Angeles`.\n")}, optional=("country", "region", "city", "timezone",)).annotate(title="Web search location", description="Approximate location parameters for the search.", identifier="WebSearchLocation")
|
|
69
|
+
WebSearchContextSize: _S.Bottom[_T.WebSearchContextSize, _t.Any] = _b.literals(["low", "medium", "high"]).annotate(description="High level guidance for the amount of context window space to use for the \nsearch. One of `low`, `medium`, or `high`. `medium` is the default.\n", identifier="WebSearchContextSize")
|
|
70
|
+
ModerationMode: _S.Bottom[_T.ModerationMode, _t.Any] = _b.literals(["score", "block"]).annotate(identifier="ModerationMode")
|
|
71
|
+
StopConfiguration: _S.Bottom[_T.StopConfiguration, _t.Any] = _b.union(_S.String, _b.check(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(4).annotate(expected="a value with a length of at most 4")), _S.Null, mode="one_of").annotate(description="Not supported with latest reasoning models `o3` and `o4-mini`.\n\nUp to 4 sequences where the API will stop generating further tokens. The\nreturned text will not contain the stop sequence.\n", identifier="StopConfiguration")
|
|
72
|
+
ChatCompletionStreamOptions: _S.Bottom[_T.ChatCompletionStreamOptions, _t.Any] = _b.union(_b.struct(_T.ChatCompletionStreamOptions__0, {"include_usage": _S.Boolean.annotate(description="If set, an additional chunk will be streamed before the `data: [DONE]`\nmessage. The `usage` field on this chunk shows the token usage statistics\nfor the entire request, and the `choices` field will always be an empty\narray.\n\nAll other chunks will also include a `usage` field, but with a null\nvalue. **NOTE:** If the stream is interrupted, you may not receive the\nfinal usage chunk which contains the total token usage for the request.\n"), "include_obfuscation": _S.Boolean.annotate(description="When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events to\nnormalize payload sizes as a mitigation to certain side-channel attacks.\nThese obfuscation fields are included by default, but add a small amount\nof overhead to the data stream. You can set `include_obfuscation` to\nfalse to optimize for bandwidth if you trust the network links between\nyour application and the OpenAI API.\n")}, optional=("include_usage", "include_obfuscation",)).annotate(description="Options for streaming response. Only set this when you set `stream: true`.\n"), _S.Null).annotate(identifier="ChatCompletionStreamOptions")
|
|
73
|
+
CustomToolChatCompletions: _StructSchema[_T.CustomToolChatCompletions, _t.Never, _t.Never] = _b.struct(_T.CustomToolChatCompletions, {"type": _b.literal("custom").annotate(description="The type of the custom tool. Always `custom`."), "custom": _b.struct(_T.CustomToolChatCompletions__custom, {"name": _S.String.annotate(description="The name of the custom tool, used to identify it in tool calls."), "description": _S.String.annotate(description="Optional description of the custom tool, used to provide more context.\n"), "format": _b.union(_b.struct(_T.CustomToolChatCompletions__custom__format__0, {"type": _b.literal("text").annotate(description="Unconstrained text format. Always `text`.")}).annotate(title="Text format", description="Unconstrained free-form text."), _b.struct(_T.CustomToolChatCompletions__custom__format__1, {"type": _b.literal("grammar").annotate(description="Grammar format. Always `grammar`."), "grammar": _b.struct(_T.CustomToolChatCompletions__custom__format__1__grammar, {"definition": _S.String.annotate(description="The grammar definition."), "syntax": _b.literals(["lark", "regex"]).annotate(description="The syntax of the grammar definition. One of `lark` or `regex`.")}).annotate(title="Grammar format", description="Your chosen grammar.")}).annotate(title="Grammar format", description="A grammar defined by the user."), mode="one_of").annotate(description="The input format for the custom tool. Default is unconstrained text.\n")}, optional=("description", "format",)).annotate(title="Custom tool properties", description="Properties of the custom tool.\n")}).annotate(title="Custom tool", description="A custom tool that processes input using a specified format.\n", identifier="CustomToolChatCompletions")
|
|
74
|
+
ChatCompletionAllowedTools: _StructSchema[_T.ChatCompletionAllowedTools, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionAllowedTools, {"mode": _b.literals(["auto", "required"]).annotate(description="Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"), "tools": _b.array(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A tool definition that the model should be allowed to call.\n")).annotate(description="A list of tool definitions that the model should be allowed to call.\n\nFor the Chat Completions API, the list of tool definitions might look like:\n```json\n[\n { \"type\": \"function\", \"function\": { \"name\": \"get_weather\" } },\n { \"type\": \"function\", \"function\": { \"name\": \"get_time\" } }\n]\n```\n")}).annotate(title="Allowed tools", description="Constrains the tools available to the model to a pre-defined set.\n", identifier="ChatCompletionAllowedTools")
|
|
75
|
+
ChatCompletionNamedToolChoice: _StructSchema[_T.ChatCompletionNamedToolChoice, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionNamedToolChoice, {"type": _b.literal("function").annotate(description="For function calling, the type is always `function`."), "function": _b.struct(_T.ChatCompletionNamedToolChoice__function, {"name": _S.String.annotate(description="The name of the function to call.")})}).annotate(title="Function tool choice", description="Specifies a tool the model should use. Use to force the model to call a specific function.", identifier="ChatCompletionNamedToolChoice")
|
|
76
|
+
ChatCompletionNamedToolChoiceCustom: _StructSchema[_T.ChatCompletionNamedToolChoiceCustom, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionNamedToolChoiceCustom, {"type": _b.literal("custom").annotate(description="For custom tool calling, the type is always `custom`."), "custom": _b.struct(_T.ChatCompletionNamedToolChoiceCustom__custom, {"name": _S.String.annotate(description="The name of the custom tool to call.")})}).annotate(title="Custom tool choice", description="Specifies a tool the model should use. Use to force the model to call a specific custom tool.", identifier="ChatCompletionNamedToolChoiceCustom")
|
|
77
|
+
ParallelToolCalls: _S.Bottom[_T.ParallelToolCalls, _t.Any] = _S.Boolean.annotate(description="Whether to enable [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use.", identifier="ParallelToolCalls")
|
|
78
|
+
ChatCompletionFunctionCallOption: _StructSchema[_T.ChatCompletionFunctionCallOption, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionFunctionCallOption, {"name": _S.String.annotate(description="The name of the function to call.")}).annotate(description="Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n", identifier="ChatCompletionFunctionCallOption")
|
|
79
|
+
ChatCompletionMessageToolCallChunk: _StructSchema[_T.ChatCompletionMessageToolCallChunk, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionMessageToolCallChunk, {"index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "id": _S.String.annotate(description="The ID of the tool call."), "type": _b.literal("function").annotate(description="The type of the tool. Currently, only `function` is supported."), "function": _b.struct(_T.ChatCompletionMessageToolCallChunk__function, {"name": _S.String.annotate(description="The name of the function to call."), "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.")}, optional=("name", "arguments",))}, optional=("id", "type", "function",)).annotate(identifier="ChatCompletionMessageToolCallChunk")
|
|
80
|
+
ChatCompletionDeleted: _StructSchema[_T.ChatCompletionDeleted, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionDeleted, {"object": _b.literal("chat.completion.deleted").annotate(description="The type of object being deleted."), "id": _S.String.annotate(description="The ID of the chat completion that was deleted."), "deleted": _S.Boolean.annotate(description="Whether the chat completion was deleted.")}).annotate(identifier="ChatCompletionDeleted")
|
|
81
|
+
ChatCompletionMessageList: _StructSchema[_T.ChatCompletionMessageList, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionMessageList, {"object": _b.literal("list").annotate(description="The type of this object. It is always set to \"list\".\n"), "data": _b.array(_b.struct(_T.ChatCompletionMessageList__data__item, {"id": _S.String, "role": _b.literals(["user", "assistant", "tool", "system", "function", "developer"]), "content": _b.union(_S.String, _S.Null), "content_parts": _b.union(_b.array(_b.struct(_T.ChatCompletionMessageList__data__item__content_parts__0__item, {"type": _b.literals(["text", "image_url", "input_audio", "file"]), "text": _b.union(_S.String, _S.Null), "image_url": _b.union(_b.struct(_T.ChatCompletionMessageList__data__item__content_parts__0__item__image_url__0, {"url": _S.String, "detail": _b.union(_S.String, _S.Null)}, optional=("detail",)), _S.Null), "input_audio": _b.union(_b.struct(_T.ChatCompletionMessageList__data__item__content_parts__0__item__input_audio__0, {"data": _S.String, "format": _S.String}), _S.Null), "file": _b.union(_b.struct(_T.ChatCompletionMessageList__data__item__content_parts__0__item__file__0, {"file_data": _b.union(_S.String, _S.Null), "filename": _b.union(_S.String, _S.Null), "file_id": _b.union(_S.String, _S.Null)}, optional=("file_data", "filename", "file_id",)), _S.Null)}, optional=("text", "image_url", "input_audio", "file",))), _S.Null), "name": _b.union(_S.String, _S.Null)}, optional=("name",))).annotate(description="An array of chat completion message objects.\n"), "first_id": _b.union(_S.String, _S.Null).annotate(description="The identifier of the first chat message in the data array."), "last_id": _b.union(_S.String, _S.Null).annotate(description="The identifier of the last chat message in the data array."), "has_more": _S.Boolean.annotate(description="Indicates whether there are more chat messages available.")}).annotate(title="ChatCompletionMessageList", description="An object representing a list of chat completion messages.\n", identifier="ChatCompletionMessageList")
|
|
82
|
+
ContainerResource: _StructSchema[_T.ContainerResource, _t.Never, _t.Never] = _b.struct(_T.ContainerResource, {"id": _S.String.annotate(description="Unique identifier for the container."), "object": _S.String.annotate(description="The type of this object."), "name": _S.String.annotate(description="Name of the container."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the container was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "status": _S.String.annotate(description="Status of the container (e.g., active, deleted)."), "last_active_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the container was last active.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "expires_after": _b.struct(_T.ContainerResource__expires_after, {"anchor": _b.literal("last_active_at").annotate(description="The reference point for the expiration."), "minutes": _b.check(_S.Number.annotate(description="The number of minutes after the anchor before the container expires."), _S.is_int().annotate(expected="an integer"))}, optional=("anchor", "minutes",)).annotate(description="The container will expire after this time period.\nThe anchor is the reference point for the expiration.\nThe minutes is the number of minutes after the anchor before the container expires.\n"), "memory_limit": _b.literals(["1g", "4g", "16g", "64g"]).annotate(description="The memory limit configured for the container."), "network_policy": _b.struct(_T.ContainerResource__network_policy, {"type": _b.literals(["allowlist", "disabled"]).annotate(description="The network policy mode."), "allowed_domains": _b.array(_S.String).annotate(description="Allowed outbound domains when `type` is `allowlist`.")}, optional=("allowed_domains",)).annotate(description="Network access policy for the container.")}, optional=("last_active_at", "expires_after", "memory_limit", "network_policy",)).annotate(title="The container object", identifier="ContainerResource")
|
|
83
|
+
SkillReferenceParam: _StructSchema[_T.SkillReferenceParam, _t.Never, _t.Never] = _b.struct(_T.SkillReferenceParam, {"type": _b.literal("skill_reference").annotate(description="References a skill created with the /v1/skills endpoint."), "skill_id": _b.check(_b.check(_S.String.annotate(description="The ID of the referenced skill."), _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")), "version": _S.String.annotate(description="Optional skill version. Use a positive integer or 'latest'. Omit for default.")}, optional=("version",)).annotate(identifier="SkillReferenceParam")
|
|
84
|
+
InlineSkillSourceParam: _StructSchema[_T.InlineSkillSourceParam, _t.Never, _t.Never] = _b.struct(_T.InlineSkillSourceParam, {"type": _b.literal("base64").annotate(description="The type of the inline skill source. Must be `base64`."), "media_type": _b.literal("application/zip").annotate(description="The media type of the inline skill payload. Must be `application/zip`."), "data": _b.check(_b.check(_S.String.annotate(description="Base64-encoded skill zip bundle."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(70254592).annotate(expected="a string with at most 70254592 code points"))}).annotate(description="Inline skill payload", identifier="InlineSkillSourceParam")
|
|
85
|
+
ContainerNetworkPolicyDisabledParam: _StructSchema[_T.ContainerNetworkPolicyDisabledParam, _t.Never, _t.Never] = _b.struct(_T.ContainerNetworkPolicyDisabledParam, {"type": _b.literal("disabled").annotate(description="Disable outbound network access. Always `disabled`.")}).annotate(identifier="ContainerNetworkPolicyDisabledParam")
|
|
86
|
+
ContainerNetworkPolicyDomainSecretParam: _StructSchema[_T.ContainerNetworkPolicyDomainSecretParam, _t.Never, _t.Never] = _b.struct(_T.ContainerNetworkPolicyDomainSecretParam, {"domain": _b.check(_S.String.annotate(description="The domain associated with the secret."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "name": _b.check(_S.String.annotate(description="The name of the secret to inject for the domain."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "value": _b.check(_b.check(_S.String.annotate(description="The secret value to inject for the domain."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points"))}).annotate(identifier="ContainerNetworkPolicyDomainSecretParam")
|
|
87
|
+
ContainerFileResource: _StructSchema[_T.ContainerFileResource, _t.Never, _t.Never] = _b.struct(_T.ContainerFileResource, {"id": _S.String.annotate(description="Unique identifier for the file."), "object": _S.String.annotate(description="The type of this object (`container.file`)."), "container_id": _S.String.annotate(description="The container this file belongs to."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the file was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "bytes": _b.check(_S.Number.annotate(description="Size of the file in bytes."), _S.is_int().annotate(expected="an integer")), "path": _S.String.annotate(description="Path of the file in the container."), "source": _S.String.annotate(description="Source of the file (e.g., `user`, `assistant`).")}).annotate(title="The container file object", identifier="ContainerFileResource")
|
|
88
|
+
CreateContainerFileBody: _StructSchema[_T.CreateContainerFileBody, _t.Never, _t.Never] = _b.struct(_T.CreateContainerFileBody, {"file_id": _S.String.annotate(description="Name of the file to create."), "file": _S.String.annotate(description="The File object (not file name) to be uploaded.\n", format="binary")}, optional=("file_id", "file",)).annotate(identifier="CreateContainerFileBody")
|
|
89
|
+
IncludeEnum: _S.Bottom[_T.IncludeEnum, _t.Any] = _b.literals(["file_search_call.results", "web_search_call.results", "web_search_call.action.sources", "message.input_image.image_url", "computer_call_output.output.image_url", "code_interpreter_call.outputs", "reasoning.encrypted_content", "message.output_text.logprobs"]).annotate(description="Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.results`: Include the search results of the web search tool call.\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).", identifier="IncludeEnum")
|
|
90
|
+
MessageStatus: _S.Bottom[_T.MessageStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="MessageStatus")
|
|
91
|
+
MessageRole: _S.Bottom[_T.MessageRole, _t.Any] = _b.literals(["unknown", "user", "assistant", "system", "critic", "discriminator", "developer", "tool"]).annotate(identifier="MessageRole")
|
|
92
|
+
PromptCacheBreakpointConfig: _StructSchema[_T.PromptCacheBreakpointConfig, _t.Never, _t.Never] = _b.struct(_T.PromptCacheBreakpointConfig, {"mode": _b.literal("explicit").annotate(description="The breakpoint mode. Always `explicit`.")}).annotate(title="Prompt cache breakpoint", description="Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.", identifier="PromptCacheBreakpointConfig")
|
|
93
|
+
FileCitationBody: _StructSchema[_T.FileCitationBody, _t.Never, _t.Never] = _b.struct(_T.FileCitationBody, {"type": _b.literal("file_citation").annotate(description="The type of the file citation. Always `file_citation`."), "file_id": _S.String.annotate(description="The ID of the file."), "index": _b.check(_S.Number.annotate(description="The index in the output text at which to insert the file citation."), _S.is_int().annotate(expected="an integer")), "filename": _S.String.annotate(description="The filename of the file cited.")}).annotate(title="File citation", description="A citation to a file.", identifier="FileCitationBody")
|
|
94
|
+
UrlCitationBody: _StructSchema[_T.UrlCitationBody, _t.Never, _t.Never] = _b.struct(_T.UrlCitationBody, {"type": _b.literal("url_citation").annotate(description="The type of the URL citation. Always `url_citation`."), "url": _S.String.annotate(description="The URL of the web resource.", format="uri"), "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")), "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")), "title": _S.String.annotate(description="The title of the web resource.")}).annotate(title="URL citation", description="A citation for a web resource used to generate a model response.", identifier="UrlCitationBody")
|
|
95
|
+
ContainerFileCitationBody: _StructSchema[_T.ContainerFileCitationBody, _t.Never, _t.Never] = _b.struct(_T.ContainerFileCitationBody, {"type": _b.literal("container_file_citation").annotate(description="The type of the container file citation. Always `container_file_citation`."), "container_id": _S.String.annotate(description="The ID of the container file."), "file_id": _S.String.annotate(description="The ID of the file."), "start_index": _b.check(_S.Number.annotate(description="The index of the first character of the container file citation in the message."), _S.is_int().annotate(expected="an integer")), "end_index": _b.check(_S.Number.annotate(description="The index of the last character of the container file citation in the message."), _S.is_int().annotate(expected="an integer")), "filename": _S.String.annotate(description="The filename of the container file cited.")}).annotate(title="Container file citation", description="A citation for a container file used to generate a model response.", identifier="ContainerFileCitationBody")
|
|
96
|
+
FilePath: _StructSchema[_T.FilePath, _t.Never, _t.Never] = _b.struct(_T.FilePath, {"type": _b.literal("file_path").annotate(description="The type of the file path. Always `file_path`.\n"), "file_id": _S.String.annotate(description="The ID of the file.\n"), "index": _b.check(_S.Number.annotate(description="The index of the file in the list of files.\n"), _S.is_int().annotate(expected="an integer"))}).annotate(title="File path", description="A path to a file.\n", identifier="FilePath")
|
|
97
|
+
TopLogProb: _StructSchema[_T.TopLogProb, _t.Never, _t.Never] = _b.struct(_T.TopLogProb, {"token": _S.String, "logprob": _S.Finite, "bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")))}).annotate(title="Top log probability", description="The top log probability of a token.", identifier="TopLogProb")
|
|
98
|
+
TextContent: _StructSchema[_T.TextContent, _t.Never, _t.Never] = _b.struct(_T.TextContent, {"type": _b.literal("text"), "text": _S.String}).annotate(title="Text Content", description="A text content.", identifier="TextContent")
|
|
99
|
+
SummaryTextContent: _StructSchema[_T.SummaryTextContent, _t.Never, _t.Never] = _b.struct(_T.SummaryTextContent, {"type": _b.literal("summary_text").annotate(description="The type of the object. Always `summary_text`."), "text": _S.String.annotate(description="A summary of the reasoning output from the model so far.")}).annotate(title="Summary text", description="A summary text from the model.", identifier="SummaryTextContent")
|
|
100
|
+
ReasoningTextContent: _StructSchema[_T.ReasoningTextContent, _t.Never, _t.Never] = _b.struct(_T.ReasoningTextContent, {"type": _b.literal("reasoning_text").annotate(description="The type of the reasoning text. Always `reasoning_text`."), "text": _S.String.annotate(description="The reasoning text from the model.")}).annotate(title="Reasoning text", description="Reasoning text from the model.", identifier="ReasoningTextContent")
|
|
101
|
+
RefusalContent: _StructSchema[_T.RefusalContent, _t.Never, _t.Never] = _b.struct(_T.RefusalContent, {"type": _b.literal("refusal").annotate(description="The type of the refusal. Always `refusal`."), "refusal": _S.String.annotate(description="The refusal explanation from the model.")}).annotate(title="Refusal", description="A refusal from the model.", identifier="RefusalContent")
|
|
102
|
+
ImageDetail: _S.Bottom[_T.ImageDetail, _t.Any] = _b.literals(["low", "high", "auto", "original"]).annotate(identifier="ImageDetail")
|
|
103
|
+
FileInputDetail: _S.Bottom[_T.FileInputDetail, _t.Any] = _b.literals(["auto", "low", "high"]).annotate(identifier="FileInputDetail")
|
|
104
|
+
MessagePhase_2: _S.Bottom[_T.MessagePhase_2, _t.Any] = _b.literals(["commentary", "final_answer"]).annotate(identifier="MessagePhase-2")
|
|
105
|
+
DirectToolCallCaller: _StructSchema[_T.DirectToolCallCaller, _t.Never, _t.Never] = _b.struct(_T.DirectToolCallCaller, {"type": _b.literal("direct")}).annotate(identifier="DirectToolCallCaller")
|
|
106
|
+
ProgramToolCallCaller: _StructSchema[_T.ProgramToolCallCaller, _t.Never, _t.Never] = _b.struct(_T.ProgramToolCallCaller, {"type": _b.literal("program"), "caller_id": _S.String.annotate(description="The call ID of the program item that produced this tool call.")}).annotate(identifier="ProgramToolCallCaller")
|
|
107
|
+
DirectToolCallCallerParam: _StructSchema[_T.DirectToolCallCallerParam, _t.Never, _t.Never] = _b.struct(_T.DirectToolCallCallerParam, {"type": _b.literal("direct").annotate(description="The caller type. Always `direct`.")}).annotate(identifier="DirectToolCallCallerParam")
|
|
108
|
+
ProgramToolCallCallerParam: _StructSchema[_T.ProgramToolCallCallerParam, _t.Never, _t.Never] = _b.struct(_T.ProgramToolCallCallerParam, {"type": _b.literal("program").annotate(description="The caller type. Always `program`."), "caller_id": _b.check(_b.check(_S.String.annotate(description="The call ID of the program item that produced this tool 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"))}).annotate(identifier="ProgramToolCallCallerParam")
|
|
109
|
+
VectorStoreFileAttributes: _S.Bottom[_T.VectorStoreFileAttributes, _t.Any] = _b.union(_b.check(_b.check(_b.record(_S.String, _b.union(_b.check(_S.String, _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points")), _S.Finite, _S.Boolean, mode="one_of")).annotate(description="Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n"), _S.is_max_properties(16).annotate(expected="a value with at most 16 entries")), _S.is_property_names(_b.check(_S.String, _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(identifier="VectorStoreFileAttributes")
|
|
110
|
+
WebSearchCallStatus: _S.Bottom[_T.WebSearchCallStatus, _t.Any] = _b.literals(["in_progress", "searching", "completed", "failed", "incomplete"]).annotate(identifier="WebSearchCallStatus")
|
|
111
|
+
WebSearchActionSearch: _StructSchema[_T.WebSearchActionSearch, _t.Never, _t.Never] = _b.struct(_T.WebSearchActionSearch, {"type": _b.literal("search").annotate(description="The action type.\n"), "query": _S.String.annotate(description="The search query.\n"), "queries": _b.array(_S.String.annotate(description="A search query.\n")).annotate(title="Search queries", description="The search queries.\n"), "sources": _b.array(_b.union(_b.struct(_T.WebSearchActionSearch__sources__item__0, {"type": _b.literal("url").annotate(description="The type of source. Always `url`.\n"), "url": _S.String.annotate(description="The URL of the source.\n", format="uri")}).annotate(title="Web search source", description="A source used in the search.\n"), _b.struct(_T.WebSearchActionSearch__sources__item__1, {"type": _b.literal("api").annotate(description="The type of source. Always `api`.\n"), "name": _S.String.annotate(description="The name of the API source, such as `oai-weather`, `oai-sports`, or `oai-finance`.\n")}).annotate(title="Web search API source", description="An API source used in the search.\n"))).annotate(title="Web search sources", description="The sources used in the search.\n")}, optional=("query", "queries", "sources",)).annotate(title="Search action", description="Action type \"search\" - Performs a web search query.\n", identifier="WebSearchActionSearch")
|
|
112
|
+
WebSearchActionOpenPage: _StructSchema[_T.WebSearchActionOpenPage, _t.Never, _t.Never] = _b.struct(_T.WebSearchActionOpenPage, {"type": _b.literal("open_page").annotate(description="The action type.\n"), "url": _b.union(_S.String.annotate(format="uri"), _S.Null).annotate(description="The URL opened by the model.\n")}, optional=("url",)).annotate(title="Open page action", description="Action type \"open_page\" - Opens a specific URL from search results.\n", identifier="WebSearchActionOpenPage")
|
|
113
|
+
WebSearchActionFind: _StructSchema[_T.WebSearchActionFind, _t.Never, _t.Never] = _b.struct(_T.WebSearchActionFind, {"type": _b.literal("find_in_page").annotate(description="The action type.\n"), "url": _S.String.annotate(description="The URL of the page searched for the pattern.\n", format="uri"), "pattern": _S.String.annotate(description="The pattern or text to search for within the page.\n")}, optional=("url", "pattern",)).annotate(title="Find action", description="Action type \"find_in_page\": Searches for a pattern within a loaded page.\n", identifier="WebSearchActionFind")
|
|
114
|
+
ImageGenActionEnum: _S.Bottom[_T.ImageGenActionEnum, _t.Any] = _b.literals(["generate", "edit", "auto"]).annotate(identifier="ImageGenActionEnum")
|
|
115
|
+
ImageBackground: _S.Bottom[_T.ImageBackground, _t.Any] = _b.literals(["transparent", "opaque", "auto"]).annotate(identifier="ImageBackground")
|
|
116
|
+
ImageOutputFormat: _S.Bottom[_T.ImageOutputFormat, _t.Any] = _b.literals(["png", "webp", "jpeg"]).annotate(identifier="ImageOutputFormat")
|
|
117
|
+
ClickButtonType: _S.Bottom[_T.ClickButtonType, _t.Any] = _b.literals(["left", "right", "wheel", "back", "forward"]).annotate(identifier="ClickButtonType")
|
|
118
|
+
DoubleClickAction: _StructSchema[_T.DoubleClickAction, _t.Never, _t.Never] = _b.struct(_T.DoubleClickAction, {"type": _b.literal("double_click").annotate(description="Specifies the event type. For a double click action, this property is always set to `double_click`."), "x": _b.check(_S.Number.annotate(description="The x-coordinate where the double click occurred."), _S.is_int().annotate(expected="an integer")), "y": _b.check(_S.Number.annotate(description="The y-coordinate where the double click occurred."), _S.is_int().annotate(expected="an integer")), "keys": _b.union(_b.array(_S.String).annotate(description="The keys being held while double-clicking."), _S.Null)}).annotate(title="DoubleClick", description="A double click action.", identifier="DoubleClickAction")
|
|
119
|
+
CoordParam: _StructSchema[_T.CoordParam, _t.Never, _t.Never] = _b.struct(_T.CoordParam, {"x": _b.check(_S.Number.annotate(description="The x-coordinate."), _S.is_int().annotate(expected="an integer")), "y": _b.check(_S.Number.annotate(description="The y-coordinate."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Coordinate", description="An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.", identifier="CoordParam")
|
|
120
|
+
KeyPressAction: _StructSchema[_T.KeyPressAction, _t.Never, _t.Never] = _b.struct(_T.KeyPressAction, {"type": _b.literal("keypress").annotate(description="Specifies the event type. For a keypress action, this property is always set to `keypress`."), "keys": _b.array(_S.String.annotate(description="One of the keys the model is requesting to be pressed.")).annotate(description="The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.")}).annotate(title="KeyPress", description="A collection of keypresses the model would like to perform.", identifier="KeyPressAction")
|
|
121
|
+
MoveParam: _StructSchema[_T.MoveParam, _t.Never, _t.Never] = _b.struct(_T.MoveParam, {"type": _b.literal("move").annotate(description="Specifies the event type. For a move action, this property is always set to `move`."), "x": _b.check(_S.Number.annotate(description="The x-coordinate to move to."), _S.is_int().annotate(expected="an integer")), "y": _b.check(_S.Number.annotate(description="The y-coordinate to move to."), _S.is_int().annotate(expected="an integer")), "keys": _b.union(_b.array(_S.String).annotate(description="The keys being held while moving the mouse."), _S.Null)}, optional=("keys",)).annotate(title="Move", description="A mouse move action.", identifier="MoveParam")
|
|
122
|
+
ScreenshotParam: _StructSchema[_T.ScreenshotParam, _t.Never, _t.Never] = _b.struct(_T.ScreenshotParam, {"type": _b.literal("screenshot").annotate(description="Specifies the event type. For a screenshot action, this property is always set to `screenshot`.")}).annotate(title="Screenshot", description="A screenshot action.", identifier="ScreenshotParam")
|
|
123
|
+
ScrollParam: _StructSchema[_T.ScrollParam, _t.Never, _t.Never] = _b.struct(_T.ScrollParam, {"type": _b.literal("scroll").annotate(description="Specifies the event type. For a scroll action, this property is always set to `scroll`."), "x": _b.check(_S.Number.annotate(description="The x-coordinate where the scroll occurred."), _S.is_int().annotate(expected="an integer")), "y": _b.check(_S.Number.annotate(description="The y-coordinate where the scroll occurred."), _S.is_int().annotate(expected="an integer")), "scroll_x": _b.check(_S.Number.annotate(description="The horizontal scroll distance."), _S.is_int().annotate(expected="an integer")), "scroll_y": _b.check(_S.Number.annotate(description="The vertical scroll distance."), _S.is_int().annotate(expected="an integer")), "keys": _b.union(_b.array(_S.String).annotate(description="The keys being held while scrolling."), _S.Null)}, optional=("keys",)).annotate(title="Scroll", description="A scroll action.", identifier="ScrollParam")
|
|
124
|
+
TypeParam: _StructSchema[_T.TypeParam, _t.Never, _t.Never] = _b.struct(_T.TypeParam, {"type": _b.literal("type").annotate(description="Specifies the event type. For a type action, this property is always set to `type`."), "text": _S.String.annotate(description="The text to type.")}).annotate(title="Type", description="An action to type in text.", identifier="TypeParam")
|
|
125
|
+
WaitParam: _StructSchema[_T.WaitParam, _t.Never, _t.Never] = _b.struct(_T.WaitParam, {"type": _b.literal("wait").annotate(description="Specifies the event type. For a wait action, this property is always set to `wait`.")}).annotate(title="Wait", description="A wait action.", identifier="WaitParam")
|
|
126
|
+
ComputerCallSafetyCheckParam: _StructSchema[_T.ComputerCallSafetyCheckParam, _t.Never, _t.Never] = _b.struct(_T.ComputerCallSafetyCheckParam, {"id": _S.String.annotate(description="The ID of the pending safety check."), "code": _b.union(_S.String.annotate(description="The type of the pending safety check."), _S.Null), "message": _b.union(_S.String.annotate(description="Details about the pending safety check."), _S.Null)}, optional=("code", "message",)).annotate(description="A pending safety check for the computer call.", identifier="ComputerCallSafetyCheckParam")
|
|
127
|
+
ComputerScreenshotImage: _StructSchema[_T.ComputerScreenshotImage, _t.Never, _t.Never] = _b.struct(_T.ComputerScreenshotImage, {"type": _b.literal("computer_screenshot").annotate(description="Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"), "image_url": _S.String.annotate(description="The URL of the screenshot image.", format="uri"), "file_id": _S.String.annotate(description="The identifier of an uploaded file that contains the screenshot.")}, optional=("image_url", "file_id",)).annotate(description="A computer screenshot image used with the computer use tool.\n", identifier="ComputerScreenshotImage")
|
|
128
|
+
ToolSearchExecutionType: _S.Bottom[_T.ToolSearchExecutionType, _t.Any] = _b.literals(["server", "client"]).annotate(identifier="ToolSearchExecutionType")
|
|
129
|
+
FunctionCallStatus: _S.Bottom[_T.FunctionCallStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="FunctionCallStatus")
|
|
130
|
+
CallableToolAllowedCaller: _S.Bottom[_T.CallableToolAllowedCaller, _t.Any] = _b.literals(["direct", "programmatic"]).annotate(identifier="CallableToolAllowedCaller")
|
|
131
|
+
RankerVersionType: _S.Bottom[_T.RankerVersionType, _t.Any] = _b.literals(["auto", "default-2024-11-15"]).annotate(identifier="RankerVersionType")
|
|
132
|
+
HybridSearchOptions: _StructSchema[_T.HybridSearchOptions, _t.Never, _t.Never] = _b.struct(_T.HybridSearchOptions, {"embedding_weight": _b.check(_S.Number.annotate(description="The weight of the embedding in the reciprocal ranking fusion."), _S.is_finite().annotate(expected="a finite number")), "text_weight": _b.check(_S.Number.annotate(description="The weight of the text in the reciprocal ranking fusion."), _S.is_finite().annotate(expected="a finite number"))}).annotate(identifier="HybridSearchOptions")
|
|
133
|
+
ComparisonFilter: _StructSchema[_T.ComparisonFilter, _t.Never, _t.Never] = _b.struct(_T.ComparisonFilter, {"type": _b.literals(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]).annotate(description="Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"), "key": _S.String.annotate(description="The key to compare against the value."), "value": _b.union(_S.String, _S.Finite, _S.Boolean, _b.array(_b.union(_S.String, _S.Finite, mode="one_of")), mode="one_of").annotate(description="The value to compare against the attribute key; supports string, number, or boolean types.")}).annotate(title="Comparison Filter", description="A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n", identifier="ComparisonFilter")
|
|
134
|
+
ComputerTool: _StructSchema[_T.ComputerTool, _t.Never, _t.Never] = _b.struct(_T.ComputerTool, {"type": _b.literal("computer").annotate(description="The type of the computer tool. Always `computer`.")}).annotate(title="Computer", 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="ComputerTool")
|
|
135
|
+
ComputerEnvironment: _S.Bottom[_T.ComputerEnvironment, _t.Any] = _b.literals(["windows", "mac", "linux", "ubuntu", "browser"]).annotate(identifier="ComputerEnvironment")
|
|
136
|
+
WebSearchApproximateLocation: _S.Bottom[_T.WebSearchApproximateLocation, _t.Any] = _b.union(_b.struct(_T.WebSearchApproximateLocation__0, {"type": _b.literal("approximate").annotate(description="The type of location approximation. Always `approximate`."), "country": _b.union(_S.String.annotate(description="The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."), _S.Null), "region": _b.union(_S.String.annotate(description="Free text input for the region of the user, e.g. `California`."), _S.Null), "city": _b.union(_S.String.annotate(description="Free text input for the city of the user, e.g. `San Francisco`."), _S.Null), "timezone": _b.union(_S.String.annotate(description="The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."), _S.Null)}, optional=("type", "country", "region", "city", "timezone",)).annotate(title="Web search approximate location", description="The approximate location of the user.\n"), _S.Null).annotate(identifier="WebSearchApproximateLocation")
|
|
137
|
+
MCPToolFilter: _StructSchema[_T.MCPToolFilter, _t.Never, _t.Never] = _b.struct(_T.MCPToolFilter, {"tool_names": _b.array(_S.String).annotate(title="MCP allowed tools", description="List of allowed tool names."), "read_only": _S.Boolean.annotate(description="Indicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.\n")}, optional=("tool_names", "read_only",)).annotate(title="MCP tool filter", description="A filter object to specify which tools are allowed.\n", identifier="MCPToolFilter")
|
|
138
|
+
ContainerMemoryLimit: _S.Bottom[_T.ContainerMemoryLimit, _t.Any] = _b.literals(["1g", "4g", "16g", "64g"]).annotate(identifier="ContainerMemoryLimit")
|
|
139
|
+
ProgrammaticToolCallingParam: _StructSchema[_T.ProgrammaticToolCallingParam, _t.Never, _t.Never] = _b.struct(_T.ProgrammaticToolCallingParam, {"type": _b.literal("programmatic_tool_calling").annotate(description="The type of the tool. Always `programmatic_tool_calling`.")}).annotate(identifier="ProgrammaticToolCallingParam")
|
|
140
|
+
InputFidelity: _S.Bottom[_T.InputFidelity, _t.Any] = _b.literals(["high", "low"]).annotate(description="Control how much effort the model will exert to match the style and features, especially facial features, of input images. Supports `high` and `low` on `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.", identifier="InputFidelity")
|
|
141
|
+
LocalShellToolParam: _StructSchema[_T.LocalShellToolParam, _t.Never, _t.Never] = _b.struct(_T.LocalShellToolParam, {"type": _b.literal("local_shell").annotate(description="The type of the local shell tool. Always `local_shell`.")}).annotate(title="Local shell tool", description="A tool that allows the model to execute shell commands in a local environment.", identifier="LocalShellToolParam")
|
|
142
|
+
LocalSkillParam: _StructSchema[_T.LocalSkillParam, _t.Never, _t.Never] = _b.struct(_T.LocalSkillParam, {"name": _S.String.annotate(description="The name of the skill."), "description": _S.String.annotate(description="The description of the skill."), "path": _S.String.annotate(description="The path to the directory containing the skill.")}).annotate(identifier="LocalSkillParam")
|
|
143
|
+
ContainerReferenceParam: _StructSchema[_T.ContainerReferenceParam, _t.Never, _t.Never] = _b.struct(_T.ContainerReferenceParam, {"type": _b.literal("container_reference").annotate(description="References a container created with the /v1/containers endpoint"), "container_id": _S.String.annotate(description="The ID of the referenced container.")}).annotate(identifier="ContainerReferenceParam")
|
|
144
|
+
CustomTextFormatParam: _StructSchema[_T.CustomTextFormatParam, _t.Never, _t.Never] = _b.struct(_T.CustomTextFormatParam, {"type": _b.literal("text").annotate(description="Unconstrained text format. Always `text`.")}).annotate(title="Text format", description="Unconstrained free-form text.", identifier="CustomTextFormatParam")
|
|
145
|
+
GrammarSyntax1: _S.Bottom[_T.GrammarSyntax1, _t.Any] = _b.literals(["lark", "regex"]).annotate(identifier="GrammarSyntax1")
|
|
146
|
+
EmptyModelParam: _S.Bottom[_T.EmptyModelParam, _t.Any] = _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(identifier="EmptyModelParam")
|
|
147
|
+
ApproximateLocation: _StructSchema[_T.ApproximateLocation, _t.Never, _t.Never] = _b.struct(_T.ApproximateLocation, {"type": _b.literal("approximate").annotate(description="The type of location approximation. Always `approximate`."), "country": _b.union(_S.String.annotate(description="The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."), _S.Null), "region": _b.union(_S.String.annotate(description="Free text input for the region of the user, e.g. `California`."), _S.Null), "city": _b.union(_S.String.annotate(description="Free text input for the city of the user, e.g. `San Francisco`."), _S.Null), "timezone": _b.union(_S.String.annotate(description="The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."), _S.Null)}, optional=("country", "region", "city", "timezone",)).annotate(identifier="ApproximateLocation")
|
|
148
|
+
SearchContextSize: _S.Bottom[_T.SearchContextSize, _t.Any] = _b.literals(["low", "medium", "high"]).annotate(identifier="SearchContextSize")
|
|
149
|
+
SearchContentType: _S.Bottom[_T.SearchContentType, _t.Any] = _b.literals(["text", "image"]).annotate(identifier="SearchContentType")
|
|
150
|
+
FunctionCallOutputStatusEnum: _S.Bottom[_T.FunctionCallOutputStatusEnum, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="FunctionCallOutputStatusEnum")
|
|
151
|
+
Program: _StructSchema[_T.Program, _t.Never, _t.Never] = _b.struct(_T.Program, {"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.")}).annotate(identifier="Program")
|
|
152
|
+
ProgramOutputStatus: _S.Bottom[_T.ProgramOutputStatus, _t.Any] = _b.literals(["completed", "incomplete"]).annotate(identifier="ProgramOutputStatus")
|
|
153
|
+
CompactionBody: _StructSchema[_T.CompactionBody, _t.Never, _t.Never] = _b.struct(_T.CompactionBody, {"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=("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="CompactionBody")
|
|
154
|
+
CodeInterpreterOutputLogs: _StructSchema[_T.CodeInterpreterOutputLogs, _t.Never, _t.Never] = _b.struct(_T.CodeInterpreterOutputLogs, {"type": _b.literal("logs").annotate(description="The type of the output. Always `logs`."), "logs": _S.String.annotate(description="The logs output from the code interpreter.")}).annotate(title="Code interpreter output logs", description="The logs output from the code interpreter.", identifier="CodeInterpreterOutputLogs")
|
|
155
|
+
CodeInterpreterOutputImage: _StructSchema[_T.CodeInterpreterOutputImage, _t.Never, _t.Never] = _b.struct(_T.CodeInterpreterOutputImage, {"type": _b.literal("image").annotate(description="The type of the output. Always `image`."), "url": _S.String.annotate(description="The URL of the image output from the code interpreter.", format="uri")}).annotate(title="Code interpreter output image", description="The image output from the code interpreter.", identifier="CodeInterpreterOutputImage")
|
|
156
|
+
LocalShellExecAction: _StructSchema[_T.LocalShellExecAction, _t.Never, _t.Never] = _b.struct(_T.LocalShellExecAction, {"type": _b.literal("exec").annotate(description="The type of the local shell action. Always `exec`."), "command": _b.array(_S.String).annotate(description="The command to run."), "timeout_ms": _b.union(_b.check(_S.Number.annotate(description="Optional timeout in milliseconds for the command."), _S.is_int().annotate(expected="an integer")), _S.Null), "working_directory": _b.union(_S.String.annotate(description="Optional working directory to run the command in."), _S.Null), "env": _b.record(_S.String, _S.String).annotate(description="Environment variables to set for the command."), "user": _b.union(_S.String.annotate(description="Optional user to run the command as."), _S.Null)}, optional=("timeout_ms", "working_directory", "user",)).annotate(title="Local shell exec action", description="Execute a shell command on the server.", identifier="LocalShellExecAction")
|
|
157
|
+
LocalShellToolCallOutput: _StructSchema[_T.LocalShellToolCallOutput, _t.Never, _t.Never] = _b.struct(_T.LocalShellToolCallOutput, {"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", identifier="LocalShellToolCallOutput")
|
|
158
|
+
FunctionShellAction: _StructSchema[_T.FunctionShellAction, _t.Never, _t.Never] = _b.struct(_T.FunctionShellAction, {"commands": _b.array(_S.String.annotate(description="A list of commands to run.")), "timeout_ms": _b.union(_b.check(_S.Number.annotate(description="Optional timeout in milliseconds for the commands."), _S.is_int().annotate(expected="an integer")), _S.Null), "max_output_length": _b.union(_b.check(_S.Number.annotate(description="Optional maximum number of characters to return from each command."), _S.is_int().annotate(expected="an integer")), _S.Null)}).annotate(title="Shell exec action", description="Execute a shell command.", identifier="FunctionShellAction")
|
|
159
|
+
FunctionShellCallStatus: _S.Bottom[_T.FunctionShellCallStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="FunctionShellCallStatus")
|
|
160
|
+
LocalEnvironmentResource: _StructSchema[_T.LocalEnvironmentResource, _t.Never, _t.Never] = _b.struct(_T.LocalEnvironmentResource, {"type": _b.literal("local").annotate(description="The environment type. Always `local`.")}).annotate(title="Local Environment", description="Represents the use of a local environment to perform shell actions.", identifier="LocalEnvironmentResource")
|
|
161
|
+
ContainerReferenceResource: _StructSchema[_T.ContainerReferenceResource, _t.Never, _t.Never] = _b.struct(_T.ContainerReferenceResource, {"type": _b.literal("container_reference").annotate(description="The environment type. Always `container_reference`."), "container_id": _S.String}).annotate(title="Container Reference", description="Represents a container created with /v1/containers.", identifier="ContainerReferenceResource")
|
|
162
|
+
FunctionShellCallOutputStatusEnum: _S.Bottom[_T.FunctionShellCallOutputStatusEnum, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="FunctionShellCallOutputStatusEnum")
|
|
163
|
+
FunctionShellCallOutputTimeoutOutcome: _StructSchema[_T.FunctionShellCallOutputTimeoutOutcome, _t.Never, _t.Never] = _b.struct(_T.FunctionShellCallOutputTimeoutOutcome, {"type": _b.literal("timeout").annotate(description="The outcome type. Always `timeout`.")}).annotate(title="Shell call timeout outcome", description="Indicates that the shell call exceeded its configured time limit.", identifier="FunctionShellCallOutputTimeoutOutcome")
|
|
164
|
+
FunctionShellCallOutputExitOutcome: _StructSchema[_T.FunctionShellCallOutputExitOutcome, _t.Never, _t.Never] = _b.struct(_T.FunctionShellCallOutputExitOutcome, {"type": _b.literal("exit").annotate(description="The outcome type. Always `exit`."), "exit_code": _b.check(_S.Number.annotate(description="Exit code from the shell process."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Shell call exit outcome", description="Indicates that the shell commands finished and returned an exit code.", identifier="FunctionShellCallOutputExitOutcome")
|
|
165
|
+
ApplyPatchCallStatus: _S.Bottom[_T.ApplyPatchCallStatus, _t.Any] = _b.literals(["in_progress", "completed"]).annotate(identifier="ApplyPatchCallStatus")
|
|
166
|
+
ApplyPatchCreateFileOperation: _StructSchema[_T.ApplyPatchCreateFileOperation, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchCreateFileOperation, {"type": _b.literal("create_file").annotate(description="Create a new file with the provided diff."), "path": _S.String.annotate(description="Path of the file to create."), "diff": _S.String.annotate(description="Diff to apply.")}).annotate(title="Apply patch create file operation", description="Instruction describing how to create a file via the apply_patch tool.", identifier="ApplyPatchCreateFileOperation")
|
|
167
|
+
ApplyPatchDeleteFileOperation: _StructSchema[_T.ApplyPatchDeleteFileOperation, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchDeleteFileOperation, {"type": _b.literal("delete_file").annotate(description="Delete the specified file."), "path": _S.String.annotate(description="Path of the file to delete.")}).annotate(title="Apply patch delete file operation", description="Instruction describing how to delete a file via the apply_patch tool.", identifier="ApplyPatchDeleteFileOperation")
|
|
168
|
+
ApplyPatchUpdateFileOperation: _StructSchema[_T.ApplyPatchUpdateFileOperation, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchUpdateFileOperation, {"type": _b.literal("update_file").annotate(description="Update an existing file with the provided diff."), "path": _S.String.annotate(description="Path of the file to update."), "diff": _S.String.annotate(description="Diff to apply.")}).annotate(title="Apply patch update file operation", description="Instruction describing how to update a file via the apply_patch tool.", identifier="ApplyPatchUpdateFileOperation")
|
|
169
|
+
ApplyPatchCallOutputStatus: _S.Bottom[_T.ApplyPatchCallOutputStatus, _t.Any] = _b.literals(["completed", "failed"]).annotate(identifier="ApplyPatchCallOutputStatus")
|
|
170
|
+
MCPListToolsTool: _StructSchema[_T.MCPListToolsTool, _t.Never, _t.Never] = _b.struct(_T.MCPListToolsTool, {"name": _S.String.annotate(description="The name of the tool.\n"), "description": _b.union(_S.String.annotate(description="The description of the tool.\n"), _S.Null), "input_schema": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The JSON schema describing the tool's input.\n"), "annotations": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="Additional annotations about the tool.\n"), _S.Null)}, optional=("description", "annotations",)).annotate(title="MCP list tools tool", description="A tool available on an MCP server.\n", identifier="MCPListToolsTool")
|
|
171
|
+
MCPApprovalRequest: _StructSchema[_T.MCPApprovalRequest, _t.Never, _t.Never] = _b.struct(_T.MCPApprovalRequest, {"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", identifier="MCPApprovalRequest")
|
|
172
|
+
MCPApprovalResponseResource: _StructSchema[_T.MCPApprovalResponseResource, _t.Never, _t.Never] = _b.struct(_T.MCPApprovalResponseResource, {"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=("reason",)).annotate(title="MCP approval response", description="A response to an MCP approval request.\n", identifier="MCPApprovalResponseResource")
|
|
173
|
+
MCPProtocolError: _StructSchema[_T.MCPProtocolError, _t.Never, _t.Never] = _b.struct(_T.MCPProtocolError, {"type": _b.literal("mcp_protocol_error"), "code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String}).annotate(identifier="MCPProtocolError")
|
|
174
|
+
MCPToolExecutionError: _StructSchema[_T.MCPToolExecutionError, _t.Never, _t.Never] = _b.struct(_T.MCPToolExecutionError, {"type": _b.literal("mcp_tool_execution_error"), "content": _S.Json.annotate(expected="JSON value")}).annotate(identifier="MCPToolExecutionError")
|
|
175
|
+
HTTPError: _StructSchema[_T.HTTPError, _t.Never, _t.Never] = _b.struct(_T.HTTPError, {"type": _b.literal("http_error"), "code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String}).annotate(identifier="HTTPError")
|
|
176
|
+
MCPToolCallStatus: _S.Bottom[_T.MCPToolCallStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete", "calling", "failed"]).annotate(identifier="MCPToolCallStatus")
|
|
177
|
+
MessagePhase: _S.Bottom[_T.MessagePhase, _t.Any] = _b.literals(["commentary", "final_answer"]).annotate(description="Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).\nFor models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend\nphase on all assistant messages — dropping it can degrade performance. Not used for user messages.\n", identifier="MessagePhase")
|
|
178
|
+
FunctionCallItemStatus: _S.Bottom[_T.FunctionCallItemStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="FunctionCallItemStatus")
|
|
179
|
+
DetailEnum: _S.Bottom[_T.DetailEnum, _t.Any] = _b.literals(["low", "high", "auto", "original"]).annotate(identifier="DetailEnum")
|
|
180
|
+
FileDetailEnum: _S.Bottom[_T.FileDetailEnum, _t.Any] = _b.literals(["auto", "low", "high"]).annotate(identifier="FileDetailEnum")
|
|
181
|
+
FunctionShellActionParam: _StructSchema[_T.FunctionShellActionParam, _t.Never, _t.Never] = _b.struct(_T.FunctionShellActionParam, {"commands": _b.array(_S.String).annotate(description="Ordered shell commands for the execution environment to run."), "timeout_ms": _b.union(_b.check(_S.Number.annotate(description="Maximum wall-clock time in milliseconds to allow the shell commands to run."), _S.is_int().annotate(expected="an integer")), _S.Null), "max_output_length": _b.union(_b.check(_S.Number.annotate(description="Maximum number of UTF-8 characters to capture from combined stdout and stderr output."), _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("timeout_ms", "max_output_length",)).annotate(title="Shell action", description="Commands and limits describing how to run the shell tool call.", identifier="FunctionShellActionParam")
|
|
182
|
+
FunctionShellCallItemStatus: _S.Bottom[_T.FunctionShellCallItemStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(title="Shell call status", description="Status values reported for shell tool calls.", identifier="FunctionShellCallItemStatus")
|
|
183
|
+
FunctionShellCallOutputTimeoutOutcomeParam: _StructSchema[_T.FunctionShellCallOutputTimeoutOutcomeParam, _t.Never, _t.Never] = _b.struct(_T.FunctionShellCallOutputTimeoutOutcomeParam, {"type": _b.literal("timeout").annotate(description="The outcome type. Always `timeout`.")}).annotate(title="Shell call timeout outcome", description="Indicates that the shell call exceeded its configured time limit.", identifier="FunctionShellCallOutputTimeoutOutcomeParam")
|
|
184
|
+
FunctionShellCallOutputExitOutcomeParam: _StructSchema[_T.FunctionShellCallOutputExitOutcomeParam, _t.Never, _t.Never] = _b.struct(_T.FunctionShellCallOutputExitOutcomeParam, {"type": _b.literal("exit").annotate(description="The outcome type. Always `exit`."), "exit_code": _b.check(_S.Number.annotate(description="The exit code returned by the shell process."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Shell call exit outcome", description="Indicates that the shell commands finished and returned an exit code.", identifier="FunctionShellCallOutputExitOutcomeParam")
|
|
185
|
+
ApplyPatchCallStatusParam: _S.Bottom[_T.ApplyPatchCallStatusParam, _t.Any] = _b.literals(["in_progress", "completed"]).annotate(title="Apply patch call status", description="Status values reported for apply_patch tool calls.", identifier="ApplyPatchCallStatusParam")
|
|
186
|
+
ApplyPatchCreateFileOperationParam: _StructSchema[_T.ApplyPatchCreateFileOperationParam, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchCreateFileOperationParam, {"type": _b.literal("create_file").annotate(description="The operation type. Always `create_file`."), "path": _b.check(_S.String.annotate(description="Path of the file to create relative to the workspace root."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "diff": _b.check(_S.String.annotate(description="Unified diff content to apply when creating the file."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points"))}).annotate(title="Apply patch create file operation", description="Instruction for creating a new file via the apply_patch tool.", identifier="ApplyPatchCreateFileOperationParam")
|
|
187
|
+
ApplyPatchDeleteFileOperationParam: _StructSchema[_T.ApplyPatchDeleteFileOperationParam, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchDeleteFileOperationParam, {"type": _b.literal("delete_file").annotate(description="The operation type. Always `delete_file`."), "path": _b.check(_S.String.annotate(description="Path of the file to delete relative to the workspace root."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(title="Apply patch delete file operation", description="Instruction for deleting an existing file via the apply_patch tool.", identifier="ApplyPatchDeleteFileOperationParam")
|
|
188
|
+
ApplyPatchUpdateFileOperationParam: _StructSchema[_T.ApplyPatchUpdateFileOperationParam, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchUpdateFileOperationParam, {"type": _b.literal("update_file").annotate(description="The operation type. Always `update_file`."), "path": _b.check(_S.String.annotate(description="Path of the file to update relative to the workspace root."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "diff": _b.check(_S.String.annotate(description="Unified diff content to apply to the existing file."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points"))}).annotate(title="Apply patch update file operation", description="Instruction for updating an existing file via the apply_patch tool.", identifier="ApplyPatchUpdateFileOperationParam")
|
|
189
|
+
ApplyPatchCallOutputStatusParam: _S.Bottom[_T.ApplyPatchCallOutputStatusParam, _t.Any] = _b.literals(["completed", "failed"]).annotate(title="Apply patch call output status", description="Outcome values reported for apply_patch tool call outputs.", identifier="ApplyPatchCallOutputStatusParam")
|
|
190
|
+
CompactionTriggerItemParam: _StructSchema[_T.CompactionTriggerItemParam, _t.Never, _t.Never] = _b.struct(_T.CompactionTriggerItemParam, {"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=("id",)).annotate(title="Compaction trigger", description="Compacts the current context. Must be the final input item.", identifier="CompactionTriggerItemParam")
|
|
191
|
+
ItemReferenceParam: _StructSchema[_T.ItemReferenceParam, _t.Never, _t.Never] = _b.struct(_T.ItemReferenceParam, {"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=("type",)).annotate(title="Item reference", description="An internal identifier for an item to reference.", identifier="ItemReferenceParam")
|
|
192
|
+
ProgramItemParam: _StructSchema[_T.ProgramItemParam, _t.Never, _t.Never] = _b.struct(_T.ProgramItemParam, {"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"))}).annotate(identifier="ProgramItemParam")
|
|
193
|
+
ProgramOutputItemStatus: _S.Bottom[_T.ProgramOutputItemStatus, _t.Any] = _b.literals(["completed", "incomplete"]).annotate(identifier="ProgramOutputItemStatus")
|
|
194
|
+
ConversationResource: _StructSchema[_T.ConversationResource, _t.Never, _t.Never] = _b.struct(_T.ConversationResource, {"id": _S.String.annotate(description="The unique ID of the conversation."), "object": _b.literal("conversation").annotate(description="The object type, which is always `conversation`."), "metadata": _b.record(_S.String, _S.String).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."), "created_at": _b.check(_S.Number.annotate(description="The time at which the conversation was created, measured in seconds since the Unix epoch.", format="unixtime"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="ConversationResource")
|
|
195
|
+
CreateEmbeddingRequest: _StructSchema[_T.CreateEmbeddingRequest, _t.Never, _t.Never] = _b.struct(_T.CreateEmbeddingRequest, {"input": _b.union(_S.String.annotate(title="string", description="The string that will be turned into an embedding."), _b.check(_b.check(_b.array(_S.String).annotate(title="array", description="The array of strings that will be turned into an embedding."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(2048).annotate(expected="a value with a length of at most 2048")), _b.check(_b.check(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))).annotate(title="array", description="The array of integers that will be turned into an embedding."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(2048).annotate(expected="a value with a length of at most 2048")), _b.check(_b.check(_b.array(_b.check(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))).annotate(title="array", description="The array of arrays containing integers that will be turned into an embedding."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(2048).annotate(expected="a value with a length of at most 2048")), mode="one_of").annotate(description="Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request.\n"), "model": _b.union(_S.String, _b.literals(["text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large"])).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"), "encoding_format": _b.literals(["float", "base64"]).annotate(description="The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/)."), "dimensions": _b.check(_b.check(_S.Number.annotate(description="The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.\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")), "user": _S.String.annotate(description="A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n")}, optional=("encoding_format", "dimensions", "user",)).annotate(identifier="CreateEmbeddingRequest")
|
|
196
|
+
Embedding: _StructSchema[_T.Embedding, _t.Never, _t.Never] = _b.struct(_T.Embedding, {"index": _b.check(_S.Number.annotate(description="The index of the embedding in the list of embeddings."), _S.is_int().annotate(expected="an integer")), "embedding": _b.union(_b.array(_b.check(_S.Number.annotate(format="float"), _S.is_finite().annotate(expected="a finite number"))), _S.String.annotate(content_encoding="base64")).annotate(description="The embedding vector, returned as a list of floats when `encoding_format` is `float` (the default), or as a base64-encoded string when `encoding_format` is `base64`. The length of the vector depends on the model as listed in the [embedding guide](https://developers.openai.com/api/docs/guides/embeddings).\n"), "object": _b.literal("embedding").annotate(description="The object type, which is always \"embedding\".")}).annotate(description="Represents an embedding vector returned by embedding endpoint.\n", identifier="Embedding")
|
|
197
|
+
EvalCustomDataSourceConfig: _StructSchema[_T.EvalCustomDataSourceConfig, _t.Never, _t.Never] = _b.struct(_T.EvalCustomDataSourceConfig, {"type": _b.literal("custom").annotate(description="The type of data source. Always `custom`."), "schema": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n")}).annotate(title="CustomDataSourceConfig", description="A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.\nThe response schema defines the shape of the data that will be:\n- Used to define your testing criteria and\n- What data is required when creating a run\n", identifier="EvalCustomDataSourceConfig")
|
|
198
|
+
EvalItemContentText: _S.Bottom[_T.EvalItemContentText, _t.Any] = _S.String.annotate(title="Text input", description="A text input to the model.\n", identifier="EvalItemContentText")
|
|
199
|
+
EvalItemContentOutputText: _StructSchema[_T.EvalItemContentOutputText, _t.Never, _t.Never] = _b.struct(_T.EvalItemContentOutputText, {"type": _b.literal("output_text").annotate(description="The type of the output text. Always `output_text`.\n"), "text": _S.String.annotate(description="The text output from the model.\n")}).annotate(title="Output text", description="A text output from the model.\n", identifier="EvalItemContentOutputText")
|
|
200
|
+
EvalItemInputImage: _StructSchema[_T.EvalItemInputImage, _t.Never, _t.Never] = _b.struct(_T.EvalItemInputImage, {"type": _b.literal("input_image").annotate(description="The type of the image input. Always `input_image`.\n"), "image_url": _S.String.annotate(description="The URL of the image input.\n", format="uri"), "detail": _S.String.annotate(description="The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.\n")}, optional=("detail",)).annotate(title="Input image", description="An image input block used within EvalItem content arrays.", identifier="EvalItemInputImage")
|
|
201
|
+
InputAudio: _StructSchema[_T.InputAudio, _t.Never, _t.Never] = _b.struct(_T.InputAudio, {"type": _b.literal("input_audio").annotate(description="The type of the input item. Always `input_audio`.\n"), "input_audio": _b.struct(_T.InputAudio__input_audio, {"data": _S.String.annotate(description="Base64-encoded audio data.\n"), "format": _b.literals(["mp3", "wav"]).annotate(description="The format of the audio data. Currently supported formats are `mp3` and\n`wav`.\n")})}).annotate(title="Input audio", description="An audio input to the model.\n", identifier="InputAudio")
|
|
202
|
+
EvalGraderStringCheck: _StructSchema[_T.EvalGraderStringCheck, _t.Never, _t.Never] = _b.struct(_T.EvalGraderStringCheck, {"type": _b.literal("string_check").annotate(description="The object type, which is always `string_check`."), "name": _S.String.annotate(description="The name of the grader."), "input": _S.String.annotate(description="The input text. This may include template strings."), "reference": _S.String.annotate(description="The reference text. This may include template strings."), "operation": _b.literals(["eq", "ne", "like", "ilike"]).annotate(description="The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.")}).annotate(title="StringCheckGrader", description="A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.\n", identifier="EvalGraderStringCheck")
|
|
203
|
+
EvalGraderTextSimilarity: _StructSchema[_T.EvalGraderTextSimilarity, _t.Never, _t.Never] = _b.struct(_T.EvalGraderTextSimilarity, {"type": _b.literal("text_similarity").annotate(description="The type of grader."), "name": _S.String.annotate(description="The name of the grader."), "input": _S.String.annotate(description="The text being graded."), "reference": _S.String.annotate(description="The text being graded against."), "evaluation_metric": _b.literals(["cosine", "fuzzy_match", "bleu", "gleu", "meteor", "rouge_1", "rouge_2", "rouge_3", "rouge_4", "rouge_5", "rouge_l"]).annotate(description="The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, \n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, \nor `rouge_l`.\n"), "pass_threshold": _b.check(_S.Number.annotate(description="The threshold for the score."), _S.is_finite().annotate(expected="a finite number"))}).annotate(title="TextSimilarityGrader", identifier="EvalGraderTextSimilarity")
|
|
204
|
+
EvalGraderPython: _StructSchema[_T.EvalGraderPython, _t.Never, _t.Never] = _b.struct(_T.EvalGraderPython, {"type": _b.literal("python").annotate(description="The object type, which is always `python`."), "name": _S.String.annotate(description="The name of the grader."), "source": _S.String.annotate(description="The source code of the python script."), "image_tag": _S.String.annotate(description="The image tag to use for the python script."), "pass_threshold": _b.check(_S.Number.annotate(description="The threshold for the score."), _S.is_finite().annotate(expected="a finite number"))}, optional=("image_tag", "pass_threshold",)).annotate(title="PythonGrader", identifier="EvalGraderPython")
|
|
205
|
+
CreateEvalCustomDataSourceConfig: _StructSchema[_T.CreateEvalCustomDataSourceConfig, _t.Never, _t.Never] = _b.struct(_T.CreateEvalCustomDataSourceConfig, {"type": _b.literal("custom").annotate(description="The type of data source. Always `custom`."), "item_schema": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The json schema for each row in the data source."), "include_sample_schema": _S.Boolean.annotate(description="Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)")}, optional=("include_sample_schema",)).annotate(title="CustomDataSourceConfig", description="A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs.\nThis schema is used to define the shape of the data that will be:\n- Used to define your testing criteria and\n- What data is required when creating a run\n", identifier="CreateEvalCustomDataSourceConfig")
|
|
206
|
+
CreateEvalLogsDataSourceConfig: _StructSchema[_T.CreateEvalLogsDataSourceConfig, _t.Never, _t.Never] = _b.struct(_T.CreateEvalLogsDataSourceConfig, {"type": _b.literal("logs").annotate(description="The type of data source. Always `logs`."), "metadata": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="Metadata filters for the logs data source.")}, optional=("metadata",)).annotate(title="LogsDataSourceConfig", description="A data source config which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\n", identifier="CreateEvalLogsDataSourceConfig")
|
|
207
|
+
CreateEvalStoredCompletionsDataSourceConfig: _StructSchema[_T.CreateEvalStoredCompletionsDataSourceConfig, _t.Never, _t.Never] = _b.struct(_T.CreateEvalStoredCompletionsDataSourceConfig, {"type": _b.literal("stored_completions").annotate(description="The type of data source. Always `stored_completions`."), "metadata": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="Metadata filters for the stored completions data source.")}, optional=("metadata",)).annotate(title="StoredCompletionsDataSourceConfig", description="Deprecated in favor of LogsDataSourceConfig.\n", identifier="CreateEvalStoredCompletionsDataSourceConfig")
|
|
208
|
+
EvalJsonlFileContentSource: _StructSchema[_T.EvalJsonlFileContentSource, _t.Never, _t.Never] = _b.struct(_T.EvalJsonlFileContentSource, {"type": _b.literal("file_content").annotate(description="The type of jsonl source. Always `file_content`."), "content": _b.array(_b.struct(_T.EvalJsonlFileContentSource__content__item, {"item": _b.record(_S.String, _S.Json.annotate(expected="JSON value")), "sample": _b.record(_S.String, _S.Json.annotate(expected="JSON value"))}, optional=("sample",))).annotate(description="The content of the jsonl file.")}).annotate(title="EvalJsonlFileContentSource", identifier="EvalJsonlFileContentSource")
|
|
209
|
+
EvalJsonlFileIdSource: _StructSchema[_T.EvalJsonlFileIdSource, _t.Never, _t.Never] = _b.struct(_T.EvalJsonlFileIdSource, {"type": _b.literal("file_id").annotate(description="The type of jsonl source. Always `file_id`."), "id": _S.String.annotate(description="The identifier of the file.")}).annotate(title="EvalJsonlFileIdSource", identifier="EvalJsonlFileIdSource")
|
|
210
|
+
EvalApiError: _StructSchema[_T.EvalApiError, _t.Never, _t.Never] = _b.struct(_T.EvalApiError, {"code": _S.String.annotate(description="The error code."), "message": _S.String.annotate(description="The error message.")}).annotate(title="EvalApiError", description="An object representing an error response from the Eval API.\n", identifier="EvalApiError")
|
|
211
|
+
EvalRunOutputItemResult: _S.Bottom[_T.EvalRunOutputItemResult, _t.Any] = _b.struct_with_rest(_b.struct(_T.EvalRunOutputItemResult, {"name": _S.String.annotate(description="The name of the grader."), "type": _S.String.annotate(description="The grader type (for example, \"string-check-grader\")."), "score": _b.check(_S.Number.annotate(description="The numeric score produced by the grader."), _S.is_finite().annotate(expected="a finite number")), "passed": _S.Boolean.annotate(description="Whether the grader considered the output a pass."), "sample": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null).annotate(description="Optional sample or intermediate data produced by the grader.")}, optional=("type", "sample",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))).annotate(title="EvalRunOutputItemResult", description="A single grader result for an evaluation run output item.\n", identifier="EvalRunOutputItemResult")
|
|
212
|
+
OpenAIFile: _S.Bottom[_T.OpenAIFile, _t.Any] = _b.union(_S.Null, _S.String, _S.Finite, _S.Boolean, _b.struct_with_rest(_b.struct(_T.OpenAIFile__4, {"id": _S.String.annotate(description="The file identifier, which can be referenced in the API endpoints."), "bytes": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The size of the file, in bytes. In a completed file upload response, this can\nbe null when the file size is not yet available.\n"), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the file was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "expires_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the file will expire.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "filename": _S.String.annotate(description="The name of the file."), "object": _b.literal("file").annotate(description="The object type, which is always `file`."), "purpose": _b.literals(["assistants", "assistants_output", "batch", "batch_output", "fine-tune", "fine-tune-results", "vision", "user_data"]).annotate(description="The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`."), "status": _b.literals(["uploaded", "processed", "error"]).annotate(description="Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`."), "status_details": _b.union(_S.String, _S.Null).annotate(description="Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`. Completed file upload responses can return null when these details are unset.")}, optional=("expires_at", "status_details",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _b.array(_S.Json.annotate(expected="JSON value"))).annotate(title="OpenAIFile", description="The `File` object represents a document that has been uploaded to OpenAI.", identifier="OpenAIFile")
|
|
213
|
+
FileExpirationAfter: _StructSchema[_T.FileExpirationAfter, _t.Never, _t.Never] = _b.struct(_T.FileExpirationAfter, {"anchor": _b.literal("created_at").annotate(description="Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`."), "seconds": _b.check(_b.check(_b.check(_S.Number.annotate(description="The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).", format="int64"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(3600).annotate(expected="a value greater than or equal to 3600")), _S.is_less_than_or_equal_to(2592000).annotate(expected="a value less than or equal to 2592000"))}).annotate(title="File expiration policy", description="The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted.", identifier="FileExpirationAfter")
|
|
214
|
+
DeleteFileResponse: _StructSchema[_T.DeleteFileResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteFileResponse, {"id": _S.String, "object": _b.literal("file"), "deleted": _S.Boolean}).annotate(identifier="DeleteFileResponse")
|
|
215
|
+
GraderStringCheck: _StructSchema[_T.GraderStringCheck, _t.Never, _t.Never] = _b.struct(_T.GraderStringCheck, {"type": _b.literal("string_check").annotate(description="The object type, which is always `string_check`."), "name": _S.String.annotate(description="The name of the grader."), "input": _S.String.annotate(description="The input text. This may include template strings."), "reference": _S.String.annotate(description="The reference text. This may include template strings."), "operation": _b.literals(["eq", "ne", "like", "ilike"]).annotate(description="The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.")}).annotate(title="StringCheckGrader", description="A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.\n", identifier="GraderStringCheck")
|
|
216
|
+
GraderTextSimilarity: _StructSchema[_T.GraderTextSimilarity, _t.Never, _t.Never] = _b.struct(_T.GraderTextSimilarity, {"type": _b.literal("text_similarity").annotate(description="The type of grader."), "name": _S.String.annotate(description="The name of the grader."), "input": _S.String.annotate(description="The text being graded."), "reference": _S.String.annotate(description="The text being graded against."), "evaluation_metric": _b.literals(["cosine", "fuzzy_match", "bleu", "gleu", "meteor", "rouge_1", "rouge_2", "rouge_3", "rouge_4", "rouge_5", "rouge_l"]).annotate(description="The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, \n`gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, \nor `rouge_l`.\n")}).annotate(title="TextSimilarityGrader", description="A TextSimilarityGrader object which grades text based on similarity metrics.\n", identifier="GraderTextSimilarity")
|
|
217
|
+
GraderPython: _StructSchema[_T.GraderPython, _t.Never, _t.Never] = _b.struct(_T.GraderPython, {"type": _b.literal("python").annotate(description="The object type, which is always `python`."), "name": _S.String.annotate(description="The name of the grader."), "source": _S.String.annotate(description="The source code of the python script."), "image_tag": _S.String.annotate(description="The image tag to use for the python script.")}, optional=("image_tag",)).annotate(title="PythonGrader", description="A PythonGrader object that runs a python script on the input.\n", identifier="GraderPython")
|
|
218
|
+
RunGraderResponse: _StructSchema[_T.RunGraderResponse, _t.Never, _t.Never] = _b.struct(_T.RunGraderResponse, {"reward": _S.Finite, "metadata": _b.struct(_T.RunGraderResponse__metadata, {"name": _S.String, "type": _S.String, "errors": _b.struct(_T.RunGraderResponse__metadata__errors, {"formula_parse_error": _S.Boolean, "sample_parse_error": _S.Boolean, "truncated_observation_error": _S.Boolean, "unresponsive_reward_error": _S.Boolean, "invalid_variable_error": _S.Boolean, "other_error": _S.Boolean, "python_grader_server_error": _S.Boolean, "python_grader_server_error_type": _b.union(_S.String, _S.Null), "python_grader_runtime_error": _S.Boolean, "python_grader_runtime_error_details": _b.union(_S.String, _S.Null), "model_grader_server_error": _S.Boolean, "model_grader_refusal_error": _S.Boolean, "model_grader_parse_error": _S.Boolean, "model_grader_server_error_details": _b.union(_S.String, _S.Null)}), "execution_time": _S.Finite, "scores": _b.record(_S.String, _S.Json.annotate(expected="JSON value")), "token_usage": _b.union(_b.struct(_T.RunGraderResponse__metadata__token_usage__0, {"prompt_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "total_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "completion_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null), "cached_tokens": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("completion_tokens", "cached_tokens",)), _S.Null), "sampled_model_name": _b.union(_S.String, _S.Null)}), "sub_rewards": _b.record(_S.String, _S.Json.annotate(expected="JSON value")), "model_grader_token_usage_per_model": _b.record(_S.String, _S.Json.annotate(expected="JSON value"))}).annotate(identifier="RunGraderResponse")
|
|
219
|
+
FineTuningCheckpointPermission: _StructSchema[_T.FineTuningCheckpointPermission, _t.Never, _t.Never] = _b.struct(_T.FineTuningCheckpointPermission, {"id": _S.String.annotate(description="The permission 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 permission was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "project_id": _S.String.annotate(description="The project identifier that the permission is for."), "object": _b.literal("checkpoint.permission").annotate(description="The object type, which is always \"checkpoint.permission\".")}).annotate(title="FineTuningCheckpointPermission", description="The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.\n", identifier="FineTuningCheckpointPermission")
|
|
220
|
+
CreateFineTuningCheckpointPermissionRequest: _StructSchema[_T.CreateFineTuningCheckpointPermissionRequest, _t.Never, _t.Never] = _b.struct(_T.CreateFineTuningCheckpointPermissionRequest, {"project_ids": _b.array(_S.String).annotate(description="The project identifiers to grant access to.")}).annotate(identifier="CreateFineTuningCheckpointPermissionRequest")
|
|
221
|
+
DeleteFineTuningCheckpointPermissionResponse: _StructSchema[_T.DeleteFineTuningCheckpointPermissionResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteFineTuningCheckpointPermissionResponse, {"id": _S.String.annotate(description="The ID of the fine-tuned model checkpoint permission that was deleted."), "object": _b.literal("checkpoint.permission").annotate(description="The object type, which is always \"checkpoint.permission\"."), "deleted": _S.Boolean.annotate(description="Whether the fine-tuned model checkpoint permission was successfully deleted.")}).annotate(identifier="DeleteFineTuningCheckpointPermissionResponse")
|
|
222
|
+
FineTuningIntegration: _StructSchema[_T.FineTuningIntegration, _t.Never, _t.Never] = _b.struct(_T.FineTuningIntegration, {"type": _b.literal("wandb").annotate(description="The type of the integration being enabled for the fine-tuning job"), "wandb": _b.struct(_T.FineTuningIntegration__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.annotate(description="A display name to set for the run. If not set, we will use the Job ID as the name.\n"), _S.Null), "entity": _b.union(_S.String.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"), _S.Null), "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")}).annotate(title="Fine-Tuning Job Integration", identifier="FineTuningIntegration")
|
|
223
|
+
FineTuneSupervisedHyperparameters: _StructSchema[_T.FineTuneSupervisedHyperparameters, _t.Never, _t.Never] = _b.struct(_T.FineTuneSupervisedHyperparameters, {"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 are 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 overfitting.\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 through the training dataset.\n")}, optional=("batch_size", "learning_rate_multiplier", "n_epochs",)).annotate(description="The hyperparameters used for the fine-tuning job.", identifier="FineTuneSupervisedHyperparameters")
|
|
224
|
+
FineTuneDPOHyperparameters: _StructSchema[_T.FineTuneDPOHyperparameters, _t.Never, _t.Never] = _b.struct(_T.FineTuneDPOHyperparameters, {"beta": _b.union(_b.literal("auto"), _b.check(_b.check(_S.Finite, _S.is_less_than_or_equal_to(2).annotate(expected="a value less than or equal to 2")), _S.is_greater_than(0).annotate(expected="a value greater than 0")), mode="one_of").annotate(description="The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.\n"), "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 are 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 overfitting.\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 through the training dataset.\n")}, optional=("beta", "batch_size", "learning_rate_multiplier", "n_epochs",)).annotate(description="The hyperparameters used for the DPO fine-tuning job.", identifier="FineTuneDPOHyperparameters")
|
|
225
|
+
FineTuneReinforcementHyperparameters: _StructSchema[_T.FineTuneReinforcementHyperparameters, _t.Never, _t.Never] = _b.struct(_T.FineTuneReinforcementHyperparameters, {"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 are 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 overfitting.\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 through the training dataset.\n"), "reasoning_effort": _b.literals(["default", "low", "medium", "high"]).annotate(description="Level of reasoning effort.\n"), "compute_multiplier": _b.union(_b.literal("auto"), _b.check(_b.check(_S.Finite, _S.is_less_than_or_equal_to(10).annotate(expected="a value less than or equal to 10")), _S.is_greater_than(1e-05).annotate(expected="a value greater than 0.00001")), mode="one_of").annotate(description="Multiplier on amount of compute used for exploring search space during training.\n"), "eval_interval": _b.union(_b.literal("auto"), _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")), mode="one_of").annotate(description="The number of training steps between evaluation runs.\n"), "eval_samples": _b.union(_b.literal("auto"), _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")), mode="one_of").annotate(description="Number of evaluation samples to generate per training step.\n")}, optional=("batch_size", "learning_rate_multiplier", "n_epochs", "reasoning_effort", "compute_multiplier", "eval_interval", "eval_samples",)).annotate(description="The hyperparameters used for the reinforcement fine-tuning job.", identifier="FineTuneReinforcementHyperparameters")
|
|
226
|
+
FineTuningJobCheckpoint: _StructSchema[_T.FineTuningJobCheckpoint, _t.Never, _t.Never] = _b.struct(_T.FineTuningJobCheckpoint, {"id": _S.String.annotate(description="The checkpoint 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 checkpoint was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "fine_tuned_model_checkpoint": _S.String.annotate(description="The name of the fine-tuned checkpoint model that is created."), "step_number": _b.check(_S.Number.annotate(description="The step number that the checkpoint was created at."), _S.is_int().annotate(expected="an integer")), "metrics": _b.struct(_T.FineTuningJobCheckpoint__metrics, {"step": _S.Finite, "train_loss": _S.Finite, "train_mean_token_accuracy": _S.Finite, "valid_loss": _S.Finite, "valid_mean_token_accuracy": _S.Finite, "full_valid_loss": _S.Finite, "full_valid_mean_token_accuracy": _S.Finite}, optional=("step", "train_loss", "train_mean_token_accuracy", "valid_loss", "valid_mean_token_accuracy", "full_valid_loss", "full_valid_mean_token_accuracy",)).annotate(description="Metrics at the step number during the fine-tuning job."), "fine_tuning_job_id": _S.String.annotate(description="The name of the fine-tuning job that this checkpoint was created from."), "object": _b.literal("fine_tuning.job.checkpoint").annotate(description="The object type, which is always \"fine_tuning.job.checkpoint\".")}).annotate(title="FineTuningJobCheckpoint", description="The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.\n", identifier="FineTuningJobCheckpoint")
|
|
227
|
+
FineTuningJobEvent: _StructSchema[_T.FineTuningJobEvent, _t.Never, _t.Never] = _b.struct(_T.FineTuningJobEvent, {"object": _b.literal("fine_tuning.job.event").annotate(description="The object type, which is always \"fine_tuning.job.event\"."), "id": _S.String.annotate(description="The object identifier."), "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")), "level": _b.literals(["info", "warn", "error"]).annotate(description="The log level of the event."), "message": _S.String.annotate(description="The message of the event."), "type": _b.literals(["message", "metrics"]).annotate(description="The type of event."), "data": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null).annotate(description="The data associated with the event.")}, optional=("type", "data",)).annotate(description="Fine-tuning job event object", identifier="FineTuningJobEvent")
|
|
228
|
+
ImageRefParam: _S.Bottom[_T.ImageRefParam, _t.Any] = _b.union(_b.struct(_T.ImageRefParam__0, {"image_url": _b.check(_S.String.annotate(description="A fully qualified URL or base64-encoded data URL.", format="uri"), _S.is_max_code_points(20971520).annotate(expected="a string with at most 20971520 code points")), "file_id": _S.String.annotate(description="The File API ID of an uploaded image to use as input.")}, optional=("file_id",)), _b.struct(_T.ImageRefParam__1, {"image_url": _b.check(_S.String.annotate(description="A fully qualified URL or base64-encoded data URL.", format="uri"), _S.is_max_code_points(20971520).annotate(expected="a string with at most 20971520 code points")), "file_id": _S.String.annotate(description="The File API ID of an uploaded image to use as input.")}, optional=("image_url",)), mode="one_of").annotate(description="Reference an input image by either URL or uploaded file ID.\nProvide exactly one of `image_url` or `file_id`.\n", identifier="ImageRefParam")
|
|
229
|
+
PartialImages: _S.Bottom[_T.PartialImages, _t.Any] = _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="The number of partial images to generate. This parameter is used for\nstreaming responses that return partial images. Value must be between 0 and 3.\nWhen set to 0, the response will be a single image sent in one streaming event.\n\nNote that the final image may be sent before the full number of partial images\nare generated if the full image is generated more quickly.\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")), _S.Null).annotate(identifier="PartialImages")
|
|
230
|
+
Image: _StructSchema[_T.Image, _t.Never, _t.Never] = _b.struct(_T.Image, {"b64_json": _S.String.annotate(description="The base64-encoded JSON of the generated image. Returned by default for GPT image models, or when `response_format` is set to `b64_json` for models that support that parameter."), "url": _S.String.annotate(description="The URL of the generated image when `response_format` is set to `url` for models that support that parameter. Unsupported for GPT image models.", format="uri"), "revised_prompt": _S.String.annotate(description="The revised prompt used to generate the image, for models that support prompt revision. Not returned by GPT image models.")}, optional=("b64_json", "url", "revised_prompt",)).annotate(description="Represents the content or the URL of an image generated by the OpenAI API.", identifier="Image")
|
|
231
|
+
ImageGenOutputTokensDetails: _StructSchema[_T.ImageGenOutputTokensDetails, _t.Never, _t.Never] = _b.struct(_T.ImageGenOutputTokensDetails, {"image_tokens": _b.check(_S.Number.annotate(description="The number of image output tokens generated by the model."), _S.is_int().annotate(expected="an integer")), "text_tokens": _b.check(_S.Number.annotate(description="The number of text output tokens generated by the model."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Image generation output token details", description="The output token details for the image generation.", identifier="ImageGenOutputTokensDetails")
|
|
232
|
+
ImageGenInputUsageDetails: _StructSchema[_T.ImageGenInputUsageDetails, _t.Never, _t.Never] = _b.struct(_T.ImageGenInputUsageDetails, {"text_tokens": _b.check(_S.Number.annotate(description="The number of text tokens in the input prompt."), _S.is_int().annotate(expected="an integer")), "image_tokens": _b.check(_S.Number.annotate(description="The number of image tokens in the input prompt."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Input usage details", description="The input tokens detailed information for the image generation.", identifier="ImageGenInputUsageDetails")
|
|
233
|
+
ImageEditPartialImageEvent: _StructSchema[_T.ImageEditPartialImageEvent, _t.Never, _t.Never] = _b.struct(_T.ImageEditPartialImageEvent, {"type": _b.literal("image_edit.partial_image").annotate(description="The type of the event. Always `image_edit.partial_image`.\n"), "b64_json": _S.String.annotate(description="Base64-encoded partial 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 requested edited image.\n"), "background": _b.literals(["transparent", "opaque", "auto"]).annotate(description="The background setting for the requested edited image.\n"), "output_format": _b.literals(["png", "webp", "jpeg"]).annotate(description="The output format for the requested edited image.\n"), "partial_image_index": _b.check(_S.Number.annotate(description="0-based index for the partial image (streaming).\n"), _S.is_int().annotate(expected="an integer"))}).annotate(description="Emitted when a partial image is available during image editing streaming.\n", identifier="ImageEditPartialImageEvent")
|
|
234
|
+
ImagesUsage: _StructSchema[_T.ImagesUsage, _t.Never, _t.Never] = _b.struct(_T.ImagesUsage, {"total_tokens": _b.check(_S.Number.annotate(description="The total number of tokens (images and text) used for the image generation.\n"), _S.is_int().annotate(expected="an integer")), "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")), "output_tokens": _b.check(_S.Number.annotate(description="The number of image tokens in the output image."), _S.is_int().annotate(expected="an integer")), "input_tokens_details": _b.struct(_T.ImagesUsage__input_tokens_details, {"text_tokens": _b.check(_S.Number.annotate(description="The number of text tokens in the input prompt."), _S.is_int().annotate(expected="an integer")), "image_tokens": _b.check(_S.Number.annotate(description="The number of image tokens in the input prompt."), _S.is_int().annotate(expected="an integer"))}).annotate(description="The input tokens detailed information for the image generation.")}).annotate(description="For the GPT image models only, the token usage information for the image generation.\n", identifier="ImagesUsage")
|
|
235
|
+
ImageGenPartialImageEvent: _StructSchema[_T.ImageGenPartialImageEvent, _t.Never, _t.Never] = _b.struct(_T.ImageGenPartialImageEvent, {"type": _b.literal("image_generation.partial_image").annotate(description="The type of the event. Always `image_generation.partial_image`.\n"), "b64_json": _S.String.annotate(description="Base64-encoded partial 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 requested image.\n"), "background": _b.literals(["transparent", "opaque", "auto"]).annotate(description="The background setting for the requested image.\n"), "output_format": _b.literals(["png", "webp", "jpeg"]).annotate(description="The output format for the requested image.\n"), "partial_image_index": _b.check(_S.Number.annotate(description="0-based index for the partial image (streaming).\n"), _S.is_int().annotate(expected="an integer"))}).annotate(description="Emitted when a partial image is available during image generation streaming.\n", identifier="ImageGenPartialImageEvent")
|
|
236
|
+
ModelIdsLive: _S.Bottom[_T.ModelIdsLive, _t.Any] = _b.union(_b.check(_S.String, _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. Required in the session configuration for every transport; do not pass it as a URL query parameter.", identifier="ModelIdsLive")
|
|
237
|
+
Instructions: _S.Bottom[_T.Instructions, _t.Any] = _b.union(_S.String.annotate(description="Frontend instructions for voice, conversation, interruptions, and when to delegate. Start with the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting); put business rules and tool workflows in a separate [backend prompt](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt). Limited to 16,384 client-supplied tokens. Omitted or blank instructions use server defaults. Immutable after startup."), _S.Null).annotate(identifier="instructions")
|
|
238
|
+
LiveCustomVoiceParam: _StructSchema[_T.LiveCustomVoiceParam, _t.Never, _t.Never] = _b.struct(_T.LiveCustomVoiceParam, {"id": _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"))}).annotate(identifier="LiveCustomVoiceParam")
|
|
239
|
+
LiveClientDelegationParam: _StructSchema[_T.LiveClientDelegationParam, _t.Never, _t.Never] = _b.struct(_T.LiveClientDelegationParam, {"type": _b.literal("client").annotate(description="The delegation owner. Always `client` for tasks handled by your application.")}).annotate(description="Delegate tasks to your application. The Live session emits delegation events that your backend handles.", identifier="LiveClientDelegationParam")
|
|
240
|
+
LiveResponsesServiceTier: _S.Bottom[_T.LiveResponsesServiceTier, _t.Any] = _b.literals(["auto", "default", "fast_tier_temp_pilot", "flex", "priority", "ultrafast"]).annotate(identifier="LiveResponsesServiceTier")
|
|
241
|
+
LiveReasoningEffort: _S.Bottom[_T.LiveReasoningEffort, _t.Any] = _b.literals(["none", "minimal", "low", "medium", "high", "xhigh"]).annotate(identifier="LiveReasoningEffort")
|
|
242
|
+
LiveReasoningSummary: _S.Bottom[_T.LiveReasoningSummary, _t.Any] = _b.literals(["concise", "detailed", "auto"]).annotate(identifier="LiveReasoningSummary")
|
|
243
|
+
LiveTextVerbosity: _S.Bottom[_T.LiveTextVerbosity, _t.Any] = _b.literals(["low", "medium", "high"]).annotate(identifier="LiveTextVerbosity")
|
|
244
|
+
LiveFunctionToolInputParam: _StructSchema[_T.LiveFunctionToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveFunctionToolInputParam, {"type": _b.literal("function").annotate(description="The tool type. Always `function`."), "name": _S.String.annotate(description="The name the delegated Responses model uses when calling this function."), "description": _b.union(_S.String.annotate(description="What the function does and when the delegated Responses model should call it."), _S.Null), "parameters": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A JSON Schema object describing the arguments accepted by the function."), _S.Null), "strict": _b.union(_S.Boolean.annotate(description="Whether the delegated Responses model must follow the function’s parameter schema exactly."), _S.Null)}, optional=("description", "parameters", "strict",)).annotate(description="A function tool available to the Responses backend when the Live model delegates a task.", identifier="LiveFunctionToolInputParam")
|
|
245
|
+
LiveWebSearchToolInputParam: _StructSchema[_T.LiveWebSearchToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveWebSearchToolInputParam, {"type": _b.literal("web_search").annotate(description="The tool type. Always `web_search`.")}).annotate(description="A web search tool available to the Live session’s Responses backend.", identifier="LiveWebSearchToolInputParam")
|
|
246
|
+
LiveFileSearchToolInputParam: _StructSchema[_T.LiveFileSearchToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveFileSearchToolInputParam, {"type": _b.literal("file_search")}).annotate(identifier="LiveFileSearchToolInputParam")
|
|
247
|
+
LiveCodeInterpreterToolInputParam: _StructSchema[_T.LiveCodeInterpreterToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveCodeInterpreterToolInputParam, {"type": _b.literal("code_interpreter")}).annotate(identifier="LiveCodeInterpreterToolInputParam")
|
|
248
|
+
LiveContainerMemoryLimit: _S.Bottom[_T.LiveContainerMemoryLimit, _t.Any] = _b.literals(["1g", "4g", "16g", "64g"]).annotate(identifier="LiveContainerMemoryLimit")
|
|
249
|
+
LiveContainerNetworkPolicyDisabledParam: _StructSchema[_T.LiveContainerNetworkPolicyDisabledParam, _t.Never, _t.Never] = _b.struct(_T.LiveContainerNetworkPolicyDisabledParam, {"type": _b.literal("disabled").annotate(description="Disable outbound network access. Always `disabled`.")}).annotate(identifier="LiveContainerNetworkPolicyDisabledParam")
|
|
250
|
+
LiveHostedShellNetworkPolicyAllowlistParam: _StructSchema[_T.LiveHostedShellNetworkPolicyAllowlistParam, _t.Never, _t.Never] = _b.struct(_T.LiveHostedShellNetworkPolicyAllowlistParam, {"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"))}).annotate(identifier="LiveHostedShellNetworkPolicyAllowlistParam")
|
|
251
|
+
LiveSkillReferenceParam: _StructSchema[_T.LiveSkillReferenceParam, _t.Never, _t.Never] = _b.struct(_T.LiveSkillReferenceParam, {"type": _b.literal("skill_reference").annotate(description="References a skill created with the /v1/skills endpoint."), "skill_id": _b.check(_b.check(_S.String.annotate(description="The ID of the referenced skill."), _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")), "version": _b.union(_S.String.annotate(description="Optional skill version. Use a positive integer or 'latest'. Omit for default."), _S.Null)}, optional=("version",)).annotate(identifier="LiveSkillReferenceParam")
|
|
252
|
+
LiveInlineSkillSourceParam: _StructSchema[_T.LiveInlineSkillSourceParam, _t.Never, _t.Never] = _b.struct(_T.LiveInlineSkillSourceParam, {"type": _b.literal("base64").annotate(description="The type of the inline skill source. Must be `base64`."), "media_type": _b.literal("application/zip").annotate(description="The media type of the inline skill payload. Must be `application/zip`."), "data": _b.check(_b.check(_S.String.annotate(description="Base64-encoded skill zip bundle."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(70254592).annotate(expected="a string with at most 70254592 code points"))}).annotate(description="Inline skill payload", identifier="LiveInlineSkillSourceParam")
|
|
253
|
+
LiveContainerReferenceParam: _StructSchema[_T.LiveContainerReferenceParam, _t.Never, _t.Never] = _b.struct(_T.LiveContainerReferenceParam, {"type": _b.literal("container_reference").annotate(description="References a container created with the /v1/containers endpoint"), "container_id": _S.String.annotate(description="The ID of the referenced container.")}).annotate(identifier="LiveContainerReferenceParam")
|
|
254
|
+
LiveLocalSkillParam: _StructSchema[_T.LiveLocalSkillParam, _t.Never, _t.Never] = _b.struct(_T.LiveLocalSkillParam, {"name": _S.String.annotate(description="The name of the skill."), "description": _S.String.annotate(description="The description of the skill."), "path": _S.String.annotate(description="The path to the directory containing the skill.")}).annotate(identifier="LiveLocalSkillParam")
|
|
255
|
+
LiveImageGenerationToolInputParam: _StructSchema[_T.LiveImageGenerationToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveImageGenerationToolInputParam, {"type": _b.literal("image_generation")}).annotate(identifier="LiveImageGenerationToolInputParam")
|
|
256
|
+
LiveMCPToolInputParam: _StructSchema[_T.LiveMCPToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveMCPToolInputParam, {"type": _b.literal("mcp")}).annotate(identifier="LiveMCPToolInputParam")
|
|
257
|
+
LiveCustomToolInputParam: _StructSchema[_T.LiveCustomToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveCustomToolInputParam, {"type": _b.literal("custom")}).annotate(identifier="LiveCustomToolInputParam")
|
|
258
|
+
LiveNamespaceToolInputParam: _StructSchema[_T.LiveNamespaceToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveNamespaceToolInputParam, {"type": _b.literal("namespace")}).annotate(identifier="LiveNamespaceToolInputParam")
|
|
259
|
+
LiveToolSearchToolInputParam: _StructSchema[_T.LiveToolSearchToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveToolSearchToolInputParam, {"type": _b.literal("tool_search")}).annotate(identifier="LiveToolSearchToolInputParam")
|
|
260
|
+
LiveProgrammaticToolInputParam: _StructSchema[_T.LiveProgrammaticToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveProgrammaticToolInputParam, {"type": _b.literal("programmatic_tool_calling")}).annotate(identifier="LiveProgrammaticToolInputParam")
|
|
261
|
+
LiveComputerToolInputParam: _StructSchema[_T.LiveComputerToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveComputerToolInputParam, {"type": _b.literal("computer")}).annotate(identifier="LiveComputerToolInputParam")
|
|
262
|
+
LiveApplyPatchToolInputParam: _StructSchema[_T.LiveApplyPatchToolInputParam, _t.Never, _t.Never] = _b.struct(_T.LiveApplyPatchToolInputParam, {"type": _b.literal("apply_patch")}).annotate(identifier="LiveApplyPatchToolInputParam")
|
|
263
|
+
LiveToolChoiceEnum: _S.Bottom[_T.LiveToolChoiceEnum, _t.Any] = _b.literals(["auto", "none", "required"]).annotate(identifier="LiveToolChoiceEnum")
|
|
264
|
+
LiveFunctionToolChoiceParam: _StructSchema[_T.LiveFunctionToolChoiceParam, _t.Never, _t.Never] = _b.struct(_T.LiveFunctionToolChoiceParam, {"type": _b.literal("function").annotate(description="The tool to call. Always `function`."), "name": _S.String.annotate(description="The name of the function tool to call.")}).annotate(identifier="LiveFunctionToolChoiceParam")
|
|
265
|
+
LiveMCPToolChoiceParam: _StructSchema[_T.LiveMCPToolChoiceParam, _t.Never, _t.Never] = _b.struct(_T.LiveMCPToolChoiceParam, {"type": _b.literal("mcp").annotate(description="The tool to call. Always `mcp`."), "server_label": _S.String.annotate(description="The label of the MCP server to call."), "name": _b.union(_S.String.annotate(description="The name of the MCP tool to call. If omitted, the server may choose a default."), _S.Null)}, optional=("name",)).annotate(identifier="LiveMCPToolChoiceParam")
|
|
266
|
+
LiveSpecificFileSearchParam: _StructSchema[_T.LiveSpecificFileSearchParam, _t.Never, _t.Never] = _b.struct(_T.LiveSpecificFileSearchParam, {"type": _b.literal("file_search").annotate(description="The tool to call. Always `file_search`.")}).annotate(identifier="LiveSpecificFileSearchParam")
|
|
267
|
+
LiveSpecificWebSearchParam: _StructSchema[_T.LiveSpecificWebSearchParam, _t.Never, _t.Never] = _b.struct(_T.LiveSpecificWebSearchParam, {"type": _b.literal("web_search").annotate(description="The tool to call. Always `web_search`.")}).annotate(identifier="LiveSpecificWebSearchParam")
|
|
268
|
+
LiveSpecificWebSearchPreviewParam: _StructSchema[_T.LiveSpecificWebSearchPreviewParam, _t.Never, _t.Never] = _b.struct(_T.LiveSpecificWebSearchPreviewParam, {"type": _b.literal("web_search_preview").annotate(description="The tool to call. Always `web_search_preview`.")}).annotate(identifier="LiveSpecificWebSearchPreviewParam")
|
|
269
|
+
LiveSpecificImageGenParam: _StructSchema[_T.LiveSpecificImageGenParam, _t.Never, _t.Never] = _b.struct(_T.LiveSpecificImageGenParam, {"type": _b.literal("image_generation").annotate(description="The tool to call. Always `image_generation`.")}).annotate(identifier="LiveSpecificImageGenParam")
|
|
270
|
+
LiveSpecificComputerParam: _StructSchema[_T.LiveSpecificComputerParam, _t.Never, _t.Never] = _b.struct(_T.LiveSpecificComputerParam, {"type": _b.literal("computer").annotate(description="The tool to call. Always `computer`.")}).annotate(identifier="LiveSpecificComputerParam")
|
|
271
|
+
LiveSpecificCodeInterpreterParam: _StructSchema[_T.LiveSpecificCodeInterpreterParam, _t.Never, _t.Never] = _b.struct(_T.LiveSpecificCodeInterpreterParam, {"type": _b.literal("code_interpreter").annotate(description="The tool to call. Always `code_interpreter`.")}).annotate(identifier="LiveSpecificCodeInterpreterParam")
|
|
272
|
+
LiveSpecificProgrammaticToolCallingParam: _StructSchema[_T.LiveSpecificProgrammaticToolCallingParam, _t.Never, _t.Never] = _b.struct(_T.LiveSpecificProgrammaticToolCallingParam, {"type": _b.literal("programmatic_tool_calling").annotate(description="The tool to call. Always `programmatic_tool_calling`.")}).annotate(identifier="LiveSpecificProgrammaticToolCallingParam")
|
|
273
|
+
LiveSpecificFunctionShellParam: _StructSchema[_T.LiveSpecificFunctionShellParam, _t.Never, _t.Never] = _b.struct(_T.LiveSpecificFunctionShellParam, {"type": _b.literal("shell").annotate(description="The tool to call. Always `shell`.")}).annotate(title="Specific shell tool choice", description="Forces the model to call the shell tool when a tool call is required.", identifier="LiveSpecificFunctionShellParam")
|
|
274
|
+
LiveSpecificCustomToolParam: _StructSchema[_T.LiveSpecificCustomToolParam, _t.Never, _t.Never] = _b.struct(_T.LiveSpecificCustomToolParam, {"type": _b.literal("custom").annotate(description="The tool to call. Always `custom`."), "name": _S.String.annotate(description="The name of the custom tool to call.")}).annotate(identifier="LiveSpecificCustomToolParam")
|
|
275
|
+
LiveSpecificApplyPatchParam: _StructSchema[_T.LiveSpecificApplyPatchParam, _t.Never, _t.Never] = _b.struct(_T.LiveSpecificApplyPatchParam, {"type": _b.literal("apply_patch").annotate(description="The tool to call. Always `apply_patch`.")}).annotate(title="Specific apply patch tool choice", description="Forces the model to call the apply_patch tool when executing a tool call.", identifier="LiveSpecificApplyPatchParam")
|
|
276
|
+
LiveToolChoiceValueEnum: _S.Bottom[_T.LiveToolChoiceValueEnum, _t.Any] = _b.literals(["none", "auto", "required"]).annotate(identifier="LiveToolChoiceValueEnum")
|
|
277
|
+
Store: _S.Bottom[_T.Store, _t.Any] = _S.Boolean.annotate(description="Whether to store the session for later forking and recording download. Defaults to false for new sessions.", identifier="store")
|
|
278
|
+
LiveInitialMessageStatus: _S.Bottom[_T.LiveInitialMessageStatus, _t.Any] = _b.literals(["incomplete", "completed"]).annotate(identifier="LiveInitialMessageStatus")
|
|
279
|
+
LiveInitialInputTextContentPartParam: _StructSchema[_T.LiveInitialInputTextContentPartParam, _t.Never, _t.Never] = _b.struct(_T.LiveInitialInputTextContentPartParam, {"type": _b.literal("input_text").annotate(description="The text content type. Always `input_text`."), "text": _S.String.annotate(description="The message text to include in the Live session’s initial conversation history.")}, optional=("type",)).annotate(description="Text supplied in a developer or user message when starting a Live session.", identifier="LiveInitialInputTextContentPartParam")
|
|
280
|
+
LiveInitialTextContentPartParam: _StructSchema[_T.LiveInitialTextContentPartParam, _t.Never, _t.Never] = _b.struct(_T.LiveInitialTextContentPartParam, {"type": _b.literal("text").annotate(description="The text content type. Always `text`."), "text": _S.String.annotate(description="The message text to include in the Live session’s initial conversation history.")}, optional=("type",)).annotate(description="Assistant text supplied as conversation history when starting a Live session.", identifier="LiveInitialTextContentPartParam")
|
|
281
|
+
LiveInitialOutputTextContentPartParam: _StructSchema[_T.LiveInitialOutputTextContentPartParam, _t.Never, _t.Never] = _b.struct(_T.LiveInitialOutputTextContentPartParam, {"type": _b.literal("output_text").annotate(description="The text content type. Always `output_text`."), "text": _S.String.annotate(description="The message text to include in the Live session’s initial conversation history.")}).annotate(description="Assistant output text supplied as conversation history when starting a Live session.", identifier="LiveInitialOutputTextContentPartParam")
|
|
282
|
+
LiveAllowedServerEventParam: _StructSchema[_T.LiveAllowedServerEventParam, _t.Never, _t.Never] = _b.struct(_T.LiveAllowedServerEventParam, {"type": _b.check(_b.check(_S.String.annotate(description="The outer Live server event type. Use 'response.event' for Responses events."), _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")), "response_event": _b.check(_b.check(_S.String.annotate(description="The nested Responses event type. Required when type is 'response.event'; forbidden for other event types."), _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"))}, optional=("response_event",)).annotate(description="A Live server event selector for the WebRTC frontend data channel.", identifier="LiveAllowedServerEventParam")
|
|
283
|
+
LiveWebRTCTransport: _StructSchema[_T.LiveWebRTCTransport, _t.Never, _t.Never] = _b.struct(_T.LiveWebRTCTransport, {"type": _b.literal("webrtc").annotate(description="The transport used for the Live session. Always `webrtc`."), "sdp": _b.check(_S.String.annotate(description="Session Description Protocol message for the WebRTC connection."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(description="WebRTC transport carrying the offer SDP in a creation request or answer SDP in its response.", identifier="LiveWebRTCTransport")
|
|
284
|
+
LiveSIPTrunkAuth: _StructSchema[_T.LiveSIPTrunkAuth, _t.Never, _t.Never] = _b.struct(_T.LiveSIPTrunkAuth, {"type": _b.literal("digest").annotate(description="Use `digest` for SIP Digest authentication. Handles 401 and 407 challenges."), "username": _b.check(_S.String.annotate(description="Provider username. Must contain a non-whitespace character, be at most 256 bytes, and contain no CR, LF, or NUL."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "password": _b.check(_S.String.annotate(description="Provider password. Must be at most 4096 bytes and contain no CR, LF, or NUL.", write_only=True), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(description="Credentials for SIP Digest authentication with your trunk provider.", identifier="LiveSIPTrunkAuth")
|
|
285
|
+
Session: _StructSchema[_T.Session, _t.Never, _t.Never] = _b.struct(_T.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.", identifier="session")
|
|
286
|
+
Properties_store: _S.Bottom[_T.Properties_store, _t.Any] = _S.Boolean.annotate(description="Whether to store the forked session. Omission inherits the stored session's setting.", identifier="properties-store")
|
|
287
|
+
LiveCallReferRequest: _StructSchema[_T.LiveCallReferRequest, _t.Never, _t.Never] = _b.struct(_T.LiveCallReferRequest, {"target_uri": _b.check(_b.check(_S.String.annotate(description="Nonblank URI for the SIP Refer-To header, such as tel:+14155550123 or sip:agent@example.com."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _b.js_pattern('\\S', '\\S').annotate(expected="a string matching the RegExp \\S"))}).annotate(description="Parameters used to transfer a Live SIP call to another destination.", identifier="LiveCallReferRequest")
|
|
288
|
+
LiveCallRejectRequest: _StructSchema[_T.LiveCallRejectRequest, _t.Never, _t.Never] = _b.struct(_T.LiveCallRejectRequest, {"status_code": _b.check(_b.check(_b.check(_S.Number.annotate(description="SIP rejection status sent to the caller. This field is required."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(300).annotate(expected="a value greater than or equal to 300")), _S.is_less_than_or_equal_to(699).annotate(expected="a value less than or equal to 699"))}).annotate(description="Parameters used to reject an incoming Live SIP call.", identifier="LiveCallRejectRequest")
|
|
289
|
+
Model: _S.Bottom[_T.Model, _t.Any] = _b.union(_S.Null, _S.String, _S.Finite, _S.Boolean, _b.struct_with_rest(_b.struct(_T.Model__4, {"id": _S.String.annotate(description="The model identifier, which can be referenced in the API endpoints."), "created": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) when the model was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "object": _b.literal("model").annotate(description="The object type, which is always \"model\"."), "owned_by": _S.String.annotate(description="The organization that owns the model."), "shutdown_date": _b.union(_S.String.annotate(format="date"), _S.Null).annotate(description="The date when the model will shut down, or null if not announced.")}, optional=("shutdown_date",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _b.array(_S.Json.annotate(expected="JSON value"))).annotate(title="Model", description="Describes an OpenAI model offering that can be used with the API.", identifier="Model")
|
|
290
|
+
DeleteModelResponse: _StructSchema[_T.DeleteModelResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteModelResponse, {"id": _S.String, "deleted": _S.Boolean, "object": _S.String}).annotate(identifier="DeleteModelResponse")
|
|
291
|
+
CreateModerationRequest: _StructSchema[_T.CreateModerationRequest, _t.Never, _t.Never] = _b.struct(_T.CreateModerationRequest, {"input": _b.union(_S.String.annotate(description="A string of text to classify for moderation."), _b.array(_S.String).annotate(description="An array of strings to classify for moderation."), _b.array(_b.union(_b.struct(_T.CreateModerationRequest__input__2__item__0, {"type": _b.literal("image_url").annotate(description="Always `image_url`."), "image_url": _b.struct(_T.CreateModerationRequest__input__2__item__0__image_url, {"url": _S.String.annotate(description="Either a URL of the image or the base64 encoded image data.", format="uri")}).annotate(description="Contains either an image URL or a data URL for a base64 encoded image.")}).annotate(description="An object describing an image to classify."), _b.struct(_T.CreateModerationRequest__input__2__item__1, {"type": _b.literal("text").annotate(description="Always `text`."), "text": _S.String.annotate(description="A string of text to classify.")}).annotate(description="An object describing text to classify."), mode="one_of")).annotate(description="An array of multi-modal inputs to the moderation model."), mode="one_of").annotate(description="Input (or inputs) to classify. Can be a single string, an array of strings, or\nan array of multi-modal input objects similar to other models.\n"), "model": _b.union(_S.String, _b.literals(["omni-moderation-latest", "omni-moderation-2024-09-26", "text-moderation-latest", "text-moderation-stable"])).annotate(description="The content moderation model you would like to use. Learn more in\n[the moderation guide](https://developers.openai.com/api/docs/guides/moderation), and learn about\navailable models [here](https://developers.openai.com/api/docs/guides/moderation).\n")}, optional=("model",)).annotate(identifier="CreateModerationRequest")
|
|
292
|
+
CreateModerationResponse: _StructSchema[_T.CreateModerationResponse, _t.Never, _t.Never] = _b.struct(_T.CreateModerationResponse, {"id": _S.String.annotate(description="The unique identifier for the moderation request."), "model": _S.String.annotate(description="The model used to generate the moderation results."), "results": _b.array(_b.struct(_T.CreateModerationResponse__results__item, {"flagged": _S.Boolean.annotate(description="Whether any of the below categories are flagged."), "categories": _b.struct(_T.CreateModerationResponse__results__item__categories, {"hate": _S.Boolean.annotate(description="Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment."), "hate/threatening": _S.Boolean.annotate(description="Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste."), "harassment": _S.Boolean.annotate(description="Content that expresses, incites, or promotes harassing language towards any target."), "harassment/threatening": _S.Boolean.annotate(description="Harassment content that also includes violence or serious harm towards any target."), "illicit": _b.union(_S.Boolean.annotate(description="Content that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, \"how to shoplift\" would fit this category."), _S.Null), "illicit/violent": _b.union(_S.Boolean.annotate(description="Content that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence, or that gives advice or instruction on the procurement of any weapon."), _S.Null), "self-harm": _S.Boolean.annotate(description="Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders."), "self-harm/intent": _S.Boolean.annotate(description="Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders."), "self-harm/instructions": _S.Boolean.annotate(description="Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts."), "sexual": _S.Boolean.annotate(description="Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness)."), "sexual/minors": _S.Boolean.annotate(description="Sexual content that includes an individual who is under 18 years old."), "violence": _S.Boolean.annotate(description="Content that depicts death, violence, or physical injury."), "violence/graphic": _S.Boolean.annotate(description="Content that depicts death, violence, or physical injury in graphic detail.")}).annotate(description="A list of the categories, and whether they are flagged or not."), "category_scores": _b.struct(_T.CreateModerationResponse__results__item__category_scores, {"hate": _b.check(_S.Number.annotate(description="The score for the category 'hate'."), _S.is_finite().annotate(expected="a finite number")), "hate/threatening": _b.check(_S.Number.annotate(description="The score for the category 'hate/threatening'."), _S.is_finite().annotate(expected="a finite number")), "harassment": _b.check(_S.Number.annotate(description="The score for the category 'harassment'."), _S.is_finite().annotate(expected="a finite number")), "harassment/threatening": _b.check(_S.Number.annotate(description="The score for the category 'harassment/threatening'."), _S.is_finite().annotate(expected="a finite number")), "illicit": _b.check(_S.Number.annotate(description="The score for the category 'illicit'."), _S.is_finite().annotate(expected="a finite number")), "illicit/violent": _b.check(_S.Number.annotate(description="The score for the category 'illicit/violent'."), _S.is_finite().annotate(expected="a finite number")), "self-harm": _b.check(_S.Number.annotate(description="The score for the category 'self-harm'."), _S.is_finite().annotate(expected="a finite number")), "self-harm/intent": _b.check(_S.Number.annotate(description="The score for the category 'self-harm/intent'."), _S.is_finite().annotate(expected="a finite number")), "self-harm/instructions": _b.check(_S.Number.annotate(description="The score for the category 'self-harm/instructions'."), _S.is_finite().annotate(expected="a finite number")), "sexual": _b.check(_S.Number.annotate(description="The score for the category 'sexual'."), _S.is_finite().annotate(expected="a finite number")), "sexual/minors": _b.check(_S.Number.annotate(description="The score for the category 'sexual/minors'."), _S.is_finite().annotate(expected="a finite number")), "violence": _b.check(_S.Number.annotate(description="The score for the category 'violence'."), _S.is_finite().annotate(expected="a finite number")), "violence/graphic": _b.check(_S.Number.annotate(description="The score for the category 'violence/graphic'."), _S.is_finite().annotate(expected="a finite number"))}).annotate(description="A list of the categories along with their scores as predicted by model."), "category_applied_input_types": _b.struct(_T.CreateModerationResponse__results__item__category_applied_input_types, {"hate": _b.array(_b.literal("text")).annotate(description="The applied input type(s) for the category 'hate'."), "hate/threatening": _b.array(_b.literal("text")).annotate(description="The applied input type(s) for the category 'hate/threatening'."), "harassment": _b.array(_b.literal("text")).annotate(description="The applied input type(s) for the category 'harassment'."), "harassment/threatening": _b.array(_b.literal("text")).annotate(description="The applied input type(s) for the category 'harassment/threatening'."), "illicit": _b.array(_b.literal("text")).annotate(description="The applied input type(s) for the category 'illicit'."), "illicit/violent": _b.array(_b.literal("text")).annotate(description="The applied input type(s) for the category 'illicit/violent'."), "self-harm": _b.array(_b.literals(["text", "image"])).annotate(description="The applied input type(s) for the category 'self-harm'."), "self-harm/intent": _b.array(_b.literals(["text", "image"])).annotate(description="The applied input type(s) for the category 'self-harm/intent'."), "self-harm/instructions": _b.array(_b.literals(["text", "image"])).annotate(description="The applied input type(s) for the category 'self-harm/instructions'."), "sexual": _b.array(_b.literals(["text", "image"])).annotate(description="The applied input type(s) for the category 'sexual'."), "sexual/minors": _b.array(_b.literal("text")).annotate(description="The applied input type(s) for the category 'sexual/minors'."), "violence": _b.array(_b.literals(["text", "image"])).annotate(description="The applied input type(s) for the category 'violence'."), "violence/graphic": _b.array(_b.literals(["text", "image"])).annotate(description="The applied input type(s) for the category 'violence/graphic'.")}).annotate(description="A list of the categories along with the input type(s) that the score applies to.")})).annotate(description="A list of moderation objects.")}).annotate(description="Represents if a given text input is potentially harmful.", identifier="CreateModerationResponse")
|
|
293
|
+
AdminApiKey: _StructSchema[_T.AdminApiKey, _t.Never, _t.Never] = _b.struct(_T.AdminApiKey, {"object": _b.literal("organization.admin_api_key").annotate(description="The object type, which is always `organization.admin_api_key`"), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _b.union(_S.String, _S.Null).annotate(description="The name of the API key"), "redacted_value": _S.String.annotate(description="The redacted value 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(description="The Unix timestamp (in seconds) of when the API key expires", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "last_used_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the API key was last used", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "owner": _b.struct(_T.AdminApiKey__owner, {"type": _S.String.annotate(description="Always `user`"), "object": _S.String.annotate(description="The object type, which is always organization.user"), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _S.String.annotate(description="The name of the user"), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the user was created", format="unixtime"), _S.is_int().annotate(expected="an integer")), "role": _S.String.annotate(description="Always `owner`")}, optional=("type", "object", "id", "name", "created_at", "role",))}, optional=("name", "last_used_at",)).annotate(description="Represents an individual Admin API key in an org.", identifier="AdminApiKey")
|
|
294
|
+
AdminApiKeyCreateResponse: _StructSchema[_T.AdminApiKeyCreateResponse, _t.Never, _t.Never] = _b.struct(_T.AdminApiKeyCreateResponse, {"object": _b.literal("organization.admin_api_key").annotate(description="The object type, which is always `organization.admin_api_key`"), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _b.union(_S.String, _S.Null).annotate(description="The name of the API key"), "redacted_value": _S.String.annotate(description="The redacted value 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(description="The Unix timestamp (in seconds) of when the API key expires", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "last_used_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the API key was last used", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "owner": _b.struct(_T.AdminApiKeyCreateResponse__owner, {"type": _S.String.annotate(description="Always `user`"), "object": _S.String.annotate(description="The object type, which is always organization.user"), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _S.String.annotate(description="The name of the user"), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the user was created", format="unixtime"), _S.is_int().annotate(expected="an integer")), "role": _S.String.annotate(description="Always `owner`")}, optional=("type", "object", "id", "name", "created_at", "role",)), "value": _S.String.annotate(description="The value of the API key. Only shown on create.")}, optional=("name", "last_used_at",)).annotate(identifier="AdminApiKeyCreateResponse")
|
|
295
|
+
AuditLogEventType: _S.Bottom[_T.AuditLogEventType, _t.Any] = _b.literals(["api_key.created", "api_key.updated", "api_key.deleted", "certificate.created", "certificate.updated", "certificate.deleted", "certificates.activated", "certificates.deactivated", "checkpoint.permission.created", "checkpoint.permission.deleted", "external_key.registered", "external_key.removed", "external_storage.registered", "external_storage.removed", "group.created", "group.updated", "group.deleted", "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", "resource.deleted", "tunnel.created", "tunnel.updated", "tunnel.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", "role.created", "role.updated", "role.deleted", "role.assignment.created", "role.assignment.deleted", "role.bound_to_resource", "role.unbound_from_resource", "scim.enabled", "scim.disabled", "service_account.created", "service_account.updated", "service_account.deleted", "user.added", "user.updated", "user.deleted", "tenant.metadata.updated", "tenant.microsoft_entra_mapping.upserted", "tenant.microsoft_entra_mapping.deleted", "tenant.workload_identity.provider.created", "tenant.workload_identity.provider.updated", "tenant.workload_identity.provider.archived", "tenant.workload_identity.mapping.created", "tenant.workload_identity.mapping.updated", "tenant.workload_identity.mapping.archived", "tenant.workload_identity.binding.created", "tenant.workload_identity.principal.provisioned", "tenant.workload_identity.access_token.issued", "tenant.admin_api_key.created", "tenant.admin_api_key.updated", "tenant.admin_api_key.deleted", "tenant.project_api_key.created", "tenant.trusted_access.business_verification.started", "tenant.trusted_access.application.submitted", "tenant.chatgpt_access_token.revoked", "tenant.migration.completed", "tenant.sso.migrated", "tenant.domains.migrated", "tenant.sso_connection.created", "tenant.sso_connection.updated", "tenant.sso_connection.deleted", "tenant.sso_connection.setup.started", "tenant.policy.created", "tenant.policy.updated", "tenant.policy.deleted", "tenant.policy.attached", "tenant.policy.detached", "tenant.principal_authentication_policy.resolved", "tenant.scim.setup.started", "tenant.scim.deletion.requested", "tenant.scim.directory.created", "tenant.product_access_policy.updated", "tenant.resource_share_grant.created", "tenant.resource_share_grant.updated", "tenant.resource_share_grant.accepted", "tenant.resource_share_grant.declined", "tenant.resource_share_grant.revoked", "tenant.resource_share_grant.deleted", "tenant.service_account.updated", "tenant.service_account.deleted", "tenant.service_account.token.revoked", "tenant.billing.overage_limit.updated", "tenant.billing.alerts.updated", "tenant.billing.info.updated", "tenant.usage_limit.workspace.updated", "tenant.usage_limit.group.updated", "tenant.usage_limit.user.updated", "tenant.usage_limit.increase_request.updated", "tenant.usage_limit.increase_request.resolved", "tenant.group.created", "tenant.group.updated", "tenant.group.deleted", "tenant.group.member.added", "tenant.group.member.removed", "tenant.migration_rollout.status.updated", "tenant.migration_rollout.tier.updated", "tenant.role.metadata.updated", "tenant.custom_role.created", "tenant.custom_role.updated", "tenant.custom_role.deleted", "tenant.role_assignment.created", "tenant.role_assignment.deleted", "tenant.resource_role_assignment.created", "tenant.resource_role_assignment.deleted", "tenant.resource_access.updated", "tenant.resource_access.deleted", "tenant.ads_account.onboarding.redemption", "tenant.session_policy.created", "tenant.session_policy.updated", "tenant.session_policy.deleted", "tenant.session_revocation.started", "tenant.third_party_app_policy.updated", "tenant.user.added", "tenant.user.updated", "tenant.user.removed", "tenant.user.looked_up", "tenant.user.invited", "tenant.membership.revoked", "tenant.api_organization_invite.upserted", "tenant.api_organization_invite.deleted", "tenant.chatgpt_workspace_invite.upserted", "tenant.membership.accepted", "tenant.membership.declined", "tenant.workspace_invite_email_settings.updated"]).annotate(description="The event type.", identifier="AuditLogEventType")
|
|
296
|
+
AuditLogActorUser: _StructSchema[_T.AuditLogActorUser, _t.Never, _t.Never] = _b.struct(_T.AuditLogActorUser, {"id": _S.String.annotate(description="The user id."), "email": _S.String.annotate(description="The user email.")}, optional=("id", "email",)).annotate(description="The user who performed the audit logged action.", identifier="AuditLogActorUser")
|
|
297
|
+
AuditLogActorServiceAccount: _StructSchema[_T.AuditLogActorServiceAccount, _t.Never, _t.Never] = _b.struct(_T.AuditLogActorServiceAccount, {"id": _S.String.annotate(description="The service account id.")}, optional=("id",)).annotate(description="The service account that performed the audit logged action.", identifier="AuditLogActorServiceAccount")
|
|
298
|
+
AwsExternalStorageProviderResponse: _StructSchema[_T.AwsExternalStorageProviderResponse, _t.Never, _t.Never] = _b.struct(_T.AwsExternalStorageProviderResponse, {"type": _b.literal("aws"), "account_id": _S.String, "region": _S.String, "bucket": _S.String, "role_arn": _S.String, "external_id": _S.String}).annotate(identifier="AwsExternalStorageProviderResponse")
|
|
299
|
+
AzureExternalStorageProviderResponse: _StructSchema[_T.AzureExternalStorageProviderResponse, _t.Never, _t.Never] = _b.struct(_T.AzureExternalStorageProviderResponse, {"type": _b.literal("azure"), "tenant_id": _S.String, "subscription_id": _S.String, "resource_group": _S.String, "account_name": _S.String, "container": _S.String, "region": _S.String}).annotate(identifier="AzureExternalStorageProviderResponse")
|
|
300
|
+
GcpExternalStorageProviderResponse: _StructSchema[_T.GcpExternalStorageProviderResponse, _t.Never, _t.Never] = _b.struct(_T.GcpExternalStorageProviderResponse, {"type": _b.literal("gcp"), "bucket": _S.String, "workload_identity_project_number": _S.String, "workload_identity_pool_id": _S.String, "workload_identity_provider_id": _S.String, "region": _S.String, "audience": _S.String}).annotate(identifier="GcpExternalStorageProviderResponse")
|
|
301
|
+
OciExternalStorageProviderResponse: _StructSchema[_T.OciExternalStorageProviderResponse, _t.Never, _t.Never] = _b.struct(_T.OciExternalStorageProviderResponse, {"type": _b.literal("oci"), "tenancy_ocid": _S.String, "region": _S.String, "bucket": _S.String}).annotate(identifier="OciExternalStorageProviderResponse")
|
|
302
|
+
OrganizationCertificate: _StructSchema[_T.OrganizationCertificate, _t.Never, _t.Never] = _b.struct(_T.OrganizationCertificate, {"object": _b.literal("organization.certificate").annotate(description="The object type, which is always `organization.certificate`."), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _b.union(_S.String, _S.Null).annotate(description="The name of the certificate."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the certificate was uploaded.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "certificate_details": _b.struct(_T.OrganizationCertificate__certificate_details, {"valid_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the certificate becomes valid.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "expires_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the certificate expires.", format="unixtime"), _S.is_int().annotate(expected="an integer"))}, optional=("valid_at", "expires_at",)), "active": _S.Boolean.annotate(description="Whether the certificate is currently active at the organization level.")}).annotate(description="Represents an individual certificate configured at the organization level.", identifier="OrganizationCertificate")
|
|
303
|
+
UploadCertificateRequest: _StructSchema[_T.UploadCertificateRequest, _t.Never, _t.Never] = _b.struct(_T.UploadCertificateRequest, {"name": _S.String.annotate(description="An optional name for the certificate"), "certificate": _S.String.annotate(description="The certificate content in PEM format")}, optional=("name",)).annotate(identifier="UploadCertificateRequest")
|
|
304
|
+
Certificate: _StructSchema[_T.Certificate, _t.Never, _t.Never] = _b.struct(_T.Certificate, {"object": _b.literals(["certificate", "organization.certificate", "organization.project.certificate"]).annotate(description="The object type.\n\n- If creating, updating, or getting a specific certificate, the object type is `certificate`.\n- If listing, activating, or deactivating certificates for the organization, the object type is `organization.certificate`.\n- If listing, activating, or deactivating certificates for a project, the object type is `organization.project.certificate`.\n"), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _b.union(_S.String, _S.Null).annotate(description="The name of the certificate."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the certificate was uploaded.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "certificate_details": _b.struct(_T.Certificate__certificate_details, {"valid_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the certificate becomes valid.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "expires_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the certificate expires.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "content": _S.String.annotate(description="The content of the certificate in PEM format.")}, optional=("valid_at", "expires_at", "content",)), "active": _S.Boolean.annotate(description="Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate.")}, optional=("active",)).annotate(description="Represents an individual `certificate` uploaded to the organization.", identifier="Certificate")
|
|
305
|
+
ToggleCertificatesRequest: _StructSchema[_T.ToggleCertificatesRequest, _t.Never, _t.Never] = _b.struct(_T.ToggleCertificatesRequest, {"certificate_ids": _b.check(_b.check(_b.array(_S.String), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(10).annotate(expected="a value with a length of at most 10"))}).annotate(identifier="ToggleCertificatesRequest")
|
|
306
|
+
ModifyCertificateRequest: _StructSchema[_T.ModifyCertificateRequest, _t.Never, _t.Never] = _b.struct(_T.ModifyCertificateRequest, {"name": _S.String.annotate(description="The updated name for the certificate")}, optional=("name",)).annotate(identifier="ModifyCertificateRequest")
|
|
307
|
+
DeleteCertificateResponse: _StructSchema[_T.DeleteCertificateResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteCertificateResponse, {"object": _b.literal("certificate.deleted").annotate(description="The object type, must be `certificate.deleted`."), "id": _S.String.annotate(description="The ID of the certificate that was deleted.")}).annotate(identifier="DeleteCertificateResponse")
|
|
308
|
+
UsageCompletionsResult: _StructSchema[_T.UsageCompletionsResult, _t.Never, _t.Never] = _b.struct(_T.UsageCompletionsResult, {"api_source": _b.union(_b.literals(["agents_api", "unlabeled"]), _S.Null).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."), "object": _b.literal("organization.usage.completions.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.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")), "input_cache_write_tokens": _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")), "input_cache_write_12h_tokens": _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")), "input_uncached_tokens": _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")), "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.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")), "output_text_tokens": _b.check(_S.Number.annotate(description="The aggregated number of text output tokens used."), _S.is_int().annotate(expected="an integer")), "input_cached_text_tokens": _b.check(_S.Number.annotate(description="The aggregated number of cached text input tokens used."), _S.is_int().annotate(expected="an integer")), "input_audio_tokens": _b.check(_S.Number.annotate(description="The aggregated number of uncached audio input tokens used."), _S.is_int().annotate(expected="an integer")), "input_cached_audio_tokens": _b.check(_S.Number.annotate(description="The aggregated number of cached audio input tokens used."), _S.is_int().annotate(expected="an integer")), "output_audio_tokens": _b.check(_S.Number.annotate(description="The aggregated number of audio output tokens used."), _S.is_int().annotate(expected="an integer")), "input_image_tokens": _b.check(_S.Number.annotate(description="The aggregated number of uncached image input tokens used."), _S.is_int().annotate(expected="an integer")), "input_cached_image_tokens": _b.check(_S.Number.annotate(description="The aggregated number of cached image input tokens used."), _S.is_int().annotate(expected="an integer")), "output_image_tokens": _b.check(_S.Number.annotate(description="The aggregated number of image output tokens used."), _S.is_int().annotate(expected="an integer")), "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 completions usage details of the specific time bucket.", identifier="UsageCompletionsResult")
|
|
309
|
+
UsageEmbeddingsResult: _StructSchema[_T.UsageEmbeddingsResult, _t.Never, _t.Never] = _b.struct(_T.UsageEmbeddingsResult, {"object": _b.literal("organization.usage.embeddings.result"), "input_tokens": _b.check(_S.Number.annotate(description="The aggregated number of input tokens used."), _S.is_int().annotate(expected="an integer")), "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)}, optional=("project_id", "user_id", "api_key_id", "model",)).annotate(description="The aggregated embeddings usage details of the specific time bucket.", identifier="UsageEmbeddingsResult")
|
|
310
|
+
UsageModerationsResult: _StructSchema[_T.UsageModerationsResult, _t.Never, _t.Never] = _b.struct(_T.UsageModerationsResult, {"object": _b.literal("organization.usage.moderations.result"), "input_tokens": _b.check(_S.Number.annotate(description="The aggregated number of input tokens used."), _S.is_int().annotate(expected="an integer")), "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)}, optional=("project_id", "user_id", "api_key_id", "model",)).annotate(description="The aggregated moderations usage details of the specific time bucket.", identifier="UsageModerationsResult")
|
|
311
|
+
UsageImagesResult: _StructSchema[_T.UsageImagesResult, _t.Never, _t.Never] = _b.struct(_T.UsageImagesResult, {"object": _b.literal("organization.usage.images.result"), "images": _b.check(_S.Number.annotate(description="The number of images processed."), _S.is_int().annotate(expected="an integer")), "num_model_requests": _b.check(_S.Number.annotate(description="The count of requests made to the model."), _S.is_int().annotate(expected="an integer")), "source": _b.union(_S.String.annotate(description="When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`."), _S.Null), "size": _b.union(_S.String.annotate(description="When `group_by=size`, this field provides the image size of the grouped usage result."), _S.Null), "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)}, optional=("source", "size", "project_id", "user_id", "api_key_id", "model",)).annotate(description="The aggregated images usage details of the specific time bucket.", identifier="UsageImagesResult")
|
|
312
|
+
UsageAudioSpeechesResult: _StructSchema[_T.UsageAudioSpeechesResult, _t.Never, _t.Never] = _b.struct(_T.UsageAudioSpeechesResult, {"object": _b.literal("organization.usage.audio_speeches.result"), "characters": _b.check(_S.Number.annotate(description="The number of characters processed."), _S.is_int().annotate(expected="an integer")), "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)}, optional=("project_id", "user_id", "api_key_id", "model",)).annotate(description="The aggregated audio speeches usage details of the specific time bucket.", identifier="UsageAudioSpeechesResult")
|
|
313
|
+
UsageAudioTranscriptionsResult: _StructSchema[_T.UsageAudioTranscriptionsResult, _t.Never, _t.Never] = _b.struct(_T.UsageAudioTranscriptionsResult, {"object": _b.literal("organization.usage.audio_transcriptions.result"), "seconds": _b.check(_S.Number.annotate(description="The number of seconds processed.", format="int64"), _S.is_int().annotate(expected="an integer")), "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)}, optional=("project_id", "user_id", "api_key_id", "model",)).annotate(description="The aggregated audio transcriptions usage details of the specific time bucket.", identifier="UsageAudioTranscriptionsResult")
|
|
314
|
+
UsageVectorStoresResult: _StructSchema[_T.UsageVectorStoresResult, _t.Never, _t.Never] = _b.struct(_T.UsageVectorStoresResult, {"object": _b.literal("organization.usage.vector_stores.result"), "usage_bytes": _b.check(_S.Number.annotate(description="The vector stores usage in bytes."), _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)}, optional=("project_id",)).annotate(description="The aggregated vector stores usage details of the specific time bucket.", identifier="UsageVectorStoresResult")
|
|
315
|
+
UsageCodeInterpreterSessionsResult: _StructSchema[_T.UsageCodeInterpreterSessionsResult, _t.Never, _t.Never] = _b.struct(_T.UsageCodeInterpreterSessionsResult, {"object": _b.literal("organization.usage.code_interpreter_sessions.result"), "num_sessions": _b.check(_S.Number.annotate(description="The number of code interpreter sessions."), _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)}, optional=("project_id",)).annotate(description="The aggregated code interpreter sessions usage details of the specific time bucket.", identifier="UsageCodeInterpreterSessionsResult")
|
|
316
|
+
UsageFileSearchCallsResult: _StructSchema[_T.UsageFileSearchCallsResult, _t.Never, _t.Never] = _b.struct(_T.UsageFileSearchCallsResult, {"object": _b.literal("organization.usage.file_searches.result"), "num_requests": _b.check(_S.Number.annotate(description="The count of file search calls."), _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), "vector_store_id": _b.union(_S.String.annotate(description="When `group_by=vector_store_id`, this field provides the vector store ID of the grouped usage result."), _S.Null)}, optional=("project_id", "user_id", "api_key_id", "vector_store_id",)).annotate(description="The aggregated file search calls usage details of the specific time bucket.", identifier="UsageFileSearchCallsResult")
|
|
317
|
+
UsageWebSearchCallsResult: _StructSchema[_T.UsageWebSearchCallsResult, _t.Never, _t.Never] = _b.struct(_T.UsageWebSearchCallsResult, {"api_source": _b.union(_b.literals(["agents_api", "unlabeled"]), _S.Null).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."), "object": _b.literal("organization.usage.web_searches.result"), "num_model_requests": _b.check(_S.Number.annotate(description="The count of model requests."), _S.is_int().annotate(expected="an integer")), "num_requests": _b.check(_S.Number.annotate(description="The count of web search calls."), _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), "context_level": _b.union(_S.String.annotate(description="When `group_by=context_level`, this field provides the search context size of the grouped usage result."), _S.Null)}, optional=("api_source", "project_id", "user_id", "api_key_id", "model", "context_level",)).annotate(description="The aggregated web search calls usage details of the specific time bucket.", identifier="UsageWebSearchCallsResult")
|
|
318
|
+
CostsResult: _StructSchema[_T.CostsResult, _t.Never, _t.Never] = _b.struct(_T.CostsResult, {"api_source": _b.union(_b.literals(["agents_api", "unlabeled"]), _S.Null).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."), "object": _b.literal("organization.costs.result"), "amount": _b.struct(_T.CostsResult__amount, {"value": _b.check(_S.Number.annotate(description="The numeric value of the cost."), _S.is_finite().annotate(expected="a finite number")), "currency": _S.String.annotate(description="Lowercase ISO-4217 currency e.g. \"usd\"")}, optional=("value", "currency",)).annotate(description="The monetary value in its associated currency."), "line_item": _b.union(_S.String.annotate(description="When `group_by=line_item`, this field provides the line item of the grouped costs result."), _S.Null), "project_id": _b.union(_S.String.annotate(description="When `group_by=project_id`, this field provides the project ID of the grouped costs 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 costs 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 costs result."), _S.Null), "quantity": _b.union(_b.check(_S.Number.annotate(description="When `group_by=line_item`, this field provides the quantity of the grouped costs result."), _S.is_finite().annotate(expected="a finite number")), _S.Null), "quantity_unit": _b.union(_S.String, _b.literals(["tokens", "1000_tokens", "duration_seconds", "duration_minutes", "duration_hours", "gibibyte_hours", "images", "characters"]), _S.Null).annotate(description="The unit of the `quantity` value. If no single supported unit applies to the result, this field is `null`.")}, optional=("api_source", "amount", "line_item", "project_id", "user_id", "api_key_id", "quantity", "quantity_unit",)).annotate(description="The aggregated costs details of the specific time bucket.", identifier="CostsResult")
|
|
319
|
+
OrganizationDataRetention: _StructSchema[_T.OrganizationDataRetention, _t.Never, _t.Never] = _b.struct(_T.OrganizationDataRetention, {"object": _b.literal("organization.data_retention").annotate(description="The object type, which is always `organization.data_retention`."), "type": _b.literals(["zero_data_retention", "modified_abuse_monitoring", "enhanced_zero_data_retention", "enhanced_modified_abuse_monitoring"]).annotate(description="The configured organization data retention type.")}).annotate(description="Represents the organization's data retention control setting.", identifier="OrganizationDataRetention")
|
|
320
|
+
UpdateOrganizationDataRetentionBody: _StructSchema[_T.UpdateOrganizationDataRetentionBody, _t.Never, _t.Never] = _b.struct(_T.UpdateOrganizationDataRetentionBody, {"retention_type": _b.literals(["zero_data_retention", "modified_abuse_monitoring", "enhanced_zero_data_retention", "enhanced_modified_abuse_monitoring"]).annotate(description="The desired organization data retention type.")}).annotate(description="Parameters for updating organization data retention controls.", identifier="UpdateOrganizationDataRetentionBody")
|
|
321
|
+
GroupResponse: _StructSchema[_T.GroupResponse, _t.Never, _t.Never] = _b.struct(_T.GroupResponse, {"id": _S.String.annotate(description="Identifier for the group."), "name": _S.String.annotate(description="Display name of the group."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the group was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "is_scim_managed": _S.Boolean.annotate(description="Whether the group is managed through SCIM and controlled by your identity provider."), "group_type": _b.literals(["group", "tenant_group"]).annotate(description="The type of the group.")}).annotate(description="Details about an organization group.", identifier="GroupResponse")
|
|
322
|
+
CreateGroupBody: _StructSchema[_T.CreateGroupBody, _t.Never, _t.Never] = _b.struct(_T.CreateGroupBody, {"name": _b.check(_b.check(_S.String.annotate(description="Human readable name for the group."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(255).annotate(expected="a string with at most 255 code points"))}).annotate(description="Request payload for creating a new group in the organization.", identifier="CreateGroupBody")
|
|
323
|
+
UpdateGroupBody: _StructSchema[_T.UpdateGroupBody, _t.Never, _t.Never] = _b.struct(_T.UpdateGroupBody, {"name": _b.check(_b.check(_S.String.annotate(description="New display name for the group."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(255).annotate(expected="a string with at most 255 code points"))}).annotate(description="Request payload for updating the details of an existing group.", identifier="UpdateGroupBody")
|
|
324
|
+
GroupResourceWithSuccess: _StructSchema[_T.GroupResourceWithSuccess, _t.Never, _t.Never] = _b.struct(_T.GroupResourceWithSuccess, {"id": _S.String.annotate(description="Identifier for the group."), "name": _S.String.annotate(description="Updated display name for the group."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the group was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "is_scim_managed": _S.Boolean.annotate(description="Whether the group is managed through SCIM and controlled by your identity provider.")}).annotate(description="Response returned after updating a group.", identifier="GroupResourceWithSuccess")
|
|
325
|
+
GroupDeletedResource: _StructSchema[_T.GroupDeletedResource, _t.Never, _t.Never] = _b.struct(_T.GroupDeletedResource, {"object": _b.literal("group.deleted").annotate(description="Always `group.deleted`."), "id": _S.String.annotate(description="Identifier of the deleted group."), "deleted": _S.Boolean.annotate(description="Whether the group was deleted.")}).annotate(description="Confirmation payload returned after deleting a group.", identifier="GroupDeletedResource")
|
|
326
|
+
AssignedRoleDetails: _StructSchema[_T.AssignedRoleDetails, _t.Never, _t.Never] = _b.struct(_T.AssignedRoleDetails, {"id": _S.String.annotate(description="Identifier for the role."), "name": _S.String.annotate(description="Name of the role."), "permissions": _b.array(_S.String).annotate(description="Permissions associated with the role."), "resource_type": _S.String.annotate(description="Resource type the role applies to."), "predefined_role": _S.Boolean.annotate(description="Whether the role is predefined by OpenAI."), "description": _b.union(_S.String, _S.Null).annotate(description="Description of the role."), "created_at": _b.union(_b.check(_S.Number.annotate(format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="When the role was created."), "updated_at": _b.union(_b.check(_S.Number.annotate(format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="When the role was last updated."), "created_by": _b.union(_S.String, _S.Null).annotate(description="Identifier of the actor who created the role."), "created_by_user_obj": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null).annotate(description="User details for the actor that created the role, when available."), "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")), _S.Null).annotate(description="Arbitrary metadata stored on the role."), "assignment_sources": _b.union(_b.array(_b.struct(_T.AssignedRoleDetails__assignment_sources__0__item, {"principal_id": _S.String, "principal_type": _S.String})), _S.Null).annotate(description="Principals from which the role assignment is inherited, when available.")}).annotate(description="Detailed information about a role assignment entry returned when listing assignments.", identifier="AssignedRoleDetails")
|
|
327
|
+
PublicAssignOrganizationGroupRoleBody: _StructSchema[_T.PublicAssignOrganizationGroupRoleBody, _t.Never, _t.Never] = _b.struct(_T.PublicAssignOrganizationGroupRoleBody, {"role_id": _S.String.annotate(description="Identifier of the role to assign.")}).annotate(description="Request payload for assigning a role to a group or user.", identifier="PublicAssignOrganizationGroupRoleBody")
|
|
328
|
+
Group: _StructSchema[_T.Group, _t.Never, _t.Never] = _b.struct(_T.Group, {"object": _b.literal("group").annotate(description="Always `group`."), "id": _S.String.annotate(description="Identifier for the group."), "name": _S.String.annotate(description="Display name of the group."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the group was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "scim_managed": _S.Boolean.annotate(description="Whether the group is managed through SCIM.")}).annotate(description="Summary information about a group returned in role assignment responses.", identifier="Group")
|
|
329
|
+
Role: _StructSchema[_T.Role, _t.Never, _t.Never] = _b.struct(_T.Role, {"object": _b.literal("role").annotate(description="Always `role`."), "id": _S.String.annotate(description="Identifier for the role."), "name": _S.String.annotate(description="Unique name for the role."), "description": _b.union(_S.String, _S.Null).annotate(description="Optional description of the role."), "permissions": _b.array(_S.String).annotate(description="Permissions granted by the role."), "resource_type": _S.String.annotate(description="Resource type the role is bound to (for example `api.organization` or `api.project`)."), "predefined_role": _S.Boolean.annotate(description="Whether the role is predefined and managed by OpenAI.")}).annotate(description="Details about a role that can be assigned through the public Roles API.", identifier="Role")
|
|
330
|
+
DeletedRoleAssignmentResource: _StructSchema[_T.DeletedRoleAssignmentResource, _t.Never, _t.Never] = _b.struct(_T.DeletedRoleAssignmentResource, {"object": _S.String.annotate(description="Identifier for the deleted assignment, such as `group.role.deleted` or `user.role.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the assignment was removed.")}).annotate(description="Confirmation payload returned after unassigning a role.", identifier="DeletedRoleAssignmentResource")
|
|
331
|
+
GroupUser: _StructSchema[_T.GroupUser, _t.Never, _t.Never] = _b.struct(_T.GroupUser, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _S.String.annotate(description="The name of the user."), "email": _b.union(_S.String, _S.Null).annotate(description="The email address of the user.")}).annotate(description="Represents an individual user returned when inspecting group membership.", identifier="GroupUser")
|
|
332
|
+
CreateGroupUserBody: _StructSchema[_T.CreateGroupUserBody, _t.Never, _t.Never] = _b.struct(_T.CreateGroupUserBody, {"user_id": _S.String.annotate(description="Identifier of the user to add to the group.")}).annotate(description="Request payload for adding a user to a group.", identifier="CreateGroupUserBody")
|
|
333
|
+
GroupUserAssignment: _StructSchema[_T.GroupUserAssignment, _t.Never, _t.Never] = _b.struct(_T.GroupUserAssignment, {"object": _b.literal("group.user").annotate(description="Always `group.user`."), "user_id": _S.String.annotate(description="Identifier of the user that was added."), "group_id": _S.String.annotate(description="Identifier of the group the user was added to.")}).annotate(description="Confirmation payload returned after adding a user to a group.", identifier="GroupUserAssignment")
|
|
334
|
+
GroupMemberUser: _StructSchema[_T.GroupMemberUser, _t.Never, _t.Never] = _b.struct(_T.GroupMemberUser, {"id": _S.String.annotate(description="Identifier for the user."), "name": _S.String.annotate(description="Display name of the user."), "email": _b.union(_S.String, _S.Null).annotate(description="Email address of the user, or `null` for users without an email."), "picture": _b.union(_S.String, _S.Null).annotate(description="URL of the user's profile picture, if available."), "is_service_account": _b.union(_S.Boolean, _S.Null).annotate(description="Whether the user is a service account."), "user_type": _b.literals(["user", "tenant_user"]).annotate(description="The type of user.")}).annotate(description="Details about a user returned from an organization group membership lookup.", identifier="GroupMemberUser")
|
|
335
|
+
GroupUserDeletedResource: _StructSchema[_T.GroupUserDeletedResource, _t.Never, _t.Never] = _b.struct(_T.GroupUserDeletedResource, {"object": _b.literal("group.user.deleted").annotate(description="Always `group.user.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the group membership was removed.")}).annotate(description="Confirmation payload returned after removing a user from a group.", identifier="GroupUserDeletedResource")
|
|
336
|
+
Invite: _StructSchema[_T.Invite, _t.Never, _t.Never] = _b.struct(_T.Invite, {"object": _b.literal("organization.invite").annotate(description="The object type, which is always `organization.invite`"), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "email": _S.String.annotate(description="The email address of the individual to whom the invite was sent"), "role": _b.literals(["owner", "reader"]).annotate(description="`owner` or `reader`"), "status": _b.literals(["accepted", "expired", "pending"]).annotate(description="`accepted`,`expired`, or `pending`"), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the invite was sent.", 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) of when the invite expires."), "accepted_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 invite was accepted."), "projects": _b.array(_b.struct(_T.Invite__projects__item, {"id": _S.String.annotate(description="Project's public ID"), "role": _b.literals(["member", "owner"]).annotate(description="Project membership role")})).annotate(description="The projects that were granted membership upon acceptance of the invite.")}, optional=("expires_at", "accepted_at",)).annotate(description="Represents an individual `invite` to the organization.", identifier="Invite")
|
|
337
|
+
InviteRequest: _StructSchema[_T.InviteRequest, _t.Never, _t.Never] = _b.struct(_T.InviteRequest, {"email": _S.String.annotate(description="Send an email to this address"), "role": _b.literals(["reader", "owner"]).annotate(description="`owner` or `reader`"), "projects": _b.array(_b.struct(_T.InviteRequest__projects__item, {"id": _S.String.annotate(description="Project's public ID"), "role": _b.literals(["member", "owner"]).annotate(description="Project membership role")})).annotate(description="An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. If empty list is passed, the user will not be invited to any projects, including the default one.")}, optional=("projects",)).annotate(identifier="InviteRequest")
|
|
338
|
+
InviteDeleteResponse: _StructSchema[_T.InviteDeleteResponse, _t.Never, _t.Never] = _b.struct(_T.InviteDeleteResponse, {"object": _b.literal("organization.invite.deleted").annotate(description="The object type, which is always `organization.invite.deleted`"), "id": _S.String, "deleted": _S.Boolean}).annotate(identifier="InviteDeleteResponse")
|
|
339
|
+
PublicProjectResidency: _S.Bottom[_T.PublicProjectResidency, _t.Any] = _b.literals(["GLOBAL", "US_STORAGE_PROCESSING", "EU_STORAGE_PROCESSING", "JP_STORAGE", "KR_STORAGE", "CA_STORAGE", "SG_STORAGE", "IN_STORAGE", "AU_STORAGE", "GB_STORAGE", "AE_STORAGE", "AE_STORAGE_PROCESSING"]).annotate(identifier="PublicProjectResidency")
|
|
340
|
+
ProjectUpdateRequest: _StructSchema[_T.ProjectUpdateRequest, _t.Never, _t.Never] = _b.struct(_T.ProjectUpdateRequest, {"name": _b.union(_S.String, _S.Null).annotate(description="The updated name of the project, this name appears in reports."), "external_key_id": _b.union(_S.String, _S.Null).annotate(description="External key ID to associate with the project."), "geography": _b.union(_S.String, _S.Null).annotate(description="Geography for the project.\nDeprecated: use `residency` when creating a project to configure data residency. This field is retained for backward compatibility.")}, optional=("name", "external_key_id", "geography",)).annotate(identifier="ProjectUpdateRequest")
|
|
341
|
+
ProjectApiKeyOwnerUser: _StructSchema[_T.ProjectApiKeyOwnerUser, _t.Never, _t.Never] = _b.struct(_T.ProjectApiKeyOwnerUser, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "email": _S.String.annotate(description="The email address of the user."), "name": _S.String.annotate(description="The name of the user."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the user was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "role": _S.String.annotate(description="The user's project role.")}).annotate(description="The user that owns a project API key.", identifier="ProjectApiKeyOwnerUser")
|
|
342
|
+
ProjectApiKeyOwnerServiceAccount: _StructSchema[_T.ProjectApiKeyOwnerServiceAccount, _t.Never, _t.Never] = _b.struct(_T.ProjectApiKeyOwnerServiceAccount, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _S.String.annotate(description="The name of the service account."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the service account was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "role": _S.String.annotate(description="The service account's project role.")}).annotate(description="The service account that owns a project API key.", identifier="ProjectApiKeyOwnerServiceAccount")
|
|
343
|
+
ProjectApiKeyDeleteResponse: _StructSchema[_T.ProjectApiKeyDeleteResponse, _t.Never, _t.Never] = _b.struct(_T.ProjectApiKeyDeleteResponse, {"object": _b.literal("organization.project.api_key.deleted"), "id": _S.String, "deleted": _S.Boolean}).annotate(identifier="ProjectApiKeyDeleteResponse")
|
|
344
|
+
OrganizationProjectCertificate: _StructSchema[_T.OrganizationProjectCertificate, _t.Never, _t.Never] = _b.struct(_T.OrganizationProjectCertificate, {"object": _b.literal("organization.project.certificate").annotate(description="The object type, which is always `organization.project.certificate`."), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _b.union(_S.String, _S.Null).annotate(description="The name of the certificate."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the certificate was uploaded.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "certificate_details": _b.struct(_T.OrganizationProjectCertificate__certificate_details, {"valid_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the certificate becomes valid.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "expires_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the certificate expires.", format="unixtime"), _S.is_int().annotate(expected="an integer"))}, optional=("valid_at", "expires_at",)), "active": _S.Boolean.annotate(description="Whether the certificate is currently active at the project level.")}).annotate(description="Represents an individual certificate configured at the project level.", identifier="OrganizationProjectCertificate")
|
|
345
|
+
ProjectDataRetention: _StructSchema[_T.ProjectDataRetention, _t.Never, _t.Never] = _b.struct(_T.ProjectDataRetention, {"object": _b.literal("project.data_retention").annotate(description="The object type, which is always `project.data_retention`."), "type": _b.literals(["organization_default", "none", "zero_data_retention", "modified_abuse_monitoring", "enhanced_zero_data_retention", "enhanced_modified_abuse_monitoring"]).annotate(description="The configured project data retention type.")}).annotate(description="Represents a project's data retention control setting.", identifier="ProjectDataRetention")
|
|
346
|
+
UpdateProjectDataRetentionBody: _StructSchema[_T.UpdateProjectDataRetentionBody, _t.Never, _t.Never] = _b.struct(_T.UpdateProjectDataRetentionBody, {"retention_type": _b.literals(["organization_default", "none", "zero_data_retention", "modified_abuse_monitoring", "enhanced_zero_data_retention", "enhanced_modified_abuse_monitoring"]).annotate(description="The desired project data retention type.")}).annotate(description="Parameters for updating project data retention controls.", identifier="UpdateProjectDataRetentionBody")
|
|
347
|
+
ProjectGroup: _StructSchema[_T.ProjectGroup, _t.Never, _t.Never] = _b.struct(_T.ProjectGroup, {"object": _b.literal("project.group").annotate(description="Always `project.group`."), "project_id": _S.String.annotate(description="Identifier of the project."), "group_id": _S.String.annotate(description="Identifier of the group that has access to the project."), "group_name": _S.String.annotate(description="Display name of the group."), "group_type": _b.literals(["group", "tenant_group"]).annotate(description="The type of the group."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the group was granted project access.", format="unixtime"), _S.is_int().annotate(expected="an integer"))}).annotate(description="Details about a group's membership in a project.", identifier="ProjectGroup")
|
|
348
|
+
InviteProjectGroupBody: _StructSchema[_T.InviteProjectGroupBody, _t.Never, _t.Never] = _b.struct(_T.InviteProjectGroupBody, {"group_id": _S.String.annotate(description="Identifier of the group to add to the project."), "role": _S.String.annotate(description="Identifier of the project role to grant to the group.")}).annotate(description="Request payload for granting a group access to a project.", identifier="InviteProjectGroupBody")
|
|
349
|
+
ProjectGroupDeletedResource: _StructSchema[_T.ProjectGroupDeletedResource, _t.Never, _t.Never] = _b.struct(_T.ProjectGroupDeletedResource, {"object": _b.literal("project.group.deleted").annotate(description="Always `project.group.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the group membership in the project was removed.")}).annotate(description="Confirmation payload returned after removing a group from a project.", identifier="ProjectGroupDeletedResource")
|
|
350
|
+
HostedToolPermission: _StructSchema[_T.HostedToolPermission, _t.Never, _t.Never] = _b.struct(_T.HostedToolPermission, {"enabled": _S.Boolean.annotate(description="Whether the hosted tool is enabled for the project.")}).annotate(description="Permission state for a single hosted tool on a project.", identifier="HostedToolPermission")
|
|
351
|
+
HostedToolPermissionUpdate: _StructSchema[_T.HostedToolPermissionUpdate, _t.Never, _t.Never] = _b.struct(_T.HostedToolPermissionUpdate, {"enabled": _S.Boolean.annotate(description="Whether to enable the hosted tool for the project.")}).annotate(identifier="HostedToolPermissionUpdate")
|
|
352
|
+
ProjectModelPermissions: _StructSchema[_T.ProjectModelPermissions, _t.Never, _t.Never] = _b.struct(_T.ProjectModelPermissions, {"object": _b.literal("project.model_permissions").annotate(description="The object type, which is always `project.model_permissions`."), "mode": _b.literals(["allow_list", "deny_list"]).annotate(description="Whether the project uses an allowlist or a denylist."), "model_ids": _b.array(_S.String).annotate(description="The model IDs included in the model permissions policy.")}).annotate(description="Represents the model allowlist or denylist policy for a project.", identifier="ProjectModelPermissions")
|
|
353
|
+
ProjectModelPermissionsUpdateRequest: _StructSchema[_T.ProjectModelPermissionsUpdateRequest, _t.Never, _t.Never] = _b.struct(_T.ProjectModelPermissionsUpdateRequest, {"mode": _b.literals(["allow_list", "deny_list"]).annotate(description="The model permissions mode to apply."), "model_ids": _b.array(_S.String).annotate(description="The model IDs included in this permissions policy.")}).annotate(identifier="ProjectModelPermissionsUpdateRequest")
|
|
354
|
+
ProjectModelPermissionsDeleteResponse: _StructSchema[_T.ProjectModelPermissionsDeleteResponse, _t.Never, _t.Never] = _b.struct(_T.ProjectModelPermissionsDeleteResponse, {"object": _b.literal("project.model_permissions.deleted").annotate(description="The object type, which is always `project.model_permissions.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the project model permissions were deleted.")}).annotate(description="Confirmation payload returned after deleting project model permissions.", identifier="ProjectModelPermissionsDeleteResponse")
|
|
355
|
+
ProjectRateLimit: _StructSchema[_T.ProjectRateLimit, _t.Never, _t.Never] = _b.struct(_T.ProjectRateLimit, {"object": _b.literal("project.rate_limit").annotate(description="The object type, which is always `project.rate_limit`"), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints."), "model": _S.String.annotate(description="The model this rate limit applies to."), "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 present for relevant 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 present for relevant 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 present for relevant 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 present for relevant models."), _S.is_int().annotate(expected="an integer"))}, optional=("max_images_per_1_minute", "max_audio_megabytes_per_1_minute", "max_requests_per_1_day", "batch_1_day_max_input_tokens",)).annotate(description="Represents a project rate limit config.", identifier="ProjectRateLimit")
|
|
356
|
+
ProjectRateLimitUpdateRequest: _StructSchema[_T.ProjectRateLimitUpdateRequest, _t.Never, _t.Never] = _b.struct(_T.ProjectRateLimitUpdateRequest, {"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(identifier="ProjectRateLimitUpdateRequest")
|
|
357
|
+
ProjectServiceAccount: _StructSchema[_T.ProjectServiceAccount, _t.Never, _t.Never] = _b.struct(_T.ProjectServiceAccount, {"object": _b.literal("organization.project.service_account").annotate(description="The object type, which is always `organization.project.service_account`"), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _S.String.annotate(description="The name of the service account"), "role": _b.literals(["owner", "member", "none"]).annotate(description="`owner`, `member`, or `none`"), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the service account was created", format="unixtime"), _S.is_int().annotate(expected="an integer"))}).annotate(description="Represents an individual service account in a project.", identifier="ProjectServiceAccount")
|
|
358
|
+
ProjectServiceAccountCreateRequest: _StructSchema[_T.ProjectServiceAccountCreateRequest, _t.Never, _t.Never] = _b.struct(_T.ProjectServiceAccountCreateRequest, {"name": _S.String.annotate(description="The name of the service account being created."), "create_service_account_only": _b.union(_S.Boolean.annotate(description="Create the service account without default roles or an API key."), _S.Null), "expires_in_seconds": _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(31536000).annotate(expected="a value less than or equal to 31536000")), _S.Null).annotate(description="Number of seconds until the initial API key expires. If omitted or null, the key does not expire unless the effective organization or project policy requires an expiration. When a policy sets a maximum lifetime, this value must be provided and must not exceed that limit. A non-null value cannot be used when `create_service_account_only` is true.")}, optional=("create_service_account_only", "expires_in_seconds",)).annotate(identifier="ProjectServiceAccountCreateRequest")
|
|
359
|
+
ProjectServiceAccountApiKey: _StructSchema[_T.ProjectServiceAccountApiKey, _t.Never, _t.Never] = _b.struct(_T.ProjectServiceAccountApiKey, {"object": _b.literal("organization.project.service_account.api_key").annotate(description="The object type, which is always `organization.project.service_account.api_key`"), "value": _S.String, "name": _S.String, "created_at": _b.check(_S.Number.annotate(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."), "id": _S.String}, optional=("expires_at",)).annotate(identifier="ProjectServiceAccountApiKey")
|
|
360
|
+
UpdateProjectServiceAccountBody: _StructSchema[_T.UpdateProjectServiceAccountBody, _t.Never, _t.Never] = _b.struct(_T.UpdateProjectServiceAccountBody, {"name": _S.String.annotate(description="The updated service account name."), "role": _b.literals(["member", "owner"]).annotate(description="The updated service account role.")}, optional=("name", "role",)).annotate(description="Parameters for updating a project service account.", identifier="UpdateProjectServiceAccountBody")
|
|
361
|
+
ProjectServiceAccountDeleteResponse: _StructSchema[_T.ProjectServiceAccountDeleteResponse, _t.Never, _t.Never] = _b.struct(_T.ProjectServiceAccountDeleteResponse, {"object": _b.literal("organization.project.service_account.deleted"), "id": _S.String, "deleted": _S.Boolean}).annotate(identifier="ProjectServiceAccountDeleteResponse")
|
|
362
|
+
SpendAlertNotificationChannel: _StructSchema[_T.SpendAlertNotificationChannel, _t.Never, _t.Never] = _b.struct(_T.SpendAlertNotificationChannel, {"type": _b.literal("email").annotate(description="The notification channel type. Currently only `email` is supported."), "recipients": _b.array(_S.String).annotate(description="Email addresses that receive the spend alert notification."), "subject_prefix": _b.union(_S.String, _S.Null).annotate(description="Optional subject prefix for alert emails.")}, optional=("subject_prefix",)).annotate(description="Email notification settings for a spend alert.", identifier="SpendAlertNotificationChannel")
|
|
363
|
+
ProjectSpendAlertDeletedResource: _StructSchema[_T.ProjectSpendAlertDeletedResource, _t.Never, _t.Never] = _b.struct(_T.ProjectSpendAlertDeletedResource, {"id": _S.String.annotate(description="The deleted spend alert ID."), "object": _b.literal("project.spend_alert.deleted").annotate(description="Always `project.spend_alert.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the spend alert was deleted.")}).annotate(description="Confirmation payload returned after deleting a project spend alert.", identifier="ProjectSpendAlertDeletedResource")
|
|
364
|
+
ProjectUser: _StructSchema[_T.ProjectUser, _t.Never, _t.Never] = _b.struct(_T.ProjectUser, {"object": _b.literal("organization.project.user").annotate(description="The object type, which is always `organization.project.user`"), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _b.union(_S.String, _S.Null).annotate(description="The name of the user"), "email": _b.union(_S.String, _S.Null).annotate(description="The email address of the user"), "role": _S.String.annotate(description="`owner` or `member`"), "added_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the project was added.", format="unixtime"), _S.is_int().annotate(expected="an integer"))}, optional=("name", "email",)).annotate(description="Represents an individual user in a project.", identifier="ProjectUser")
|
|
365
|
+
ProjectUserCreateRequest: _StructSchema[_T.ProjectUserCreateRequest, _t.Never, _t.Never] = _b.struct(_T.ProjectUserCreateRequest, {"user_id": _b.union(_S.String, _S.Null).annotate(description="The ID of the user."), "email": _b.union(_S.String, _S.Null).annotate(description="Email of the user to add."), "role": _S.String.annotate(description="`owner` or `member`")}, optional=("user_id", "email",)).annotate(identifier="ProjectUserCreateRequest")
|
|
366
|
+
ProjectUserUpdateRequest: _StructSchema[_T.ProjectUserUpdateRequest, _t.Never, _t.Never] = _b.struct(_T.ProjectUserUpdateRequest, {"role": _b.union(_S.String, _S.Null).annotate(description="`owner` or `member`")}, optional=("role",)).annotate(identifier="ProjectUserUpdateRequest")
|
|
367
|
+
ProjectUserDeleteResponse: _StructSchema[_T.ProjectUserDeleteResponse, _t.Never, _t.Never] = _b.struct(_T.ProjectUserDeleteResponse, {"object": _b.literal("organization.project.user.deleted"), "id": _S.String, "deleted": _S.Boolean}).annotate(identifier="ProjectUserDeleteResponse")
|
|
368
|
+
PublicCreateOrganizationRoleBody: _StructSchema[_T.PublicCreateOrganizationRoleBody, _t.Never, _t.Never] = _b.struct(_T.PublicCreateOrganizationRoleBody, {"role_name": _S.String.annotate(description="Unique name for the role."), "permissions": _b.array(_S.String).annotate(description="Permissions to grant to the role."), "description": _b.union(_S.String, _S.Null).annotate(description="Optional description of the role.")}, optional=("description",)).annotate(description="Request payload for creating a custom role.", identifier="PublicCreateOrganizationRoleBody")
|
|
369
|
+
PublicUpdateOrganizationRoleBody: _StructSchema[_T.PublicUpdateOrganizationRoleBody, _t.Never, _t.Never] = _b.struct(_T.PublicUpdateOrganizationRoleBody, {"permissions": _b.union(_b.array(_S.String), _S.Null).annotate(description="Updated set of permissions for the role."), "description": _b.union(_S.String, _S.Null).annotate(description="New description for the role."), "role_name": _b.union(_S.String, _S.Null).annotate(description="New name for the role.")}, optional=("permissions", "description", "role_name",)).annotate(description="Request payload for updating an existing role.", identifier="PublicUpdateOrganizationRoleBody")
|
|
370
|
+
RoleDeletedResource: _StructSchema[_T.RoleDeletedResource, _t.Never, _t.Never] = _b.struct(_T.RoleDeletedResource, {"object": _b.literal("role.deleted").annotate(description="Always `role.deleted`."), "id": _S.String.annotate(description="Identifier of the deleted role."), "deleted": _S.Boolean.annotate(description="Whether the role was deleted.")}).annotate(description="Confirmation payload returned after deleting a role.", identifier="RoleDeletedResource")
|
|
371
|
+
OrganizationSpendAlertDeletedResource: _StructSchema[_T.OrganizationSpendAlertDeletedResource, _t.Never, _t.Never] = _b.struct(_T.OrganizationSpendAlertDeletedResource, {"id": _S.String.annotate(description="The deleted spend alert ID."), "object": _b.literal("organization.spend_alert.deleted").annotate(description="Always `organization.spend_alert.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the spend alert was deleted.")}).annotate(description="Confirmation payload returned after deleting an organization spend alert.", identifier="OrganizationSpendAlertDeletedResource")
|
|
372
|
+
User: _StructSchema[_T.User, _t.Never, _t.Never] = _b.struct(_T.User, {"object": _b.literal("organization.user").annotate(description="The object type, which is always `organization.user`"), "id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints"), "name": _b.union(_S.String, _S.Null).annotate(description="The name of the user"), "email": _b.union(_S.String, _S.Null).annotate(description="The email address of the user"), "role": _b.union(_S.String, _S.Null).annotate(description="`owner` or `reader`"), "added_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the user was added.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "is_default": _S.Boolean.annotate(description="Whether this is the organization's default user."), "created": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the user was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "user": _b.struct(_T.User__user, {"object": _b.literal("user"), "id": _S.String, "email": _b.union(_S.String, _S.Null), "name": _b.union(_S.String, _S.Null), "picture": _b.union(_S.String, _S.Null), "enabled": _b.union(_S.Boolean, _S.Null), "banned": _b.union(_S.Boolean, _S.Null), "banned_at": _b.union(_b.check(_S.Number.annotate(format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("email", "name", "picture", "enabled", "banned", "banned_at",)).annotate(description="Nested user details."), "is_service_account": _S.Boolean.annotate(description="Whether the user is a service account."), "is_scale_tier_authorized_purchaser": _b.union(_S.Boolean, _S.Null).annotate(description="Whether the user is an authorized purchaser for Scale Tier."), "is_scim_managed": _S.Boolean.annotate(description="Whether the user is managed through SCIM."), "api_key_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 the user's last API key usage."), "technical_level": _b.union(_S.String, _S.Null).annotate(description="The technical level metadata for the user."), "developer_persona": _b.union(_S.String, _S.Null).annotate(description="The developer persona metadata for the user."), "projects": _b.union(_b.struct(_T.User__projects__0, {"object": _b.literal("list"), "data": _b.array(_b.struct(_T.User__projects__0__data__item, {"id": _b.union(_S.String, _S.Null), "name": _b.union(_S.String, _S.Null), "role": _b.union(_S.String, _S.Null)}, optional=("id", "name", "role",)))}), _S.Null).annotate(description="Projects associated with the user, if included.")}, optional=("name", "email", "role", "is_default", "created", "user", "is_service_account", "is_scale_tier_authorized_purchaser", "is_scim_managed", "api_key_last_used_at", "technical_level", "developer_persona", "projects",)).annotate(description="Represents an individual `user` within an organization.", identifier="User")
|
|
373
|
+
UserRoleUpdateRequest: _StructSchema[_T.UserRoleUpdateRequest, _t.Never, _t.Never] = _b.struct(_T.UserRoleUpdateRequest, {"role": _b.union(_S.String, _S.Null).annotate(description="`owner` or `reader`"), "role_id": _b.union(_S.String, _S.Null).annotate(description="Role ID to assign to the user."), "technical_level": _b.union(_S.String, _S.Null).annotate(description="Technical level metadata."), "developer_persona": _b.union(_S.String, _S.Null).annotate(description="Developer persona metadata.")}, optional=("role", "role_id", "technical_level", "developer_persona",)).annotate(identifier="UserRoleUpdateRequest")
|
|
374
|
+
UserDeleteResponse: _StructSchema[_T.UserDeleteResponse, _t.Never, _t.Never] = _b.struct(_T.UserDeleteResponse, {"object": _b.literal("organization.user.deleted"), "id": _S.String, "deleted": _S.Boolean}).annotate(identifier="UserDeleteResponse")
|
|
375
|
+
RealtimeAudioFormats: _S.Bottom[_T.RealtimeAudioFormats, _t.Any] = _b.union(_b.struct(_T.RealtimeAudioFormats__0, {"type": _b.literal("audio/pcm").annotate(description="The audio format. Always `audio/pcm`."), "rate": _b.literal(24000).annotate(description="The sample rate of the audio. Always `24000`.")}, optional=("type", "rate",)).annotate(title="PCM audio format", description="The PCM audio format. Only a 24kHz sample rate is supported."), _b.struct(_T.RealtimeAudioFormats__1, {"type": _b.literal("audio/pcmu").annotate(description="The audio format. Always `audio/pcmu`.")}, optional=("type",)).annotate(title="PCMU audio format", description="The G.711 μ-law format."), _b.struct(_T.RealtimeAudioFormats__2, {"type": _b.literal("audio/pcma").annotate(description="The audio format. Always `audio/pcma`.")}, optional=("type",)).annotate(title="PCMA audio format", description="The G.711 A-law format.")).annotate(identifier="RealtimeAudioFormats")
|
|
376
|
+
AudioTranscription: _StructSchema[_T.AudioTranscription, _t.Never, _t.Never] = _b.struct(_T.AudioTranscription, {"model": _b.union(_S.String, _b.literals(["whisper-1", "gpt-transcribe", "gpt-live-transcribe", "gpt-4o-mini-transcribe", "gpt-4o-mini-transcribe-2025-12-15", "gpt-4o-transcribe", "gpt-4o-transcribe-diarize", "gpt-realtime-whisper"])).annotate(description="The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.\n"), "language": _S.String.annotate(description="The language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.\n"), "languages": _b.check(_b.array(_S.String).annotate(description="Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.\n"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "keywords": _b.array(_S.String).annotate(description="Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.\n"), "prompt": _S.String.annotate(description="An optional text to guide the model's style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example \"expect words related to technology\".\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n"), "delay": _b.literals(["minimal", "low", "medium", "high", "xhigh"]).annotate(description="Controls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.\n")}, optional=("model", "language", "languages", "keywords", "prompt", "delay",)).annotate(identifier="AudioTranscription")
|
|
377
|
+
NoiseReductionType: _S.Bottom[_T.NoiseReductionType, _t.Any] = _b.literals(["near_field", "far_field"]).annotate(description="Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.\n", identifier="NoiseReductionType")
|
|
378
|
+
RealtimeTurnDetection: _S.Bottom[_T.RealtimeTurnDetection, _t.Any] = _b.union(_b.union(_b.struct(_T.RealtimeTurnDetection__0__0, {"type": _b.literal("server_vad").annotate(description="Type of turn detection, `server_vad` to turn on simple Server VAD.\n"), "threshold": _b.check(_S.Number.annotate(description="Used only for `server_vad` mode. 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="Used only for `server_vad` mode. 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="Used only for `server_vad` mode. 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")), "create_response": _S.Boolean.annotate(description="Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.\n\nIf both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.\n"), "interrupt_response": _S.Boolean.annotate(description="Whether or not to automatically interrupt (cancel) any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.\n\nIf both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.\n"), "idle_timeout_ms": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="Optional timeout after which a model response will be triggered automatically. This is\nuseful for situations in which a long pause from the user is unexpected, such as a phone\ncall. The model will effectively prompt the user to continue the conversation based\non the current context.\n\nThe timeout value will be applied after the last model response's audio has finished playing,\ni.e. it's set to the `response.done` time plus audio playback duration.\n\nAn `input_audio_buffer.timeout_triggered` event (plus events\nassociated with the Response) will be emitted when the timeout is reached.\nIdle timeout is currently only supported for `server_vad` mode.\n"), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(5000).annotate(expected="a value greater than or equal to 5000")), _S.is_less_than_or_equal_to(30000).annotate(expected="a value less than or equal to 30000")), _S.Null)}, optional=("threshold", "prefix_padding_ms", "silence_duration_ms", "create_response", "interrupt_response", "idle_timeout_ms",)).annotate(title="Server VAD", description="Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence."), _b.struct(_T.RealtimeTurnDetection__0__1, {"type": _b.literal("semantic_vad").annotate(description="Type of turn detection, `semantic_vad` to turn on Semantic VAD.\n"), "eagerness": _b.literals(["low", "medium", "high", "auto"]).annotate(description="Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.\n"), "create_response": _S.Boolean.annotate(description="Whether or not to automatically generate a response when a VAD stop event occurs.\n"), "interrupt_response": _S.Boolean.annotate(description="Whether or not to automatically interrupt any ongoing response with output to the default\nconversation (i.e. `conversation` of `auto`) when a VAD start event occurs.\n")}, optional=("eagerness", "create_response", "interrupt_response",)).annotate(title="Semantic VAD", description="Server-side semantic turn detection which uses a model to determine when the user has finished speaking."), mode="one_of").annotate(title="Realtime Turn Detection", description="Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.\n\nServer 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\nSemantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with \"uhhm\", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.\n\nFor `gpt-realtime-whisper` transcription sessions, turn detection must be\nset to `null`; VAD is not supported.\n"), _S.Null).annotate(identifier="RealtimeTurnDetection")
|
|
379
|
+
RealtimeFunctionTool: _StructSchema[_T.RealtimeFunctionTool, _t.Never, _t.Never] = _b.struct(_T.RealtimeFunctionTool, {"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(title="Function tool", identifier="RealtimeFunctionTool")
|
|
380
|
+
ToolChoiceOptions: _S.Bottom[_T.ToolChoiceOptions, _t.Any] = _b.literals(["none", "auto", "required"]).annotate(title="Tool choice mode", description="Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n", identifier="ToolChoiceOptions")
|
|
381
|
+
ToolChoiceFunction: _StructSchema[_T.ToolChoiceFunction, _t.Never, _t.Never] = _b.struct(_T.ToolChoiceFunction, {"type": _b.literal("function").annotate(description="For function calling, the type is always `function`."), "name": _S.String.annotate(description="The name of the function to call.")}).annotate(title="Function tool", description="Use this option to force the model to call a specific function.\n", identifier="ToolChoiceFunction")
|
|
382
|
+
ToolChoiceMCP: _StructSchema[_T.ToolChoiceMCP, _t.Never, _t.Never] = _b.struct(_T.ToolChoiceMCP, {"type": _b.literal("mcp").annotate(description="For MCP tools, the type is always `mcp`."), "server_label": _S.String.annotate(description="The label of the MCP server to use.\n"), "name": _b.union(_S.String.annotate(description="The name of the tool to call on the server.\n"), _S.Null)}, optional=("name",)).annotate(title="MCP tool", description="Use this option to force the model to call a specific tool on a remote MCP server.\n", identifier="ToolChoiceMCP")
|
|
383
|
+
RealtimeReasoningEffort: _S.Bottom[_T.RealtimeReasoningEffort, _t.Any] = _b.literals(["minimal", "low", "medium", "high", "xhigh"]).annotate(description="Constrains effort on reasoning for reasoning-capable Realtime models such as\n`gpt-realtime-2`.\n", identifier="RealtimeReasoningEffort")
|
|
384
|
+
RealtimeTruncation: _S.Bottom[_T.RealtimeTruncation, _t.Any] = _b.union(_b.literals(["auto", "disabled"]).annotate(description="The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit."), _b.struct(_T.RealtimeTruncation__1, {"type": _b.literal("retention_ratio").annotate(description="Use retention ratio truncation."), "retention_ratio": _b.check(_b.check(_b.check(_S.Number.annotate(description="Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.\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")), "token_limits": _b.struct(_T.RealtimeTruncation__1__token_limits, {"post_instructions": _b.check(_b.check(_S.Number.annotate(description="Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens."), _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"))}, optional=("post_instructions",)).annotate(description="Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.")}, optional=("token_limits",)).annotate(title="Retention ratio truncation", description="Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage."), mode="one_of").annotate(title="Realtime Truncation Controls", description="When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.\n\nClients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.\n\nTruncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.\n\nTruncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.\n", identifier="RealtimeTruncation")
|
|
385
|
+
RealtimeCallReferRequest: _StructSchema[_T.RealtimeCallReferRequest, _t.Never, _t.Never] = _b.struct(_T.RealtimeCallReferRequest, {"target_uri": _S.String.annotate(description="URI that should appear in the SIP Refer-To header. Supports values like\n`tel:+14155550123` or `sip:agent@example.com`.")}).annotate(title="Realtime call refer request", description="Parameters required to transfer a SIP call to a new destination using the\nRealtime API.", identifier="RealtimeCallReferRequest")
|
|
386
|
+
RealtimeCallRejectRequest: _StructSchema[_T.RealtimeCallRejectRequest, _t.Never, _t.Never] = _b.struct(_T.RealtimeCallRejectRequest, {"status_code": _b.check(_S.Number.annotate(description="SIP response code to send back to the caller. Defaults to `603` (Decline)\nwhen omitted."), _S.is_int().annotate(expected="an integer"))}, optional=("status_code",)).annotate(title="Realtime call reject request", description="Parameters used to decline an incoming SIP call handled by the Realtime API.", identifier="RealtimeCallRejectRequest")
|
|
387
|
+
AudioTranscriptionResponse: _StructSchema[_T.AudioTranscriptionResponse, _t.Never, _t.Never] = _b.struct(_T.AudioTranscriptionResponse, {"model": _b.union(_S.String, _b.literals(["whisper-1", "gpt-transcribe", "gpt-live-transcribe", "gpt-4o-mini-transcribe", "gpt-4o-mini-transcribe-2025-12-15", "gpt-4o-transcribe", "gpt-4o-transcribe-diarize", "gpt-realtime-whisper"])).annotate(description="The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.\n"), "language": _b.union(_S.String, _S.Null).annotate(description="The language of the input audio.\n"), "languages": _b.check(_b.array(_S.String).annotate(description="The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "prompt": _S.String.annotate(description="The prompt configured for input audio transcription, when present.\n")}, optional=("model", "language", "languages", "prompt",)).annotate(identifier="AudioTranscriptionResponse")
|
|
388
|
+
ToolChoiceAllowed: _StructSchema[_T.ToolChoiceAllowed, _t.Never, _t.Never] = _b.struct(_T.ToolChoiceAllowed, {"type": _b.literal("allowed_tools").annotate(description="Allowed tool configuration type. Always `allowed_tools`."), "mode": _b.literals(["auto", "required"]).annotate(description="Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"), "tools": _b.array(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A tool definition that the model should be allowed to call.\n")).annotate(description="A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n { \"type\": \"function\", \"name\": \"get_weather\" },\n { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n { \"type\": \"image_generation\" }\n]\n```\n")}).annotate(title="Allowed tools", description="Constrains the tools available to the model to a pre-defined set.\n", identifier="ToolChoiceAllowed")
|
|
389
|
+
ToolChoiceTypes: _StructSchema[_T.ToolChoiceTypes, _t.Never, _t.Never] = _b.struct(_T.ToolChoiceTypes, {"type": _b.literals(["file_search", "web_search_preview", "computer", "computer_use_preview", "computer_use", "web_search_preview_2025_03_11", "image_generation", "code_interpreter"]).annotate(description="The type of hosted tool the model should to use. Learn more about\n[built-in tools](https://developers.openai.com/api/docs/guides/tools).\n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer`\n- `computer_use_preview`\n- `computer_use`\n- `code_interpreter`\n- `image_generation`\n")}).annotate(title="Hosted tool", description="Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools).\n", identifier="ToolChoiceTypes")
|
|
390
|
+
ToolChoiceCustom: _StructSchema[_T.ToolChoiceCustom, _t.Never, _t.Never] = _b.struct(_T.ToolChoiceCustom, {"type": _b.literal("custom").annotate(description="For custom tool calling, the type is always `custom`."), "name": _S.String.annotate(description="The name of the custom tool to call.")}).annotate(title="Custom tool", description="Use this option to force the model to call a specific custom tool.\n", identifier="ToolChoiceCustom")
|
|
391
|
+
SpecificProgrammaticToolCallingParam: _StructSchema[_T.SpecificProgrammaticToolCallingParam, _t.Never, _t.Never] = _b.struct(_T.SpecificProgrammaticToolCallingParam, {"type": _b.literal("programmatic_tool_calling").annotate(description="The tool to call. Always `programmatic_tool_calling`.")}).annotate(identifier="SpecificProgrammaticToolCallingParam")
|
|
392
|
+
SpecificApplyPatchParam: _StructSchema[_T.SpecificApplyPatchParam, _t.Never, _t.Never] = _b.struct(_T.SpecificApplyPatchParam, {"type": _b.literal("apply_patch").annotate(description="The tool to call. Always `apply_patch`.")}).annotate(title="Specific apply patch tool choice", description="Forces the model to call the apply_patch tool when executing a tool call.", identifier="SpecificApplyPatchParam")
|
|
393
|
+
SpecificFunctionShellParam: _StructSchema[_T.SpecificFunctionShellParam, _t.Never, _t.Never] = _b.struct(_T.SpecificFunctionShellParam, {"type": _b.literal("shell").annotate(description="The tool to call. Always `shell`.")}).annotate(title="Specific shell tool choice", description="Forces the model to call the shell tool when a tool call is required.", identifier="SpecificFunctionShellParam")
|
|
394
|
+
CyberAccessProgramEnum: _S.Bottom[_T.CyberAccessProgramEnum, _t.Any] = _b.literals(["standard", "daybreak_blue", "daybreak_red"]).annotate(identifier="CyberAccessProgramEnum")
|
|
395
|
+
ServiceTierResponses: _S.Bottom[_T.ServiceTierResponses, _t.Any] = _b.union(_b.literals(["auto", "default", "flex", "scale", "priority", "fast", "ultrafast"]).annotate(description="Specifies the processing type used for serving the request.\n - 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'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - 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.\n - 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. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request.\n - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show `service_tier=ultrafast`.\n - When not set, the default behavior is 'auto'.\n\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.\n"), _S.Null).annotate(identifier="ServiceTierResponses")
|
|
396
|
+
ReasoningModeEnum: _S.Bottom[_T.ReasoningModeEnum, _t.Any] = _b.union(_S.String, _b.literals(["standard", "pro"])).annotate(identifier="ReasoningModeEnum")
|
|
397
|
+
ResponseStreamOptions: _S.Bottom[_T.ResponseStreamOptions, _t.Any] = _b.union(_b.struct(_T.ResponseStreamOptions__0, {"include_obfuscation": _S.Boolean.annotate(description="When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events to\nnormalize payload sizes as a mitigation to certain side-channel attacks.\nThese obfuscation fields are included by default, but add a small amount\nof overhead to the data stream. You can set `include_obfuscation` to\nfalse to optimize for bandwidth if you trust the network links between\nyour application and the OpenAI API.\n")}, optional=("include_obfuscation",)).annotate(description="Options for streaming responses. Only set this when you set `stream: true`.\n"), _S.Null).annotate(identifier="ResponseStreamOptions")
|
|
398
|
+
ConversationParam_2: _StructSchema[_T.ConversationParam_2, _t.Never, _t.Never] = _b.struct(_T.ConversationParam_2, {"id": _S.String.annotate(description="The unique ID of the conversation.")}).annotate(title="Conversation object", description="The conversation that this response belongs to.", identifier="ConversationParam-2")
|
|
399
|
+
ContextManagementParam: _StructSchema[_T.ContextManagementParam, _t.Never, _t.Never] = _b.struct(_T.ContextManagementParam, {"type": _S.String.annotate(description="The context management entry type. Currently only 'compaction' is supported."), "compact_threshold": _b.union(_b.check(_b.check(_S.Number.annotate(description="Token threshold at which compaction should be triggered for this entry."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1000).annotate(expected="a value greater than or equal to 1000")), _S.Null)}, optional=("compact_threshold",)).annotate(identifier="ContextManagementParam")
|
|
400
|
+
ResponseErrorCode: _S.Bottom[_T.ResponseErrorCode, _t.Any] = _b.literals(["server_error", "rate_limit_exceeded", "invalid_prompt", "data_residency_mismatch", "bio_policy", "misalignment_policy_violation", "vector_store_timeout", "invalid_image", "invalid_image_format", "invalid_base64_image", "invalid_image_url", "image_too_large", "image_too_small", "image_parse_error", "image_content_policy_violation", "invalid_image_mode", "image_file_too_large", "unsupported_image_media_type", "empty_image_file", "failed_to_download_image", "image_file_not_found"]).annotate(description="The error code for the response.\n", identifier="ResponseErrorCode")
|
|
401
|
+
ResponseUsage: _StructSchema[_T.ResponseUsage, _t.Never, _t.Never] = _b.struct(_T.ResponseUsage, {"input_tokens": _b.check(_S.Number.annotate(description="The number of input tokens."), _S.is_int().annotate(expected="an integer")), "input_tokens_details": _b.struct(_T.ResponseUsage__input_tokens_details, {"cached_tokens": _b.check(_S.Number.annotate(description="The number of tokens that were retrieved from the cache.\n[More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).\n"), _S.is_int().annotate(expected="an integer")), "cache_write_tokens": _b.check(_S.Number.annotate(description="The number of input tokens that were written to the cache."), _S.is_int().annotate(expected="an integer"))}, optional=("cache_write_tokens",)).annotate(description="A detailed breakdown of the input tokens."), "output_tokens": _b.check(_S.Number.annotate(description="The number of output tokens."), _S.is_int().annotate(expected="an integer")), "output_tokens_details": _b.struct(_T.ResponseUsage__output_tokens_details, {"reasoning_tokens": _b.check(_S.Number.annotate(description="The number of reasoning tokens."), _S.is_int().annotate(expected="an integer"))}).annotate(description="A detailed breakdown of the output tokens."), "total_tokens": _b.check(_S.Number.annotate(description="The total number of tokens used."), _S.is_int().annotate(expected="an integer"))}).annotate(description="Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n", identifier="ResponseUsage")
|
|
402
|
+
CacheMissReasonTypeEnum: _S.Bottom[_T.CacheMissReasonTypeEnum, _t.Any] = _b.literals(["model_changed", "prompt_cache_key_changed", "tools_changed", "text_format_changed", "reasoning_effort_changed", "verbosity_changed", "context_compacted", "input_changed", "service_tier_changed"]).annotate(identifier="CacheMissReasonTypeEnum")
|
|
403
|
+
PromptCacheHitDiagnosticsBody: _StructSchema[_T.PromptCacheHitDiagnosticsBody, _t.Never, _t.Never] = _b.struct(_T.PromptCacheHitDiagnosticsBody, {"type": _b.literal("cache_hit")}).annotate(identifier="PromptCacheHitDiagnosticsBody")
|
|
404
|
+
PromptCacheComparisonResponseNotFoundDiagnosticsBody: _StructSchema[_T.PromptCacheComparisonResponseNotFoundDiagnosticsBody, _t.Never, _t.Never] = _b.struct(_T.PromptCacheComparisonResponseNotFoundDiagnosticsBody, {"type": _b.literal("comparison_response_not_found")}).annotate(identifier="PromptCacheComparisonResponseNotFoundDiagnosticsBody")
|
|
405
|
+
PromptCacheUnavailableDiagnosticsBody: _StructSchema[_T.PromptCacheUnavailableDiagnosticsBody, _t.Never, _t.Never] = _b.struct(_T.PromptCacheUnavailableDiagnosticsBody, {"type": _b.literal("unavailable")}).annotate(identifier="PromptCacheUnavailableDiagnosticsBody")
|
|
406
|
+
ModerationErrorBody: _StructSchema[_T.ModerationErrorBody, _t.Never, _t.Never] = _b.struct(_T.ModerationErrorBody, {"type": _b.literal("error").annotate(description="The object type, which was always `error` for moderation failures."), "code": _S.String.annotate(description="The error code."), "message": _S.String.annotate(description="The error message.")}).annotate(title="Moderation error", description="An error produced while attempting moderation for the response input or output.", identifier="ModerationErrorBody")
|
|
407
|
+
ResponseConversation: _StructSchema[_T.ResponseConversation, _t.Never, _t.Never] = _b.struct(_T.ResponseConversation, {"id": _S.String.annotate(description="The unique ID of the conversation that this response was associated with.")}).annotate(title="Conversation", description="The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.", identifier="ResponseConversation")
|
|
408
|
+
ResponseAudioDeltaEvent: _StructSchema[_T.ResponseAudioDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseAudioDeltaEvent, {"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")}).annotate(description="Emitted when there is a partial audio response.", identifier="ResponseAudioDeltaEvent")
|
|
409
|
+
ResponseAudioDoneEvent: _StructSchema[_T.ResponseAudioDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseAudioDoneEvent, {"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")}).annotate(description="Emitted when the audio response is complete.", identifier="ResponseAudioDoneEvent")
|
|
410
|
+
ResponseAudioTranscriptDeltaEvent: _StructSchema[_T.ResponseAudioTranscriptDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseAudioTranscriptDeltaEvent, {"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")}).annotate(description="Emitted when there is a partial transcript of audio.", identifier="ResponseAudioTranscriptDeltaEvent")
|
|
411
|
+
ResponseAudioTranscriptDoneEvent: _StructSchema[_T.ResponseAudioTranscriptDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseAudioTranscriptDoneEvent, {"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")}).annotate(description="Emitted when the full audio transcript is completed.", identifier="ResponseAudioTranscriptDoneEvent")
|
|
412
|
+
ResponseCodeInterpreterCallCodeDeltaEvent: _StructSchema[_T.ResponseCodeInterpreterCallCodeDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseCodeInterpreterCallCodeDeltaEvent, {"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"))}).annotate(description="Emitted when a partial code snippet is streamed by the code interpreter.", identifier="ResponseCodeInterpreterCallCodeDeltaEvent")
|
|
413
|
+
ResponseCodeInterpreterCallCodeDoneEvent: _StructSchema[_T.ResponseCodeInterpreterCallCodeDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseCodeInterpreterCallCodeDoneEvent, {"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"))}).annotate(description="Emitted when the code snippet is finalized by the code interpreter.", identifier="ResponseCodeInterpreterCallCodeDoneEvent")
|
|
414
|
+
ResponseCodeInterpreterCallCompletedEvent: _StructSchema[_T.ResponseCodeInterpreterCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseCodeInterpreterCallCompletedEvent, {"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"))}).annotate(description="Emitted when the code interpreter call is completed.", identifier="ResponseCodeInterpreterCallCompletedEvent")
|
|
415
|
+
ResponseCodeInterpreterCallInProgressEvent: _StructSchema[_T.ResponseCodeInterpreterCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseCodeInterpreterCallInProgressEvent, {"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"))}).annotate(description="Emitted when a code interpreter call is in progress.", identifier="ResponseCodeInterpreterCallInProgressEvent")
|
|
416
|
+
ResponseCodeInterpreterCallInterpretingEvent: _StructSchema[_T.ResponseCodeInterpreterCallInterpretingEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseCodeInterpreterCallInterpretingEvent, {"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"))}).annotate(description="Emitted when the code interpreter is actively interpreting the code snippet.", identifier="ResponseCodeInterpreterCallInterpretingEvent")
|
|
417
|
+
ResponseCompactionCompactingStreamingEvent: _StructSchema[_T.ResponseCompactionCompactingStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseCompactionCompactingStreamingEvent, {"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")), "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.")}).annotate(title="Response compaction compacting event", description="Emitted when new summary content is sampled for a compaction trigger. Contains no summary content.", identifier="ResponseCompactionCompactingStreamingEvent")
|
|
418
|
+
ResponseErrorEvent: _StructSchema[_T.ResponseErrorEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseErrorEvent, {"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"))}).annotate(description="Emitted when an error occurs.", identifier="ResponseErrorEvent")
|
|
419
|
+
ResponseFileSearchCallCompletedEvent: _StructSchema[_T.ResponseFileSearchCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseFileSearchCallCompletedEvent, {"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"))}).annotate(description="Emitted when a file search call is completed (results found).", identifier="ResponseFileSearchCallCompletedEvent")
|
|
420
|
+
ResponseFileSearchCallInProgressEvent: _StructSchema[_T.ResponseFileSearchCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseFileSearchCallInProgressEvent, {"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"))}).annotate(description="Emitted when a file search call is initiated.", identifier="ResponseFileSearchCallInProgressEvent")
|
|
421
|
+
ResponseFileSearchCallSearchingEvent: _StructSchema[_T.ResponseFileSearchCallSearchingEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseFileSearchCallSearchingEvent, {"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"))}).annotate(description="Emitted when a file search is currently searching.", identifier="ResponseFileSearchCallSearchingEvent")
|
|
422
|
+
ResponseFunctionCallArgumentsDeltaEvent: _StructSchema[_T.ResponseFunctionCallArgumentsDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseFunctionCallArgumentsDeltaEvent, {"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")}).annotate(description="Emitted when there is a partial function-call arguments delta.", identifier="ResponseFunctionCallArgumentsDeltaEvent")
|
|
423
|
+
ResponseFunctionCallArgumentsDoneEvent: _StructSchema[_T.ResponseFunctionCallArgumentsDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseFunctionCallArgumentsDoneEvent, {"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."), "name": _S.String.annotate(description="The name of the function that was called.")}, optional=("name",)).annotate(description="Emitted when function-call arguments are finalized.", identifier="ResponseFunctionCallArgumentsDoneEvent")
|
|
424
|
+
ResponseShellCallCommandAddedStreamingEvent: _StructSchema[_T.ResponseShellCallCommandAddedStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseShellCallCommandAddedStreamingEvent, {"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")), "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.")}).annotate(title="Response shell command added event", description="A streaming event that indicated a shell command was added to a tool call.", identifier="ResponseShellCallCommandAddedStreamingEvent")
|
|
425
|
+
ResponseShellCallCommandDeltaStreamingEvent: _StructSchema[_T.ResponseShellCallCommandDeltaStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseShellCallCommandDeltaStreamingEvent, {"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")), "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=("obfuscation",)).annotate(title="Response shell command delta event", description="A streaming event that indicated a shell command was incrementally updated.", identifier="ResponseShellCallCommandDeltaStreamingEvent")
|
|
426
|
+
ResponseShellCallCommandDoneStreamingEvent: _StructSchema[_T.ResponseShellCallCommandDoneStreamingEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseShellCallCommandDoneStreamingEvent, {"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")), "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.")}).annotate(title="Response shell command done event", description="A streaming event that indicated a shell command was completed.", identifier="ResponseShellCallCommandDoneStreamingEvent")
|
|
427
|
+
ShellCallOutputDelta: _StructSchema[_T.ShellCallOutputDelta, _t.Never, _t.Never] = _b.struct(_T.ShellCallOutputDelta, {"stdout": _S.String.annotate(description="The stdout delta that was emitted."), "stderr": _S.String.annotate(description="The stderr delta that was emitted.")}, optional=("stdout", "stderr",)).annotate(title="Shell call output delta", description="A delta of stdout/stderr emitted while a shell call was running.", identifier="ShellCallOutputDelta")
|
|
428
|
+
ResponseReasoningSummaryPartAddedEvent: _StructSchema[_T.ResponseReasoningSummaryPartAddedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseReasoningSummaryPartAddedEvent, {"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.ResponseReasoningSummaryPartAddedEvent__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")}).annotate(description="Emitted when a new reasoning summary part is added.", identifier="ResponseReasoningSummaryPartAddedEvent")
|
|
429
|
+
ResponseReasoningSummaryPartDoneEvent: _StructSchema[_T.ResponseReasoningSummaryPartDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseReasoningSummaryPartDoneEvent, {"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.ResponseReasoningSummaryPartDoneEvent__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=("status",)).annotate(description="Emitted when a reasoning summary part is completed.", identifier="ResponseReasoningSummaryPartDoneEvent")
|
|
430
|
+
ResponseReasoningSummaryTextDeltaEvent: _StructSchema[_T.ResponseReasoningSummaryTextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseReasoningSummaryTextDeltaEvent, {"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"))}).annotate(description="Emitted when a delta is added to a reasoning summary text.", identifier="ResponseReasoningSummaryTextDeltaEvent")
|
|
431
|
+
ResponseReasoningSummaryTextDoneEvent: _StructSchema[_T.ResponseReasoningSummaryTextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseReasoningSummaryTextDoneEvent, {"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"))}).annotate(description="Emitted when a reasoning summary text is completed.", identifier="ResponseReasoningSummaryTextDoneEvent")
|
|
432
|
+
ResponseReasoningTextDeltaEvent: _StructSchema[_T.ResponseReasoningTextDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseReasoningTextDeltaEvent, {"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"))}).annotate(description="Emitted when a delta is added to a reasoning text.", identifier="ResponseReasoningTextDeltaEvent")
|
|
433
|
+
ResponseReasoningTextDoneEvent: _StructSchema[_T.ResponseReasoningTextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseReasoningTextDoneEvent, {"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"))}).annotate(description="Emitted when a reasoning text is completed.", identifier="ResponseReasoningTextDoneEvent")
|
|
434
|
+
ResponseRefusalDeltaEvent: _StructSchema[_T.ResponseRefusalDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseRefusalDeltaEvent, {"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"))}).annotate(description="Emitted when there is a partial refusal text.", identifier="ResponseRefusalDeltaEvent")
|
|
435
|
+
ResponseRefusalDoneEvent: _StructSchema[_T.ResponseRefusalDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseRefusalDoneEvent, {"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"))}).annotate(description="Emitted when refusal text is finalized.", identifier="ResponseRefusalDoneEvent")
|
|
436
|
+
ResponseLogProb: _StructSchema[_T.ResponseLogProb, _t.Never, _t.Never] = _b.struct(_T.ResponseLogProb, {"token": _S.String.annotate(description="A possible text token."), "logprob": _b.check(_S.Number.annotate(description="The log probability of this token.\n"), _S.is_finite().annotate(expected="a finite number")), "top_logprobs": _b.array(_b.struct(_T.ResponseLogProb__top_logprobs__item, {"token": _S.String.annotate(description="A possible text token."), "logprob": _b.check(_S.Number.annotate(description="The log probability of this token."), _S.is_finite().annotate(expected="a finite number"))}, optional=("token", "logprob",))).annotate(description="The log probabilities of up to 20 of the most likely tokens.\n")}, optional=("top_logprobs",)).annotate(description="A logprob is the logarithmic probability that the model assigns to producing \na particular token at a given position in the sequence. Less-negative (higher) \nlogprob values indicate greater model confidence in that token choice.\n", identifier="ResponseLogProb")
|
|
437
|
+
ResponseWebSearchCallCompletedEvent: _StructSchema[_T.ResponseWebSearchCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseWebSearchCallCompletedEvent, {"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"))}).annotate(description="Emitted when a web search call is completed.", identifier="ResponseWebSearchCallCompletedEvent")
|
|
438
|
+
ResponseWebSearchCallInProgressEvent: _StructSchema[_T.ResponseWebSearchCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseWebSearchCallInProgressEvent, {"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"))}).annotate(description="Emitted when a web search call is initiated.", identifier="ResponseWebSearchCallInProgressEvent")
|
|
439
|
+
ResponseWebSearchCallSearchingEvent: _StructSchema[_T.ResponseWebSearchCallSearchingEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseWebSearchCallSearchingEvent, {"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"))}).annotate(description="Emitted when a web search call is executing.", identifier="ResponseWebSearchCallSearchingEvent")
|
|
440
|
+
ResponseImageGenCallCompletedEvent: _StructSchema[_T.ResponseImageGenCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseImageGenCallCompletedEvent, {"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.")}).annotate(title="ResponseImageGenCallCompletedEvent", description="Emitted when an image generation tool call has completed and the final image is available.\n", identifier="ResponseImageGenCallCompletedEvent")
|
|
441
|
+
ResponseImageGenCallGeneratingEvent: _StructSchema[_T.ResponseImageGenCallGeneratingEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseImageGenCallGeneratingEvent, {"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"))}).annotate(title="ResponseImageGenCallGeneratingEvent", description="Emitted when an image generation tool call is actively generating an image (intermediate state).\n", identifier="ResponseImageGenCallGeneratingEvent")
|
|
442
|
+
ResponseImageGenCallInProgressEvent: _StructSchema[_T.ResponseImageGenCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseImageGenCallInProgressEvent, {"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"))}).annotate(title="ResponseImageGenCallInProgressEvent", description="Emitted when an image generation tool call is in progress.\n", identifier="ResponseImageGenCallInProgressEvent")
|
|
443
|
+
ResponseImageGenCallPartialImageEvent: _StructSchema[_T.ResponseImageGenCallPartialImageEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseImageGenCallPartialImageEvent, {"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=("size", "quality", "background", "output_format",)).annotate(title="ResponseImageGenCallPartialImageEvent", description="Emitted when a partial image is available during image generation streaming.\n", identifier="ResponseImageGenCallPartialImageEvent")
|
|
444
|
+
ResponseMCPCallArgumentsDeltaEvent: _StructSchema[_T.ResponseMCPCallArgumentsDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseMCPCallArgumentsDeltaEvent, {"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"))}).annotate(title="ResponseMCPCallArgumentsDeltaEvent", description="Emitted when there is a delta (partial update) to the arguments of an MCP tool call.\n", identifier="ResponseMCPCallArgumentsDeltaEvent")
|
|
445
|
+
ResponseMCPCallArgumentsDoneEvent: _StructSchema[_T.ResponseMCPCallArgumentsDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseMCPCallArgumentsDoneEvent, {"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"))}).annotate(title="ResponseMCPCallArgumentsDoneEvent", description="Emitted when the arguments for an MCP tool call are finalized.\n", identifier="ResponseMCPCallArgumentsDoneEvent")
|
|
446
|
+
ResponseMCPCallCompletedEvent: _StructSchema[_T.ResponseMCPCallCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseMCPCallCompletedEvent, {"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"))}).annotate(title="ResponseMCPCallCompletedEvent", description="Emitted when an MCP tool call has completed successfully.\n", identifier="ResponseMCPCallCompletedEvent")
|
|
447
|
+
ResponseMCPCallFailedEvent: _StructSchema[_T.ResponseMCPCallFailedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseMCPCallFailedEvent, {"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"))}).annotate(title="ResponseMCPCallFailedEvent", description="Emitted when an MCP tool call has failed.\n", identifier="ResponseMCPCallFailedEvent")
|
|
448
|
+
ResponseMCPCallInProgressEvent: _StructSchema[_T.ResponseMCPCallInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseMCPCallInProgressEvent, {"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.")}).annotate(title="ResponseMCPCallInProgressEvent", description="Emitted when an MCP tool call is in progress.\n", identifier="ResponseMCPCallInProgressEvent")
|
|
449
|
+
ResponseMCPListToolsCompletedEvent: _StructSchema[_T.ResponseMCPListToolsCompletedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseMCPListToolsCompletedEvent, {"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"))}).annotate(title="ResponseMCPListToolsCompletedEvent", description="Emitted when the list of available MCP tools has been successfully retrieved.\n", identifier="ResponseMCPListToolsCompletedEvent")
|
|
450
|
+
ResponseMCPListToolsFailedEvent: _StructSchema[_T.ResponseMCPListToolsFailedEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseMCPListToolsFailedEvent, {"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"))}).annotate(title="ResponseMCPListToolsFailedEvent", description="Emitted when the attempt to list available MCP tools has failed.\n", identifier="ResponseMCPListToolsFailedEvent")
|
|
451
|
+
ResponseMCPListToolsInProgressEvent: _StructSchema[_T.ResponseMCPListToolsInProgressEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseMCPListToolsInProgressEvent, {"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"))}).annotate(title="ResponseMCPListToolsInProgressEvent", description="Emitted when the system is in the process of retrieving the list of available MCP tools.\n", identifier="ResponseMCPListToolsInProgressEvent")
|
|
452
|
+
ResponseCustomToolCallInputDeltaEvent: _StructSchema[_T.ResponseCustomToolCallInputDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseCustomToolCallInputDeltaEvent, {"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.")}).annotate(title="ResponseCustomToolCallInputDelta", description="Event representing a delta (partial update) to the input of a custom tool call.\n", identifier="ResponseCustomToolCallInputDeltaEvent")
|
|
453
|
+
ResponseCustomToolCallInputDoneEvent: _StructSchema[_T.ResponseCustomToolCallInputDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseCustomToolCallInputDoneEvent, {"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.")}).annotate(title="ResponseCustomToolCallInputDone", description="Event indicating that input for a custom tool call is complete.\n", identifier="ResponseCustomToolCallInputDoneEvent")
|
|
454
|
+
ResponseKeepAliveEvent: _StructSchema[_T.ResponseKeepAliveEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseKeepAliveEvent, {"type": _b.literal("keepalive").annotate(description="The type of the keepalive event. Always `keepalive`."), "sequence_number": _b.check(_S.Number.annotate(description="The sequence number of this keepalive event."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Keep alive", description="A keepalive event emitted during long-running response streams.", identifier="ResponseKeepAliveEvent")
|
|
455
|
+
ResponseApplyPatchCallOperationDiffDeltaEvent: _StructSchema[_T.ResponseApplyPatchCallOperationDiffDeltaEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseApplyPatchCallOperationDiffDeltaEvent, {"type": _b.literal("response.apply_patch_call_operation_diff.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 diff data for the apply_patch tool call.")}).annotate(title="ResponseApplyPatchCallOperationDiffDelta", description="Event representing a delta for an apply_patch tool call operation diff.", identifier="ResponseApplyPatchCallOperationDiffDeltaEvent")
|
|
456
|
+
ResponseApplyPatchCallOperationDiffDoneEvent: _StructSchema[_T.ResponseApplyPatchCallOperationDiffDoneEvent, _t.Never, _t.Never] = _b.struct(_T.ResponseApplyPatchCallOperationDiffDoneEvent, {"type": _b.literal("response.apply_patch_call_operation_diff.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."), "delta": _S.String.annotate(description="The final diff data for the apply_patch tool call.")}, optional=("delta",)).annotate(title="ResponseApplyPatchCallOperationDiffDone", description="Event indicating that the operation diff for an apply_patch tool call is complete.", identifier="ResponseApplyPatchCallOperationDiffDoneEvent")
|
|
457
|
+
MessageContentImageFileObject: _StructSchema[_T.MessageContentImageFileObject, _t.Never, _t.Never] = _b.struct(_T.MessageContentImageFileObject, {"type": _b.literal("image_file").annotate(description="Always `image_file`."), "image_file": _b.struct(_T.MessageContentImageFileObject__image_file, {"file_id": _S.String.annotate(description="The [File](https://developers.openai.com/api/reference/resources/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content."), "detail": _b.literals(["auto", "low", "high"]).annotate(description="Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.")}, optional=("detail",))}).annotate(title="Image file", description="References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message.", identifier="MessageContentImageFileObject")
|
|
458
|
+
MessageContentImageUrlObject: _StructSchema[_T.MessageContentImageUrlObject, _t.Never, _t.Never] = _b.struct(_T.MessageContentImageUrlObject, {"type": _b.literal("image_url").annotate(description="The type of the content part."), "image_url": _b.struct(_T.MessageContentImageUrlObject__image_url, {"url": _S.String.annotate(description="The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", format="uri"), "detail": _b.literals(["auto", "low", "high"]).annotate(description="Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`")}, optional=("detail",))}).annotate(title="Image URL", description="References an image URL in the content of a message.", identifier="MessageContentImageUrlObject")
|
|
459
|
+
MessageRequestContentTextObject: _StructSchema[_T.MessageRequestContentTextObject, _t.Never, _t.Never] = _b.struct(_T.MessageRequestContentTextObject, {"type": _b.literal("text").annotate(description="Always `text`."), "text": _S.String.annotate(description="Text content to be sent to the model")}).annotate(title="Text", description="The text content that is part of a message.", identifier="MessageRequestContentTextObject")
|
|
460
|
+
AssistantToolsFileSearchTypeOnly: _StructSchema[_T.AssistantToolsFileSearchTypeOnly, _t.Never, _t.Never] = _b.struct(_T.AssistantToolsFileSearchTypeOnly, {"type": _b.literal("file_search").annotate(description="The type of tool being defined: `file_search`")}).annotate(title="FileSearch tool", identifier="AssistantToolsFileSearchTypeOnly")
|
|
461
|
+
TruncationObject: _StructSchema[_T.TruncationObject, _t.Never, _t.Never] = _b.struct(_T.TruncationObject, {"type": _b.literals(["auto", "last_messages"]).annotate(description="The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`."), "last_messages": _b.union(_b.check(_b.check(_S.Number.annotate(description="The number of most recent messages from the thread when constructing the context for the run."), _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)}, optional=("last_messages",)).annotate(title="Thread Truncation Controls", description="Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run.", identifier="TruncationObject")
|
|
462
|
+
AssistantsNamedToolChoice: _StructSchema[_T.AssistantsNamedToolChoice, _t.Never, _t.Never] = _b.struct(_T.AssistantsNamedToolChoice, {"type": _b.literals(["function", "code_interpreter", "file_search"]).annotate(description="The type of the tool. If type is `function`, the function name must be set"), "function": _b.struct(_T.AssistantsNamedToolChoice__function, {"name": _S.String.annotate(description="The name of the function to call.")})}, optional=("function",)).annotate(description="Specifies a tool the model should use. Use to force the model to call a specific tool.", identifier="AssistantsNamedToolChoice")
|
|
463
|
+
RunToolCallObject: _StructSchema[_T.RunToolCallObject, _t.Never, _t.Never] = _b.struct(_T.RunToolCallObject, {"id": _S.String.annotate(description="The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://developers.openai.com/api/docs/assistants/migration) endpoint."), "type": _b.literal("function").annotate(description="The type of tool call the output is required for. For now, this is always `function`."), "function": _b.struct(_T.RunToolCallObject__function, {"name": _S.String.annotate(description="The name of the function."), "arguments": _S.String.annotate(description="The arguments that the model expects you to pass to the function.")}).annotate(description="The function definition.")}).annotate(description="Tool call objects", identifier="RunToolCallObject")
|
|
464
|
+
RunCompletionUsage: _S.Bottom[_T.RunCompletionUsage, _t.Any] = _b.union(_b.struct(_T.RunCompletionUsage__0, {"completion_tokens": _b.check(_S.Number.annotate(description="Number of completion tokens used over the course of the run."), _S.is_int().annotate(expected="an integer")), "prompt_tokens": _b.check(_S.Number.annotate(description="Number of prompt tokens used over the course of the run."), _S.is_int().annotate(expected="an integer")), "total_tokens": _b.check(_S.Number.annotate(description="Total number of tokens used (prompt + completion)."), _S.is_int().annotate(expected="an integer"))}).annotate(description="Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.)."), _S.Null).annotate(identifier="RunCompletionUsage")
|
|
465
|
+
RunStepDetailsMessageCreationObject: _StructSchema[_T.RunStepDetailsMessageCreationObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDetailsMessageCreationObject, {"type": _b.literal("message_creation").annotate(description="Always `message_creation`."), "message_creation": _b.struct(_T.RunStepDetailsMessageCreationObject__message_creation, {"message_id": _S.String.annotate(description="The ID of the message that was created by this run step.")})}).annotate(title="Message creation", description="Details of the message creation by the run step.", identifier="RunStepDetailsMessageCreationObject")
|
|
466
|
+
RunStepDetailsToolCallsCodeOutputLogsObject: _StructSchema[_T.RunStepDetailsToolCallsCodeOutputLogsObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDetailsToolCallsCodeOutputLogsObject, {"type": _b.literal("logs").annotate(description="Always `logs`."), "logs": _S.String.annotate(description="The text output from the Code Interpreter tool call.")}).annotate(title="Code Interpreter log output", description="Text output from the Code Interpreter tool call as part of a run step.", identifier="RunStepDetailsToolCallsCodeOutputLogsObject")
|
|
467
|
+
RunStepDetailsToolCallsCodeOutputImageObject: _StructSchema[_T.RunStepDetailsToolCallsCodeOutputImageObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDetailsToolCallsCodeOutputImageObject, {"type": _b.literal("image").annotate(description="Always `image`."), "image": _b.struct(_T.RunStepDetailsToolCallsCodeOutputImageObject__image, {"file_id": _S.String.annotate(description="The [file](https://developers.openai.com/api/reference/resources/files) ID of the image.")})}).annotate(title="Code Interpreter image output", identifier="RunStepDetailsToolCallsCodeOutputImageObject")
|
|
468
|
+
RunStepDetailsToolCallsFileSearchResultObject: _StructSchema[_T.RunStepDetailsToolCallsFileSearchResultObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDetailsToolCallsFileSearchResultObject, {"file_id": _S.String.annotate(description="The ID of the file that result was found in."), "file_name": _S.String.annotate(description="The name of the file that result was found in."), "score": _b.check(_b.check(_b.check(_S.Number.annotate(description="The score of the result. All values must be a floating point number between 0 and 1."), _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")), "content": _b.array(_b.struct(_T.RunStepDetailsToolCallsFileSearchResultObject__content__item, {"type": _b.literal("text").annotate(description="The type of the content."), "text": _S.String.annotate(description="The text content of the file.")}, optional=("type", "text",))).annotate(description="The content of the result that was found. The content is only included if requested via the include query parameter.")}, optional=("content",)).annotate(title="File search tool call result", description="A result instance of the file search.", identifier="RunStepDetailsToolCallsFileSearchResultObject")
|
|
469
|
+
RunStepDetailsToolCallsFunctionObject: _StructSchema[_T.RunStepDetailsToolCallsFunctionObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDetailsToolCallsFunctionObject, {"id": _S.String.annotate(description="The ID of the tool call object."), "type": _b.literal("function").annotate(description="The type of tool call. This is always going to be `function` for this type of tool call."), "function": _b.struct(_T.RunStepDetailsToolCallsFunctionObject__function, {"name": _S.String.annotate(description="The name of the function."), "arguments": _S.String.annotate(description="The arguments passed to the function."), "output": _b.union(_S.String.annotate(description="The output of the function. This will be `null` if the outputs have not been [submitted](https://developers.openai.com/api/docs/assistants/migration) yet."), _S.Null)}).annotate(description="The definition of the function that was called.")}).annotate(title="Function tool call", identifier="RunStepDetailsToolCallsFunctionObject")
|
|
470
|
+
RunStepCompletionUsage: _S.Bottom[_T.RunStepCompletionUsage, _t.Any] = _b.union(_b.struct(_T.RunStepCompletionUsage__0, {"completion_tokens": _b.check(_S.Number.annotate(description="Number of completion tokens used over the course of the run step."), _S.is_int().annotate(expected="an integer")), "prompt_tokens": _b.check(_S.Number.annotate(description="Number of prompt tokens used over the course of the run step."), _S.is_int().annotate(expected="an integer")), "total_tokens": _b.check(_S.Number.annotate(description="Total number of tokens used (prompt + completion)."), _S.is_int().annotate(expected="an integer"))}).annotate(description="Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`."), _S.Null).annotate(identifier="RunStepCompletionUsage")
|
|
471
|
+
RunStepDeltaStepDetailsMessageCreationObject: _StructSchema[_T.RunStepDeltaStepDetailsMessageCreationObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDeltaStepDetailsMessageCreationObject, {"type": _b.literal("message_creation").annotate(description="Always `message_creation`."), "message_creation": _b.struct(_T.RunStepDeltaStepDetailsMessageCreationObject__message_creation, {"message_id": _S.String.annotate(description="The ID of the message that was created by this run step.")}, optional=("message_id",))}, optional=("message_creation",)).annotate(title="Message creation", description="Details of the message creation by the run step.", identifier="RunStepDeltaStepDetailsMessageCreationObject")
|
|
472
|
+
RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject: _StructSchema[_T.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, {"index": _b.check(_S.Number.annotate(description="The index of the output in the outputs array."), _S.is_int().annotate(expected="an integer")), "type": _b.literal("logs").annotate(description="Always `logs`."), "logs": _S.String.annotate(description="The text output from the Code Interpreter tool call.")}, optional=("logs",)).annotate(title="Code interpreter log output", description="Text output from the Code Interpreter tool call as part of a run step.", identifier="RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject")
|
|
473
|
+
RunStepDeltaStepDetailsToolCallsCodeOutputImageObject: _StructSchema[_T.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject, {"index": _b.check(_S.Number.annotate(description="The index of the output in the outputs array."), _S.is_int().annotate(expected="an integer")), "type": _b.literal("image").annotate(description="Always `image`."), "image": _b.struct(_T.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject__image, {"file_id": _S.String.annotate(description="The [file](https://developers.openai.com/api/reference/resources/files) ID of the image.")}, optional=("file_id",))}, optional=("image",)).annotate(title="Code interpreter image output", identifier="RunStepDeltaStepDetailsToolCallsCodeOutputImageObject")
|
|
474
|
+
RunStepDeltaStepDetailsToolCallsFileSearchObject: _StructSchema[_T.RunStepDeltaStepDetailsToolCallsFileSearchObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDeltaStepDetailsToolCallsFileSearchObject, {"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 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.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="For now, this is always going to be an empty object.")}, optional=("id",)).annotate(title="File search tool call", identifier="RunStepDeltaStepDetailsToolCallsFileSearchObject")
|
|
475
|
+
RunStepDeltaStepDetailsToolCallsFunctionObject: _StructSchema[_T.RunStepDeltaStepDetailsToolCallsFunctionObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDeltaStepDetailsToolCallsFunctionObject, {"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 object."), "type": _b.literal("function").annotate(description="The type of tool call. This is always going to be `function` for this type of tool call."), "function": _b.struct(_T.RunStepDeltaStepDetailsToolCallsFunctionObject__function, {"name": _S.String.annotate(description="The name of the function."), "arguments": _S.String.annotate(description="The arguments passed to the function."), "output": _b.union(_S.String.annotate(description="The output of the function. This will be `null` if the outputs have not been [submitted](https://developers.openai.com/api/docs/assistants/migration) yet."), _S.Null)}, optional=("name", "arguments", "output",)).annotate(description="The definition of the function that was called.")}, optional=("id", "function",)).annotate(title="Function tool call", identifier="RunStepDeltaStepDetailsToolCallsFunctionObject")
|
|
476
|
+
MessageContentTextAnnotationsFileCitationObject: _StructSchema[_T.MessageContentTextAnnotationsFileCitationObject, _t.Never, _t.Never] = _b.struct(_T.MessageContentTextAnnotationsFileCitationObject, {"type": _b.literal("file_citation").annotate(description="Always `file_citation`."), "text": _S.String.annotate(description="The text in the message content that needs to be replaced."), "file_citation": _b.struct(_T.MessageContentTextAnnotationsFileCitationObject__file_citation, {"file_id": _S.String.annotate(description="The ID of the specific File the citation is from.")}), "start_index": _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")), "end_index": _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"))}).annotate(title="File citation", description="A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", identifier="MessageContentTextAnnotationsFileCitationObject")
|
|
477
|
+
MessageContentTextAnnotationsFilePathObject: _StructSchema[_T.MessageContentTextAnnotationsFilePathObject, _t.Never, _t.Never] = _b.struct(_T.MessageContentTextAnnotationsFilePathObject, {"type": _b.literal("file_path").annotate(description="Always `file_path`."), "text": _S.String.annotate(description="The text in the message content that needs to be replaced."), "file_path": _b.struct(_T.MessageContentTextAnnotationsFilePathObject__file_path, {"file_id": _S.String.annotate(description="The ID of the file that was generated.")}), "start_index": _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")), "end_index": _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"))}).annotate(title="File path", description="A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", identifier="MessageContentTextAnnotationsFilePathObject")
|
|
478
|
+
MessageContentRefusalObject: _StructSchema[_T.MessageContentRefusalObject, _t.Never, _t.Never] = _b.struct(_T.MessageContentRefusalObject, {"type": _b.literal("refusal").annotate(description="Always `refusal`."), "refusal": _S.String}).annotate(title="Refusal", description="The refusal content generated by the assistant.", identifier="MessageContentRefusalObject")
|
|
479
|
+
MessageDeltaContentImageFileObject: _StructSchema[_T.MessageDeltaContentImageFileObject, _t.Never, _t.Never] = _b.struct(_T.MessageDeltaContentImageFileObject, {"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("image_file").annotate(description="Always `image_file`."), "image_file": _b.struct(_T.MessageDeltaContentImageFileObject__image_file, {"file_id": _S.String.annotate(description="The [File](https://developers.openai.com/api/reference/resources/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content."), "detail": _b.literals(["auto", "low", "high"]).annotate(description="Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.")}, optional=("file_id", "detail",))}, optional=("image_file",)).annotate(title="Image file", description="References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message.", identifier="MessageDeltaContentImageFileObject")
|
|
480
|
+
MessageDeltaContentTextAnnotationsFileCitationObject: _StructSchema[_T.MessageDeltaContentTextAnnotationsFileCitationObject, _t.Never, _t.Never] = _b.struct(_T.MessageDeltaContentTextAnnotationsFileCitationObject, {"index": _b.check(_S.Number.annotate(description="The index of the annotation in the text content part."), _S.is_int().annotate(expected="an integer")), "type": _b.literal("file_citation").annotate(description="Always `file_citation`."), "text": _S.String.annotate(description="The text in the message content that needs to be replaced."), "file_citation": _b.struct(_T.MessageDeltaContentTextAnnotationsFileCitationObject__file_citation, {"file_id": _S.String.annotate(description="The ID of the specific File the citation is from."), "quote": _S.String.annotate(description="The specific quote in the file.")}, optional=("file_id", "quote",)), "start_index": _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")), "end_index": _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"))}, optional=("text", "file_citation", "start_index", "end_index",)).annotate(title="File citation", description="A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", identifier="MessageDeltaContentTextAnnotationsFileCitationObject")
|
|
481
|
+
MessageDeltaContentTextAnnotationsFilePathObject: _StructSchema[_T.MessageDeltaContentTextAnnotationsFilePathObject, _t.Never, _t.Never] = _b.struct(_T.MessageDeltaContentTextAnnotationsFilePathObject, {"index": _b.check(_S.Number.annotate(description="The index of the annotation in the text content part."), _S.is_int().annotate(expected="an integer")), "type": _b.literal("file_path").annotate(description="Always `file_path`."), "text": _S.String.annotate(description="The text in the message content that needs to be replaced."), "file_path": _b.struct(_T.MessageDeltaContentTextAnnotationsFilePathObject__file_path, {"file_id": _S.String.annotate(description="The ID of the file that was generated.")}, optional=("file_id",)), "start_index": _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")), "end_index": _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"))}, optional=("text", "file_path", "start_index", "end_index",)).annotate(title="File path", description="A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", identifier="MessageDeltaContentTextAnnotationsFilePathObject")
|
|
482
|
+
MessageDeltaContentRefusalObject: _StructSchema[_T.MessageDeltaContentRefusalObject, _t.Never, _t.Never] = _b.struct(_T.MessageDeltaContentRefusalObject, {"index": _b.check(_S.Number.annotate(description="The index of the refusal part in the message."), _S.is_int().annotate(expected="an integer")), "type": _b.literal("refusal").annotate(description="Always `refusal`."), "refusal": _S.String}, optional=("refusal",)).annotate(title="Refusal", description="The refusal content that is part of a message.", identifier="MessageDeltaContentRefusalObject")
|
|
483
|
+
MessageDeltaContentImageUrlObject: _StructSchema[_T.MessageDeltaContentImageUrlObject, _t.Never, _t.Never] = _b.struct(_T.MessageDeltaContentImageUrlObject, {"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("image_url").annotate(description="Always `image_url`."), "image_url": _b.struct(_T.MessageDeltaContentImageUrlObject__image_url, {"url": _S.String.annotate(description="The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.", format="uri"), "detail": _b.literals(["auto", "low", "high"]).annotate(description="Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.")}, optional=("url", "detail",))}, optional=("image_url",)).annotate(title="Image URL", description="References an image URL in the content of a message.", identifier="MessageDeltaContentImageUrlObject")
|
|
484
|
+
DoneEvent: _StructSchema[_T.DoneEvent, _t.Never, _t.Never] = _b.struct(_T.DoneEvent, {"event": _b.literal("done"), "data": _b.literal("[DONE]")}).annotate(description="Occurs when a stream ends.", identifier="DoneEvent")
|
|
485
|
+
DeleteThreadResponse: _StructSchema[_T.DeleteThreadResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteThreadResponse, {"id": _S.String, "deleted": _S.Boolean, "object": _b.literal("thread.deleted")}).annotate(identifier="DeleteThreadResponse")
|
|
486
|
+
DeleteMessageResponse: _StructSchema[_T.DeleteMessageResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteMessageResponse, {"id": _S.String, "deleted": _S.Boolean, "object": _b.literal("thread.message.deleted")}).annotate(identifier="DeleteMessageResponse")
|
|
487
|
+
SubmitToolOutputsRunRequest: _StructSchema[_T.SubmitToolOutputsRunRequest, _t.Never, _t.Never] = _b.struct(_T.SubmitToolOutputsRunRequest, {"tool_outputs": _b.array(_b.struct(_T.SubmitToolOutputsRunRequest__tool_outputs__item, {"tool_call_id": _S.String.annotate(description="The ID of the tool call in the `required_action` object within the run object the output is being submitted for."), "output": _S.String.annotate(description="The output of the tool call to be submitted to continue the run.")}, optional=("tool_call_id", "output",))).annotate(description="A list of tools for which the outputs are being submitted."), "stream": _b.union(_S.Boolean.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"), _S.Null)}, optional=("stream",)).annotate(identifier="SubmitToolOutputsRunRequest")
|
|
488
|
+
CompleteUploadRequest: _StructSchema[_T.CompleteUploadRequest, _t.Never, _t.Never] = _b.struct(_T.CompleteUploadRequest, {"part_ids": _b.array(_S.String).annotate(description="The ordered list of Part IDs.\n"), "md5": _S.String.annotate(description="The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.\n")}, optional=("md5",)).annotate(identifier="CompleteUploadRequest")
|
|
489
|
+
UploadPart: _StructSchema[_T.UploadPart, _t.Never, _t.Never] = _b.struct(_T.UploadPart, {"id": _S.String.annotate(description="The upload Part unique identifier, which can be referenced in API endpoints."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the Part was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "upload_id": _S.String.annotate(description="The ID of the Upload object that this Part was added to."), "object": _b.literal("upload.part").annotate(description="The object type, which is always `upload.part`.")}).annotate(title="UploadPart", description="The upload Part represents a chunk of bytes we can add to an Upload object.\n", identifier="UploadPart")
|
|
490
|
+
VectorStoreExpirationAfter: _StructSchema[_T.VectorStoreExpirationAfter, _t.Never, _t.Never] = _b.struct(_T.VectorStoreExpirationAfter, {"anchor": _b.literal("last_active_at").annotate(description="Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`."), "days": _b.check(_b.check(_b.check(_S.Number.annotate(description="The number of days after the anchor time that the vector store will expire."), _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(365).annotate(expected="a value less than or equal to 365"))}).annotate(title="Vector store expiration policy", description="The expiration policy for a vector store.", identifier="VectorStoreExpirationAfter")
|
|
491
|
+
AutoChunkingStrategyRequestParam: _StructSchema[_T.AutoChunkingStrategyRequestParam, _t.Never, _t.Never] = _b.struct(_T.AutoChunkingStrategyRequestParam, {"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`.", identifier="AutoChunkingStrategyRequestParam")
|
|
492
|
+
StaticChunkingStrategy: _StructSchema[_T.StaticChunkingStrategy, _t.Never, _t.Never] = _b.struct(_T.StaticChunkingStrategy, {"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(identifier="StaticChunkingStrategy")
|
|
493
|
+
DeleteVectorStoreResponse: _StructSchema[_T.DeleteVectorStoreResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteVectorStoreResponse, {"id": _S.String, "deleted": _S.Boolean, "object": _b.literal("vector_store.deleted")}).annotate(identifier="DeleteVectorStoreResponse")
|
|
494
|
+
VectorStoreFileBatchObject: _StructSchema[_T.VectorStoreFileBatchObject, _t.Never, _t.Never] = _b.struct(_T.VectorStoreFileBatchObject, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints."), "object": _b.literal("vector_store.file_batch").annotate(description="The object type, which is always `vector_store.file_batch`."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the vector store files batch 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 files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`."), "file_counts": _b.struct(_T.VectorStoreFileBatchObject__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 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 where 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"))})}).annotate(title="Vector store file batch", description="A batch of files attached to a vector store.", identifier="VectorStoreFileBatchObject")
|
|
495
|
+
OtherChunkingStrategyResponseParam: _StructSchema[_T.OtherChunkingStrategyResponseParam, _t.Never, _t.Never] = _b.struct(_T.OtherChunkingStrategyResponseParam, {"type": _b.literal("other").annotate(description="Always `other`.")}).annotate(title="Other Chunking Strategy", description="This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", identifier="OtherChunkingStrategyResponseParam")
|
|
496
|
+
DeleteVectorStoreFileResponse: _StructSchema[_T.DeleteVectorStoreFileResponse, _t.Never, _t.Never] = _b.struct(_T.DeleteVectorStoreFileResponse, {"id": _S.String, "deleted": _S.Boolean, "object": _b.literal("vector_store.file.deleted")}).annotate(identifier="DeleteVectorStoreFileResponse")
|
|
497
|
+
VectorStoreFileContentResponse: _StructSchema[_T.VectorStoreFileContentResponse, _t.Never, _t.Never] = _b.struct(_T.VectorStoreFileContentResponse, {"object": _b.literal("vector_store.file_content.page").annotate(description="The object type, which is always `vector_store.file_content.page`"), "data": _b.array(_b.struct(_T.VectorStoreFileContentResponse__data__item, {"type": _S.String.annotate(description="The content type (currently only `\"text\"`)"), "text": _S.String.annotate(description="The text content")}, optional=("type", "text",))).annotate(description="Parsed content of the file."), "has_more": _S.Boolean.annotate(description="Indicates if there are more content pages to fetch."), "next_page": _b.union(_S.String.annotate(description="The token for the next page, if any."), _S.Null)}).annotate(description="Represents the parsed content of a vector store file.", identifier="VectorStoreFileContentResponse")
|
|
498
|
+
VectorStoreSearchResultContentObject: _StructSchema[_T.VectorStoreSearchResultContentObject, _t.Never, _t.Never] = _b.struct(_T.VectorStoreSearchResultContentObject, {"type": _b.literal("text").annotate(description="The type of content."), "text": _S.String.annotate(description="The text content returned from search.")}).annotate(identifier="VectorStoreSearchResultContentObject")
|
|
499
|
+
DeletedConversationResource: _StructSchema[_T.DeletedConversationResource, _t.Never, _t.Never] = _b.struct(_T.DeletedConversationResource, {"object": _b.literal("conversation.deleted"), "deleted": _S.Boolean, "id": _S.String}).annotate(identifier="DeletedConversationResource")
|
|
500
|
+
SafetyCaseNoticeType: _S.Bottom[_T.SafetyCaseNoticeType, _t.Any] = _b.literals(["warning", "deactivation"]).annotate(identifier="SafetyCaseNoticeType")
|
|
501
|
+
SafetyAlertErrorType: _S.Bottom[_T.SafetyAlertErrorType, _t.Any] = _b.literals(["potentially_unintended_data_transfer", "potentially_unintended_data_access", "potentially_unintended_destructive_activity", "other"]).annotate(identifier="SafetyAlertErrorType")
|
|
502
|
+
DecisionsUsageBucketWidth: _S.Bottom[_T.DecisionsUsageBucketWidth, _t.Any] = _b.literals(["1m", "1h", "1d"]).annotate(identifier="DecisionsUsageBucketWidth")
|
|
503
|
+
DecisionsUsageGroupBy: _S.Bottom[_T.DecisionsUsageGroupBy, _t.Any] = _b.literals(["project_id", "user_id", "api_key_id", "model", "batch", "service_tier", "api_source"]).annotate(identifier="DecisionsUsageGroupBy")
|
|
504
|
+
DecisionsUsageApiSource: _S.Bottom[_T.DecisionsUsageApiSource, _t.Any] = _b.literals(["agents_api", "unlabeled"]).annotate(identifier="DecisionsUsageApiSource")
|
|
505
|
+
DecisionsUsageErrorDetails: _StructSchema[_T.DecisionsUsageErrorDetails, _t.Never, _t.Never] = _b.struct(_T.DecisionsUsageErrorDetails, {"code": _b.union(_S.String, _S.Null), "message": _S.String, "param": _b.union(_S.String, _S.Null), "type": _S.String}).annotate(identifier="DecisionsUsageErrorDetails")
|
|
506
|
+
ExternalStorageOrder: _S.Bottom[_T.ExternalStorageOrder, _t.Any] = _b.literals(["asc", "desc"]).annotate(identifier="ExternalStorageOrder")
|
|
507
|
+
ExternalStorageStatus: _S.Bottom[_T.ExternalStorageStatus, _t.Any] = _b.literals(["pending", "validated", "unhealthy"]).annotate(identifier="ExternalStorageStatus")
|
|
508
|
+
AwsExternalStorageProviderParams: _StructSchema[_T.AwsExternalStorageProviderParams, _t.Never, _t.Never] = _b.struct(_T.AwsExternalStorageProviderParams, {"type": _b.literal("aws"), "bucket": _S.String, "role_arn": _S.String}).annotate(identifier="AwsExternalStorageProviderParams")
|
|
509
|
+
AzureExternalStorageProviderParams: _StructSchema[_T.AzureExternalStorageProviderParams, _t.Never, _t.Never] = _b.struct(_T.AzureExternalStorageProviderParams, {"type": _b.literal("azure"), "tenant_id": _S.String, "subscription_id": _S.String, "resource_group": _S.String, "account_name": _S.String, "container": _S.String}).annotate(identifier="AzureExternalStorageProviderParams")
|
|
510
|
+
GcpExternalStorageProviderParams: _StructSchema[_T.GcpExternalStorageProviderParams, _t.Never, _t.Never] = _b.struct(_T.GcpExternalStorageProviderParams, {"type": _b.literal("gcp"), "bucket": _S.String, "workload_identity_project_number": _S.String, "workload_identity_pool_id": _S.String, "workload_identity_provider_id": _S.String}).annotate(identifier="GcpExternalStorageProviderParams")
|
|
511
|
+
OciExternalStorageProviderParams: _StructSchema[_T.OciExternalStorageProviderParams, _t.Never, _t.Never] = _b.struct(_T.OciExternalStorageProviderParams, {"type": _b.literal("oci"), "tenancy_ocid": _S.String, "region": _S.String, "bucket": _S.String}).annotate(identifier="OciExternalStorageProviderParams")
|
|
512
|
+
ExternalStorageDeletedResource: _StructSchema[_T.ExternalStorageDeletedResource, _t.Never, _t.Never] = _b.struct(_T.ExternalStorageDeletedResource, {"object": _b.literal("organization.external_storage.deleted"), "id": _S.String, "deleted": _S.Boolean}).annotate(identifier="ExternalStorageDeletedResource")
|
|
513
|
+
SpendLimitCurrency: _S.Bottom[_T.SpendLimitCurrency, _t.Any] = _b.union(_S.String, _b.literal("USD")).annotate(identifier="SpendLimitCurrency")
|
|
514
|
+
SpendLimitInterval: _S.Bottom[_T.SpendLimitInterval, _t.Any] = _b.union(_S.String, _b.literal("month")).annotate(identifier="SpendLimitInterval")
|
|
515
|
+
SpendLimitEnforcementStatus: _S.Bottom[_T.SpendLimitEnforcementStatus, _t.Any] = _b.union(_S.String, _b.literals(["inactive", "enforcing"])).annotate(identifier="SpendLimitEnforcementStatus")
|
|
516
|
+
UpdateOrganizationSpendLimitBody: _StructSchema[_T.UpdateOrganizationSpendLimitBody, _t.Never, _t.Never] = _b.struct(_T.UpdateOrganizationSpendLimitBody, {"threshold_amount": _b.check(_b.check(_S.Number.annotate(description="The hard spend limit amount, in cents."), _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")), "currency": _b.literal("USD").annotate(description="The currency for the threshold amount. Currently, only `USD` is supported."), "interval": _b.literal("month").annotate(description="The time interval for evaluating spend against the threshold. Currently, only `month` is supported.")}).annotate(description="Parameters for the hard spend limit you want to create or replace.", identifier="UpdateOrganizationSpendLimitBody")
|
|
517
|
+
OrganizationSpendLimitDeletedResource: _StructSchema[_T.OrganizationSpendLimitDeletedResource, _t.Never, _t.Never] = _b.struct(_T.OrganizationSpendLimitDeletedResource, {"object": _b.literal("organization.spend_limit.deleted").annotate(description="The object type, which is always `organization.spend_limit.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the hard spend limit was deleted.")}).annotate(description="Confirmation payload returned after deleting an organization hard spend limit.", identifier="OrganizationSpendLimitDeletedResource")
|
|
518
|
+
UpdateProjectSpendLimitBody: _StructSchema[_T.UpdateProjectSpendLimitBody, _t.Never, _t.Never] = _b.struct(_T.UpdateProjectSpendLimitBody, {"threshold_amount": _b.check(_b.check(_S.Number.annotate(description="The hard spend limit amount, in cents."), _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")), "currency": _b.literal("USD").annotate(description="The currency for the threshold amount. Currently, only `USD` is supported."), "interval": _b.literal("month").annotate(description="The time interval for evaluating spend against the threshold. Currently, only `month` is supported.")}).annotate(description="Parameters for the hard spend limit you want to create or replace.", identifier="UpdateProjectSpendLimitBody")
|
|
519
|
+
ProjectSpendLimitDeletedResource: _StructSchema[_T.ProjectSpendLimitDeletedResource, _t.Never, _t.Never] = _b.struct(_T.ProjectSpendLimitDeletedResource, {"object": _b.literal("project.spend_limit.deleted").annotate(description="The object type, which is always `project.spend_limit.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the hard spend limit was deleted.")}).annotate(description="Confirmation payload returned after deleting a project hard spend limit.", identifier="ProjectSpendLimitDeletedResource")
|
|
520
|
+
CreateProjectServiceAccountApiKeyBody: _StructSchema[_T.CreateProjectServiceAccountApiKeyBody, _t.Never, _t.Never] = _b.struct(_T.CreateProjectServiceAccountApiKeyBody, {"name": _S.String.annotate(description="API key name."), "scopes": _b.array(_S.String.annotate(description="API key scope.")).annotate(description="API key scopes."), "expires_in_seconds": _b.union(_b.check(_b.check(_b.check(_S.Number.annotate(description="Number of seconds until the API key expires."), _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(31536000).annotate(expected="a value less than or equal to 31536000")), _S.Null)}, optional=("name", "scopes", "expires_in_seconds",)).annotate(description="The service account API key create request payload.", identifier="CreateProjectServiceAccountApiKeyBody")
|
|
521
|
+
ServiceAccountApiKeyBody: _StructSchema[_T.ServiceAccountApiKeyBody, _t.Never, _t.Never] = _b.struct(_T.ServiceAccountApiKeyBody, {"object": _b.literal("organization.project.service_account.api_key").annotate(description="The object type, which is always `organization.project.service_account.api_key`"), "value": _S.String.annotate(description="The unredacted API key value."), "name": _S.String.annotate(description="The name of the API key."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) when the API key was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "expires_at": _b.union(_b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) when the API key expires, or null if it does not expire.", format="unixtime"), _S.is_int().annotate(expected="an integer")), _S.Null), "id": _S.String.annotate(description="The identifier of the API key.")}, optional=("expires_at",)).annotate(identifier="ServiceAccountApiKeyBody")
|
|
522
|
+
ProvenanceCheckObject: _S.Bottom[_T.ProvenanceCheckObject, _t.Any] = _b.literal("content_provenance_check").annotate(identifier="ProvenanceCheckObject")
|
|
523
|
+
ProvenanceDetectionResultApi: _S.Bottom[_T.ProvenanceDetectionResultApi, _t.Any] = _b.literals(["detected", "not_detected"]).annotate(identifier="ProvenanceDetectionResultApi")
|
|
524
|
+
C2PAValidationStateApi: _S.Bottom[_T.C2PAValidationStateApi, _t.Any] = _b.literals(["trusted", "valid", "invalid", "not_present"]).annotate(identifier="C2PAValidationStateApi")
|
|
525
|
+
OrderEnum: _S.Bottom[_T.OrderEnum, _t.Any] = _b.literals(["asc", "desc"]).annotate(identifier="OrderEnum")
|
|
526
|
+
VideoModel: _S.Bottom[_T.VideoModel, _t.Any] = _b.union(_S.String, _b.literals(["sora-2", "sora-2-pro", "sora-2-2025-10-06", "sora-2-pro-2025-10-06", "sora-2-2025-12-08"])).annotate(identifier="VideoModel")
|
|
527
|
+
VideoStatus: _S.Bottom[_T.VideoStatus, _t.Any] = _b.literals(["queued", "in_progress", "completed", "failed"]).annotate(identifier="VideoStatus")
|
|
528
|
+
VideoSize: _S.Bottom[_T.VideoSize, _t.Any] = _b.literals(["720x1280", "1280x720", "1024x1792", "1792x1024"]).annotate(identifier="VideoSize")
|
|
529
|
+
ImageRefParam_2: _StructSchema[_T.ImageRefParam_2, _t.Never, _t.Never] = _b.struct(_T.ImageRefParam_2, {"image_url": _b.check(_S.String.annotate(description="A fully qualified URL or base64-encoded data URL.", format="uri"), _S.is_max_code_points(20971520).annotate(expected="a string with at most 20971520 code points")), "file_id": _S.String}, optional=("image_url", "file_id",)).annotate(identifier="ImageRefParam-2")
|
|
530
|
+
VideoSeconds: _S.Bottom[_T.VideoSeconds, _t.Any] = _b.literals(["4", "8", "12"]).annotate(identifier="VideoSeconds")
|
|
531
|
+
VideoCharacterResource: _StructSchema[_T.VideoCharacterResource, _t.Never, _t.Never] = _b.struct(_T.VideoCharacterResource, {"id": _b.union(_S.String.annotate(description="Identifier for the character creation cameo."), _S.Null), "name": _b.union(_S.String.annotate(description="Display name for the character."), _S.Null), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (in seconds) when the character was created.", format="unixtime"), _S.is_int().annotate(expected="an integer"))}).annotate(identifier="VideoCharacterResource")
|
|
532
|
+
VideoReferenceInputParam: _StructSchema[_T.VideoReferenceInputParam, _t.Never, _t.Never] = _b.struct(_T.VideoReferenceInputParam, {"id": _S.String.annotate(description="The identifier of the completed video.")}).annotate(description="Reference to the completed video.", identifier="VideoReferenceInputParam")
|
|
533
|
+
DeletedVideoResource: _StructSchema[_T.DeletedVideoResource, _t.Never, _t.Never] = _b.struct(_T.DeletedVideoResource, {"object": _b.literal("video.deleted").annotate(description="The object type that signals the deletion response."), "deleted": _S.Boolean.annotate(description="Indicates that the video resource was deleted."), "id": _S.String.annotate(description="Identifier of the deleted video.")}).annotate(title="Deleted video response", description="Confirmation payload returned after deleting a video.", identifier="DeletedVideoResource")
|
|
534
|
+
VideoContentVariant: _S.Bottom[_T.VideoContentVariant, _t.Any] = _b.literals(["video", "thumbnail", "spritesheet"]).annotate(identifier="VideoContentVariant")
|
|
535
|
+
CreateVideoRemixBody: _StructSchema[_T.CreateVideoRemixBody, _t.Never, _t.Never] = _b.struct(_T.CreateVideoRemixBody, {"prompt": _b.check(_b.check(_S.String.annotate(description="Updated text prompt that directs the remix 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"))}).annotate(title="Create video remix request", description="Parameters for remixing an existing generated video.", identifier="CreateVideoRemixBody")
|
|
536
|
+
TruncationEnum: _S.Bottom[_T.TruncationEnum, _t.Any] = _b.literals(["auto", "disabled"]).annotate(identifier="TruncationEnum")
|
|
537
|
+
PersonalityEnum: _S.Bottom[_T.PersonalityEnum, _t.Any] = _b.union(_S.String, _b.literals(["friendly", "pragmatic"])).annotate(identifier="PersonalityEnum")
|
|
538
|
+
TokenCountsResource: _StructSchema[_T.TokenCountsResource, _t.Never, _t.Never] = _b.struct(_T.TokenCountsResource, {"object": _b.literal("response.input_tokens"), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(title="Token counts", identifier="TokenCountsResource")
|
|
539
|
+
PromptCacheRetentionEnum: _S.Bottom[_T.PromptCacheRetentionEnum, _t.Any] = _b.literals(["in_memory", "in-memory", "24h"]).annotate(identifier="PromptCacheRetentionEnum")
|
|
540
|
+
ServiceTierEnum: _S.Bottom[_T.ServiceTierEnum, _t.Any] = _b.literals(["auto", "default", "fast", "flex", "priority"]).annotate(identifier="ServiceTierEnum")
|
|
541
|
+
SkillResource: _StructSchema[_T.SkillResource, _t.Never, _t.Never] = _b.struct(_T.SkillResource, {"id": _S.String.annotate(description="Unique identifier for the skill."), "object": _b.literal("skill").annotate(description="The object type, which is `skill`."), "name": _S.String.annotate(description="Name of the skill."), "description": _S.String.annotate(description="Description of the skill."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (seconds) for when the skill was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "default_version": _S.String.annotate(description="Default version for the skill."), "latest_version": _S.String.annotate(description="Latest version for the skill.")}).annotate(identifier="SkillResource")
|
|
542
|
+
CreateSkillBody: _StructSchema[_T.CreateSkillBody, _t.Never, _t.Never] = _b.struct(_T.CreateSkillBody, {"files": _b.union(_b.check(_b.array(_S.String.annotate(format="binary")).annotate(description="Skill files to upload (directory upload) or a single zip file."), _S.is_max_length(500).annotate(expected="a value with a length of at most 500")), _S.String.annotate(description="Skill zip file to upload.", format="binary"), mode="one_of")}).annotate(title="Create skill request", description="Uploads a skill either as a directory (multipart `files[]`) or as a single zip file.", identifier="CreateSkillBody")
|
|
543
|
+
SetDefaultSkillVersionBody: _StructSchema[_T.SetDefaultSkillVersionBody, _t.Never, _t.Never] = _b.struct(_T.SetDefaultSkillVersionBody, {"default_version": _S.String.annotate(description="The skill version number to set as default.")}).annotate(title="Update skill request", description="Updates the default version pointer for a skill.", identifier="SetDefaultSkillVersionBody")
|
|
544
|
+
DeletedSkillResource: _StructSchema[_T.DeletedSkillResource, _t.Never, _t.Never] = _b.struct(_T.DeletedSkillResource, {"object": _b.literal("skill.deleted"), "deleted": _S.Boolean, "id": _S.String}).annotate(identifier="DeletedSkillResource")
|
|
545
|
+
SkillVersionResource: _StructSchema[_T.SkillVersionResource, _t.Never, _t.Never] = _b.struct(_T.SkillVersionResource, {"object": _b.literal("skill.version").annotate(description="The object type, which is `skill.version`."), "id": _S.String.annotate(description="Unique identifier for the skill version."), "skill_id": _S.String.annotate(description="Identifier of the skill for this version."), "version": _S.String.annotate(description="Version number for this skill."), "created_at": _b.check(_S.Number.annotate(description="Unix timestamp (seconds) for when the version was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "name": _S.String.annotate(description="Name of the skill version."), "description": _S.String.annotate(description="Description of the skill version.")}).annotate(identifier="SkillVersionResource")
|
|
546
|
+
CreateSkillVersionBody: _StructSchema[_T.CreateSkillVersionBody, _t.Never, _t.Never] = _b.struct(_T.CreateSkillVersionBody, {"files": _b.union(_b.check(_b.array(_S.String.annotate(format="binary")).annotate(description="Skill files to upload (directory upload) or a single zip file."), _S.is_max_length(500).annotate(expected="a value with a length of at most 500")), _S.String.annotate(description="Skill zip file to upload.", format="binary"), mode="one_of"), "default": _S.Boolean.annotate(description="Whether to set this version as the default.")}, optional=("default",)).annotate(title="Create skill version request", description="Uploads a new immutable version of a skill.", identifier="CreateSkillVersionBody")
|
|
547
|
+
DeletedSkillVersionResource: _StructSchema[_T.DeletedSkillVersionResource, _t.Never, _t.Never] = _b.struct(_T.DeletedSkillVersionResource, {"object": _b.literal("skill.version.deleted"), "deleted": _S.Boolean, "id": _S.String, "version": _S.String.annotate(description="The deleted skill version.")}).annotate(identifier="DeletedSkillVersionResource")
|
|
548
|
+
ChatkitWorkflowTracing: _StructSchema[_T.ChatkitWorkflowTracing, _t.Never, _t.Never] = _b.struct(_T.ChatkitWorkflowTracing, {"enabled": _S.Boolean.annotate(description="Indicates whether tracing is enabled.")}).annotate(title="Tracing Configuration", description="Controls diagnostic tracing during the session.", identifier="ChatkitWorkflowTracing")
|
|
549
|
+
ChatSessionRateLimits: _StructSchema[_T.ChatSessionRateLimits, _t.Never, _t.Never] = _b.struct(_T.ChatSessionRateLimits, {"max_requests_per_1_minute": _b.check(_S.Number.annotate(description="Maximum allowed requests per one-minute window."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Rate limits", description="Active per-minute request limit for the session.", identifier="ChatSessionRateLimits")
|
|
550
|
+
ChatSessionStatus: _S.Bottom[_T.ChatSessionStatus, _t.Any] = _b.literals(["active", "expired", "cancelled"]).annotate(identifier="ChatSessionStatus")
|
|
551
|
+
ChatSessionAutomaticThreadTitling: _StructSchema[_T.ChatSessionAutomaticThreadTitling, _t.Never, _t.Never] = _b.struct(_T.ChatSessionAutomaticThreadTitling, {"enabled": _S.Boolean.annotate(description="Whether automatic thread titling is enabled.")}).annotate(title="Automatic thread titling", description="Automatic thread title preferences for the session.", identifier="ChatSessionAutomaticThreadTitling")
|
|
552
|
+
ChatSessionFileUpload: _StructSchema[_T.ChatSessionFileUpload, _t.Never, _t.Never] = _b.struct(_T.ChatSessionFileUpload, {"enabled": _S.Boolean.annotate(description="Indicates if uploads are enabled for the session."), "max_file_size": _b.union(_b.check(_S.Number.annotate(description="Maximum upload size in megabytes."), _S.is_int().annotate(expected="an integer")), _S.Null), "max_files": _b.union(_b.check(_S.Number.annotate(description="Maximum number of uploads allowed during the session."), _S.is_int().annotate(expected="an integer")), _S.Null)}).annotate(title="File upload settings", description="Upload permissions and limits applied to the session.", identifier="ChatSessionFileUpload")
|
|
553
|
+
ChatSessionHistory: _StructSchema[_T.ChatSessionHistory, _t.Never, _t.Never] = _b.struct(_T.ChatSessionHistory, {"enabled": _S.Boolean.annotate(description="Indicates if chat history is persisted for the session."), "recent_threads": _b.union(_b.check(_S.Number.annotate(description="Number of prior threads surfaced in history views. Defaults to null when all history is retained."), _S.is_int().annotate(expected="an integer")), _S.Null)}).annotate(title="History settings", description="History retention preferences returned for the session.", identifier="ChatSessionHistory")
|
|
554
|
+
WorkflowTracingParam: _StructSchema[_T.WorkflowTracingParam, _t.Never, _t.Never] = _b.struct(_T.WorkflowTracingParam, {"enabled": _S.Boolean.annotate(description="Whether tracing is enabled during the session. Defaults to true.")}, optional=("enabled",)).annotate(title="Tracing Configuration", description="Controls diagnostic tracing during the session.", identifier="WorkflowTracingParam")
|
|
555
|
+
ExpiresAfterParam: _StructSchema[_T.ExpiresAfterParam, _t.Never, _t.Never] = _b.struct(_T.ExpiresAfterParam, {"anchor": _b.literal("created_at").annotate(description="Base timestamp used to calculate expiration. Currently fixed to `created_at`."), "seconds": _b.check(_b.check(_b.check(_S.Number.annotate(description="Number of seconds after the anchor when the session expires.", format="int64"), _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(600).annotate(expected="a value less than or equal to 600"))}).annotate(title="Expiration overrides", description="Controls when the session expires relative to an anchor timestamp.", identifier="ExpiresAfterParam")
|
|
556
|
+
RateLimitsParam: _StructSchema[_T.RateLimitsParam, _t.Never, _t.Never] = _b.struct(_T.RateLimitsParam, {"max_requests_per_1_minute": _b.check(_b.check(_S.Number.annotate(description="Maximum number of requests allowed per minute for the session. Defaults to 10."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1"))}, optional=("max_requests_per_1_minute",)).annotate(title="Rate limit overrides", description="Controls request rate limits for the session.", identifier="RateLimitsParam")
|
|
557
|
+
AutomaticThreadTitlingParam: _StructSchema[_T.AutomaticThreadTitlingParam, _t.Never, _t.Never] = _b.struct(_T.AutomaticThreadTitlingParam, {"enabled": _S.Boolean.annotate(description="Enable automatic thread title generation. Defaults to true.")}, optional=("enabled",)).annotate(title="Automatic thread titling configuration", description="Controls whether ChatKit automatically generates thread titles.", identifier="AutomaticThreadTitlingParam")
|
|
558
|
+
FileUploadParam: _StructSchema[_T.FileUploadParam, _t.Never, _t.Never] = _b.struct(_T.FileUploadParam, {"enabled": _S.Boolean.annotate(description="Enable uploads for this session. Defaults to false."), "max_file_size": _b.check(_b.check(_b.check(_S.Number.annotate(description="Maximum size in megabytes for each uploaded file. Defaults to 512 MB, which is the maximum allowable size."), _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(512).annotate(expected="a value less than or equal to 512")), "max_files": _b.check(_b.check(_S.Number.annotate(description="Maximum number of files that can be uploaded to the session. Defaults to 10."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1"))}, optional=("enabled", "max_file_size", "max_files",)).annotate(title="File upload configuration", description="Controls whether users can upload files.", identifier="FileUploadParam")
|
|
559
|
+
HistoryParam: _StructSchema[_T.HistoryParam, _t.Never, _t.Never] = _b.struct(_T.HistoryParam, {"enabled": _S.Boolean.annotate(description="Enables chat users to access previous ChatKit threads. Defaults to true."), "recent_threads": _b.check(_b.check(_S.Number.annotate(description="Number of recent ChatKit threads users have access to. Defaults to unlimited when unset."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1"))}, optional=("enabled", "recent_threads",)).annotate(title="Chat history configuration", description="Controls how much historical context is retained for the session.", identifier="HistoryParam")
|
|
560
|
+
UserMessageInputText: _StructSchema[_T.UserMessageInputText, _t.Never, _t.Never] = _b.struct(_T.UserMessageInputText, {"type": _b.literal("input_text").annotate(description="Type discriminator that is always `input_text`."), "text": _S.String.annotate(description="Plain-text content supplied by the user.")}).annotate(title="User message input", description="Text block that a user contributed to the thread.", identifier="UserMessageInputText")
|
|
561
|
+
UserMessageQuotedText: _StructSchema[_T.UserMessageQuotedText, _t.Never, _t.Never] = _b.struct(_T.UserMessageQuotedText, {"type": _b.literal("quoted_text").annotate(description="Type discriminator that is always `quoted_text`."), "text": _S.String.annotate(description="Quoted text content.")}).annotate(title="User message quoted text", description="Quoted snippet that the user referenced in their message.", identifier="UserMessageQuotedText")
|
|
562
|
+
AttachmentType: _S.Bottom[_T.AttachmentType, _t.Any] = _b.literals(["image", "file"]).annotate(identifier="AttachmentType")
|
|
563
|
+
ToolChoice: _StructSchema[_T.ToolChoice, _t.Never, _t.Never] = _b.struct(_T.ToolChoice, {"id": _S.String.annotate(description="Identifier of the requested tool.")}).annotate(title="Tool choice", description="Tool selection that the assistant should honor when executing the item.", identifier="ToolChoice")
|
|
564
|
+
FileAnnotationSource: _StructSchema[_T.FileAnnotationSource, _t.Never, _t.Never] = _b.struct(_T.FileAnnotationSource, {"type": _b.literal("file").annotate(description="Type discriminator that is always `file`."), "filename": _S.String.annotate(description="Filename referenced by the annotation.")}).annotate(title="File annotation source", description="Attachment source referenced by an annotation.", identifier="FileAnnotationSource")
|
|
565
|
+
UrlAnnotationSource: _StructSchema[_T.UrlAnnotationSource, _t.Never, _t.Never] = _b.struct(_T.UrlAnnotationSource, {"type": _b.literal("url").annotate(description="Type discriminator that is always `url`."), "url": _S.String.annotate(description="URL referenced by the annotation.", format="uri")}).annotate(title="URL annotation source", description="URL backing an annotation entry.", identifier="UrlAnnotationSource")
|
|
566
|
+
WidgetMessageItem: _StructSchema[_T.WidgetMessageItem, _t.Never, _t.Never] = _b.struct(_T.WidgetMessageItem, {"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.widget").annotate(description="Type discriminator that is always `chatkit.widget`."), "widget": _S.String.annotate(description="Serialized widget payload rendered in the UI.")}).annotate(title="Widget message", description="Thread item that renders a widget payload.", identifier="WidgetMessageItem")
|
|
567
|
+
ClientToolCallStatus: _S.Bottom[_T.ClientToolCallStatus, _t.Any] = _b.literals(["in_progress", "completed"]).annotate(identifier="ClientToolCallStatus")
|
|
568
|
+
TaskType: _S.Bottom[_T.TaskType, _t.Any] = _b.literals(["custom", "thought"]).annotate(identifier="TaskType")
|
|
569
|
+
ActiveStatus: _StructSchema[_T.ActiveStatus, _t.Never, _t.Never] = _b.struct(_T.ActiveStatus, {"type": _b.literal("active").annotate(description="Status discriminator that is always `active`.")}).annotate(title="Active thread status", description="Indicates that a thread is active.", identifier="ActiveStatus")
|
|
570
|
+
LockedStatus: _StructSchema[_T.LockedStatus, _t.Never, _t.Never] = _b.struct(_T.LockedStatus, {"type": _b.literal("locked").annotate(description="Status discriminator that is always `locked`."), "reason": _b.union(_S.String.annotate(description="Reason that the thread was locked. Defaults to null when no reason is recorded."), _S.Null)}).annotate(title="Locked thread status", description="Indicates that a thread is locked and cannot accept new input.", identifier="LockedStatus")
|
|
571
|
+
ClosedStatus: _StructSchema[_T.ClosedStatus, _t.Never, _t.Never] = _b.struct(_T.ClosedStatus, {"type": _b.literal("closed").annotate(description="Status discriminator that is always `closed`."), "reason": _b.union(_S.String.annotate(description="Reason that the thread was closed. Defaults to null when no reason is recorded."), _S.Null)}).annotate(title="Closed thread status", description="Indicates that a thread has been closed.", identifier="ClosedStatus")
|
|
572
|
+
DeletedThreadResource: _StructSchema[_T.DeletedThreadResource, _t.Never, _t.Never] = _b.struct(_T.DeletedThreadResource, {"id": _S.String.annotate(description="Identifier of the deleted thread."), "object": _b.literal("chatkit.thread.deleted").annotate(description="Type discriminator that is always `chatkit.thread.deleted`."), "deleted": _S.Boolean.annotate(description="Indicates that the thread has been deleted.")}).annotate(title="Deleted thread", description="Confirmation payload returned after deleting a thread.", identifier="DeletedThreadResource")
|
|
573
|
+
DecisionInputText: _StructSchema[_T.DecisionInputText, _t.Never, _t.Never] = _b.struct(_T.DecisionInputText, {"type": _b.literal("input_text"), "text": _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"))}).annotate(identifier="DecisionInputText")
|
|
574
|
+
ImageDetailParam: _S.Bottom[_T.ImageDetailParam, _t.Any] = _b.literals(["low", "high", "auto", "original"]).annotate(identifier="ImageDetailParam")
|
|
575
|
+
QuestionParamPredicate: _StructSchema[_T.QuestionParamPredicate, _t.Never, _t.Never] = _b.struct(_T.QuestionParamPredicate, {"type": _b.literal("predicate").annotate(description="The type of the object. Always `predicate`."), "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"))}, optional=("name",)).annotate(description="Estimate how likely it is that a statement about the input is true.", identifier="QuestionParamPredicate")
|
|
576
|
+
ChoiceValueParam: _S.Bottom[_T.ChoiceValueParam, _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")), _S.Boolean, mode="one_of").annotate(description="Choice values are typed: a string and a boolean with the same text are distinct.", identifier="ChoiceValueParam")
|
|
577
|
+
ScoreLevelParam: _StructSchema[_T.ScoreLevelParam, _t.Never, _t.Never] = _b.struct(_T.ScoreLevelParam, {"label": _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")), "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="ScoreLevelParam")
|
|
578
|
+
AnswerResourcePredicate: _StructSchema[_T.AnswerResourcePredicate, _t.Never, _t.Never] = _b.struct(_T.AnswerResourcePredicate, {"type": _b.literal("predicate").annotate(description="The type of the object. Always `predicate`."), "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), "probability": _S.Finite}).annotate(identifier="AnswerResourcePredicate")
|
|
579
|
+
ChoiceValueResource: _S.Bottom[_T.ChoiceValueResource, _t.Any] = _b.union(_b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.Boolean, mode="one_of").annotate(description="Choice values are typed: a string and a boolean with the same text are distinct.", identifier="ChoiceValueResource")
|
|
580
|
+
ScoreProbabilityResource: _StructSchema[_T.ScoreProbabilityResource, _t.Never, _t.Never] = _b.struct(_T.ScoreProbabilityResource, {"value": _b.check(_S.Number.annotate(format="int64"), _S.is_int().annotate(expected="an integer")), "label": _b.check(_S.String, _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "probability": _S.Finite}).annotate(identifier="ScoreProbabilityResource")
|
|
581
|
+
AnswerResourceRefusal: _StructSchema[_T.AnswerResourceRefusal, _t.Never, _t.Never] = _b.struct(_T.AnswerResourceRefusal, {"type": _b.literal("refusal").annotate(description="The type of the object. Always `refusal`."), "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 model declined to answer this question. Other questions in the same request can still receive answers.", identifier="AnswerResourceRefusal")
|
|
582
|
+
InputTokensDetailsResource: _StructSchema[_T.InputTokensDetailsResource, _t.Never, _t.Never] = _b.struct(_T.InputTokensDetailsResource, {"cached_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")), "cache_write_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="InputTokensDetailsResource")
|
|
583
|
+
OutputTokensDetailsResource: _StructSchema[_T.OutputTokensDetailsResource, _t.Never, _t.Never] = _b.struct(_T.OutputTokensDetailsResource, {"reasoning_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="OutputTokensDetailsResource")
|
|
584
|
+
ListOrderParam: _S.Bottom[_T.ListOrderParam, _t.Any] = _b.literals(["asc", "desc"]).annotate(description="The order in which paginated resources are returned.", identifier="ListOrderParam")
|
|
585
|
+
EnvironmentTypeParam: _S.Bottom[_T.EnvironmentTypeParam, _t.Any] = _b.literal("openai_hosted").annotate(description="The hosting type of an execution environment.", identifier="EnvironmentTypeParam")
|
|
586
|
+
EnvironmentTypeResource: _S.Bottom[_T.EnvironmentTypeResource, _t.Any] = _b.literals(["openai_hosted", "self_hosted"]).annotate(description="The kind of execution environment.", identifier="EnvironmentTypeResource")
|
|
587
|
+
EnvironmentStatusResource: _S.Bottom[_T.EnvironmentStatusResource, _t.Any] = _b.literals(["pending", "ready", "connected", "disconnected", "suspended", "expired", "failed"]).annotate(description="The public lifecycle status of an execution environment.", identifier="EnvironmentStatusResource")
|
|
588
|
+
HostedEnvironmentFileResourceFileId: _StructSchema[_T.HostedEnvironmentFileResourceFileId, _t.Never, _t.Never] = _b.struct(_T.HostedEnvironmentFileResourceFileId, {"type": _b.literal("file_id").annotate(description="The type of the object. Always `file_id`."), "id": _b.check(_S.String.annotate(description="The session-scoped ID of the file in the execution environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "file_id": _b.check(_S.String.annotate(description="The ID of the uploaded file."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "path": _b.check(_S.String.annotate(description="The file's absolute path inside the environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "size_bytes": _b.check(_b.check(_S.Number.annotate(description="The decoded file size in bytes.", 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"))}).annotate(description="A file copied from the OpenAI Files API.", identifier="HostedEnvironmentFileResourceFileId")
|
|
589
|
+
HostedEnvironmentFileResourceInline: _StructSchema[_T.HostedEnvironmentFileResourceInline, _t.Never, _t.Never] = _b.struct(_T.HostedEnvironmentFileResourceInline, {"type": _b.literal("inline").annotate(description="The type of the object. Always `inline`."), "id": _b.check(_S.String.annotate(description="The session-scoped ID of the file in the execution environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "path": _b.check(_S.String.annotate(description="The file's absolute path inside the environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "size_bytes": _b.check(_b.check(_S.Number.annotate(description="The decoded file size in bytes.", 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"))}).annotate(description="A file supplied inline when the session was created.", identifier="HostedEnvironmentFileResourceInline")
|
|
590
|
+
HostedSkillResourceSkillReference: _StructSchema[_T.HostedSkillResourceSkillReference, _t.Never, _t.Never] = _b.struct(_T.HostedSkillResourceSkillReference, {"type": _b.literal("skill_reference").annotate(description="The type of the object. Always `skill_reference`."), "skill_id": _b.check(_S.String.annotate(description="The referenced skill ID."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "version": _b.check(_S.String.annotate(description="The concrete skill version installed for this session."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "name": _b.check(_S.String.annotate(description="The installed skill name."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "description": _b.check(_S.String.annotate(description="The installed skill description."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A skill installed from the Skills API.", identifier="HostedSkillResourceSkillReference")
|
|
591
|
+
HostedSkillResourceInline: _StructSchema[_T.HostedSkillResourceInline, _t.Never, _t.Never] = _b.struct(_T.HostedSkillResourceInline, {"type": _b.literal("inline").annotate(description="The type of the object. Always `inline`."), "name": _b.check(_S.String.annotate(description="The installed skill name."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "description": _b.check(_S.String.annotate(description="The installed skill description."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A skill installed from an inline ZIP archive.", identifier="HostedSkillResourceInline")
|
|
592
|
+
HostedPluginResourceInline: _StructSchema[_T.HostedPluginResourceInline, _t.Never, _t.Never] = _b.struct(_T.HostedPluginResourceInline, {"type": _b.literal("inline").annotate(description="The type of the object. Always `inline`."), "name": _b.check(_S.String.annotate(description="The installed plugin name."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "description": _b.check(_S.String.annotate(description="The installed plugin description."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A plugin installed from an inline ZIP archive.", identifier="HostedPluginResourceInline")
|
|
593
|
+
ErrorBodyResource: _StructSchema[_T.ErrorBodyResource, _t.Never, _t.Never] = _b.struct(_T.ErrorBodyResource, {"type": _b.check(_S.String.annotate(description="The error type."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "code": _b.check(_S.String.annotate(description="A machine-readable error code."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "message": _b.check(_S.String.annotate(description="A human-readable error message."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "param": _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 request parameter that caused the error, or null for a request-wide error.")}).annotate(description="Details about an API error.", identifier="ErrorBodyResource")
|
|
594
|
+
EnvironmentPackagesParam: _StructSchema[_T.EnvironmentPackagesParam, _t.Never, _t.Never] = _b.struct(_T.EnvironmentPackagesParam, {"python": _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="Python packages to install. Defaults to an empty list."), "system": _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="System packages to install. Defaults to an empty list."), "npm": _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="npm packages to install globally. Defaults to an empty list.")}, optional=("python", "system", "npm",)).annotate(description="Packages to install in an OpenAI-hosted environment.", identifier="EnvironmentPackagesParam")
|
|
595
|
+
SetupCommandParam: _StructSchema[_T.SetupCommandParam, _t.Never, _t.Never] = _b.struct(_T.SetupCommandParam, {"command": _b.check(_b.check(_S.String.annotate(description="The shell command to execute."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(65536).annotate(expected="a string with at most 65536 code points")), "cwd": _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(4096).annotate(expected="a string with at most 4096 code points")), _S.Null).annotate(description="The absolute working directory. Defaults to `/workspace`.")}, optional=("cwd",)).annotate(description="A confidential setup command executed before the hosted agent starts.", identifier="SetupCommandParam")
|
|
596
|
+
NetworkAccessParam: _S.Bottom[_T.NetworkAccessParam, _t.Any] = _b.literals(["enabled", "disabled", "restricted"]).annotate(description="The network access mode for an OpenAI-hosted environment.", identifier="NetworkAccessParam")
|
|
597
|
+
DesktopParam: _StructSchema[_T.DesktopParam, _t.Never, _t.Never] = _b.struct(_T.DesktopParam, {"enabled": _S.Boolean.annotate(description="Whether to provision the desktop and its browser proxy.")}).annotate(description="Desktop configuration for an OpenAI-hosted environment.", identifier="DesktopParam")
|
|
598
|
+
HostedSkillParamSkillReference: _StructSchema[_T.HostedSkillParamSkillReference, _t.Never, _t.Never] = _b.struct(_T.HostedSkillParamSkillReference, {"type": _b.literal("skill_reference").annotate(description="The type of the object. Always `skill_reference`."), "skill_id": _b.check(_b.check(_S.String.annotate(description="The ID of the skill created through `/v1/skills`."), _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")), "version": _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 skill version, a positive integer or `latest`; omission selects the default.")}, optional=("version",)).annotate(description="References a skill uploaded through the Skills API.", identifier="HostedSkillParamSkillReference")
|
|
599
|
+
InlineCapabilitySourceParamBase64: _StructSchema[_T.InlineCapabilitySourceParamBase64, _t.Never, _t.Never] = _b.struct(_T.InlineCapabilitySourceParamBase64, {"type": _b.literal("base64").annotate(description="The type of the object. Always `base64`."), "media_type": _b.literal("application/zip").annotate(description="The archive media type, always `application/zip`."), "data": _b.check(_b.check(_S.String.annotate(description="Standard-base64 encoded ZIP archive bytes."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(70254592).annotate(expected="a string with at most 70254592 code points"))}).annotate(description="Provides ZIP bytes encoded with standard base64.", identifier="InlineCapabilitySourceParamBase64")
|
|
600
|
+
HostedEnvironmentFileParamFileId: _StructSchema[_T.HostedEnvironmentFileParamFileId, _t.Never, _t.Never] = _b.struct(_T.HostedEnvironmentFileParamFileId, {"type": _b.literal("file_id").annotate(description="The type of the object. Always `file_id`."), "file_id": _b.check(_b.check(_S.String.annotate(description="The ID of the uploaded file."), _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")), "path": _b.check(_b.check(_S.String.annotate(description="The absolute destination path inside `/workspace`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(4096).annotate(expected="a string with at most 4096 code points"))}).annotate(description="A file previously uploaded through the OpenAI Files API.", identifier="HostedEnvironmentFileParamFileId")
|
|
601
|
+
HostedEnvironmentFileParamInline: _StructSchema[_T.HostedEnvironmentFileParamInline, _t.Never, _t.Never] = _b.struct(_T.HostedEnvironmentFileParamInline, {"type": _b.literal("inline").annotate(description="The type of the object. Always `inline`."), "data": _b.check(_b.check(_S.String.annotate(description="The standard-base64-encoded file contents."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(6990508).annotate(expected="a string with at most 6990508 code points")), "path": _b.check(_b.check(_S.String.annotate(description="The absolute destination path inside `/workspace`."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(4096).annotate(expected="a string with at most 4096 code points"))}).annotate(description="A file supplied directly as standard-base64 data.", identifier="HostedEnvironmentFileParamInline")
|
|
602
|
+
EnvironmentFilePageObjectResource: _S.Bottom[_T.EnvironmentFilePageObjectResource, _t.Any] = _b.literal("page").annotate(description="The object type for a page of files in an execution environment.", identifier="EnvironmentFilePageObjectResource")
|
|
603
|
+
EnvironmentFileResource: _StructSchema[_T.EnvironmentFileResource, _t.Never, _t.Never] = _b.struct(_T.EnvironmentFileResource, {"object": _b.literal("agent.environment.file").annotate(description="The object type. Always `agent.environment.file`."), "environment_id": _b.check(_S.String.annotate(description="The ID of the environment containing this file."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "path": _b.check(_S.String.annotate(description="The absolute file path inside the environment's workspace."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "size_bytes": _b.check(_b.check(_S.Number.annotate(description="The file size in bytes.", 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"))}).annotate(description="A live file in an execution environment.", identifier="EnvironmentFileResource")
|
|
604
|
+
SubagentObjectResource: _S.Bottom[_T.SubagentObjectResource, _t.Any] = _b.literal("agent.session.subagent").annotate(description="The object type for a subagent.", identifier="SubagentObjectResource")
|
|
605
|
+
OutputTextResource: _StructSchema[_T.OutputTextResource, _t.Never, _t.Never] = _b.struct(_T.OutputTextResource, {"type": _b.literal("output_text").annotate(description="The content type. Always `output_text`."), "text": _b.check(_S.String.annotate(description="The text produced by the agent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A text content part produced by the agent.", identifier="OutputTextResource")
|
|
606
|
+
EncryptedContentResource: _StructSchema[_T.EncryptedContentResource, _t.Never, _t.Never] = _b.struct(_T.EncryptedContentResource, {"type": _b.literal("encrypted_content").annotate(description="The content type. Always `encrypted_content`."), "encrypted_content": _b.check(_S.String.annotate(description="The encrypted content payload."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Encrypted content exchanged between agents.", identifier="EncryptedContentResource")
|
|
607
|
+
SubagentStatusResource: _S.Bottom[_T.SubagentStatusResource, _t.Any] = _b.literals(["active", "closed"]).annotate(description="The current status of a subagent.", identifier="SubagentStatusResource")
|
|
608
|
+
SessionMessageRoleResource: _S.Bottom[_T.SessionMessageRoleResource, _t.Any] = _b.literals(["user", "assistant"]).annotate(description="The author of a session message.", identifier="SessionMessageRoleResource")
|
|
609
|
+
MessageContentResourceInputText: _StructSchema[_T.MessageContentResourceInputText, _t.Never, _t.Never] = _b.struct(_T.MessageContentResourceInputText, {"type": _b.literal("input_text").annotate(description="The type of the object. Always `input_text`."), "text": _b.check(_S.String.annotate(description="The text supplied by the user."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Text supplied by the user.", identifier="MessageContentResourceInputText")
|
|
610
|
+
MessageContentResourceInputImage: _StructSchema[_T.MessageContentResourceInputImage, _t.Never, _t.Never] = _b.struct(_T.MessageContentResourceInputImage, {"type": _b.literal("input_image").annotate(description="The type of the object. Always `input_image`."), "image_url": _b.check(_S.String.annotate(description="The URL of the image supplied by the user, which may be a base64-encoded data URL."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="An image supplied by the user.", identifier="MessageContentResourceInputImage")
|
|
611
|
+
MessageContentResourceOutputText: _StructSchema[_T.MessageContentResourceOutputText, _t.Never, _t.Never] = _b.struct(_T.MessageContentResourceOutputText, {"type": _b.literal("output_text").annotate(description="The type of the object. Always `output_text`."), "text": _b.check(_S.String.annotate(description="The text produced by the assistant."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Text produced by the assistant.", identifier="MessageContentResourceOutputText")
|
|
612
|
+
OutputItemStatusResource: _S.Bottom[_T.OutputItemStatusResource, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(description="The status of an agent output item.", identifier="OutputItemStatusResource")
|
|
613
|
+
MessagePhaseResource: _S.Bottom[_T.MessagePhaseResource, _t.Any] = _b.literals(["commentary", "final_answer"]).annotate(description="The phase of an assistant message.", identifier="MessagePhaseResource")
|
|
614
|
+
SummaryTextResource: _StructSchema[_T.SummaryTextResource, _t.Never, _t.Never] = _b.struct(_T.SummaryTextResource, {"type": _b.literal("summary_text").annotate(description="The content type. Always `summary_text`."), "text": _b.check(_S.String.annotate(description="The reasoning summary text."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A reasoning summary content part.", identifier="SummaryTextResource")
|
|
615
|
+
FunctionCallStatusResource: _S.Bottom[_T.FunctionCallStatusResource, _t.Any] = _b.literals(["in_progress", "completed", "failed", "incomplete"]).annotate(description="The status of a tool call.", identifier="FunctionCallStatusResource")
|
|
616
|
+
InputContentResourceInputText: _StructSchema[_T.InputContentResourceInputText, _t.Never, _t.Never] = _b.struct(_T.InputContentResourceInputText, {"type": _b.literal("input_text").annotate(description="The type of the object. Always `input_text`."), "text": _b.check(_S.String.annotate(description="The text supplied to the agent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Text input recorded in a session item.", identifier="InputContentResourceInputText")
|
|
617
|
+
InputContentResourceInputImage: _StructSchema[_T.InputContentResourceInputImage, _t.Never, _t.Never] = _b.struct(_T.InputContentResourceInputImage, {"type": _b.literal("input_image").annotate(description="The type of the object. Always `input_image`."), "image_url": _b.check(_S.String.annotate(description="The URL of the image supplied to the agent, which may be a base64-encoded data URL."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Image input recorded in a session item.", identifier="InputContentResourceInputImage")
|
|
618
|
+
ComputerScreenshotResource: _StructSchema[_T.ComputerScreenshotResource, _t.Never, _t.Never] = _b.struct(_T.ComputerScreenshotResource, {"type": _b.literal("computer_screenshot").annotate(description="The content type. Always `computer_screenshot`."), "image_url": _b.check(_S.String.annotate(description="The complete JPEG image as a base64 data URL."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A browser screenshot emitted by the model during computer use.", identifier="ComputerScreenshotResource")
|
|
619
|
+
BrowserAuthenticationFieldResource: _StructSchema[_T.BrowserAuthenticationFieldResource, _t.Never, _t.Never] = _b.struct(_T.BrowserAuthenticationFieldResource, {"id": _b.check(_S.String.annotate(description="The field ID to submit as field_id in a fields entry."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "label": _b.check(_S.String.annotate(description="The label to display beside the control."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "type": _b.check(_S.String.annotate(description="The rendering type, such as email, password, or text."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "required": _S.Boolean.annotate(description="Whether this control requires a nonempty value.")}).annotate(description="A control in a registered browser-login form.", identifier="BrowserAuthenticationFieldResource")
|
|
620
|
+
BrowserAuthenticationOptionResource: _StructSchema[_T.BrowserAuthenticationOptionResource, _t.Never, _t.Never] = _b.struct(_T.BrowserAuthenticationOptionResource, {"id": _b.check(_S.String.annotate(description="The option ID to submit as selected_option."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "label": _b.check(_S.String.annotate(description="The method label to display."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "field_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="IDs from the registered fields that this method accepts."), _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 sign-in method and the fields that belong to it.", identifier="BrowserAuthenticationOptionResource")
|
|
621
|
+
ComputerUseApprovalResponseKindResourceBrowserAuthenticationSubmitResource: _StructSchema[_T.ComputerUseApprovalResponseKindResourceBrowserAuthenticationSubmitResource, _t.Never, _t.Never] = _b.struct(_T.ComputerUseApprovalResponseKindResourceBrowserAuthenticationSubmitResource, {"type": _b.literal("browser_authentication"), "action": _b.literal("submit"), "selected_option": _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 chosen sign-in method, or null when no options were offered.")}).annotate(identifier="ComputerUseApprovalResponseKindResourceBrowserAuthenticationSubmitResource")
|
|
622
|
+
ComputerUseApprovalResponseKindResourceBrowserAuthenticationCancelResource: _StructSchema[_T.ComputerUseApprovalResponseKindResourceBrowserAuthenticationCancelResource, _t.Never, _t.Never] = _b.struct(_T.ComputerUseApprovalResponseKindResourceBrowserAuthenticationCancelResource, {"type": _b.literal("browser_authentication"), "action": _b.literal("cancel")}).annotate(identifier="ComputerUseApprovalResponseKindResourceBrowserAuthenticationCancelResource")
|
|
623
|
+
WebSearchActionResourceSearch: _StructSchema[_T.WebSearchActionResourceSearch, _t.Never, _t.Never] = _b.struct(_T.WebSearchActionResourceSearch, {"type": _b.literal("search").annotate(description="The type of the object. Always `search`."), "query": _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 search query, when a single query was used."), "queries": _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 search queries, when multiple queries were used.")}).annotate(description="A search query or group of search queries.", identifier="WebSearchActionResourceSearch")
|
|
624
|
+
WebSearchActionResourceOpenPage: _StructSchema[_T.WebSearchActionResourceOpenPage, _t.Never, _t.Never] = _b.struct(_T.WebSearchActionResourceOpenPage, {"type": _b.literal("open_page").annotate(description="The type of the object. Always `open_page`."), "url": _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 URL of the page that was opened.")}).annotate(description="Opens a web page.", identifier="WebSearchActionResourceOpenPage")
|
|
625
|
+
WebSearchActionResourceFindInPage: _StructSchema[_T.WebSearchActionResourceFindInPage, _t.Never, _t.Never] = _b.struct(_T.WebSearchActionResourceFindInPage, {"type": _b.literal("find_in_page").annotate(description="The type of the object. Always `find_in_page`."), "url": _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 URL of the page that was searched."), "pattern": _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 text pattern that was searched for.")}).annotate(description="Finds text within a web page.", identifier="WebSearchActionResourceFindInPage")
|
|
626
|
+
WebSearchActionResourceOther: _StructSchema[_T.WebSearchActionResourceOther, _t.Never, _t.Never] = _b.struct(_T.WebSearchActionResourceOther, {"type": _b.literal("other").annotate(description="The type of the object. Always `other`.")}).annotate(description="Another web search action.", identifier="WebSearchActionResourceOther")
|
|
627
|
+
TurnObjectResource: _S.Bottom[_T.TurnObjectResource, _t.Any] = _b.literal("agent.session.turn").annotate(description="The object type for a turn.", identifier="TurnObjectResource")
|
|
628
|
+
TurnStatusResource: _S.Bottom[_T.TurnStatusResource, _t.Any] = _b.literals(["queued", "in_progress", "waiting", "completed", "failed", "cancelled"]).annotate(description="The current status of a turn.", identifier="TurnStatusResource")
|
|
629
|
+
SessionTurnErrorCodeResource: _S.Bottom[_T.SessionTurnErrorCodeResource, _t.Any] = _b.literals(["context_length_exceeded", "session_budget_exceeded", "usage_limit_exceeded", "project_spend_limit_exceeded", "organization_spend_limit_exceeded", "organization_usage_limit_exceeded", "billing_not_active", "credit_balance_exhausted", "rate_limit_exceeded", "flex_unavailable", "server_overloaded", "cyber_policy", "misalignment_policy_violation", "connection_failed", "server_error", "authentication_error", "invalid_request", "resource_not_found", "sandbox_error", "executor_version_incompatible", "active_turn_not_steerable", "request_timeout", "internal_error"]).annotate(description="Stable public categories for session request failures.", identifier="SessionTurnErrorCodeResource")
|
|
630
|
+
InputTokensDetailsResource_2: _StructSchema[_T.InputTokensDetailsResource_2, _t.Never, _t.Never] = _b.struct(_T.InputTokensDetailsResource_2, {"cached_tokens": _b.check(_S.Number.annotate(description="The number of input tokens retrieved from the prompt cache.", format="int64"), _S.is_int().annotate(expected="an integer"))}).annotate(description="A breakdown of input token usage for a session or turn.", identifier="InputTokensDetailsResource-2")
|
|
631
|
+
OutputTokensDetailsResource_2: _StructSchema[_T.OutputTokensDetailsResource_2, _t.Never, _t.Never] = _b.struct(_T.OutputTokensDetailsResource_2, {"reasoning_tokens": _b.check(_S.Number.annotate(description="The number of output tokens used for reasoning.", format="int64"), _S.is_int().annotate(expected="an integer"))}).annotate(description="A breakdown of output token usage for a session or turn.", identifier="OutputTokensDetailsResource-2")
|
|
632
|
+
ReasoningEffortResource: _S.Bottom[_T.ReasoningEffortResource, _t.Any] = _b.literals(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).annotate(description="The amount of reasoning effort used by an agent.", identifier="ReasoningEffortResource")
|
|
633
|
+
ReasoningSummaryResource: _S.Bottom[_T.ReasoningSummaryResource, _t.Any] = _b.literals(["concise", "detailed", "auto"]).annotate(description="The reasoning summary format requested from an agent.", identifier="ReasoningSummaryResource")
|
|
634
|
+
TextFormatResourceText: _StructSchema[_T.TextFormatResourceText, _t.Never, _t.Never] = _b.struct(_T.TextFormatResourceText, {"type": _b.literal("text").annotate(description="The type of the object. Always `text`.")}).annotate(description="Generates ordinary text without a structured-output constraint.", identifier="TextFormatResourceText")
|
|
635
|
+
TextFormatResourceJsonSchema: _StructSchema[_T.TextFormatResourceJsonSchema, _t.Never, _t.Never] = _b.struct(_T.TextFormatResourceJsonSchema, {"type": _b.literal("json_schema").annotate(description="The type of the object. Always `json_schema`."), "schema": _b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The JSON Schema that generated text must match."), _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"))}).annotate(description="Constrains generated text to a JSON Schema.", identifier="TextFormatResourceJsonSchema")
|
|
636
|
+
VerbosityResource: _S.Bottom[_T.VerbosityResource, _t.Any] = _b.literals(["low", "medium", "high"]).annotate(description="The amount of text produced by an agent.", identifier="VerbosityResource")
|
|
637
|
+
ServiceTierResource: _S.Bottom[_T.ServiceTierResource, _t.Any] = _b.literals(["auto", "default", "flex", "priority", "fast", "ultrafast"]).annotate(description="The service-tier policy configured for an agent.", identifier="ServiceTierResource")
|
|
638
|
+
PersistedAgentToolResourceFunction: _StructSchema[_T.PersistedAgentToolResourceFunction, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolResourceFunction, {"type": _b.literal("function").annotate(description="The type of the object. Always `function`."), "name": _b.check(_S.String.annotate(description="The name of the function."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "description": _b.check(_S.String.annotate(description="A description of what the function does."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "parameters": _b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A JSON Schema object describing the function's arguments."), _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")), "defer_loading": _S.Boolean.annotate(description="Whether the function is deferred and discovered through tool search.")}).annotate(description="A function defined by the application.", identifier="PersistedAgentToolResourceFunction")
|
|
639
|
+
PersistedAgentToolResourceToolSearch: _StructSchema[_T.PersistedAgentToolResourceToolSearch, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolResourceToolSearch, {"type": _b.literal("tool_search").annotate(description="The type of the object. Always `tool_search`.")}).annotate(description="Discovers deferred function tools and loads them into the model context.", identifier="PersistedAgentToolResourceToolSearch")
|
|
640
|
+
PersistedAgentToolResourceProgrammaticToolCalling: _StructSchema[_T.PersistedAgentToolResourceProgrammaticToolCalling, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolResourceProgrammaticToolCalling, {"type": _b.literal("programmatic_tool_calling").annotate(description="The type of the object. Always `programmatic_tool_calling`."), "enabled": _S.Boolean.annotate(description="Whether tools can be called from model-generated code.")}).annotate(description="Enables calling tools from model-generated code.", identifier="PersistedAgentToolResourceProgrammaticToolCalling")
|
|
641
|
+
PersistedMcpTransportResourceHttp: _StructSchema[_T.PersistedMcpTransportResourceHttp, _t.Never, _t.Never] = _b.struct(_T.PersistedMcpTransportResourceHttp, {"type": _b.literal("http").annotate(description="The type of the object. Always `http`."), "server_url": _b.check(_S.String.annotate(description="The URL of the MCP server."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "headers": _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="Non-secret HTTP headers sent to the 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"))}).annotate(description="Connects to an MCP server over HTTP.", identifier="PersistedMcpTransportResourceHttp")
|
|
642
|
+
PersistedMcpTransportResourceStdio: _StructSchema[_T.PersistedMcpTransportResourceStdio, _t.Never, _t.Never] = _b.struct(_T.PersistedMcpTransportResourceStdio, {"type": _b.literal("stdio").annotate(description="The type of the object. Always `stdio`."), "command": _b.check(_S.String.annotate(description="The command used to start the MCP server."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "args": _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="Arguments passed to the MCP server command."), _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")), "cwd": _b.check(_S.String.annotate(description="The working directory used to start the MCP server."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "env_vars": _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="Environment variable names inherited from the execution environment."), _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="Starts an MCP server as a local process.", identifier="PersistedMcpTransportResourceStdio")
|
|
643
|
+
McpConnectionOriginResource: _S.Bottom[_T.McpConnectionOriginResource, _t.Any] = _b.literals(["service", "environment"]).annotate(description="Where outbound MCP HTTP connections originate.", identifier="McpConnectionOriginResource")
|
|
644
|
+
WebSearchModeResource: _S.Bottom[_T.WebSearchModeResource, _t.Any] = _b.literals(["disabled", "cached", "live"]).annotate(description="The source used for web search results.", identifier="WebSearchModeResource")
|
|
645
|
+
WebSearchContextSizeResource: _S.Bottom[_T.WebSearchContextSizeResource, _t.Any] = _b.literals(["low", "medium", "high"]).annotate(description="The amount of web search context made available to the model.", identifier="WebSearchContextSizeResource")
|
|
646
|
+
WebSearchLocationResource: _StructSchema[_T.WebSearchLocationResource, _t.Never, _t.Never] = _b.struct(_T.WebSearchLocationResource, {"country": _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 two-letter ISO country code, such as `US`."), "region": _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 region or state name."), "city": _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 city name."), "timezone": _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 IANA timezone, such as `America/Los_Angeles`.")}).annotate(description="Approximate user location used to localize web search results.", identifier="WebSearchLocationResource")
|
|
647
|
+
PersistedAgentToolResourceComputerUse: _StructSchema[_T.PersistedAgentToolResourceComputerUse, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolResourceComputerUse, {"type": _b.literal("computer_use").annotate(description="The type of the object. Always `computer_use`."), "include_screenshots": _S.Boolean.annotate(description="Whether computer tool outputs include screenshots.")}).annotate(description="Browser use in an OpenAI-hosted session.", identifier="PersistedAgentToolResourceComputerUse")
|
|
648
|
+
MultiAgentConfigResource: _StructSchema[_T.MultiAgentConfigResource, _t.Never, _t.Never] = _b.struct(_T.MultiAgentConfigResource, {"enabled": _S.Boolean.annotate(description="Whether subagent tools are enabled. Defaults to false."), "max_concurrent_subagents": _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(4294967295).annotate(expected="a value less than or equal to 4294967295")), _S.Null).annotate(description="Maximum number of subagents that may run concurrently, or null when disabled. Defaults to 6 when enabled.", format="int64")}).annotate(description="The resolved configuration for creating and coordinating subagents.", identifier="MultiAgentConfigResource")
|
|
649
|
+
ReasoningEffortParam: _S.Bottom[_T.ReasoningEffortParam, _t.Any] = _b.literals(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).annotate(description="The amount of reasoning effort the model should use.", identifier="ReasoningEffortParam")
|
|
650
|
+
ReasoningSummaryParam: _S.Bottom[_T.ReasoningSummaryParam, _t.Any] = _b.literals(["concise", "detailed", "auto"]).annotate(description="The reasoning summary format requested from the model.", identifier="ReasoningSummaryParam")
|
|
651
|
+
TextFormatParamText: _StructSchema[_T.TextFormatParamText, _t.Never, _t.Never] = _b.struct(_T.TextFormatParamText, {"type": _b.literal("text").annotate(description="The type of the object. Always `text`.")}).annotate(description="Generates ordinary text without a structured-output constraint.", identifier="TextFormatParamText")
|
|
652
|
+
TextFormatParamJsonSchema: _StructSchema[_T.TextFormatParamJsonSchema, _t.Never, _t.Never] = _b.struct(_T.TextFormatParamJsonSchema, {"type": _b.literal("json_schema").annotate(description="The type of the object. Always `json_schema`."), "schema": _b.check(_b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The JSON Schema that generated text must match."), _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"))}).annotate(description="Constrains generated text to a JSON Schema.", identifier="TextFormatParamJsonSchema")
|
|
653
|
+
VerbosityParam: _S.Bottom[_T.VerbosityParam, _t.Any] = _b.literals(["low", "medium", "high"]).annotate(description="The amount of text the model should produce.", identifier="VerbosityParam")
|
|
654
|
+
ServiceTierParam: _S.Bottom[_T.ServiceTierParam, _t.Any] = _b.literals(["auto", "default", "flex", "priority", "fast"]).annotate(description="The service tier used for model requests.", identifier="ServiceTierParam")
|
|
655
|
+
PersistedAgentToolConfigParamFunction: _StructSchema[_T.PersistedAgentToolConfigParamFunction, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolConfigParamFunction, {"type": _b.literal("function").annotate(description="The type of the object. Always `function`."), "name": _b.check(_b.check(_S.String.annotate(description="The name of the function."), _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")), "description": _b.check(_b.check(_S.String.annotate(description="A description of what the function does."), _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")), "parameters": _b.check(_b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A JSON Schema object describing the function's arguments."), _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")), "defer_loading": _S.Boolean.annotate(description="Whether this function is deferred and discovered through tool search. Defaults to `false`.")}, optional=("defer_loading",)).annotate(description="A function defined by the application.", identifier="PersistedAgentToolConfigParamFunction")
|
|
656
|
+
PersistedAgentToolConfigParamToolSearch: _StructSchema[_T.PersistedAgentToolConfigParamToolSearch, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolConfigParamToolSearch, {"type": _b.literal("tool_search").annotate(description="The type of the object. Always `tool_search`.")}).annotate(description="Discovers deferred function tools and loads them into the model context.", identifier="PersistedAgentToolConfigParamToolSearch")
|
|
657
|
+
PersistedAgentToolConfigParamProgrammaticToolCalling: _StructSchema[_T.PersistedAgentToolConfigParamProgrammaticToolCalling, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolConfigParamProgrammaticToolCalling, {"type": _b.literal("programmatic_tool_calling").annotate(description="The type of the object. Always `programmatic_tool_calling`."), "enabled": _S.Boolean.annotate(description="Whether tools can be called from model-generated code. Defaults to `true`.")}, optional=("enabled",)).annotate(description="Enables calling tools from model-generated code.", identifier="PersistedAgentToolConfigParamProgrammaticToolCalling")
|
|
658
|
+
PersistedMcpTransportConfigParamHttp: _StructSchema[_T.PersistedMcpTransportConfigParamHttp, _t.Never, _t.Never] = _b.struct(_T.PersistedMcpTransportConfigParamHttp, {"type": _b.literal("http").annotate(description="The type of the object. Always `http`."), "server_url": _b.check(_b.check(_S.String.annotate(description="The URL of the MCP server."), _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")), "headers": _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="Non-secret HTTP headers sent to the MCP server.")}, optional=("headers",)).annotate(description="Connects to an MCP server over HTTP.", identifier="PersistedMcpTransportConfigParamHttp")
|
|
659
|
+
PersistedMcpTransportConfigParamStdio: _StructSchema[_T.PersistedMcpTransportConfigParamStdio, _t.Never, _t.Never] = _b.struct(_T.PersistedMcpTransportConfigParamStdio, {"type": _b.literal("stdio").annotate(description="The type of the object. Always `stdio`."), "command": _b.check(_b.check(_S.String.annotate(description="The command used to start the MCP server."), _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")), "args": _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="Arguments passed to the MCP server command."), "cwd": _b.check(_b.check(_S.String.annotate(description="The working directory used to start the MCP server."), _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")), "env_vars": _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="Environment variable names to inherit from the selected execution environment.")}, optional=("args", "env_vars",)).annotate(description="Starts an MCP server as a local process.", identifier="PersistedMcpTransportConfigParamStdio")
|
|
660
|
+
McpConnectionOriginParam: _S.Bottom[_T.McpConnectionOriginParam, _t.Any] = _b.literals(["service", "environment"]).annotate(description="Where outbound MCP HTTP connections originate.", identifier="McpConnectionOriginParam")
|
|
661
|
+
WebSearchModeParam: _S.Bottom[_T.WebSearchModeParam, _t.Any] = _b.literals(["disabled", "cached", "live"]).annotate(description="The source used for web search results.", identifier="WebSearchModeParam")
|
|
662
|
+
WebSearchContextSizeParam: _S.Bottom[_T.WebSearchContextSizeParam, _t.Any] = _b.literals(["low", "medium", "high"]).annotate(description="The amount of web search context made available to the model.", identifier="WebSearchContextSizeParam")
|
|
663
|
+
WebSearchLocationParam: _StructSchema[_T.WebSearchLocationParam, _t.Never, _t.Never] = _b.struct(_T.WebSearchLocationParam, {"country": _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 two-letter ISO country code, such as `US`."), "region": _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 region or state name."), "city": _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 city name."), "timezone": _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 IANA timezone, such as `America/Los_Angeles`.")}, optional=("country", "region", "city", "timezone",)).annotate(description="Approximate user location used to localize web search results.", identifier="WebSearchLocationParam")
|
|
664
|
+
PersistedAgentToolConfigParamComputerUse: _StructSchema[_T.PersistedAgentToolConfigParamComputerUse, _t.Never, _t.Never] = _b.struct(_T.PersistedAgentToolConfigParamComputerUse, {"type": _b.literal("computer_use").annotate(description="The type of the object. Always `computer_use`."), "include_screenshots": _S.Boolean.annotate(description="Whether computer tool outputs include screenshots. Defaults to `false`.")}, optional=("include_screenshots",)).annotate(description="Browser use in an OpenAI-hosted session.", identifier="PersistedAgentToolConfigParamComputerUse")
|
|
665
|
+
MultiAgentConfigCurrentParam: _StructSchema[_T.MultiAgentConfigCurrentParam, _t.Never, _t.Never] = _b.struct(_T.MultiAgentConfigCurrentParam, {"enabled": _S.Boolean.annotate(description="Whether subagent tools are enabled."), "max_concurrent_subagents": _b.check(_b.check(_b.check(_S.Number.annotate(description="Maximum number of subagents that may run concurrently. Defaults to 6.", format="int64"), _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(4294967295).annotate(expected="a value less than or equal to 4294967295"))}, optional=("max_concurrent_subagents",)).annotate(description="Explicit configuration for creating and coordinating subagents.", identifier="MultiAgentConfigCurrentParam")
|
|
666
|
+
DeletedAgentResource: _StructSchema[_T.DeletedAgentResource, _t.Never, _t.Never] = _b.struct(_T.DeletedAgentResource, {"id": _b.check(_S.String.annotate(description="The ID of the deleted agent."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("agent.deleted").annotate(description="The object type. Always `agent.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the agent was deleted. Always `true`.")}).annotate(description="A deleted reusable agent.", identifier="DeletedAgentResource")
|
|
667
|
+
EnvironmentPackagesResource: _StructSchema[_T.EnvironmentPackagesResource, _t.Never, _t.Never] = _b.struct(_T.EnvironmentPackagesResource, {"python": _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"))).annotate(description="Python packages installed in the environment."), _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")), "system": _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"))).annotate(description="System packages installed in the environment."), _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")), "npm": _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"))).annotate(description="npm packages installed globally in the environment."), _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="Packages installed in an OpenAI-hosted environment.", identifier="EnvironmentPackagesResource")
|
|
668
|
+
NetworkAccessResource: _S.Bottom[_T.NetworkAccessResource, _t.Any] = _b.literals(["enabled", "disabled", "restricted"]).annotate(description="The network access mode for an OpenAI-hosted environment.", identifier="NetworkAccessResource")
|
|
669
|
+
DesktopResource: _StructSchema[_T.DesktopResource, _t.Never, _t.Never] = _b.struct(_T.DesktopResource, {"enabled": _S.Boolean.annotate(description="Whether the environment provisions a desktop and browser proxy.")}).annotate(description="The effective desktop configuration for an OpenAI-hosted environment.", identifier="DesktopResource")
|
|
670
|
+
HostedTemplateSkillResourceSkillReference: _StructSchema[_T.HostedTemplateSkillResourceSkillReference, _t.Never, _t.Never] = _b.struct(_T.HostedTemplateSkillResourceSkillReference, {"type": _b.literal("skill_reference").annotate(description="The type of the object. Always `skill_reference`."), "skill_id": _b.check(_S.String.annotate(description="The referenced skill ID."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "version": _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 requested version selector, including `latest`.")}).annotate(description="A skill resolved afresh from the Skills API whenever a session starts.", identifier="HostedTemplateSkillResourceSkillReference")
|
|
671
|
+
HostedTemplateSkillResourceInline: _StructSchema[_T.HostedTemplateSkillResourceInline, _t.Never, _t.Never] = _b.struct(_T.HostedTemplateSkillResourceInline, {"type": _b.literal("inline").annotate(description="The type of the object. Always `inline`."), "name": _b.check(_S.String.annotate(description="The skill name declared in `SKILL.md`."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "description": _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"))}).annotate(description="Safe metadata for an inline skill archive.", identifier="HostedTemplateSkillResourceInline")
|
|
672
|
+
HostedTemplateFileResourceFileId: _StructSchema[_T.HostedTemplateFileResourceFileId, _t.Never, _t.Never] = _b.struct(_T.HostedTemplateFileResourceFileId, {"type": _b.literal("file_id").annotate(description="The type of the object. Always `file_id`."), "file_id": _b.check(_S.String.annotate(description="The ID of the uploaded file."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "path": _b.check(_S.String.annotate(description="The file's absolute path inside the environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A project-scoped Files API reference resolved separately for each session.", identifier="HostedTemplateFileResourceFileId")
|
|
673
|
+
HostedTemplateFileResourceInline: _StructSchema[_T.HostedTemplateFileResourceInline, _t.Never, _t.Never] = _b.struct(_T.HostedTemplateFileResourceInline, {"type": _b.literal("inline").annotate(description="The type of the object. Always `inline`."), "path": _b.check(_S.String.annotate(description="The file's absolute path inside the environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "size_bytes": _b.check(_b.check(_S.Number.annotate(description="The decoded size of the inline file in bytes.", 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"))}).annotate(description="Metadata for confidential inline file contents.", identifier="HostedTemplateFileResourceInline")
|
|
674
|
+
DeletedEnvironmentTemplateResource: _StructSchema[_T.DeletedEnvironmentTemplateResource, _t.Never, _t.Never] = _b.struct(_T.DeletedEnvironmentTemplateResource, {"id": _b.check(_S.String.annotate(description="The ID of the deleted environment template."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("agent.environment.template.deleted").annotate(description="The object type. Always `agent.environment.template.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the environment template was deleted. Always `true`.")}).annotate(description="A deleted reusable environment template.", identifier="DeletedEnvironmentTemplateResource")
|
|
675
|
+
SessionSpendControlResource: _StructSchema[_T.SessionSpendControlResource, _t.Never, _t.Never] = _b.struct(_T.SessionSpendControlResource, {"limit": _b.check(_b.check(_b.check(_S.Number.annotate(description="The configured positive limit in USD cents.", format="int64"), _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(4503599627370495).annotate(expected="a value less than or equal to 4503599627370495")), "consumed": _b.union(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(0).annotate(expected="a value greater than or equal to 0")), _S.Null).annotate(description="Best-effort recorded spend floored to whole USD cents, or null when unavailable.")}).annotate(description="Session-wide spending control, present only when a limit is configured.", identifier="SessionSpendControlResource")
|
|
676
|
+
SessionStatusResource: _S.Bottom[_T.SessionStatusResource, _t.Any] = _b.literals(["idle", "in_progress", "requires_action", "failed"]).annotate(description="The current status of a session.", identifier="SessionStatusResource")
|
|
677
|
+
ComputerUseApprovalRequestKindResourceBrowserOriginAccess: _StructSchema[_T.ComputerUseApprovalRequestKindResourceBrowserOriginAccess, _t.Never, _t.Never] = _b.struct(_T.ComputerUseApprovalRequestKindResourceBrowserOriginAccess, {"type": _b.literal("browser_origin_access").annotate(description="The type of the object. Always `browser_origin_access`."), "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="The browser's explanation for this request, or null when unavailable."), "origin": _b.check(_S.String.annotate(description="The origin the browser needs permission to access."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="A browser origin awaiting the application's approval decision.", identifier="ComputerUseApprovalRequestKindResourceBrowserOriginAccess")
|
|
678
|
+
SessionRequiredActionResourceFunctionCall: _StructSchema[_T.SessionRequiredActionResourceFunctionCall, _t.Never, _t.Never] = _b.struct(_T.SessionRequiredActionResourceFunctionCall, {"type": _b.literal("function_call").annotate(description="The type of the object. Always `function_call`."), "turn_id": _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")), "call_id": _b.check(_S.String.annotate(description="The ID to include when submitting 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 function name."), _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 supplied by the model.")}).annotate(description="Run a function tool and submit its result.", identifier="SessionRequiredActionResourceFunctionCall")
|
|
679
|
+
SessionRequiredActionResourceEnvironmentConnection: _StructSchema[_T.SessionRequiredActionResourceEnvironmentConnection, _t.Never, _t.Never] = _b.struct(_T.SessionRequiredActionResourceEnvironmentConnection, {"type": _b.literal("environment_connection").annotate(description="The type of the object. Always `environment_connection`."), "environment_id": _b.check(_S.String.annotate(description="The ID of the environment to reconnect."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Reconnect a session environment.", identifier="SessionRequiredActionResourceEnvironmentConnection")
|
|
680
|
+
AgentToolResourceFunction: _StructSchema[_T.AgentToolResourceFunction, _t.Never, _t.Never] = _b.struct(_T.AgentToolResourceFunction, {"type": _b.literal("function").annotate(description="The type of the object. Always `function`."), "name": _b.check(_S.String.annotate(description="The name of the function."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "description": _b.check(_S.String.annotate(description="A description of what the function does."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "parameters": _b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A JSON Schema object describing the function's arguments."), _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")), "defer_loading": _S.Boolean.annotate(description="Whether the function is deferred and discovered through tool search.")}).annotate(description="A function defined by the application.", identifier="AgentToolResourceFunction")
|
|
681
|
+
AgentToolResourceProgrammaticToolCalling: _StructSchema[_T.AgentToolResourceProgrammaticToolCalling, _t.Never, _t.Never] = _b.struct(_T.AgentToolResourceProgrammaticToolCalling, {"type": _b.literal("programmatic_tool_calling").annotate(description="The type of the object. Always `programmatic_tool_calling`."), "enabled": _S.Boolean.annotate(description="Whether tools can be called from model-generated code.")}).annotate(description="Enables calling tools from model-generated code.", identifier="AgentToolResourceProgrammaticToolCalling")
|
|
682
|
+
McpTransportResourceHttp: _StructSchema[_T.McpTransportResourceHttp, _t.Never, _t.Never] = _b.struct(_T.McpTransportResourceHttp, {"type": _b.literal("http").annotate(description="The type of the object. Always `http`."), "server_url": _b.check(_S.String.annotate(description="The URL of the MCP server."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Connects to an MCP server over HTTP.", identifier="McpTransportResourceHttp")
|
|
683
|
+
McpTransportResourceStdio: _StructSchema[_T.McpTransportResourceStdio, _t.Never, _t.Never] = _b.struct(_T.McpTransportResourceStdio, {"type": _b.literal("stdio").annotate(description="The type of the object. Always `stdio`."), "command": _b.check(_S.String.annotate(description="The command used to start the MCP server."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "args": _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="Arguments passed to the MCP server command."), _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")), "cwd": _b.check(_S.String.annotate(description="The working directory used to start the MCP server."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "env_vars": _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="Environment variable names inherited from the execution environment."), _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="Starts an MCP server as a local process.", identifier="McpTransportResourceStdio")
|
|
684
|
+
AgentToolResourceComputerUse: _StructSchema[_T.AgentToolResourceComputerUse, _t.Never, _t.Never] = _b.struct(_T.AgentToolResourceComputerUse, {"type": _b.literal("computer_use").annotate(description="The type of the object. Always `computer_use`."), "include_screenshots": _S.Boolean.annotate(description="Whether computer tool outputs include screenshots.")}).annotate(description="Browser use in an OpenAI-hosted session.", identifier="AgentToolResourceComputerUse")
|
|
685
|
+
EnvironmentResourceNone: _StructSchema[_T.EnvironmentResourceNone, _t.Never, _t.Never] = _b.struct(_T.EnvironmentResourceNone, {"type": _b.literal("none").annotate(description="The type of the object. Always `none`.")}).annotate(description="The session talks to CCA without selecting or provisioning an execution environment.", identifier="EnvironmentResourceNone")
|
|
686
|
+
ContainerSizeResource: _S.Bottom[_T.ContainerSizeResource, _t.Any] = _b.literals(["small", "medium", "large"]).annotate(description="The effective CPU and memory tier of an OpenAI-hosted environment.", identifier="ContainerSizeResource")
|
|
687
|
+
EnvironmentResourceSelfHosted: _StructSchema[_T.EnvironmentResourceSelfHosted, _t.Never, _t.Never] = _b.struct(_T.EnvironmentResourceSelfHosted, {"type": _b.literal("self_hosted").annotate(description="The type of the object. Always `self_hosted`."), "remote_url": _b.check(_S.String.annotate(description="Pass this URL unchanged to `codex exec-server --remote` when connecting this environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "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")), "workspace_directory": _b.check(_S.String.annotate(description="The absolute project directory inside the environment. Defaults to `/workspace`."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "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"))}).annotate(description="An environment hosted by the application.", identifier="EnvironmentResourceSelfHosted")
|
|
688
|
+
SessionSpendControlParam: _StructSchema[_T.SessionSpendControlParam, _t.Never, _t.Never] = _b.struct(_T.SessionSpendControlParam, {"limit": _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(4503599627370495).annotate(expected="a value less than or equal to 4503599627370495")), _S.Null).annotate(description="Positive USD cents, or null to remove the limit.", format="int64")}).annotate(description="Sets the session-wide limit without changing recorded spend.", identifier="SessionSpendControlParam")
|
|
689
|
+
AgentToolConfigParamFunction: _StructSchema[_T.AgentToolConfigParamFunction, _t.Never, _t.Never] = _b.struct(_T.AgentToolConfigParamFunction, {"type": _b.literal("function").annotate(description="The type of the object. Always `function`."), "name": _b.check(_b.check(_S.String.annotate(description="The name of the function."), _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")), "description": _b.check(_b.check(_S.String.annotate(description="A description of what the function does."), _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")), "parameters": _b.check(_b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A JSON Schema object describing the function's arguments."), _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")), "defer_loading": _S.Boolean.annotate(description="Whether this function is deferred and discovered through tool search. Defaults to `false`.")}, optional=("defer_loading",)).annotate(description="A function defined by the application.", identifier="AgentToolConfigParamFunction")
|
|
690
|
+
AgentToolConfigParamToolSearch: _StructSchema[_T.AgentToolConfigParamToolSearch, _t.Never, _t.Never] = _b.struct(_T.AgentToolConfigParamToolSearch, {"type": _b.literal("tool_search").annotate(description="The type of the object. Always `tool_search`.")}).annotate(description="Discovers deferred function tools and loads them into the model context.", identifier="AgentToolConfigParamToolSearch")
|
|
691
|
+
AgentToolConfigParamProgrammaticToolCalling: _StructSchema[_T.AgentToolConfigParamProgrammaticToolCalling, _t.Never, _t.Never] = _b.struct(_T.AgentToolConfigParamProgrammaticToolCalling, {"type": _b.literal("programmatic_tool_calling").annotate(description="The type of the object. Always `programmatic_tool_calling`."), "enabled": _S.Boolean.annotate(description="Whether tools can be called from model-generated code. Defaults to `true`.")}, optional=("enabled",)).annotate(description="Enables calling tools from model-generated code.", identifier="AgentToolConfigParamProgrammaticToolCalling")
|
|
692
|
+
McpTransportConfigParamHttp: _StructSchema[_T.McpTransportConfigParamHttp, _t.Never, _t.Never] = _b.struct(_T.McpTransportConfigParamHttp, {"type": _b.literal("http").annotate(description="The type of the object. Always `http`."), "server_url": _b.check(_b.check(_S.String.annotate(description="The URL of the MCP server."), _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")), "authorization": _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 authorization value sent to the MCP server, if any."), "headers": _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="Additional HTTP headers sent to the MCP server.")}, optional=("authorization", "headers",)).annotate(description="Connects to an MCP server over HTTP.", identifier="McpTransportConfigParamHttp")
|
|
693
|
+
McpTransportConfigParamStdio: _StructSchema[_T.McpTransportConfigParamStdio, _t.Never, _t.Never] = _b.struct(_T.McpTransportConfigParamStdio, {"type": _b.literal("stdio").annotate(description="The type of the object. Always `stdio`."), "command": _b.check(_b.check(_S.String.annotate(description="The command used to start the MCP server."), _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")), "args": _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="Arguments passed to the MCP server command."), "cwd": _b.check(_b.check(_S.String.annotate(description="The working directory used to start the MCP server."), _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")), "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 set for the MCP server process."), "env_vars": _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="Environment variable names to inherit from the selected execution environment.")}, optional=("args", "env", "env_vars",)).annotate(description="Starts an MCP server as a local process.", identifier="McpTransportConfigParamStdio")
|
|
694
|
+
AgentToolConfigParamComputerUse: _StructSchema[_T.AgentToolConfigParamComputerUse, _t.Never, _t.Never] = _b.struct(_T.AgentToolConfigParamComputerUse, {"type": _b.literal("computer_use").annotate(description="The type of the object. Always `computer_use`."), "include_screenshots": _S.Boolean.annotate(description="Whether computer tool outputs include screenshots. Defaults to `false`.")}, optional=("include_screenshots",)).annotate(description="Browser use in an OpenAI-hosted session.", identifier="AgentToolConfigParamComputerUse")
|
|
695
|
+
EnvironmentParamNone: _StructSchema[_T.EnvironmentParamNone, _t.Never, _t.Never] = _b.struct(_T.EnvironmentParamNone, {"type": _b.literal("none").annotate(description="The type of the object. Always `none`.")}).annotate(description="Runs the agent without an execution environment.", identifier="EnvironmentParamNone")
|
|
696
|
+
ContainerSizeParam: _S.Bottom[_T.ContainerSizeParam, _t.Any] = _b.literals(["small", "medium", "large"]).annotate(description="The CPU and memory tier for a new OpenAI-hosted session environment.", identifier="ContainerSizeParam")
|
|
697
|
+
EnvironmentParamSelfHosted: _StructSchema[_T.EnvironmentParamSelfHosted, _t.Never, _t.Never] = _b.struct(_T.EnvironmentParamSelfHosted, {"type": _b.literal("self_hosted").annotate(description="The type of the object. Always `self_hosted`."), "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."), "workspace_directory": _b.check(_b.check(_S.String.annotate(description="Absolute project directory inside the self-hosted environment."), _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=("capability_directories",)).annotate(description="An application-hosted environment configured inline.", identifier="EnvironmentParamSelfHosted")
|
|
698
|
+
InputContentParamInputText: _StructSchema[_T.InputContentParamInputText, _t.Never, _t.Never] = _b.struct(_T.InputContentParamInputText, {"type": _b.literal("input_text").annotate(description="The type of the object. Always `input_text`."), "text": _b.check(_b.check(_S.String.annotate(description="The text sent to the 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"))}).annotate(description="Text input to the model.", identifier="InputContentParamInputText")
|
|
699
|
+
InputContentParamInputImage: _StructSchema[_T.InputContentParamInputImage, _t.Never, _t.Never] = _b.struct(_T.InputContentParamInputImage, {"type": _b.literal("input_image").annotate(description="The type of the object. Always `input_image`."), "image_url": _b.check(_b.check(_S.String.annotate(description="The URL of the image sent to the 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"))}).annotate(description="Image input to the model.", identifier="InputContentParamInputImage")
|
|
700
|
+
SessionErrorResource: _StructSchema[_T.SessionErrorResource, _t.Never, _t.Never] = _b.struct(_T.SessionErrorResource, {"type": _b.check(_S.String.annotate(description="The error type."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "code": _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 machine-readable error code, if any."), "message": _b.check(_S.String.annotate(description="A customer-safe explanation of the error."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "param": _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 request parameter associated with the error, if any.")}).annotate(description="An error payload with the same public fields as Responses API streaming errors.", identifier="SessionErrorResource")
|
|
701
|
+
SessionEnvironmentStatusResource: _S.Bottom[_T.SessionEnvironmentStatusResource, _t.Any] = _b.literals(["pending", "ready", "connected", "disconnected", "suspended", "expired", "failed"]).annotate(description="The connection status of a session environment.", identifier="SessionEnvironmentStatusResource")
|
|
702
|
+
SessionEnvironmentErrorResource: _StructSchema[_T.SessionEnvironmentErrorResource, _t.Never, _t.Never] = _b.struct(_T.SessionEnvironmentErrorResource, {"type": _b.check(_S.String.annotate(description="The error type."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "code": _b.check(_S.String.annotate(description="A machine-readable error code."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "message": _b.check(_S.String.annotate(description="A human-readable error message."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="An error reported while preparing a session environment.", identifier="SessionEnvironmentErrorResource")
|
|
703
|
+
SessionEventAgentSessionEnvironmentReset: _StructSchema[_T.SessionEventAgentSessionEnvironmentReset, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionEnvironmentReset, {"type": _b.literal("agent.session.environment.reset").annotate(description="The type of the object. Always `agent.session.environment.reset`."), "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 associated turn, when applicable."), "environment_id": _b.check(_S.String.annotate(description="The stable environment ID, retained across sandbox replacements."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "reset_count": _b.check(_b.check(_S.Number.annotate(description="Monotonically increasing reset number. Repeated notifications share this number.", 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"))}).annotate(description="Emitted after a hosted sandbox is replaced. Conversation history survives; changes to the previous sandbox's files and processes do not.", identifier="SessionEventAgentSessionEnvironmentReset")
|
|
704
|
+
SessionEventAgentOutputCommandExecutionOutputDelta: _StructSchema[_T.SessionEventAgentOutputCommandExecutionOutputDelta, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentOutputCommandExecutionOutputDelta, {"type": _b.literal("agent.output.command_execution_output.delta").annotate(description="The type of the object. Always `agent.output.command_execution_output.delta`."), "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 command execution 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")), "delta": _b.check(_S.String.annotate(description="The output text that was appended."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Emitted when command execution produces an output delta.", identifier="SessionEventAgentOutputCommandExecutionOutputDelta")
|
|
705
|
+
SessionEventAgentSessionTurnOutputTextDelta: _StructSchema[_T.SessionEventAgentSessionTurnOutputTextDelta, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnOutputTextDelta, {"type": _b.literal("agent.session.turn.output_text.delta").annotate(description="The type of the object. Always `agent.session.turn.output_text.delta`."), "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")), "delta": _b.check(_S.String.annotate(description="The text that was appended."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Emitted when text is appended to an output text content part.", identifier="SessionEventAgentSessionTurnOutputTextDelta")
|
|
706
|
+
SessionEventAgentSessionTurnOutputTextDone: _StructSchema[_T.SessionEventAgentSessionTurnOutputTextDone, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnOutputTextDone, {"type": _b.literal("agent.session.turn.output_text.done").annotate(description="The type of the object. Always `agent.session.turn.output_text.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")), "text": _b.check(_S.String.annotate(description="The complete output text."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Emitted when an output text content part is complete.", identifier="SessionEventAgentSessionTurnOutputTextDone")
|
|
707
|
+
SessionEventAgentSessionTurnReasoningSummaryTextDelta: _StructSchema[_T.SessionEventAgentSessionTurnReasoningSummaryTextDelta, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnReasoningSummaryTextDelta, {"type": _b.literal("agent.session.turn.reasoning_summary_text.delta").annotate(description="The type of the object. Always `agent.session.turn.reasoning_summary_text.delta`."), "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")), "delta": _b.check(_S.String.annotate(description="The summary text that was appended."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Emitted when text is appended to a reasoning summary.", identifier="SessionEventAgentSessionTurnReasoningSummaryTextDelta")
|
|
708
|
+
SessionEventAgentSessionTurnReasoningSummaryTextDone: _StructSchema[_T.SessionEventAgentSessionTurnReasoningSummaryTextDone, _t.Never, _t.Never] = _b.struct(_T.SessionEventAgentSessionTurnReasoningSummaryTextDone, {"type": _b.literal("agent.session.turn.reasoning_summary_text.done").annotate(description="The type of the object. Always `agent.session.turn.reasoning_summary_text.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 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")), "text": _b.check(_S.String.annotate(description="The complete reasoning summary text."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points"))}).annotate(description="Emitted when a reasoning summary content part is complete.", identifier="SessionEventAgentSessionTurnReasoningSummaryTextDone")
|
|
709
|
+
DeletedSessionResource: _StructSchema[_T.DeletedSessionResource, _t.Never, _t.Never] = _b.struct(_T.DeletedSessionResource, {"id": _b.check(_S.String.annotate(description="The ID of the deleted session."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("agent.session.deleted").annotate(description="The object type. Always `agent.session.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the session has been removed from the public API. Always `true`. Physical cleanup may still be in progress.")}).annotate(description="A Managed Agents session removed from the public API. Physical cleanup may continue asynchronously.", identifier="DeletedSessionResource")
|
|
710
|
+
SessionArtifactResource: _StructSchema[_T.SessionArtifactResource, _t.Never, _t.Never] = _b.struct(_T.SessionArtifactResource, {"id": _b.check(_S.String.annotate(description="The immutable artifact ID."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("agent.session.artifact").annotate(description="The object type. Always `agent.session.artifact`."), "session_id": _b.check(_S.String.annotate(description="The ID of the session that owns the artifact."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "environment_id": _b.check(_S.String.annotate(description="The ID of the environment that produced the artifact."), _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 completed turn that published the artifact."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "path": _b.check(_S.String.annotate(description="The original absolute file path in the execution environment."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "size_bytes": _b.check(_b.check(_S.Number.annotate(description="The immutable artifact size in bytes.", 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")), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp, in seconds, when the artifact was published.", format="int64"), _S.is_int().annotate(expected="an integer"))}).annotate(description="An immutable file published by a completed hosted session turn.", identifier="SessionArtifactResource")
|
|
711
|
+
DeletedSessionArtifactResource: _StructSchema[_T.DeletedSessionArtifactResource, _t.Never, _t.Never] = _b.struct(_T.DeletedSessionArtifactResource, {"id": _b.check(_S.String.annotate(description="The ID of the deleted session artifact."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("agent.session.artifact.deleted").annotate(description="The object type. Always `agent.session.artifact.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the session artifact was deleted. Always `true`.")}).annotate(description="Confirmation that an immutable session artifact was deleted.", identifier="DeletedSessionArtifactResource")
|
|
712
|
+
BrowserAuthenticationFieldValueParam: _StructSchema[_T.BrowserAuthenticationFieldValueParam, _t.Never, _t.Never] = _b.struct(_T.BrowserAuthenticationFieldValueParam, {"field_id": _b.check(_b.check(_S.String.annotate(description="The field 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")), "value": _b.check(_b.check(_S.String.annotate(description="The value to enter into the registered control."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), _S.is_max_code_points(16384).annotate(expected="a string with at most 16384 code points"))}).annotate(description="One user-entered value, including non-password fields such as an email address.", identifier="BrowserAuthenticationFieldValueParam")
|
|
713
|
+
BrowserOriginAccessDecisionParam: _S.Bottom[_T.BrowserOriginAccessDecisionParam, _t.Any] = _b.literals(["approve", "deny", "cancel"]).annotate(description="The user's decision for a browser origin access request.", identifier="BrowserOriginAccessDecisionParam")
|
|
714
|
+
SessionInputParamAgentSessionInputCancel: _StructSchema[_T.SessionInputParamAgentSessionInputCancel, _t.Never, _t.Never] = _b.struct(_T.SessionInputParamAgentSessionInputCancel, {"type": _b.literal("agent.session.input.cancel").annotate(description="The type of the object. Always `agent.session.input.cancel`.")}).annotate(description="Cancels the session's active turn.", identifier="SessionInputParamAgentSessionInputCancel")
|
|
715
|
+
SessionTurnTraceResource: _StructSchema[_T.SessionTurnTraceResource, _t.Never, _t.Never] = _b.struct(_T.SessionTurnTraceResource, {"id": _b.check(_S.String.annotate(description="The root turn ID. Use this ID as the pagination anchor."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("agent.session.trace").annotate(description="The object type, which is always `agent.session.trace`."), "session_id": _b.check(_S.String.annotate(description="The session that owns this trace."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp in seconds when the root turn was created.", format="int64"), _S.is_int().annotate(expected="an integer")), "otlp": _b.check(_b.check(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="An OTLP JSON ExportTraceServiceRequest containing resourceSpans. Only currently published data is returned; later trace updates are not awaited."), _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"))}).annotate(identifier="SessionTurnTraceResource")
|
|
716
|
+
VaultStatusParam: _S.Bottom[_T.VaultStatusParam, _t.Any] = _b.literals(["active", "archived"]).annotate(description="Whether a vault or credential is active or archived.", identifier="VaultStatusParam")
|
|
717
|
+
VaultResource: _StructSchema[_T.VaultResource, _t.Never, _t.Never] = _b.struct(_T.VaultResource, {"id": _b.check(_S.String.annotate(description="The ID of the vault."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("vault").annotate(description="The object type. Always `vault`."), "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 human-readable name of the vault, if set."), "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="Key-value pairs associated with the vault, such as an application or team identifier."), _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 vault was created.", format="int64"), _S.is_int().annotate(expected="an integer"))}).annotate(description="A collection of credentials for MCP servers and OpenAI-hosted environments.", identifier="VaultResource")
|
|
718
|
+
CreateVaultParams: _StructSchema[_T.CreateVaultParams, _t.Never, _t.Never] = _b.struct(_T.CreateVaultParams, {"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")), "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(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="Key-value pairs to associate with the vault, such as an application or team identifier.")}, optional=("name", "metadata",)).annotate(description="Parameters for creating a vault to store credentials used by agent tools.", identifier="CreateVaultParams")
|
|
719
|
+
UpdateVaultParams: _StructSchema[_T.UpdateVaultParams, _t.Never, _t.Never] = _b.struct(_T.UpdateVaultParams, {"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 leave unchanged, 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")), "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(1048576).annotate(expected="a string with at most 1048576 code points")), _S.Null).annotate(description="A replacement name. Omit to leave unchanged, or pass null to clear it. The name is trimmed before storage. It must contain 1 to 256 UTF-8 bytes after trimming.")}, optional=("metadata", "name",)).annotate(description="Fields to replace on an active vault.", identifier="UpdateVaultParams")
|
|
720
|
+
DeletedVaultResource: _StructSchema[_T.DeletedVaultResource, _t.Never, _t.Never] = _b.struct(_T.DeletedVaultResource, {"id": _b.check(_S.String.annotate(description="The ID of the deleted vault."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("vault.deleted").annotate(description="The object type. Always `vault.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the resource was deleted. Always `true`.")}).annotate(description="Confirmation that a vault was deleted.", identifier="DeletedVaultResource")
|
|
721
|
+
McpOauthTokenEndpointAuthResourceNone: _StructSchema[_T.McpOauthTokenEndpointAuthResourceNone, _t.Never, _t.Never] = _b.struct(_T.McpOauthTokenEndpointAuthResourceNone, {"type": _b.literal("none").annotate(description="The type of the object. Always `none`.")}).annotate(description="Sends the client ID without a client secret.", identifier="McpOauthTokenEndpointAuthResourceNone")
|
|
722
|
+
McpOauthTokenEndpointAuthResourceClientSecretBasic: _StructSchema[_T.McpOauthTokenEndpointAuthResourceClientSecretBasic, _t.Never, _t.Never] = _b.struct(_T.McpOauthTokenEndpointAuthResourceClientSecretBasic, {"type": _b.literal("client_secret_basic").annotate(description="The type of the object. Always `client_secret_basic`.")}).annotate(description="Sends the client ID and secret using HTTP Basic authentication.", identifier="McpOauthTokenEndpointAuthResourceClientSecretBasic")
|
|
723
|
+
McpOauthTokenEndpointAuthResourceClientSecretPost: _StructSchema[_T.McpOauthTokenEndpointAuthResourceClientSecretPost, _t.Never, _t.Never] = _b.struct(_T.McpOauthTokenEndpointAuthResourceClientSecretPost, {"type": _b.literal("client_secret_post").annotate(description="The type of the object. Always `client_secret_post`.")}).annotate(description="Sends the client ID and secret in the token request body.", identifier="McpOauthTokenEndpointAuthResourceClientSecretPost")
|
|
724
|
+
VaultCredentialAuthResourceStaticBearer: _StructSchema[_T.VaultCredentialAuthResourceStaticBearer, _t.Never, _t.Never] = _b.struct(_T.VaultCredentialAuthResourceStaticBearer, {"type": _b.literal("static_bearer").annotate(description="The type of the object. Always `static_bearer`."), "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"))}).annotate(description="Metadata for a bearer-token credential, without automatic OAuth refresh.", identifier="VaultCredentialAuthResourceStaticBearer")
|
|
725
|
+
VaultCredentialNetworkingResourceUnrestricted: _StructSchema[_T.VaultCredentialNetworkingResourceUnrestricted, _t.Never, _t.Never] = _b.struct(_T.VaultCredentialNetworkingResourceUnrestricted, {"type": _b.literal("unrestricted").annotate(description="The type of the object. Always `unrestricted`.")}).annotate(description="Allows substitution for destinations permitted by the environment network policy. Requires `environment.network.access` to be `restricted`, with explicit `allowed_domains`.", identifier="VaultCredentialNetworkingResourceUnrestricted")
|
|
726
|
+
VaultCredentialNetworkingResourceLimited: _StructSchema[_T.VaultCredentialNetworkingResourceLimited, _t.Never, _t.Never] = _b.struct(_T.VaultCredentialNetworkingResourceLimited, {"type": _b.literal("limited").annotate(description="The type of the object. Always `limited`."), "allowed_hosts": _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 1 to 16 distinct allowed hostnames or IPv4 addresses, normalized to lowercase. Entries contain no scheme, path, port, or wildcard. IPv6 addresses are not supported."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(16).annotate(expected="a value with a length of at most 16"))}).annotate(description="Allows substitution only for the listed hosts. The environment network policy must also allow these hosts.", identifier="VaultCredentialNetworkingResourceLimited")
|
|
727
|
+
CreateMcpOauthTokenEndpointAuthParamNone: _StructSchema[_T.CreateMcpOauthTokenEndpointAuthParamNone, _t.Never, _t.Never] = _b.struct(_T.CreateMcpOauthTokenEndpointAuthParamNone, {"type": _b.literal("none").annotate(description="The type of the object. Always `none`.")}).annotate(description="Sends the client ID without a client secret.", identifier="CreateMcpOauthTokenEndpointAuthParamNone")
|
|
728
|
+
CreateMcpOauthTokenEndpointAuthParamClientSecretBasic: _StructSchema[_T.CreateMcpOauthTokenEndpointAuthParamClientSecretBasic, _t.Never, _t.Never] = _b.struct(_T.CreateMcpOauthTokenEndpointAuthParamClientSecretBasic, {"type": _b.literal("client_secret_basic").annotate(description="The type of the object. Always `client_secret_basic`."), "client_secret": _b.check(_b.check(_S.String.annotate(description="The OAuth client secret to store. 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"))}).annotate(description="Sends the client ID and secret using HTTP Basic authentication.", identifier="CreateMcpOauthTokenEndpointAuthParamClientSecretBasic")
|
|
729
|
+
CreateMcpOauthTokenEndpointAuthParamClientSecretPost: _StructSchema[_T.CreateMcpOauthTokenEndpointAuthParamClientSecretPost, _t.Never, _t.Never] = _b.struct(_T.CreateMcpOauthTokenEndpointAuthParamClientSecretPost, {"type": _b.literal("client_secret_post").annotate(description="The type of the object. Always `client_secret_post`."), "client_secret": _b.check(_b.check(_S.String.annotate(description="The OAuth client secret to store. 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"))}).annotate(description="Sends the client ID and secret in the token request body.", identifier="CreateMcpOauthTokenEndpointAuthParamClientSecretPost")
|
|
730
|
+
CreateVaultCredentialAuthParamStaticBearer: _StructSchema[_T.CreateVaultCredentialAuthParamStaticBearer, _t.Never, _t.Never] = _b.struct(_T.CreateVaultCredentialAuthParamStaticBearer, {"type": _b.literal("static_bearer").annotate(description="The type of the object. Always `static_bearer`."), "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")), "token": _b.check(_b.check(_S.String.annotate(description="The bearer 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"))}).annotate(description="A bearer token for an MCP server, without automatic OAuth refresh.", identifier="CreateVaultCredentialAuthParamStaticBearer")
|
|
731
|
+
VaultCredentialNetworkingParamUnrestricted: _StructSchema[_T.VaultCredentialNetworkingParamUnrestricted, _t.Never, _t.Never] = _b.struct(_T.VaultCredentialNetworkingParamUnrestricted, {"type": _b.literal("unrestricted").annotate(description="The type of the object. Always `unrestricted`.")}).annotate(description="Allows substitution for destinations permitted by the environment network policy. Requires `environment.network.access` to be `restricted`, with explicit `allowed_domains`.", identifier="VaultCredentialNetworkingParamUnrestricted")
|
|
732
|
+
VaultCredentialNetworkingParamLimited: _StructSchema[_T.VaultCredentialNetworkingParamLimited, _t.Never, _t.Never] = _b.struct(_T.VaultCredentialNetworkingParamLimited, {"type": _b.literal("limited").annotate(description="The type of the object. Always `limited`."), "allowed_hosts": _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"))).annotate(description="The 1 to 16 distinct allowed hostnames or IPv4 addresses, normalized to lowercase. Entries contain no scheme, path, port, or wildcard. IPv6 addresses are not supported."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(16).annotate(expected="a value with a length of at most 16"))}).annotate(description="Allows substitution only for the listed hosts. The environment network policy must also allow these hosts.", identifier="VaultCredentialNetworkingParamLimited")
|
|
733
|
+
RotateMcpOauthTokenEndpointAuthParamClientSecretBasic: _StructSchema[_T.RotateMcpOauthTokenEndpointAuthParamClientSecretBasic, _t.Never, _t.Never] = _b.struct(_T.RotateMcpOauthTokenEndpointAuthParamClientSecretBasic, {"type": _b.literal("client_secret_basic").annotate(description="The type of the object. Always `client_secret_basic`."), "client_secret": _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 OAuth client secret. Omit or pass `null` to keep the stored secret. This secret is never returned in resources.")}, optional=("client_secret",)).annotate(description="Updates credentials sent using HTTP Basic authentication.", identifier="RotateMcpOauthTokenEndpointAuthParamClientSecretBasic")
|
|
734
|
+
RotateMcpOauthTokenEndpointAuthParamClientSecretPost: _StructSchema[_T.RotateMcpOauthTokenEndpointAuthParamClientSecretPost, _t.Never, _t.Never] = _b.struct(_T.RotateMcpOauthTokenEndpointAuthParamClientSecretPost, {"type": _b.literal("client_secret_post").annotate(description="The type of the object. Always `client_secret_post`."), "client_secret": _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 OAuth client secret. Omit or pass `null` to keep the stored secret. This secret is never returned in resources.")}, optional=("client_secret",)).annotate(description="Updates credentials sent in the token request body.", identifier="RotateMcpOauthTokenEndpointAuthParamClientSecretPost")
|
|
735
|
+
RotateVaultCredentialAuthParamStaticBearer: _StructSchema[_T.RotateVaultCredentialAuthParamStaticBearer, _t.Never, _t.Never] = _b.struct(_T.RotateVaultCredentialAuthParamStaticBearer, {"type": _b.literal("static_bearer").annotate(description="The type of the object. Always `static_bearer`."), "token": _b.check(_b.check(_S.String.annotate(description="The replacement bearer token. 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"))}).annotate(description="Replace the bearer token for the credential's MCP server.", identifier="RotateVaultCredentialAuthParamStaticBearer")
|
|
736
|
+
RotateVaultCredentialAuthParamEnvironmentVariable: _StructSchema[_T.RotateVaultCredentialAuthParamEnvironmentVariable, _t.Never, _t.Never] = _b.struct(_T.RotateVaultCredentialAuthParamEnvironmentVariable, {"type": _b.literal("environment_variable").annotate(description="The type of the object. Always `environment_variable`."), "secret_value": _b.check(_b.check(_S.String.annotate(description="The write-only replacement secret. 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"))}).annotate(description="Replace the secret for an OpenAI-hosted environment credential. The environment variable name and networking configuration remain unchanged.", identifier="RotateVaultCredentialAuthParamEnvironmentVariable")
|
|
737
|
+
DeletedVaultCredentialResource: _StructSchema[_T.DeletedVaultCredentialResource, _t.Never, _t.Never] = _b.struct(_T.DeletedVaultCredentialResource, {"id": _b.check(_S.String.annotate(description="The ID of the deleted credential."), _S.is_min_code_points(0).annotate(expected="a string with at least 0 code points")), "object": _b.literal("vault.credential.deleted").annotate(description="The object type. Always `vault.credential.deleted`."), "deleted": _S.Boolean.annotate(description="Whether the resource was deleted. Always `true`.")}).annotate(description="Confirmation that a vault credential was deleted.", identifier="DeletedVaultCredentialResource")
|
|
738
|
+
WebhookEndpointBody: _StructSchema[_T.WebhookEndpointBody, _t.Never, _t.Never] = _b.struct(_T.WebhookEndpointBody, {"id": _S.String.annotate(description="The unique ID of the webhook endpoint."), "object": _b.literal("webhook_endpoint").annotate(description="The object type, which is always webhook_endpoint."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp when the endpoint was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "updated_at": _b.check(_S.Number.annotate(description="The Unix timestamp of the last endpoint configuration or signing-secret change. Initialized at creation; tests and unchanged updates do not advance it.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "name": _S.String.annotate(description="The human-readable name of the endpoint."), "url": _S.String.annotate(description="The HTTPS URL that receives webhook deliveries."), "event_types": _b.array(_S.String).annotate(description="The event types that trigger deliveries to this endpoint."), "signing_secret_hint": _b.union(_S.String.annotate(description="A masked hint for the endpoint's signing secret."), _S.Null)}, optional=("updated_at",)).annotate(identifier="WebhookEndpointBody")
|
|
739
|
+
ProjectEventTypeEnum: _S.Bottom[_T.ProjectEventTypeEnum, _t.Any] = _b.literals(["batch.completed", "batch.failed", "batch.expired", "batch.cancelled", "response.completed", "response.failed", "response.cancelled", "response.incomplete", "eval.run.succeeded", "eval.run.failed", "eval.run.canceled", "fine_tuning.job.succeeded", "fine_tuning.job.failed", "fine_tuning.job.cancelled", "realtime.call.incoming", "video.completed", "video.failed", "agent.environment.ready", "agent.environment.failed", "agent.environment.suspended", "agent.environment.expired", "agent.session.created", "agent.session.action_required", "agent.session.in_progress", "agent.session.idle", "agent.session.failed", "safety.alert.created"]).annotate(identifier="ProjectEventTypeEnum")
|
|
740
|
+
WebhookEndpointWithSecretResource: _StructSchema[_T.WebhookEndpointWithSecretResource, _t.Never, _t.Never] = _b.struct(_T.WebhookEndpointWithSecretResource, {"id": _S.String.annotate(description="The unique ID of the webhook endpoint."), "object": _b.literal("webhook_endpoint").annotate(description="The object type, which is always webhook_endpoint."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp when the endpoint was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "updated_at": _b.check(_S.Number.annotate(description="The Unix timestamp of the last endpoint configuration or signing-secret change. Initialized at creation; tests and unchanged updates do not advance it.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "name": _S.String.annotate(description="The human-readable name of the endpoint."), "url": _S.String.annotate(description="The HTTPS URL that receives webhook deliveries."), "event_types": _b.array(_S.String).annotate(description="The event types that trigger deliveries to this endpoint."), "signing_secret_hint": _b.union(_S.String.annotate(description="A masked hint for the endpoint's signing secret."), _S.Null), "signing_secret": _S.String.annotate(description="The endpoint's signing secret. This is returned only when the endpoint is created or the secret is rotated.")}, optional=("updated_at",)).annotate(identifier="WebhookEndpointWithSecretResource")
|
|
741
|
+
DeletedWebhookEndpointResource: _StructSchema[_T.DeletedWebhookEndpointResource, _t.Never, _t.Never] = _b.struct(_T.DeletedWebhookEndpointResource, {"id": _S.String.annotate(description="The ID of the deleted webhook endpoint."), "object": _b.literal("webhook_endpoint.deleted").annotate(description="The object type, which is always webhook_endpoint.deleted."), "deleted": _S.Boolean.annotate(description="Whether the endpoint was deleted.")}).annotate(identifier="DeletedWebhookEndpointResource")
|
|
742
|
+
PublicRotateSecretBody: _StructSchema[_T.PublicRotateSecretBody, _t.Never, _t.Never] = _b.struct(_T.PublicRotateSecretBody, {"keep_old_secret_active_for_24_hours": _S.Boolean.annotate(description="Whether to keep the previous signing secret valid for 24 hours after rotation. Defaults to false, which invalidates the previous secret immediately.")}, optional=("keep_old_secret_active_for_24_hours",)).annotate(identifier="PublicRotateSecretBody")
|
|
743
|
+
WebhookEndpointTestResultResource: _StructSchema[_T.WebhookEndpointTestResultResource, _t.Never, _t.Never] = _b.struct(_T.WebhookEndpointTestResultResource, {"object": _b.literal("webhook_endpoint.test").annotate(description="The object type, which is always webhook_endpoint.test."), "webhook_endpoint_id": _S.String.annotate(description="The ID of the webhook endpoint that received the test."), "event_type": _S.String.annotate(description="The event type sent in the test."), "status_code": _b.check(_S.Number.annotate(description="The HTTP status code returned by the endpoint."), _S.is_int().annotate(expected="an integer")), "success": _b.literal(True).annotate(description="Whether the test request completed. Always true for returned results; use status_code to determine the endpoint response.")}).annotate(identifier="WebhookEndpointTestResultResource")
|
|
744
|
+
WebhookEventTypeListResource: _StructSchema[_T.WebhookEventTypeListResource, _t.Never, _t.Never] = _b.struct(_T.WebhookEventTypeListResource, {"object": _b.literal("list").annotate(description="The object type, which is always list."), "data": _b.array(_S.String).annotate(description="The webhook event types available to the authenticated project.")}).annotate(identifier="WebhookEventTypeListResource")
|
|
745
|
+
BetaMetadata: _S.Bottom[_T.BetaMetadata, _t.Any] = _b.union(_b.record(_S.String, _S.String).annotate(description="Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n"), _S.Null).annotate(identifier="BetaMetadata")
|
|
746
|
+
BetaPromptCacheTTLEnum: _S.Bottom[_T.BetaPromptCacheTTLEnum, _t.Any] = _b.literal("30m").annotate(identifier="BetaPromptCacheTTLEnum")
|
|
747
|
+
BetaPromptCacheModeEnum: _S.Bottom[_T.BetaPromptCacheModeEnum, _t.Any] = _b.literals(["implicit", "explicit"]).annotate(identifier="BetaPromptCacheModeEnum")
|
|
748
|
+
BetaModelIdsShared: _S.Bottom[_T.BetaModelIdsShared, _t.Any] = _b.union(_S.String, _b.literals(["gpt-6-astra", "gpt-6.1-sol", "gpt-6-sol", "gpt-6-luna", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.5-2026-04-23", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.4-mini-2026-03-17", "gpt-5.4-nano-2026-03-17", "gpt-5.3-chat-latest", "gpt-5.2", "gpt-5.2-2025-12-11", "gpt-5.2-chat-latest", "gpt-5.2-pro", "gpt-5.2-pro-2025-12-11", "gpt-5.1", "gpt-5.1-2025-11-13", "gpt-5.1-codex", "gpt-5.1-mini", "gpt-5.1-chat-latest", "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-5-chat-latest", "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", "o4-mini", "o4-mini-2025-04-16", "o3", "o3-2025-04-16", "o3-mini", "o3-mini-2025-01-31", "o1", "o1-2024-12-17", "o1-preview", "o1-preview-2024-09-12", "o1-mini", "o1-mini-2024-09-12", "gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-audio-mini", "gpt-audio-mini-2025-12-15", "gpt-4o-audio-preview", "gpt-4o-audio-preview-2024-10-01", "gpt-4o-audio-preview-2024-12-17", "gpt-4o-audio-preview-2025-06-03", "gpt-4o-mini-audio-preview", "gpt-4o-mini-audio-preview-2024-12-17", "gpt-4o-search-preview", "gpt-4o-mini-search-preview", "gpt-4o-search-preview-2025-03-11", "gpt-4o-mini-search-preview-2025-03-11", "chatgpt-4o-latest", "codex-mini-latest", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "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-0301", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613"])).annotate(identifier="BetaModelIdsShared")
|
|
749
|
+
BetaResponseFormatText: _StructSchema[_T.BetaResponseFormatText, _t.Never, _t.Never] = _b.struct(_T.BetaResponseFormatText, {"type": _b.literal("text").annotate(description="The type of response format being defined. Always `text`.")}).annotate(title="Text", description="Default response format. Used to generate text responses.\n", identifier="BetaResponseFormatText")
|
|
750
|
+
BetaResponseFormatJsonSchemaSchema: _S.Bottom[_T.BetaResponseFormatJsonSchemaSchema, _t.Any] = _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(title="JSON schema", description="The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n", identifier="BetaResponseFormatJsonSchemaSchema")
|
|
751
|
+
BetaResponseFormatJsonObject: _StructSchema[_T.BetaResponseFormatJsonObject, _t.Never, _t.Never] = _b.struct(_T.BetaResponseFormatJsonObject, {"type": _b.literal("json_object").annotate(description="The type of response format being defined. Always `json_object`.")}).annotate(title="JSON object", description="JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n", identifier="BetaResponseFormatJsonObject")
|
|
752
|
+
BetaVerbosity: _S.Bottom[_T.BetaVerbosity, _t.Any] = _b.union(_b.literals(["low", "medium", "high"]).annotate(description="Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`. The default is\n`medium`.\n"), _S.Null).annotate(identifier="BetaVerbosity")
|
|
753
|
+
BetaCallableToolAllowedCaller: _S.Bottom[_T.BetaCallableToolAllowedCaller, _t.Any] = _b.literals(["direct", "programmatic"]).annotate(identifier="BetaCallableToolAllowedCaller")
|
|
754
|
+
BetaRankerVersionType: _S.Bottom[_T.BetaRankerVersionType, _t.Any] = _b.literals(["auto", "default-2024-11-15"]).annotate(identifier="BetaRankerVersionType")
|
|
755
|
+
BetaHybridSearchOptions: _StructSchema[_T.BetaHybridSearchOptions, _t.Never, _t.Never] = _b.struct(_T.BetaHybridSearchOptions, {"embedding_weight": _b.check(_S.Number.annotate(description="The weight of the embedding in the reciprocal ranking fusion."), _S.is_finite().annotate(expected="a finite number")), "text_weight": _b.check(_S.Number.annotate(description="The weight of the text in the reciprocal ranking fusion."), _S.is_finite().annotate(expected="a finite number"))}).annotate(identifier="BetaHybridSearchOptions")
|
|
756
|
+
BetaComparisonFilter: _StructSchema[_T.BetaComparisonFilter, _t.Never, _t.Never] = _b.struct(_T.BetaComparisonFilter, {"type": _b.literals(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]).annotate(description="Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"), "key": _S.String.annotate(description="The key to compare against the value."), "value": _b.union(_S.String, _S.Finite, _S.Boolean, _b.array(_b.union(_S.String, _S.Finite, mode="one_of")), mode="one_of").annotate(description="The value to compare against the attribute key; supports string, number, or boolean types.")}).annotate(title="Comparison Filter", description="A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n", identifier="BetaComparisonFilter")
|
|
757
|
+
BetaComputerTool: _StructSchema[_T.BetaComputerTool, _t.Never, _t.Never] = _b.struct(_T.BetaComputerTool, {"type": _b.literal("computer").annotate(description="The type of the computer tool. Always `computer`.")}).annotate(title="Computer", 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="BetaComputerTool")
|
|
758
|
+
BetaComputerEnvironment: _S.Bottom[_T.BetaComputerEnvironment, _t.Any] = _b.literals(["windows", "mac", "linux", "ubuntu", "browser"]).annotate(identifier="BetaComputerEnvironment")
|
|
759
|
+
BetaWebSearchApproximateLocation: _S.Bottom[_T.BetaWebSearchApproximateLocation, _t.Any] = _b.union(_b.struct(_T.BetaWebSearchApproximateLocation__0, {"type": _b.literal("approximate").annotate(description="The type of location approximation. Always `approximate`."), "country": _b.union(_S.String.annotate(description="The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."), _S.Null), "region": _b.union(_S.String.annotate(description="Free text input for the region of the user, e.g. `California`."), _S.Null), "city": _b.union(_S.String.annotate(description="Free text input for the city of the user, e.g. `San Francisco`."), _S.Null), "timezone": _b.union(_S.String.annotate(description="The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."), _S.Null)}, optional=("type", "country", "region", "city", "timezone",)).annotate(title="Web search approximate location", description="The approximate location of the user.\n"), _S.Null).annotate(identifier="BetaWebSearchApproximateLocation")
|
|
760
|
+
BetaMCPToolFilter: _StructSchema[_T.BetaMCPToolFilter, _t.Never, _t.Never] = _b.struct(_T.BetaMCPToolFilter, {"tool_names": _b.array(_S.String).annotate(title="MCP allowed tools", description="List of allowed tool names."), "read_only": _S.Boolean.annotate(description="Indicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.\n")}, optional=("tool_names", "read_only",)).annotate(title="MCP tool filter", description="A filter object to specify which tools are allowed.\n", identifier="BetaMCPToolFilter")
|
|
761
|
+
BetaContainerMemoryLimit: _S.Bottom[_T.BetaContainerMemoryLimit, _t.Any] = _b.literals(["1g", "4g", "16g", "64g"]).annotate(identifier="BetaContainerMemoryLimit")
|
|
762
|
+
BetaContainerNetworkPolicyDisabledParam: _StructSchema[_T.BetaContainerNetworkPolicyDisabledParam, _t.Never, _t.Never] = _b.struct(_T.BetaContainerNetworkPolicyDisabledParam, {"type": _b.literal("disabled").annotate(description="Disable outbound network access. Always `disabled`.")}).annotate(identifier="BetaContainerNetworkPolicyDisabledParam")
|
|
763
|
+
BetaContainerNetworkPolicyDomainSecretParam: _StructSchema[_T.BetaContainerNetworkPolicyDomainSecretParam, _t.Never, _t.Never] = _b.struct(_T.BetaContainerNetworkPolicyDomainSecretParam, {"domain": _b.check(_S.String.annotate(description="The domain associated with the secret."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "name": _b.check(_S.String.annotate(description="The name of the secret to inject for the domain."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "value": _b.check(_b.check(_S.String.annotate(description="The secret value to inject for the domain."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points"))}).annotate(identifier="BetaContainerNetworkPolicyDomainSecretParam")
|
|
764
|
+
BetaProgrammaticToolCallingParam: _StructSchema[_T.BetaProgrammaticToolCallingParam, _t.Never, _t.Never] = _b.struct(_T.BetaProgrammaticToolCallingParam, {"type": _b.literal("programmatic_tool_calling").annotate(description="The type of the tool. Always `programmatic_tool_calling`.")}).annotate(identifier="BetaProgrammaticToolCallingParam")
|
|
765
|
+
BetaInputFidelity: _S.Bottom[_T.BetaInputFidelity, _t.Any] = _b.literals(["high", "low"]).annotate(description="Control how much effort the model will exert to match the style and features, especially facial features, of input images. Supports `high` and `low` on `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.", identifier="BetaInputFidelity")
|
|
766
|
+
BetaImageGenActionEnum: _S.Bottom[_T.BetaImageGenActionEnum, _t.Any] = _b.literals(["generate", "edit", "auto"]).annotate(identifier="BetaImageGenActionEnum")
|
|
767
|
+
BetaLocalShellToolParam: _StructSchema[_T.BetaLocalShellToolParam, _t.Never, _t.Never] = _b.struct(_T.BetaLocalShellToolParam, {"type": _b.literal("local_shell").annotate(description="The type of the local shell tool. Always `local_shell`.")}).annotate(title="Local shell tool", description="A tool that allows the model to execute shell commands in a local environment.", identifier="BetaLocalShellToolParam")
|
|
768
|
+
BetaSkillReferenceParam: _StructSchema[_T.BetaSkillReferenceParam, _t.Never, _t.Never] = _b.struct(_T.BetaSkillReferenceParam, {"type": _b.literal("skill_reference").annotate(description="References a skill created with the /v1/skills endpoint."), "skill_id": _b.check(_b.check(_S.String.annotate(description="The ID of the referenced skill."), _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")), "version": _S.String.annotate(description="Optional skill version. Use a positive integer or 'latest'. Omit for default.")}, optional=("version",)).annotate(identifier="BetaSkillReferenceParam")
|
|
769
|
+
BetaInlineSkillSourceParam: _StructSchema[_T.BetaInlineSkillSourceParam, _t.Never, _t.Never] = _b.struct(_T.BetaInlineSkillSourceParam, {"type": _b.literal("base64").annotate(description="The type of the inline skill source. Must be `base64`."), "media_type": _b.literal("application/zip").annotate(description="The media type of the inline skill payload. Must be `application/zip`."), "data": _b.check(_b.check(_S.String.annotate(description="Base64-encoded skill zip bundle."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(70254592).annotate(expected="a string with at most 70254592 code points"))}).annotate(description="Inline skill payload", identifier="BetaInlineSkillSourceParam")
|
|
770
|
+
BetaLocalSkillParam: _StructSchema[_T.BetaLocalSkillParam, _t.Never, _t.Never] = _b.struct(_T.BetaLocalSkillParam, {"name": _S.String.annotate(description="The name of the skill."), "description": _S.String.annotate(description="The description of the skill."), "path": _S.String.annotate(description="The path to the directory containing the skill.")}).annotate(identifier="BetaLocalSkillParam")
|
|
771
|
+
BetaContainerReferenceParam: _StructSchema[_T.BetaContainerReferenceParam, _t.Never, _t.Never] = _b.struct(_T.BetaContainerReferenceParam, {"type": _b.literal("container_reference").annotate(description="References a container created with the /v1/containers endpoint"), "container_id": _S.String.annotate(description="The ID of the referenced container.")}).annotate(identifier="BetaContainerReferenceParam")
|
|
772
|
+
BetaCustomTextFormatParam: _StructSchema[_T.BetaCustomTextFormatParam, _t.Never, _t.Never] = _b.struct(_T.BetaCustomTextFormatParam, {"type": _b.literal("text").annotate(description="Unconstrained text format. Always `text`.")}).annotate(title="Text format", description="Unconstrained free-form text.", identifier="BetaCustomTextFormatParam")
|
|
773
|
+
BetaGrammarSyntax1: _S.Bottom[_T.BetaGrammarSyntax1, _t.Any] = _b.literals(["lark", "regex"]).annotate(identifier="BetaGrammarSyntax1")
|
|
774
|
+
BetaEmptyModelParam: _S.Bottom[_T.BetaEmptyModelParam, _t.Any] = _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(identifier="BetaEmptyModelParam")
|
|
775
|
+
BetaToolSearchExecutionType: _S.Bottom[_T.BetaToolSearchExecutionType, _t.Any] = _b.literals(["server", "client"]).annotate(identifier="BetaToolSearchExecutionType")
|
|
776
|
+
BetaApproximateLocation: _StructSchema[_T.BetaApproximateLocation, _t.Never, _t.Never] = _b.struct(_T.BetaApproximateLocation, {"type": _b.literal("approximate").annotate(description="The type of location approximation. Always `approximate`."), "country": _b.union(_S.String.annotate(description="The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."), _S.Null), "region": _b.union(_S.String.annotate(description="Free text input for the region of the user, e.g. `California`."), _S.Null), "city": _b.union(_S.String.annotate(description="Free text input for the city of the user, e.g. `San Francisco`."), _S.Null), "timezone": _b.union(_S.String.annotate(description="The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."), _S.Null)}, optional=("country", "region", "city", "timezone",)).annotate(identifier="BetaApproximateLocation")
|
|
777
|
+
BetaSearchContextSize: _S.Bottom[_T.BetaSearchContextSize, _t.Any] = _b.literals(["low", "medium", "high"]).annotate(identifier="BetaSearchContextSize")
|
|
778
|
+
BetaSearchContentType: _S.Bottom[_T.BetaSearchContentType, _t.Any] = _b.literals(["text", "image"]).annotate(identifier="BetaSearchContentType")
|
|
779
|
+
BetaToolChoiceOptions: _S.Bottom[_T.BetaToolChoiceOptions, _t.Any] = _b.literals(["none", "auto", "required"]).annotate(title="Tool choice mode", description="Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n", identifier="BetaToolChoiceOptions")
|
|
780
|
+
BetaToolChoiceAllowed: _StructSchema[_T.BetaToolChoiceAllowed, _t.Never, _t.Never] = _b.struct(_T.BetaToolChoiceAllowed, {"type": _b.literal("allowed_tools").annotate(description="Allowed tool configuration type. Always `allowed_tools`."), "mode": _b.literals(["auto", "required"]).annotate(description="Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"), "tools": _b.array(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="A tool definition that the model should be allowed to call.\n")).annotate(description="A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n { \"type\": \"function\", \"name\": \"get_weather\" },\n { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n { \"type\": \"image_generation\" }\n]\n```\n")}).annotate(title="Allowed tools", description="Constrains the tools available to the model to a pre-defined set.\n", identifier="BetaToolChoiceAllowed")
|
|
781
|
+
BetaToolChoiceTypes: _StructSchema[_T.BetaToolChoiceTypes, _t.Never, _t.Never] = _b.struct(_T.BetaToolChoiceTypes, {"type": _b.literals(["file_search", "web_search_preview", "computer", "computer_use_preview", "computer_use", "web_search_preview_2025_03_11", "image_generation", "code_interpreter"]).annotate(description="The type of hosted tool the model should to use. Learn more about\n[built-in tools](https://developers.openai.com/api/docs/guides/tools).\n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer`\n- `computer_use_preview`\n- `computer_use`\n- `code_interpreter`\n- `image_generation`\n")}).annotate(title="Hosted tool", description="Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools).\n", identifier="BetaToolChoiceTypes")
|
|
782
|
+
BetaToolChoiceFunction: _StructSchema[_T.BetaToolChoiceFunction, _t.Never, _t.Never] = _b.struct(_T.BetaToolChoiceFunction, {"type": _b.literal("function").annotate(description="For function calling, the type is always `function`."), "name": _S.String.annotate(description="The name of the function to call.")}).annotate(title="Function tool", description="Use this option to force the model to call a specific function.\n", identifier="BetaToolChoiceFunction")
|
|
783
|
+
BetaToolChoiceMCP: _StructSchema[_T.BetaToolChoiceMCP, _t.Never, _t.Never] = _b.struct(_T.BetaToolChoiceMCP, {"type": _b.literal("mcp").annotate(description="For MCP tools, the type is always `mcp`."), "server_label": _S.String.annotate(description="The label of the MCP server to use.\n"), "name": _b.union(_S.String.annotate(description="The name of the tool to call on the server.\n"), _S.Null)}, optional=("name",)).annotate(title="MCP tool", description="Use this option to force the model to call a specific tool on a remote MCP server.\n", identifier="BetaToolChoiceMCP")
|
|
784
|
+
BetaToolChoiceCustom: _StructSchema[_T.BetaToolChoiceCustom, _t.Never, _t.Never] = _b.struct(_T.BetaToolChoiceCustom, {"type": _b.literal("custom").annotate(description="For custom tool calling, the type is always `custom`."), "name": _S.String.annotate(description="The name of the custom tool to call.")}).annotate(title="Custom tool", description="Use this option to force the model to call a specific custom tool.\n", identifier="BetaToolChoiceCustom")
|
|
785
|
+
BetaSpecificProgrammaticToolCallingParam: _StructSchema[_T.BetaSpecificProgrammaticToolCallingParam, _t.Never, _t.Never] = _b.struct(_T.BetaSpecificProgrammaticToolCallingParam, {"type": _b.literal("programmatic_tool_calling").annotate(description="The tool to call. Always `programmatic_tool_calling`.")}).annotate(identifier="BetaSpecificProgrammaticToolCallingParam")
|
|
786
|
+
BetaSpecificApplyPatchParam: _StructSchema[_T.BetaSpecificApplyPatchParam, _t.Never, _t.Never] = _b.struct(_T.BetaSpecificApplyPatchParam, {"type": _b.literal("apply_patch").annotate(description="The tool to call. Always `apply_patch`.")}).annotate(title="Specific apply patch tool choice", description="Forces the model to call the apply_patch tool when executing a tool call.", identifier="BetaSpecificApplyPatchParam")
|
|
787
|
+
BetaSpecificFunctionShellParam: _StructSchema[_T.BetaSpecificFunctionShellParam, _t.Never, _t.Never] = _b.struct(_T.BetaSpecificFunctionShellParam, {"type": _b.literal("shell").annotate(description="The tool to call. Always `shell`.")}).annotate(title="Specific shell tool choice", description="Forces the model to call the shell tool when a tool call is required.", identifier="BetaSpecificFunctionShellParam")
|
|
788
|
+
BetaPromptCacheBreakpointConfig: _StructSchema[_T.BetaPromptCacheBreakpointConfig, _t.Never, _t.Never] = _b.struct(_T.BetaPromptCacheBreakpointConfig, {"mode": _b.literal("explicit").annotate(description="The breakpoint mode. Always `explicit`.")}).annotate(title="Prompt cache breakpoint", description="Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.", identifier="BetaPromptCacheBreakpointConfig")
|
|
789
|
+
BetaImageDetail: _S.Bottom[_T.BetaImageDetail, _t.Any] = _b.literals(["low", "high", "auto", "original"]).annotate(identifier="BetaImageDetail")
|
|
790
|
+
BetaFileInputDetail: _S.Bottom[_T.BetaFileInputDetail, _t.Any] = _b.literals(["auto", "low", "high"]).annotate(identifier="BetaFileInputDetail")
|
|
791
|
+
BetaCyberAccessProgramEnum: _S.Bottom[_T.BetaCyberAccessProgramEnum, _t.Any] = _b.literals(["standard", "daybreak_blue", "daybreak_red"]).annotate(identifier="BetaCyberAccessProgramEnum")
|
|
792
|
+
BetaServiceTierResponses: _S.Bottom[_T.BetaServiceTierResponses, _t.Any] = _b.union(_b.literals(["auto", "default", "flex", "scale", "priority", "fast", "ultrafast"]).annotate(description="Specifies the processing type used for serving the request.\n - 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'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - 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.\n - 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. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request.\n - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show `service_tier=ultrafast`.\n - When not set, the default behavior is 'auto'.\n\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.\n"), _S.Null).annotate(identifier="BetaServiceTierResponses")
|
|
793
|
+
BetaReasoningModeEnum: _S.Bottom[_T.BetaReasoningModeEnum, _t.Any] = _b.union(_S.String, _b.literals(["standard", "pro"])).annotate(identifier="BetaReasoningModeEnum")
|
|
794
|
+
BetaReasoningEffort: _S.Bottom[_T.BetaReasoningEffort, _t.Any] = _b.union(_b.literals(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).annotate(description="Constrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](https://developers.openai.com/api/docs/guides/reasoning)\nfor model-specific support.\n"), _S.Null).annotate(identifier="BetaReasoningEffort")
|
|
795
|
+
BetaMessagePhase: _S.Bottom[_T.BetaMessagePhase, _t.Any] = _b.literals(["commentary", "final_answer"]).annotate(description="Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).\nFor models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend\nphase on all assistant messages — dropping it can degrade performance. Not used for user messages.\n", identifier="BetaMessagePhase")
|
|
796
|
+
BetaAgentTag: _StructSchema[_T.BetaAgentTag, _t.Never, _t.Never] = _b.struct(_T.BetaAgentTag, {"agent_name": _S.String.annotate(description="The canonical name of the agent that produced this item.")}).annotate(identifier="BetaAgentTag")
|
|
797
|
+
BetaFileCitationBody: _StructSchema[_T.BetaFileCitationBody, _t.Never, _t.Never] = _b.struct(_T.BetaFileCitationBody, {"type": _b.literal("file_citation").annotate(description="The type of the file citation. Always `file_citation`."), "file_id": _S.String.annotate(description="The ID of the file."), "index": _b.check(_S.Number.annotate(description="The index in the output text at which to insert the file citation."), _S.is_int().annotate(expected="an integer")), "filename": _S.String.annotate(description="The filename of the file cited.")}).annotate(title="File citation", description="A citation to a file.", identifier="BetaFileCitationBody")
|
|
798
|
+
BetaUrlCitationBody: _StructSchema[_T.BetaUrlCitationBody, _t.Never, _t.Never] = _b.struct(_T.BetaUrlCitationBody, {"type": _b.literal("url_citation").annotate(description="The type of the URL citation. Always `url_citation`."), "url": _S.String.annotate(description="The URL of the web resource.", format="uri"), "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")), "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")), "title": _S.String.annotate(description="The title of the web resource.")}).annotate(title="URL citation", description="A citation for a web resource used to generate a model response.", identifier="BetaUrlCitationBody")
|
|
799
|
+
BetaContainerFileCitationBody: _StructSchema[_T.BetaContainerFileCitationBody, _t.Never, _t.Never] = _b.struct(_T.BetaContainerFileCitationBody, {"type": _b.literal("container_file_citation").annotate(description="The type of the container file citation. Always `container_file_citation`."), "container_id": _S.String.annotate(description="The ID of the container file."), "file_id": _S.String.annotate(description="The ID of the file."), "start_index": _b.check(_S.Number.annotate(description="The index of the first character of the container file citation in the message."), _S.is_int().annotate(expected="an integer")), "end_index": _b.check(_S.Number.annotate(description="The index of the last character of the container file citation in the message."), _S.is_int().annotate(expected="an integer")), "filename": _S.String.annotate(description="The filename of the container file cited.")}).annotate(title="Container file citation", description="A citation for a container file used to generate a model response.", identifier="BetaContainerFileCitationBody")
|
|
800
|
+
BetaFilePath: _StructSchema[_T.BetaFilePath, _t.Never, _t.Never] = _b.struct(_T.BetaFilePath, {"type": _b.literal("file_path").annotate(description="The type of the file path. Always `file_path`.\n"), "file_id": _S.String.annotate(description="The ID of the file.\n"), "index": _b.check(_S.Number.annotate(description="The index of the file in the list of files.\n"), _S.is_int().annotate(expected="an integer"))}).annotate(title="File path", description="A path to a file.\n", identifier="BetaFilePath")
|
|
801
|
+
BetaTopLogProb: _StructSchema[_T.BetaTopLogProb, _t.Never, _t.Never] = _b.struct(_T.BetaTopLogProb, {"token": _S.String, "logprob": _S.Finite, "bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")))}).annotate(title="Top log probability", description="The top log probability of a token.", identifier="BetaTopLogProb")
|
|
802
|
+
BetaRefusalContent: _StructSchema[_T.BetaRefusalContent, _t.Never, _t.Never] = _b.struct(_T.BetaRefusalContent, {"type": _b.literal("refusal").annotate(description="The type of the refusal. Always `refusal`."), "refusal": _S.String.annotate(description="The refusal explanation from the model.")}).annotate(title="Refusal", description="A refusal from the model.", identifier="BetaRefusalContent")
|
|
803
|
+
BetaVectorStoreFileAttributes: _S.Bottom[_T.BetaVectorStoreFileAttributes, _t.Any] = _b.union(_b.check(_b.check(_b.record(_S.String, _b.union(_b.check(_S.String, _S.is_max_code_points(512).annotate(expected="a string with at most 512 code points")), _S.Finite, _S.Boolean, mode="one_of")).annotate(description="Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n"), _S.is_max_properties(16).annotate(expected="a value with at most 16 entries")), _S.is_property_names(_b.check(_S.String, _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(identifier="BetaVectorStoreFileAttributes")
|
|
804
|
+
BetaClickButtonType: _S.Bottom[_T.BetaClickButtonType, _t.Any] = _b.literals(["left", "right", "wheel", "back", "forward"]).annotate(identifier="BetaClickButtonType")
|
|
805
|
+
BetaDoubleClickAction: _StructSchema[_T.BetaDoubleClickAction, _t.Never, _t.Never] = _b.struct(_T.BetaDoubleClickAction, {"type": _b.literal("double_click").annotate(description="Specifies the event type. For a double click action, this property is always set to `double_click`."), "x": _b.check(_S.Number.annotate(description="The x-coordinate where the double click occurred."), _S.is_int().annotate(expected="an integer")), "y": _b.check(_S.Number.annotate(description="The y-coordinate where the double click occurred."), _S.is_int().annotate(expected="an integer")), "keys": _b.union(_b.array(_S.String).annotate(description="The keys being held while double-clicking."), _S.Null)}).annotate(title="DoubleClick", description="A double click action.", identifier="BetaDoubleClickAction")
|
|
806
|
+
BetaCoordParam: _StructSchema[_T.BetaCoordParam, _t.Never, _t.Never] = _b.struct(_T.BetaCoordParam, {"x": _b.check(_S.Number.annotate(description="The x-coordinate."), _S.is_int().annotate(expected="an integer")), "y": _b.check(_S.Number.annotate(description="The y-coordinate."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Coordinate", description="An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.", identifier="BetaCoordParam")
|
|
807
|
+
BetaKeyPressAction: _StructSchema[_T.BetaKeyPressAction, _t.Never, _t.Never] = _b.struct(_T.BetaKeyPressAction, {"type": _b.literal("keypress").annotate(description="Specifies the event type. For a keypress action, this property is always set to `keypress`."), "keys": _b.array(_S.String.annotate(description="One of the keys the model is requesting to be pressed.")).annotate(description="The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.")}).annotate(title="KeyPress", description="A collection of keypresses the model would like to perform.", identifier="BetaKeyPressAction")
|
|
808
|
+
BetaMoveParam: _StructSchema[_T.BetaMoveParam, _t.Never, _t.Never] = _b.struct(_T.BetaMoveParam, {"type": _b.literal("move").annotate(description="Specifies the event type. For a move action, this property is always set to `move`."), "x": _b.check(_S.Number.annotate(description="The x-coordinate to move to."), _S.is_int().annotate(expected="an integer")), "y": _b.check(_S.Number.annotate(description="The y-coordinate to move to."), _S.is_int().annotate(expected="an integer")), "keys": _b.union(_b.array(_S.String).annotate(description="The keys being held while moving the mouse."), _S.Null)}, optional=("keys",)).annotate(title="Move", description="A mouse move action.", identifier="BetaMoveParam")
|
|
809
|
+
BetaScreenshotParam: _StructSchema[_T.BetaScreenshotParam, _t.Never, _t.Never] = _b.struct(_T.BetaScreenshotParam, {"type": _b.literal("screenshot").annotate(description="Specifies the event type. For a screenshot action, this property is always set to `screenshot`.")}).annotate(title="Screenshot", description="A screenshot action.", identifier="BetaScreenshotParam")
|
|
810
|
+
BetaScrollParam: _StructSchema[_T.BetaScrollParam, _t.Never, _t.Never] = _b.struct(_T.BetaScrollParam, {"type": _b.literal("scroll").annotate(description="Specifies the event type. For a scroll action, this property is always set to `scroll`."), "x": _b.check(_S.Number.annotate(description="The x-coordinate where the scroll occurred."), _S.is_int().annotate(expected="an integer")), "y": _b.check(_S.Number.annotate(description="The y-coordinate where the scroll occurred."), _S.is_int().annotate(expected="an integer")), "scroll_x": _b.check(_S.Number.annotate(description="The horizontal scroll distance."), _S.is_int().annotate(expected="an integer")), "scroll_y": _b.check(_S.Number.annotate(description="The vertical scroll distance."), _S.is_int().annotate(expected="an integer")), "keys": _b.union(_b.array(_S.String).annotate(description="The keys being held while scrolling."), _S.Null)}, optional=("keys",)).annotate(title="Scroll", description="A scroll action.", identifier="BetaScrollParam")
|
|
811
|
+
BetaTypeParam: _StructSchema[_T.BetaTypeParam, _t.Never, _t.Never] = _b.struct(_T.BetaTypeParam, {"type": _b.literal("type").annotate(description="Specifies the event type. For a type action, this property is always set to `type`."), "text": _S.String.annotate(description="The text to type.")}).annotate(title="Type", description="An action to type in text.", identifier="BetaTypeParam")
|
|
812
|
+
BetaWaitParam: _StructSchema[_T.BetaWaitParam, _t.Never, _t.Never] = _b.struct(_T.BetaWaitParam, {"type": _b.literal("wait").annotate(description="Specifies the event type. For a wait action, this property is always set to `wait`.")}).annotate(title="Wait", description="A wait action.", identifier="BetaWaitParam")
|
|
813
|
+
BetaComputerCallSafetyCheckParam: _StructSchema[_T.BetaComputerCallSafetyCheckParam, _t.Never, _t.Never] = _b.struct(_T.BetaComputerCallSafetyCheckParam, {"id": _S.String.annotate(description="The ID of the pending safety check."), "code": _b.union(_S.String.annotate(description="The type of the pending safety check."), _S.Null), "message": _b.union(_S.String.annotate(description="Details about the pending safety check."), _S.Null)}, optional=("code", "message",)).annotate(description="A pending safety check for the computer call.", identifier="BetaComputerCallSafetyCheckParam")
|
|
814
|
+
Beta_AgentTagParam: _StructSchema[_T.Beta_AgentTagParam, _t.Never, _t.Never] = _b.struct(_T.Beta_AgentTagParam, {"agent_name": _S.String.annotate(description="The canonical name of the agent that produced this item.")}).annotate(description="The agent that produced this item.", identifier="Beta_AgentTagParam")
|
|
815
|
+
BetaComputerScreenshotImage: _StructSchema[_T.BetaComputerScreenshotImage, _t.Never, _t.Never] = _b.struct(_T.BetaComputerScreenshotImage, {"type": _b.literal("computer_screenshot").annotate(description="Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"), "image_url": _S.String.annotate(description="The URL of the screenshot image.", format="uri"), "file_id": _S.String.annotate(description="The identifier of an uploaded file that contains the screenshot.")}, optional=("image_url", "file_id",)).annotate(description="A computer screenshot image used with the computer use tool.\n", identifier="BetaComputerScreenshotImage")
|
|
816
|
+
BetaFunctionCallItemStatus: _S.Bottom[_T.BetaFunctionCallItemStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="BetaFunctionCallItemStatus")
|
|
817
|
+
BetaWebSearchCallStatus: _S.Bottom[_T.BetaWebSearchCallStatus, _t.Any] = _b.literals(["in_progress", "searching", "completed", "failed", "incomplete"]).annotate(identifier="BetaWebSearchCallStatus")
|
|
818
|
+
BetaWebSearchActionSearch: _StructSchema[_T.BetaWebSearchActionSearch, _t.Never, _t.Never] = _b.struct(_T.BetaWebSearchActionSearch, {"type": _b.literal("search").annotate(description="The action type.\n"), "query": _S.String.annotate(description="The search query.\n"), "queries": _b.array(_S.String.annotate(description="A search query.\n")).annotate(title="Search queries", description="The search queries.\n"), "sources": _b.array(_b.struct(_T.BetaWebSearchActionSearch__sources__item, {"type": _b.literal("url").annotate(description="The type of source. Always `url`.\n"), "url": _S.String.annotate(description="The URL of the source.\n", format="uri")}).annotate(title="Web search source", description="A source used in the search.\n")).annotate(title="Web search sources", description="The sources used in the search.\n")}, optional=("query", "queries", "sources",)).annotate(title="Search action", description="Action type \"search\" - Performs a web search query.\n", identifier="BetaWebSearchActionSearch")
|
|
819
|
+
BetaWebSearchActionOpenPage: _StructSchema[_T.BetaWebSearchActionOpenPage, _t.Never, _t.Never] = _b.struct(_T.BetaWebSearchActionOpenPage, {"type": _b.literal("open_page").annotate(description="The action type.\n"), "url": _b.union(_S.String.annotate(format="uri"), _S.Null).annotate(description="The URL opened by the model.\n")}, optional=("url",)).annotate(title="Open page action", description="Action type \"open_page\" - Opens a specific URL from search results.\n", identifier="BetaWebSearchActionOpenPage")
|
|
820
|
+
BetaWebSearchActionFind: _StructSchema[_T.BetaWebSearchActionFind, _t.Never, _t.Never] = _b.struct(_T.BetaWebSearchActionFind, {"type": _b.literal("find_in_page").annotate(description="The action type.\n"), "url": _S.String.annotate(description="The URL of the page searched for the pattern.\n", format="uri"), "pattern": _S.String.annotate(description="The pattern or text to search for within the page.\n")}).annotate(title="Find action", description="Action type \"find_in_page\": Searches for a pattern within a loaded page.\n", identifier="BetaWebSearchActionFind")
|
|
821
|
+
BetaDirectToolCallCaller: _StructSchema[_T.BetaDirectToolCallCaller, _t.Never, _t.Never] = _b.struct(_T.BetaDirectToolCallCaller, {"type": _b.literal("direct")}).annotate(identifier="BetaDirectToolCallCaller")
|
|
822
|
+
BetaProgramToolCallCaller: _StructSchema[_T.BetaProgramToolCallCaller, _t.Never, _t.Never] = _b.struct(_T.BetaProgramToolCallCaller, {"type": _b.literal("program"), "caller_id": _S.String.annotate(description="The call ID of the program item that produced this tool call.")}).annotate(identifier="BetaProgramToolCallCaller")
|
|
823
|
+
BetaPromptCacheBreakpointParam: _StructSchema[_T.BetaPromptCacheBreakpointParam, _t.Never, _t.Never] = _b.struct(_T.BetaPromptCacheBreakpointParam, {"mode": _b.literal("explicit").annotate(description="The breakpoint mode. Always `explicit`.")}).annotate(title="Prompt cache breakpoint", description="Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.", identifier="BetaPromptCacheBreakpointParam")
|
|
824
|
+
BetaDetailEnum: _S.Bottom[_T.BetaDetailEnum, _t.Any] = _b.literals(["low", "high", "auto", "original"]).annotate(identifier="BetaDetailEnum")
|
|
825
|
+
BetaFileDetailEnum: _S.Bottom[_T.BetaFileDetailEnum, _t.Any] = _b.literals(["auto", "low", "high"]).annotate(identifier="BetaFileDetailEnum")
|
|
826
|
+
BetaDirectToolCallCallerParam: _StructSchema[_T.BetaDirectToolCallCallerParam, _t.Never, _t.Never] = _b.struct(_T.BetaDirectToolCallCallerParam, {"type": _b.literal("direct").annotate(description="The caller type. Always `direct`.")}).annotate(identifier="BetaDirectToolCallCallerParam")
|
|
827
|
+
BetaProgramToolCallCallerParam: _StructSchema[_T.BetaProgramToolCallCallerParam, _t.Never, _t.Never] = _b.struct(_T.BetaProgramToolCallCallerParam, {"type": _b.literal("program").annotate(description="The caller type. Always `program`."), "caller_id": _b.check(_b.check(_S.String.annotate(description="The call ID of the program item that produced this tool 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"))}).annotate(identifier="BetaProgramToolCallCallerParam")
|
|
828
|
+
BetaEncryptedContentParam: _StructSchema[_T.BetaEncryptedContentParam, _t.Never, _t.Never] = _b.struct(_T.BetaEncryptedContentParam, {"type": _b.literal("encrypted_content").annotate(description="The type of the input item. Always `encrypted_content`."), "encrypted_content": _b.check(_S.String.annotate(description="Opaque encrypted content."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points"))}).annotate(title="Encrypted content", description="Opaque encrypted content that Responses API decrypts inside trusted model execution.", identifier="BetaEncryptedContentParam")
|
|
829
|
+
BetaMultiAgentAction1: _S.Bottom[_T.BetaMultiAgentAction1, _t.Any] = _b.literals(["spawn_agent", "interrupt_agent", "list_agents", "send_message", "followup_task", "wait_agent"]).annotate(identifier="BetaMultiAgentAction1")
|
|
830
|
+
BetaFileCitationParam: _StructSchema[_T.BetaFileCitationParam, _t.Never, _t.Never] = _b.struct(_T.BetaFileCitationParam, {"type": _b.literal("file_citation").annotate(description="The citation type. Always `file_citation`."), "index": _b.check(_b.check(_S.Number.annotate(description="The index of the file in the list of files."), _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")), "file_id": _S.String.annotate(description="The ID of the file."), "filename": _S.String.annotate(description="The filename of the file cited.")}).annotate(identifier="BetaFileCitationParam")
|
|
831
|
+
BetaUrlCitationParam: _StructSchema[_T.BetaUrlCitationParam, _t.Never, _t.Never] = _b.struct(_T.BetaUrlCitationParam, {"type": _b.literal("url_citation").annotate(description="The citation type. Always `url_citation`."), "start_index": _b.check(_b.check(_S.Number.annotate(description="The index of the first character of the citation in the message."), _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")), "end_index": _b.check(_b.check(_S.Number.annotate(description="The index of the last character of the citation in the message."), _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")), "url": _S.String.annotate(description="The URL of the cited resource.", format="uri"), "title": _S.String.annotate(description="The title of the cited resource.")}).annotate(identifier="BetaUrlCitationParam")
|
|
832
|
+
BetaContainerFileCitationParam: _StructSchema[_T.BetaContainerFileCitationParam, _t.Never, _t.Never] = _b.struct(_T.BetaContainerFileCitationParam, {"type": _b.literal("container_file_citation").annotate(description="The citation type. Always `container_file_citation`."), "start_index": _b.check(_b.check(_S.Number.annotate(description="The index of the first character of the citation in the message."), _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")), "end_index": _b.check(_b.check(_S.Number.annotate(description="The index of the last character of the citation in the message."), _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")), "container_id": _S.String.annotate(description="The ID of the container."), "file_id": _S.String.annotate(description="The ID of the container file."), "filename": _S.String.annotate(description="The filename of the container file cited.")}).annotate(identifier="BetaContainerFileCitationParam")
|
|
833
|
+
BetaSummaryTextContent: _StructSchema[_T.BetaSummaryTextContent, _t.Never, _t.Never] = _b.struct(_T.BetaSummaryTextContent, {"type": _b.literal("summary_text").annotate(description="The type of the object. Always `summary_text`."), "text": _S.String.annotate(description="A summary of the reasoning output from the model so far.")}).annotate(title="Summary text", description="A summary text from the model.", identifier="BetaSummaryTextContent")
|
|
834
|
+
BetaReasoningTextContent: _StructSchema[_T.BetaReasoningTextContent, _t.Never, _t.Never] = _b.struct(_T.BetaReasoningTextContent, {"type": _b.literal("reasoning_text").annotate(description="The type of the reasoning text. Always `reasoning_text`."), "text": _S.String.annotate(description="The reasoning text from the model.")}).annotate(title="Reasoning text", description="Reasoning text from the model.", identifier="BetaReasoningTextContent")
|
|
835
|
+
BetaImageBackground: _S.Bottom[_T.BetaImageBackground, _t.Any] = _b.literals(["transparent", "opaque", "auto"]).annotate(identifier="BetaImageBackground")
|
|
836
|
+
BetaImageOutputFormat: _S.Bottom[_T.BetaImageOutputFormat, _t.Any] = _b.literals(["png", "webp", "jpeg"]).annotate(identifier="BetaImageOutputFormat")
|
|
837
|
+
BetaCodeInterpreterOutputLogs: _StructSchema[_T.BetaCodeInterpreterOutputLogs, _t.Never, _t.Never] = _b.struct(_T.BetaCodeInterpreterOutputLogs, {"type": _b.literal("logs").annotate(description="The type of the output. Always `logs`."), "logs": _S.String.annotate(description="The logs output from the code interpreter.")}).annotate(title="Code interpreter output logs", description="The logs output from the code interpreter.", identifier="BetaCodeInterpreterOutputLogs")
|
|
838
|
+
BetaCodeInterpreterOutputImage: _StructSchema[_T.BetaCodeInterpreterOutputImage, _t.Never, _t.Never] = _b.struct(_T.BetaCodeInterpreterOutputImage, {"type": _b.literal("image").annotate(description="The type of the output. Always `image`."), "url": _S.String.annotate(description="The URL of the image output from the code interpreter.", format="uri")}).annotate(title="Code interpreter output image", description="The image output from the code interpreter.", identifier="BetaCodeInterpreterOutputImage")
|
|
839
|
+
BetaLocalShellExecAction: _StructSchema[_T.BetaLocalShellExecAction, _t.Never, _t.Never] = _b.struct(_T.BetaLocalShellExecAction, {"type": _b.literal("exec").annotate(description="The type of the local shell action. Always `exec`."), "command": _b.array(_S.String).annotate(description="The command to run."), "timeout_ms": _b.union(_b.check(_S.Number.annotate(description="Optional timeout in milliseconds for the command."), _S.is_int().annotate(expected="an integer")), _S.Null), "working_directory": _b.union(_S.String.annotate(description="Optional working directory to run the command in."), _S.Null), "env": _b.record(_S.String, _S.String).annotate(description="Environment variables to set for the command."), "user": _b.union(_S.String.annotate(description="Optional user to run the command as."), _S.Null)}, optional=("timeout_ms", "working_directory", "user",)).annotate(title="Local shell exec action", description="Execute a shell command on the server.", identifier="BetaLocalShellExecAction")
|
|
840
|
+
BetaFunctionShellActionParam: _StructSchema[_T.BetaFunctionShellActionParam, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellActionParam, {"commands": _b.array(_S.String).annotate(description="Ordered shell commands for the execution environment to run."), "timeout_ms": _b.union(_b.check(_S.Number.annotate(description="Maximum wall-clock time in milliseconds to allow the shell commands to run."), _S.is_int().annotate(expected="an integer")), _S.Null), "max_output_length": _b.union(_b.check(_S.Number.annotate(description="Maximum number of UTF-8 characters to capture from combined stdout and stderr output."), _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("timeout_ms", "max_output_length",)).annotate(title="Shell action", description="Commands and limits describing how to run the shell tool call.", identifier="BetaFunctionShellActionParam")
|
|
841
|
+
BetaFunctionShellCallItemStatus: _S.Bottom[_T.BetaFunctionShellCallItemStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(title="Shell call status", description="Status values reported for shell tool calls.", identifier="BetaFunctionShellCallItemStatus")
|
|
842
|
+
BetaFunctionShellCallOutputTimeoutOutcomeParam: _StructSchema[_T.BetaFunctionShellCallOutputTimeoutOutcomeParam, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellCallOutputTimeoutOutcomeParam, {"type": _b.literal("timeout").annotate(description="The outcome type. Always `timeout`.")}).annotate(title="Shell call timeout outcome", description="Indicates that the shell call exceeded its configured time limit.", identifier="BetaFunctionShellCallOutputTimeoutOutcomeParam")
|
|
843
|
+
BetaFunctionShellCallOutputExitOutcomeParam: _StructSchema[_T.BetaFunctionShellCallOutputExitOutcomeParam, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellCallOutputExitOutcomeParam, {"type": _b.literal("exit").annotate(description="The outcome type. Always `exit`."), "exit_code": _b.check(_S.Number.annotate(description="The exit code returned by the shell process."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Shell call exit outcome", description="Indicates that the shell commands finished and returned an exit code.", identifier="BetaFunctionShellCallOutputExitOutcomeParam")
|
|
844
|
+
BetaApplyPatchCallStatusParam: _S.Bottom[_T.BetaApplyPatchCallStatusParam, _t.Any] = _b.literals(["in_progress", "completed"]).annotate(title="Apply patch call status", description="Status values reported for apply_patch tool calls.", identifier="BetaApplyPatchCallStatusParam")
|
|
845
|
+
BetaApplyPatchCreateFileOperationParam: _StructSchema[_T.BetaApplyPatchCreateFileOperationParam, _t.Never, _t.Never] = _b.struct(_T.BetaApplyPatchCreateFileOperationParam, {"type": _b.literal("create_file").annotate(description="The operation type. Always `create_file`."), "path": _b.check(_S.String.annotate(description="Path of the file to create relative to the workspace root."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "diff": _b.check(_S.String.annotate(description="Unified diff content to apply when creating the file."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points"))}).annotate(title="Apply patch create file operation", description="Instruction for creating a new file via the apply_patch tool.", identifier="BetaApplyPatchCreateFileOperationParam")
|
|
846
|
+
BetaApplyPatchDeleteFileOperationParam: _StructSchema[_T.BetaApplyPatchDeleteFileOperationParam, _t.Never, _t.Never] = _b.struct(_T.BetaApplyPatchDeleteFileOperationParam, {"type": _b.literal("delete_file").annotate(description="The operation type. Always `delete_file`."), "path": _b.check(_S.String.annotate(description="Path of the file to delete relative to the workspace root."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1"))}).annotate(title="Apply patch delete file operation", description="Instruction for deleting an existing file via the apply_patch tool.", identifier="BetaApplyPatchDeleteFileOperationParam")
|
|
847
|
+
BetaApplyPatchUpdateFileOperationParam: _StructSchema[_T.BetaApplyPatchUpdateFileOperationParam, _t.Never, _t.Never] = _b.struct(_T.BetaApplyPatchUpdateFileOperationParam, {"type": _b.literal("update_file").annotate(description="The operation type. Always `update_file`."), "path": _b.check(_S.String.annotate(description="Path of the file to update relative to the workspace root."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "diff": _b.check(_S.String.annotate(description="Unified diff content to apply to the existing file."), _S.is_max_code_points(10485760).annotate(expected="a string with at most 10485760 code points"))}).annotate(title="Apply patch update file operation", description="Instruction for updating an existing file via the apply_patch tool.", identifier="BetaApplyPatchUpdateFileOperationParam")
|
|
848
|
+
BetaApplyPatchCallOutputStatusParam: _S.Bottom[_T.BetaApplyPatchCallOutputStatusParam, _t.Any] = _b.literals(["completed", "failed"]).annotate(title="Apply patch call output status", description="Outcome values reported for apply_patch tool call outputs.", identifier="BetaApplyPatchCallOutputStatusParam")
|
|
849
|
+
BetaMCPListToolsTool: _StructSchema[_T.BetaMCPListToolsTool, _t.Never, _t.Never] = _b.struct(_T.BetaMCPListToolsTool, {"name": _S.String.annotate(description="The name of the tool.\n"), "description": _b.union(_S.String.annotate(description="The description of the tool.\n"), _S.Null), "input_schema": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The JSON schema describing the tool's input.\n"), "annotations": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="Additional annotations about the tool.\n"), _S.Null)}, optional=("description", "annotations",)).annotate(title="MCP list tools tool", description="A tool available on an MCP server.\n", identifier="BetaMCPListToolsTool")
|
|
850
|
+
BetaMCPProtocolError: _StructSchema[_T.BetaMCPProtocolError, _t.Never, _t.Never] = _b.struct(_T.BetaMCPProtocolError, {"type": _b.literal("mcp_protocol_error"), "code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String}).annotate(identifier="BetaMCPProtocolError")
|
|
851
|
+
BetaMCPToolExecutionError: _StructSchema[_T.BetaMCPToolExecutionError, _t.Never, _t.Never] = _b.struct(_T.BetaMCPToolExecutionError, {"type": _b.literal("mcp_tool_execution_error"), "content": _S.Json.annotate(expected="JSON value")}).annotate(identifier="BetaMCPToolExecutionError")
|
|
852
|
+
BetaHTTPError: _StructSchema[_T.BetaHTTPError, _t.Never, _t.Never] = _b.struct(_T.BetaHTTPError, {"type": _b.literal("http_error"), "code": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "message": _S.String}).annotate(identifier="BetaHTTPError")
|
|
853
|
+
BetaMCPToolCallStatus: _S.Bottom[_T.BetaMCPToolCallStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete", "calling", "failed"]).annotate(identifier="BetaMCPToolCallStatus")
|
|
854
|
+
BetaProgramOutputItemStatus: _S.Bottom[_T.BetaProgramOutputItemStatus, _t.Any] = _b.literals(["completed", "incomplete"]).annotate(identifier="BetaProgramOutputItemStatus")
|
|
855
|
+
BetaIncludeEnum: _S.Bottom[_T.BetaIncludeEnum, _t.Any] = _b.literals(["file_search_call.results", "web_search_call.results", "web_search_call.action.sources", "message.input_image.image_url", "computer_call_output.output.image_url", "code_interpreter_call.outputs", "reasoning.encrypted_content", "message.output_text.logprobs"]).annotate(description="Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.results`: Include the search results of the web search tool call.\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).", identifier="BetaIncludeEnum")
|
|
856
|
+
BetaModerationMode: _S.Bottom[_T.BetaModerationMode, _t.Any] = _b.literals(["score", "block"]).annotate(identifier="BetaModerationMode")
|
|
857
|
+
BetaResponseStreamOptions: _S.Bottom[_T.BetaResponseStreamOptions, _t.Any] = _b.union(_b.struct(_T.BetaResponseStreamOptions__0, {"include_obfuscation": _S.Boolean.annotate(description="When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events to\nnormalize payload sizes as a mitigation to certain side-channel attacks.\nThese obfuscation fields are included by default, but add a small amount\nof overhead to the data stream. You can set `include_obfuscation` to\nfalse to optimize for bandwidth if you trust the network links between\nyour application and the OpenAI API.\n")}, optional=("include_obfuscation",)).annotate(description="Options for streaming responses. Only set this when you set `stream: true`.\n"), _S.Null).annotate(identifier="BetaResponseStreamOptions")
|
|
858
|
+
BetaConversationParam_2: _StructSchema[_T.BetaConversationParam_2, _t.Never, _t.Never] = _b.struct(_T.BetaConversationParam_2, {"id": _S.String.annotate(description="The unique ID of the conversation.")}).annotate(title="Conversation object", description="The conversation that this response belongs to.", identifier="BetaConversationParam-2")
|
|
859
|
+
BetaContextManagementParam: _StructSchema[_T.BetaContextManagementParam, _t.Never, _t.Never] = _b.struct(_T.BetaContextManagementParam, {"type": _S.String.annotate(description="The context management entry type. Currently only 'compaction' is supported."), "compact_threshold": _b.union(_b.check(_b.check(_S.Number.annotate(description="Token threshold at which compaction should be triggered for this entry."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1000).annotate(expected="a value greater than or equal to 1000")), _S.Null)}, optional=("compact_threshold",)).annotate(identifier="BetaContextManagementParam")
|
|
860
|
+
BetaMultiAgentParam: _StructSchema[_T.BetaMultiAgentParam, _t.Never, _t.Never] = _b.struct(_T.BetaMultiAgentParam, {"enabled": _S.Boolean.annotate(description="Whether to enable server-hosted multi-agent execution for this response."), "max_concurrent_subagents": _b.check(_b.check(_S.Number.annotate(description="`max_concurrent_subagents` sets the maximum number of subagents that can be active simultaneously across the entire agent tree. It includes all descendants—children, grandchildren, and deeper subagents—but excludes the root agent.\nThe API does not impose a fixed upper bound on this setting. The default is `3`, which is recommended for most workloads. Multi-agent runs also have no fixed limit on tree depth or the total number of subagents created during a run."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(1).annotate(expected="a value greater than or equal to 1"))}, optional=("max_concurrent_subagents",)).annotate(description="Configuration for server-hosted multi-agent execution.", identifier="BetaMultiAgentParam")
|
|
861
|
+
BetaResponseErrorCode: _S.Bottom[_T.BetaResponseErrorCode, _t.Any] = _b.literals(["server_error", "rate_limit_exceeded", "invalid_prompt", "data_residency_mismatch", "bio_policy", "misalignment_policy_violation", "vector_store_timeout", "invalid_image", "invalid_image_format", "invalid_base64_image", "invalid_image_url", "image_too_large", "image_too_small", "image_parse_error", "image_content_policy_violation", "invalid_image_mode", "image_file_too_large", "unsupported_image_media_type", "empty_image_file", "failed_to_download_image", "image_file_not_found"]).annotate(description="The error code for the response.\n", identifier="BetaResponseErrorCode")
|
|
862
|
+
Beta_MisalignmentErrorType: _S.Bottom[_T.Beta_MisalignmentErrorType, _t.Any] = _b.union(_S.String, _b.literals(["potentially_unintended_data_transfer", "potentially_unintended_data_access", "potentially_unintended_destructive_activity", "other"])).annotate(identifier="Beta_MisalignmentErrorType")
|
|
863
|
+
Beta_MisalignmentSteer: _StructSchema[_T.Beta_MisalignmentSteer, _t.Never, _t.Never] = _b.struct(_T.Beta_MisalignmentSteer, {"message": _S.String.annotate(description="The public continuation instruction.")}).annotate(identifier="Beta_MisalignmentSteer")
|
|
864
|
+
BetaTextContent: _StructSchema[_T.BetaTextContent, _t.Never, _t.Never] = _b.struct(_T.BetaTextContent, {"type": _b.literal("text"), "text": _S.String}).annotate(title="Text Content", description="A text content.", identifier="BetaTextContent")
|
|
865
|
+
BetaEncryptedContent: _StructSchema[_T.BetaEncryptedContent, _t.Never, _t.Never] = _b.struct(_T.BetaEncryptedContent, {"type": _b.literal("encrypted_content").annotate(description="The type of the input item. Always `encrypted_content`."), "encrypted_content": _S.String.annotate(description="Opaque encrypted content.")}).annotate(title="Encrypted content", description="Opaque encrypted content that Responses API decrypts inside trusted model execution.", identifier="BetaEncryptedContent")
|
|
866
|
+
BetaMultiAgentAction: _S.Bottom[_T.BetaMultiAgentAction, _t.Any] = _b.literals(["spawn_agent", "interrupt_agent", "list_agents", "send_message", "followup_task", "wait_agent"]).annotate(identifier="BetaMultiAgentAction")
|
|
867
|
+
BetaProgramOutputStatus: _S.Bottom[_T.BetaProgramOutputStatus, _t.Any] = _b.literals(["completed", "incomplete"]).annotate(identifier="BetaProgramOutputStatus")
|
|
868
|
+
BetaFunctionCallStatus: _S.Bottom[_T.BetaFunctionCallStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="BetaFunctionCallStatus")
|
|
869
|
+
BetaFunctionCallOutputStatusEnum: _S.Bottom[_T.BetaFunctionCallOutputStatusEnum, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="BetaFunctionCallOutputStatusEnum")
|
|
870
|
+
BetaMessageRole: _S.Bottom[_T.BetaMessageRole, _t.Any] = _b.literals(["unknown", "user", "assistant", "system", "critic", "discriminator", "developer", "tool"]).annotate(identifier="BetaMessageRole")
|
|
871
|
+
BetaFunctionShellAction: _StructSchema[_T.BetaFunctionShellAction, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellAction, {"commands": _b.array(_S.String.annotate(description="A list of commands to run.")), "timeout_ms": _b.union(_b.check(_S.Number.annotate(description="Optional timeout in milliseconds for the commands."), _S.is_int().annotate(expected="an integer")), _S.Null), "max_output_length": _b.union(_b.check(_S.Number.annotate(description="Optional maximum number of characters to return from each command."), _S.is_int().annotate(expected="an integer")), _S.Null)}).annotate(title="Shell exec action", description="Execute a shell command.", identifier="BetaFunctionShellAction")
|
|
872
|
+
BetaFunctionShellCallStatus: _S.Bottom[_T.BetaFunctionShellCallStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="BetaFunctionShellCallStatus")
|
|
873
|
+
BetaLocalEnvironmentResource: _StructSchema[_T.BetaLocalEnvironmentResource, _t.Never, _t.Never] = _b.struct(_T.BetaLocalEnvironmentResource, {"type": _b.literal("local").annotate(description="The environment type. Always `local`.")}).annotate(title="Local Environment", description="Represents the use of a local environment to perform shell actions.", identifier="BetaLocalEnvironmentResource")
|
|
874
|
+
BetaContainerReferenceResource: _StructSchema[_T.BetaContainerReferenceResource, _t.Never, _t.Never] = _b.struct(_T.BetaContainerReferenceResource, {"type": _b.literal("container_reference").annotate(description="The environment type. Always `container_reference`."), "container_id": _S.String}).annotate(title="Container Reference", description="Represents a container created with /v1/containers.", identifier="BetaContainerReferenceResource")
|
|
875
|
+
BetaFunctionShellCallOutputStatusEnum: _S.Bottom[_T.BetaFunctionShellCallOutputStatusEnum, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="BetaFunctionShellCallOutputStatusEnum")
|
|
876
|
+
BetaFunctionShellCallOutputTimeoutOutcome: _StructSchema[_T.BetaFunctionShellCallOutputTimeoutOutcome, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellCallOutputTimeoutOutcome, {"type": _b.literal("timeout").annotate(description="The outcome type. Always `timeout`.")}).annotate(title="Shell call timeout outcome", description="Indicates that the shell call exceeded its configured time limit.", identifier="BetaFunctionShellCallOutputTimeoutOutcome")
|
|
877
|
+
BetaFunctionShellCallOutputExitOutcome: _StructSchema[_T.BetaFunctionShellCallOutputExitOutcome, _t.Never, _t.Never] = _b.struct(_T.BetaFunctionShellCallOutputExitOutcome, {"type": _b.literal("exit").annotate(description="The outcome type. Always `exit`."), "exit_code": _b.check(_S.Number.annotate(description="Exit code from the shell process."), _S.is_int().annotate(expected="an integer"))}).annotate(title="Shell call exit outcome", description="Indicates that the shell commands finished and returned an exit code.", identifier="BetaFunctionShellCallOutputExitOutcome")
|
|
878
|
+
BetaApplyPatchCallStatus: _S.Bottom[_T.BetaApplyPatchCallStatus, _t.Any] = _b.literals(["in_progress", "completed"]).annotate(identifier="BetaApplyPatchCallStatus")
|
|
879
|
+
BetaApplyPatchCreateFileOperation: _StructSchema[_T.BetaApplyPatchCreateFileOperation, _t.Never, _t.Never] = _b.struct(_T.BetaApplyPatchCreateFileOperation, {"type": _b.literal("create_file").annotate(description="Create a new file with the provided diff."), "path": _S.String.annotate(description="Path of the file to create."), "diff": _S.String.annotate(description="Diff to apply.")}).annotate(title="Apply patch create file operation", description="Instruction describing how to create a file via the apply_patch tool.", identifier="BetaApplyPatchCreateFileOperation")
|
|
880
|
+
BetaApplyPatchDeleteFileOperation: _StructSchema[_T.BetaApplyPatchDeleteFileOperation, _t.Never, _t.Never] = _b.struct(_T.BetaApplyPatchDeleteFileOperation, {"type": _b.literal("delete_file").annotate(description="Delete the specified file."), "path": _S.String.annotate(description="Path of the file to delete.")}).annotate(title="Apply patch delete file operation", description="Instruction describing how to delete a file via the apply_patch tool.", identifier="BetaApplyPatchDeleteFileOperation")
|
|
881
|
+
BetaApplyPatchUpdateFileOperation: _StructSchema[_T.BetaApplyPatchUpdateFileOperation, _t.Never, _t.Never] = _b.struct(_T.BetaApplyPatchUpdateFileOperation, {"type": _b.literal("update_file").annotate(description="Update an existing file with the provided diff."), "path": _S.String.annotate(description="Path of the file to update."), "diff": _S.String.annotate(description="Diff to apply.")}).annotate(title="Apply patch update file operation", description="Instruction describing how to update a file via the apply_patch tool.", identifier="BetaApplyPatchUpdateFileOperation")
|
|
882
|
+
BetaApplyPatchCallOutputStatus: _S.Bottom[_T.BetaApplyPatchCallOutputStatus, _t.Any] = _b.literals(["completed", "failed"]).annotate(identifier="BetaApplyPatchCallOutputStatus")
|
|
883
|
+
BetaResponseUsage: _StructSchema[_T.BetaResponseUsage, _t.Never, _t.Never] = _b.struct(_T.BetaResponseUsage, {"input_tokens": _b.check(_S.Number.annotate(description="The number of input tokens."), _S.is_int().annotate(expected="an integer")), "input_tokens_details": _b.struct(_T.BetaResponseUsage__input_tokens_details, {"cached_tokens": _b.check(_S.Number.annotate(description="The number of tokens that were retrieved from the cache.\n[More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).\n"), _S.is_int().annotate(expected="an integer")), "cache_write_tokens": _b.check(_S.Number.annotate(description="The number of input tokens that were written to the cache."), _S.is_int().annotate(expected="an integer"))}).annotate(description="A detailed breakdown of the input tokens."), "output_tokens": _b.check(_S.Number.annotate(description="The number of output tokens."), _S.is_int().annotate(expected="an integer")), "output_tokens_details": _b.struct(_T.BetaResponseUsage__output_tokens_details, {"reasoning_tokens": _b.check(_S.Number.annotate(description="The number of reasoning tokens."), _S.is_int().annotate(expected="an integer"))}).annotate(description="A detailed breakdown of the output tokens."), "total_tokens": _b.check(_S.Number.annotate(description="The total number of tokens used."), _S.is_int().annotate(expected="an integer"))}).annotate(description="Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n", identifier="BetaResponseUsage")
|
|
884
|
+
BetaCacheMissReasonTypeEnum: _S.Bottom[_T.BetaCacheMissReasonTypeEnum, _t.Any] = _b.literals(["model_changed", "prompt_cache_key_changed", "tools_changed", "text_format_changed", "reasoning_effort_changed", "verbosity_changed", "context_compacted", "input_changed", "service_tier_changed"]).annotate(identifier="BetaCacheMissReasonTypeEnum")
|
|
885
|
+
BetaPromptCacheHitDiagnosticsBody: _StructSchema[_T.BetaPromptCacheHitDiagnosticsBody, _t.Never, _t.Never] = _b.struct(_T.BetaPromptCacheHitDiagnosticsBody, {"type": _b.literal("cache_hit")}).annotate(identifier="BetaPromptCacheHitDiagnosticsBody")
|
|
886
|
+
BetaPromptCacheComparisonResponseNotFoundDiagnosticsBody: _StructSchema[_T.BetaPromptCacheComparisonResponseNotFoundDiagnosticsBody, _t.Never, _t.Never] = _b.struct(_T.BetaPromptCacheComparisonResponseNotFoundDiagnosticsBody, {"type": _b.literal("comparison_response_not_found")}).annotate(identifier="BetaPromptCacheComparisonResponseNotFoundDiagnosticsBody")
|
|
887
|
+
BetaPromptCacheUnavailableDiagnosticsBody: _StructSchema[_T.BetaPromptCacheUnavailableDiagnosticsBody, _t.Never, _t.Never] = _b.struct(_T.BetaPromptCacheUnavailableDiagnosticsBody, {"type": _b.literal("unavailable")}).annotate(identifier="BetaPromptCacheUnavailableDiagnosticsBody")
|
|
888
|
+
BetaModerationInputType: _S.Bottom[_T.BetaModerationInputType, _t.Any] = _b.literals(["text", "image"]).annotate(identifier="BetaModerationInputType")
|
|
889
|
+
BetaModerationErrorBody: _StructSchema[_T.BetaModerationErrorBody, _t.Never, _t.Never] = _b.struct(_T.BetaModerationErrorBody, {"type": _b.literal("error").annotate(description="The object type, which was always `error` for moderation failures."), "code": _S.String.annotate(description="The error code."), "message": _S.String.annotate(description="The error message.")}).annotate(title="Moderation error", description="An error produced while attempting moderation for the response input or output.", identifier="BetaModerationErrorBody")
|
|
890
|
+
BetaResponseConversation: _StructSchema[_T.BetaResponseConversation, _t.Never, _t.Never] = _b.struct(_T.BetaResponseConversation, {"id": _S.String.annotate(description="The unique ID of the conversation that this response was associated with.")}).annotate(title="Conversation", description="The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.", identifier="BetaResponseConversation")
|
|
891
|
+
BetaShellCallOutputDelta: _StructSchema[_T.BetaShellCallOutputDelta, _t.Never, _t.Never] = _b.struct(_T.BetaShellCallOutputDelta, {"stdout": _S.String.annotate(description="The stdout delta that was emitted."), "stderr": _S.String.annotate(description="The stderr delta that was emitted.")}, optional=("stdout", "stderr",)).annotate(title="Shell call output delta", description="A delta of stdout/stderr emitted while a shell call was running.", identifier="BetaShellCallOutputDelta")
|
|
892
|
+
BetaResponseLogProb: _StructSchema[_T.BetaResponseLogProb, _t.Never, _t.Never] = _b.struct(_T.BetaResponseLogProb, {"token": _S.String.annotate(description="A possible text token."), "logprob": _b.check(_S.Number.annotate(description="The log probability of this token.\n"), _S.is_finite().annotate(expected="a finite number")), "top_logprobs": _b.array(_b.struct(_T.BetaResponseLogProb__top_logprobs__item, {"token": _S.String.annotate(description="A possible text token."), "logprob": _b.check(_S.Number.annotate(description="The log probability of this token."), _S.is_finite().annotate(expected="a finite number"))}, optional=("token", "logprob",))).annotate(description="The log probabilities of up to 20 of the most likely tokens.\n")}, optional=("top_logprobs",)).annotate(description="A logprob is the logarithmic probability that the model assigns to producing \na particular token at a given position in the sequence. Less-negative (higher) \nlogprob values indicate greater model confidence in that token choice.\n", identifier="BetaResponseLogProb")
|
|
893
|
+
BetaPromptCacheRetentionEnum: _S.Bottom[_T.BetaPromptCacheRetentionEnum, _t.Any] = _b.literals(["in_memory", "24h"]).annotate(identifier="BetaPromptCacheRetentionEnum")
|
|
894
|
+
BetaServiceTierEnum: _S.Bottom[_T.BetaServiceTierEnum, _t.Any] = _b.literals(["auto", "default", "fast", "flex", "priority"]).annotate(identifier="BetaServiceTierEnum")
|
|
895
|
+
BetaMessageStatus: _S.Bottom[_T.BetaMessageStatus, _t.Any] = _b.literals(["in_progress", "completed", "incomplete"]).annotate(identifier="BetaMessageStatus")
|
|
896
|
+
BetaMessagePhase_2: _S.Bottom[_T.BetaMessagePhase_2, _t.Any] = _b.literals(["commentary", "final_answer"]).annotate(identifier="BetaMessagePhase-2")
|
|
897
|
+
BetaTruncationEnum: _S.Bottom[_T.BetaTruncationEnum, _t.Any] = _b.literals(["auto", "disabled"]).annotate(identifier="BetaTruncationEnum")
|
|
898
|
+
BetaPersonalityEnum: _S.Bottom[_T.BetaPersonalityEnum, _t.Any] = _b.union(_S.String, _b.literals(["friendly", "pragmatic"])).annotate(identifier="BetaPersonalityEnum")
|
|
899
|
+
BetaTokenCountsResource: _StructSchema[_T.BetaTokenCountsResource, _t.Never, _t.Never] = _b.struct(_T.BetaTokenCountsResource, {"object": _b.literal("response.input_tokens"), "input_tokens": _b.check(_S.Number, _S.is_int().annotate(expected="an integer"))}).annotate(title="Token counts", identifier="BetaTokenCountsResource")
|
|
900
|
+
FileSearchRankingOptions: _StructSchema[_T.FileSearchRankingOptions, _t.Never, _t.Never] = _b.struct(_T.FileSearchRankingOptions, {"ranker": FileSearchRanker, "score_threshold": _b.check(_b.check(_b.check(_S.Number.annotate(description="The score threshold for the file search. All values must be a floating point number between 0 and 1."), _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"))}, optional=("ranker",)).annotate(title="File search tool call ranking options", description="The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information.\n", identifier="FileSearchRankingOptions")
|
|
901
|
+
RunStepDetailsToolCallsFileSearchRankingOptionsObject: _StructSchema[_T.RunStepDetailsToolCallsFileSearchRankingOptionsObject, _t.Never, _t.Never] = _b.struct(_T.RunStepDetailsToolCallsFileSearchRankingOptionsObject, {"ranker": FileSearchRanker, "score_threshold": _b.check(_b.check(_b.check(_S.Number.annotate(description="The score threshold for the file search. All values must be a floating point number between 0 and 1."), _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"))}).annotate(title="File search tool call ranking options", description="The ranking options for the file search.", identifier="RunStepDetailsToolCallsFileSearchRankingOptionsObject")
|
|
902
|
+
FunctionObject: _StructSchema[_T.FunctionObject, _t.Never, _t.Never] = _b.struct(_T.FunctionObject, {"description": _S.String.annotate(description="A description of what the function does, used by the model to choose when and how to call the function."), "name": _S.String.annotate(description="The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."), "parameters": FunctionParameters, "strict": _b.union(_S.Boolean.annotate(description="Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://developers.openai.com/api/docs/guides/function-calling)."), _S.Null)}, optional=("description", "parameters", "strict",)).annotate(identifier="FunctionObject")
|
|
903
|
+
ChatCompletionFunctions: _StructSchema[_T.ChatCompletionFunctions, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionFunctions, {"description": _S.String.annotate(description="A description of what the function does, used by the model to choose when and how to call the function."), "name": _S.String.annotate(description="The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."), "parameters": FunctionParameters}, optional=("description", "parameters",)).annotate(identifier="ChatCompletionFunctions")
|
|
904
|
+
EvalLogsDataSourceConfig: _StructSchema[_T.EvalLogsDataSourceConfig, _t.Never, _t.Never] = _b.struct(_T.EvalLogsDataSourceConfig, {"type": _b.literal("logs").annotate(description="The type of data source. Always `logs`."), "metadata": Metadata, "schema": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n")}, optional=("metadata",)).annotate(title="LogsDataSourceConfig", description="A LogsDataSourceConfig which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.\nThe schema returned by this data source config is used to defined what variables are available in your evals.\n`item` and `sample` are both defined when using this data source config.\n", identifier="EvalLogsDataSourceConfig")
|
|
905
|
+
EvalStoredCompletionsDataSourceConfig: _StructSchema[_T.EvalStoredCompletionsDataSourceConfig, _t.Never, _t.Never] = _b.struct(_T.EvalStoredCompletionsDataSourceConfig, {"type": _b.literal("stored_completions").annotate(description="The type of data source. Always `stored_completions`."), "metadata": Metadata, "schema": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="The json schema for the run data source items.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n")}, optional=("metadata",)).annotate(title="StoredCompletionsDataSourceConfig", description="Deprecated in favor of LogsDataSourceConfig.\n", identifier="EvalStoredCompletionsDataSourceConfig")
|
|
906
|
+
EvalStoredCompletionsSource: _StructSchema[_T.EvalStoredCompletionsSource, _t.Never, _t.Never] = _b.struct(_T.EvalStoredCompletionsSource, {"type": _b.literal("stored_completions").annotate(description="The type of source. Always `stored_completions`."), "metadata": Metadata, "model": _b.union(_S.String.annotate(description="An optional model to filter by (e.g., 'gpt-6-astra')."), _S.Null), "created_after": _b.union(_b.check(_S.Number.annotate(description="An optional Unix timestamp to filter items created after this time."), _S.is_int().annotate(expected="an integer")), _S.Null), "created_before": _b.union(_b.check(_S.Number.annotate(description="An optional Unix timestamp to filter items created before this time."), _S.is_int().annotate(expected="an integer")), _S.Null), "limit": _b.union(_b.check(_S.Number.annotate(description="An optional maximum number of items to return."), _S.is_int().annotate(expected="an integer")), _S.Null)}, optional=("metadata", "model", "created_after", "created_before", "limit",)).annotate(title="StoredCompletionsRunDataSource", description="A StoredCompletionsRunDataSource configuration describing a set of filters\n", identifier="EvalStoredCompletionsSource")
|
|
907
|
+
ThreadObject: _StructSchema[_T.ThreadObject, _t.Never, _t.Never] = _b.struct(_T.ThreadObject, {"id": _S.String.annotate(description="The identifier, which can be referenced in API endpoints."), "object": _b.literal("thread").annotate(description="The object type, which is always `thread`."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the thread was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "tool_resources": _b.union(_b.struct(_T.ThreadObject__tool_resources__0, {"code_interpreter": _b.struct(_T.ThreadObject__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.ThreadObject__tool_resources__0__file_search, {"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"))}, optional=("vector_store_ids",))}, 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}).annotate(title="Thread", description="Represents a thread that contains [messages](https://developers.openai.com/api/docs/assistants/migration).", identifier="ThreadObject")
|
|
908
|
+
ModifyThreadRequest: _StructSchema[_T.ModifyThreadRequest, _t.Never, _t.Never] = _b.struct(_T.ModifyThreadRequest, {"tool_resources": _b.union(_b.struct(_T.ModifyThreadRequest__tool_resources__0, {"code_interpreter": _b.struct(_T.ModifyThreadRequest__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.ModifyThreadRequest__tool_resources__0__file_search, {"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"))}, optional=("vector_store_ids",))}, 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=("tool_resources", "metadata",)).annotate(identifier="ModifyThreadRequest")
|
|
909
|
+
ModifyMessageRequest: _StructSchema[_T.ModifyMessageRequest, _t.Never, _t.Never] = _b.struct(_T.ModifyMessageRequest, {"metadata": Metadata}, optional=("metadata",)).annotate(identifier="ModifyMessageRequest")
|
|
910
|
+
ModifyRunRequest: _StructSchema[_T.ModifyRunRequest, _t.Never, _t.Never] = _b.struct(_T.ModifyRunRequest, {"metadata": Metadata}, optional=("metadata",)).annotate(identifier="ModifyRunRequest")
|
|
911
|
+
UpdateConversationBody: _StructSchema[_T.UpdateConversationBody, _t.Never, _t.Never] = _b.struct(_T.UpdateConversationBody, {"metadata": _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.")}).annotate(identifier="UpdateConversationBody")
|
|
912
|
+
ResponseFormatJsonSchema: _StructSchema[_T.ResponseFormatJsonSchema, _t.Never, _t.Never] = _b.struct(_T.ResponseFormatJsonSchema, {"type": _b.literal("json_schema").annotate(description="The type of response format being defined. Always `json_schema`."), "json_schema": _b.struct(_T.ResponseFormatJsonSchema__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": ResponseFormatJsonSchemaSchema, "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", "schema", "strict",)).annotate(title="JSON schema", description="Structured Outputs configuration options, including a JSON Schema.\n")}).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="ResponseFormatJsonSchema")
|
|
913
|
+
TextResponseFormatJsonSchema: _StructSchema[_T.TextResponseFormatJsonSchema, _t.Never, _t.Never] = _b.struct(_T.TextResponseFormatJsonSchema, {"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": ResponseFormatJsonSchemaSchema, "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="TextResponseFormatJsonSchema")
|
|
914
|
+
MisalignmentErrorDetailsResource: _StructSchema[_T.MisalignmentErrorDetailsResource, _t.Never, _t.Never] = _b.struct(_T.MisalignmentErrorDetailsResource, {"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: _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: _MisalignmentSteer).annotate(description="An optional public continuation instruction.")}, optional=("review_target", "error_type", "detailed_explanation", "steer",)).annotate(identifier="MisalignmentErrorDetailsResource")
|
|
915
|
+
ResponseConfigurationUpdate: _StructSchema[_T.ResponseConfigurationUpdate, _t.Never, _t.Never] = _b.struct(_T.ResponseConfigurationUpdate, {"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.ResponseConfigurationUpdate__reasoning, {"effort": _b.suspend(lambda: ReasoningEffort).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=("reasoning",)).annotate(description="A configuration update that applies to subsequent responses until it is\nreplaced by another configuration update.\n", identifier="ResponseConfigurationUpdate")
|
|
916
|
+
EvalResponsesSource: _StructSchema[_T.EvalResponsesSource, _t.Never, _t.Never] = _b.struct(_T.EvalResponsesSource, {"type": _b.literal("responses").annotate(description="The type of run data source. Always `responses`."), "metadata": _b.union(_b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="Metadata filter for the responses. This is a query parameter used to select responses."), _S.Null), "model": _b.union(_S.String.annotate(description="The name of the model to find responses for. This is a query parameter used to select responses."), _S.Null), "instructions_search": _b.union(_S.String.annotate(description="Optional string to search the 'instructions' field. This is a query parameter used to select responses."), _S.Null), "created_after": _b.union(_b.check(_b.check(_S.Number.annotate(description="Only include items created after this timestamp (inclusive). This is a query parameter used to select responses."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(0).annotate(expected="a value greater than or equal to 0")), _S.Null), "created_before": _b.union(_b.check(_b.check(_S.Number.annotate(description="Only include items created before this timestamp (inclusive). This is a query parameter used to select responses."), _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(0).annotate(expected="a value greater than or equal to 0")), _S.Null), "reasoning_effort": _b.union(_b.suspend(lambda: ReasoningEffort).annotate(description="Optional reasoning effort parameter. This is a query parameter used to select responses."), _S.Null), "temperature": _b.union(_b.check(_S.Number.annotate(description="Sampling temperature. This is a query parameter used to select responses."), _S.is_finite().annotate(expected="a finite number")), _S.Null), "top_p": _b.union(_b.check(_S.Number.annotate(description="Nucleus sampling parameter. This is a query parameter used to select responses."), _S.is_finite().annotate(expected="a finite number")), _S.Null), "users": _b.union(_b.array(_S.String).annotate(description="List of user identifiers. This is a query parameter used to select responses."), _S.Null), "tools": _b.union(_b.array(_S.String).annotate(description="List of tool names. This is a query parameter used to select responses."), _S.Null)}, optional=("metadata", "model", "instructions_search", "created_after", "created_before", "reasoning_effort", "temperature", "top_p", "users", "tools",)).annotate(title="EvalResponsesSource", description="A EvalResponsesSource object describing a run data source configuration.\n", identifier="EvalResponsesSource")
|
|
917
|
+
CreateSpeechRequest: _StructSchema[_T.CreateSpeechRequest, _t.Never, _t.Never] = _b.struct(_T.CreateSpeechRequest, {"model": _b.union(_S.String, _b.literals(["tts-1", "tts-1-hd", "gpt-4o-mini-tts", "gpt-4o-mini-tts-2025-12-15"])).annotate(description="One of the available [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.\n"), "input": _b.check(_S.String.annotate(description="The text to generate audio for. The maximum length is 4096 characters."), _S.is_max_code_points(4096).annotate(expected="a string with at most 4096 code points")), "instructions": _b.check(_S.String.annotate(description="Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`."), _S.is_max_code_points(4096).annotate(expected="a string with at most 4096 code points")), "voice": _b.union(_b.union(VoiceIdsShared, _b.literals(["fable", "onyx", "nova"])), _b.struct(_T.CreateSpeechRequest__voice__1, {"id": _S.String.annotate(description="The custom voice ID, e.g. `voice_1234`.")}).annotate(description="Custom voice reference.")).annotate(title="Voice", description="The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ \"id\": \"voice_1234\" }`. Previews of the voices are available in the [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). Custom voices must be created from audio samples."), "response_format": _b.literals(["mp3", "opus", "aac", "flac", "wav", "pcm"]).annotate(description="The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`."), "speed": _b.check(_b.check(_b.check(_S.Number.annotate(description="The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default."), _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(4).annotate(expected="a value less than or equal to 4")), "stream_format": _b.literals(["sse", "audio"]).annotate(description="The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`.")}, optional=("instructions", "response_format", "speed", "stream_format",)).annotate(identifier="CreateSpeechRequest")
|
|
918
|
+
VoiceIdsOrCustomVoice: _S.Bottom[_T.VoiceIdsOrCustomVoice, _t.Any] = _b.union(VoiceIdsShared, _b.struct(_T.VoiceIdsOrCustomVoice__1, {"id": _S.String.annotate(description="The custom voice ID, e.g. `voice_1234`.")}).annotate(description="Custom voice reference.")).annotate(title="Voice", description="A built-in voice name or a custom voice reference.\n", identifier="VoiceIdsOrCustomVoice")
|
|
919
|
+
CreateSpeechResponseStreamEvent: _S.Bottom[_T.CreateSpeechResponseStreamEvent, _t.Any] = _b.union(SpeechAudioDeltaEvent, SpeechAudioDoneEvent).annotate(identifier="CreateSpeechResponseStreamEvent")
|
|
920
|
+
CreateTranslationRequestMultipart: _StructSchema[_T.CreateTranslationRequestMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateTranslationRequestMultipart, {"file": __ClientMultipartFile, "model": _b.union(_S.String, _b.literal("whisper-1")).annotate(description="ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.\n"), "prompt": _S.String.annotate(description="An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should be in English.\n"), "response_format": _b.literals(["json", "text", "srt", "verbose_json", "vtt"]).annotate(description="The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.\n"), "temperature": _b.check(_S.Number.annotate(description="The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n"), _S.is_finite().annotate(expected="a finite number"))}, optional=("prompt", "response_format", "temperature",)).annotate(identifier="CreateTranslationRequestMultipart")
|
|
921
|
+
CreateVoiceConsentRequestMultipart: _StructSchema[_T.CreateVoiceConsentRequestMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateVoiceConsentRequestMultipart, {"name": _S.String.annotate(description="The label to use for this consent recording."), "recording": __ClientMultipartFile, "language": _S.String.annotate(description="The BCP 47 language tag for the consent phrase (for example, `en-US`).")}).annotate(identifier="CreateVoiceConsentRequestMultipart")
|
|
922
|
+
CreateVoiceFromConsentRequestMultipart: _StructSchema[_T.CreateVoiceFromConsentRequestMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateVoiceFromConsentRequestMultipart, {"type": _b.literal("audio_sample").annotate(description="The voice creation method. Defaults to `audio_sample` when omitted."), "name": _b.check(_b.check(_S.String.annotate(description="The name of the new voice."), _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")), "audio_sample": __ClientMultipartFile, "consent": _S.String.annotate(description="The consent recording ID (for example, `cons_1234`).")}, optional=("type",)).annotate(title="Consent", description="Creates a voice from a consent recording and an audio sample. Requires multipart/form-data.", identifier="CreateVoiceFromConsentRequestMultipart")
|
|
923
|
+
CreateContainerFileBodyMultipart: _StructSchema[_T.CreateContainerFileBodyMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateContainerFileBodyMultipart, {"file_id": _S.String.annotate(description="Name of the file to create."), "file": __ClientMultipartFile}, optional=("file_id", "file",)).annotate(identifier="CreateContainerFileBodyMultipart")
|
|
924
|
+
CreateImageVariationRequestMultipart: _StructSchema[_T.CreateImageVariationRequestMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateImageVariationRequestMultipart, {"image": __ClientMultipartFile, "model": _b.union(_S.String, _b.literal("dall-e-2"), _S.Null).annotate(description="The legacy model used by the retired image variations endpoint. This endpoint no longer accepts requests."), "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(10).annotate(expected="a value less than or equal to 10")), _S.Null).annotate(description="The number of images to generate. Must be between 1 and 10."), "response_format": _b.union(_b.literals(["url", "b64_json"]), _S.Null).annotate(description="The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated."), "size": _b.union(_b.literals(["256x256", "512x512", "1024x1024"]), _S.Null).annotate(description="The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`."), "user": _S.String.annotate(description="A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n")}, optional=("model", "n", "response_format", "size", "user",)).annotate(description="Legacy request for the retired image variations endpoint.", identifier="CreateImageVariationRequestMultipart")
|
|
925
|
+
AddUploadPartRequestMultipart: _StructSchema[_T.AddUploadPartRequestMultipart, _t.Never, _t.Never] = _b.struct(_T.AddUploadPartRequestMultipart, {"data": __ClientMultipartFile}).annotate(identifier="AddUploadPartRequestMultipart")
|
|
926
|
+
CreateContentProvenanceBodyMultipart: _StructSchema[_T.CreateContentProvenanceBodyMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateContentProvenanceBodyMultipart, {"file": __ClientMultipartFile}).annotate(identifier="CreateContentProvenanceBodyMultipart")
|
|
927
|
+
CreateVideoCharacterBodyMultipart: _StructSchema[_T.CreateVideoCharacterBodyMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateVideoCharacterBodyMultipart, {"video": __ClientMultipartFile, "name": _b.check(_b.check(_S.String.annotate(description="Display name for this API character."), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_code_points(80).annotate(expected="a string with at most 80 code points"))}).annotate(title="Create character request", description="Parameters for creating a character from an uploaded video.", identifier="CreateVideoCharacterBodyMultipart")
|
|
928
|
+
CreateSkillBodyMultipart: _StructSchema[_T.CreateSkillBodyMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateSkillBodyMultipart, {"files": _b.union(_b.check(_b.array(__ClientMultipartFile).annotate(description="Skill files to upload (directory upload) or a single zip file."), _S.is_max_length(500).annotate(expected="a value with a length of at most 500")), __ClientMultipartFile, mode="one_of")}).annotate(title="Create skill request", description="Uploads a skill either as a directory (multipart `files[]`) or as a single zip file.", identifier="CreateSkillBodyMultipart")
|
|
929
|
+
CreateSkillVersionBodyMultipart: _StructSchema[_T.CreateSkillVersionBodyMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateSkillVersionBodyMultipart, {"files": _b.union(_b.check(_b.array(__ClientMultipartFile).annotate(description="Skill files to upload (directory upload) or a single zip file."), _S.is_max_length(500).annotate(expected="a value with a length of at most 500")), __ClientMultipartFile, mode="one_of"), "default": _S.Boolean.annotate(description="Whether to set this version as the default.")}, optional=("default",)).annotate(title="Create skill version request", description="Uploads a new immutable version of a skill.", identifier="CreateSkillVersionBodyMultipart")
|
|
930
|
+
CreateTranscriptionRequestMultipart: _StructSchema[_T.CreateTranscriptionRequestMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateTranscriptionRequestMultipart, {"file": __ClientMultipartFile, "model": _b.union(_S.String, _b.literals(["whisper-1", "gpt-transcribe", "gpt-4o-transcribe", "gpt-4o-mini-transcribe", "gpt-4o-mini-transcribe-2025-12-15", "gpt-4o-transcribe-diarize"])).annotate(description="ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.\n"), "language": _S.String.annotate(description="The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency.\n"), "languages": _b.check(_b.array(_S.String).annotate(description="Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe`.\n"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), "keywords": _b.array(_S.String).annotate(description="Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe`.\n"), "prompt": _S.String.annotate(description="An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`.\n"), "response_format": AudioResponseFormat, "temperature": _b.check(_S.Number.annotate(description="The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n"), _S.is_finite().annotate(expected="a finite number")), "include": _b.array(TranscriptionInclude).annotate(description="Additional information to include in the transcription response.\n`logprobs` will return the log probabilities of the tokens in the\nresponse to understand the model's confidence in the transcription.\n`logprobs` only works with response_format set to `json` and only with\nthe models `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is not supported when using `gpt-4o-transcribe-diarize`.\n"), "timestamp_granularities": _b.array(_b.literals(["word", "segment"])).annotate(description="The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.\nThis option is not available for `gpt-4o-transcribe-diarize`.\n"), "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 of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming)\nfor more information.\n\nNote: Streaming is not supported for the `whisper-1` model and will be ignored.\n"), _S.Null), "chunking_strategy": _b.union(_b.union(_b.literal("auto").annotate(description="Automatically set chunking parameters based on the audio. Must be set to `\"auto\"`.\n"), VadConfig).annotate(description="Controls how the audio is cut into chunks. When set to `\"auto\"`, the server first normalizes loudness and then uses voice activity detection (VAD) to choose boundaries. `server_vad` object can be provided to tweak VAD detection parameters manually. If unset, the audio is transcribed as a single block. Required when using `gpt-4o-transcribe-diarize` for inputs longer than 30 seconds. "), _S.Null), "known_speaker_names": _b.check(_b.array(_S.String).annotate(description="Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported.\n"), _S.is_max_length(4).annotate(expected="a value with a length of at most 4")), "known_speaker_references": _b.check(_b.array(_S.String).annotate(description="Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) that contain known speaker references matching `known_speaker_names[]`. Each sample must be between 2 and 10 seconds, and can use any of the same input audio formats supported by `file`.\n"), _S.is_max_length(4).annotate(expected="a value with a length of at most 4"))}, optional=("language", "languages", "keywords", "prompt", "response_format", "temperature", "include", "timestamp_granularities", "stream", "chunking_strategy", "known_speaker_names", "known_speaker_references",)).annotate(identifier="CreateTranscriptionRequestMultipart")
|
|
931
|
+
TranscriptTextDoneEvent: _StructSchema[_T.TranscriptTextDoneEvent, _t.Never, _t.Never] = _b.struct(_T.TranscriptTextDoneEvent, {"type": _b.literal("transcript.text.done").annotate(description="The type of the event. Always `transcript.text.done`.\n"), "text": _S.String.annotate(description="The text that was transcribed.\n"), "languages": _b.array(TranscriptionLanguage).annotate(description="The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.\n"), "logprobs": _b.array(_b.struct(_T.TranscriptTextDoneEvent__logprobs__item, {"token": _S.String.annotate(description="The token that was used to generate the log probability.\n"), "logprob": _b.check(_S.Number.annotate(description="The log probability of the token.\n"), _S.is_finite().annotate(expected="a finite number")), "bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))).annotate(description="The bytes that were used to generate the log probability.\n")}, optional=("token", "logprob", "bytes",))).annotate(description="The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`.\n"), "usage": TranscriptTextUsageTokens}, optional=("languages", "logprobs", "usage",)).annotate(description="Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`.", identifier="TranscriptTextDoneEvent")
|
|
932
|
+
CreateTranscriptionResponseJson: _StructSchema[_T.CreateTranscriptionResponseJson, _t.Never, _t.Never] = _b.struct(_T.CreateTranscriptionResponseJson, {"text": _S.String.annotate(description="The transcribed text."), "languages": _b.array(TranscriptionLanguage).annotate(description="The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.\n"), "logprobs": _b.array(_b.struct(_T.CreateTranscriptionResponseJson__logprobs__item, {"token": _S.String.annotate(description="The token in the transcription."), "logprob": _b.check(_S.Number.annotate(description="The log probability of the token."), _S.is_finite().annotate(expected="a finite number")), "bytes": _b.array(_S.Finite).annotate(description="The bytes of the token.")}, optional=("token", "logprob", "bytes",))).annotate(description="The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array.\n"), "usage": _b.union(_b.suspend(lambda: TranscriptTextUsageTokens).annotate(title="Token Usage"), _b.suspend(lambda: TranscriptTextUsageDuration).annotate(title="Duration Usage"), mode="one_of").annotate(description="Token usage statistics for the request.")}, optional=("languages", "logprobs", "usage",)).annotate(description="Represents a transcription response returned by model, based on the provided input.", identifier="CreateTranscriptionResponseJson")
|
|
933
|
+
CreateTranscriptionResponseDiarizedJson: _StructSchema[_T.CreateTranscriptionResponseDiarizedJson, _t.Never, _t.Never] = _b.struct(_T.CreateTranscriptionResponseDiarizedJson, {"task": _b.literal("transcribe").annotate(description="The type of task that was run. Always `transcribe`."), "duration": _b.check(_S.Number.annotate(description="Duration of the input audio in seconds.", format="double"), _S.is_finite().annotate(expected="a finite number")), "text": _S.String.annotate(description="The concatenated transcript text for the entire audio input."), "segments": _b.array(TranscriptionDiarizedSegment).annotate(description="Segments of the transcript annotated with timestamps and speaker labels."), "usage": _b.union(_b.suspend(lambda: TranscriptTextUsageTokens).annotate(title="Token Usage"), _b.suspend(lambda: TranscriptTextUsageDuration).annotate(title="Duration Usage"), mode="one_of").annotate(description="Token or duration usage statistics for the request.")}, optional=("usage",)).annotate(description="Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.\n", identifier="CreateTranscriptionResponseDiarizedJson")
|
|
934
|
+
CreateTranscriptionResponseVerboseJson: _StructSchema[_T.CreateTranscriptionResponseVerboseJson, _t.Never, _t.Never] = _b.struct(_T.CreateTranscriptionResponseVerboseJson, {"language": _S.String.annotate(description="The language of the input audio."), "duration": _b.check(_S.Number.annotate(description="The duration of the input audio.", format="double"), _S.is_finite().annotate(expected="a finite number")), "text": _S.String.annotate(description="The transcribed text."), "words": _b.array(TranscriptionWord).annotate(description="Extracted words and their corresponding timestamps."), "segments": _b.array(TranscriptionSegment).annotate(description="Segments of the transcribed text and their corresponding details."), "usage": TranscriptTextUsageDuration}, optional=("words", "segments", "usage",)).annotate(description="Represents a verbose json transcription response returned by model, based on the provided input.", identifier="CreateTranscriptionResponseVerboseJson")
|
|
935
|
+
CreateTranslationResponseVerboseJson: _StructSchema[_T.CreateTranslationResponseVerboseJson, _t.Never, _t.Never] = _b.struct(_T.CreateTranslationResponseVerboseJson, {"language": _S.String.annotate(description="The language of the output translation (always `english`)."), "duration": _b.check(_S.Number.annotate(description="The duration of the input audio.", format="double"), _S.is_finite().annotate(expected="a finite number")), "text": _S.String.annotate(description="The translated text."), "segments": _b.array(TranscriptionSegment).annotate(description="Segments of the translated text and their corresponding details.")}, optional=("segments",)).annotate(identifier="CreateTranslationResponseVerboseJson")
|
|
936
|
+
VoiceConsentListResource: _StructSchema[_T.VoiceConsentListResource, _t.Never, _t.Never] = _b.struct(_T.VoiceConsentListResource, {"object": _b.literal("list"), "data": _b.array(VoiceConsentResource), "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="VoiceConsentListResource")
|
|
937
|
+
Batch: _StructSchema[_T.Batch, _t.Never, _t.Never] = _b.struct(_T.Batch, {"id": _S.String, "object": _b.literal("batch").annotate(description="The object type, which is always `batch`."), "endpoint": _S.String.annotate(description="The OpenAI API endpoint used by the batch."), "model": _S.String.annotate(description="Model ID used to process the batch, like `gpt-6-astra`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model\nguide](https://developers.openai.com/api/docs/models) to browse and compare available models.\n"), "errors": _b.union(_b.struct_with_rest(_b.struct(_T.Batch__errors__0, {"object": _S.String.annotate(description="The object type, which is always `list`."), "data": _b.array(BatchError)}, optional=("object", "data",)), _b.record(_S.String, _S.Json.annotate(expected="JSON value"))), _S.Null), "input_file_id": _S.String.annotate(description="The ID of the input file for the batch."), "completion_window": _S.String.annotate(description="The time frame within which the batch should be processed."), "status": _b.literals(["validating", "failed", "in_progress", "finalizing", "completed", "expired", "cancelling", "cancelled"]).annotate(description="The current status of the batch."), "output_file_id": _b.union(_S.String, _S.Null).annotate(description="The ID of the file containing the outputs of successfully executed requests."), "error_file_id": _b.union(_S.String, _S.Null).annotate(description="The ID of the file containing the outputs of requests with errors."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the batch was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "in_progress_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 batch started processing.", format="unixtime"), "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 batch will expire.", format="unixtime"), "finalizing_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 batch started finalizing.", 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 batch was completed.", 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 batch failed.", format="unixtime"), "expired_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 batch expired.", format="unixtime"), "cancelling_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 batch started cancelling.", 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 batch was cancelled.", format="unixtime"), "request_counts": BatchRequestCounts, "usage": _b.struct(_T.Batch__usage, {"input_tokens": _b.check(_S.Number.annotate(description="The number of input tokens."), _S.is_int().annotate(expected="an integer")), "input_tokens_details": _b.struct(_T.Batch__usage__input_tokens_details, {"cached_tokens": _b.check(_S.Number.annotate(description="The number of tokens that were retrieved from the cache. [More on\nprompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).\n"), _S.is_int().annotate(expected="an integer"))}).annotate(description="A detailed breakdown of the input tokens."), "output_tokens": _b.check(_S.Number.annotate(description="The number of output tokens."), _S.is_int().annotate(expected="an integer")), "output_tokens_details": _b.struct(_T.Batch__usage__output_tokens_details, {"reasoning_tokens": _b.check(_S.Number.annotate(description="The number of reasoning tokens."), _S.is_int().annotate(expected="an integer"))}).annotate(description="A detailed breakdown of the output tokens."), "total_tokens": _b.check(_S.Number.annotate(description="The total number of tokens used."), _S.is_int().annotate(expected="an integer"))}).annotate(description="Represents token usage details including input tokens, output tokens, a\nbreakdown of output tokens, and the total tokens used. Only populated on\nbatches created after September 7, 2025.\n"), "metadata": Metadata}, optional=("model", "errors", "output_file_id", "error_file_id", "in_progress_at", "expires_at", "finalizing_at", "completed_at", "failed_at", "expired_at", "cancelling_at", "cancelled_at", "request_counts", "usage", "metadata",)).annotate(identifier="Batch")
|
|
938
|
+
CreateBatchRequest: _StructSchema[_T.CreateBatchRequest, _t.Never, _t.Never] = _b.struct(_T.CreateBatchRequest, {"input_file_id": _S.String.annotate(description="The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.\n"), "endpoint": _b.literals(["/v1/responses", "/v1/chat/completions", "/v1/embeddings", "/v1/completions", "/v1/moderations", "/v1/images/generations", "/v1/images/edits", "/v1/videos"]).annotate(description="The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, `/v1/images/edits`, and `/v1/videos` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch."), "completion_window": _b.literal("24h").annotate(description="The time frame within which the batch should be processed. Currently only `24h` is supported."), "metadata": Metadata, "output_expires_after": BatchFileExpirationAfter}, optional=("metadata", "output_expires_after",)).annotate(identifier="CreateBatchRequest")
|
|
939
|
+
ChatCompletionMessageToolCalls: _S.Bottom[_T.ChatCompletionMessageToolCalls, _t.Any] = _b.array(_b.union(ChatCompletionMessageToolCall, ChatCompletionMessageCustomToolCall, mode="one_of")).annotate(description="The tool calls generated by the model, such as function calls.", identifier="ChatCompletionMessageToolCalls")
|
|
940
|
+
CreateCompletionResponse: _StructSchema[_T.CreateCompletionResponse, _t.Never, _t.Never] = _b.struct(_T.CreateCompletionResponse, {"id": _S.String.annotate(description="A unique identifier for the completion."), "choices": _b.array(_b.struct(_T.CreateCompletionResponse__choices__item, {"finish_reason": _b.union(_b.literals(["stop", "length", "content_filter"]), _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,\nor `content_filter` if content was omitted due to a flag from our content filters. The value is null while a streamed completion is unfinished.\n"), "index": _b.check(_S.Number, _S.is_int().annotate(expected="an integer")), "logprobs": _b.union(_b.struct(_T.CreateCompletionResponse__choices__item__logprobs__0, {"text_offset": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "token_logprobs": _b.array(_S.Finite), "tokens": _b.array(_S.String), "top_logprobs": _b.array(_b.record(_S.String, _S.Finite))}, optional=("text_offset", "token_logprobs", "tokens", "top_logprobs",)), _S.Null), "text": _S.String})).annotate(description="The list of completion choices the model generated for the input prompt."), "created": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) of when the completion was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "model": _S.String.annotate(description="The model used for completion."), "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("text_completion").annotate(description="The object type, which is always \"text_completion\""), "usage": CompletionUsage}, optional=("system_fingerprint", "usage",)).annotate(description="Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).\n", identifier="CreateCompletionResponse")
|
|
941
|
+
ModerationResultBody: _StructSchema[_T.ModerationResultBody, _t.Never, _t.Never] = _b.struct(_T.ModerationResultBody, {"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(ModerationInputType)).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="ModerationResultBody")
|
|
942
|
+
PromptCacheOptionsParam: _StructSchema[_T.PromptCacheOptionsParam, _t.Never, _t.Never] = _b.struct(_T.PromptCacheOptionsParam, {"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.")}, 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="PromptCacheOptionsParam")
|
|
943
|
+
PromptCacheOptions: _StructSchema[_T.PromptCacheOptions, _t.Never, _t.Never] = _b.struct(_T.PromptCacheOptions, {"ttl": _b.suspend(lambda: PromptCacheTTLEnum).annotate(description="The minimum lifetime applied to each cache breakpoint."), "mode": _b.suspend(lambda: PromptCacheModeEnum).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="PromptCacheOptions")
|
|
944
|
+
ChatCompletionRequestMessageContentPartText: _StructSchema[_T.ChatCompletionRequestMessageContentPartText, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestMessageContentPartText, {"type": _b.literal("text").annotate(description="The type of the content part."), "text": _S.String.annotate(description="The text content."), "prompt_cache_breakpoint": PromptCacheBreakpointParam}, optional=("prompt_cache_breakpoint",)).annotate(title="Text content part", description="Learn about [text inputs](https://developers.openai.com/api/docs/guides/text).\n", identifier="ChatCompletionRequestMessageContentPartText")
|
|
945
|
+
ChatCompletionRequestMessageContentPartImage: _StructSchema[_T.ChatCompletionRequestMessageContentPartImage, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestMessageContentPartImage, {"type": _b.literal("image_url").annotate(description="The type of the content part."), "image_url": _b.struct(_T.ChatCompletionRequestMessageContentPartImage__image_url, {"url": _S.String.annotate(description="Either a URL of the image or the base64 encoded image data.", format="uri"), "detail": _b.literals(["auto", "low", "high", "original"]).annotate(description="Specifies the detail level of the image. Learn more in the [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level).")}, optional=("detail",)), "prompt_cache_breakpoint": PromptCacheBreakpointParam}, optional=("prompt_cache_breakpoint",)).annotate(title="Image content part", description="Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision).\n", identifier="ChatCompletionRequestMessageContentPartImage")
|
|
946
|
+
ChatCompletionRequestMessageContentPartAudio: _StructSchema[_T.ChatCompletionRequestMessageContentPartAudio, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestMessageContentPartAudio, {"type": _b.literal("input_audio").annotate(description="The type of the content part. Always `input_audio`."), "input_audio": _b.struct(_T.ChatCompletionRequestMessageContentPartAudio__input_audio, {"data": _S.String.annotate(description="Base64 encoded audio data."), "format": _b.literals(["wav", "mp3"]).annotate(description="The format of the encoded audio data. Currently supports \"wav\" and \"mp3\".\n")}), "prompt_cache_breakpoint": PromptCacheBreakpointParam}, optional=("prompt_cache_breakpoint",)).annotate(title="Audio content part", description="Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio).\n", identifier="ChatCompletionRequestMessageContentPartAudio")
|
|
947
|
+
ChatCompletionRequestMessageContentPartFile: _StructSchema[_T.ChatCompletionRequestMessageContentPartFile, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionRequestMessageContentPartFile, {"type": _b.literal("file").annotate(description="The type of the content part. Always `file`."), "file": _b.struct(_T.ChatCompletionRequestMessageContentPartFile__file, {"filename": _S.String.annotate(description="The name of the file, used when passing the file to the model as a\nstring.\n"), "file_data": _S.String.annotate(description="The base64 encoded file data, used when passing the file to the model\nas a string.\n"), "file_id": _S.String.annotate(description="The ID of an uploaded file to use as input.\n")}, optional=("filename", "file_data", "file_id",)), "prompt_cache_breakpoint": PromptCacheBreakpointParam}, optional=("prompt_cache_breakpoint",)).annotate(title="File content part", description="Learn about [file inputs](https://developers.openai.com/api/docs/guides/text) for text generation.\n", identifier="ChatCompletionRequestMessageContentPartFile")
|
|
948
|
+
InputTextContentParam: _StructSchema[_T.InputTextContentParam, _t.Never, _t.Never] = _b.struct(_T.InputTextContentParam, {"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(PromptCacheBreakpointParam, _S.Null)}, optional=("prompt_cache_breakpoint",)).annotate(title="Input text", description="A text input to the model.", identifier="InputTextContentParam")
|
|
949
|
+
ModelIdsResponses: _S.Bottom[_T.ModelIdsResponses, _t.Any] = _b.union(ModelIdsShared, _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="ModelIdsResponses")
|
|
950
|
+
ModerationConfigParam: _StructSchema[_T.ModerationConfigParam, _t.Never, _t.Never] = _b.struct(_T.ModerationConfigParam, {"mode": ModerationMode}).annotate(description="The moderation policy for the response input.", identifier="ModerationConfigParam")
|
|
951
|
+
CreateCompletionRequest: _StructSchema[_T.CreateCompletionRequest, _t.Never, _t.Never] = _b.struct(_T.CreateCompletionRequest, {"model": _b.union(_S.String, _b.literals(["gpt-3.5-turbo-instruct", "davinci-002", "babbage-002"])).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"), "prompt": _b.union(_S.String, _b.array(_S.String), _b.check(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _b.check(_b.array(_b.check(_b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), _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")), _S.Null, mode="one_of").annotate(description="The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.\n"), "best_of": _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(20).annotate(expected="a value less than or equal to 20")), _S.Null).annotate(description="Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n"), "echo": _b.union(_S.Boolean, _S.Null).annotate(description="Echo back the prompt in addition to the completion\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 their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n\n[See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text)\n"), "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 GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.\n"), "logprobs": _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(5).annotate(expected="a value less than or equal to 5")), _S.Null).annotate(description="Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.\n"), "max_tokens": _b.union(_b.check(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.is_greater_than_or_equal_to(0).annotate(expected="a value greater than or equal to 0")), _S.Null).annotate(description="The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\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 completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\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 whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text)\n"), "seed": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="If 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.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n", format="int64"), "stop": StopConfiguration, "stream": _b.union(_S.Boolean, _S.Null).annotate(description="Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n"), "stream_options": ChatCompletionStreamOptions, "suffix": _b.union(_S.String, _S.Null).annotate(description="The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.\n"), "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\nWe generally recommend altering this or `top_p` but not both.\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"), "user": _S.String.annotate(description="A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n")}, optional=("best_of", "echo", "frequency_penalty", "logit_bias", "logprobs", "max_tokens", "n", "presence_penalty", "seed", "stop", "stream", "stream_options", "suffix", "temperature", "top_p", "user",)).annotate(identifier="CreateCompletionRequest")
|
|
952
|
+
ChatCompletionAllowedToolsChoice: _StructSchema[_T.ChatCompletionAllowedToolsChoice, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionAllowedToolsChoice, {"type": _b.literal("allowed_tools").annotate(description="Allowed tool configuration type. Always `allowed_tools`."), "allowed_tools": ChatCompletionAllowedTools}).annotate(title="Allowed tools", description="Constrains the tools available to the model to a pre-defined set.\n", identifier="ChatCompletionAllowedToolsChoice")
|
|
953
|
+
ChatCompletionStreamResponseDelta: _StructSchema[_T.ChatCompletionStreamResponseDelta, _t.Never, _t.Never] = _b.struct(_T.ChatCompletionStreamResponseDelta, {"audio": _b.struct(_T.ChatCompletionStreamResponseDelta__audio, {"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 no\nlonger be accessible on the server for use in multi-turn conversations.\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 text from this audio chunk.")}, optional=("id", "expires_at", "data", "transcript",)).annotate(description="A partial audio response. Audio chunks may carry an ID, base64 data, or\ntranscript text; the final audio update contains only its expiry timestamp.\n"), "content": _b.union(_S.String.annotate(description="The contents of the chunk message."), _S.Null), "function_call": _b.struct(_T.ChatCompletionStreamResponseDelta__function_call, {"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.")}, optional=("arguments", "name",)).annotate(description="Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model."), "tool_calls": _b.array(ChatCompletionMessageToolCallChunk), "role": _b.literals(["developer", "system", "user", "assistant", "tool"]).annotate(description="The role of the author of this message."), "refusal": _b.union(_S.String.annotate(description="The refusal message generated by the model."), _S.Null)}, optional=("audio", "content", "function_call", "tool_calls", "role", "refusal",)).annotate(description="A chat completion delta generated by streamed model responses.\nStreamed audio can arrive in partial updates with an ID, base64 data, or\ntranscript text. The final audio update contains only its expiry timestamp.\n", identifier="ChatCompletionStreamResponseDelta")
|
|
954
|
+
ContainerListResource: _StructSchema[_T.ContainerListResource, _t.Never, _t.Never] = _b.struct(_T.ContainerListResource, {"object": _b.literal("list").annotate(description="The type of object returned, must be 'list'."), "data": _b.array(ContainerResource).annotate(description="A list of containers."), "first_id": _S.String.annotate(description="The ID of the first container in the list."), "last_id": _S.String.annotate(description="The ID of the last container in the list."), "has_more": _S.Boolean.annotate(description="Whether there are more containers available.")}).annotate(identifier="ContainerListResource")
|
|
955
|
+
InlineSkillParam: _StructSchema[_T.InlineSkillParam, _t.Never, _t.Never] = _b.struct(_T.InlineSkillParam, {"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: InlineSkillSourceParam).annotate(description="Inline skill payload")}).annotate(identifier="InlineSkillParam")
|
|
956
|
+
ContainerNetworkPolicyAllowlistParam: _StructSchema[_T.ContainerNetworkPolicyAllowlistParam, _t.Never, _t.Never] = _b.struct(_T.ContainerNetworkPolicyAllowlistParam, {"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(ContainerNetworkPolicyDomainSecretParam).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="ContainerNetworkPolicyAllowlistParam")
|
|
957
|
+
ContainerFileListResource: _StructSchema[_T.ContainerFileListResource, _t.Never, _t.Never] = _b.struct(_T.ContainerFileListResource, {"object": _b.literal("list").annotate(description="The type of object returned, must be 'list'."), "data": _b.array(ContainerFileResource).annotate(description="A list of container files."), "first_id": _S.String.annotate(description="The ID of the first file in the list."), "last_id": _S.String.annotate(description="The ID of the last file in the list."), "has_more": _S.Boolean.annotate(description="Whether there are more files available.")}).annotate(identifier="ContainerFileListResource")
|
|
958
|
+
InputTextContent: _StructSchema[_T.InputTextContent, _t.Never, _t.Never] = _b.struct(_T.InputTextContent, {"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": PromptCacheBreakpointConfig}, optional=("prompt_cache_breakpoint",)).annotate(title="Input text", description="A text input to the model.", identifier="InputTextContent")
|
|
959
|
+
Annotation: _S.Bottom[_T.Annotation, _t.Any] = _b.union(FileCitationBody, UrlCitationBody, ContainerFileCitationBody, FilePath, mode="one_of").annotate(description="An annotation that applies to a span of output text.", identifier="Annotation")
|
|
960
|
+
LogProb: _StructSchema[_T.LogProb, _t.Never, _t.Never] = _b.struct(_T.LogProb, {"token": _S.String, "logprob": _S.Finite, "bytes": _b.array(_b.check(_S.Number, _S.is_int().annotate(expected="an integer"))), "top_logprobs": _b.array(TopLogProb)}).annotate(title="Log probability", description="The log probability of a token.", identifier="LogProb")
|
|
961
|
+
ReasoningItem: _StructSchema[_T.ReasoningItem, _t.Never, _t.Never] = _b.struct(_T.ReasoningItem, {"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", identifier="ReasoningItem")
|
|
962
|
+
InputImageContent: _StructSchema[_T.InputImageContent, _t.Never, _t.Never] = _b.struct(_T.InputImageContent, {"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: ImageDetail).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": PromptCacheBreakpointConfig}, 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="InputImageContent")
|
|
963
|
+
ComputerScreenshotContent: _StructSchema[_T.ComputerScreenshotContent, _t.Never, _t.Never] = _b.struct(_T.ComputerScreenshotContent, {"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: ImageDetail).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": PromptCacheBreakpointConfig}, optional=("prompt_cache_breakpoint",)).annotate(title="Computer screenshot", description="A screenshot of a computer.", identifier="ComputerScreenshotContent")
|
|
964
|
+
InputFileContent: _StructSchema[_T.InputFileContent, _t.Never, _t.Never] = _b.struct(_T.InputFileContent, {"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": PromptCacheBreakpointConfig, "file_url": _S.String.annotate(description="The URL of the file to be sent to the model.", format="uri"), "detail": _b.suspend(lambda: FileInputDetail).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="InputFileContent")
|
|
965
|
+
ToolCallCaller: _S.Bottom[_T.ToolCallCaller, _t.Any] = _b.union(DirectToolCallCaller, ProgramToolCallCaller, mode="one_of").annotate(description="The execution context that produced this tool call.", identifier="ToolCallCaller")
|
|
966
|
+
ToolCallCallerParam: _S.Bottom[_T.ToolCallCallerParam, _t.Any] = _b.union(DirectToolCallCallerParam, ProgramToolCallCallerParam, mode="one_of").annotate(description="The execution context that produced this tool call.", identifier="ToolCallCallerParam")
|
|
967
|
+
FileSearchToolCall: _StructSchema[_T.FileSearchToolCall, _t.Never, _t.Never] = _b.struct(_T.FileSearchToolCall, {"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.FileSearchToolCall__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", identifier="FileSearchToolCall")
|
|
968
|
+
UpdateVectorStoreFileAttributesRequest: _StructSchema[_T.UpdateVectorStoreFileAttributesRequest, _t.Never, _t.Never] = _b.struct(_T.UpdateVectorStoreFileAttributesRequest, {"attributes": VectorStoreFileAttributes}).annotate(identifier="UpdateVectorStoreFileAttributesRequest")
|
|
969
|
+
WebSearchToolCall: _StructSchema[_T.WebSearchToolCall, _t.Never, _t.Never] = _b.struct(_T.WebSearchToolCall, {"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", identifier="WebSearchToolCall")
|
|
970
|
+
ImageGenToolCall: _StructSchema[_T.ImageGenToolCall, _t.Never, _t.Never] = _b.struct(_T.ImageGenToolCall, {"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.", identifier="ImageGenToolCall")
|
|
971
|
+
ClickParam: _StructSchema[_T.ClickParam, _t.Never, _t.Never] = _b.struct(_T.ClickParam, {"type": _b.literal("click").annotate(description="Specifies the event type. For a click action, this property is always `click`."), "button": _b.suspend(lambda: ClickButtonType).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="ClickParam")
|
|
972
|
+
DragParam: _StructSchema[_T.DragParam, _t.Never, _t.Never] = _b.struct(_T.DragParam, {"type": _b.literal("drag").annotate(description="Specifies the event type. For a drag action, this property is always set to `drag`."), "path": _b.array(CoordParam).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="DragParam")
|
|
973
|
+
ComputerToolCallOutputResource: _StructSchema[_T.ComputerToolCallOutputResource, _t.Never, _t.Never] = _b.struct(_T.ComputerToolCallOutputResource, {"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(ComputerCallSafetyCheckParam).annotate(description="The safety checks reported by the API that have been acknowledged by the\ndeveloper.\n"), "output": ComputerScreenshotImage, "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=("acknowledged_safety_checks", "created_by",)).annotate(identifier="ComputerToolCallOutputResource")
|
|
974
|
+
ToolSearchCall: _StructSchema[_T.ToolSearchCall, _t.Never, _t.Never] = _b.struct(_T.ToolSearchCall, {"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: ToolSearchExecutionType).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: FunctionCallStatus).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=("created_by",)).annotate(identifier="ToolSearchCall")
|
|
975
|
+
FunctionTool: _StructSchema[_T.FunctionTool, _t.Never, _t.Never] = _b.struct(_T.FunctionTool, {"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(CallableToolAllowedCaller).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="FunctionTool")
|
|
976
|
+
ApplyPatchToolParam: _StructSchema[_T.ApplyPatchToolParam, _t.Never, _t.Never] = _b.struct(_T.ApplyPatchToolParam, {"type": _b.literal("apply_patch").annotate(description="The type of the tool. Always `apply_patch`."), "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="Apply patch tool", description="Allows the assistant to create, delete, or update files using unified diffs.", identifier="ApplyPatchToolParam")
|
|
977
|
+
RankingOptions: _StructSchema[_T.RankingOptions, _t.Never, _t.Never] = _b.struct(_T.RankingOptions, {"ranker": _b.suspend(lambda: RankerVersionType).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: HybridSearchOptions).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="RankingOptions")
|
|
978
|
+
Filters: _S.Bottom[_T.Filters, _t.Any] = _b.union(ComparisonFilter, CompoundFilter).annotate(identifier="Filters")
|
|
979
|
+
VectorStoreSearchRequest: _StructSchema[_T.VectorStoreSearchRequest, _t.Never, _t.Never] = _b.struct(_T.VectorStoreSearchRequest, {"query": _b.union(_S.String, _b.array(_S.String.annotate(description="A list of queries to search for.")), mode="one_of").annotate(description="A query string for a search"), "rewrite_query": _S.Boolean.annotate(description="Whether to rewrite the natural language query for vector search."), "max_num_results": _b.check(_b.check(_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")), _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")), "filters": _b.union(ComparisonFilter, CompoundFilter, mode="one_of").annotate(description="A filter to apply based on file attributes."), "ranking_options": _b.struct(_T.VectorStoreSearchRequest__ranking_options, {"ranker": _b.literals(["none", "auto", "default-2024-11-15"]).annotate(description="Enable re-ranking; set to `none` to disable, which can help reduce latency."), "score_threshold": _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"))}, optional=("ranker", "score_threshold",)).annotate(description="Ranking options for search.")}, optional=("rewrite_query", "max_num_results", "filters", "ranking_options",)).annotate(identifier="VectorStoreSearchRequest")
|
|
980
|
+
ComputerUsePreviewTool: _StructSchema[_T.ComputerUsePreviewTool, _t.Never, _t.Never] = _b.struct(_T.ComputerUsePreviewTool, {"type": _b.literal("computer_use_preview").annotate(description="The type of the computer use tool. Always `computer_use_preview`."), "environment": _b.suspend(lambda: ComputerEnvironment).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="ComputerUsePreviewTool")
|
|
981
|
+
WebSearchTool: _StructSchema[_T.WebSearchTool, _t.Never, _t.Never] = _b.struct(_T.WebSearchTool, {"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.WebSearchTool__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: WebSearchApproximateLocation).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="WebSearchTool")
|
|
982
|
+
MCPTool: _StructSchema[_T.MCPTool, _t.Never, _t.Never] = _b.struct(_T.MCPTool, {"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"), MCPToolFilter, 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(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), "require_approval": _b.union(_b.union(_b.struct(_T.MCPTool__require_approval__0__0, {"always": MCPToolFilter, "never": MCPToolFilter}, 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="MCPTool")
|
|
983
|
+
ImageGenTool: _StructSchema[_T.ImageGenTool, _t.Never, _t.Never] = _b.struct(_T.ImageGenTool, {"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(InputFidelity, _S.Null), "input_image_mask": _b.struct(_T.ImageGenTool__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: ImageGenActionEnum).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="ImageGenTool")
|
|
984
|
+
LocalEnvironmentParam: _StructSchema[_T.LocalEnvironmentParam, _t.Never, _t.Never] = _b.struct(_T.LocalEnvironmentParam, {"type": _b.literal("local").annotate(description="Use a local computer environment."), "skills": _b.check(_b.array(LocalSkillParam).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="LocalEnvironmentParam")
|
|
985
|
+
CustomGrammarFormatParam: _StructSchema[_T.CustomGrammarFormatParam, _t.Never, _t.Never] = _b.struct(_T.CustomGrammarFormatParam, {"type": _b.literal("grammar").annotate(description="Grammar format. Always `grammar`."), "syntax": _b.suspend(lambda: GrammarSyntax1).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="CustomGrammarFormatParam")
|
|
986
|
+
FunctionToolParam: _StructSchema[_T.FunctionToolParam, _t.Never, _t.Never] = _b.struct(_T.FunctionToolParam, {"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(EmptyModelParam, _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(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=("description", "parameters", "strict", "async", "output_schema", "defer_loading", "allowed_callers",)).annotate(identifier="FunctionToolParam")
|
|
987
|
+
ToolSearchToolParam: _StructSchema[_T.ToolSearchToolParam, _t.Never, _t.Never] = _b.struct(_T.ToolSearchToolParam, {"type": _b.literal("tool_search").annotate(description="The type of the tool. Always `tool_search`."), "execution": _b.suspend(lambda: ToolSearchExecutionType).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: EmptyModelParam).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="ToolSearchToolParam")
|
|
988
|
+
ToolSearchOutputFunctionToolParam: _StructSchema[_T.ToolSearchOutputFunctionToolParam, _t.Never, _t.Never] = _b.struct(_T.ToolSearchOutputFunctionToolParam, {"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(EmptyModelParam, _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(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=("description", "parameters", "strict", "async", "output_schema", "defer_loading", "allowed_callers",)).annotate(identifier="ToolSearchOutputFunctionToolParam")
|
|
989
|
+
WebSearchPreviewTool: _StructSchema[_T.WebSearchPreviewTool, _t.Never, _t.Never] = _b.struct(_T.WebSearchPreviewTool, {"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: ApproximateLocation).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: SearchContextSize).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(SearchContentType)}, 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="WebSearchPreviewTool")
|
|
990
|
+
ProgramOutput: _StructSchema[_T.ProgramOutput, _t.Never, _t.Never] = _b.struct(_T.ProgramOutput, {"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: ProgramOutputStatus).annotate(description="The terminal status of the program output item.")}).annotate(identifier="ProgramOutput")
|
|
991
|
+
CodeInterpreterToolCall: _StructSchema[_T.CodeInterpreterToolCall, _t.Never, _t.Never] = _b.struct(_T.CodeInterpreterToolCall, {"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", identifier="CodeInterpreterToolCall")
|
|
992
|
+
LocalShellToolCall: _StructSchema[_T.LocalShellToolCall, _t.Never, _t.Never] = _b.struct(_T.LocalShellToolCall, {"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", identifier="LocalShellToolCall")
|
|
993
|
+
FunctionShellCallOutputContent: _StructSchema[_T.FunctionShellCallOutputContent, _t.Never, _t.Never] = _b.struct(_T.FunctionShellCallOutputContent, {"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(FunctionShellCallOutputTimeoutOutcome, FunctionShellCallOutputExitOutcome, 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="FunctionShellCallOutputContent")
|
|
994
|
+
MCPListTools: _StructSchema[_T.MCPListTools, _t.Never, _t.Never] = _b.struct(_T.MCPListTools, {"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", identifier="MCPListTools")
|
|
995
|
+
MCPToolCallError: _S.Bottom[_T.MCPToolCallError, _t.Any] = _b.union(MCPProtocolError, MCPToolExecutionError, HTTPError, mode="one_of").annotate(identifier="MCPToolCallError")
|
|
996
|
+
InputImageContentParamAutoParam: _StructSchema[_T.InputImageContentParamAutoParam, _t.Never, _t.Never] = _b.struct(_T.InputImageContentParamAutoParam, {"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: DetailEnum).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(PromptCacheBreakpointParam, _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="InputImageContentParamAutoParam")
|
|
997
|
+
InputFileContentParam: _StructSchema[_T.InputFileContentParam, _t.Never, _t.Never] = _b.struct(_T.InputFileContentParam, {"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: FileDetailEnum).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(PromptCacheBreakpointParam, _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="InputFileContentParam")
|
|
998
|
+
FunctionShellCallOutputOutcomeParam: _S.Bottom[_T.FunctionShellCallOutputOutcomeParam, _t.Any] = _b.union(FunctionShellCallOutputTimeoutOutcomeParam, FunctionShellCallOutputExitOutcomeParam, mode="one_of").annotate(title="Shell call outcome", description="The exit or timeout outcome associated with this shell call.", identifier="FunctionShellCallOutputOutcomeParam")
|
|
999
|
+
ApplyPatchOperationParam: _S.Bottom[_T.ApplyPatchOperationParam, _t.Any] = _b.union(ApplyPatchCreateFileOperationParam, ApplyPatchDeleteFileOperationParam, ApplyPatchUpdateFileOperationParam, 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="ApplyPatchOperationParam")
|
|
1000
|
+
ProgramOutputItemParam: _StructSchema[_T.ProgramOutputItemParam, _t.Never, _t.Never] = _b.struct(_T.ProgramOutputItemParam, {"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: ProgramOutputItemStatus).annotate(description="The terminal status of the program output.")}).annotate(identifier="ProgramOutputItemParam")
|
|
1001
|
+
CreateEmbeddingResponse: _StructSchema[_T.CreateEmbeddingResponse, _t.Never, _t.Never] = _b.struct(_T.CreateEmbeddingResponse, {"data": _b.array(Embedding).annotate(description="The list of embeddings generated by the model."), "model": _S.String.annotate(description="The name of the model used to generate the embedding."), "object": _b.literal("list").annotate(description="The object type, which is always \"list\"."), "usage": _b.struct(_T.CreateEmbeddingResponse__usage, {"prompt_tokens": _b.check(_S.Number.annotate(description="The number of tokens used by the prompt."), _S.is_int().annotate(expected="an integer")), "total_tokens": _b.check(_S.Number.annotate(description="The total number of tokens used by the request."), _S.is_int().annotate(expected="an integer"))}).annotate(description="The usage information for the request.")}).annotate(identifier="CreateEmbeddingResponse")
|
|
1002
|
+
CreateEvalJsonlRunDataSource: _StructSchema[_T.CreateEvalJsonlRunDataSource, _t.Never, _t.Never] = _b.struct(_T.CreateEvalJsonlRunDataSource, {"type": _b.literal("jsonl").annotate(description="The type of data source. Always `jsonl`."), "source": _b.union(EvalJsonlFileContentSource, EvalJsonlFileIdSource, mode="one_of").annotate(description="Determines what populates the `item` namespace in the data source.")}).annotate(title="JsonlRunDataSource", description="A JsonlRunDataSource object with that specifies a JSONL file that matches the eval \n", identifier="CreateEvalJsonlRunDataSource")
|
|
1003
|
+
EvalRunOutputItem: _StructSchema[_T.EvalRunOutputItem, _t.Never, _t.Never] = _b.struct(_T.EvalRunOutputItem, {"object": _b.literal("eval.run.output_item").annotate(description="The type of the object. Always \"eval.run.output_item\"."), "id": _S.String.annotate(description="Unique identifier for the evaluation run output item."), "run_id": _S.String.annotate(description="The identifier of the evaluation run associated with this output item."), "eval_id": _S.String.annotate(description="The identifier of the evaluation group."), "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")), "status": _S.String.annotate(description="The status of the evaluation run."), "datasource_item_id": _b.check(_S.Number.annotate(description="The identifier for the data source item."), _S.is_int().annotate(expected="an integer")), "datasource_item": _b.record(_S.String, _S.Json.annotate(expected="JSON value")).annotate(description="Details of the input data source item."), "results": _b.array(EvalRunOutputItemResult).annotate(description="A list of grader results for this output item."), "sample": _b.struct(_T.EvalRunOutputItem__sample, {"input": _b.array(_b.struct(_T.EvalRunOutputItem__sample__input__item, {"role": _S.String.annotate(description="The role of the message sender (e.g., system, user, developer)."), "content": _S.String.annotate(description="The content of the message.")}).annotate(description="An input message.")).annotate(description="An array of input messages."), "output": _b.array(_b.struct(_T.EvalRunOutputItem__sample__output__item, {"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.")}, optional=("role", "content",))).annotate(description="An array of output messages."), "finish_reason": _S.String.annotate(description="The reason why the sample generation was finished."), "model": _S.String.annotate(description="The model used for generating the sample."), "usage": _b.struct(_T.EvalRunOutputItem__sample__usage, {"total_tokens": _b.check(_S.Number.annotate(description="The total number of 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")), "prompt_tokens": _b.check(_S.Number.annotate(description="The number of prompt 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"))}).annotate(description="Token usage details for the sample."), "error": _b.union(EvalApiError, _S.Null), "temperature": _b.check(_S.Number.annotate(description="The sampling temperature used."), _S.is_finite().annotate(expected="a finite number")), "max_completion_tokens": _b.check(_S.Number.annotate(description="The maximum number of tokens allowed for completion."), _S.is_int().annotate(expected="an integer")), "top_p": _b.check(_S.Number.annotate(description="The top_p value used for sampling."), _S.is_finite().annotate(expected="a finite number")), "seed": _b.check(_S.Number.annotate(description="The seed used for generating the sample."), _S.is_int().annotate(expected="an integer"))}).annotate(description="A sample containing the input and output of the evaluation run.")}).annotate(title="EvalRunOutputItem", description="A schema representing an evaluation run output item.\n", identifier="EvalRunOutputItem")
|
|
1004
|
+
ListFilesResponse: _StructSchema[_T.ListFilesResponse, _t.Never, _t.Never] = _b.struct(_T.ListFilesResponse, {"object": _S.String, "data": _b.array(OpenAIFile), "first_id": _S.String, "last_id": _S.String, "has_more": _S.Boolean}).annotate(identifier="ListFilesResponse")
|
|
1005
|
+
Upload: _StructSchema[_T.Upload, _t.Never, _t.Never] = _b.struct(_T.Upload, {"id": _S.String.annotate(description="The Upload unique identifier, which can be referenced in API endpoints."), "created_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the Upload was created.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "filename": _S.String.annotate(description="The name of the file to be uploaded."), "bytes": _b.check(_S.Number.annotate(description="The intended number of bytes to be uploaded."), _S.is_int().annotate(expected="an integer")), "purpose": _S.String.annotate(description="The intended purpose of the file. [Please refer here](https://developers.openai.com/api/reference/resources/files#%28resource%29%20files%20%3E%20%28model%29%20file_object%20%3E%20%28schema%29%20%3E%20%28property%29%20purpose) for acceptable values."), "status": _b.literals(["pending", "completed", "cancelled", "expired"]).annotate(description="The status of the Upload."), "expires_at": _b.check(_S.Number.annotate(description="The Unix timestamp (in seconds) for when the Upload will expire.", format="unixtime"), _S.is_int().annotate(expected="an integer")), "object": _b.literal("upload").annotate(description="The object type, which is always \"upload\"."), "file": _b.union(OpenAIFile, _S.Null).annotate(description="The ready File object after the Upload is completed.")}, optional=("object", "file",)).annotate(title="Upload", description="The Upload object can accept byte chunks in the form of Parts.\n", identifier="Upload")
|
|
1006
|
+
CreateFileRequestMultipart: _StructSchema[_T.CreateFileRequestMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateFileRequestMultipart, {"file": __ClientMultipartFile, "purpose": _b.literals(["assistants", "batch", "fine-tune", "vision", "user_data", "evals"]).annotate(description="The intended purpose of the uploaded file. One of:\n- `assistants`: Used in the Assistants API\n- `batch`: Used in the Batch API\n- `fine-tune`: Used for fine-tuning\n- `vision`: Images used for vision fine-tuning\n- `user_data`: Flexible file type for any purpose\n- `evals`: Used for eval data sets\n"), "expires_after": FileExpirationAfter}, optional=("expires_after",)).annotate(identifier="CreateFileRequestMultipart")
|
|
1007
|
+
CreateUploadRequest: _StructSchema[_T.CreateUploadRequest, _t.Never, _t.Never] = _b.struct(_T.CreateUploadRequest, {"filename": _S.String.annotate(description="The name of the file to upload.\n"), "purpose": _b.literals(["assistants", "batch", "fine-tune", "vision"]).annotate(description="The intended purpose of the uploaded file.\n\nSee the [documentation on File\npurposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29).\n"), "bytes": _b.check(_S.Number.annotate(description="The number of bytes in the file you are uploading.\n"), _S.is_int().annotate(expected="an integer")), "mime_type": _S.String.annotate(description="The MIME type of the file.\n\n\nThis must fall within the supported MIME types for your file purpose. See\nthe supported MIME types for assistants and vision.\n"), "expires_after": FileExpirationAfter}, optional=("expires_after",)).annotate(identifier="CreateUploadRequest")
|
|
1008
|
+
ListFineTuningCheckpointPermissionResponse: _StructSchema[_T.ListFineTuningCheckpointPermissionResponse, _t.Never, _t.Never] = _b.struct(_T.ListFineTuningCheckpointPermissionResponse, {"data": _b.array(FineTuningCheckpointPermission), "object": _b.literal("list"), "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="ListFineTuningCheckpointPermissionResponse")
|
|
1009
|
+
FineTuneSupervisedMethod: _StructSchema[_T.FineTuneSupervisedMethod, _t.Never, _t.Never] = _b.struct(_T.FineTuneSupervisedMethod, {"hyperparameters": FineTuneSupervisedHyperparameters}, optional=("hyperparameters",)).annotate(description="Configuration for the supervised fine-tuning method.", identifier="FineTuneSupervisedMethod")
|
|
1010
|
+
FineTuneDPOMethod: _StructSchema[_T.FineTuneDPOMethod, _t.Never, _t.Never] = _b.struct(_T.FineTuneDPOMethod, {"hyperparameters": FineTuneDPOHyperparameters}, optional=("hyperparameters",)).annotate(description="Configuration for the DPO fine-tuning method.", identifier="FineTuneDPOMethod")
|
|
1011
|
+
ListFineTuningJobCheckpointsResponse: _StructSchema[_T.ListFineTuningJobCheckpointsResponse, _t.Never, _t.Never] = _b.struct(_T.ListFineTuningJobCheckpointsResponse, {"data": _b.array(FineTuningJobCheckpoint), "object": _b.literal("list"), "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="ListFineTuningJobCheckpointsResponse")
|
|
1012
|
+
ListFineTuningJobEventsResponse: _StructSchema[_T.ListFineTuningJobEventsResponse, _t.Never, _t.Never] = _b.struct(_T.ListFineTuningJobEventsResponse, {"data": _b.array(FineTuningJobEvent), "object": _b.literal("list"), "has_more": _S.Boolean}).annotate(identifier="ListFineTuningJobEventsResponse")
|
|
1013
|
+
EditImageBodyJsonParam: _StructSchema[_T.EditImageBodyJsonParam, _t.Never, _t.Never] = _b.struct(_T.EditImageBodyJsonParam, {"model": _b.union(_S.String, _b.literals(["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", "gpt-image-1", "gpt-image-1-mini", "chatgpt-image-latest"]), _S.Null).annotate(description="The GPT image model to use for image editing, including `gpt-image-2`, its dated snapshot `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`. Defaults to `gpt-image-2.5-sunburst`."), "images": _b.check(_b.check(_b.array(ImageRefParam).annotate(description="Input image references to edit.\nFor GPT image models, you can provide up to 16 images.\n"), _S.is_min_length(1).annotate(expected="a value with a length of at least 1")), _S.is_max_length(16).annotate(expected="a value with a length of at most 16")), "mask": ImageRefParam, "prompt": _b.check(_b.check(_S.String.annotate(description="A text description of the desired image edit."), _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")), "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(10).annotate(expected="a value less than or equal to 10")), _S.Null).annotate(description="The number of edited images to generate."), "quality": _b.union(_b.literals(["low", "medium", "high", "xhigh", "max", "auto"]), _S.Null).annotate(description="Output quality for GPT image models. The GPT image models support `low`, `medium`,\nand `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their\n`2026-09-08` snapshots, also support `xhigh` and `max`. Defaults to `auto`.\n"), "input_fidelity": _b.union(_b.literals(["high", "low"]), _S.Null).annotate(description="Control how much effort the model will exert to match the style and features, especially facial features, of input images. Supports `high` and `low` on `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit this parameter. Defaults to `low` on supported models."), "size": _b.union(_S.String, _b.literals(["auto", "1024x1024", "1536x1024", "1024x1536"]), _S.Null).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."), "user": _S.String.annotate(description="A unique identifier representing your end-user, which can help OpenAI\nmonitor and detect abuse.\n"), "output_format": _b.union(_b.literals(["png", "jpeg", "webp"]), _S.Null).annotate(description="Output image format. Supported for GPT image models."), "output_compression": _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(100).annotate(expected="a value less than or equal to 100")), _S.Null).annotate(description="Compression level for `jpeg` or `webp` output."), "moderation": _b.union(_b.literals(["low", "auto"]), _S.Null).annotate(description="Moderation level for GPT image models."), "background": _b.union(_b.literals(["transparent", "opaque", "auto"]), _S.Null).annotate(description="Set the background of the generated image output. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds are available for supported GPT Image models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, set the output format to `png` or `webp`."), "stream": _b.union(_S.Boolean, _S.Null).annotate(description="Stream partial image results as events."), "partial_images": PartialImages}, optional=("model", "mask", "n", "quality", "input_fidelity", "size", "user", "output_format", "output_compression", "moderation", "background", "stream", "partial_images",)).annotate(description="JSON request body for image edits.\n\nUse `images` (array of `ImageRefParam`) instead of multipart `image` uploads.\nYou can reference images via external URLs, data URLs, or uploaded file IDs.\nJSON edits support GPT image models.\n", identifier="EditImageBodyJsonParam")
|
|
1014
|
+
CreateImageEditRequestMultipart: _StructSchema[_T.CreateImageEditRequestMultipart, _t.Never, _t.Never] = _b.struct(_T.CreateImageEditRequestMultipart, {"image": _b.union(__ClientMultipartFile, _b.check(_b.array(__ClientMultipartFile), _S.is_max_length(16).annotate(expected="a value with a length of at most 16"))).annotate(description="The image(s) to edit. Must be a supported image file or an array of images.\n\nFor the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,\n`gpt-image-2`, `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`, and\n`gpt-image-2.5-flare-2026-09-08`), each image should be a `png`, `webp`, or `jpg`\nfile less than 50MB. You can provide up to 16 images. `chatgpt-image-latest`\nfollows the same input constraints as GPT image models.\n"), "prompt": _S.String.annotate(description="A text description of the desired image(s). The maximum length is 32000 characters for the GPT image models."), "mask": __ClientMultipartFile, "background": _b.union(_b.literals(["transparent", "opaque", "auto"]), _S.Null).annotate(description="Set the background of the generated image(s). This parameter is only supported for\nthe GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default\nvalue). When `auto` is used, the model will automatically determine the best\nbackground for the image.\n\n`gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`\nsnapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds\nare available for supported GPT Image models. For `gpt-image-2` and\n`gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,\nset the output format to `png` or `webp`.\n"), "model": _b.union(_S.String, _b.literals(["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", "gpt-image-1", "gpt-image-1-mini", "chatgpt-image-latest", "dall-e-2"])).annotate(description="The GPT image model to use for image editing (`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`, or `chatgpt-image-latest`)."), "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(10).annotate(expected="a value less than or equal to 10")), _S.Null).annotate(description="The number of images to generate. Must be between 1 and 10."), "size": _b.union(_S.String, _b.literals(["1024x1024", "1536x1024", "1024x1536", "auto", "256x256", "512x512"]), _S.Null).annotate(description="The size of the generated images. Defaults to `auto`. 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."), "response_format": _b.union(_b.literals(["url", "b64_json"]), _S.Null).annotate(description="Legacy response format parameter for retired image models. Unsupported for GPT image models, which always return base64-encoded images."), "output_format": _b.union(_b.literals(["png", "jpeg", "webp"]), _S.Null).annotate(description="The format in which the generated images are returned. This parameter is\nonly supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.\nThe default value is `png`.\n"), "output_compression": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The compression level (0-100%) for the generated images. This parameter\nis only supported for the GPT image models with the `webp` or `jpeg` output\nformats, and defaults to 100.\n"), "user": _S.String.annotate(description="A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n"), "input_fidelity": _b.union(InputFidelity, _S.Null), "stream": _b.union(_S.Boolean, _S.Null).annotate(description="Edit the image in streaming mode. Defaults to `false`. See the\n[Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information.\n"), "partial_images": PartialImages, "quality": _b.union(_b.literals(["low", "medium", "high", "xhigh", "max", "auto", "standard"]), _S.Null).annotate(description="The quality of the image that will be generated for GPT image models. The GPT image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support `xhigh` and `max`. Defaults to `auto`.\n")}, optional=("mask", "background", "n", "size", "response_format", "output_format", "output_compression", "user", "input_fidelity", "stream", "partial_images", "quality",)).annotate(identifier="CreateImageEditRequestMultipart")
|
|
1015
|
+
CreateImageRequest: _StructSchema[_T.CreateImageRequest, _t.Never, _t.Never] = _b.struct(_T.CreateImageRequest, {"prompt": _S.String.annotate(description="A text description of the desired image(s). The maximum length is 32000 characters."), "model": _b.union(_S.String, _b.literals(["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", "gpt-image-1", "gpt-image-1-mini", "chatgpt-image-latest", "dall-e-2", "dall-e-3"])).annotate(description="The GPT image model to use for image generation. Specify a model explicitly. Supported models include `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`, and `chatgpt-image-latest`."), "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(10).annotate(expected="a value less than or equal to 10")), _S.Null).annotate(description="The number of images to generate. Must be between 1 and 10."), "quality": _b.union(_b.literals(["low", "medium", "high", "xhigh", "max", "auto", "standard", "hd"]), _S.Null).annotate(description="The quality of the image that will be generated.\n\n- `auto` (default value) will automatically select the best quality for the given\n model.\n- `high`, `medium` and `low` are supported for the GPT image models.\n- `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`\n snapshots, also support `xhigh` and `max`.\n"), "response_format": _b.union(_b.literals(["url", "b64_json"]), _S.Null).annotate(description="Legacy response format parameter for retired image models. Unsupported for GPT image models, which always return base64-encoded images."), "output_format": _b.union(_b.literals(["png", "jpeg", "webp"]), _S.Null).annotate(description="The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`."), "output_compression": _b.union(_b.check(_S.Number, _S.is_int().annotate(expected="an integer")), _S.Null).annotate(description="The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100."), "stream": _b.union(_S.Boolean, _S.Null).annotate(description="Generate the image in streaming mode. Defaults to `false`. See the\n[Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information.\nThis parameter is only supported for the GPT image models.\n"), "partial_images": PartialImages, "size": _b.union(_S.String, _b.literals(["auto", "1024x1024", "1536x1024", "1024x1536", "256x256", "512x512", "1792x1024", "1024x1792"]), _S.Null).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."), "moderation": _b.union(_b.literals(["low", "auto"]), _S.Null).annotate(description="Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value)."), "background": _b.union(_b.literals(["transparent", "opaque", "auto"]), _S.Null).annotate(description="Set the background of the generated image(s). This parameter is only supported for\nthe GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default\nvalue). When `auto` is used, the model will automatically determine the best\nbackground for the image.\n\n`gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`\nsnapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds\nare available for supported GPT Image models. For `gpt-image-2` and\n`gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,\nset the output format to `png` or `webp`.\n"), "style": _b.union(_b.literals(["vivid", "natural"]), _S.Null).annotate(description="Legacy style parameter for retired image models. Unsupported for GPT image models; describe the desired style in the prompt instead."), "user": _S.String.annotate(description="A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).\n")}, optional=("n", "quality", "response_format", "output_format", "output_compression", "stream", "partial_images", "size", "moderation", "background", "style", "user",)).annotate(identifier="CreateImageRequest")
|