@songtonyli/dsh-cli 0.1.55 → 0.1.57
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.
- package/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +17 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +60 -41
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +2 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +9 -6
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +30 -12
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +3 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +3 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +53 -5
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +27 -5
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +5 -3
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/any_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/api_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/google/protobuf/c_sharp_features_pb.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/compiler/plugin_pb.js +3 -3
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/cpp_features_pb.js +34 -6
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/google/protobuf/cpp_file_options_pb.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/google/protobuf/cpp_options_pb.js +22 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/descriptor_pb.js +49 -6
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/duration_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/empty_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/field_mask_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/go_features_pb.js +4 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/java_features_pb.js +4 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/google/protobuf/json_enumvalue_options_pb.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/google/protobuf/json_options_pb.js +22 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/source_context_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/struct_pb.js +11 -6
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/timestamp_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/type_pb.js +3 -3
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/{gen/google → google}/protobuf/wrappers_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +15 -15
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +18 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +60 -41
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +2 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +10 -7
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +31 -13
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +3 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +4 -5
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +3 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +53 -5
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +28 -6
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +5 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/any_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/api_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/google/protobuf/c_sharp_features_pb.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/compiler/plugin_pb.js +3 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/cpp_features_pb.js +33 -5
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/google/protobuf/cpp_file_options_pb.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/google/protobuf/cpp_options_pb.js +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/descriptor_pb.js +47 -4
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/duration_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/empty_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/field_mask_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/go_features_pb.js +4 -4
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/java_features_pb.js +4 -4
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/google/protobuf/json_enumvalue_options_pb.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/google/protobuf/json_options_pb.js +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/source_context_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/struct_pb.js +11 -6
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/timestamp_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/type_pb.js +3 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/{gen/google → google}/protobuf/wrappers_pb.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +15 -15
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +1 -1
- package/node_modules/@bufbuild/protobuf/package.json +236 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -182
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +15 -4
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +15 -4
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +692 -43
- package/node_modules/@earendil-works/pi-ai/README.md +207 -27
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +6 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.js +43 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.lazy.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.js +365 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.lazy.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +18 -17
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +20 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +26 -9
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +2 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.js +183 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js +19 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.lazy.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/helpers.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js +19 -128
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/callback-server.js +146 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-chatgpt.js +266 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js +20 -124
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +19 -138
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/radius.js +21 -89
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +3 -19
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/cli.js +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js +14 -13
- package/node_modules/@earendil-works/pi-ai/dist/images.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.js +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/model-catalog.js +14 -2
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +131 -41
- package/node_modules/@earendil-works/pi-ai/dist/models.js +157 -30
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +25 -21
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/baseten.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-stream.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.js +10 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/ant-ling.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/groq.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/typesafe.json +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/meta.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.js +11 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +5 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js +11 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/typesafe.js +18 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/typesafe.models.js +8 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.js +5 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.js +10 -8
- package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.js +47 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/models-error.js +19 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +7 -0
- package/node_modules/@earendil-works/pi-ai/package.json +4 -4
- package/node_modules/@earendil-works/pi-telemetry/package.json +2 -2
- package/node_modules/openai/CHANGELOG.md +1089 -1
- package/node_modules/openai/README.md +201 -102
- package/node_modules/openai/_vendor/partial-json-parser/parser.js +55 -38
- package/node_modules/openai/_vendor/partial-json-parser/parser.mjs +55 -38
- package/node_modules/openai/_vendor/zod-to-json-schema/Options.js +11 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/Options.mjs +11 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/Refs.js +4 -4
- package/node_modules/openai/_vendor/zod-to-json-schema/Refs.mjs +4 -4
- package/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.js +2 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.mjs +2 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/index.js +1 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/index.mjs +1 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/parseDef.js +139 -54
- package/node_modules/openai/_vendor/zod-to-json-schema/parseDef.mjs +139 -54
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/array.js +1 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/array.mjs +1 -1
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/bigint.js +10 -4
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/bigint.mjs +10 -4
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.js +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.mjs +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.js +1 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.mjs +1 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/date.js +10 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/date.mjs +10 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/default.js +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/default.mjs +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/intersection.js +6 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/intersection.mjs +6 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/literal.js +5 -0
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/literal.mjs +5 -0
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/nativeEnum.js +7 -9
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/nativeEnum.mjs +7 -9
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/null.js +3 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/null.mjs +3 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/nullable.js +8 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/nullable.mjs +8 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/number.js +12 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/number.mjs +12 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/object.js +43 -38
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/object.mjs +43 -38
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/optional.js +11 -12
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/optional.mjs +11 -12
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/pipeline.js +3 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/pipeline.mjs +3 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/promise.js +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/promise.mjs +2 -2
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.js +1 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.mjs +1 -3
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/record.js +7 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/record.mjs +7 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/string.js +57 -34
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/string.mjs +57 -34
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/tuple.js +24 -19
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/tuple.mjs +24 -19
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/union.js +46 -24
- package/node_modules/openai/_vendor/zod-to-json-schema/parsers/union.mjs +46 -24
- package/node_modules/openai/_vendor/zod-to-json-schema/util.js +7 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/util.mjs +7 -5
- package/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.js +110 -38
- package/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.mjs +110 -38
- package/node_modules/openai/auth/subject-token-providers.js +235 -10
- package/node_modules/openai/auth/subject-token-providers.mjs +235 -10
- package/node_modules/openai/auth/workload-identity-auth.js +185 -24
- package/node_modules/openai/auth/workload-identity-auth.mjs +186 -25
- package/node_modules/openai/auth/x509-transport.js +273 -0
- package/node_modules/openai/auth/x509-transport.mjs +268 -0
- package/node_modules/openai/azure.js +74 -21
- package/node_modules/openai/azure.mjs +75 -22
- package/node_modules/openai/bedrock.js +174 -0
- package/node_modules/openai/bedrock.mjs +169 -0
- package/node_modules/openai/beta/realtime/internal-base.js +71 -10
- package/node_modules/openai/beta/realtime/internal-base.mjs +70 -10
- package/node_modules/openai/beta/realtime/websocket.js +180 -33
- package/node_modules/openai/beta/realtime/websocket.mjs +181 -34
- package/node_modules/openai/beta/realtime/ws.js +93 -14
- package/node_modules/openai/beta/realtime/ws.mjs +94 -15
- package/node_modules/openai/client.js +745 -99
- package/node_modules/openai/client.mjs +747 -101
- package/node_modules/openai/core/EventEmitter.js +127 -16
- package/node_modules/openai/core/EventEmitter.mjs +128 -17
- package/node_modules/openai/core/api-promise.js +0 -1
- package/node_modules/openai/core/api-promise.mjs +0 -1
- package/node_modules/openai/core/error.js +5 -5
- package/node_modules/openai/core/error.mjs +5 -5
- package/node_modules/openai/core/pagination.js +33 -3
- package/node_modules/openai/core/pagination.mjs +31 -2
- package/node_modules/openai/core/resource.js +0 -1
- package/node_modules/openai/core/resource.mjs +0 -1
- package/node_modules/openai/core/streaming.js +453 -88
- package/node_modules/openai/core/streaming.mjs +454 -89
- package/node_modules/openai/core/uploads.js +3 -1
- package/node_modules/openai/core/uploads.mjs +1 -0
- package/node_modules/openai/helpers/audio.js +198 -28
- package/node_modules/openai/helpers/audio.mjs +199 -29
- package/node_modules/openai/helpers/live.js +6 -0
- package/node_modules/openai/helpers/live.mjs +2 -0
- package/node_modules/openai/helpers/standard-schema.js +393 -0
- package/node_modules/openai/helpers/standard-schema.mjs +387 -0
- package/node_modules/openai/helpers/zod-v3-strict-schema.js +408 -0
- package/node_modules/openai/helpers/zod-v3-strict-schema.mjs +404 -0
- package/node_modules/openai/helpers/zod.js +221 -24
- package/node_modules/openai/helpers/zod.mjs +222 -26
- package/node_modules/openai/index.js +8 -7
- package/node_modules/openai/index.mjs +2 -2
- package/node_modules/openai/internal/assistant-stream-delta.js +316 -0
- package/node_modules/openai/internal/assistant-stream-delta.mjs +308 -0
- package/node_modules/openai/internal/auth/x509-api-origin.js +28 -0
- package/node_modules/openai/internal/auth/x509-api-origin.mjs +24 -0
- package/node_modules/openai/internal/auth/x509-credential-options.js +125 -0
- package/node_modules/openai/internal/auth/x509-credential-options.mjs +121 -0
- package/node_modules/openai/internal/auth/x509-token-exchange.js +248 -0
- package/node_modules/openai/internal/auth/x509-token-exchange.mjs +245 -0
- package/node_modules/openai/internal/auth/x509-transport-capability.js +171 -0
- package/node_modules/openai/internal/auth/x509-transport-capability.mjs +166 -0
- package/node_modules/openai/internal/auth/x509-transport-registry.js +53 -0
- package/node_modules/openai/internal/auth/x509-transport-registry.mjs +48 -0
- package/node_modules/openai/internal/auth/x509-transport-state-browser.js +35 -0
- package/node_modules/openai/internal/auth/x509-transport-state-browser.mjs +32 -0
- package/node_modules/openai/internal/auth/x509-transport-state.cjs +35 -0
- package/node_modules/openai/internal/auth/x509-transport-state.js +36 -0
- package/node_modules/openai/internal/auth/x509-transport-state.mjs +20 -0
- package/node_modules/openai/internal/auth/x509-workload-identity-auth.js +787 -0
- package/node_modules/openai/internal/auth/x509-workload-identity-auth.mjs +778 -0
- package/node_modules/openai/internal/bedrock.js +438 -0
- package/node_modules/openai/internal/bedrock.mjs +424 -0
- package/node_modules/openai/internal/builtin-types.js +0 -1
- package/node_modules/openai/internal/builtin-types.mjs +0 -1
- package/node_modules/openai/internal/data-residency.js +34 -0
- package/node_modules/openai/internal/data-residency.mjs +30 -0
- package/node_modules/openai/internal/decoders/line.js +140 -54
- package/node_modules/openai/internal/decoders/line.mjs +141 -55
- package/node_modules/openai/internal/detect-platform.js +3 -4
- package/node_modules/openai/internal/detect-platform.mjs +3 -4
- package/node_modules/openai/internal/errors.js +3 -3
- package/node_modules/openai/internal/errors.mjs +3 -3
- package/node_modules/openai/internal/headers.js +11 -9
- package/node_modules/openai/internal/headers.mjs +11 -9
- package/node_modules/openai/internal/multipart-encoding.js +51 -0
- package/node_modules/openai/internal/multipart-encoding.mjs +48 -0
- package/node_modules/openai/internal/parse.js +35 -11
- package/node_modules/openai/internal/parse.mjs +35 -11
- package/node_modules/openai/internal/provider.js +50 -0
- package/node_modules/openai/internal/provider.mjs +46 -0
- package/node_modules/openai/internal/qs/formats.js +1 -2
- package/node_modules/openai/internal/qs/formats.mjs +1 -1
- package/node_modules/openai/internal/qs/stringify.js +60 -51
- package/node_modules/openai/internal/qs/stringify.mjs +60 -51
- package/node_modules/openai/internal/qs/utils.js +368 -50
- package/node_modules/openai/internal/qs/utils.mjs +368 -50
- package/node_modules/openai/internal/realtime-credentials.js +23 -0
- package/node_modules/openai/internal/realtime-credentials.mjs +19 -0
- package/node_modules/openai/internal/request-options.js +43 -2
- package/node_modules/openai/internal/request-options.mjs +42 -2
- package/node_modules/openai/internal/responses/canonical-output-text.js +123 -0
- package/node_modules/openai/internal/responses/canonical-output-text.mjs +115 -0
- package/node_modules/openai/internal/responses/output-text-index.js +77 -0
- package/node_modules/openai/internal/responses/output-text-index.mjs +73 -0
- package/node_modules/openai/internal/responses/response-accumulator.js +942 -0
- package/node_modules/openai/internal/responses/response-accumulator.mjs +938 -0
- package/node_modules/openai/internal/shim-types.js +6 -1
- package/node_modules/openai/internal/shim-types.mjs +6 -1
- package/node_modules/openai/internal/shims.js +6 -1
- package/node_modules/openai/internal/shims.mjs +6 -1
- package/node_modules/openai/internal/stream-utils.js +35 -7
- package/node_modules/openai/internal/stream-utils.mjs +35 -7
- package/node_modules/openai/internal/to-file.js +47 -24
- package/node_modules/openai/internal/to-file.mjs +47 -24
- package/node_modules/openai/internal/tslib.js +6 -0
- package/node_modules/openai/internal/tslib.mjs +6 -1
- package/node_modules/openai/internal/types.js +0 -1
- package/node_modules/openai/internal/types.mjs +0 -1
- package/node_modules/openai/internal/uploads.js +377 -43
- package/node_modules/openai/internal/uploads.mjs +376 -44
- package/node_modules/openai/internal/utils/abort.js +94 -0
- package/node_modules/openai/internal/utils/abort.mjs +90 -0
- package/node_modules/openai/internal/utils/base64.js +3 -1
- package/node_modules/openai/internal/utils/base64.mjs +3 -1
- package/node_modules/openai/internal/utils/bytes.js +5 -0
- package/node_modules/openai/internal/utils/bytes.mjs +5 -0
- package/node_modules/openai/internal/utils/env.js +9 -5
- package/node_modules/openai/internal/utils/env.mjs +9 -5
- package/node_modules/openai/internal/utils/log.js +73 -11
- package/node_modules/openai/internal/utils/log.mjs +70 -11
- package/node_modules/openai/internal/utils/path.js +50 -30
- package/node_modules/openai/internal/utils/path.mjs +50 -30
- package/node_modules/openai/internal/utils/query.js +0 -1
- package/node_modules/openai/internal/utils/query.mjs +0 -1
- package/node_modules/openai/internal/utils/sleep.js +51 -2
- package/node_modules/openai/internal/utils/sleep.mjs +51 -2
- package/node_modules/openai/internal/utils/uuid.js +0 -1
- package/node_modules/openai/internal/utils/uuid.mjs +0 -1
- package/node_modules/openai/internal/utils/values.js +0 -1
- package/node_modules/openai/internal/utils/values.mjs +0 -1
- package/node_modules/openai/internal/utils.js +0 -1
- package/node_modules/openai/internal/utils.mjs +0 -1
- package/node_modules/openai/internal/ws-adapter-browser.js +66 -21
- package/node_modules/openai/internal/ws-adapter-browser.mjs +66 -21
- package/node_modules/openai/internal/ws-adapter-node.js +90 -24
- package/node_modules/openai/internal/ws-adapter-node.mjs +90 -24
- package/node_modules/openai/internal/ws-adapter.js +4 -0
- package/node_modules/openai/internal/ws-adapter.mjs +4 -0
- package/node_modules/openai/internal/ws.js +193 -48
- package/node_modules/openai/internal/ws.mjs +188 -49
- package/node_modules/openai/lib/AbstractChatCompletionRunner.js +254 -72
- package/node_modules/openai/lib/AbstractChatCompletionRunner.mjs +256 -74
- package/node_modules/openai/lib/AssistantStream.js +430 -259
- package/node_modules/openai/lib/AssistantStream.mjs +432 -261
- package/node_modules/openai/lib/ChatCompletionRunner.js +12 -5
- package/node_modules/openai/lib/ChatCompletionRunner.mjs +13 -6
- package/node_modules/openai/lib/ChatCompletionStream.js +1430 -189
- package/node_modules/openai/lib/ChatCompletionStream.mjs +1433 -193
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.js +40 -2
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs +41 -3
- package/node_modules/openai/lib/EventEmitter.js +124 -16
- package/node_modules/openai/lib/EventEmitter.mjs +125 -17
- package/node_modules/openai/lib/EventStream.js +1533 -55
- package/node_modules/openai/lib/EventStream.mjs +1534 -56
- package/node_modules/openai/lib/ResponsesParser.js +68 -29
- package/node_modules/openai/lib/ResponsesParser.mjs +69 -30
- package/node_modules/openai/lib/RunnableFunction.js +3 -0
- package/node_modules/openai/lib/RunnableFunction.mjs +3 -0
- package/node_modules/openai/lib/Util.js +7 -4
- package/node_modules/openai/lib/Util.mjs +7 -4
- package/node_modules/openai/lib/agents/agent-session-stream.js +274 -0
- package/node_modules/openai/lib/agents/agent-session-stream.mjs +270 -0
- package/node_modules/openai/lib/agents/output-text.js +8 -0
- package/node_modules/openai/lib/agents/output-text.mjs +5 -0
- package/node_modules/openai/lib/agents/turn-state.js +62 -0
- package/node_modules/openai/lib/agents/turn-state.mjs +58 -0
- package/node_modules/openai/lib/assistant-run-polling.js +17 -0
- package/node_modules/openai/lib/assistant-run-polling.mjs +14 -0
- package/node_modules/openai/lib/chatCompletionUtils.js +5 -6
- package/node_modules/openai/lib/chatCompletionUtils.mjs +5 -6
- package/node_modules/openai/lib/embeddings.js +58 -0
- package/node_modules/openai/lib/embeddings.mjs +55 -0
- package/node_modules/openai/lib/file-processing.js +31 -0
- package/node_modules/openai/lib/file-processing.mjs +28 -0
- package/node_modules/openai/lib/live/transcript-grouper.js +229 -0
- package/node_modules/openai/lib/live/transcript-grouper.mjs +225 -0
- package/node_modules/openai/lib/live/transcript-grouping.js +309 -0
- package/node_modules/openai/lib/live/transcript-grouping.mjs +305 -0
- package/node_modules/openai/lib/live/webrtc.js +16 -0
- package/node_modules/openai/lib/live/webrtc.mjs +10 -0
- package/node_modules/openai/lib/parser.js +142 -42
- package/node_modules/openai/lib/parser.mjs +140 -42
- package/node_modules/openai/lib/polling.js +131 -0
- package/node_modules/openai/lib/polling.mjs +128 -0
- package/node_modules/openai/lib/realtime/webrtc.js +16 -0
- package/node_modules/openai/lib/realtime/webrtc.mjs +10 -0
- package/node_modules/openai/lib/responses/ResponseAccumulator.js +15 -0
- package/node_modules/openai/lib/responses/ResponseAccumulator.mjs +12 -0
- package/node_modules/openai/lib/responses/ResponseInputItems.js +139 -0
- package/node_modules/openai/lib/responses/ResponseInputItems.mjs +135 -0
- package/node_modules/openai/lib/responses/ResponseStream.js +85 -159
- package/node_modules/openai/lib/responses/ResponseStream.mjs +86 -160
- package/node_modules/openai/lib/responses/responses-websocket-lane.js +314 -0
- package/node_modules/openai/lib/responses/responses-websocket-lane.mjs +309 -0
- package/node_modules/openai/lib/responses/responses-websocket-session.js +268 -0
- package/node_modules/openai/lib/responses/responses-websocket-session.mjs +263 -0
- package/node_modules/openai/lib/transform.js +1608 -82
- package/node_modules/openai/lib/transform.mjs +1602 -82
- package/node_modules/openai/lib/vector-store-polling.js +24 -0
- package/node_modules/openai/lib/vector-store-polling.mjs +20 -0
- package/node_modules/openai/lib/vector-store-upload.js +41 -0
- package/node_modules/openai/lib/vector-store-upload.mjs +38 -0
- package/node_modules/openai/lib/webhook-signature.js +125 -0
- package/node_modules/openai/lib/webhook-signature.mjs +121 -0
- package/node_modules/openai/lib/webrtc/connection.js +233 -0
- package/node_modules/openai/lib/webrtc/connection.mjs +229 -0
- package/node_modules/openai/lib/webrtc/data-channel.js +133 -0
- package/node_modules/openai/lib/webrtc/data-channel.mjs +129 -0
- package/node_modules/openai/lib/webrtc/errors.js +18 -0
- package/node_modules/openai/lib/webrtc/errors.mjs +14 -0
- package/node_modules/openai/lib/webrtc/subscriptions.js +64 -0
- package/node_modules/openai/lib/webrtc/subscriptions.mjs +60 -0
- package/node_modules/openai/lib/webrtc/types.js +3 -0
- package/node_modules/openai/lib/webrtc/types.mjs +2 -0
- package/node_modules/openai/live/webrtc.js +8 -0
- package/node_modules/openai/live/webrtc.mjs +2 -0
- package/node_modules/openai/package.json +71 -11
- package/node_modules/openai/providers/bedrock/aws.js +211 -0
- package/node_modules/openai/providers/bedrock/aws.mjs +207 -0
- package/node_modules/openai/providers/bedrock.js +43 -0
- package/node_modules/openai/providers/bedrock.mjs +39 -0
- package/node_modules/openai/realtime/internal-base.js +118 -11
- package/node_modules/openai/realtime/internal-base.mjs +116 -11
- package/node_modules/openai/realtime/webrtc.js +8 -0
- package/node_modules/openai/realtime/webrtc.mjs +2 -0
- package/node_modules/openai/realtime/websocket.js +174 -39
- package/node_modules/openai/realtime/websocket.mjs +175 -40
- package/node_modules/openai/realtime/ws.js +86 -18
- package/node_modules/openai/realtime/ws.mjs +87 -19
- package/node_modules/openai/resources/admin/admin.js +1 -1
- package/node_modules/openai/resources/admin/admin.mjs +1 -1
- package/node_modules/openai/resources/admin/index.js +1 -1
- package/node_modules/openai/resources/admin/index.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/admin-api-keys.js +1 -1
- package/node_modules/openai/resources/admin/organization/admin-api-keys.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/audit-logs.js +1 -1
- package/node_modules/openai/resources/admin/organization/audit-logs.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/certificates.js +1 -1
- package/node_modules/openai/resources/admin/organization/certificates.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/data-retention.js +1 -1
- package/node_modules/openai/resources/admin/organization/data-retention.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/groups/groups.js +1 -1
- package/node_modules/openai/resources/admin/organization/groups/groups.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/groups/index.js +1 -1
- package/node_modules/openai/resources/admin/organization/groups/index.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/groups/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/groups/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/groups/users.js +1 -1
- package/node_modules/openai/resources/admin/organization/groups/users.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/groups.js +1 -1
- package/node_modules/openai/resources/admin/organization/groups.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/index.js +4 -2
- package/node_modules/openai/resources/admin/organization/index.mjs +2 -1
- package/node_modules/openai/resources/admin/organization/invites.js +1 -1
- package/node_modules/openai/resources/admin/organization/invites.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/organization.js +5 -1
- package/node_modules/openai/resources/admin/organization/organization.mjs +5 -1
- package/node_modules/openai/resources/admin/organization/projects/api-keys.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/api-keys.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/certificates.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/certificates.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/data-retention.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/data-retention.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/groups.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/groups.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/index.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/index.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/groups.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.js +8 -6
- package/node_modules/openai/resources/admin/organization/projects/index.mjs +3 -2
- package/node_modules/openai/resources/admin/organization/projects/model-permissions.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/model-permissions.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.js +7 -3
- package/node_modules/openai/resources/admin/organization/projects/projects.mjs +7 -3
- package/node_modules/openai/resources/admin/organization/projects/rate-limits.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/rate-limits.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.js +26 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.mjs +22 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.js +9 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.mjs +4 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.js +109 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.mjs +104 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.js +3 -98
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.mjs +2 -96
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +20 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-alerts.mjs +20 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.js +67 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.mjs +63 -0
- package/node_modules/openai/resources/admin/organization/projects/users/index.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users/index.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users/users.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users/users.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects/users.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/projects.js +1 -1
- package/node_modules/openai/resources/admin/organization/projects.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/spend-alerts.js +18 -1
- package/node_modules/openai/resources/admin/organization/spend-alerts.mjs +18 -1
- package/node_modules/openai/resources/admin/organization/spend-limit.js +59 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.mjs +55 -0
- package/node_modules/openai/resources/admin/organization/usage.js +1 -1
- package/node_modules/openai/resources/admin/organization/usage.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/users/index.js +1 -1
- package/node_modules/openai/resources/admin/organization/users/index.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/users/roles.js +1 -1
- package/node_modules/openai/resources/admin/organization/users/roles.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/users/users.js +1 -1
- package/node_modules/openai/resources/admin/organization/users/users.mjs +1 -1
- package/node_modules/openai/resources/admin/organization/users.js +1 -1
- package/node_modules/openai/resources/admin/organization/users.mjs +1 -1
- package/node_modules/openai/resources/admin/organization.js +1 -1
- package/node_modules/openai/resources/admin/organization.mjs +1 -1
- package/node_modules/openai/resources/admin.js +1 -1
- package/node_modules/openai/resources/admin.mjs +1 -1
- package/node_modules/openai/resources/audio/audio.js +1 -1
- package/node_modules/openai/resources/audio/audio.mjs +1 -1
- package/node_modules/openai/resources/audio/index.js +1 -1
- package/node_modules/openai/resources/audio/index.mjs +1 -1
- package/node_modules/openai/resources/audio/speech.js +1 -1
- package/node_modules/openai/resources/audio/speech.mjs +1 -1
- package/node_modules/openai/resources/audio/transcriptions.js +1 -1
- package/node_modules/openai/resources/audio/transcriptions.mjs +1 -1
- package/node_modules/openai/resources/audio/translations.js +1 -1
- package/node_modules/openai/resources/audio/translations.mjs +1 -1
- package/node_modules/openai/resources/audio.js +1 -1
- package/node_modules/openai/resources/audio.mjs +1 -1
- package/node_modules/openai/resources/batches.js +1 -1
- package/node_modules/openai/resources/batches.mjs +1 -1
- package/node_modules/openai/resources/beta/agents/agents.js +118 -0
- package/node_modules/openai/resources/beta/agents/agents.mjs +113 -0
- package/node_modules/openai/resources/beta/agents/environments/environments.js +43 -0
- package/node_modules/openai/resources/beta/agents/environments/environments.mjs +38 -0
- package/node_modules/openai/resources/beta/agents/environments/files.js +61 -0
- package/node_modules/openai/resources/beta/agents/environments/files.mjs +57 -0
- package/node_modules/openai/resources/beta/agents/environments/index.js +11 -0
- package/node_modules/openai/resources/beta/agents/environments/index.mjs +5 -0
- package/node_modules/openai/resources/beta/agents/environments/templates.js +112 -0
- package/node_modules/openai/resources/beta/agents/environments/templates.mjs +108 -0
- package/node_modules/openai/resources/beta/agents/environments.js +6 -0
- package/node_modules/openai/resources/beta/agents/environments.mjs +3 -0
- package/node_modules/openai/resources/beta/agents/index.js +13 -0
- package/node_modules/openai/resources/beta/agents/index.mjs +6 -0
- package/node_modules/openai/resources/beta/agents/sessions/artifacts.js +106 -0
- package/node_modules/openai/resources/beta/agents/sessions/artifacts.mjs +102 -0
- package/node_modules/openai/resources/beta/agents/sessions/events.js +75 -0
- package/node_modules/openai/resources/beta/agents/sessions/events.mjs +71 -0
- package/node_modules/openai/resources/beta/agents/sessions/index.js +17 -0
- package/node_modules/openai/resources/beta/agents/sessions/index.mjs +8 -0
- package/node_modules/openai/resources/beta/agents/sessions/items.js +35 -0
- package/node_modules/openai/resources/beta/agents/sessions/items.mjs +31 -0
- package/node_modules/openai/resources/beta/agents/sessions/sessions.js +127 -0
- package/node_modules/openai/resources/beta/agents/sessions/sessions.mjs +122 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/index.js +11 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/index.mjs +5 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/items.js +36 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/items.mjs +32 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/subagents.js +67 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/subagents.mjs +62 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/index.js +9 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/index.mjs +4 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/items.js +36 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/items.mjs +32 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/turns.js +68 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns/turns.mjs +63 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns.js +6 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents/turns.mjs +3 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents.js +6 -0
- package/node_modules/openai/resources/beta/agents/sessions/subagents.mjs +3 -0
- package/node_modules/openai/resources/beta/agents/sessions/turns.js +57 -0
- package/node_modules/openai/resources/beta/agents/sessions/turns.mjs +53 -0
- package/node_modules/openai/resources/beta/agents/sessions.js +6 -0
- package/node_modules/openai/resources/beta/agents/sessions.mjs +3 -0
- package/node_modules/openai/resources/beta/agents/vaults/credentials.js +132 -0
- package/node_modules/openai/resources/beta/agents/vaults/credentials.mjs +128 -0
- package/node_modules/openai/resources/beta/agents/vaults/index.js +9 -0
- package/node_modules/openai/resources/beta/agents/vaults/index.mjs +4 -0
- package/node_modules/openai/resources/beta/agents/vaults/vaults.js +93 -0
- package/node_modules/openai/resources/beta/agents/vaults/vaults.mjs +88 -0
- package/node_modules/openai/resources/beta/agents/vaults.js +6 -0
- package/node_modules/openai/resources/beta/agents/vaults.mjs +3 -0
- package/node_modules/openai/resources/beta/agents.js +6 -0
- package/node_modules/openai/resources/beta/agents.mjs +3 -0
- package/node_modules/openai/resources/beta/assistants.js +1 -1
- package/node_modules/openai/resources/beta/assistants.mjs +1 -1
- package/node_modules/openai/resources/beta/beta.js +9 -1
- package/node_modules/openai/resources/beta/beta.mjs +9 -1
- package/node_modules/openai/resources/beta/chatkit/chatkit.js +1 -1
- package/node_modules/openai/resources/beta/chatkit/chatkit.mjs +1 -1
- package/node_modules/openai/resources/beta/chatkit/index.js +1 -1
- package/node_modules/openai/resources/beta/chatkit/index.mjs +1 -1
- package/node_modules/openai/resources/beta/chatkit/sessions.js +1 -1
- package/node_modules/openai/resources/beta/chatkit/sessions.mjs +1 -1
- package/node_modules/openai/resources/beta/chatkit/threads.js +1 -1
- package/node_modules/openai/resources/beta/chatkit/threads.mjs +1 -1
- package/node_modules/openai/resources/beta/chatkit.js +1 -1
- package/node_modules/openai/resources/beta/chatkit.mjs +1 -1
- package/node_modules/openai/resources/beta/index.js +12 -8
- package/node_modules/openai/resources/beta/index.mjs +3 -1
- package/node_modules/openai/resources/beta/realtime/index.js +0 -1
- package/node_modules/openai/resources/beta/realtime/index.mjs +0 -1
- package/node_modules/openai/resources/beta/realtime/realtime.js +0 -1
- package/node_modules/openai/resources/beta/realtime/realtime.mjs +0 -1
- package/node_modules/openai/resources/beta/realtime/sessions.js +0 -1
- package/node_modules/openai/resources/beta/realtime/sessions.mjs +0 -1
- package/node_modules/openai/resources/beta/realtime/transcription-sessions.js +0 -1
- package/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs +0 -1
- package/node_modules/openai/resources/beta/realtime.js +0 -1
- package/node_modules/openai/resources/beta/realtime.mjs +0 -1
- package/node_modules/openai/resources/beta/responses/index.js +11 -0
- package/node_modules/openai/resources/beta/responses/index.mjs +5 -0
- package/node_modules/openai/resources/beta/responses/input-items.js +37 -0
- package/node_modules/openai/resources/beta/responses/input-items.mjs +33 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.js +34 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.mjs +30 -0
- package/node_modules/openai/resources/beta/responses/internal-base.js +66 -0
- package/node_modules/openai/resources/beta/responses/internal-base.mjs +60 -0
- package/node_modules/openai/resources/beta/responses/responses.js +121 -0
- package/node_modules/openai/resources/beta/responses/responses.mjs +116 -0
- package/node_modules/openai/resources/beta/responses/ws-base.js +566 -0
- package/node_modules/openai/resources/beta/responses/ws-base.mjs +560 -0
- package/node_modules/openai/resources/beta/responses/ws.js +47 -0
- package/node_modules/openai/resources/beta/responses/ws.mjs +42 -0
- package/node_modules/openai/resources/beta/responses.js +6 -0
- package/node_modules/openai/resources/beta/responses.mjs +3 -0
- package/node_modules/openai/resources/beta/threads/index.js +1 -1
- package/node_modules/openai/resources/beta/threads/index.mjs +1 -1
- package/node_modules/openai/resources/beta/threads/messages.js +1 -1
- package/node_modules/openai/resources/beta/threads/messages.mjs +1 -1
- package/node_modules/openai/resources/beta/threads/runs/index.js +1 -1
- package/node_modules/openai/resources/beta/threads/runs/index.mjs +1 -1
- package/node_modules/openai/resources/beta/threads/runs/runs.js +3 -44
- package/node_modules/openai/resources/beta/threads/runs/runs.mjs +3 -44
- package/node_modules/openai/resources/beta/threads/runs/steps.js +1 -1
- package/node_modules/openai/resources/beta/threads/runs/steps.mjs +1 -1
- package/node_modules/openai/resources/beta/threads/runs.js +1 -1
- package/node_modules/openai/resources/beta/threads/runs.mjs +1 -1
- package/node_modules/openai/resources/beta/threads/threads.js +1 -1
- package/node_modules/openai/resources/beta/threads/threads.mjs +1 -1
- package/node_modules/openai/resources/beta/threads.js +1 -1
- package/node_modules/openai/resources/beta/threads.mjs +1 -1
- package/node_modules/openai/resources/beta.js +1 -1
- package/node_modules/openai/resources/beta.mjs +1 -1
- package/node_modules/openai/resources/chat/chat.js +1 -1
- package/node_modules/openai/resources/chat/chat.mjs +1 -1
- package/node_modules/openai/resources/chat/completions/completions.js +2 -5
- package/node_modules/openai/resources/chat/completions/completions.mjs +2 -5
- package/node_modules/openai/resources/chat/completions/index.js +1 -1
- package/node_modules/openai/resources/chat/completions/index.mjs +1 -1
- package/node_modules/openai/resources/chat/completions/messages.js +1 -1
- package/node_modules/openai/resources/chat/completions/messages.mjs +1 -1
- package/node_modules/openai/resources/chat/completions.js +1 -1
- package/node_modules/openai/resources/chat/completions.mjs +1 -1
- package/node_modules/openai/resources/chat/index.js +1 -1
- package/node_modules/openai/resources/chat/index.mjs +1 -1
- package/node_modules/openai/resources/chat.js +1 -1
- package/node_modules/openai/resources/chat.mjs +1 -1
- package/node_modules/openai/resources/completions.js +1 -1
- package/node_modules/openai/resources/completions.mjs +1 -1
- package/node_modules/openai/resources/containers/containers.js +1 -1
- package/node_modules/openai/resources/containers/containers.mjs +1 -1
- package/node_modules/openai/resources/containers/files/content.js +1 -1
- package/node_modules/openai/resources/containers/files/content.mjs +1 -1
- package/node_modules/openai/resources/containers/files/files.js +1 -1
- package/node_modules/openai/resources/containers/files/files.mjs +1 -1
- package/node_modules/openai/resources/containers/files/index.js +1 -1
- package/node_modules/openai/resources/containers/files/index.mjs +1 -1
- package/node_modules/openai/resources/containers/files.js +1 -1
- package/node_modules/openai/resources/containers/files.mjs +1 -1
- package/node_modules/openai/resources/containers/index.js +1 -1
- package/node_modules/openai/resources/containers/index.mjs +1 -1
- package/node_modules/openai/resources/containers.js +1 -1
- package/node_modules/openai/resources/containers.mjs +1 -1
- package/node_modules/openai/resources/content-provenance-checks.js +24 -0
- package/node_modules/openai/resources/content-provenance-checks.mjs +20 -0
- package/node_modules/openai/resources/conversations/conversations.js +1 -1
- package/node_modules/openai/resources/conversations/conversations.mjs +1 -1
- package/node_modules/openai/resources/conversations/index.js +1 -1
- package/node_modules/openai/resources/conversations/index.mjs +1 -1
- package/node_modules/openai/resources/conversations/items.js +1 -1
- package/node_modules/openai/resources/conversations/items.mjs +1 -1
- package/node_modules/openai/resources/conversations.js +1 -1
- package/node_modules/openai/resources/conversations.mjs +1 -1
- package/node_modules/openai/resources/embeddings.js +3 -47
- package/node_modules/openai/resources/embeddings.mjs +3 -47
- package/node_modules/openai/resources/evals/evals.js +2 -2
- package/node_modules/openai/resources/evals/evals.mjs +2 -2
- package/node_modules/openai/resources/evals/index.js +1 -1
- package/node_modules/openai/resources/evals/index.mjs +1 -1
- package/node_modules/openai/resources/evals/runs/index.js +1 -1
- package/node_modules/openai/resources/evals/runs/index.mjs +1 -1
- package/node_modules/openai/resources/evals/runs/output-items.js +1 -1
- package/node_modules/openai/resources/evals/runs/output-items.mjs +1 -1
- package/node_modules/openai/resources/evals/runs/runs.js +1 -1
- package/node_modules/openai/resources/evals/runs/runs.mjs +1 -1
- package/node_modules/openai/resources/evals/runs.js +1 -1
- package/node_modules/openai/resources/evals/runs.mjs +1 -1
- package/node_modules/openai/resources/evals.js +1 -1
- package/node_modules/openai/resources/evals.mjs +1 -1
- package/node_modules/openai/resources/files.js +9 -22
- package/node_modules/openai/resources/files.mjs +9 -22
- package/node_modules/openai/resources/fine-tuning/alpha/alpha.js +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha/graders.js +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha/graders.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha/index.js +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha/index.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha.js +1 -1
- package/node_modules/openai/resources/fine-tuning/alpha.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.js +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints/index.js +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints/index.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints/permissions.js +9 -5
- package/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs +9 -5
- package/node_modules/openai/resources/fine-tuning/checkpoints.js +1 -1
- package/node_modules/openai/resources/fine-tuning/checkpoints.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/fine-tuning.js +1 -1
- package/node_modules/openai/resources/fine-tuning/fine-tuning.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/index.js +1 -1
- package/node_modules/openai/resources/fine-tuning/index.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs/index.js +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs/index.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs/jobs.js +3 -3
- package/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs +3 -3
- package/node_modules/openai/resources/fine-tuning/jobs.js +1 -1
- package/node_modules/openai/resources/fine-tuning/jobs.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning/methods.js +1 -1
- package/node_modules/openai/resources/fine-tuning/methods.mjs +1 -1
- package/node_modules/openai/resources/fine-tuning.js +1 -1
- package/node_modules/openai/resources/fine-tuning.mjs +1 -1
- package/node_modules/openai/resources/graders/grader-models.js +1 -1
- package/node_modules/openai/resources/graders/grader-models.mjs +1 -1
- package/node_modules/openai/resources/graders/graders.js +1 -1
- package/node_modules/openai/resources/graders/graders.mjs +1 -1
- package/node_modules/openai/resources/graders/index.js +1 -1
- package/node_modules/openai/resources/graders/index.mjs +1 -1
- package/node_modules/openai/resources/graders.js +1 -1
- package/node_modules/openai/resources/graders.mjs +1 -1
- package/node_modules/openai/resources/images.js +8 -2
- package/node_modules/openai/resources/images.mjs +8 -2
- package/node_modules/openai/resources/index.js +9 -3
- package/node_modules/openai/resources/index.mjs +5 -2
- package/node_modules/openai/resources/live/forks/forks.js +9 -0
- package/node_modules/openai/resources/live/forks/forks.mjs +5 -0
- package/node_modules/openai/resources/live/forks/index.js +7 -0
- package/node_modules/openai/resources/live/forks/index.mjs +3 -0
- package/node_modules/openai/resources/live/forks/internal-base.js +65 -0
- package/node_modules/openai/resources/live/forks/internal-base.mjs +59 -0
- package/node_modules/openai/resources/live/forks/ws-base.js +547 -0
- package/node_modules/openai/resources/live/forks/ws-base.mjs +543 -0
- package/node_modules/openai/resources/live/forks/ws.js +32 -0
- package/node_modules/openai/resources/live/forks/ws.mjs +27 -0
- package/node_modules/openai/resources/live/forks.js +6 -0
- package/node_modules/openai/resources/live/forks.mjs +3 -0
- package/node_modules/openai/resources/live/index.js +13 -0
- package/node_modules/openai/resources/live/index.mjs +6 -0
- package/node_modules/openai/resources/live/internal-base.js +64 -0
- package/node_modules/openai/resources/live/internal-base.mjs +58 -0
- package/node_modules/openai/resources/live/live.js +40 -0
- package/node_modules/openai/resources/live/live.mjs +35 -0
- package/node_modules/openai/resources/live/sessions.js +124 -0
- package/node_modules/openai/resources/live/sessions.mjs +120 -0
- package/node_modules/openai/resources/live/sideband/index.js +7 -0
- package/node_modules/openai/resources/live/sideband/index.mjs +3 -0
- package/node_modules/openai/resources/live/sideband/internal-base.js +65 -0
- package/node_modules/openai/resources/live/sideband/internal-base.mjs +59 -0
- package/node_modules/openai/resources/live/sideband/sideband.js +9 -0
- package/node_modules/openai/resources/live/sideband/sideband.mjs +5 -0
- package/node_modules/openai/resources/live/sideband/ws-base.js +547 -0
- package/node_modules/openai/resources/live/sideband/ws-base.mjs +543 -0
- package/node_modules/openai/resources/live/sideband/ws.js +32 -0
- package/node_modules/openai/resources/live/sideband/ws.mjs +27 -0
- package/node_modules/openai/resources/live/sideband.js +6 -0
- package/node_modules/openai/resources/live/sideband.mjs +3 -0
- package/node_modules/openai/resources/live/ws-base.js +547 -0
- package/node_modules/openai/resources/live/ws-base.mjs +543 -0
- package/node_modules/openai/resources/live/ws.js +32 -0
- package/node_modules/openai/resources/live/ws.mjs +27 -0
- package/node_modules/openai/resources/live.js +6 -0
- package/node_modules/openai/resources/live.mjs +3 -0
- package/node_modules/openai/resources/models.js +1 -1
- package/node_modules/openai/resources/models.mjs +1 -1
- package/node_modules/openai/resources/moderations.js +3 -2
- package/node_modules/openai/resources/moderations.mjs +3 -2
- package/node_modules/openai/resources/realtime/calls.js +25 -1
- package/node_modules/openai/resources/realtime/calls.mjs +25 -1
- package/node_modules/openai/resources/realtime/client-secrets.js +2 -2
- package/node_modules/openai/resources/realtime/client-secrets.mjs +2 -2
- package/node_modules/openai/resources/realtime/index.js +1 -1
- package/node_modules/openai/resources/realtime/index.mjs +2 -2
- package/node_modules/openai/resources/realtime/realtime.js +1 -1
- package/node_modules/openai/resources/realtime/realtime.mjs +1 -1
- package/node_modules/openai/resources/realtime.js +1 -1
- package/node_modules/openai/resources/realtime.mjs +1 -1
- package/node_modules/openai/resources/responses/index.js +1 -1
- package/node_modules/openai/resources/responses/index.mjs +1 -1
- package/node_modules/openai/resources/responses/input-items.js +1 -1
- package/node_modules/openai/resources/responses/input-items.mjs +1 -1
- package/node_modules/openai/resources/responses/input-tokens.js +1 -1
- package/node_modules/openai/resources/responses/input-tokens.mjs +1 -1
- package/node_modules/openai/resources/responses/internal-base.js +24 -6
- package/node_modules/openai/resources/responses/internal-base.mjs +24 -6
- package/node_modules/openai/resources/responses/responses.js +5 -5
- package/node_modules/openai/resources/responses/responses.mjs +5 -5
- package/node_modules/openai/resources/responses/ws-base.js +115 -23
- package/node_modules/openai/resources/responses/ws-base.mjs +115 -25
- package/node_modules/openai/resources/responses/ws.js +23 -7
- package/node_modules/openai/resources/responses/ws.mjs +23 -7
- package/node_modules/openai/resources/responses.js +1 -1
- package/node_modules/openai/resources/responses.mjs +1 -1
- package/node_modules/openai/resources/safety/alerts.js +16 -0
- package/node_modules/openai/resources/safety/alerts.mjs +12 -0
- package/node_modules/openai/resources/safety/index.js +9 -0
- package/node_modules/openai/resources/safety/index.mjs +4 -0
- package/node_modules/openai/resources/safety/safety.js +17 -0
- package/node_modules/openai/resources/safety/safety.mjs +12 -0
- package/node_modules/openai/resources/safety.js +6 -0
- package/node_modules/openai/resources/safety.mjs +3 -0
- package/node_modules/openai/resources/shared.js +1 -1
- package/node_modules/openai/resources/shared.mjs +1 -1
- package/node_modules/openai/resources/skills/content.js +1 -1
- package/node_modules/openai/resources/skills/content.mjs +1 -1
- package/node_modules/openai/resources/skills/index.js +1 -1
- package/node_modules/openai/resources/skills/index.mjs +1 -1
- package/node_modules/openai/resources/skills/skills.js +4 -2
- package/node_modules/openai/resources/skills/skills.mjs +4 -2
- package/node_modules/openai/resources/skills/versions/content.js +1 -1
- package/node_modules/openai/resources/skills/versions/content.mjs +1 -1
- package/node_modules/openai/resources/skills/versions/index.js +1 -1
- package/node_modules/openai/resources/skills/versions/index.mjs +1 -1
- package/node_modules/openai/resources/skills/versions/versions.js +4 -2
- package/node_modules/openai/resources/skills/versions/versions.mjs +4 -2
- package/node_modules/openai/resources/skills/versions.js +1 -1
- package/node_modules/openai/resources/skills/versions.mjs +1 -1
- package/node_modules/openai/resources/skills.js +1 -1
- package/node_modules/openai/resources/skills.mjs +1 -1
- package/node_modules/openai/resources/uploads/index.js +1 -1
- package/node_modules/openai/resources/uploads/index.mjs +1 -1
- package/node_modules/openai/resources/uploads/parts.js +6 -5
- package/node_modules/openai/resources/uploads/parts.mjs +6 -5
- package/node_modules/openai/resources/uploads/uploads.js +10 -10
- package/node_modules/openai/resources/uploads/uploads.mjs +10 -10
- package/node_modules/openai/resources/uploads.js +1 -1
- package/node_modules/openai/resources/uploads.mjs +1 -1
- package/node_modules/openai/resources/vector-stores/file-batches.js +6 -63
- package/node_modules/openai/resources/vector-stores/file-batches.mjs +6 -63
- package/node_modules/openai/resources/vector-stores/files.js +6 -39
- package/node_modules/openai/resources/vector-stores/files.mjs +6 -39
- package/node_modules/openai/resources/vector-stores/index.js +1 -1
- package/node_modules/openai/resources/vector-stores/index.mjs +1 -1
- package/node_modules/openai/resources/vector-stores/vector-stores.js +1 -1
- package/node_modules/openai/resources/vector-stores/vector-stores.mjs +1 -1
- package/node_modules/openai/resources/vector-stores.js +1 -1
- package/node_modules/openai/resources/vector-stores.mjs +1 -1
- package/node_modules/openai/resources/videos.js +24 -1
- package/node_modules/openai/resources/videos.mjs +24 -1
- package/node_modules/openai/resources/webhooks/event-types.js +21 -0
- package/node_modules/openai/resources/webhooks/event-types.mjs +17 -0
- package/node_modules/openai/resources/webhooks/index.js +4 -1
- package/node_modules/openai/resources/webhooks/index.mjs +2 -1
- package/node_modules/openai/resources/webhooks/webhooks.js +127 -43
- package/node_modules/openai/resources/webhooks/webhooks.mjs +127 -43
- package/node_modules/openai/resources/webhooks.js +1 -1
- package/node_modules/openai/resources/webhooks.mjs +1 -1
- package/node_modules/openai/src/_vendor/partial-json-parser/LICENSE +21 -0
- package/node_modules/openai/src/_vendor/partial-json-parser/README.md +11 -1
- package/node_modules/openai/src/_vendor/partial-json-parser/parser.ts +66 -35
- package/node_modules/openai/src/_vendor/zod-to-json-schema/Options.ts +32 -18
- package/node_modules/openai/src/_vendor/zod-to-json-schema/Refs.ts +7 -6
- package/node_modules/openai/src/_vendor/zod-to-json-schema/errorMessages.ts +5 -3
- package/node_modules/openai/src/_vendor/zod-to-json-schema/index.ts +3 -1
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parseDef.ts +194 -79
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/array.ts +8 -5
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/bigint.ts +20 -12
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/branded.ts +4 -4
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/catch.ts +4 -5
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/date.ts +16 -10
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/default.ts +10 -5
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/effects.ts +4 -3
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/enum.ts +1 -1
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/intersection.ts +12 -9
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/literal.ts +12 -2
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/map.ts +6 -4
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/nativeEnum.ts +10 -11
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/null.ts +4 -3
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/nullable.ts +25 -10
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/number.ts +17 -8
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/object.ts +57 -54
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/optional.ts +25 -17
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/pipeline.ts +8 -6
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/promise.ts +10 -5
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/readonly.ts +4 -5
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/record.ts +22 -19
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/set.ts +6 -4
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/string.ts +62 -37
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/tuple.ts +32 -25
- package/node_modules/openai/src/_vendor/zod-to-json-schema/parsers/union.ts +51 -33
- package/node_modules/openai/src/_vendor/zod-to-json-schema/util.ts +11 -6
- package/node_modules/openai/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts +133 -52
- package/node_modules/openai/src/auth/index.ts +7 -1
- package/node_modules/openai/src/auth/subject-token-providers.ts +281 -16
- package/node_modules/openai/src/auth/types.ts +48 -5
- package/node_modules/openai/src/auth/workload-identity-auth.ts +227 -26
- package/node_modules/openai/src/auth/x509-transport.ts +369 -0
- package/node_modules/openai/src/azure.ts +127 -28
- package/node_modules/openai/src/bedrock.ts +294 -0
- package/node_modules/openai/src/beta/realtime/internal-base.ts +136 -16
- package/node_modules/openai/src/beta/realtime/websocket.ts +264 -48
- package/node_modules/openai/src/beta/realtime/ws.ts +138 -25
- package/node_modules/openai/src/client.ts +975 -124
- package/node_modules/openai/src/core/EventEmitter.ts +162 -26
- package/node_modules/openai/src/core/api-promise.ts +0 -2
- package/node_modules/openai/src/core/error.ts +6 -8
- package/node_modules/openai/src/core/pagination.ts +67 -7
- package/node_modules/openai/src/core/resource.ts +0 -2
- package/node_modules/openai/src/core/streaming.ts +490 -100
- package/node_modules/openai/src/core/uploads.ts +6 -1
- package/node_modules/openai/src/helpers/audio.ts +215 -32
- package/node_modules/openai/src/helpers/live.ts +8 -0
- package/node_modules/openai/src/helpers/standard-schema.ts +819 -0
- package/node_modules/openai/src/helpers/zod-v3-strict-schema.ts +520 -0
- package/node_modules/openai/src/helpers/zod.ts +418 -56
- package/node_modules/openai/src/index.ts +4 -5
- package/node_modules/openai/src/internal/assistant-stream-delta.ts +440 -0
- package/node_modules/openai/src/internal/auth/x509-api-origin.ts +27 -0
- package/node_modules/openai/src/internal/auth/x509-credential-options.ts +149 -0
- package/node_modules/openai/src/internal/auth/x509-token-exchange.ts +319 -0
- package/node_modules/openai/src/internal/auth/x509-transport-capability.ts +227 -0
- package/node_modules/openai/src/internal/auth/x509-transport-registry.ts +127 -0
- package/node_modules/openai/src/internal/auth/x509-transport-state-browser.ts +43 -0
- package/node_modules/openai/src/internal/auth/x509-transport-state.cts +43 -0
- package/node_modules/openai/src/internal/auth/x509-workload-identity-auth.ts +972 -0
- package/node_modules/openai/src/internal/bedrock.ts +586 -0
- package/node_modules/openai/src/internal/builtin-types.ts +0 -2
- package/node_modules/openai/src/internal/data-residency.ts +44 -0
- package/node_modules/openai/src/internal/decoders/line.ts +145 -61
- package/node_modules/openai/src/internal/detect-platform.ts +3 -5
- package/node_modules/openai/src/internal/errors.ts +3 -4
- package/node_modules/openai/src/internal/headers.ts +14 -10
- package/node_modules/openai/src/internal/multipart-encoding.ts +53 -0
- package/node_modules/openai/src/internal/parse.ts +47 -19
- package/node_modules/openai/src/internal/provider.ts +92 -0
- package/node_modules/openai/src/internal/qs/formats.ts +1 -1
- package/node_modules/openai/src/internal/qs/stringify.ts +57 -53
- package/node_modules/openai/src/internal/qs/types.ts +1 -1
- package/node_modules/openai/src/internal/qs/utils.ts +443 -54
- package/node_modules/openai/src/internal/realtime-credentials.ts +27 -0
- package/node_modules/openai/src/internal/request-options.ts +52 -3
- package/node_modules/openai/src/internal/responses/canonical-output-text.ts +160 -0
- package/node_modules/openai/src/internal/responses/output-text-index.ts +84 -0
- package/node_modules/openai/src/internal/responses/response-accumulator.ts +1263 -0
- package/node_modules/openai/src/internal/shim-types.ts +3 -4
- package/node_modules/openai/src/internal/shims.ts +0 -2
- package/node_modules/openai/src/internal/stream-utils.ts +37 -5
- package/node_modules/openai/src/internal/to-file.ts +90 -35
- package/node_modules/openai/src/internal/types.ts +21 -29
- package/node_modules/openai/src/internal/uploads.ts +533 -59
- package/node_modules/openai/src/internal/utils/abort.ts +116 -0
- package/node_modules/openai/src/internal/utils/base64.ts +3 -2
- package/node_modules/openai/src/internal/utils/bytes.ts +7 -0
- package/node_modules/openai/src/internal/utils/env.ts +9 -7
- package/node_modules/openai/src/internal/utils/log.ts +77 -14
- package/node_modules/openai/src/internal/utils/path.ts +53 -32
- package/node_modules/openai/src/internal/utils/query.ts +0 -2
- package/node_modules/openai/src/internal/utils/sleep.ts +51 -2
- package/node_modules/openai/src/internal/utils/uuid.ts +0 -2
- package/node_modules/openai/src/internal/utils/values.ts +0 -2
- package/node_modules/openai/src/internal/utils.ts +0 -2
- package/node_modules/openai/src/internal/ws-adapter-browser.ts +83 -24
- package/node_modules/openai/src/internal/ws-adapter-node.ts +105 -26
- package/node_modules/openai/src/internal/ws-adapter.ts +23 -0
- package/node_modules/openai/src/internal/ws.ts +250 -51
- package/node_modules/openai/src/lib/.keep +2 -2
- package/node_modules/openai/src/lib/AbstractChatCompletionRunner.ts +349 -102
- package/node_modules/openai/src/lib/AssistantStream.ts +537 -268
- package/node_modules/openai/src/lib/ChatCompletionRunner.ts +75 -22
- package/node_modules/openai/src/lib/ChatCompletionStream.ts +2016 -268
- package/node_modules/openai/src/lib/ChatCompletionStreamingRunner.ts +115 -17
- package/node_modules/openai/src/lib/EventEmitter.ts +171 -26
- package/node_modules/openai/src/lib/EventStream.ts +1979 -64
- package/node_modules/openai/src/lib/ResponsesParser.ts +153 -56
- package/node_modules/openai/src/lib/RunnableFunction.ts +99 -37
- package/node_modules/openai/src/lib/Util.ts +7 -5
- package/node_modules/openai/src/lib/agents/agent-session-stream.ts +328 -0
- package/node_modules/openai/src/lib/agents/output-text.ts +6 -0
- package/node_modules/openai/src/lib/agents/turn-state.ts +61 -0
- package/node_modules/openai/src/lib/assistant-run-polling.ts +27 -0
- package/node_modules/openai/src/lib/chatCompletionUtils.ts +9 -10
- package/node_modules/openai/src/lib/embeddings.ts +73 -0
- package/node_modules/openai/src/lib/file-processing.ts +37 -0
- package/node_modules/openai/src/lib/jsonschema.ts +77 -34
- package/node_modules/openai/src/lib/live/transcript-grouper.ts +307 -0
- package/node_modules/openai/src/lib/live/transcript-grouping.ts +394 -0
- package/node_modules/openai/src/lib/live/webrtc.ts +23 -0
- package/node_modules/openai/src/lib/parser.ts +247 -69
- package/node_modules/openai/src/lib/polling.ts +145 -0
- package/node_modules/openai/src/lib/realtime/webrtc.ts +20 -0
- package/node_modules/openai/src/lib/responses/EventTypes.ts +9 -60
- package/node_modules/openai/src/lib/responses/ResponseAccumulator.ts +27 -0
- package/node_modules/openai/src/lib/responses/ResponseInputItems.ts +167 -0
- package/node_modules/openai/src/lib/responses/ResponseStream.ts +135 -179
- package/node_modules/openai/src/lib/responses/responses-websocket-lane.ts +388 -0
- package/node_modules/openai/src/lib/responses/responses-websocket-session.ts +317 -0
- package/node_modules/openai/src/lib/transform.ts +2015 -100
- package/node_modules/openai/src/lib/vector-store-polling.ts +46 -0
- package/node_modules/openai/src/lib/vector-store-upload.ts +57 -0
- package/node_modules/openai/src/lib/webhook-signature.ts +164 -0
- package/node_modules/openai/src/lib/webrtc/connection.ts +313 -0
- package/node_modules/openai/src/lib/webrtc/data-channel.ts +151 -0
- package/node_modules/openai/src/lib/webrtc/errors.ts +38 -0
- package/node_modules/openai/src/lib/webrtc/subscriptions.ts +65 -0
- package/node_modules/openai/src/lib/webrtc/types.ts +110 -0
- package/node_modules/openai/src/live/webrtc.ts +10 -0
- package/node_modules/openai/src/providers/bedrock/aws.ts +331 -0
- package/node_modules/openai/src/providers/bedrock.ts +51 -0
- package/node_modules/openai/src/realtime/internal-base.ts +265 -17
- package/node_modules/openai/src/realtime/webrtc.ts +10 -0
- package/node_modules/openai/src/realtime/websocket.ts +259 -54
- package/node_modules/openai/src/realtime/ws.ts +135 -29
- package/node_modules/openai/src/resources/admin/admin.ts +1 -1
- package/node_modules/openai/src/resources/admin/index.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/admin-api-keys.ts +18 -2
- package/node_modules/openai/src/resources/admin/organization/audit-logs.ts +327 -4
- package/node_modules/openai/src/resources/admin/organization/certificates.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/data-retention.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/groups/groups.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/groups/index.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/groups/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/groups/users.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/groups.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/index.ts +9 -1
- package/node_modules/openai/src/resources/admin/organization/invites.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/organization.ts +21 -1
- package/node_modules/openai/src/resources/admin/organization/projects/api-keys.ts +22 -2
- package/node_modules/openai/src/resources/admin/organization/projects/certificates.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/data-retention.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/groups/groups.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/groups/index.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/groups/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/groups.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/hosted-tool-permissions.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/index.ts +10 -2
- package/node_modules/openai/src/resources/admin/organization/projects/model-permissions.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/projects.ts +70 -19
- package/node_modules/openai/src/resources/admin/organization/projects/rate-limits.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts/api-keys.ts +91 -0
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts/index.ts +15 -0
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts/service-accounts.ts +299 -0
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts.ts +2 -265
- package/node_modules/openai/src/resources/admin/organization/projects/spend-alerts.ts +33 -1
- package/node_modules/openai/src/resources/admin/organization/projects/spend-limit.ts +156 -0
- package/node_modules/openai/src/resources/admin/organization/projects/users/index.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/users/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/users/users.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects/users.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/projects.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/spend-alerts.ts +19 -1
- package/node_modules/openai/src/resources/admin/organization/spend-limit.ts +144 -0
- package/node_modules/openai/src/resources/admin/organization/usage.ts +706 -89
- package/node_modules/openai/src/resources/admin/organization/users/index.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/users/roles.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/users/users.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization/users.ts +1 -1
- package/node_modules/openai/src/resources/admin/organization.ts +1 -1
- package/node_modules/openai/src/resources/admin.ts +1 -1
- package/node_modules/openai/src/resources/audio/audio.ts +4 -1
- package/node_modules/openai/src/resources/audio/index.ts +2 -1
- package/node_modules/openai/src/resources/audio/speech.ts +4 -3
- package/node_modules/openai/src/resources/audio/transcriptions.ts +51 -13
- package/node_modules/openai/src/resources/audio/translations.ts +5 -3
- package/node_modules/openai/src/resources/audio.ts +1 -1
- package/node_modules/openai/src/resources/batches.ts +10 -9
- package/node_modules/openai/src/resources/beta/agents/agents.ts +4627 -0
- package/node_modules/openai/src/resources/beta/agents/environments/environments.ts +111 -0
- package/node_modules/openai/src/resources/beta/agents/environments/files.ts +169 -0
- package/node_modules/openai/src/resources/beta/agents/environments/index.ts +19 -0
- package/node_modules/openai/src/resources/beta/agents/environments/templates.ts +535 -0
- package/node_modules/openai/src/resources/beta/agents/environments.ts +3 -0
- package/node_modules/openai/src/resources/beta/agents/index.ts +127 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/artifacts.ts +249 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/events.ts +94 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/index.ts +24 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/items.ts +59 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/sessions.ts +403 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/index.ts +5 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/items.ts +65 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/subagents.ts +113 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/turns/index.ts +4 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/turns/items.ts +70 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/turns/turns.ts +111 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents/turns.ts +3 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/subagents.ts +3 -0
- package/node_modules/openai/src/resources/beta/agents/sessions/turns.ts +159 -0
- package/node_modules/openai/src/resources/beta/agents/sessions.ts +3 -0
- package/node_modules/openai/src/resources/beta/agents/vaults/credentials.ts +693 -0
- package/node_modules/openai/src/resources/beta/agents/vaults/index.ts +29 -0
- package/node_modules/openai/src/resources/beta/agents/vaults/vaults.ts +243 -0
- package/node_modules/openai/src/resources/beta/agents/vaults.ts +3 -0
- package/node_modules/openai/src/resources/beta/agents.ts +3 -0
- package/node_modules/openai/src/resources/beta/assistants.ts +154 -172
- package/node_modules/openai/src/resources/beta/beta.ts +578 -3
- package/node_modules/openai/src/resources/beta/chatkit/chatkit.ts +1 -1
- package/node_modules/openai/src/resources/beta/chatkit/index.ts +1 -1
- package/node_modules/openai/src/resources/beta/chatkit/sessions.ts +1 -1
- package/node_modules/openai/src/resources/beta/chatkit/threads.ts +1 -1
- package/node_modules/openai/src/resources/beta/chatkit.ts +1 -1
- package/node_modules/openai/src/resources/beta/index.ts +290 -1
- package/node_modules/openai/src/resources/beta/realtime/index.ts +0 -2
- package/node_modules/openai/src/resources/beta/realtime/realtime.ts +0 -2
- package/node_modules/openai/src/resources/beta/realtime/sessions.ts +0 -2
- package/node_modules/openai/src/resources/beta/realtime/transcription-sessions.ts +0 -2
- package/node_modules/openai/src/resources/beta/realtime.ts +0 -2
- package/node_modules/openai/src/resources/beta/responses/index.ts +189 -0
- package/node_modules/openai/src/resources/beta/responses/input-items.ts +105 -0
- package/node_modules/openai/src/resources/beta/responses/input-tokens.ts +249 -0
- package/node_modules/openai/src/resources/beta/responses/internal-base.ts +136 -0
- package/node_modules/openai/src/resources/beta/responses/responses.ts +15060 -0
- package/node_modules/openai/src/resources/beta/responses/ws-base.ts +729 -0
- package/node_modules/openai/src/resources/beta/responses/ws.ts +62 -0
- package/node_modules/openai/src/resources/beta/responses.ts +3 -0
- package/node_modules/openai/src/resources/beta/threads/index.ts +1 -1
- package/node_modules/openai/src/resources/beta/threads/messages.ts +30 -24
- package/node_modules/openai/src/resources/beta/threads/runs/index.ts +2 -2
- package/node_modules/openai/src/resources/beta/threads/runs/runs.ts +47 -93
- package/node_modules/openai/src/resources/beta/threads/runs/steps.ts +15 -16
- package/node_modules/openai/src/resources/beta/threads/runs.ts +1 -1
- package/node_modules/openai/src/resources/beta/threads/threads.ts +54 -51
- package/node_modules/openai/src/resources/beta/threads.ts +1 -1
- package/node_modules/openai/src/resources/beta.ts +1 -1
- package/node_modules/openai/src/resources/chat/chat.ts +1 -1
- package/node_modules/openai/src/resources/chat/completions/completions.ts +762 -108
- package/node_modules/openai/src/resources/chat/completions/index.ts +1 -1
- package/node_modules/openai/src/resources/chat/completions/messages.ts +1 -1
- package/node_modules/openai/src/resources/chat/completions.ts +1 -1
- package/node_modules/openai/src/resources/chat/index.ts +1 -1
- package/node_modules/openai/src/resources/chat.ts +1 -1
- package/node_modules/openai/src/resources/completions.ts +36 -15
- package/node_modules/openai/src/resources/containers/containers.ts +1 -1
- package/node_modules/openai/src/resources/containers/files/content.ts +1 -1
- package/node_modules/openai/src/resources/containers/files/files.ts +1 -1
- package/node_modules/openai/src/resources/containers/files/index.ts +1 -1
- package/node_modules/openai/src/resources/containers/files.ts +1 -1
- package/node_modules/openai/src/resources/containers/index.ts +1 -1
- package/node_modules/openai/src/resources/containers.ts +1 -1
- package/node_modules/openai/src/resources/content-provenance-checks.ts +132 -0
- package/node_modules/openai/src/resources/conversations/conversations.ts +23 -2
- package/node_modules/openai/src/resources/conversations/index.ts +1 -1
- package/node_modules/openai/src/resources/conversations/items.ts +93 -5
- package/node_modules/openai/src/resources/conversations.ts +1 -1
- package/node_modules/openai/src/resources/embeddings.ts +22 -49
- package/node_modules/openai/src/resources/evals/evals.ts +6 -6
- package/node_modules/openai/src/resources/evals/index.ts +1 -1
- package/node_modules/openai/src/resources/evals/runs/index.ts +1 -1
- package/node_modules/openai/src/resources/evals/runs/output-items.ts +1 -1
- package/node_modules/openai/src/resources/evals/runs/runs.ts +119 -191
- package/node_modules/openai/src/resources/evals/runs.ts +1 -1
- package/node_modules/openai/src/resources/evals.ts +1 -1
- package/node_modules/openai/src/resources/files.ts +9 -26
- package/node_modules/openai/src/resources/fine-tuning/alpha/alpha.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/alpha/graders.ts +6 -5
- package/node_modules/openai/src/resources/fine-tuning/alpha/index.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/alpha.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/checkpoints/checkpoints.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/checkpoints/index.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/checkpoints/permissions.ts +9 -5
- package/node_modules/openai/src/resources/fine-tuning/checkpoints.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/fine-tuning.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/index.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/jobs/checkpoints.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/jobs/index.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/jobs/jobs.ts +14 -13
- package/node_modules/openai/src/resources/fine-tuning/jobs.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning/methods.ts +1 -1
- package/node_modules/openai/src/resources/fine-tuning.ts +1 -1
- package/node_modules/openai/src/resources/graders/grader-models.ts +7 -14
- package/node_modules/openai/src/resources/graders/graders.ts +1 -1
- package/node_modules/openai/src/resources/graders/index.ts +1 -1
- package/node_modules/openai/src/resources/graders.ts +1 -1
- package/node_modules/openai/src/resources/images.ts +100 -85
- package/node_modules/openai/src/resources/index.ts +9 -2
- package/node_modules/openai/src/resources/live/api.md +87 -0
- package/node_modules/openai/src/resources/live/forks/forks.ts +169 -0
- package/node_modules/openai/src/resources/live/forks/index.ts +5 -0
- package/node_modules/openai/src/resources/live/forks/internal-base.ts +126 -0
- package/node_modules/openai/src/resources/live/forks/ws-base.ts +700 -0
- package/node_modules/openai/src/resources/live/forks/ws.ts +47 -0
- package/node_modules/openai/src/resources/live/forks.ts +3 -0
- package/node_modules/openai/src/resources/live/index.ts +20 -0
- package/node_modules/openai/src/resources/live/internal-base.ts +123 -0
- package/node_modules/openai/src/resources/live/live.ts +2296 -0
- package/node_modules/openai/src/resources/live/sessions.ts +343 -0
- package/node_modules/openai/src/resources/live/sideband/index.ts +10 -0
- package/node_modules/openai/src/resources/live/sideband/internal-base.ts +126 -0
- package/node_modules/openai/src/resources/live/sideband/sideband.ts +58 -0
- package/node_modules/openai/src/resources/live/sideband/ws-base.ts +710 -0
- package/node_modules/openai/src/resources/live/sideband/ws.ts +47 -0
- package/node_modules/openai/src/resources/live/sideband.ts +3 -0
- package/node_modules/openai/src/resources/live/ws-base.ts +696 -0
- package/node_modules/openai/src/resources/live/ws.ts +43 -0
- package/node_modules/openai/src/resources/live.ts +3 -0
- package/node_modules/openai/src/resources/models.ts +6 -1
- package/node_modules/openai/src/resources/moderations.ts +6 -5
- package/node_modules/openai/src/resources/realtime/api.md +1 -0
- package/node_modules/openai/src/resources/realtime/calls.ts +50 -2
- package/node_modules/openai/src/resources/realtime/client-secrets.ts +27 -10
- package/node_modules/openai/src/resources/realtime/index.ts +8 -2
- package/node_modules/openai/src/resources/realtime/realtime.ts +93 -35
- package/node_modules/openai/src/resources/realtime.ts +1 -1
- package/node_modules/openai/src/resources/responses/api.md +20 -0
- package/node_modules/openai/src/resources/responses/index.ts +1 -1
- package/node_modules/openai/src/resources/responses/input-items.ts +1 -1
- package/node_modules/openai/src/resources/responses/input-tokens.ts +26 -16
- package/node_modules/openai/src/resources/responses/internal-base.ts +33 -14
- package/node_modules/openai/src/resources/responses/responses.ts +4150 -792
- package/node_modules/openai/src/resources/responses/ws-base.ts +147 -31
- package/node_modules/openai/src/resources/responses/ws.ts +33 -9
- package/node_modules/openai/src/resources/responses.ts +1 -1
- package/node_modules/openai/src/resources/safety/alerts.ts +51 -0
- package/node_modules/openai/src/resources/safety/index.ts +4 -0
- package/node_modules/openai/src/resources/safety/safety.ts +15 -0
- package/node_modules/openai/src/resources/safety.ts +3 -0
- package/node_modules/openai/src/resources/shared.ts +98 -41
- package/node_modules/openai/src/resources/skills/content.ts +1 -1
- package/node_modules/openai/src/resources/skills/index.ts +1 -1
- package/node_modules/openai/src/resources/skills/skills.ts +4 -2
- package/node_modules/openai/src/resources/skills/versions/content.ts +1 -1
- package/node_modules/openai/src/resources/skills/versions/index.ts +1 -1
- package/node_modules/openai/src/resources/skills/versions/versions.ts +4 -2
- package/node_modules/openai/src/resources/skills/versions.ts +1 -1
- package/node_modules/openai/src/resources/skills.ts +1 -1
- package/node_modules/openai/src/resources/uploads/index.ts +1 -1
- package/node_modules/openai/src/resources/uploads/parts.ts +6 -5
- package/node_modules/openai/src/resources/uploads/uploads.ts +12 -12
- package/node_modules/openai/src/resources/uploads.ts +1 -1
- package/node_modules/openai/src/resources/vector-stores/file-batches.ts +24 -89
- package/node_modules/openai/src/resources/vector-stores/files.ts +12 -52
- package/node_modules/openai/src/resources/vector-stores/index.ts +1 -1
- package/node_modules/openai/src/resources/vector-stores/vector-stores.ts +4 -4
- package/node_modules/openai/src/resources/vector-stores.ts +1 -1
- package/node_modules/openai/src/resources/videos.ts +63 -2
- package/node_modules/openai/src/resources/webhooks/api.md +40 -17
- package/node_modules/openai/src/resources/webhooks/event-types.ts +21 -0
- package/node_modules/openai/src/resources/webhooks/index.ts +2 -1
- package/node_modules/openai/src/resources/webhooks/webhooks.ts +694 -69
- package/node_modules/openai/src/resources/webhooks.ts +1 -1
- package/node_modules/openai/src/tsconfig.json +6 -3
- package/node_modules/openai/src/version.ts +2 -1
- package/node_modules/openai/version.js +2 -1
- package/node_modules/openai/version.mjs +2 -1
- package/package.json +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +0 -832
- package/node_modules/@earendil-works/pi-ai/dist/images-models.js +0 -143
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.js +0 -22
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/LICENSE +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/README.md +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/constants.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/index.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +0 -0
- /package/node_modules/@aws-sdk/{credential-provider-sso → client-bedrock-runtime}/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +0 -0
- /package/node_modules/@earendil-works/pi-ai/dist/{auth/oauth → utils}/oauth-page.js +0 -0
|
@@ -1,37 +1,69 @@
|
|
|
1
1
|
import { OpenAIError } from '../error';
|
|
2
2
|
import type { ChatCompletionTool } from '../resources/chat/completions';
|
|
3
|
-
import {
|
|
3
|
+
import type {
|
|
4
|
+
FunctionTool,
|
|
5
|
+
NamespaceTool,
|
|
6
|
+
ParsedContent,
|
|
7
|
+
ParsedResponse,
|
|
8
|
+
ParsedResponseFunctionToolCall,
|
|
9
|
+
ParsedResponseOutputItem,
|
|
10
|
+
Response,
|
|
11
|
+
ResponseCreateParamsBase,
|
|
12
|
+
ResponseCreateParamsNonStreaming,
|
|
13
|
+
ResponseFormatTextJSONSchemaConfig,
|
|
14
|
+
ResponseFunctionToolCall,
|
|
4
15
|
ResponseTextConfig,
|
|
5
|
-
|
|
6
|
-
type ParsedContent,
|
|
7
|
-
type ParsedResponse,
|
|
8
|
-
type ParsedResponseFunctionToolCall,
|
|
9
|
-
type ParsedResponseOutputItem,
|
|
10
|
-
type Response,
|
|
11
|
-
type ResponseCreateParamsBase,
|
|
12
|
-
type ResponseCreateParamsNonStreaming,
|
|
13
|
-
type ResponseFunctionToolCall,
|
|
14
|
-
type Tool,
|
|
16
|
+
Tool,
|
|
15
17
|
} from '../resources/responses/responses';
|
|
16
|
-
import {
|
|
18
|
+
import { isParseableResponseFormat, parseResponseFormatContent } from '../lib/parser';
|
|
19
|
+
import type { AutoParseableTextFormat } from '../lib/parser';
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
/** Response tools, a compatible chat completion tool, or no tools. */
|
|
22
|
+
export type ParseableToolsParams = Tool[] | ChatCompletionTool | null;
|
|
19
23
|
|
|
24
|
+
/** Response-creation parameters that may include tools recognized by parsing helpers. */
|
|
20
25
|
export type ResponseCreateParamsWithTools = ResponseCreateParamsBase & {
|
|
26
|
+
/** Tools available to the model while producing the response. */
|
|
21
27
|
tools?: ParseableToolsParams;
|
|
22
28
|
};
|
|
23
29
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
/** Request fields that can select a plain-text or structured Responses API output format. */
|
|
31
|
+
type TextConfigParams = {
|
|
32
|
+
/** Optional text output configuration, including its structured JSON format. */
|
|
33
|
+
text?: ResponseTextConfig;
|
|
34
|
+
};
|
|
28
35
|
|
|
36
|
+
/** Infers parsed output for each member of a possibly optional text-format union. */
|
|
37
|
+
type ParsedTextFormat<Format> = [Format] extends [never]
|
|
38
|
+
? null
|
|
39
|
+
: Format extends AutoParseableTextFormat<infer ParsedT>
|
|
40
|
+
? ParsedT
|
|
41
|
+
: Format extends ResponseFormatTextJSONSchemaConfig
|
|
42
|
+
? unknown
|
|
43
|
+
: null;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Resolves the type of `output_parsed` / `content[].parsed` for the given params.
|
|
47
|
+
*
|
|
48
|
+
* This must stay in sync with `isParseableResponseFormat()` and
|
|
49
|
+
* `parseResponseFormatContent()`: formats built by an SDK helper carry their parsed
|
|
50
|
+
* type in the brand, while a raw `{ type: 'json_schema' }` format is parsed with
|
|
51
|
+
* `JSON.parse()` and so can only be described as `unknown`.
|
|
52
|
+
*/
|
|
53
|
+
export type ExtractParsedContentFromParams<Params extends TextConfigParams> = ParsedTextFormat<
|
|
54
|
+
NonNullable<Params['text']>['format']
|
|
55
|
+
>;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Adds parsed-output fields to a response, invoking parsers only when its request
|
|
59
|
+
* includes an auto-parseable text format or strict function tool.
|
|
60
|
+
*/
|
|
29
61
|
export function maybeParseResponse<
|
|
30
62
|
Params extends ResponseCreateParamsBase | null,
|
|
31
63
|
ParsedT = Params extends null ? null : ExtractParsedContentFromParams<NonNullable<Params>>,
|
|
32
64
|
>(response: Response, params: Params): ParsedResponse<ParsedT> {
|
|
33
65
|
if (!params || !hasAutoParseableInput(params)) {
|
|
34
|
-
|
|
66
|
+
const parsed = {
|
|
35
67
|
...response,
|
|
36
68
|
output_parsed: null,
|
|
37
69
|
output: response.output.map((item) => {
|
|
@@ -50,34 +82,45 @@ export function maybeParseResponse<
|
|
|
50
82
|
parsed: null,
|
|
51
83
|
})),
|
|
52
84
|
};
|
|
53
|
-
} else {
|
|
54
|
-
return item;
|
|
55
85
|
}
|
|
86
|
+
return item;
|
|
56
87
|
}),
|
|
57
88
|
};
|
|
89
|
+
|
|
90
|
+
if (needsOutputText(response, parsed)) {
|
|
91
|
+
// SAFETY: The copy retains every response field and only adds parsed metadata; addOutputText accepts that original response structure.
|
|
92
|
+
addOutputText(parsed as Response);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return parsed;
|
|
58
96
|
}
|
|
59
97
|
|
|
60
98
|
return parseResponse(response, params);
|
|
61
99
|
}
|
|
62
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Parses completed response text and strict function-tool arguments, matching
|
|
103
|
+
* namespaced functions by both namespace and name.
|
|
104
|
+
*
|
|
105
|
+
* Incomplete or nonterminal responses keep their parsed values as `null`, and
|
|
106
|
+
* `output_parsed` returns the first successfully parsed output-text item.
|
|
107
|
+
*/
|
|
63
108
|
export function parseResponse<
|
|
64
109
|
Params extends ResponseCreateParamsBase,
|
|
65
110
|
ParsedT = ExtractParsedContentFromParams<Params>,
|
|
66
111
|
>(response: Response, params: Params): ParsedResponse<ParsedT> {
|
|
67
|
-
const
|
|
112
|
+
const shouldParse = !response.status || response.status === 'completed';
|
|
113
|
+
const output: ParsedResponseOutputItem<ParsedT>[] = response.output.map(
|
|
68
114
|
(item): ParsedResponseOutputItem<ParsedT> => {
|
|
69
115
|
if (item.type === 'function_call') {
|
|
70
|
-
return {
|
|
71
|
-
...item,
|
|
72
|
-
parsed_arguments: parseToolCall(params, item),
|
|
73
|
-
};
|
|
116
|
+
return shouldParse ? parseToolCall(params, item) : { ...item, parsed_arguments: null };
|
|
74
117
|
}
|
|
75
118
|
if (item.type === 'message') {
|
|
76
|
-
const content:
|
|
119
|
+
const content: ParsedContent<ParsedT>[] = item.content.map((content) => {
|
|
77
120
|
if (content.type === 'output_text') {
|
|
78
121
|
return {
|
|
79
122
|
...content,
|
|
80
|
-
parsed: parseTextFormat(params, content.text),
|
|
123
|
+
parsed: shouldParse ? parseTextFormat(params, content.text) : null,
|
|
81
124
|
};
|
|
82
125
|
}
|
|
83
126
|
|
|
@@ -94,8 +137,8 @@ export function parseResponse<
|
|
|
94
137
|
},
|
|
95
138
|
);
|
|
96
139
|
|
|
97
|
-
const parsed: Omit<ParsedResponse<ParsedT>, 'output_parsed'> =
|
|
98
|
-
if (
|
|
140
|
+
const parsed: Omit<ParsedResponse<ParsedT>, 'output_parsed'> = { ...response, output };
|
|
141
|
+
if (needsOutputText(response, parsed)) {
|
|
99
142
|
addOutputText(parsed);
|
|
100
143
|
}
|
|
101
144
|
|
|
@@ -118,6 +161,7 @@ export function parseResponse<
|
|
|
118
161
|
},
|
|
119
162
|
});
|
|
120
163
|
|
|
164
|
+
// SAFETY: The output_parsed getter was installed immediately above and returns the first parsed content or null.
|
|
121
165
|
return parsed as ParsedResponse<ParsedT>;
|
|
122
166
|
}
|
|
123
167
|
|
|
@@ -125,54 +169,71 @@ function parseTextFormat<
|
|
|
125
169
|
Params extends ResponseCreateParamsBase,
|
|
126
170
|
ParsedT = ExtractParsedContentFromParams<Params>,
|
|
127
171
|
>(params: Params, content: string): ParsedT | null {
|
|
128
|
-
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if ('$parseRaw' in params.text?.format) {
|
|
133
|
-
const text_format = params.text?.format as unknown as AutoParseableTextFormat<ParsedT>;
|
|
134
|
-
return text_format.$parseRaw(content);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return JSON.parse(content);
|
|
172
|
+
return parseResponseFormatContent<ParsedT>(params.text?.format, content);
|
|
138
173
|
}
|
|
139
174
|
|
|
175
|
+
/** Returns whether the request includes an auto-parseable text format or strict function tool. */
|
|
140
176
|
export function hasAutoParseableInput(params: ResponseCreateParamsWithTools): boolean {
|
|
141
|
-
if (
|
|
177
|
+
if (isParseableResponseFormat(params.text?.format)) {
|
|
142
178
|
return true;
|
|
143
179
|
}
|
|
144
180
|
|
|
145
|
-
return
|
|
181
|
+
return (
|
|
182
|
+
Array.isArray(params.tools) &&
|
|
183
|
+
params.tools.some(
|
|
184
|
+
(tool) =>
|
|
185
|
+
isAutoParsableTool(tool) ||
|
|
186
|
+
(tool.type === 'function' && tool.strict === true) ||
|
|
187
|
+
(tool.type === 'namespace' &&
|
|
188
|
+
tool.tools.some(
|
|
189
|
+
(nested) => nested.type === 'function' && (isAutoParsableTool(nested) || nested.strict === true),
|
|
190
|
+
)),
|
|
191
|
+
)
|
|
192
|
+
);
|
|
146
193
|
}
|
|
147
194
|
|
|
195
|
+
/** Type-level details used to infer a Responses API function tool's parser and callback. */
|
|
148
196
|
type ToolOptions = {
|
|
197
|
+
/** Model-visible function name used to match generated tool calls. */
|
|
149
198
|
name: string;
|
|
199
|
+
/** Parsed argument value accepted by the optional execution callback. */
|
|
150
200
|
arguments: any;
|
|
201
|
+
/** Optional callback metadata associated with the parsed function tool. */
|
|
151
202
|
function?: ((args: any) => any) | undefined;
|
|
152
203
|
};
|
|
153
204
|
|
|
205
|
+
/** A Responses API function tool with an argument parser and optional executable callback. */
|
|
154
206
|
export type AutoParseableResponseTool<
|
|
155
207
|
OptionsT extends ToolOptions,
|
|
156
|
-
|
|
208
|
+
// oxlint-disable-next-line anti-slop/no-unknown-returns -- This public conditional type detects any callable callback without constraining its return type.
|
|
209
|
+
HasFunction = OptionsT['function'] extends (...args: never[]) => unknown ? true : false,
|
|
157
210
|
> = FunctionTool & {
|
|
211
|
+
/** Type-only marker for parsed tool arguments; this property does not exist at runtime. */
|
|
158
212
|
__arguments: OptionsT['arguments']; // type-level only
|
|
213
|
+
/** Type-only marker for the function name; this property does not exist at runtime. */
|
|
159
214
|
__name: OptionsT['name']; // type-level only
|
|
160
215
|
|
|
216
|
+
/** Non-enumerable SDK marker identifying a tool with an attached argument parser. */
|
|
161
217
|
$brand: 'auto-parseable-tool';
|
|
218
|
+
/** Optional callback available to helpers that execute parsed function tools. */
|
|
162
219
|
$callback: ((args: OptionsT['arguments']) => any) | undefined;
|
|
220
|
+
/** Parses the raw JSON argument string into the function's typed argument value. */
|
|
163
221
|
$parseRaw(args: string): OptionsT['arguments'];
|
|
164
222
|
};
|
|
165
223
|
|
|
224
|
+
/** Copies a Responses API function tool and attaches non-enumerable parser and callback metadata. */
|
|
166
225
|
export function makeParseableResponseTool<OptionsT extends ToolOptions>(
|
|
167
226
|
tool: FunctionTool,
|
|
168
227
|
{
|
|
169
228
|
parser,
|
|
170
229
|
callback,
|
|
171
230
|
}: {
|
|
231
|
+
/** Converts the raw JSON argument string into the function's typed argument value. */
|
|
172
232
|
parser: (content: string) => OptionsT['arguments'];
|
|
173
|
-
callback
|
|
233
|
+
/** Optional callback available to helpers that execute the parsed function. */
|
|
234
|
+
callback: ((args: OptionsT['arguments']) => any) | undefined;
|
|
174
235
|
},
|
|
175
|
-
): AutoParseableResponseTool<OptionsT
|
|
236
|
+
): AutoParseableResponseTool<OptionsT> {
|
|
176
237
|
const obj = { ...tool };
|
|
177
238
|
|
|
178
239
|
Object.defineProperties(obj, {
|
|
@@ -190,35 +251,58 @@ export function makeParseableResponseTool<OptionsT extends ToolOptions>(
|
|
|
190
251
|
},
|
|
191
252
|
});
|
|
192
253
|
|
|
193
|
-
|
|
254
|
+
// SAFETY: The non-enumerable parser brand and callbacks were installed on this copied tool immediately above.
|
|
255
|
+
return obj as AutoParseableResponseTool<OptionsT>;
|
|
194
256
|
}
|
|
195
257
|
|
|
258
|
+
/** Returns whether a Responses API tool carries the SDK's argument-parser marker. */
|
|
196
259
|
export function isAutoParsableTool(tool: any): tool is AutoParseableResponseTool<any> {
|
|
197
260
|
return tool?.['$brand'] === 'auto-parseable-tool';
|
|
198
261
|
}
|
|
199
262
|
|
|
200
|
-
function getInputToolByName(
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
263
|
+
function getInputToolByName(
|
|
264
|
+
input_tools: Tool[],
|
|
265
|
+
name: string,
|
|
266
|
+
namespace?: string,
|
|
267
|
+
): FunctionTool | NamespaceTool.Function | undefined {
|
|
268
|
+
for (const tool of input_tools) {
|
|
269
|
+
if (namespace == null) {
|
|
270
|
+
if (tool.type === 'function' && tool.name === name) {
|
|
271
|
+
return tool;
|
|
272
|
+
}
|
|
273
|
+
} else if (tool.type === 'namespace' && tool.name === namespace) {
|
|
274
|
+
return tool.tools.find(
|
|
275
|
+
(nested): nested is NamespaceTool.Function => nested.type === 'function' && nested.name === name,
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return undefined;
|
|
204
280
|
}
|
|
205
281
|
|
|
206
282
|
function parseToolCall<Params extends ResponseCreateParamsBase>(
|
|
207
283
|
params: Params,
|
|
208
284
|
toolCall: ResponseFunctionToolCall,
|
|
209
285
|
): ParsedResponseFunctionToolCall {
|
|
210
|
-
const inputTool = getInputToolByName(params.tools ?? [], toolCall.name);
|
|
286
|
+
const inputTool = getInputToolByName(params.tools ?? [], toolCall.name, toolCall.namespace);
|
|
287
|
+
|
|
288
|
+
// oxlint-disable-next-line anti-slop/no-known-value-widening -- Parsing replaces the initial null with an arbitrary caller-parser result, so unknown is required.
|
|
289
|
+
let parsedArguments: unknown = null;
|
|
290
|
+
if (isAutoParsableTool(inputTool)) {
|
|
291
|
+
parsedArguments = inputTool.$parseRaw(toolCall.arguments);
|
|
292
|
+
} else if (inputTool?.strict) {
|
|
293
|
+
parsedArguments = parseResponseFormatContent(
|
|
294
|
+
{ type: 'json_schema', $parseRaw: undefined },
|
|
295
|
+
toolCall.arguments,
|
|
296
|
+
);
|
|
297
|
+
}
|
|
211
298
|
|
|
212
299
|
return {
|
|
213
300
|
...toolCall,
|
|
214
|
-
|
|
215
|
-
parsed_arguments:
|
|
216
|
-
isAutoParsableTool(inputTool) ? inputTool.$parseRaw(toolCall.arguments)
|
|
217
|
-
: inputTool?.strict ? JSON.parse(toolCall.arguments)
|
|
218
|
-
: null,
|
|
301
|
+
parsed_arguments: parsedArguments,
|
|
219
302
|
};
|
|
220
303
|
}
|
|
221
304
|
|
|
305
|
+
/** Matches a response function call to a strict or auto-parseable tool by namespace and name. */
|
|
222
306
|
export function shouldParseToolCall(
|
|
223
307
|
params: ResponseCreateParamsNonStreaming | null | undefined,
|
|
224
308
|
toolCall: ResponseFunctionToolCall,
|
|
@@ -227,10 +311,15 @@ export function shouldParseToolCall(
|
|
|
227
311
|
return false;
|
|
228
312
|
}
|
|
229
313
|
|
|
230
|
-
const inputTool = getInputToolByName(params.tools ?? [], toolCall.name);
|
|
314
|
+
const inputTool = getInputToolByName(params.tools ?? [], toolCall.name, toolCall.namespace);
|
|
231
315
|
return isAutoParsableTool(inputTool) || inputTool?.strict || false;
|
|
232
316
|
}
|
|
233
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Validates that compatible chat completion tools can be automatically parsed.
|
|
320
|
+
*
|
|
321
|
+
* @throws {OpenAIError} If a tool is not a function or is missing `strict: true`.
|
|
322
|
+
*/
|
|
234
323
|
export function validateInputTools(tools: ChatCompletionTool[] | undefined) {
|
|
235
324
|
for (const tool of tools ?? []) {
|
|
236
325
|
if (tool.type !== 'function') {
|
|
@@ -247,6 +336,14 @@ export function validateInputTools(tools: ChatCompletionTool[] | undefined) {
|
|
|
247
336
|
}
|
|
248
337
|
}
|
|
249
338
|
|
|
339
|
+
function needsOutputText(
|
|
340
|
+
response: Response,
|
|
341
|
+
target: { output_text?: Response['output_text'] | null },
|
|
342
|
+
): boolean {
|
|
343
|
+
return !Object.getOwnPropertyDescriptor(response, 'output_text') || target.output_text == null;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/** Replaces `output_text` with the concatenated text from every response output message. */
|
|
250
347
|
export function addOutputText(rsp: Response): void {
|
|
251
348
|
const texts: string[] = [];
|
|
252
349
|
for (const output of rsp.output) {
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { JSONSchema } from './jsonschema';
|
|
1
|
+
import type { ChatCompletionRunner } from './ChatCompletionRunner';
|
|
2
|
+
import type { ChatCompletionStreamingRunner } from './ChatCompletionStreamingRunner';
|
|
3
|
+
import type { JSONSchema } from './jsonschema';
|
|
4
4
|
|
|
5
|
+
/** A synchronous callback result or a promise that resolves to the same result. */
|
|
5
6
|
type PromiseOrValue<T> = T | Promise<T>;
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
/** A function tool that parses raw JSON arguments before invoking its callback. */
|
|
9
|
+
export type RunnableFunctionWithParse<Args extends object, ToolContext = unknown> = {
|
|
8
10
|
/**
|
|
9
11
|
* @param args the return value from `parse`.
|
|
10
12
|
* @param runner the runner evaluating this callback.
|
|
11
|
-
* @
|
|
13
|
+
* @param toolContext the context passed to `.runTools()`.
|
|
14
|
+
* @returns A value that the runner serializes into a tool-result message.
|
|
12
15
|
*/
|
|
13
16
|
function: (
|
|
14
17
|
args: Args,
|
|
15
18
|
runner: ChatCompletionRunner<unknown> | ChatCompletionStreamingRunner<unknown>,
|
|
19
|
+
toolContext: ToolContext,
|
|
20
|
+
// oxlint-disable-next-line anti-slop/no-unknown-returns -- Public tool callbacks may return arbitrary application values; preserve the published callback contract.
|
|
16
21
|
) => PromiseOrValue<unknown>;
|
|
17
22
|
/**
|
|
18
23
|
* @param input the raw args from the OpenAI function call.
|
|
@@ -20,7 +25,7 @@ export type RunnableFunctionWithParse<Args extends object> = {
|
|
|
20
25
|
*/
|
|
21
26
|
parse: (input: string) => PromiseOrValue<Args>;
|
|
22
27
|
/**
|
|
23
|
-
* The parameters the function accepts,
|
|
28
|
+
* The parameters the function accepts, described as a JSON Schema object.
|
|
24
29
|
*/
|
|
25
30
|
parameters: JSONSchema;
|
|
26
31
|
/**
|
|
@@ -31,20 +36,26 @@ export type RunnableFunctionWithParse<Args extends object> = {
|
|
|
31
36
|
* The name of the function to be called. Will default to function.name if omitted.
|
|
32
37
|
*/
|
|
33
38
|
name?: string | undefined;
|
|
39
|
+
/** Whether the tool's parameters use strict Structured Outputs validation. */
|
|
34
40
|
strict?: boolean | undefined;
|
|
35
41
|
};
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
/** A function tool whose callback receives the model's raw JSON argument string. */
|
|
44
|
+
export type RunnableFunctionWithoutParse<ToolContext = unknown> = {
|
|
38
45
|
/**
|
|
39
46
|
* @param args the raw args from the OpenAI function call.
|
|
40
|
-
* @
|
|
47
|
+
* @param runner the runner evaluating this callback.
|
|
48
|
+
* @param toolContext the context passed to `.runTools()`.
|
|
49
|
+
* @returns A value that the runner serializes into a tool-result message.
|
|
41
50
|
*/
|
|
42
51
|
function: (
|
|
43
52
|
args: string,
|
|
44
53
|
runner: ChatCompletionRunner<unknown> | ChatCompletionStreamingRunner<unknown>,
|
|
54
|
+
toolContext: ToolContext,
|
|
55
|
+
// oxlint-disable-next-line anti-slop/no-unknown-returns -- Public tool callbacks may return arbitrary application values; preserve the published callback contract.
|
|
45
56
|
) => PromiseOrValue<unknown>;
|
|
46
57
|
/**
|
|
47
|
-
* The parameters the function accepts,
|
|
58
|
+
* The parameters the function accepts, described as a JSON Schema object.
|
|
48
59
|
*/
|
|
49
60
|
parameters: JSONSchema;
|
|
50
61
|
/**
|
|
@@ -55,60 +66,111 @@ export type RunnableFunctionWithoutParse = {
|
|
|
55
66
|
* The name of the function to be called. Will default to function.name if omitted.
|
|
56
67
|
*/
|
|
57
68
|
name?: string | undefined;
|
|
69
|
+
/** Whether the tool's parameters use strict Structured Outputs validation. */
|
|
58
70
|
strict?: boolean | undefined;
|
|
59
71
|
};
|
|
60
72
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
:
|
|
73
|
+
/** Selects a raw-argument or parsed-argument runnable function from its argument type. */
|
|
74
|
+
export type RunnableFunction<Args extends object | string, ToolContext = unknown> = Args extends string
|
|
75
|
+
? RunnableFunctionWithoutParse<ToolContext>
|
|
76
|
+
: Args extends object
|
|
77
|
+
? RunnableFunctionWithParse<Args, ToolContext>
|
|
78
|
+
: never;
|
|
65
79
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
:
|
|
80
|
+
/** Wraps a raw-argument or parsed-argument runnable function in an API function-tool shape. */
|
|
81
|
+
export type RunnableToolFunction<Args extends object | string, ToolContext = unknown> = Args extends string
|
|
82
|
+
? RunnableToolFunctionWithoutParse<ToolContext>
|
|
83
|
+
: Args extends object
|
|
84
|
+
? RunnableToolFunctionWithParse<Args, ToolContext>
|
|
85
|
+
: never;
|
|
70
86
|
|
|
71
|
-
|
|
87
|
+
/** An executable API function tool whose callback receives raw JSON arguments. */
|
|
88
|
+
export type RunnableToolFunctionWithoutParse<ToolContext = unknown> = {
|
|
89
|
+
/** Identifies this tool as a callable function. */
|
|
72
90
|
type: 'function';
|
|
73
|
-
function
|
|
91
|
+
/** The function definition, callback, and raw-argument configuration. */
|
|
92
|
+
function: RunnableFunctionWithoutParse<ToolContext>;
|
|
74
93
|
};
|
|
75
|
-
|
|
94
|
+
/** An executable API function tool whose callback receives parsed arguments. */
|
|
95
|
+
export type RunnableToolFunctionWithParse<Args extends object, ToolContext = unknown> = {
|
|
96
|
+
/** Identifies this tool as a callable function. */
|
|
76
97
|
type: 'function';
|
|
77
|
-
function
|
|
98
|
+
/** The function definition, argument parser, and callback. */
|
|
99
|
+
function: RunnableFunctionWithParse<Args, ToolContext>;
|
|
78
100
|
};
|
|
79
101
|
|
|
80
|
-
|
|
102
|
+
/**
|
|
103
|
+
* A broad tool shape for contextually typing callbacks when the argument type is inferred.
|
|
104
|
+
*/
|
|
105
|
+
export type RunnableToolFunctionWithContext<ToolContext> = {
|
|
106
|
+
/** Identifies this tool as a callable function. */
|
|
107
|
+
type: 'function';
|
|
108
|
+
/** The function definition whose callback receives the runner's context value. */
|
|
109
|
+
function: {
|
|
110
|
+
/** Invokes the tool with its arguments, active runner, and supplied context. */
|
|
111
|
+
function: (
|
|
112
|
+
args: any,
|
|
113
|
+
runner: ChatCompletionRunner<unknown> | ChatCompletionStreamingRunner<unknown>,
|
|
114
|
+
toolContext: ToolContext,
|
|
115
|
+
// oxlint-disable-next-line anti-slop/no-unknown-returns -- Public tool callbacks may return arbitrary application values; preserve the published callback contract.
|
|
116
|
+
) => PromiseOrValue<unknown>;
|
|
117
|
+
/** Optionally converts raw JSON arguments into the callback's argument value. */
|
|
118
|
+
parse?: (input: string) => PromiseOrValue<any>;
|
|
119
|
+
/** JSON Schema describing the arguments accepted by the function. */
|
|
120
|
+
parameters: JSONSchema;
|
|
121
|
+
/** Model-facing explanation of what the function does and when to call it. */
|
|
122
|
+
description: string;
|
|
123
|
+
/** Explicit function name; defaults to the JavaScript callback's name. */
|
|
124
|
+
name?: string | undefined;
|
|
125
|
+
/** Whether the tool's parameters use strict Structured Outputs validation. */
|
|
126
|
+
strict?: boolean | undefined;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/** Returns whether a runnable function provides a parser for its raw argument string. */
|
|
131
|
+
export function isRunnableFunctionWithParse<Args extends object, ToolContext = unknown>(
|
|
81
132
|
fn: any,
|
|
82
|
-
): fn is RunnableFunctionWithParse<Args> {
|
|
83
|
-
return typeof
|
|
133
|
+
): fn is RunnableFunctionWithParse<Args, ToolContext> {
|
|
134
|
+
return typeof fn.parse === 'function';
|
|
84
135
|
}
|
|
85
136
|
|
|
137
|
+
/** The ordered raw-string or parsed-object argument types accepted by runnable functions. */
|
|
86
138
|
export type BaseFunctionsArgs = readonly (object | string)[];
|
|
87
139
|
|
|
88
|
-
|
|
89
|
-
|
|
140
|
+
/** Runnable function definitions whose callback arguments correspond to an argument-type tuple. */
|
|
141
|
+
export type RunnableFunctions<FunctionsArgs extends BaseFunctionsArgs, ToolContext = unknown> = [
|
|
142
|
+
any[],
|
|
143
|
+
] extends [FunctionsArgs]
|
|
144
|
+
? readonly RunnableFunction<any, ToolContext>[]
|
|
90
145
|
: {
|
|
91
|
-
[Index in keyof FunctionsArgs]: Index extends
|
|
92
|
-
|
|
146
|
+
[Index in keyof FunctionsArgs]: FunctionsArgs[Index] extends object | string
|
|
147
|
+
? RunnableFunction<FunctionsArgs[Index], ToolContext>
|
|
148
|
+
: FunctionsArgs[Index];
|
|
93
149
|
};
|
|
94
150
|
|
|
95
|
-
|
|
96
|
-
|
|
151
|
+
/** Runnable function tools whose callback arguments correspond to an argument-type tuple. */
|
|
152
|
+
export type RunnableTools<FunctionsArgs extends BaseFunctionsArgs, ToolContext = unknown> = [any[]] extends [
|
|
153
|
+
FunctionsArgs,
|
|
154
|
+
]
|
|
155
|
+
? readonly RunnableToolFunction<any, ToolContext>[]
|
|
97
156
|
: {
|
|
98
|
-
[Index in keyof FunctionsArgs]: Index extends
|
|
99
|
-
|
|
157
|
+
[Index in keyof FunctionsArgs]: FunctionsArgs[Index] extends object | string
|
|
158
|
+
? RunnableToolFunction<FunctionsArgs[Index], ToolContext>
|
|
159
|
+
: FunctionsArgs[Index];
|
|
100
160
|
};
|
|
101
161
|
|
|
102
162
|
/**
|
|
103
163
|
* This is helper class for passing a `function` and `parse` where the `function`
|
|
104
164
|
* argument type matches the `parse` return type.
|
|
105
165
|
*/
|
|
106
|
-
export class ParsingToolFunction<Args extends object> {
|
|
107
|
-
|
|
108
|
-
function
|
|
166
|
+
export class ParsingToolFunction<Args extends object, ToolContext = unknown> {
|
|
167
|
+
/** Identifies the wrapped tool as a callable function. */
|
|
168
|
+
type = 'function' as const;
|
|
169
|
+
/** The wrapped function definition, argument parser, and callback. */
|
|
170
|
+
function: RunnableFunctionWithParse<Args, ToolContext>;
|
|
109
171
|
|
|
110
|
-
|
|
111
|
-
|
|
172
|
+
/** Wraps a parsed-argument function definition in the function-tool shape. */
|
|
173
|
+
constructor(input: RunnableFunctionWithParse<Args, ToolContext>) {
|
|
112
174
|
this.function = input;
|
|
113
175
|
}
|
|
114
176
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Like `Promise.allSettled()` but throws an error if any promises are rejected.
|
|
3
|
+
* Rejection reasons remain available on the thrown error's non-enumerable `rejections`
|
|
4
|
+
* property without being written to the global console.
|
|
3
5
|
*/
|
|
4
6
|
export const allSettledWithThrow = async <R>(promises: Promise<R>[]): Promise<R[]> => {
|
|
5
7
|
const results = await Promise.allSettled(promises);
|
|
6
8
|
const rejected = results.filter((result): result is PromiseRejectedResult => result.status === 'rejected');
|
|
7
9
|
if (rejected.length) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
throw Object.defineProperty(new Error(`${rejected.length} promise(s) failed`), 'rejections', {
|
|
11
|
+
configurable: true,
|
|
12
|
+
value: rejected.map(({ reason }) => reason),
|
|
13
|
+
writable: true,
|
|
14
|
+
});
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
// Note: TS was complaining about using `.filter().map()` here for some reason
|