@radheim/ai 0.0.0-stage → 2.4.3
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 +1890 -3
- package/dist/ai.d.ts +36 -0
- package/dist/ai.js +46 -0
- package/dist/cache-policy.d.ts +6 -0
- package/dist/cache-policy.js +205 -0
- package/dist/decision-client.d.ts +10 -0
- package/dist/decision-client.js +42 -0
- package/dist/decision.d.ts +378 -0
- package/dist/decision.js +171 -0
- package/dist/effect.d.ts +59 -0
- package/dist/effect.js +33 -0
- package/dist/effort-updates.d.ts +12 -0
- package/dist/effort-updates.js +23 -0
- package/dist/embedding-client.d.ts +10 -0
- package/dist/embedding-client.js +17 -0
- package/dist/embedding.d.ts +113 -0
- package/dist/embedding.js +76 -0
- package/dist/experimental/cloudflare-run-extraction.d.ts +17 -0
- package/dist/experimental/cloudflare-run-extraction.js +85 -0
- package/dist/experimental/extraction.d.ts +153 -0
- package/dist/experimental/extraction.js +103 -0
- package/dist/experimental/realtime.d.ts +80 -0
- package/dist/experimental/realtime.js +96 -0
- package/dist/experimental.d.ts +10 -0
- package/dist/experimental.js +6 -0
- package/dist/fetch-middleware.d.ts +7 -0
- package/dist/fetch-middleware.js +41 -0
- package/dist/generation.d.ts +77 -0
- package/dist/generation.js +109 -0
- package/dist/image-client.d.ts +14 -0
- package/dist/image-client.js +39 -0
- package/dist/image.d.ts +323 -0
- package/dist/image.js +103 -0
- package/dist/index.d.ts +300 -0
- package/dist/index.js +179 -0
- package/dist/llm.d.ts +109 -0
- package/dist/llm.js +177 -0
- package/dist/loop.d.ts +38 -0
- package/dist/loop.js +139 -0
- package/dist/media-client.d.ts +30 -0
- package/dist/media-client.js +44 -0
- package/dist/media-model.d.ts +49 -0
- package/dist/media-model.js +55 -0
- package/dist/media.d.ts +237 -0
- package/dist/media.js +285 -0
- package/dist/promise-media.d.ts +20 -0
- package/dist/promise-media.js +16 -0
- package/dist/protocols/alibaba-chat.d.ts +315 -0
- package/dist/protocols/alibaba-chat.js +78 -0
- package/dist/protocols/alibaba-images.d.ts +22 -0
- package/dist/protocols/alibaba-images.js +77 -0
- package/dist/protocols/alibaba-messages.d.ts +413 -0
- package/dist/protocols/alibaba-messages.js +44 -0
- package/dist/protocols/alibaba-responses.d.ts +298 -0
- package/dist/protocols/alibaba-responses.js +67 -0
- package/dist/protocols/anthropic-messages.d.ts +1213 -0
- package/dist/protocols/anthropic-messages.js +1412 -0
- package/dist/protocols/assemblyai-transcription.d.ts +41 -0
- package/dist/protocols/assemblyai-transcription.js +137 -0
- package/dist/protocols/bedrock-converse.d.ts +548 -0
- package/dist/protocols/bedrock-converse.js +801 -0
- package/dist/protocols/bedrock-event-stream.d.ts +14 -0
- package/dist/protocols/bedrock-event-stream.js +100 -0
- package/dist/protocols/cartesia-speech.d.ts +117 -0
- package/dist/protocols/cartesia-speech.js +120 -0
- package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
- package/dist/protocols/cloudflare-run-decisions.js +36 -0
- package/dist/protocols/cloudflare-workers-ai-images.d.ts +23 -0
- package/dist/protocols/cloudflare-workers-ai-images.js +80 -0
- package/dist/protocols/cohere-chat.d.ts +184 -0
- package/dist/protocols/cohere-chat.js +317 -0
- package/dist/protocols/deepgram-speech.d.ts +109 -0
- package/dist/protocols/deepgram-speech.js +93 -0
- package/dist/protocols/deepgram-transcription.d.ts +26 -0
- package/dist/protocols/deepgram-transcription.js +119 -0
- package/dist/protocols/elevenlabs-speech.d.ts +112 -0
- package/dist/protocols/elevenlabs-speech.js +111 -0
- package/dist/protocols/elevenlabs-transcription.d.ts +28 -0
- package/dist/protocols/elevenlabs-transcription.js +137 -0
- package/dist/protocols/gemini.d.ts +388 -0
- package/dist/protocols/gemini.js +741 -0
- package/dist/protocols/google-decisions.d.ts +13 -0
- package/dist/protocols/google-decisions.js +133 -0
- package/dist/protocols/google-embed-content.d.ts +34 -0
- package/dist/protocols/google-embed-content.js +110 -0
- package/dist/protocols/google-images.d.ts +18 -0
- package/dist/protocols/google-images.js +169 -0
- package/dist/protocols/google-interactions-video.d.ts +38 -0
- package/dist/protocols/google-interactions-video.js +185 -0
- package/dist/protocols/google-interactions.d.ts +554 -0
- package/dist/protocols/google-interactions.js +756 -0
- package/dist/protocols/google-speech.d.ts +120 -0
- package/dist/protocols/google-speech.js +94 -0
- package/dist/protocols/google-transcription.d.ts +148 -0
- package/dist/protocols/google-transcription.js +129 -0
- package/dist/protocols/google-vertex-predict-embeddings.d.ts +18 -0
- package/dist/protocols/google-vertex-predict-embeddings.js +74 -0
- package/dist/protocols/index.d.ts +21 -0
- package/dist/protocols/index.js +21 -0
- package/dist/protocols/meta-images.d.ts +26 -0
- package/dist/protocols/meta-images.js +101 -0
- package/dist/protocols/meta-messages.d.ts +423 -0
- package/dist/protocols/meta-messages.js +63 -0
- package/dist/protocols/meta-responses.d.ts +533 -0
- package/dist/protocols/meta-responses.js +189 -0
- package/dist/protocols/minimax-images.d.ts +25 -0
- package/dist/protocols/minimax-images.js +150 -0
- package/dist/protocols/minimax-video.d.ts +45 -0
- package/dist/protocols/minimax-video.js +296 -0
- package/dist/protocols/mistral-chat.d.ts +565 -0
- package/dist/protocols/mistral-chat.js +606 -0
- package/dist/protocols/open-responses-channel.d.ts +25 -0
- package/dist/protocols/open-responses-channel.js +137 -0
- package/dist/protocols/open-responses-continuation.d.ts +18 -0
- package/dist/protocols/open-responses-continuation.js +172 -0
- package/dist/protocols/open-responses.d.ts +2509 -0
- package/dist/protocols/open-responses.js +1335 -0
- package/dist/protocols/openai-chat.d.ts +2571 -0
- package/dist/protocols/openai-chat.js +1140 -0
- package/dist/protocols/openai-compatible-chat.d.ts +184 -0
- package/dist/protocols/openai-compatible-chat.js +19 -0
- package/dist/protocols/openai-compatible-responses.d.ts +231 -0
- package/dist/protocols/openai-compatible-responses.js +18 -0
- package/dist/protocols/openai-decisions.d.ts +22 -0
- package/dist/protocols/openai-decisions.js +141 -0
- package/dist/protocols/openai-embeddings.d.ts +16 -0
- package/dist/protocols/openai-embeddings.js +76 -0
- package/dist/protocols/openai-freeform.d.ts +78 -0
- package/dist/protocols/openai-freeform.js +222 -0
- package/dist/protocols/openai-images.d.ts +148 -0
- package/dist/protocols/openai-images.js +303 -0
- package/dist/protocols/openai-responses.d.ts +1600 -0
- package/dist/protocols/openai-responses.js +360 -0
- package/dist/protocols/openai-speech.d.ts +110 -0
- package/dist/protocols/openai-speech.js +112 -0
- package/dist/protocols/openai-transcription.d.ts +185 -0
- package/dist/protocols/openai-transcription.js +206 -0
- package/dist/protocols/openrouter-video.d.ts +36 -0
- package/dist/protocols/openrouter-video.js +139 -0
- package/dist/protocols/seedance-video.d.ts +45 -0
- package/dist/protocols/seedance-video.js +217 -0
- package/dist/protocols/shared.d.ts +249 -0
- package/dist/protocols/shared.js +446 -0
- package/dist/protocols/system-one.d.ts +145 -0
- package/dist/protocols/system-one.js +272 -0
- package/dist/protocols/utils/bedrock-auth.d.ts +60 -0
- package/dist/protocols/utils/bedrock-auth.js +86 -0
- package/dist/protocols/utils/bedrock-cache.d.ts +19 -0
- package/dist/protocols/utils/bedrock-cache.js +49 -0
- package/dist/protocols/utils/bedrock-media.d.ts +53 -0
- package/dist/protocols/utils/bedrock-media.js +98 -0
- package/dist/protocols/utils/cache.d.ts +25 -0
- package/dist/protocols/utils/cache.js +33 -0
- package/dist/protocols/utils/claude-model.d.ts +8 -0
- package/dist/protocols/utils/claude-model.js +15 -0
- package/dist/protocols/utils/gateway-protocol.d.ts +17 -0
- package/dist/protocols/utils/gateway-protocol.js +59 -0
- package/dist/protocols/utils/gemini-generate-content.d.ts +75 -0
- package/dist/protocols/utils/gemini-generate-content.js +96 -0
- package/dist/protocols/utils/gemini-json-schema.d.ts +8 -0
- package/dist/protocols/utils/gemini-json-schema.js +76 -0
- package/dist/protocols/utils/image-sizing.d.ts +31 -0
- package/dist/protocols/utils/image-sizing.js +73 -0
- package/dist/protocols/utils/lifecycle.d.ts +24 -0
- package/dist/protocols/utils/lifecycle.js +62 -0
- package/dist/protocols/utils/media-input.d.ts +32 -0
- package/dist/protocols/utils/media-input.js +62 -0
- package/dist/protocols/utils/mistral-tool-id.d.ts +5 -0
- package/dist/protocols/utils/mistral-tool-id.js +31 -0
- package/dist/protocols/utils/open-responses-options.d.ts +54 -0
- package/dist/protocols/utils/open-responses-options.js +59 -0
- package/dist/protocols/utils/partial-json-options.d.ts +61 -0
- package/dist/protocols/utils/partial-json-options.js +51 -0
- package/dist/protocols/utils/partial-json.d.ts +8 -0
- package/dist/protocols/utils/partial-json.js +280 -0
- package/dist/protocols/utils/responses-checkpoint.d.ts +4 -0
- package/dist/protocols/utils/responses-checkpoint.js +103 -0
- package/dist/protocols/utils/responses-compaction.d.ts +6 -0
- package/dist/protocols/utils/responses-compaction.js +162 -0
- package/dist/protocols/utils/responses-hosted-tools.d.ts +122 -0
- package/dist/protocols/utils/responses-hosted-tools.js +63 -0
- package/dist/protocols/utils/speaker-turns.d.ts +3 -0
- package/dist/protocols/utils/speaker-turns.js +9 -0
- package/dist/protocols/utils/speech-stream.d.ts +49 -0
- package/dist/protocols/utils/speech-stream.js +64 -0
- package/dist/protocols/utils/tool-schema.d.ts +10 -0
- package/dist/protocols/utils/tool-schema.js +109 -0
- package/dist/protocols/utils/tool-stream.d.ts +478 -0
- package/dist/protocols/utils/tool-stream.js +153 -0
- package/dist/protocols/venice-chat.d.ts +340 -0
- package/dist/protocols/venice-chat.js +283 -0
- package/dist/protocols/xai-images.d.ts +25 -0
- package/dist/protocols/xai-images.js +87 -0
- package/dist/protocols/xai-responses.d.ts +294 -0
- package/dist/protocols/xai-responses.js +86 -0
- package/dist/protocols/xai-video.d.ts +35 -0
- package/dist/protocols/xai-video.js +159 -0
- package/dist/protocols/zai-chat.d.ts +296 -0
- package/dist/protocols/zai-chat.js +56 -0
- package/dist/protocols/zai-images.d.ts +20 -0
- package/dist/protocols/zai-images.js +79 -0
- package/dist/protocols/zai-messages.d.ts +409 -0
- package/dist/protocols/zai-messages.js +30 -0
- package/dist/protocols.d.ts +1 -0
- package/dist/protocols.js +1 -0
- package/dist/provider-error.d.ts +22 -0
- package/dist/provider-error.js +228 -0
- package/dist/provider-package.d.ts +17 -0
- package/dist/provider-package.js +1 -0
- package/dist/providers/alibaba/chat.d.ts +1 -0
- package/dist/providers/alibaba/chat.js +1 -0
- package/dist/providers/alibaba/embeddings.d.ts +2 -0
- package/dist/providers/alibaba/embeddings.js +1 -0
- package/dist/providers/alibaba/images.d.ts +2 -0
- package/dist/providers/alibaba/images.js +1 -0
- package/dist/providers/alibaba/messages.d.ts +3 -0
- package/dist/providers/alibaba/messages.js +1 -0
- package/dist/providers/alibaba/responses.d.ts +3 -0
- package/dist/providers/alibaba/responses.js +1 -0
- package/dist/providers/alibaba.d.ts +905 -0
- package/dist/providers/alibaba.js +119 -0
- package/dist/providers/amazon-bedrock/mantle/chat.d.ts +2 -0
- package/dist/providers/amazon-bedrock/mantle/chat.js +1 -0
- package/dist/providers/amazon-bedrock/mantle/messages.d.ts +2 -0
- package/dist/providers/amazon-bedrock/mantle/messages.js +1 -0
- package/dist/providers/amazon-bedrock/mantle/responses.d.ts +2 -0
- package/dist/providers/amazon-bedrock/mantle/responses.js +1 -0
- package/dist/providers/amazon-bedrock/mantle.d.ts +2 -0
- package/dist/providers/amazon-bedrock/mantle.js +1 -0
- package/dist/providers/amazon-bedrock-mantle.d.ts +789 -0
- package/dist/providers/amazon-bedrock-mantle.js +107 -0
- package/dist/providers/amazon-bedrock.d.ts +190 -0
- package/dist/providers/amazon-bedrock.js +44 -0
- package/dist/providers/anthropic-compatible.d.ts +364 -0
- package/dist/providers/anthropic-compatible.js +47 -0
- package/dist/providers/anthropic.d.ts +362 -0
- package/dist/providers/anthropic.js +36 -0
- package/dist/providers/assemblyai.d.ts +19 -0
- package/dist/providers/assemblyai.js +19 -0
- package/dist/providers/azure/chat.d.ts +2 -0
- package/dist/providers/azure/chat.js +1 -0
- package/dist/providers/azure/embeddings.d.ts +2 -0
- package/dist/providers/azure/embeddings.js +1 -0
- package/dist/providers/azure/images.d.ts +2 -0
- package/dist/providers/azure/images.js +1 -0
- package/dist/providers/azure/messages.d.ts +2 -0
- package/dist/providers/azure/messages.js +1 -0
- package/dist/providers/azure/responses.d.ts +2 -0
- package/dist/providers/azure/responses.js +1 -0
- package/dist/providers/azure.d.ts +1074 -0
- package/dist/providers/azure.js +150 -0
- package/dist/providers/baseten/decisions.d.ts +2 -0
- package/dist/providers/baseten/decisions.js +1 -0
- package/dist/providers/baseten.d.ts +384 -0
- package/dist/providers/baseten.js +56 -0
- package/dist/providers/byteplus/videos.d.ts +2 -0
- package/dist/providers/byteplus/videos.js +1 -0
- package/dist/providers/byteplus.d.ts +24 -0
- package/dist/providers/byteplus.js +21 -0
- package/dist/providers/cartesia.d.ts +18 -0
- package/dist/providers/cartesia.js +17 -0
- package/dist/providers/cerebras.d.ts +375 -0
- package/dist/providers/cerebras.js +33 -0
- package/dist/providers/cloudflare-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-ai-gateway/decisions.js +1 -0
- package/dist/providers/cloudflare-ai-gateway.d.ts +1581 -0
- package/dist/providers/cloudflare-ai-gateway.js +120 -0
- package/dist/providers/cloudflare-shared.d.ts +9 -0
- package/dist/providers/cloudflare-shared.js +25 -0
- package/dist/providers/cloudflare-workers-ai/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/decisions.js +1 -0
- package/dist/providers/cloudflare-workers-ai/images.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/images.js +1 -0
- package/dist/providers/cloudflare-workers-ai.d.ts +391 -0
- package/dist/providers/cloudflare-workers-ai.js +69 -0
- package/dist/providers/cohere/chat.d.ts +4 -0
- package/dist/providers/cohere/chat.js +3 -0
- package/dist/providers/cohere/embeddings.d.ts +2 -0
- package/dist/providers/cohere/embeddings.js +1 -0
- package/dist/providers/cohere.d.ts +502 -0
- package/dist/providers/cohere.js +55 -0
- package/dist/providers/deepgram.d.ts +22 -0
- package/dist/providers/deepgram.js +20 -0
- package/dist/providers/deepinfra/embeddings.d.ts +2 -0
- package/dist/providers/deepinfra/embeddings.js +1 -0
- package/dist/providers/deepinfra.d.ts +378 -0
- package/dist/providers/deepinfra.js +52 -0
- package/dist/providers/deepseek.d.ts +376 -0
- package/dist/providers/deepseek.js +30 -0
- package/dist/providers/digitalocean/decisions.d.ts +2 -0
- package/dist/providers/digitalocean/decisions.js +1 -0
- package/dist/providers/digitalocean/embeddings.d.ts +2 -0
- package/dist/providers/digitalocean/embeddings.js +1 -0
- package/dist/providers/digitalocean/images.d.ts +2 -0
- package/dist/providers/digitalocean/images.js +1 -0
- package/dist/providers/digitalocean/responses.d.ts +4 -0
- package/dist/providers/digitalocean/responses.js +1 -0
- package/dist/providers/digitalocean.d.ts +874 -0
- package/dist/providers/digitalocean.js +106 -0
- package/dist/providers/elevenlabs.d.ts +22 -0
- package/dist/providers/elevenlabs.js +22 -0
- package/dist/providers/fireworks/embeddings.d.ts +2 -0
- package/dist/providers/fireworks/embeddings.js +1 -0
- package/dist/providers/fireworks.d.ts +379 -0
- package/dist/providers/fireworks.js +40 -0
- package/dist/providers/google/decisions.d.ts +2 -0
- package/dist/providers/google/decisions.js +1 -0
- package/dist/providers/google/embeddings.d.ts +2 -0
- package/dist/providers/google/embeddings.js +1 -0
- package/dist/providers/google/images.d.ts +2 -0
- package/dist/providers/google/images.js +1 -0
- package/dist/providers/google/interactions.d.ts +7 -0
- package/dist/providers/google/interactions.js +3 -0
- package/dist/providers/google/videos.d.ts +2 -0
- package/dist/providers/google/videos.js +1 -0
- package/dist/providers/google-vertex/chat.d.ts +2 -0
- package/dist/providers/google-vertex/chat.js +1 -0
- package/dist/providers/google-vertex/embeddings.d.ts +2 -0
- package/dist/providers/google-vertex/embeddings.js +1 -0
- package/dist/providers/google-vertex/gemini.d.ts +2 -0
- package/dist/providers/google-vertex/gemini.js +1 -0
- package/dist/providers/google-vertex/images.d.ts +2 -0
- package/dist/providers/google-vertex/images.js +1 -0
- package/dist/providers/google-vertex/interactions.d.ts +2 -0
- package/dist/providers/google-vertex/interactions.js +1 -0
- package/dist/providers/google-vertex/messages.d.ts +2 -0
- package/dist/providers/google-vertex/messages.js +1 -0
- package/dist/providers/google-vertex/mistral.d.ts +2 -0
- package/dist/providers/google-vertex/mistral.js +1 -0
- package/dist/providers/google-vertex/responses.d.ts +2 -0
- package/dist/providers/google-vertex/responses.js +1 -0
- package/dist/providers/google-vertex-chat.d.ts +204 -0
- package/dist/providers/google-vertex-chat.js +29 -0
- package/dist/providers/google-vertex-interactions.d.ts +111 -0
- package/dist/providers/google-vertex-interactions.js +62 -0
- package/dist/providers/google-vertex-messages.d.ts +362 -0
- package/dist/providers/google-vertex-messages.js +51 -0
- package/dist/providers/google-vertex-mistral.d.ts +120 -0
- package/dist/providers/google-vertex-mistral.js +43 -0
- package/dist/providers/google-vertex-responses.d.ts +253 -0
- package/dist/providers/google-vertex-responses.js +30 -0
- package/dist/providers/google-vertex-shared.d.ts +58 -0
- package/dist/providers/google-vertex-shared.js +128 -0
- package/dist/providers/google-vertex.d.ts +132 -0
- package/dist/providers/google-vertex.js +161 -0
- package/dist/providers/google.d.ts +246 -0
- package/dist/providers/google.js +80 -0
- package/dist/providers/groq.d.ts +470 -0
- package/dist/providers/groq.js +63 -0
- package/dist/providers/index.d.ts +45 -0
- package/dist/providers/index.js +45 -0
- package/dist/providers/meta/chat.d.ts +2 -0
- package/dist/providers/meta/chat.js +1 -0
- package/dist/providers/meta/images.d.ts +2 -0
- package/dist/providers/meta/images.js +1 -0
- package/dist/providers/meta/messages.d.ts +2 -0
- package/dist/providers/meta/messages.js +1 -0
- package/dist/providers/meta/responses.d.ts +2 -0
- package/dist/providers/meta/responses.js +1 -0
- package/dist/providers/meta.d.ts +804 -0
- package/dist/providers/meta.js +96 -0
- package/dist/providers/minimax/chat.d.ts +4 -0
- package/dist/providers/minimax/chat.js +3 -0
- package/dist/providers/minimax/images.d.ts +3 -0
- package/dist/providers/minimax/images.js +1 -0
- package/dist/providers/minimax/messages.d.ts +1 -0
- package/dist/providers/minimax/messages.js +1 -0
- package/dist/providers/minimax/responses.d.ts +4 -0
- package/dist/providers/minimax/responses.js +3 -0
- package/dist/providers/minimax/videos.d.ts +3 -0
- package/dist/providers/minimax/videos.js +1 -0
- package/dist/providers/minimax.d.ts +798 -0
- package/dist/providers/minimax.js +99 -0
- package/dist/providers/mistral.d.ts +208 -0
- package/dist/providers/mistral.js +17 -0
- package/dist/providers/moonshot/chat.d.ts +1 -0
- package/dist/providers/moonshot/chat.js +1 -0
- package/dist/providers/moonshot/messages.d.ts +4 -0
- package/dist/providers/moonshot/messages.js +3 -0
- package/dist/providers/moonshot/responses.d.ts +4 -0
- package/dist/providers/moonshot/responses.js +3 -0
- package/dist/providers/moonshot.d.ts +785 -0
- package/dist/providers/moonshot.js +78 -0
- package/dist/providers/open-responses-options.d.ts +5 -0
- package/dist/providers/open-responses-options.js +1 -0
- package/dist/providers/openai/chat.d.ts +2 -0
- package/dist/providers/openai/chat.js +1 -0
- package/dist/providers/openai/embeddings.d.ts +2 -0
- package/dist/providers/openai/embeddings.js +1 -0
- package/dist/providers/openai/images.d.ts +2 -0
- package/dist/providers/openai/images.js +1 -0
- package/dist/providers/openai/responses.d.ts +2 -0
- package/dist/providers/openai/responses.js +1 -0
- package/dist/providers/openai-compatible/decisions.d.ts +2 -0
- package/dist/providers/openai-compatible/decisions.js +1 -0
- package/dist/providers/openai-compatible/embeddings.d.ts +2 -0
- package/dist/providers/openai-compatible/embeddings.js +1 -0
- package/dist/providers/openai-compatible/images.d.ts +2 -0
- package/dist/providers/openai-compatible/images.js +1 -0
- package/dist/providers/openai-compatible/responses.d.ts +1 -0
- package/dist/providers/openai-compatible/responses.js +1 -0
- package/dist/providers/openai-compatible-responses.d.ts +250 -0
- package/dist/providers/openai-compatible-responses.js +26 -0
- package/dist/providers/openai-compatible.d.ts +208 -0
- package/dist/providers/openai-compatible.js +71 -0
- package/dist/providers/openai-options.d.ts +21 -0
- package/dist/providers/openai-options.js +37 -0
- package/dist/providers/openai.d.ts +522 -0
- package/dist/providers/openai.js +118 -0
- package/dist/providers/opencode/decisions.d.ts +2 -0
- package/dist/providers/opencode/decisions.js +1 -0
- package/dist/providers/opencode.d.ts +23 -0
- package/dist/providers/opencode.js +25 -0
- package/dist/providers/openrouter/decisions.d.ts +2 -0
- package/dist/providers/openrouter/decisions.js +1 -0
- package/dist/providers/openrouter/embeddings.d.ts +2 -0
- package/dist/providers/openrouter/embeddings.js +1 -0
- package/dist/providers/openrouter/images.d.ts +2 -0
- package/dist/providers/openrouter/images.js +1 -0
- package/dist/providers/openrouter/responses.d.ts +3 -0
- package/dist/providers/openrouter/responses.js +1 -0
- package/dist/providers/openrouter/videos.d.ts +2 -0
- package/dist/providers/openrouter/videos.js +1 -0
- package/dist/providers/openrouter.d.ts +1204 -0
- package/dist/providers/openrouter.js +210 -0
- package/dist/providers/settings.d.ts +40 -0
- package/dist/providers/settings.js +18 -0
- package/dist/providers/togetherai.d.ts +375 -0
- package/dist/providers/togetherai.js +30 -0
- package/dist/providers/typesafe-ai/decisions.d.ts +2 -0
- package/dist/providers/typesafe-ai/decisions.js +1 -0
- package/dist/providers/typesafe-ai.d.ts +23 -0
- package/dist/providers/typesafe-ai.js +25 -0
- package/dist/providers/venice/responses.d.ts +4 -0
- package/dist/providers/venice/responses.js +1 -0
- package/dist/providers/venice.d.ts +632 -0
- package/dist/providers/venice.js +57 -0
- package/dist/providers/vercel-ai-gateway/chat.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/chat.js +1 -0
- package/dist/providers/vercel-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/decisions.js +1 -0
- package/dist/providers/vercel-ai-gateway/embeddings.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/embeddings.js +1 -0
- package/dist/providers/vercel-ai-gateway/images.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/images.js +1 -0
- package/dist/providers/vercel-ai-gateway/messages.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/messages.js +1 -0
- package/dist/providers/vercel-ai-gateway/responses.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/responses.js +1 -0
- package/dist/providers/vercel-ai-gateway.d.ts +111 -0
- package/dist/providers/vercel-ai-gateway.js +181 -0
- package/dist/providers/volcengine/videos.d.ts +2 -0
- package/dist/providers/volcengine/videos.js +1 -0
- package/dist/providers/volcengine.d.ts +24 -0
- package/dist/providers/volcengine.js +21 -0
- package/dist/providers/xai/images.d.ts +2 -0
- package/dist/providers/xai/images.js +1 -0
- package/dist/providers/xai/videos.d.ts +2 -0
- package/dist/providers/xai/videos.js +1 -0
- package/dist/providers/xai.d.ts +235 -0
- package/dist/providers/xai.js +89 -0
- package/dist/providers/zai/chat.d.ts +1 -0
- package/dist/providers/zai/chat.js +1 -0
- package/dist/providers/zai/images.d.ts +2 -0
- package/dist/providers/zai/images.js +1 -0
- package/dist/providers/zai-coding-plan/chat.d.ts +1 -0
- package/dist/providers/zai-coding-plan/chat.js +1 -0
- package/dist/providers/zai-coding-plan/messages.d.ts +4 -0
- package/dist/providers/zai-coding-plan/messages.js +3 -0
- package/dist/providers/zai-coding-plan/responses.d.ts +4 -0
- package/dist/providers/zai-coding-plan/responses.js +3 -0
- package/dist/providers/zai-coding-plan.d.ts +846 -0
- package/dist/providers/zai-coding-plan.js +56 -0
- package/dist/providers/zai.d.ts +285 -0
- package/dist/providers/zai.js +44 -0
- package/dist/providers.d.ts +1 -0
- package/dist/providers.js +1 -0
- package/dist/public.d.ts +18 -0
- package/dist/public.js +7 -0
- package/dist/route/auth-options.d.ts +35 -0
- package/dist/route/auth-options.js +17 -0
- package/dist/route/auth.d.ts +52 -0
- package/dist/route/auth.js +92 -0
- package/dist/route/client.d.ts +229 -0
- package/dist/route/client.js +293 -0
- package/dist/route/decision.d.ts +55 -0
- package/dist/route/decision.js +73 -0
- package/dist/route/embedding.d.ts +58 -0
- package/dist/route/embedding.js +85 -0
- package/dist/route/endpoint.d.ts +29 -0
- package/dist/route/endpoint.js +21 -0
- package/dist/route/executor-service.d.ts +54 -0
- package/dist/route/executor-service.js +115 -0
- package/dist/route/executor.d.ts +37 -0
- package/dist/route/executor.js +225 -0
- package/dist/route/framing.d.ts +44 -0
- package/dist/route/framing.js +63 -0
- package/dist/route/index.d.ts +21 -0
- package/dist/route/index.js +18 -0
- package/dist/route/media-protocol.d.ts +187 -0
- package/dist/route/media-protocol.js +117 -0
- package/dist/route/media.d.ts +91 -0
- package/dist/route/media.js +251 -0
- package/dist/route/protocol.d.ts +85 -0
- package/dist/route/protocol.js +19 -0
- package/dist/route/transport/http.d.ts +34 -0
- package/dist/route/transport/http.js +67 -0
- package/dist/route/transport/index.d.ts +42 -0
- package/dist/route/transport/index.js +4 -0
- package/dist/route/transport/websocket-channel.d.ts +56 -0
- package/dist/route/transport/websocket-channel.js +1 -0
- package/dist/route/transport/websocket.d.ts +32 -0
- package/dist/route/transport/websocket.js +315 -0
- package/dist/route.d.ts +1 -0
- package/dist/route.js +1 -0
- package/dist/schema/errors.d.ts +194 -0
- package/dist/schema/errors.js +217 -0
- package/dist/schema/events.d.ts +11001 -0
- package/dist/schema/events.js +542 -0
- package/dist/schema/ids.d.ts +17 -0
- package/dist/schema/ids.js +10 -0
- package/dist/schema/index.d.ts +5 -0
- package/dist/schema/index.js +5 -0
- package/dist/schema/messages.d.ts +2706 -0
- package/dist/schema/messages.js +344 -0
- package/dist/schema/options.d.ts +270 -0
- package/dist/schema/options.js +198 -0
- package/dist/speech.d.ts +266 -0
- package/dist/speech.js +114 -0
- package/dist/test-ai.d.ts +15 -0
- package/dist/test-ai.js +49 -0
- package/dist/testing.d.ts +1585 -0
- package/dist/testing.js +108 -0
- package/dist/tool-history.d.ts +2 -0
- package/dist/tool-history.js +91 -0
- package/dist/tool-runtime.d.ts +22 -0
- package/dist/tool-runtime.js +55 -0
- package/dist/tool-updates.d.ts +34 -0
- package/dist/tool-updates.js +93 -0
- package/dist/tool.d.ts +150 -0
- package/dist/tool.js +159 -0
- package/dist/transcription.d.ts +254 -0
- package/dist/transcription.js +119 -0
- package/dist/utils/bytes.d.ts +1 -0
- package/dist/utils/bytes.js +10 -0
- package/dist/utils/json.d.ts +4 -0
- package/dist/utils/json.js +4 -0
- package/dist/utils/media-type.d.ts +8 -0
- package/dist/utils/media-type.js +93 -0
- package/dist/utils/provider-codes.d.ts +3 -0
- package/dist/utils/provider-codes.js +41 -0
- package/dist/utils/record.d.ts +2 -0
- package/dist/utils/record.js +2 -0
- package/dist/utils/sanitize.d.ts +5 -0
- package/dist/utils/sanitize.js +31 -0
- package/dist/video-client.d.ts +12 -0
- package/dist/video-client.js +24 -0
- package/dist/video.d.ts +178 -0
- package/dist/video.js +79 -0
- package/package.json +648 -4
|
@@ -0,0 +1,1600 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Route } from "../route/client.js";
|
|
3
|
+
import { Protocol } from "../route/protocol.js";
|
|
4
|
+
import { HttpTransport } from "../route/transport/index.js";
|
|
5
|
+
import { OpenResponses } from "./open-responses.js";
|
|
6
|
+
import { OpenResponsesOptions } from "./utils/open-responses-options.js";
|
|
7
|
+
export declare const DEFAULT_BASE_URL = "https://api.openai.com/v1";
|
|
8
|
+
export declare const PATH = "/responses";
|
|
9
|
+
export declare const ContextManagement: Schema.$Array<Schema.Struct<{
|
|
10
|
+
readonly type: Schema.Literal<"compaction">;
|
|
11
|
+
readonly compactThreshold: Schema.optional<Schema.Int>;
|
|
12
|
+
}>>;
|
|
13
|
+
export type ContextManagement = typeof ContextManagement.Type;
|
|
14
|
+
export declare const ReasoningMode: Schema.declare<import("../schema/options.js").OpenString<"pro" | "standard">, import("../schema/options.js").OpenString<"pro" | "standard">>;
|
|
15
|
+
export type ReasoningMode = typeof ReasoningMode.Type;
|
|
16
|
+
export declare const ReasoningContext: Schema.declare<import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn">, import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn">>;
|
|
17
|
+
export type ReasoningContext = typeof ReasoningContext.Type;
|
|
18
|
+
declare const OpenAIResponsesBody: Schema.Struct<{
|
|
19
|
+
readonly model: Schema.String;
|
|
20
|
+
readonly input: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
21
|
+
readonly type: Schema.Literal<"compaction">;
|
|
22
|
+
readonly id: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
23
|
+
readonly encrypted_content: Schema.String;
|
|
24
|
+
}>, Schema.Struct<{
|
|
25
|
+
readonly type: Schema.Literal<"configuration_update">;
|
|
26
|
+
readonly reasoning: Schema.Struct<{
|
|
27
|
+
readonly effort: Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>;
|
|
28
|
+
}>;
|
|
29
|
+
}>, Schema.Struct<{
|
|
30
|
+
readonly type: Schema.Literal<"additional_tools">;
|
|
31
|
+
readonly role: Schema.Literal<"developer">;
|
|
32
|
+
readonly tools: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
33
|
+
readonly type: Schema.tag<"function">;
|
|
34
|
+
readonly name: Schema.String;
|
|
35
|
+
readonly description: Schema.String;
|
|
36
|
+
readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
37
|
+
readonly strict: Schema.optional<Schema.Boolean>;
|
|
38
|
+
}>, Schema.Struct<{
|
|
39
|
+
readonly type: Schema.tag<"custom">;
|
|
40
|
+
readonly name: Schema.String;
|
|
41
|
+
readonly description: Schema.String;
|
|
42
|
+
readonly format: Schema.Union<readonly [Schema.Struct<{
|
|
43
|
+
readonly type: Schema.tag<"text">;
|
|
44
|
+
}>, Schema.Struct<{
|
|
45
|
+
readonly type: Schema.tag<"grammar">;
|
|
46
|
+
readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
|
|
47
|
+
readonly definition: Schema.String;
|
|
48
|
+
}>]>;
|
|
49
|
+
}>, Schema.StructWithRest<Schema.Struct<{
|
|
50
|
+
readonly type: Schema.String;
|
|
51
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>;
|
|
52
|
+
}>, Schema.Struct<{
|
|
53
|
+
readonly type: Schema.tag<"message">;
|
|
54
|
+
readonly role: Schema.tag<"system">;
|
|
55
|
+
readonly content: Schema.String;
|
|
56
|
+
}>, Schema.Struct<{
|
|
57
|
+
readonly type: Schema.tag<"message">;
|
|
58
|
+
readonly role: Schema.tag<"developer">;
|
|
59
|
+
readonly content: Schema.String;
|
|
60
|
+
}>, Schema.Struct<{
|
|
61
|
+
readonly type: Schema.tag<"message">;
|
|
62
|
+
readonly role: Schema.tag<"user">;
|
|
63
|
+
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
64
|
+
readonly type: Schema.tag<"input_text">;
|
|
65
|
+
readonly text: Schema.String;
|
|
66
|
+
}>, Schema.Union<readonly [Schema.Struct<{
|
|
67
|
+
readonly type: Schema.tag<"input_image">;
|
|
68
|
+
readonly image_url: Schema.String;
|
|
69
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
70
|
+
}>, Schema.Struct<{
|
|
71
|
+
readonly type: Schema.tag<"input_file">;
|
|
72
|
+
readonly filename: Schema.optional<Schema.String>;
|
|
73
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
74
|
+
readonly file_data: Schema.optional<Schema.String>;
|
|
75
|
+
readonly file_url: Schema.optional<Schema.String>;
|
|
76
|
+
}>, Schema.Struct<{
|
|
77
|
+
readonly type: Schema.tag<"input_video">;
|
|
78
|
+
readonly video_url: Schema.String;
|
|
79
|
+
}>]>]>>;
|
|
80
|
+
readonly id: Schema.optional<Schema.String>;
|
|
81
|
+
readonly status: Schema.optional<Schema.String>;
|
|
82
|
+
}>, Schema.Struct<{
|
|
83
|
+
readonly type: Schema.tag<"message">;
|
|
84
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
85
|
+
readonly role: Schema.tag<"assistant">;
|
|
86
|
+
readonly content: Schema.$Array<Schema.Struct<{
|
|
87
|
+
readonly type: Schema.tag<"output_text">;
|
|
88
|
+
readonly text: Schema.String;
|
|
89
|
+
}>>;
|
|
90
|
+
readonly phase: Schema.optionalKey<Schema.NullOr<Schema.Literals<readonly ["commentary", "final_answer"]>>>;
|
|
91
|
+
readonly status: Schema.optional<Schema.String>;
|
|
92
|
+
}>, Schema.Struct<{
|
|
93
|
+
readonly type: Schema.tag<"reasoning">;
|
|
94
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
95
|
+
readonly summary: Schema.$Array<Schema.Struct<{
|
|
96
|
+
readonly type: Schema.tag<"summary_text">;
|
|
97
|
+
readonly text: Schema.String;
|
|
98
|
+
}>>;
|
|
99
|
+
readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
100
|
+
}>, Schema.Struct<{
|
|
101
|
+
readonly type: Schema.tag<"function_call">;
|
|
102
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
103
|
+
readonly call_id: Schema.String;
|
|
104
|
+
readonly name: Schema.String;
|
|
105
|
+
readonly namespace: Schema.optional<Schema.String>;
|
|
106
|
+
readonly arguments: Schema.String;
|
|
107
|
+
}>, Schema.Struct<{
|
|
108
|
+
readonly type: Schema.Literals<readonly ["function_call_output", "custom_tool_call_output"]>;
|
|
109
|
+
readonly call_id: Schema.String;
|
|
110
|
+
readonly output: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
111
|
+
readonly type: Schema.tag<"input_text">;
|
|
112
|
+
readonly text: Schema.String;
|
|
113
|
+
}>, Schema.Struct<{
|
|
114
|
+
readonly type: Schema.tag<"input_image">;
|
|
115
|
+
readonly image_url: Schema.String;
|
|
116
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
117
|
+
}>, Schema.Struct<{
|
|
118
|
+
readonly type: Schema.tag<"input_file">;
|
|
119
|
+
readonly filename: Schema.optional<Schema.String>;
|
|
120
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
121
|
+
readonly file_data: Schema.optional<Schema.String>;
|
|
122
|
+
readonly file_url: Schema.optional<Schema.String>;
|
|
123
|
+
}>, Schema.Struct<{
|
|
124
|
+
readonly type: Schema.tag<"input_video">;
|
|
125
|
+
readonly video_url: Schema.String;
|
|
126
|
+
}>]>>]>;
|
|
127
|
+
}>, Schema.Struct<{
|
|
128
|
+
readonly type: Schema.tag<"custom_tool_call">;
|
|
129
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
130
|
+
readonly call_id: Schema.String;
|
|
131
|
+
readonly name: Schema.String;
|
|
132
|
+
readonly input: Schema.String;
|
|
133
|
+
}>, Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
134
|
+
readonly type: Schema.tag<"web_search_call">;
|
|
135
|
+
readonly id: Schema.String;
|
|
136
|
+
readonly status: Schema.optional<Schema.String>;
|
|
137
|
+
readonly action: Schema.optional<Schema.NullOr<Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
138
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
|
|
139
|
+
readonly type: Schema.tag<"file_search_call">;
|
|
140
|
+
readonly id: Schema.String;
|
|
141
|
+
readonly status: Schema.optional<Schema.String>;
|
|
142
|
+
readonly queries: Schema.optional<Schema.$Array<Schema.String>>;
|
|
143
|
+
readonly results: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
|
|
144
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
|
|
145
|
+
readonly type: Schema.tag<"code_interpreter_call">;
|
|
146
|
+
readonly id: Schema.String;
|
|
147
|
+
readonly status: Schema.optional<Schema.String>;
|
|
148
|
+
readonly code: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
149
|
+
readonly container_id: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
150
|
+
readonly outputs: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
|
|
151
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
|
|
152
|
+
readonly type: Schema.tag<"mcp_call">;
|
|
153
|
+
readonly id: Schema.String;
|
|
154
|
+
readonly status: Schema.optional<Schema.String>;
|
|
155
|
+
readonly server_label: Schema.optional<Schema.String>;
|
|
156
|
+
readonly name: Schema.optional<Schema.String>;
|
|
157
|
+
readonly arguments: Schema.optional<Schema.String>;
|
|
158
|
+
readonly output: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
159
|
+
readonly error: Schema.optional<Schema.Unknown>;
|
|
160
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>, Schema.StructWithRest<Schema.Struct<{
|
|
161
|
+
readonly type: Schema.String;
|
|
162
|
+
readonly id: Schema.String;
|
|
163
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>;
|
|
164
|
+
readonly instructions: Schema.optional<Schema.String>;
|
|
165
|
+
readonly store: Schema.optional<Schema.Boolean>;
|
|
166
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
167
|
+
readonly safety_identifier: Schema.optional<Schema.String>;
|
|
168
|
+
readonly stream_options: Schema.optional<Schema.Struct<{
|
|
169
|
+
readonly include_obfuscation: Schema.optional<Schema.Boolean>;
|
|
170
|
+
}>>;
|
|
171
|
+
readonly top_logprobs: Schema.optional<Schema.Int>;
|
|
172
|
+
readonly truncation: Schema.optional<Schema.Literals<readonly ["auto", "disabled"]>>;
|
|
173
|
+
readonly service_tier: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority">, import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority">>>;
|
|
174
|
+
readonly prompt_cache_key: Schema.optional<Schema.String>;
|
|
175
|
+
readonly include: Schema.optional<Schema.$Array<Schema.declare<import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">, import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">>>>;
|
|
176
|
+
readonly text: Schema.optional<Schema.Struct<{
|
|
177
|
+
readonly verbosity: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"high" | "low" | "medium">, import("../schema/options.js").OpenString<"high" | "low" | "medium">>>;
|
|
178
|
+
}>>;
|
|
179
|
+
readonly max_output_tokens: Schema.optional<Schema.Number>;
|
|
180
|
+
readonly max_tool_calls: Schema.optional<Schema.Int>;
|
|
181
|
+
readonly parallel_tool_calls: Schema.optional<Schema.Boolean>;
|
|
182
|
+
readonly temperature: Schema.optional<Schema.Number>;
|
|
183
|
+
readonly top_p: Schema.optional<Schema.Number>;
|
|
184
|
+
readonly presence_penalty: Schema.optional<Schema.Number>;
|
|
185
|
+
readonly frequency_penalty: Schema.optional<Schema.Number>;
|
|
186
|
+
readonly prompt_cache_retention: Schema.optional<Schema.String>;
|
|
187
|
+
readonly prompt_cache_options: Schema.optional<Schema.Struct<{
|
|
188
|
+
readonly ttl: Schema.optional<Schema.String>;
|
|
189
|
+
}>>;
|
|
190
|
+
readonly tools: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
191
|
+
readonly type: Schema.tag<"function">;
|
|
192
|
+
readonly name: Schema.String;
|
|
193
|
+
readonly description: Schema.String;
|
|
194
|
+
readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
195
|
+
readonly strict: Schema.optional<Schema.Boolean>;
|
|
196
|
+
}>, Schema.Struct<{
|
|
197
|
+
readonly type: Schema.tag<"custom">;
|
|
198
|
+
readonly name: Schema.String;
|
|
199
|
+
readonly description: Schema.String;
|
|
200
|
+
readonly format: Schema.Union<readonly [Schema.Struct<{
|
|
201
|
+
readonly type: Schema.tag<"text">;
|
|
202
|
+
}>, Schema.Struct<{
|
|
203
|
+
readonly type: Schema.tag<"grammar">;
|
|
204
|
+
readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
|
|
205
|
+
readonly definition: Schema.String;
|
|
206
|
+
}>]>;
|
|
207
|
+
}>, Schema.Struct<{
|
|
208
|
+
readonly type: Schema.tag<"namespace">;
|
|
209
|
+
readonly name: Schema.String;
|
|
210
|
+
readonly description: Schema.String;
|
|
211
|
+
readonly tools: Schema.$Array<Schema.Struct<{
|
|
212
|
+
readonly type: Schema.tag<"function">;
|
|
213
|
+
readonly name: Schema.String;
|
|
214
|
+
readonly description: Schema.String;
|
|
215
|
+
readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
216
|
+
readonly strict: Schema.optional<Schema.Boolean>;
|
|
217
|
+
}>>;
|
|
218
|
+
}>, Schema.Struct<{
|
|
219
|
+
readonly type: Schema.tag<"image_generation">;
|
|
220
|
+
readonly action: Schema.optional<Schema.Literals<readonly ["auto", "generate", "edit"]>>;
|
|
221
|
+
readonly background: Schema.optional<Schema.Literals<readonly ["auto", "opaque", "transparent"]>>;
|
|
222
|
+
readonly input_fidelity: Schema.optional<Schema.Literals<readonly ["low", "high"]>>;
|
|
223
|
+
readonly output_compression: Schema.optional<Schema.Int>;
|
|
224
|
+
readonly output_format: Schema.optional<Schema.Literals<readonly ["png", "jpeg", "webp"]>>;
|
|
225
|
+
readonly partial_images: Schema.optional<Schema.Int>;
|
|
226
|
+
readonly quality: Schema.optional<Schema.Literals<readonly ["auto", "low", "medium", "high"]>>;
|
|
227
|
+
readonly size: Schema.optional<Schema.String>;
|
|
228
|
+
}>]>>>;
|
|
229
|
+
readonly tool_choice: Schema.optional<Schema.Union<readonly [Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
|
|
230
|
+
readonly type: Schema.Literals<readonly ["function", "custom"]>;
|
|
231
|
+
readonly name: Schema.String;
|
|
232
|
+
}>, Schema.Struct<{
|
|
233
|
+
readonly type: Schema.tag<"allowed_tools">;
|
|
234
|
+
readonly mode: Schema.Literals<readonly ["auto", "none", "required"]>;
|
|
235
|
+
readonly tools: Schema.$Array<Schema.Struct<{
|
|
236
|
+
readonly type: Schema.Literals<readonly ["function", "custom"]>;
|
|
237
|
+
readonly name: Schema.String;
|
|
238
|
+
}>>;
|
|
239
|
+
}>]>, Schema.Struct<{
|
|
240
|
+
readonly type: Schema.tag<"image_generation">;
|
|
241
|
+
}>]>>;
|
|
242
|
+
readonly reasoning: Schema.optional<Schema.Struct<{
|
|
243
|
+
readonly effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
|
|
244
|
+
readonly summary: Schema.optional<Schema.Literals<readonly ["auto", "concise", "detailed"]>>;
|
|
245
|
+
readonly mode: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"pro" | "standard">, import("../schema/options.js").OpenString<"pro" | "standard">>>;
|
|
246
|
+
readonly context: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn">, import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn">>>;
|
|
247
|
+
}>>;
|
|
248
|
+
readonly context_management: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
249
|
+
readonly type: Schema.Literal<"compaction">;
|
|
250
|
+
readonly compact_threshold: Schema.optional<Schema.Int>;
|
|
251
|
+
}>>>;
|
|
252
|
+
readonly stream: Schema.Literal<true>;
|
|
253
|
+
}>;
|
|
254
|
+
export type OpenAIResponsesBody = Schema.Schema.Type<typeof OpenAIResponsesBody>;
|
|
255
|
+
/** Request control, never conversation content. */
|
|
256
|
+
export declare const CompactionTrigger: Schema.Struct<{
|
|
257
|
+
readonly type: Schema.Literal<"compaction_trigger">;
|
|
258
|
+
}>;
|
|
259
|
+
export declare const protocol: Protocol<{
|
|
260
|
+
readonly model: string;
|
|
261
|
+
readonly input: readonly ({
|
|
262
|
+
readonly type: "configuration_update";
|
|
263
|
+
readonly reasoning: {
|
|
264
|
+
readonly effort: OpenResponsesOptions.ReasoningEffort;
|
|
265
|
+
};
|
|
266
|
+
} | {
|
|
267
|
+
readonly type: "additional_tools";
|
|
268
|
+
readonly role: "developer";
|
|
269
|
+
readonly tools: readonly ({
|
|
270
|
+
readonly type: "custom";
|
|
271
|
+
readonly name: string;
|
|
272
|
+
readonly description: string;
|
|
273
|
+
readonly format: {
|
|
274
|
+
readonly type: "text";
|
|
275
|
+
} | {
|
|
276
|
+
readonly type: "grammar";
|
|
277
|
+
readonly syntax: "lark" | "regex";
|
|
278
|
+
readonly definition: string;
|
|
279
|
+
};
|
|
280
|
+
} | {
|
|
281
|
+
readonly type: "function";
|
|
282
|
+
readonly name: string;
|
|
283
|
+
readonly description: string;
|
|
284
|
+
readonly parameters: {
|
|
285
|
+
readonly [x: string]: unknown;
|
|
286
|
+
};
|
|
287
|
+
readonly strict?: boolean | undefined;
|
|
288
|
+
} | {
|
|
289
|
+
readonly [x: string]: unknown;
|
|
290
|
+
readonly type: string;
|
|
291
|
+
})[];
|
|
292
|
+
} | {
|
|
293
|
+
readonly type: "message";
|
|
294
|
+
readonly role: "system";
|
|
295
|
+
readonly content: string;
|
|
296
|
+
} | {
|
|
297
|
+
readonly type: "message";
|
|
298
|
+
readonly role: "developer";
|
|
299
|
+
readonly content: string;
|
|
300
|
+
} | {
|
|
301
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
302
|
+
readonly call_id: string;
|
|
303
|
+
readonly output: string | readonly ({
|
|
304
|
+
readonly type: "input_text";
|
|
305
|
+
readonly text: string;
|
|
306
|
+
} | {
|
|
307
|
+
readonly type: "input_video";
|
|
308
|
+
readonly video_url: string;
|
|
309
|
+
} | {
|
|
310
|
+
readonly type: "input_image";
|
|
311
|
+
readonly image_url: string;
|
|
312
|
+
readonly detail?: string | undefined;
|
|
313
|
+
} | {
|
|
314
|
+
readonly type: "input_file";
|
|
315
|
+
readonly filename?: string | undefined;
|
|
316
|
+
readonly detail?: string | undefined;
|
|
317
|
+
readonly file_data?: string | undefined;
|
|
318
|
+
readonly file_url?: string | undefined;
|
|
319
|
+
})[];
|
|
320
|
+
} | {
|
|
321
|
+
readonly type: "reasoning";
|
|
322
|
+
readonly id?: string | undefined;
|
|
323
|
+
readonly summary: readonly {
|
|
324
|
+
readonly type: "summary_text";
|
|
325
|
+
readonly text: string;
|
|
326
|
+
}[];
|
|
327
|
+
readonly encrypted_content?: string | null | undefined;
|
|
328
|
+
} | {
|
|
329
|
+
readonly type: "compaction";
|
|
330
|
+
readonly id?: string | null | undefined;
|
|
331
|
+
readonly encrypted_content: string;
|
|
332
|
+
} | {
|
|
333
|
+
readonly type: "message";
|
|
334
|
+
readonly role: "user";
|
|
335
|
+
readonly content: readonly ({
|
|
336
|
+
readonly type: "input_text";
|
|
337
|
+
readonly text: string;
|
|
338
|
+
} | {
|
|
339
|
+
readonly type: "input_video";
|
|
340
|
+
readonly video_url: string;
|
|
341
|
+
} | {
|
|
342
|
+
readonly type: "input_image";
|
|
343
|
+
readonly image_url: string;
|
|
344
|
+
readonly detail?: string | undefined;
|
|
345
|
+
} | {
|
|
346
|
+
readonly type: "input_file";
|
|
347
|
+
readonly filename?: string | undefined;
|
|
348
|
+
readonly detail?: string | undefined;
|
|
349
|
+
readonly file_data?: string | undefined;
|
|
350
|
+
readonly file_url?: string | undefined;
|
|
351
|
+
})[];
|
|
352
|
+
readonly id?: string | undefined;
|
|
353
|
+
readonly status?: string | undefined;
|
|
354
|
+
} | {
|
|
355
|
+
readonly type: "message";
|
|
356
|
+
readonly id?: string | undefined;
|
|
357
|
+
readonly role: "assistant";
|
|
358
|
+
readonly content: readonly {
|
|
359
|
+
readonly type: "output_text";
|
|
360
|
+
readonly text: string;
|
|
361
|
+
}[];
|
|
362
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
363
|
+
readonly status?: string | undefined;
|
|
364
|
+
} | {
|
|
365
|
+
readonly type: "function_call";
|
|
366
|
+
readonly id?: string | undefined;
|
|
367
|
+
readonly call_id: string;
|
|
368
|
+
readonly name: string;
|
|
369
|
+
readonly namespace?: string | undefined;
|
|
370
|
+
readonly arguments: string;
|
|
371
|
+
} | {
|
|
372
|
+
readonly type: "custom_tool_call";
|
|
373
|
+
readonly id?: string | undefined;
|
|
374
|
+
readonly call_id: string;
|
|
375
|
+
readonly name: string;
|
|
376
|
+
readonly input: string;
|
|
377
|
+
} | {
|
|
378
|
+
readonly [x: string]: unknown;
|
|
379
|
+
readonly type: "web_search_call";
|
|
380
|
+
readonly id: string;
|
|
381
|
+
readonly status?: string | undefined;
|
|
382
|
+
readonly action?: {
|
|
383
|
+
readonly [x: string]: unknown;
|
|
384
|
+
} | null | undefined;
|
|
385
|
+
} | {
|
|
386
|
+
readonly [x: string]: unknown;
|
|
387
|
+
readonly type: "file_search_call";
|
|
388
|
+
readonly id: string;
|
|
389
|
+
readonly status?: string | undefined;
|
|
390
|
+
readonly queries?: readonly string[] | undefined;
|
|
391
|
+
readonly results?: readonly {
|
|
392
|
+
readonly [x: string]: unknown;
|
|
393
|
+
}[] | null | undefined;
|
|
394
|
+
} | {
|
|
395
|
+
readonly [x: string]: unknown;
|
|
396
|
+
readonly type: "code_interpreter_call";
|
|
397
|
+
readonly id: string;
|
|
398
|
+
readonly status?: string | undefined;
|
|
399
|
+
readonly code?: string | null | undefined;
|
|
400
|
+
readonly container_id?: string | null | undefined;
|
|
401
|
+
readonly outputs?: readonly {
|
|
402
|
+
readonly [x: string]: unknown;
|
|
403
|
+
}[] | null | undefined;
|
|
404
|
+
} | {
|
|
405
|
+
readonly [x: string]: unknown;
|
|
406
|
+
readonly type: "mcp_call";
|
|
407
|
+
readonly id: string;
|
|
408
|
+
readonly status?: string | undefined;
|
|
409
|
+
readonly server_label?: string | undefined;
|
|
410
|
+
readonly name?: string | undefined;
|
|
411
|
+
readonly arguments?: string | undefined;
|
|
412
|
+
readonly output?: string | null | undefined;
|
|
413
|
+
readonly error?: unknown;
|
|
414
|
+
} | {
|
|
415
|
+
readonly [x: string]: unknown;
|
|
416
|
+
readonly type: string;
|
|
417
|
+
readonly id: string;
|
|
418
|
+
})[];
|
|
419
|
+
readonly instructions?: string | undefined;
|
|
420
|
+
readonly store?: boolean | undefined;
|
|
421
|
+
readonly metadata?: {
|
|
422
|
+
readonly [x: string]: string;
|
|
423
|
+
} | undefined;
|
|
424
|
+
readonly safety_identifier?: string | undefined;
|
|
425
|
+
readonly stream_options?: {
|
|
426
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
427
|
+
} | undefined;
|
|
428
|
+
readonly top_logprobs?: number | undefined;
|
|
429
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
430
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
431
|
+
readonly prompt_cache_key?: string | undefined;
|
|
432
|
+
readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
|
|
433
|
+
readonly text?: {
|
|
434
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
435
|
+
} | undefined;
|
|
436
|
+
readonly max_output_tokens?: number | undefined;
|
|
437
|
+
readonly max_tool_calls?: number | undefined;
|
|
438
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
439
|
+
readonly temperature?: number | undefined;
|
|
440
|
+
readonly top_p?: number | undefined;
|
|
441
|
+
readonly presence_penalty?: number | undefined;
|
|
442
|
+
readonly frequency_penalty?: number | undefined;
|
|
443
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
444
|
+
readonly prompt_cache_options?: {
|
|
445
|
+
readonly ttl?: string | undefined;
|
|
446
|
+
} | undefined;
|
|
447
|
+
readonly tools?: readonly ({
|
|
448
|
+
readonly type: "custom";
|
|
449
|
+
readonly name: string;
|
|
450
|
+
readonly description: string;
|
|
451
|
+
readonly format: {
|
|
452
|
+
readonly type: "text";
|
|
453
|
+
} | {
|
|
454
|
+
readonly type: "grammar";
|
|
455
|
+
readonly syntax: "lark" | "regex";
|
|
456
|
+
readonly definition: string;
|
|
457
|
+
};
|
|
458
|
+
} | {
|
|
459
|
+
readonly type: "namespace";
|
|
460
|
+
readonly name: string;
|
|
461
|
+
readonly description: string;
|
|
462
|
+
readonly tools: readonly {
|
|
463
|
+
readonly type: "function";
|
|
464
|
+
readonly name: string;
|
|
465
|
+
readonly description: string;
|
|
466
|
+
readonly parameters: {
|
|
467
|
+
readonly [x: string]: unknown;
|
|
468
|
+
};
|
|
469
|
+
readonly strict?: boolean | undefined;
|
|
470
|
+
}[];
|
|
471
|
+
} | {
|
|
472
|
+
readonly type: "function";
|
|
473
|
+
readonly name: string;
|
|
474
|
+
readonly description: string;
|
|
475
|
+
readonly parameters: {
|
|
476
|
+
readonly [x: string]: unknown;
|
|
477
|
+
};
|
|
478
|
+
readonly strict?: boolean | undefined;
|
|
479
|
+
} | {
|
|
480
|
+
readonly type: "image_generation";
|
|
481
|
+
readonly action?: "auto" | "edit" | "generate" | undefined;
|
|
482
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
483
|
+
readonly input_fidelity?: "high" | "low" | undefined;
|
|
484
|
+
readonly output_compression?: number | undefined;
|
|
485
|
+
readonly output_format?: "jpeg" | "png" | "webp" | undefined;
|
|
486
|
+
readonly partial_images?: number | undefined;
|
|
487
|
+
readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
|
|
488
|
+
readonly size?: string | undefined;
|
|
489
|
+
})[] | undefined;
|
|
490
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
491
|
+
readonly type: "custom" | "function";
|
|
492
|
+
readonly name: string;
|
|
493
|
+
} | {
|
|
494
|
+
readonly type: "allowed_tools";
|
|
495
|
+
readonly mode: "auto" | "none" | "required";
|
|
496
|
+
readonly tools: readonly {
|
|
497
|
+
readonly type: "custom" | "function";
|
|
498
|
+
readonly name: string;
|
|
499
|
+
}[];
|
|
500
|
+
} | {
|
|
501
|
+
readonly type: "image_generation";
|
|
502
|
+
} | undefined;
|
|
503
|
+
readonly reasoning?: {
|
|
504
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
505
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
506
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
507
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
508
|
+
} | undefined;
|
|
509
|
+
readonly context_management?: readonly {
|
|
510
|
+
readonly type: "compaction";
|
|
511
|
+
readonly compact_threshold?: number | undefined;
|
|
512
|
+
}[] | undefined;
|
|
513
|
+
readonly stream: true;
|
|
514
|
+
}, string, {
|
|
515
|
+
readonly [x: string]: unknown;
|
|
516
|
+
readonly type: string;
|
|
517
|
+
readonly delta?: string | undefined;
|
|
518
|
+
readonly arguments?: string | undefined;
|
|
519
|
+
readonly text?: string | undefined;
|
|
520
|
+
readonly item_id?: string | undefined;
|
|
521
|
+
readonly output_index?: number | undefined;
|
|
522
|
+
readonly summary_index?: number | undefined;
|
|
523
|
+
readonly item?: {
|
|
524
|
+
readonly [x: string]: unknown;
|
|
525
|
+
readonly type: string;
|
|
526
|
+
readonly id?: string | undefined;
|
|
527
|
+
readonly call_id?: string | undefined;
|
|
528
|
+
readonly name?: string | undefined;
|
|
529
|
+
readonly namespace?: string | undefined;
|
|
530
|
+
readonly arguments?: string | undefined;
|
|
531
|
+
readonly encrypted_content?: string | null | undefined;
|
|
532
|
+
} | null | undefined;
|
|
533
|
+
readonly response?: {
|
|
534
|
+
readonly [x: string]: unknown;
|
|
535
|
+
readonly id?: string | undefined;
|
|
536
|
+
readonly service_tier?: string | null | undefined;
|
|
537
|
+
readonly incomplete_details?: {
|
|
538
|
+
readonly reason?: string | undefined;
|
|
539
|
+
} | null | undefined;
|
|
540
|
+
readonly output?: readonly {
|
|
541
|
+
readonly [x: string]: unknown;
|
|
542
|
+
readonly type: string;
|
|
543
|
+
readonly id?: string | undefined;
|
|
544
|
+
readonly call_id?: string | undefined;
|
|
545
|
+
readonly name?: string | undefined;
|
|
546
|
+
readonly namespace?: string | undefined;
|
|
547
|
+
readonly arguments?: string | undefined;
|
|
548
|
+
readonly encrypted_content?: string | null | undefined;
|
|
549
|
+
}[] | undefined;
|
|
550
|
+
readonly usage?: {
|
|
551
|
+
readonly [x: string]: unknown;
|
|
552
|
+
readonly input_tokens?: number | undefined;
|
|
553
|
+
readonly input_tokens_details?: {
|
|
554
|
+
readonly [x: string]: unknown;
|
|
555
|
+
readonly cached_tokens?: number | undefined;
|
|
556
|
+
readonly cache_write_tokens?: number | undefined;
|
|
557
|
+
} | null | undefined;
|
|
558
|
+
readonly output_tokens?: number | undefined;
|
|
559
|
+
readonly output_tokens_details?: {
|
|
560
|
+
readonly [x: string]: unknown;
|
|
561
|
+
readonly reasoning_tokens?: number | undefined;
|
|
562
|
+
} | null | undefined;
|
|
563
|
+
readonly total_tokens?: number | undefined;
|
|
564
|
+
} | null | undefined;
|
|
565
|
+
readonly error?: unknown;
|
|
566
|
+
} | undefined;
|
|
567
|
+
readonly code?: unknown;
|
|
568
|
+
readonly message?: unknown;
|
|
569
|
+
readonly error?: unknown;
|
|
570
|
+
readonly status?: unknown;
|
|
571
|
+
readonly status_code?: unknown;
|
|
572
|
+
}, OpenResponses.ParserState>;
|
|
573
|
+
export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
574
|
+
readonly model: string;
|
|
575
|
+
readonly input: readonly ({
|
|
576
|
+
readonly type: "configuration_update";
|
|
577
|
+
readonly reasoning: {
|
|
578
|
+
readonly effort: OpenResponsesOptions.ReasoningEffort;
|
|
579
|
+
};
|
|
580
|
+
} | {
|
|
581
|
+
readonly type: "additional_tools";
|
|
582
|
+
readonly role: "developer";
|
|
583
|
+
readonly tools: readonly ({
|
|
584
|
+
readonly type: "custom";
|
|
585
|
+
readonly name: string;
|
|
586
|
+
readonly description: string;
|
|
587
|
+
readonly format: {
|
|
588
|
+
readonly type: "text";
|
|
589
|
+
} | {
|
|
590
|
+
readonly type: "grammar";
|
|
591
|
+
readonly syntax: "lark" | "regex";
|
|
592
|
+
readonly definition: string;
|
|
593
|
+
};
|
|
594
|
+
} | {
|
|
595
|
+
readonly type: "function";
|
|
596
|
+
readonly name: string;
|
|
597
|
+
readonly description: string;
|
|
598
|
+
readonly parameters: {
|
|
599
|
+
readonly [x: string]: unknown;
|
|
600
|
+
};
|
|
601
|
+
readonly strict?: boolean | undefined;
|
|
602
|
+
} | {
|
|
603
|
+
readonly [x: string]: unknown;
|
|
604
|
+
readonly type: string;
|
|
605
|
+
})[];
|
|
606
|
+
} | {
|
|
607
|
+
readonly type: "message";
|
|
608
|
+
readonly role: "system";
|
|
609
|
+
readonly content: string;
|
|
610
|
+
} | {
|
|
611
|
+
readonly type: "message";
|
|
612
|
+
readonly role: "developer";
|
|
613
|
+
readonly content: string;
|
|
614
|
+
} | {
|
|
615
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
616
|
+
readonly call_id: string;
|
|
617
|
+
readonly output: string | readonly ({
|
|
618
|
+
readonly type: "input_text";
|
|
619
|
+
readonly text: string;
|
|
620
|
+
} | {
|
|
621
|
+
readonly type: "input_video";
|
|
622
|
+
readonly video_url: string;
|
|
623
|
+
} | {
|
|
624
|
+
readonly type: "input_image";
|
|
625
|
+
readonly image_url: string;
|
|
626
|
+
readonly detail?: string | undefined;
|
|
627
|
+
} | {
|
|
628
|
+
readonly type: "input_file";
|
|
629
|
+
readonly filename?: string | undefined;
|
|
630
|
+
readonly detail?: string | undefined;
|
|
631
|
+
readonly file_data?: string | undefined;
|
|
632
|
+
readonly file_url?: string | undefined;
|
|
633
|
+
})[];
|
|
634
|
+
} | {
|
|
635
|
+
readonly type: "reasoning";
|
|
636
|
+
readonly id?: string | undefined;
|
|
637
|
+
readonly summary: readonly {
|
|
638
|
+
readonly type: "summary_text";
|
|
639
|
+
readonly text: string;
|
|
640
|
+
}[];
|
|
641
|
+
readonly encrypted_content?: string | null | undefined;
|
|
642
|
+
} | {
|
|
643
|
+
readonly type: "compaction";
|
|
644
|
+
readonly id?: string | null | undefined;
|
|
645
|
+
readonly encrypted_content: string;
|
|
646
|
+
} | {
|
|
647
|
+
readonly type: "message";
|
|
648
|
+
readonly role: "user";
|
|
649
|
+
readonly content: readonly ({
|
|
650
|
+
readonly type: "input_text";
|
|
651
|
+
readonly text: string;
|
|
652
|
+
} | {
|
|
653
|
+
readonly type: "input_video";
|
|
654
|
+
readonly video_url: string;
|
|
655
|
+
} | {
|
|
656
|
+
readonly type: "input_image";
|
|
657
|
+
readonly image_url: string;
|
|
658
|
+
readonly detail?: string | undefined;
|
|
659
|
+
} | {
|
|
660
|
+
readonly type: "input_file";
|
|
661
|
+
readonly filename?: string | undefined;
|
|
662
|
+
readonly detail?: string | undefined;
|
|
663
|
+
readonly file_data?: string | undefined;
|
|
664
|
+
readonly file_url?: string | undefined;
|
|
665
|
+
})[];
|
|
666
|
+
readonly id?: string | undefined;
|
|
667
|
+
readonly status?: string | undefined;
|
|
668
|
+
} | {
|
|
669
|
+
readonly type: "message";
|
|
670
|
+
readonly id?: string | undefined;
|
|
671
|
+
readonly role: "assistant";
|
|
672
|
+
readonly content: readonly {
|
|
673
|
+
readonly type: "output_text";
|
|
674
|
+
readonly text: string;
|
|
675
|
+
}[];
|
|
676
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
677
|
+
readonly status?: string | undefined;
|
|
678
|
+
} | {
|
|
679
|
+
readonly type: "function_call";
|
|
680
|
+
readonly id?: string | undefined;
|
|
681
|
+
readonly call_id: string;
|
|
682
|
+
readonly name: string;
|
|
683
|
+
readonly namespace?: string | undefined;
|
|
684
|
+
readonly arguments: string;
|
|
685
|
+
} | {
|
|
686
|
+
readonly type: "custom_tool_call";
|
|
687
|
+
readonly id?: string | undefined;
|
|
688
|
+
readonly call_id: string;
|
|
689
|
+
readonly name: string;
|
|
690
|
+
readonly input: string;
|
|
691
|
+
} | {
|
|
692
|
+
readonly [x: string]: unknown;
|
|
693
|
+
readonly type: "web_search_call";
|
|
694
|
+
readonly id: string;
|
|
695
|
+
readonly status?: string | undefined;
|
|
696
|
+
readonly action?: {
|
|
697
|
+
readonly [x: string]: unknown;
|
|
698
|
+
} | null | undefined;
|
|
699
|
+
} | {
|
|
700
|
+
readonly [x: string]: unknown;
|
|
701
|
+
readonly type: "file_search_call";
|
|
702
|
+
readonly id: string;
|
|
703
|
+
readonly status?: string | undefined;
|
|
704
|
+
readonly queries?: readonly string[] | undefined;
|
|
705
|
+
readonly results?: readonly {
|
|
706
|
+
readonly [x: string]: unknown;
|
|
707
|
+
}[] | null | undefined;
|
|
708
|
+
} | {
|
|
709
|
+
readonly [x: string]: unknown;
|
|
710
|
+
readonly type: "code_interpreter_call";
|
|
711
|
+
readonly id: string;
|
|
712
|
+
readonly status?: string | undefined;
|
|
713
|
+
readonly code?: string | null | undefined;
|
|
714
|
+
readonly container_id?: string | null | undefined;
|
|
715
|
+
readonly outputs?: readonly {
|
|
716
|
+
readonly [x: string]: unknown;
|
|
717
|
+
}[] | null | undefined;
|
|
718
|
+
} | {
|
|
719
|
+
readonly [x: string]: unknown;
|
|
720
|
+
readonly type: "mcp_call";
|
|
721
|
+
readonly id: string;
|
|
722
|
+
readonly status?: string | undefined;
|
|
723
|
+
readonly server_label?: string | undefined;
|
|
724
|
+
readonly name?: string | undefined;
|
|
725
|
+
readonly arguments?: string | undefined;
|
|
726
|
+
readonly output?: string | null | undefined;
|
|
727
|
+
readonly error?: unknown;
|
|
728
|
+
} | {
|
|
729
|
+
readonly [x: string]: unknown;
|
|
730
|
+
readonly type: string;
|
|
731
|
+
readonly id: string;
|
|
732
|
+
})[];
|
|
733
|
+
readonly instructions?: string | undefined;
|
|
734
|
+
readonly store?: boolean | undefined;
|
|
735
|
+
readonly metadata?: {
|
|
736
|
+
readonly [x: string]: string;
|
|
737
|
+
} | undefined;
|
|
738
|
+
readonly safety_identifier?: string | undefined;
|
|
739
|
+
readonly stream_options?: {
|
|
740
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
741
|
+
} | undefined;
|
|
742
|
+
readonly top_logprobs?: number | undefined;
|
|
743
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
744
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
745
|
+
readonly prompt_cache_key?: string | undefined;
|
|
746
|
+
readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
|
|
747
|
+
readonly text?: {
|
|
748
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
749
|
+
} | undefined;
|
|
750
|
+
readonly max_output_tokens?: number | undefined;
|
|
751
|
+
readonly max_tool_calls?: number | undefined;
|
|
752
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
753
|
+
readonly temperature?: number | undefined;
|
|
754
|
+
readonly top_p?: number | undefined;
|
|
755
|
+
readonly presence_penalty?: number | undefined;
|
|
756
|
+
readonly frequency_penalty?: number | undefined;
|
|
757
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
758
|
+
readonly prompt_cache_options?: {
|
|
759
|
+
readonly ttl?: string | undefined;
|
|
760
|
+
} | undefined;
|
|
761
|
+
readonly tools?: readonly ({
|
|
762
|
+
readonly type: "custom";
|
|
763
|
+
readonly name: string;
|
|
764
|
+
readonly description: string;
|
|
765
|
+
readonly format: {
|
|
766
|
+
readonly type: "text";
|
|
767
|
+
} | {
|
|
768
|
+
readonly type: "grammar";
|
|
769
|
+
readonly syntax: "lark" | "regex";
|
|
770
|
+
readonly definition: string;
|
|
771
|
+
};
|
|
772
|
+
} | {
|
|
773
|
+
readonly type: "namespace";
|
|
774
|
+
readonly name: string;
|
|
775
|
+
readonly description: string;
|
|
776
|
+
readonly tools: readonly {
|
|
777
|
+
readonly type: "function";
|
|
778
|
+
readonly name: string;
|
|
779
|
+
readonly description: string;
|
|
780
|
+
readonly parameters: {
|
|
781
|
+
readonly [x: string]: unknown;
|
|
782
|
+
};
|
|
783
|
+
readonly strict?: boolean | undefined;
|
|
784
|
+
}[];
|
|
785
|
+
} | {
|
|
786
|
+
readonly type: "function";
|
|
787
|
+
readonly name: string;
|
|
788
|
+
readonly description: string;
|
|
789
|
+
readonly parameters: {
|
|
790
|
+
readonly [x: string]: unknown;
|
|
791
|
+
};
|
|
792
|
+
readonly strict?: boolean | undefined;
|
|
793
|
+
} | {
|
|
794
|
+
readonly type: "image_generation";
|
|
795
|
+
readonly action?: "auto" | "edit" | "generate" | undefined;
|
|
796
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
797
|
+
readonly input_fidelity?: "high" | "low" | undefined;
|
|
798
|
+
readonly output_compression?: number | undefined;
|
|
799
|
+
readonly output_format?: "jpeg" | "png" | "webp" | undefined;
|
|
800
|
+
readonly partial_images?: number | undefined;
|
|
801
|
+
readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
|
|
802
|
+
readonly size?: string | undefined;
|
|
803
|
+
})[] | undefined;
|
|
804
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
805
|
+
readonly type: "custom" | "function";
|
|
806
|
+
readonly name: string;
|
|
807
|
+
} | {
|
|
808
|
+
readonly type: "allowed_tools";
|
|
809
|
+
readonly mode: "auto" | "none" | "required";
|
|
810
|
+
readonly tools: readonly {
|
|
811
|
+
readonly type: "custom" | "function";
|
|
812
|
+
readonly name: string;
|
|
813
|
+
}[];
|
|
814
|
+
} | {
|
|
815
|
+
readonly type: "image_generation";
|
|
816
|
+
} | undefined;
|
|
817
|
+
readonly reasoning?: {
|
|
818
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
819
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
820
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
821
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
822
|
+
} | undefined;
|
|
823
|
+
readonly context_management?: readonly {
|
|
824
|
+
readonly type: "compaction";
|
|
825
|
+
readonly compact_threshold?: number | undefined;
|
|
826
|
+
}[] | undefined;
|
|
827
|
+
readonly stream: true;
|
|
828
|
+
}, string>;
|
|
829
|
+
export declare const channelTransport: (options: import("./open-responses-channel.js").Options) => import("../route/transport/index.js").Transport<{
|
|
830
|
+
readonly model: string;
|
|
831
|
+
readonly input: readonly ({
|
|
832
|
+
readonly type: "configuration_update";
|
|
833
|
+
readonly reasoning: {
|
|
834
|
+
readonly effort: OpenResponsesOptions.ReasoningEffort;
|
|
835
|
+
};
|
|
836
|
+
} | {
|
|
837
|
+
readonly type: "additional_tools";
|
|
838
|
+
readonly role: "developer";
|
|
839
|
+
readonly tools: readonly ({
|
|
840
|
+
readonly type: "custom";
|
|
841
|
+
readonly name: string;
|
|
842
|
+
readonly description: string;
|
|
843
|
+
readonly format: {
|
|
844
|
+
readonly type: "text";
|
|
845
|
+
} | {
|
|
846
|
+
readonly type: "grammar";
|
|
847
|
+
readonly syntax: "lark" | "regex";
|
|
848
|
+
readonly definition: string;
|
|
849
|
+
};
|
|
850
|
+
} | {
|
|
851
|
+
readonly type: "function";
|
|
852
|
+
readonly name: string;
|
|
853
|
+
readonly description: string;
|
|
854
|
+
readonly parameters: {
|
|
855
|
+
readonly [x: string]: unknown;
|
|
856
|
+
};
|
|
857
|
+
readonly strict?: boolean | undefined;
|
|
858
|
+
} | {
|
|
859
|
+
readonly [x: string]: unknown;
|
|
860
|
+
readonly type: string;
|
|
861
|
+
})[];
|
|
862
|
+
} | {
|
|
863
|
+
readonly type: "message";
|
|
864
|
+
readonly role: "system";
|
|
865
|
+
readonly content: string;
|
|
866
|
+
} | {
|
|
867
|
+
readonly type: "message";
|
|
868
|
+
readonly role: "developer";
|
|
869
|
+
readonly content: string;
|
|
870
|
+
} | {
|
|
871
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
872
|
+
readonly call_id: string;
|
|
873
|
+
readonly output: string | readonly ({
|
|
874
|
+
readonly type: "input_text";
|
|
875
|
+
readonly text: string;
|
|
876
|
+
} | {
|
|
877
|
+
readonly type: "input_video";
|
|
878
|
+
readonly video_url: string;
|
|
879
|
+
} | {
|
|
880
|
+
readonly type: "input_image";
|
|
881
|
+
readonly image_url: string;
|
|
882
|
+
readonly detail?: string | undefined;
|
|
883
|
+
} | {
|
|
884
|
+
readonly type: "input_file";
|
|
885
|
+
readonly filename?: string | undefined;
|
|
886
|
+
readonly detail?: string | undefined;
|
|
887
|
+
readonly file_data?: string | undefined;
|
|
888
|
+
readonly file_url?: string | undefined;
|
|
889
|
+
})[];
|
|
890
|
+
} | {
|
|
891
|
+
readonly type: "reasoning";
|
|
892
|
+
readonly id?: string | undefined;
|
|
893
|
+
readonly summary: readonly {
|
|
894
|
+
readonly type: "summary_text";
|
|
895
|
+
readonly text: string;
|
|
896
|
+
}[];
|
|
897
|
+
readonly encrypted_content?: string | null | undefined;
|
|
898
|
+
} | {
|
|
899
|
+
readonly type: "compaction";
|
|
900
|
+
readonly id?: string | null | undefined;
|
|
901
|
+
readonly encrypted_content: string;
|
|
902
|
+
} | {
|
|
903
|
+
readonly type: "message";
|
|
904
|
+
readonly role: "user";
|
|
905
|
+
readonly content: readonly ({
|
|
906
|
+
readonly type: "input_text";
|
|
907
|
+
readonly text: string;
|
|
908
|
+
} | {
|
|
909
|
+
readonly type: "input_video";
|
|
910
|
+
readonly video_url: string;
|
|
911
|
+
} | {
|
|
912
|
+
readonly type: "input_image";
|
|
913
|
+
readonly image_url: string;
|
|
914
|
+
readonly detail?: string | undefined;
|
|
915
|
+
} | {
|
|
916
|
+
readonly type: "input_file";
|
|
917
|
+
readonly filename?: string | undefined;
|
|
918
|
+
readonly detail?: string | undefined;
|
|
919
|
+
readonly file_data?: string | undefined;
|
|
920
|
+
readonly file_url?: string | undefined;
|
|
921
|
+
})[];
|
|
922
|
+
readonly id?: string | undefined;
|
|
923
|
+
readonly status?: string | undefined;
|
|
924
|
+
} | {
|
|
925
|
+
readonly type: "message";
|
|
926
|
+
readonly id?: string | undefined;
|
|
927
|
+
readonly role: "assistant";
|
|
928
|
+
readonly content: readonly {
|
|
929
|
+
readonly type: "output_text";
|
|
930
|
+
readonly text: string;
|
|
931
|
+
}[];
|
|
932
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
933
|
+
readonly status?: string | undefined;
|
|
934
|
+
} | {
|
|
935
|
+
readonly type: "function_call";
|
|
936
|
+
readonly id?: string | undefined;
|
|
937
|
+
readonly call_id: string;
|
|
938
|
+
readonly name: string;
|
|
939
|
+
readonly namespace?: string | undefined;
|
|
940
|
+
readonly arguments: string;
|
|
941
|
+
} | {
|
|
942
|
+
readonly type: "custom_tool_call";
|
|
943
|
+
readonly id?: string | undefined;
|
|
944
|
+
readonly call_id: string;
|
|
945
|
+
readonly name: string;
|
|
946
|
+
readonly input: string;
|
|
947
|
+
} | {
|
|
948
|
+
readonly [x: string]: unknown;
|
|
949
|
+
readonly type: "web_search_call";
|
|
950
|
+
readonly id: string;
|
|
951
|
+
readonly status?: string | undefined;
|
|
952
|
+
readonly action?: {
|
|
953
|
+
readonly [x: string]: unknown;
|
|
954
|
+
} | null | undefined;
|
|
955
|
+
} | {
|
|
956
|
+
readonly [x: string]: unknown;
|
|
957
|
+
readonly type: "file_search_call";
|
|
958
|
+
readonly id: string;
|
|
959
|
+
readonly status?: string | undefined;
|
|
960
|
+
readonly queries?: readonly string[] | undefined;
|
|
961
|
+
readonly results?: readonly {
|
|
962
|
+
readonly [x: string]: unknown;
|
|
963
|
+
}[] | null | undefined;
|
|
964
|
+
} | {
|
|
965
|
+
readonly [x: string]: unknown;
|
|
966
|
+
readonly type: "code_interpreter_call";
|
|
967
|
+
readonly id: string;
|
|
968
|
+
readonly status?: string | undefined;
|
|
969
|
+
readonly code?: string | null | undefined;
|
|
970
|
+
readonly container_id?: string | null | undefined;
|
|
971
|
+
readonly outputs?: readonly {
|
|
972
|
+
readonly [x: string]: unknown;
|
|
973
|
+
}[] | null | undefined;
|
|
974
|
+
} | {
|
|
975
|
+
readonly [x: string]: unknown;
|
|
976
|
+
readonly type: "mcp_call";
|
|
977
|
+
readonly id: string;
|
|
978
|
+
readonly status?: string | undefined;
|
|
979
|
+
readonly server_label?: string | undefined;
|
|
980
|
+
readonly name?: string | undefined;
|
|
981
|
+
readonly arguments?: string | undefined;
|
|
982
|
+
readonly output?: string | null | undefined;
|
|
983
|
+
readonly error?: unknown;
|
|
984
|
+
} | {
|
|
985
|
+
readonly [x: string]: unknown;
|
|
986
|
+
readonly type: string;
|
|
987
|
+
readonly id: string;
|
|
988
|
+
})[];
|
|
989
|
+
readonly instructions?: string | undefined;
|
|
990
|
+
readonly store?: boolean | undefined;
|
|
991
|
+
readonly metadata?: {
|
|
992
|
+
readonly [x: string]: string;
|
|
993
|
+
} | undefined;
|
|
994
|
+
readonly safety_identifier?: string | undefined;
|
|
995
|
+
readonly stream_options?: {
|
|
996
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
997
|
+
} | undefined;
|
|
998
|
+
readonly top_logprobs?: number | undefined;
|
|
999
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
1000
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1001
|
+
readonly prompt_cache_key?: string | undefined;
|
|
1002
|
+
readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
|
|
1003
|
+
readonly text?: {
|
|
1004
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1005
|
+
} | undefined;
|
|
1006
|
+
readonly max_output_tokens?: number | undefined;
|
|
1007
|
+
readonly max_tool_calls?: number | undefined;
|
|
1008
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
1009
|
+
readonly temperature?: number | undefined;
|
|
1010
|
+
readonly top_p?: number | undefined;
|
|
1011
|
+
readonly presence_penalty?: number | undefined;
|
|
1012
|
+
readonly frequency_penalty?: number | undefined;
|
|
1013
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
1014
|
+
readonly prompt_cache_options?: {
|
|
1015
|
+
readonly ttl?: string | undefined;
|
|
1016
|
+
} | undefined;
|
|
1017
|
+
readonly tools?: readonly ({
|
|
1018
|
+
readonly type: "custom";
|
|
1019
|
+
readonly name: string;
|
|
1020
|
+
readonly description: string;
|
|
1021
|
+
readonly format: {
|
|
1022
|
+
readonly type: "text";
|
|
1023
|
+
} | {
|
|
1024
|
+
readonly type: "grammar";
|
|
1025
|
+
readonly syntax: "lark" | "regex";
|
|
1026
|
+
readonly definition: string;
|
|
1027
|
+
};
|
|
1028
|
+
} | {
|
|
1029
|
+
readonly type: "namespace";
|
|
1030
|
+
readonly name: string;
|
|
1031
|
+
readonly description: string;
|
|
1032
|
+
readonly tools: readonly {
|
|
1033
|
+
readonly type: "function";
|
|
1034
|
+
readonly name: string;
|
|
1035
|
+
readonly description: string;
|
|
1036
|
+
readonly parameters: {
|
|
1037
|
+
readonly [x: string]: unknown;
|
|
1038
|
+
};
|
|
1039
|
+
readonly strict?: boolean | undefined;
|
|
1040
|
+
}[];
|
|
1041
|
+
} | {
|
|
1042
|
+
readonly type: "function";
|
|
1043
|
+
readonly name: string;
|
|
1044
|
+
readonly description: string;
|
|
1045
|
+
readonly parameters: {
|
|
1046
|
+
readonly [x: string]: unknown;
|
|
1047
|
+
};
|
|
1048
|
+
readonly strict?: boolean | undefined;
|
|
1049
|
+
} | {
|
|
1050
|
+
readonly type: "image_generation";
|
|
1051
|
+
readonly action?: "auto" | "edit" | "generate" | undefined;
|
|
1052
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
1053
|
+
readonly input_fidelity?: "high" | "low" | undefined;
|
|
1054
|
+
readonly output_compression?: number | undefined;
|
|
1055
|
+
readonly output_format?: "jpeg" | "png" | "webp" | undefined;
|
|
1056
|
+
readonly partial_images?: number | undefined;
|
|
1057
|
+
readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
|
|
1058
|
+
readonly size?: string | undefined;
|
|
1059
|
+
})[] | undefined;
|
|
1060
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
1061
|
+
readonly type: "custom" | "function";
|
|
1062
|
+
readonly name: string;
|
|
1063
|
+
} | {
|
|
1064
|
+
readonly type: "allowed_tools";
|
|
1065
|
+
readonly mode: "auto" | "none" | "required";
|
|
1066
|
+
readonly tools: readonly {
|
|
1067
|
+
readonly type: "custom" | "function";
|
|
1068
|
+
readonly name: string;
|
|
1069
|
+
}[];
|
|
1070
|
+
} | {
|
|
1071
|
+
readonly type: "image_generation";
|
|
1072
|
+
} | undefined;
|
|
1073
|
+
readonly reasoning?: {
|
|
1074
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1075
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1076
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
1077
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
1078
|
+
} | undefined;
|
|
1079
|
+
readonly context_management?: readonly {
|
|
1080
|
+
readonly type: "compaction";
|
|
1081
|
+
readonly compact_threshold?: number | undefined;
|
|
1082
|
+
}[] | undefined;
|
|
1083
|
+
readonly stream: true;
|
|
1084
|
+
}, import("./open-responses-channel.js").Prepared, string>;
|
|
1085
|
+
export declare const transport: import("../route/transport/index.js").Transport<{
|
|
1086
|
+
readonly model: string;
|
|
1087
|
+
readonly input: readonly ({
|
|
1088
|
+
readonly type: "configuration_update";
|
|
1089
|
+
readonly reasoning: {
|
|
1090
|
+
readonly effort: OpenResponsesOptions.ReasoningEffort;
|
|
1091
|
+
};
|
|
1092
|
+
} | {
|
|
1093
|
+
readonly type: "additional_tools";
|
|
1094
|
+
readonly role: "developer";
|
|
1095
|
+
readonly tools: readonly ({
|
|
1096
|
+
readonly type: "custom";
|
|
1097
|
+
readonly name: string;
|
|
1098
|
+
readonly description: string;
|
|
1099
|
+
readonly format: {
|
|
1100
|
+
readonly type: "text";
|
|
1101
|
+
} | {
|
|
1102
|
+
readonly type: "grammar";
|
|
1103
|
+
readonly syntax: "lark" | "regex";
|
|
1104
|
+
readonly definition: string;
|
|
1105
|
+
};
|
|
1106
|
+
} | {
|
|
1107
|
+
readonly type: "function";
|
|
1108
|
+
readonly name: string;
|
|
1109
|
+
readonly description: string;
|
|
1110
|
+
readonly parameters: {
|
|
1111
|
+
readonly [x: string]: unknown;
|
|
1112
|
+
};
|
|
1113
|
+
readonly strict?: boolean | undefined;
|
|
1114
|
+
} | {
|
|
1115
|
+
readonly [x: string]: unknown;
|
|
1116
|
+
readonly type: string;
|
|
1117
|
+
})[];
|
|
1118
|
+
} | {
|
|
1119
|
+
readonly type: "message";
|
|
1120
|
+
readonly role: "system";
|
|
1121
|
+
readonly content: string;
|
|
1122
|
+
} | {
|
|
1123
|
+
readonly type: "message";
|
|
1124
|
+
readonly role: "developer";
|
|
1125
|
+
readonly content: string;
|
|
1126
|
+
} | {
|
|
1127
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
1128
|
+
readonly call_id: string;
|
|
1129
|
+
readonly output: string | readonly ({
|
|
1130
|
+
readonly type: "input_text";
|
|
1131
|
+
readonly text: string;
|
|
1132
|
+
} | {
|
|
1133
|
+
readonly type: "input_video";
|
|
1134
|
+
readonly video_url: string;
|
|
1135
|
+
} | {
|
|
1136
|
+
readonly type: "input_image";
|
|
1137
|
+
readonly image_url: string;
|
|
1138
|
+
readonly detail?: string | undefined;
|
|
1139
|
+
} | {
|
|
1140
|
+
readonly type: "input_file";
|
|
1141
|
+
readonly filename?: string | undefined;
|
|
1142
|
+
readonly detail?: string | undefined;
|
|
1143
|
+
readonly file_data?: string | undefined;
|
|
1144
|
+
readonly file_url?: string | undefined;
|
|
1145
|
+
})[];
|
|
1146
|
+
} | {
|
|
1147
|
+
readonly type: "reasoning";
|
|
1148
|
+
readonly id?: string | undefined;
|
|
1149
|
+
readonly summary: readonly {
|
|
1150
|
+
readonly type: "summary_text";
|
|
1151
|
+
readonly text: string;
|
|
1152
|
+
}[];
|
|
1153
|
+
readonly encrypted_content?: string | null | undefined;
|
|
1154
|
+
} | {
|
|
1155
|
+
readonly type: "compaction";
|
|
1156
|
+
readonly id?: string | null | undefined;
|
|
1157
|
+
readonly encrypted_content: string;
|
|
1158
|
+
} | {
|
|
1159
|
+
readonly type: "message";
|
|
1160
|
+
readonly role: "user";
|
|
1161
|
+
readonly content: readonly ({
|
|
1162
|
+
readonly type: "input_text";
|
|
1163
|
+
readonly text: string;
|
|
1164
|
+
} | {
|
|
1165
|
+
readonly type: "input_video";
|
|
1166
|
+
readonly video_url: string;
|
|
1167
|
+
} | {
|
|
1168
|
+
readonly type: "input_image";
|
|
1169
|
+
readonly image_url: string;
|
|
1170
|
+
readonly detail?: string | undefined;
|
|
1171
|
+
} | {
|
|
1172
|
+
readonly type: "input_file";
|
|
1173
|
+
readonly filename?: string | undefined;
|
|
1174
|
+
readonly detail?: string | undefined;
|
|
1175
|
+
readonly file_data?: string | undefined;
|
|
1176
|
+
readonly file_url?: string | undefined;
|
|
1177
|
+
})[];
|
|
1178
|
+
readonly id?: string | undefined;
|
|
1179
|
+
readonly status?: string | undefined;
|
|
1180
|
+
} | {
|
|
1181
|
+
readonly type: "message";
|
|
1182
|
+
readonly id?: string | undefined;
|
|
1183
|
+
readonly role: "assistant";
|
|
1184
|
+
readonly content: readonly {
|
|
1185
|
+
readonly type: "output_text";
|
|
1186
|
+
readonly text: string;
|
|
1187
|
+
}[];
|
|
1188
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
1189
|
+
readonly status?: string | undefined;
|
|
1190
|
+
} | {
|
|
1191
|
+
readonly type: "function_call";
|
|
1192
|
+
readonly id?: string | undefined;
|
|
1193
|
+
readonly call_id: string;
|
|
1194
|
+
readonly name: string;
|
|
1195
|
+
readonly namespace?: string | undefined;
|
|
1196
|
+
readonly arguments: string;
|
|
1197
|
+
} | {
|
|
1198
|
+
readonly type: "custom_tool_call";
|
|
1199
|
+
readonly id?: string | undefined;
|
|
1200
|
+
readonly call_id: string;
|
|
1201
|
+
readonly name: string;
|
|
1202
|
+
readonly input: string;
|
|
1203
|
+
} | {
|
|
1204
|
+
readonly [x: string]: unknown;
|
|
1205
|
+
readonly type: "web_search_call";
|
|
1206
|
+
readonly id: string;
|
|
1207
|
+
readonly status?: string | undefined;
|
|
1208
|
+
readonly action?: {
|
|
1209
|
+
readonly [x: string]: unknown;
|
|
1210
|
+
} | null | undefined;
|
|
1211
|
+
} | {
|
|
1212
|
+
readonly [x: string]: unknown;
|
|
1213
|
+
readonly type: "file_search_call";
|
|
1214
|
+
readonly id: string;
|
|
1215
|
+
readonly status?: string | undefined;
|
|
1216
|
+
readonly queries?: readonly string[] | undefined;
|
|
1217
|
+
readonly results?: readonly {
|
|
1218
|
+
readonly [x: string]: unknown;
|
|
1219
|
+
}[] | null | undefined;
|
|
1220
|
+
} | {
|
|
1221
|
+
readonly [x: string]: unknown;
|
|
1222
|
+
readonly type: "code_interpreter_call";
|
|
1223
|
+
readonly id: string;
|
|
1224
|
+
readonly status?: string | undefined;
|
|
1225
|
+
readonly code?: string | null | undefined;
|
|
1226
|
+
readonly container_id?: string | null | undefined;
|
|
1227
|
+
readonly outputs?: readonly {
|
|
1228
|
+
readonly [x: string]: unknown;
|
|
1229
|
+
}[] | null | undefined;
|
|
1230
|
+
} | {
|
|
1231
|
+
readonly [x: string]: unknown;
|
|
1232
|
+
readonly type: "mcp_call";
|
|
1233
|
+
readonly id: string;
|
|
1234
|
+
readonly status?: string | undefined;
|
|
1235
|
+
readonly server_label?: string | undefined;
|
|
1236
|
+
readonly name?: string | undefined;
|
|
1237
|
+
readonly arguments?: string | undefined;
|
|
1238
|
+
readonly output?: string | null | undefined;
|
|
1239
|
+
readonly error?: unknown;
|
|
1240
|
+
} | {
|
|
1241
|
+
readonly [x: string]: unknown;
|
|
1242
|
+
readonly type: string;
|
|
1243
|
+
readonly id: string;
|
|
1244
|
+
})[];
|
|
1245
|
+
readonly instructions?: string | undefined;
|
|
1246
|
+
readonly store?: boolean | undefined;
|
|
1247
|
+
readonly metadata?: {
|
|
1248
|
+
readonly [x: string]: string;
|
|
1249
|
+
} | undefined;
|
|
1250
|
+
readonly safety_identifier?: string | undefined;
|
|
1251
|
+
readonly stream_options?: {
|
|
1252
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
1253
|
+
} | undefined;
|
|
1254
|
+
readonly top_logprobs?: number | undefined;
|
|
1255
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
1256
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1257
|
+
readonly prompt_cache_key?: string | undefined;
|
|
1258
|
+
readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
|
|
1259
|
+
readonly text?: {
|
|
1260
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1261
|
+
} | undefined;
|
|
1262
|
+
readonly max_output_tokens?: number | undefined;
|
|
1263
|
+
readonly max_tool_calls?: number | undefined;
|
|
1264
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
1265
|
+
readonly temperature?: number | undefined;
|
|
1266
|
+
readonly top_p?: number | undefined;
|
|
1267
|
+
readonly presence_penalty?: number | undefined;
|
|
1268
|
+
readonly frequency_penalty?: number | undefined;
|
|
1269
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
1270
|
+
readonly prompt_cache_options?: {
|
|
1271
|
+
readonly ttl?: string | undefined;
|
|
1272
|
+
} | undefined;
|
|
1273
|
+
readonly tools?: readonly ({
|
|
1274
|
+
readonly type: "custom";
|
|
1275
|
+
readonly name: string;
|
|
1276
|
+
readonly description: string;
|
|
1277
|
+
readonly format: {
|
|
1278
|
+
readonly type: "text";
|
|
1279
|
+
} | {
|
|
1280
|
+
readonly type: "grammar";
|
|
1281
|
+
readonly syntax: "lark" | "regex";
|
|
1282
|
+
readonly definition: string;
|
|
1283
|
+
};
|
|
1284
|
+
} | {
|
|
1285
|
+
readonly type: "namespace";
|
|
1286
|
+
readonly name: string;
|
|
1287
|
+
readonly description: string;
|
|
1288
|
+
readonly tools: readonly {
|
|
1289
|
+
readonly type: "function";
|
|
1290
|
+
readonly name: string;
|
|
1291
|
+
readonly description: string;
|
|
1292
|
+
readonly parameters: {
|
|
1293
|
+
readonly [x: string]: unknown;
|
|
1294
|
+
};
|
|
1295
|
+
readonly strict?: boolean | undefined;
|
|
1296
|
+
}[];
|
|
1297
|
+
} | {
|
|
1298
|
+
readonly type: "function";
|
|
1299
|
+
readonly name: string;
|
|
1300
|
+
readonly description: string;
|
|
1301
|
+
readonly parameters: {
|
|
1302
|
+
readonly [x: string]: unknown;
|
|
1303
|
+
};
|
|
1304
|
+
readonly strict?: boolean | undefined;
|
|
1305
|
+
} | {
|
|
1306
|
+
readonly type: "image_generation";
|
|
1307
|
+
readonly action?: "auto" | "edit" | "generate" | undefined;
|
|
1308
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
1309
|
+
readonly input_fidelity?: "high" | "low" | undefined;
|
|
1310
|
+
readonly output_compression?: number | undefined;
|
|
1311
|
+
readonly output_format?: "jpeg" | "png" | "webp" | undefined;
|
|
1312
|
+
readonly partial_images?: number | undefined;
|
|
1313
|
+
readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
|
|
1314
|
+
readonly size?: string | undefined;
|
|
1315
|
+
})[] | undefined;
|
|
1316
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
1317
|
+
readonly type: "custom" | "function";
|
|
1318
|
+
readonly name: string;
|
|
1319
|
+
} | {
|
|
1320
|
+
readonly type: "allowed_tools";
|
|
1321
|
+
readonly mode: "auto" | "none" | "required";
|
|
1322
|
+
readonly tools: readonly {
|
|
1323
|
+
readonly type: "custom" | "function";
|
|
1324
|
+
readonly name: string;
|
|
1325
|
+
}[];
|
|
1326
|
+
} | {
|
|
1327
|
+
readonly type: "image_generation";
|
|
1328
|
+
} | undefined;
|
|
1329
|
+
readonly reasoning?: {
|
|
1330
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1331
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1332
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
1333
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
1334
|
+
} | undefined;
|
|
1335
|
+
readonly context_management?: readonly {
|
|
1336
|
+
readonly type: "compaction";
|
|
1337
|
+
readonly compact_threshold?: number | undefined;
|
|
1338
|
+
}[] | undefined;
|
|
1339
|
+
readonly stream: true;
|
|
1340
|
+
}, import("./open-responses-channel.js").Prepared, string>;
|
|
1341
|
+
export declare const route: Route<{
|
|
1342
|
+
readonly model: string;
|
|
1343
|
+
readonly input: readonly ({
|
|
1344
|
+
readonly type: "configuration_update";
|
|
1345
|
+
readonly reasoning: {
|
|
1346
|
+
readonly effort: OpenResponsesOptions.ReasoningEffort;
|
|
1347
|
+
};
|
|
1348
|
+
} | {
|
|
1349
|
+
readonly type: "additional_tools";
|
|
1350
|
+
readonly role: "developer";
|
|
1351
|
+
readonly tools: readonly ({
|
|
1352
|
+
readonly type: "custom";
|
|
1353
|
+
readonly name: string;
|
|
1354
|
+
readonly description: string;
|
|
1355
|
+
readonly format: {
|
|
1356
|
+
readonly type: "text";
|
|
1357
|
+
} | {
|
|
1358
|
+
readonly type: "grammar";
|
|
1359
|
+
readonly syntax: "lark" | "regex";
|
|
1360
|
+
readonly definition: string;
|
|
1361
|
+
};
|
|
1362
|
+
} | {
|
|
1363
|
+
readonly type: "function";
|
|
1364
|
+
readonly name: string;
|
|
1365
|
+
readonly description: string;
|
|
1366
|
+
readonly parameters: {
|
|
1367
|
+
readonly [x: string]: unknown;
|
|
1368
|
+
};
|
|
1369
|
+
readonly strict?: boolean | undefined;
|
|
1370
|
+
} | {
|
|
1371
|
+
readonly [x: string]: unknown;
|
|
1372
|
+
readonly type: string;
|
|
1373
|
+
})[];
|
|
1374
|
+
} | {
|
|
1375
|
+
readonly type: "message";
|
|
1376
|
+
readonly role: "system";
|
|
1377
|
+
readonly content: string;
|
|
1378
|
+
} | {
|
|
1379
|
+
readonly type: "message";
|
|
1380
|
+
readonly role: "developer";
|
|
1381
|
+
readonly content: string;
|
|
1382
|
+
} | {
|
|
1383
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
1384
|
+
readonly call_id: string;
|
|
1385
|
+
readonly output: string | readonly ({
|
|
1386
|
+
readonly type: "input_text";
|
|
1387
|
+
readonly text: string;
|
|
1388
|
+
} | {
|
|
1389
|
+
readonly type: "input_video";
|
|
1390
|
+
readonly video_url: string;
|
|
1391
|
+
} | {
|
|
1392
|
+
readonly type: "input_image";
|
|
1393
|
+
readonly image_url: string;
|
|
1394
|
+
readonly detail?: string | undefined;
|
|
1395
|
+
} | {
|
|
1396
|
+
readonly type: "input_file";
|
|
1397
|
+
readonly filename?: string | undefined;
|
|
1398
|
+
readonly detail?: string | undefined;
|
|
1399
|
+
readonly file_data?: string | undefined;
|
|
1400
|
+
readonly file_url?: string | undefined;
|
|
1401
|
+
})[];
|
|
1402
|
+
} | {
|
|
1403
|
+
readonly type: "reasoning";
|
|
1404
|
+
readonly id?: string | undefined;
|
|
1405
|
+
readonly summary: readonly {
|
|
1406
|
+
readonly type: "summary_text";
|
|
1407
|
+
readonly text: string;
|
|
1408
|
+
}[];
|
|
1409
|
+
readonly encrypted_content?: string | null | undefined;
|
|
1410
|
+
} | {
|
|
1411
|
+
readonly type: "compaction";
|
|
1412
|
+
readonly id?: string | null | undefined;
|
|
1413
|
+
readonly encrypted_content: string;
|
|
1414
|
+
} | {
|
|
1415
|
+
readonly type: "message";
|
|
1416
|
+
readonly role: "user";
|
|
1417
|
+
readonly content: readonly ({
|
|
1418
|
+
readonly type: "input_text";
|
|
1419
|
+
readonly text: string;
|
|
1420
|
+
} | {
|
|
1421
|
+
readonly type: "input_video";
|
|
1422
|
+
readonly video_url: string;
|
|
1423
|
+
} | {
|
|
1424
|
+
readonly type: "input_image";
|
|
1425
|
+
readonly image_url: string;
|
|
1426
|
+
readonly detail?: string | undefined;
|
|
1427
|
+
} | {
|
|
1428
|
+
readonly type: "input_file";
|
|
1429
|
+
readonly filename?: string | undefined;
|
|
1430
|
+
readonly detail?: string | undefined;
|
|
1431
|
+
readonly file_data?: string | undefined;
|
|
1432
|
+
readonly file_url?: string | undefined;
|
|
1433
|
+
})[];
|
|
1434
|
+
readonly id?: string | undefined;
|
|
1435
|
+
readonly status?: string | undefined;
|
|
1436
|
+
} | {
|
|
1437
|
+
readonly type: "message";
|
|
1438
|
+
readonly id?: string | undefined;
|
|
1439
|
+
readonly role: "assistant";
|
|
1440
|
+
readonly content: readonly {
|
|
1441
|
+
readonly type: "output_text";
|
|
1442
|
+
readonly text: string;
|
|
1443
|
+
}[];
|
|
1444
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
1445
|
+
readonly status?: string | undefined;
|
|
1446
|
+
} | {
|
|
1447
|
+
readonly type: "function_call";
|
|
1448
|
+
readonly id?: string | undefined;
|
|
1449
|
+
readonly call_id: string;
|
|
1450
|
+
readonly name: string;
|
|
1451
|
+
readonly namespace?: string | undefined;
|
|
1452
|
+
readonly arguments: string;
|
|
1453
|
+
} | {
|
|
1454
|
+
readonly type: "custom_tool_call";
|
|
1455
|
+
readonly id?: string | undefined;
|
|
1456
|
+
readonly call_id: string;
|
|
1457
|
+
readonly name: string;
|
|
1458
|
+
readonly input: string;
|
|
1459
|
+
} | {
|
|
1460
|
+
readonly [x: string]: unknown;
|
|
1461
|
+
readonly type: "web_search_call";
|
|
1462
|
+
readonly id: string;
|
|
1463
|
+
readonly status?: string | undefined;
|
|
1464
|
+
readonly action?: {
|
|
1465
|
+
readonly [x: string]: unknown;
|
|
1466
|
+
} | null | undefined;
|
|
1467
|
+
} | {
|
|
1468
|
+
readonly [x: string]: unknown;
|
|
1469
|
+
readonly type: "file_search_call";
|
|
1470
|
+
readonly id: string;
|
|
1471
|
+
readonly status?: string | undefined;
|
|
1472
|
+
readonly queries?: readonly string[] | undefined;
|
|
1473
|
+
readonly results?: readonly {
|
|
1474
|
+
readonly [x: string]: unknown;
|
|
1475
|
+
}[] | null | undefined;
|
|
1476
|
+
} | {
|
|
1477
|
+
readonly [x: string]: unknown;
|
|
1478
|
+
readonly type: "code_interpreter_call";
|
|
1479
|
+
readonly id: string;
|
|
1480
|
+
readonly status?: string | undefined;
|
|
1481
|
+
readonly code?: string | null | undefined;
|
|
1482
|
+
readonly container_id?: string | null | undefined;
|
|
1483
|
+
readonly outputs?: readonly {
|
|
1484
|
+
readonly [x: string]: unknown;
|
|
1485
|
+
}[] | null | undefined;
|
|
1486
|
+
} | {
|
|
1487
|
+
readonly [x: string]: unknown;
|
|
1488
|
+
readonly type: "mcp_call";
|
|
1489
|
+
readonly id: string;
|
|
1490
|
+
readonly status?: string | undefined;
|
|
1491
|
+
readonly server_label?: string | undefined;
|
|
1492
|
+
readonly name?: string | undefined;
|
|
1493
|
+
readonly arguments?: string | undefined;
|
|
1494
|
+
readonly output?: string | null | undefined;
|
|
1495
|
+
readonly error?: unknown;
|
|
1496
|
+
} | {
|
|
1497
|
+
readonly [x: string]: unknown;
|
|
1498
|
+
readonly type: string;
|
|
1499
|
+
readonly id: string;
|
|
1500
|
+
})[];
|
|
1501
|
+
readonly instructions?: string | undefined;
|
|
1502
|
+
readonly store?: boolean | undefined;
|
|
1503
|
+
readonly metadata?: {
|
|
1504
|
+
readonly [x: string]: string;
|
|
1505
|
+
} | undefined;
|
|
1506
|
+
readonly safety_identifier?: string | undefined;
|
|
1507
|
+
readonly stream_options?: {
|
|
1508
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
1509
|
+
} | undefined;
|
|
1510
|
+
readonly top_logprobs?: number | undefined;
|
|
1511
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
1512
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1513
|
+
readonly prompt_cache_key?: string | undefined;
|
|
1514
|
+
readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
|
|
1515
|
+
readonly text?: {
|
|
1516
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1517
|
+
} | undefined;
|
|
1518
|
+
readonly max_output_tokens?: number | undefined;
|
|
1519
|
+
readonly max_tool_calls?: number | undefined;
|
|
1520
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
1521
|
+
readonly temperature?: number | undefined;
|
|
1522
|
+
readonly top_p?: number | undefined;
|
|
1523
|
+
readonly presence_penalty?: number | undefined;
|
|
1524
|
+
readonly frequency_penalty?: number | undefined;
|
|
1525
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
1526
|
+
readonly prompt_cache_options?: {
|
|
1527
|
+
readonly ttl?: string | undefined;
|
|
1528
|
+
} | undefined;
|
|
1529
|
+
readonly tools?: readonly ({
|
|
1530
|
+
readonly type: "custom";
|
|
1531
|
+
readonly name: string;
|
|
1532
|
+
readonly description: string;
|
|
1533
|
+
readonly format: {
|
|
1534
|
+
readonly type: "text";
|
|
1535
|
+
} | {
|
|
1536
|
+
readonly type: "grammar";
|
|
1537
|
+
readonly syntax: "lark" | "regex";
|
|
1538
|
+
readonly definition: string;
|
|
1539
|
+
};
|
|
1540
|
+
} | {
|
|
1541
|
+
readonly type: "namespace";
|
|
1542
|
+
readonly name: string;
|
|
1543
|
+
readonly description: string;
|
|
1544
|
+
readonly tools: readonly {
|
|
1545
|
+
readonly type: "function";
|
|
1546
|
+
readonly name: string;
|
|
1547
|
+
readonly description: string;
|
|
1548
|
+
readonly parameters: {
|
|
1549
|
+
readonly [x: string]: unknown;
|
|
1550
|
+
};
|
|
1551
|
+
readonly strict?: boolean | undefined;
|
|
1552
|
+
}[];
|
|
1553
|
+
} | {
|
|
1554
|
+
readonly type: "function";
|
|
1555
|
+
readonly name: string;
|
|
1556
|
+
readonly description: string;
|
|
1557
|
+
readonly parameters: {
|
|
1558
|
+
readonly [x: string]: unknown;
|
|
1559
|
+
};
|
|
1560
|
+
readonly strict?: boolean | undefined;
|
|
1561
|
+
} | {
|
|
1562
|
+
readonly type: "image_generation";
|
|
1563
|
+
readonly action?: "auto" | "edit" | "generate" | undefined;
|
|
1564
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
1565
|
+
readonly input_fidelity?: "high" | "low" | undefined;
|
|
1566
|
+
readonly output_compression?: number | undefined;
|
|
1567
|
+
readonly output_format?: "jpeg" | "png" | "webp" | undefined;
|
|
1568
|
+
readonly partial_images?: number | undefined;
|
|
1569
|
+
readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
|
|
1570
|
+
readonly size?: string | undefined;
|
|
1571
|
+
})[] | undefined;
|
|
1572
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
1573
|
+
readonly type: "custom" | "function";
|
|
1574
|
+
readonly name: string;
|
|
1575
|
+
} | {
|
|
1576
|
+
readonly type: "allowed_tools";
|
|
1577
|
+
readonly mode: "auto" | "none" | "required";
|
|
1578
|
+
readonly tools: readonly {
|
|
1579
|
+
readonly type: "custom" | "function";
|
|
1580
|
+
readonly name: string;
|
|
1581
|
+
}[];
|
|
1582
|
+
} | {
|
|
1583
|
+
readonly type: "image_generation";
|
|
1584
|
+
} | undefined;
|
|
1585
|
+
readonly reasoning?: {
|
|
1586
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1587
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1588
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
1589
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
1590
|
+
} | undefined;
|
|
1591
|
+
readonly context_management?: readonly {
|
|
1592
|
+
readonly type: "compaction";
|
|
1593
|
+
readonly compact_threshold?: number | undefined;
|
|
1594
|
+
}[] | undefined;
|
|
1595
|
+
readonly stream: true;
|
|
1596
|
+
}, import("./open-responses-channel.js").Prepared, {
|
|
1597
|
+
endpoint: import("../route/client.js").CompactOperation;
|
|
1598
|
+
trigger: import("../route/client.js").TriggerCompactOperation;
|
|
1599
|
+
}>;
|
|
1600
|
+
export * as OpenAIResponses from "./openai-responses.js";
|