@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,1074 @@
|
|
|
1
|
+
import { type AtLeastOne, type ProviderAuthOption } from "../route/auth-options.js";
|
|
2
|
+
import type { Route, CompactionOperations } from "../route/client.js";
|
|
3
|
+
import type { ProviderPackage } from "../provider-package.js";
|
|
4
|
+
import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
|
|
5
|
+
import { AnthropicMessages } from "../protocols/anthropic-messages.js";
|
|
6
|
+
import { type OpenAIProviderOptionsInput } from "./openai-options.js";
|
|
7
|
+
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
8
|
+
type AzureURL = AtLeastOne<{
|
|
9
|
+
readonly resourceName: string;
|
|
10
|
+
readonly baseURL: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type Config = AzureURL & RequestOptions & ProviderAuthOption<"optional"> & {
|
|
13
|
+
readonly apiVersion?: string;
|
|
14
|
+
readonly queryParams?: Record<string, string>;
|
|
15
|
+
readonly useDeploymentBasedUrls?: boolean;
|
|
16
|
+
readonly providerOptions?: OpenAIProviderOptionsInput | AnthropicMessages.ProviderOptionsInput;
|
|
17
|
+
};
|
|
18
|
+
export type Settings<Options = OpenAIProviderOptionsInput> = ProviderPackage.Settings & Options & AzureURL & {
|
|
19
|
+
readonly apiKey?: string | false;
|
|
20
|
+
readonly apiVersion?: string;
|
|
21
|
+
readonly queryParams?: Readonly<Record<string, string>>;
|
|
22
|
+
readonly useDeploymentBasedUrls?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type MessagesSettings = Settings<AnthropicMessages.ProviderOptionsInput>;
|
|
25
|
+
declare const responsesRoute: Route<{
|
|
26
|
+
readonly model: string;
|
|
27
|
+
readonly input: readonly ({
|
|
28
|
+
readonly type: "configuration_update";
|
|
29
|
+
readonly reasoning: {
|
|
30
|
+
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
31
|
+
};
|
|
32
|
+
} | {
|
|
33
|
+
readonly type: "additional_tools";
|
|
34
|
+
readonly role: "developer";
|
|
35
|
+
readonly tools: readonly ({
|
|
36
|
+
readonly type: "custom";
|
|
37
|
+
readonly name: string;
|
|
38
|
+
readonly description: string;
|
|
39
|
+
readonly format: {
|
|
40
|
+
readonly type: "text";
|
|
41
|
+
} | {
|
|
42
|
+
readonly type: "grammar";
|
|
43
|
+
readonly syntax: "lark" | "regex";
|
|
44
|
+
readonly definition: string;
|
|
45
|
+
};
|
|
46
|
+
} | {
|
|
47
|
+
readonly type: "function";
|
|
48
|
+
readonly name: string;
|
|
49
|
+
readonly description: string;
|
|
50
|
+
readonly parameters: {
|
|
51
|
+
readonly [x: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
readonly strict?: boolean | undefined;
|
|
54
|
+
} | {
|
|
55
|
+
readonly [x: string]: unknown;
|
|
56
|
+
readonly type: string;
|
|
57
|
+
})[];
|
|
58
|
+
} | {
|
|
59
|
+
readonly type: "message";
|
|
60
|
+
readonly role: "system";
|
|
61
|
+
readonly content: string;
|
|
62
|
+
} | {
|
|
63
|
+
readonly type: "message";
|
|
64
|
+
readonly role: "developer";
|
|
65
|
+
readonly content: string;
|
|
66
|
+
} | {
|
|
67
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
68
|
+
readonly call_id: string;
|
|
69
|
+
readonly output: string | readonly ({
|
|
70
|
+
readonly type: "input_text";
|
|
71
|
+
readonly text: string;
|
|
72
|
+
} | {
|
|
73
|
+
readonly type: "input_video";
|
|
74
|
+
readonly video_url: string;
|
|
75
|
+
} | {
|
|
76
|
+
readonly type: "input_image";
|
|
77
|
+
readonly image_url: string;
|
|
78
|
+
readonly detail?: string | undefined;
|
|
79
|
+
} | {
|
|
80
|
+
readonly type: "input_file";
|
|
81
|
+
readonly filename?: string | undefined;
|
|
82
|
+
readonly detail?: string | undefined;
|
|
83
|
+
readonly file_data?: string | undefined;
|
|
84
|
+
readonly file_url?: string | undefined;
|
|
85
|
+
})[];
|
|
86
|
+
} | {
|
|
87
|
+
readonly type: "reasoning";
|
|
88
|
+
readonly id?: string | undefined;
|
|
89
|
+
readonly summary: readonly {
|
|
90
|
+
readonly type: "summary_text";
|
|
91
|
+
readonly text: string;
|
|
92
|
+
}[];
|
|
93
|
+
readonly encrypted_content?: string | null | undefined;
|
|
94
|
+
} | {
|
|
95
|
+
readonly type: "compaction";
|
|
96
|
+
readonly id?: string | null | undefined;
|
|
97
|
+
readonly encrypted_content: string;
|
|
98
|
+
} | {
|
|
99
|
+
readonly type: "message";
|
|
100
|
+
readonly role: "user";
|
|
101
|
+
readonly content: readonly ({
|
|
102
|
+
readonly type: "input_text";
|
|
103
|
+
readonly text: string;
|
|
104
|
+
} | {
|
|
105
|
+
readonly type: "input_video";
|
|
106
|
+
readonly video_url: string;
|
|
107
|
+
} | {
|
|
108
|
+
readonly type: "input_image";
|
|
109
|
+
readonly image_url: string;
|
|
110
|
+
readonly detail?: string | undefined;
|
|
111
|
+
} | {
|
|
112
|
+
readonly type: "input_file";
|
|
113
|
+
readonly filename?: string | undefined;
|
|
114
|
+
readonly detail?: string | undefined;
|
|
115
|
+
readonly file_data?: string | undefined;
|
|
116
|
+
readonly file_url?: string | undefined;
|
|
117
|
+
})[];
|
|
118
|
+
readonly id?: string | undefined;
|
|
119
|
+
readonly status?: string | undefined;
|
|
120
|
+
} | {
|
|
121
|
+
readonly type: "message";
|
|
122
|
+
readonly id?: string | undefined;
|
|
123
|
+
readonly role: "assistant";
|
|
124
|
+
readonly content: readonly {
|
|
125
|
+
readonly type: "output_text";
|
|
126
|
+
readonly text: string;
|
|
127
|
+
}[];
|
|
128
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
129
|
+
readonly status?: string | undefined;
|
|
130
|
+
} | {
|
|
131
|
+
readonly type: "function_call";
|
|
132
|
+
readonly id?: string | undefined;
|
|
133
|
+
readonly call_id: string;
|
|
134
|
+
readonly name: string;
|
|
135
|
+
readonly namespace?: string | undefined;
|
|
136
|
+
readonly arguments: string;
|
|
137
|
+
} | {
|
|
138
|
+
readonly type: "custom_tool_call";
|
|
139
|
+
readonly id?: string | undefined;
|
|
140
|
+
readonly call_id: string;
|
|
141
|
+
readonly name: string;
|
|
142
|
+
readonly input: string;
|
|
143
|
+
} | {
|
|
144
|
+
readonly [x: string]: unknown;
|
|
145
|
+
readonly type: "web_search_call";
|
|
146
|
+
readonly id: string;
|
|
147
|
+
readonly status?: string | undefined;
|
|
148
|
+
readonly action?: {
|
|
149
|
+
readonly [x: string]: unknown;
|
|
150
|
+
} | null | undefined;
|
|
151
|
+
} | {
|
|
152
|
+
readonly [x: string]: unknown;
|
|
153
|
+
readonly type: "file_search_call";
|
|
154
|
+
readonly id: string;
|
|
155
|
+
readonly status?: string | undefined;
|
|
156
|
+
readonly queries?: readonly string[] | undefined;
|
|
157
|
+
readonly results?: readonly {
|
|
158
|
+
readonly [x: string]: unknown;
|
|
159
|
+
}[] | null | undefined;
|
|
160
|
+
} | {
|
|
161
|
+
readonly [x: string]: unknown;
|
|
162
|
+
readonly type: "code_interpreter_call";
|
|
163
|
+
readonly id: string;
|
|
164
|
+
readonly status?: string | undefined;
|
|
165
|
+
readonly code?: string | null | undefined;
|
|
166
|
+
readonly container_id?: string | null | undefined;
|
|
167
|
+
readonly outputs?: readonly {
|
|
168
|
+
readonly [x: string]: unknown;
|
|
169
|
+
}[] | null | undefined;
|
|
170
|
+
} | {
|
|
171
|
+
readonly [x: string]: unknown;
|
|
172
|
+
readonly type: "mcp_call";
|
|
173
|
+
readonly id: string;
|
|
174
|
+
readonly status?: string | undefined;
|
|
175
|
+
readonly server_label?: string | undefined;
|
|
176
|
+
readonly name?: string | undefined;
|
|
177
|
+
readonly arguments?: string | undefined;
|
|
178
|
+
readonly output?: string | null | undefined;
|
|
179
|
+
readonly error?: unknown;
|
|
180
|
+
} | {
|
|
181
|
+
readonly [x: string]: unknown;
|
|
182
|
+
readonly type: string;
|
|
183
|
+
readonly id: string;
|
|
184
|
+
})[];
|
|
185
|
+
readonly instructions?: string | undefined;
|
|
186
|
+
readonly store?: boolean | undefined;
|
|
187
|
+
readonly metadata?: {
|
|
188
|
+
readonly [x: string]: string;
|
|
189
|
+
} | undefined;
|
|
190
|
+
readonly safety_identifier?: string | undefined;
|
|
191
|
+
readonly stream_options?: {
|
|
192
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
193
|
+
} | undefined;
|
|
194
|
+
readonly top_logprobs?: number | undefined;
|
|
195
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
196
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
197
|
+
readonly prompt_cache_key?: string | undefined;
|
|
198
|
+
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;
|
|
199
|
+
readonly text?: {
|
|
200
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
201
|
+
} | undefined;
|
|
202
|
+
readonly max_output_tokens?: number | undefined;
|
|
203
|
+
readonly max_tool_calls?: number | undefined;
|
|
204
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
205
|
+
readonly temperature?: number | undefined;
|
|
206
|
+
readonly top_p?: number | undefined;
|
|
207
|
+
readonly presence_penalty?: number | undefined;
|
|
208
|
+
readonly frequency_penalty?: number | undefined;
|
|
209
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
210
|
+
readonly prompt_cache_options?: {
|
|
211
|
+
readonly ttl?: string | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
readonly tools?: readonly ({
|
|
214
|
+
readonly type: "custom";
|
|
215
|
+
readonly name: string;
|
|
216
|
+
readonly description: string;
|
|
217
|
+
readonly format: {
|
|
218
|
+
readonly type: "text";
|
|
219
|
+
} | {
|
|
220
|
+
readonly type: "grammar";
|
|
221
|
+
readonly syntax: "lark" | "regex";
|
|
222
|
+
readonly definition: string;
|
|
223
|
+
};
|
|
224
|
+
} | {
|
|
225
|
+
readonly type: "namespace";
|
|
226
|
+
readonly name: string;
|
|
227
|
+
readonly description: string;
|
|
228
|
+
readonly tools: readonly {
|
|
229
|
+
readonly type: "function";
|
|
230
|
+
readonly name: string;
|
|
231
|
+
readonly description: string;
|
|
232
|
+
readonly parameters: {
|
|
233
|
+
readonly [x: string]: unknown;
|
|
234
|
+
};
|
|
235
|
+
readonly strict?: boolean | undefined;
|
|
236
|
+
}[];
|
|
237
|
+
} | {
|
|
238
|
+
readonly type: "function";
|
|
239
|
+
readonly name: string;
|
|
240
|
+
readonly description: string;
|
|
241
|
+
readonly parameters: {
|
|
242
|
+
readonly [x: string]: unknown;
|
|
243
|
+
};
|
|
244
|
+
readonly strict?: boolean | undefined;
|
|
245
|
+
} | {
|
|
246
|
+
readonly type: "image_generation";
|
|
247
|
+
readonly action?: "auto" | "edit" | "generate" | undefined;
|
|
248
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
249
|
+
readonly input_fidelity?: "high" | "low" | undefined;
|
|
250
|
+
readonly output_compression?: number | undefined;
|
|
251
|
+
readonly output_format?: "jpeg" | "png" | "webp" | undefined;
|
|
252
|
+
readonly partial_images?: number | undefined;
|
|
253
|
+
readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
|
|
254
|
+
readonly size?: string | undefined;
|
|
255
|
+
})[] | undefined;
|
|
256
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
257
|
+
readonly type: "custom" | "function";
|
|
258
|
+
readonly name: string;
|
|
259
|
+
} | {
|
|
260
|
+
readonly type: "allowed_tools";
|
|
261
|
+
readonly mode: "auto" | "none" | "required";
|
|
262
|
+
readonly tools: readonly {
|
|
263
|
+
readonly type: "custom" | "function";
|
|
264
|
+
readonly name: string;
|
|
265
|
+
}[];
|
|
266
|
+
} | {
|
|
267
|
+
readonly type: "image_generation";
|
|
268
|
+
} | undefined;
|
|
269
|
+
readonly reasoning?: {
|
|
270
|
+
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
271
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
272
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
273
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
274
|
+
} | undefined;
|
|
275
|
+
readonly context_management?: readonly {
|
|
276
|
+
readonly type: "compaction";
|
|
277
|
+
readonly compact_threshold?: number | undefined;
|
|
278
|
+
}[] | undefined;
|
|
279
|
+
readonly stream: true;
|
|
280
|
+
}, import("../protocols/open-responses-channel.js").Prepared, {
|
|
281
|
+
endpoint: import("../route/client.js").CompactOperation;
|
|
282
|
+
}>;
|
|
283
|
+
export declare const routes: (Route<{
|
|
284
|
+
readonly context_management?: {
|
|
285
|
+
readonly edits: readonly {
|
|
286
|
+
readonly type: "compact_20260112";
|
|
287
|
+
readonly trigger?: {
|
|
288
|
+
readonly type: "input_tokens";
|
|
289
|
+
readonly value: number;
|
|
290
|
+
} | undefined;
|
|
291
|
+
readonly pause_after_compaction?: boolean | undefined;
|
|
292
|
+
readonly instructions?: string | undefined;
|
|
293
|
+
}[];
|
|
294
|
+
} | undefined;
|
|
295
|
+
readonly model: string;
|
|
296
|
+
readonly system?: readonly {
|
|
297
|
+
readonly type: "text";
|
|
298
|
+
readonly text: string;
|
|
299
|
+
readonly cache_control?: {
|
|
300
|
+
readonly type: "ephemeral";
|
|
301
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
302
|
+
} | undefined;
|
|
303
|
+
}[] | undefined;
|
|
304
|
+
readonly messages: readonly ({
|
|
305
|
+
readonly role: "user";
|
|
306
|
+
readonly content: readonly ({
|
|
307
|
+
readonly type: "text";
|
|
308
|
+
readonly text: string;
|
|
309
|
+
readonly cache_control?: {
|
|
310
|
+
readonly type: "ephemeral";
|
|
311
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
312
|
+
} | undefined;
|
|
313
|
+
} | {
|
|
314
|
+
readonly type: "image";
|
|
315
|
+
readonly source: {
|
|
316
|
+
readonly type: "base64";
|
|
317
|
+
readonly media_type: string;
|
|
318
|
+
readonly data: string;
|
|
319
|
+
} | {
|
|
320
|
+
readonly type: "url";
|
|
321
|
+
readonly url: string;
|
|
322
|
+
} | {
|
|
323
|
+
readonly type: "file";
|
|
324
|
+
readonly file_id: string;
|
|
325
|
+
};
|
|
326
|
+
readonly cache_control?: {
|
|
327
|
+
readonly type: "ephemeral";
|
|
328
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
329
|
+
} | undefined;
|
|
330
|
+
readonly transformations?: {
|
|
331
|
+
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
332
|
+
} | undefined;
|
|
333
|
+
} | {
|
|
334
|
+
readonly type: "video";
|
|
335
|
+
readonly source: {
|
|
336
|
+
readonly type: "base64";
|
|
337
|
+
readonly media_type: string;
|
|
338
|
+
readonly data: string;
|
|
339
|
+
} | {
|
|
340
|
+
readonly type: "url";
|
|
341
|
+
readonly url: string;
|
|
342
|
+
} | {
|
|
343
|
+
readonly type: "file";
|
|
344
|
+
readonly file_id: string;
|
|
345
|
+
};
|
|
346
|
+
readonly cache_control?: {
|
|
347
|
+
readonly type: "ephemeral";
|
|
348
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
349
|
+
} | undefined;
|
|
350
|
+
} | {
|
|
351
|
+
readonly type: "document";
|
|
352
|
+
readonly source: {
|
|
353
|
+
readonly type: "base64";
|
|
354
|
+
readonly media_type: "application/pdf";
|
|
355
|
+
readonly data: string;
|
|
356
|
+
} | {
|
|
357
|
+
readonly type: "text";
|
|
358
|
+
readonly media_type: "text/plain";
|
|
359
|
+
readonly data: string;
|
|
360
|
+
} | {
|
|
361
|
+
readonly type: "url";
|
|
362
|
+
readonly url: string;
|
|
363
|
+
} | {
|
|
364
|
+
readonly type: "file";
|
|
365
|
+
readonly file_id: string;
|
|
366
|
+
};
|
|
367
|
+
readonly cache_control?: {
|
|
368
|
+
readonly type: "ephemeral";
|
|
369
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
370
|
+
} | undefined;
|
|
371
|
+
readonly title?: string | undefined;
|
|
372
|
+
readonly context?: string | undefined;
|
|
373
|
+
readonly citations?: {
|
|
374
|
+
readonly enabled: boolean;
|
|
375
|
+
} | undefined;
|
|
376
|
+
} | {
|
|
377
|
+
readonly type: "tool_result";
|
|
378
|
+
readonly tool_use_id: string;
|
|
379
|
+
readonly content: string | readonly ({
|
|
380
|
+
readonly type: "text";
|
|
381
|
+
readonly text: string;
|
|
382
|
+
readonly cache_control?: {
|
|
383
|
+
readonly type: "ephemeral";
|
|
384
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
385
|
+
} | undefined;
|
|
386
|
+
} | {
|
|
387
|
+
readonly type: "image";
|
|
388
|
+
readonly source: {
|
|
389
|
+
readonly type: "base64";
|
|
390
|
+
readonly media_type: string;
|
|
391
|
+
readonly data: string;
|
|
392
|
+
} | {
|
|
393
|
+
readonly type: "url";
|
|
394
|
+
readonly url: string;
|
|
395
|
+
} | {
|
|
396
|
+
readonly type: "file";
|
|
397
|
+
readonly file_id: string;
|
|
398
|
+
};
|
|
399
|
+
readonly cache_control?: {
|
|
400
|
+
readonly type: "ephemeral";
|
|
401
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
402
|
+
} | undefined;
|
|
403
|
+
readonly transformations?: {
|
|
404
|
+
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
405
|
+
} | undefined;
|
|
406
|
+
} | {
|
|
407
|
+
readonly type: "video";
|
|
408
|
+
readonly source: {
|
|
409
|
+
readonly type: "base64";
|
|
410
|
+
readonly media_type: string;
|
|
411
|
+
readonly data: string;
|
|
412
|
+
} | {
|
|
413
|
+
readonly type: "url";
|
|
414
|
+
readonly url: string;
|
|
415
|
+
} | {
|
|
416
|
+
readonly type: "file";
|
|
417
|
+
readonly file_id: string;
|
|
418
|
+
};
|
|
419
|
+
readonly cache_control?: {
|
|
420
|
+
readonly type: "ephemeral";
|
|
421
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
422
|
+
} | undefined;
|
|
423
|
+
} | {
|
|
424
|
+
readonly type: "document";
|
|
425
|
+
readonly source: {
|
|
426
|
+
readonly type: "base64";
|
|
427
|
+
readonly media_type: "application/pdf";
|
|
428
|
+
readonly data: string;
|
|
429
|
+
} | {
|
|
430
|
+
readonly type: "text";
|
|
431
|
+
readonly media_type: "text/plain";
|
|
432
|
+
readonly data: string;
|
|
433
|
+
} | {
|
|
434
|
+
readonly type: "url";
|
|
435
|
+
readonly url: string;
|
|
436
|
+
} | {
|
|
437
|
+
readonly type: "file";
|
|
438
|
+
readonly file_id: string;
|
|
439
|
+
};
|
|
440
|
+
readonly cache_control?: {
|
|
441
|
+
readonly type: "ephemeral";
|
|
442
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
443
|
+
} | undefined;
|
|
444
|
+
readonly title?: string | undefined;
|
|
445
|
+
readonly context?: string | undefined;
|
|
446
|
+
readonly citations?: {
|
|
447
|
+
readonly enabled: boolean;
|
|
448
|
+
} | undefined;
|
|
449
|
+
})[];
|
|
450
|
+
readonly is_error?: boolean | undefined;
|
|
451
|
+
readonly cache_control?: {
|
|
452
|
+
readonly type: "ephemeral";
|
|
453
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
454
|
+
} | undefined;
|
|
455
|
+
})[];
|
|
456
|
+
} | {
|
|
457
|
+
readonly role: "assistant";
|
|
458
|
+
readonly content: readonly ({
|
|
459
|
+
readonly type: "compaction";
|
|
460
|
+
readonly content: string | null;
|
|
461
|
+
} | {
|
|
462
|
+
readonly type: "text";
|
|
463
|
+
readonly text: string;
|
|
464
|
+
readonly cache_control?: {
|
|
465
|
+
readonly type: "ephemeral";
|
|
466
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
467
|
+
} | undefined;
|
|
468
|
+
} | {
|
|
469
|
+
readonly type: "thinking";
|
|
470
|
+
readonly thinking: string;
|
|
471
|
+
readonly signature: string;
|
|
472
|
+
readonly cache_control?: {
|
|
473
|
+
readonly type: "ephemeral";
|
|
474
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
475
|
+
} | undefined;
|
|
476
|
+
} | {
|
|
477
|
+
readonly type: "redacted_thinking";
|
|
478
|
+
readonly data: string;
|
|
479
|
+
readonly cache_control?: {
|
|
480
|
+
readonly type: "ephemeral";
|
|
481
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
482
|
+
} | undefined;
|
|
483
|
+
} | {
|
|
484
|
+
readonly type: "tool_use";
|
|
485
|
+
readonly id: string;
|
|
486
|
+
readonly name: string;
|
|
487
|
+
readonly input: unknown;
|
|
488
|
+
readonly cache_control?: {
|
|
489
|
+
readonly type: "ephemeral";
|
|
490
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
491
|
+
} | undefined;
|
|
492
|
+
} | {
|
|
493
|
+
readonly type: "server_tool_use";
|
|
494
|
+
readonly id: string;
|
|
495
|
+
readonly name: string;
|
|
496
|
+
readonly input: unknown;
|
|
497
|
+
readonly cache_control?: {
|
|
498
|
+
readonly type: "ephemeral";
|
|
499
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
500
|
+
} | undefined;
|
|
501
|
+
} | {
|
|
502
|
+
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
503
|
+
readonly tool_use_id: string;
|
|
504
|
+
readonly content: unknown;
|
|
505
|
+
readonly cache_control?: {
|
|
506
|
+
readonly type: "ephemeral";
|
|
507
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
508
|
+
} | undefined;
|
|
509
|
+
})[];
|
|
510
|
+
} | {
|
|
511
|
+
readonly role: "system";
|
|
512
|
+
readonly content: readonly ({
|
|
513
|
+
readonly type: "tool_addition";
|
|
514
|
+
readonly tool: {
|
|
515
|
+
readonly type: "tool_definition";
|
|
516
|
+
readonly definition: {
|
|
517
|
+
readonly name: string;
|
|
518
|
+
readonly description: string;
|
|
519
|
+
readonly input_schema: {
|
|
520
|
+
readonly [x: string]: unknown;
|
|
521
|
+
};
|
|
522
|
+
readonly cache_control?: {
|
|
523
|
+
readonly type: "ephemeral";
|
|
524
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
525
|
+
} | undefined;
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
} | {
|
|
529
|
+
readonly type: "tool_removal";
|
|
530
|
+
readonly tool: {
|
|
531
|
+
readonly type: "tool_reference";
|
|
532
|
+
readonly name: string;
|
|
533
|
+
};
|
|
534
|
+
} | {
|
|
535
|
+
readonly type: "text";
|
|
536
|
+
readonly text: string;
|
|
537
|
+
readonly cache_control?: {
|
|
538
|
+
readonly type: "ephemeral";
|
|
539
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
540
|
+
} | undefined;
|
|
541
|
+
})[];
|
|
542
|
+
readonly output_config?: {
|
|
543
|
+
readonly effort: string;
|
|
544
|
+
} | undefined;
|
|
545
|
+
})[];
|
|
546
|
+
readonly tools?: readonly {
|
|
547
|
+
readonly name: string;
|
|
548
|
+
readonly description: string;
|
|
549
|
+
readonly input_schema: {
|
|
550
|
+
readonly [x: string]: unknown;
|
|
551
|
+
};
|
|
552
|
+
readonly cache_control?: {
|
|
553
|
+
readonly type: "ephemeral";
|
|
554
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
555
|
+
} | undefined;
|
|
556
|
+
}[] | undefined;
|
|
557
|
+
readonly tool_choice?: {
|
|
558
|
+
readonly type: "any" | "auto" | "none";
|
|
559
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
560
|
+
} | {
|
|
561
|
+
readonly type: "tool";
|
|
562
|
+
readonly name: string;
|
|
563
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
564
|
+
} | undefined;
|
|
565
|
+
readonly stream: true;
|
|
566
|
+
readonly max_tokens: number;
|
|
567
|
+
readonly temperature?: number | undefined;
|
|
568
|
+
readonly top_p?: number | undefined;
|
|
569
|
+
readonly top_k?: number | undefined;
|
|
570
|
+
readonly stop_sequences?: readonly string[] | undefined;
|
|
571
|
+
readonly thinking?: {
|
|
572
|
+
readonly type: "between_tools" | "disabled";
|
|
573
|
+
} | {
|
|
574
|
+
readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
|
|
575
|
+
readonly block_binding?: {
|
|
576
|
+
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
577
|
+
} | undefined;
|
|
578
|
+
readonly type: "enabled";
|
|
579
|
+
readonly budget_tokens: number;
|
|
580
|
+
} | {
|
|
581
|
+
readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
|
|
582
|
+
readonly block_binding?: {
|
|
583
|
+
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
584
|
+
} | undefined;
|
|
585
|
+
readonly type: "adaptive";
|
|
586
|
+
} | undefined;
|
|
587
|
+
readonly output_config?: {
|
|
588
|
+
readonly effort?: string | undefined;
|
|
589
|
+
readonly format?: {
|
|
590
|
+
readonly type: "json_schema";
|
|
591
|
+
readonly schema: {
|
|
592
|
+
readonly [x: string]: unknown;
|
|
593
|
+
};
|
|
594
|
+
} | null | undefined;
|
|
595
|
+
} | undefined;
|
|
596
|
+
readonly cache_control?: {
|
|
597
|
+
readonly type: "ephemeral";
|
|
598
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
599
|
+
} | undefined;
|
|
600
|
+
readonly container?: string | {
|
|
601
|
+
readonly id?: string | null | undefined;
|
|
602
|
+
readonly skills?: readonly {
|
|
603
|
+
readonly [x: string]: unknown;
|
|
604
|
+
}[] | null | undefined;
|
|
605
|
+
} | null | undefined;
|
|
606
|
+
readonly inference_geo?: string | null | undefined;
|
|
607
|
+
readonly metadata?: {
|
|
608
|
+
readonly user_id?: string | null | undefined;
|
|
609
|
+
} | undefined;
|
|
610
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
|
|
611
|
+
readonly speed?: import("../schema/options.js").OpenString<"fast" | "standard"> | undefined;
|
|
612
|
+
}, import("../route/transport/http.js").HttpPrepared<string>, CompactionOperations | undefined> | Route<{
|
|
613
|
+
readonly model: string;
|
|
614
|
+
readonly messages: readonly ({
|
|
615
|
+
readonly role: "system";
|
|
616
|
+
readonly content: string | readonly ({
|
|
617
|
+
readonly type: "image_url";
|
|
618
|
+
readonly image_url: {
|
|
619
|
+
readonly url: string;
|
|
620
|
+
};
|
|
621
|
+
} | {
|
|
622
|
+
readonly type: "video_url";
|
|
623
|
+
readonly video_url: {
|
|
624
|
+
readonly url: string;
|
|
625
|
+
};
|
|
626
|
+
} | {
|
|
627
|
+
readonly type: "file";
|
|
628
|
+
readonly file: {
|
|
629
|
+
readonly filename: string;
|
|
630
|
+
readonly file_data: string;
|
|
631
|
+
};
|
|
632
|
+
} | {
|
|
633
|
+
readonly type: "text";
|
|
634
|
+
readonly text: string;
|
|
635
|
+
readonly cache_control?: {
|
|
636
|
+
readonly type: "ephemeral";
|
|
637
|
+
readonly ttl?: string | undefined;
|
|
638
|
+
} | undefined;
|
|
639
|
+
})[];
|
|
640
|
+
} | {
|
|
641
|
+
readonly role: "user";
|
|
642
|
+
readonly content: string | readonly ({
|
|
643
|
+
readonly type: "image_url";
|
|
644
|
+
readonly image_url: {
|
|
645
|
+
readonly url: string;
|
|
646
|
+
};
|
|
647
|
+
} | {
|
|
648
|
+
readonly type: "video_url";
|
|
649
|
+
readonly video_url: {
|
|
650
|
+
readonly url: string;
|
|
651
|
+
};
|
|
652
|
+
} | {
|
|
653
|
+
readonly type: "file";
|
|
654
|
+
readonly file: {
|
|
655
|
+
readonly filename: string;
|
|
656
|
+
readonly file_data: string;
|
|
657
|
+
};
|
|
658
|
+
} | {
|
|
659
|
+
readonly type: "text";
|
|
660
|
+
readonly text: string;
|
|
661
|
+
readonly cache_control?: {
|
|
662
|
+
readonly type: "ephemeral";
|
|
663
|
+
readonly ttl?: string | undefined;
|
|
664
|
+
} | undefined;
|
|
665
|
+
})[];
|
|
666
|
+
} | {
|
|
667
|
+
readonly role: "tool";
|
|
668
|
+
readonly tool_call_id: string;
|
|
669
|
+
readonly content: string | readonly {
|
|
670
|
+
readonly type: "text";
|
|
671
|
+
readonly text: string;
|
|
672
|
+
readonly cache_control?: {
|
|
673
|
+
readonly type: "ephemeral";
|
|
674
|
+
readonly ttl?: string | undefined;
|
|
675
|
+
} | undefined;
|
|
676
|
+
}[];
|
|
677
|
+
} | {
|
|
678
|
+
readonly [x: string]: unknown;
|
|
679
|
+
readonly role: "assistant";
|
|
680
|
+
readonly content: string | readonly {
|
|
681
|
+
readonly type: "text";
|
|
682
|
+
readonly text: string;
|
|
683
|
+
readonly cache_control?: {
|
|
684
|
+
readonly type: "ephemeral";
|
|
685
|
+
readonly ttl?: string | undefined;
|
|
686
|
+
} | undefined;
|
|
687
|
+
}[] | null;
|
|
688
|
+
readonly tool_calls?: readonly ({
|
|
689
|
+
readonly id: string;
|
|
690
|
+
readonly type: "custom";
|
|
691
|
+
readonly custom: {
|
|
692
|
+
readonly name: string;
|
|
693
|
+
readonly input: string;
|
|
694
|
+
};
|
|
695
|
+
} | {
|
|
696
|
+
readonly id: string;
|
|
697
|
+
readonly type: "function";
|
|
698
|
+
readonly function: {
|
|
699
|
+
readonly name: string;
|
|
700
|
+
readonly arguments: string;
|
|
701
|
+
};
|
|
702
|
+
readonly extra_content?: {
|
|
703
|
+
readonly google: {
|
|
704
|
+
readonly thought_signature: string;
|
|
705
|
+
};
|
|
706
|
+
} | undefined;
|
|
707
|
+
})[] | undefined;
|
|
708
|
+
readonly reasoning_content?: string | undefined;
|
|
709
|
+
readonly reasoning?: string | undefined;
|
|
710
|
+
readonly reasoning_text?: string | undefined;
|
|
711
|
+
readonly reasoning_details?: unknown;
|
|
712
|
+
readonly reasoning_opaque?: string | undefined;
|
|
713
|
+
})[];
|
|
714
|
+
readonly tools?: readonly ({
|
|
715
|
+
readonly type: "function";
|
|
716
|
+
readonly function: {
|
|
717
|
+
readonly name: string;
|
|
718
|
+
readonly description: string;
|
|
719
|
+
readonly parameters: {
|
|
720
|
+
readonly [x: string]: unknown;
|
|
721
|
+
};
|
|
722
|
+
readonly strict?: boolean | undefined;
|
|
723
|
+
};
|
|
724
|
+
readonly cache_control?: {
|
|
725
|
+
readonly type: "ephemeral";
|
|
726
|
+
readonly ttl?: string | undefined;
|
|
727
|
+
} | undefined;
|
|
728
|
+
} | {
|
|
729
|
+
readonly type: "custom";
|
|
730
|
+
readonly custom: {
|
|
731
|
+
readonly name: string;
|
|
732
|
+
readonly description: string;
|
|
733
|
+
readonly format: {
|
|
734
|
+
readonly type: "text";
|
|
735
|
+
} | {
|
|
736
|
+
readonly type: "grammar";
|
|
737
|
+
readonly grammar: {
|
|
738
|
+
readonly syntax: "lark" | "regex";
|
|
739
|
+
readonly definition: string;
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
readonly cache_control?: {
|
|
744
|
+
readonly type: "ephemeral";
|
|
745
|
+
readonly ttl?: string | undefined;
|
|
746
|
+
} | undefined;
|
|
747
|
+
})[] | undefined;
|
|
748
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
749
|
+
readonly type: "function";
|
|
750
|
+
readonly function: {
|
|
751
|
+
readonly name: string;
|
|
752
|
+
};
|
|
753
|
+
} | {
|
|
754
|
+
readonly type: "custom";
|
|
755
|
+
readonly custom: {
|
|
756
|
+
readonly name: string;
|
|
757
|
+
};
|
|
758
|
+
} | undefined;
|
|
759
|
+
readonly stream: true;
|
|
760
|
+
readonly stream_options?: {
|
|
761
|
+
readonly include_usage: boolean;
|
|
762
|
+
} | undefined;
|
|
763
|
+
readonly store?: boolean | undefined;
|
|
764
|
+
readonly prompt_cache_key?: string | undefined;
|
|
765
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
766
|
+
readonly prompt_cache_options?: {
|
|
767
|
+
readonly ttl?: string | undefined;
|
|
768
|
+
} | undefined;
|
|
769
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
770
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
771
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
772
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
773
|
+
readonly metadata?: {
|
|
774
|
+
readonly [x: string]: string;
|
|
775
|
+
} | undefined;
|
|
776
|
+
readonly safety_identifier?: string | undefined;
|
|
777
|
+
readonly tool_stream?: boolean | undefined;
|
|
778
|
+
readonly max_completion_tokens?: number | undefined;
|
|
779
|
+
readonly max_tokens?: number | undefined;
|
|
780
|
+
readonly temperature?: number | undefined;
|
|
781
|
+
readonly top_p?: number | undefined;
|
|
782
|
+
readonly frequency_penalty?: number | undefined;
|
|
783
|
+
readonly presence_penalty?: number | undefined;
|
|
784
|
+
readonly seed?: number | undefined;
|
|
785
|
+
readonly stop?: readonly string[] | undefined;
|
|
786
|
+
}, import("../route/transport/http.js").HttpPrepared<string>, CompactionOperations | undefined> | Route<{
|
|
787
|
+
readonly model: string;
|
|
788
|
+
readonly input: readonly ({
|
|
789
|
+
readonly type: "configuration_update";
|
|
790
|
+
readonly reasoning: {
|
|
791
|
+
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
792
|
+
};
|
|
793
|
+
} | {
|
|
794
|
+
readonly type: "additional_tools";
|
|
795
|
+
readonly role: "developer";
|
|
796
|
+
readonly tools: readonly ({
|
|
797
|
+
readonly type: "custom";
|
|
798
|
+
readonly name: string;
|
|
799
|
+
readonly description: string;
|
|
800
|
+
readonly format: {
|
|
801
|
+
readonly type: "text";
|
|
802
|
+
} | {
|
|
803
|
+
readonly type: "grammar";
|
|
804
|
+
readonly syntax: "lark" | "regex";
|
|
805
|
+
readonly definition: string;
|
|
806
|
+
};
|
|
807
|
+
} | {
|
|
808
|
+
readonly type: "function";
|
|
809
|
+
readonly name: string;
|
|
810
|
+
readonly description: string;
|
|
811
|
+
readonly parameters: {
|
|
812
|
+
readonly [x: string]: unknown;
|
|
813
|
+
};
|
|
814
|
+
readonly strict?: boolean | undefined;
|
|
815
|
+
} | {
|
|
816
|
+
readonly [x: string]: unknown;
|
|
817
|
+
readonly type: string;
|
|
818
|
+
})[];
|
|
819
|
+
} | {
|
|
820
|
+
readonly type: "message";
|
|
821
|
+
readonly role: "system";
|
|
822
|
+
readonly content: string;
|
|
823
|
+
} | {
|
|
824
|
+
readonly type: "message";
|
|
825
|
+
readonly role: "developer";
|
|
826
|
+
readonly content: string;
|
|
827
|
+
} | {
|
|
828
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
829
|
+
readonly call_id: string;
|
|
830
|
+
readonly output: string | readonly ({
|
|
831
|
+
readonly type: "input_text";
|
|
832
|
+
readonly text: string;
|
|
833
|
+
} | {
|
|
834
|
+
readonly type: "input_video";
|
|
835
|
+
readonly video_url: string;
|
|
836
|
+
} | {
|
|
837
|
+
readonly type: "input_image";
|
|
838
|
+
readonly image_url: string;
|
|
839
|
+
readonly detail?: string | undefined;
|
|
840
|
+
} | {
|
|
841
|
+
readonly type: "input_file";
|
|
842
|
+
readonly filename?: string | undefined;
|
|
843
|
+
readonly detail?: string | undefined;
|
|
844
|
+
readonly file_data?: string | undefined;
|
|
845
|
+
readonly file_url?: string | undefined;
|
|
846
|
+
})[];
|
|
847
|
+
} | {
|
|
848
|
+
readonly type: "reasoning";
|
|
849
|
+
readonly id?: string | undefined;
|
|
850
|
+
readonly summary: readonly {
|
|
851
|
+
readonly type: "summary_text";
|
|
852
|
+
readonly text: string;
|
|
853
|
+
}[];
|
|
854
|
+
readonly encrypted_content?: string | null | undefined;
|
|
855
|
+
} | {
|
|
856
|
+
readonly type: "compaction";
|
|
857
|
+
readonly id?: string | null | undefined;
|
|
858
|
+
readonly encrypted_content: string;
|
|
859
|
+
} | {
|
|
860
|
+
readonly type: "message";
|
|
861
|
+
readonly role: "user";
|
|
862
|
+
readonly content: readonly ({
|
|
863
|
+
readonly type: "input_text";
|
|
864
|
+
readonly text: string;
|
|
865
|
+
} | {
|
|
866
|
+
readonly type: "input_video";
|
|
867
|
+
readonly video_url: string;
|
|
868
|
+
} | {
|
|
869
|
+
readonly type: "input_image";
|
|
870
|
+
readonly image_url: string;
|
|
871
|
+
readonly detail?: string | undefined;
|
|
872
|
+
} | {
|
|
873
|
+
readonly type: "input_file";
|
|
874
|
+
readonly filename?: string | undefined;
|
|
875
|
+
readonly detail?: string | undefined;
|
|
876
|
+
readonly file_data?: string | undefined;
|
|
877
|
+
readonly file_url?: string | undefined;
|
|
878
|
+
})[];
|
|
879
|
+
readonly id?: string | undefined;
|
|
880
|
+
readonly status?: string | undefined;
|
|
881
|
+
} | {
|
|
882
|
+
readonly type: "message";
|
|
883
|
+
readonly id?: string | undefined;
|
|
884
|
+
readonly role: "assistant";
|
|
885
|
+
readonly content: readonly {
|
|
886
|
+
readonly type: "output_text";
|
|
887
|
+
readonly text: string;
|
|
888
|
+
}[];
|
|
889
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
890
|
+
readonly status?: string | undefined;
|
|
891
|
+
} | {
|
|
892
|
+
readonly type: "function_call";
|
|
893
|
+
readonly id?: string | undefined;
|
|
894
|
+
readonly call_id: string;
|
|
895
|
+
readonly name: string;
|
|
896
|
+
readonly namespace?: string | undefined;
|
|
897
|
+
readonly arguments: string;
|
|
898
|
+
} | {
|
|
899
|
+
readonly type: "custom_tool_call";
|
|
900
|
+
readonly id?: string | undefined;
|
|
901
|
+
readonly call_id: string;
|
|
902
|
+
readonly name: string;
|
|
903
|
+
readonly input: string;
|
|
904
|
+
} | {
|
|
905
|
+
readonly [x: string]: unknown;
|
|
906
|
+
readonly type: "web_search_call";
|
|
907
|
+
readonly id: string;
|
|
908
|
+
readonly status?: string | undefined;
|
|
909
|
+
readonly action?: {
|
|
910
|
+
readonly [x: string]: unknown;
|
|
911
|
+
} | null | undefined;
|
|
912
|
+
} | {
|
|
913
|
+
readonly [x: string]: unknown;
|
|
914
|
+
readonly type: "file_search_call";
|
|
915
|
+
readonly id: string;
|
|
916
|
+
readonly status?: string | undefined;
|
|
917
|
+
readonly queries?: readonly string[] | undefined;
|
|
918
|
+
readonly results?: readonly {
|
|
919
|
+
readonly [x: string]: unknown;
|
|
920
|
+
}[] | null | undefined;
|
|
921
|
+
} | {
|
|
922
|
+
readonly [x: string]: unknown;
|
|
923
|
+
readonly type: "code_interpreter_call";
|
|
924
|
+
readonly id: string;
|
|
925
|
+
readonly status?: string | undefined;
|
|
926
|
+
readonly code?: string | null | undefined;
|
|
927
|
+
readonly container_id?: string | null | undefined;
|
|
928
|
+
readonly outputs?: readonly {
|
|
929
|
+
readonly [x: string]: unknown;
|
|
930
|
+
}[] | null | undefined;
|
|
931
|
+
} | {
|
|
932
|
+
readonly [x: string]: unknown;
|
|
933
|
+
readonly type: "mcp_call";
|
|
934
|
+
readonly id: string;
|
|
935
|
+
readonly status?: string | undefined;
|
|
936
|
+
readonly server_label?: string | undefined;
|
|
937
|
+
readonly name?: string | undefined;
|
|
938
|
+
readonly arguments?: string | undefined;
|
|
939
|
+
readonly output?: string | null | undefined;
|
|
940
|
+
readonly error?: unknown;
|
|
941
|
+
} | {
|
|
942
|
+
readonly [x: string]: unknown;
|
|
943
|
+
readonly type: string;
|
|
944
|
+
readonly id: string;
|
|
945
|
+
})[];
|
|
946
|
+
readonly instructions?: string | undefined;
|
|
947
|
+
readonly store?: boolean | undefined;
|
|
948
|
+
readonly metadata?: {
|
|
949
|
+
readonly [x: string]: string;
|
|
950
|
+
} | undefined;
|
|
951
|
+
readonly safety_identifier?: string | undefined;
|
|
952
|
+
readonly stream_options?: {
|
|
953
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
954
|
+
} | undefined;
|
|
955
|
+
readonly top_logprobs?: number | undefined;
|
|
956
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
957
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
958
|
+
readonly prompt_cache_key?: string | undefined;
|
|
959
|
+
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;
|
|
960
|
+
readonly text?: {
|
|
961
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
962
|
+
} | undefined;
|
|
963
|
+
readonly max_output_tokens?: number | undefined;
|
|
964
|
+
readonly max_tool_calls?: number | undefined;
|
|
965
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
966
|
+
readonly temperature?: number | undefined;
|
|
967
|
+
readonly top_p?: number | undefined;
|
|
968
|
+
readonly presence_penalty?: number | undefined;
|
|
969
|
+
readonly frequency_penalty?: number | undefined;
|
|
970
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
971
|
+
readonly prompt_cache_options?: {
|
|
972
|
+
readonly ttl?: string | undefined;
|
|
973
|
+
} | undefined;
|
|
974
|
+
readonly tools?: readonly ({
|
|
975
|
+
readonly type: "custom";
|
|
976
|
+
readonly name: string;
|
|
977
|
+
readonly description: string;
|
|
978
|
+
readonly format: {
|
|
979
|
+
readonly type: "text";
|
|
980
|
+
} | {
|
|
981
|
+
readonly type: "grammar";
|
|
982
|
+
readonly syntax: "lark" | "regex";
|
|
983
|
+
readonly definition: string;
|
|
984
|
+
};
|
|
985
|
+
} | {
|
|
986
|
+
readonly type: "namespace";
|
|
987
|
+
readonly name: string;
|
|
988
|
+
readonly description: string;
|
|
989
|
+
readonly tools: readonly {
|
|
990
|
+
readonly type: "function";
|
|
991
|
+
readonly name: string;
|
|
992
|
+
readonly description: string;
|
|
993
|
+
readonly parameters: {
|
|
994
|
+
readonly [x: string]: unknown;
|
|
995
|
+
};
|
|
996
|
+
readonly strict?: boolean | undefined;
|
|
997
|
+
}[];
|
|
998
|
+
} | {
|
|
999
|
+
readonly type: "function";
|
|
1000
|
+
readonly name: string;
|
|
1001
|
+
readonly description: string;
|
|
1002
|
+
readonly parameters: {
|
|
1003
|
+
readonly [x: string]: unknown;
|
|
1004
|
+
};
|
|
1005
|
+
readonly strict?: boolean | undefined;
|
|
1006
|
+
} | {
|
|
1007
|
+
readonly type: "image_generation";
|
|
1008
|
+
readonly action?: "auto" | "edit" | "generate" | undefined;
|
|
1009
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
1010
|
+
readonly input_fidelity?: "high" | "low" | undefined;
|
|
1011
|
+
readonly output_compression?: number | undefined;
|
|
1012
|
+
readonly output_format?: "jpeg" | "png" | "webp" | undefined;
|
|
1013
|
+
readonly partial_images?: number | undefined;
|
|
1014
|
+
readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
|
|
1015
|
+
readonly size?: string | undefined;
|
|
1016
|
+
})[] | undefined;
|
|
1017
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
1018
|
+
readonly type: "custom" | "function";
|
|
1019
|
+
readonly name: string;
|
|
1020
|
+
} | {
|
|
1021
|
+
readonly type: "allowed_tools";
|
|
1022
|
+
readonly mode: "auto" | "none" | "required";
|
|
1023
|
+
readonly tools: readonly {
|
|
1024
|
+
readonly type: "custom" | "function";
|
|
1025
|
+
readonly name: string;
|
|
1026
|
+
}[];
|
|
1027
|
+
} | {
|
|
1028
|
+
readonly type: "image_generation";
|
|
1029
|
+
} | undefined;
|
|
1030
|
+
readonly reasoning?: {
|
|
1031
|
+
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
1032
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1033
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
1034
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
1035
|
+
} | undefined;
|
|
1036
|
+
readonly context_management?: readonly {
|
|
1037
|
+
readonly type: "compaction";
|
|
1038
|
+
readonly compact_threshold?: number | undefined;
|
|
1039
|
+
}[] | undefined;
|
|
1040
|
+
readonly stream: true;
|
|
1041
|
+
}, import("../protocols/open-responses-channel.js").Prepared, {
|
|
1042
|
+
endpoint: import("../route/client.js").CompactOperation;
|
|
1043
|
+
}>)[];
|
|
1044
|
+
export declare const configure: (input: Config) => {
|
|
1045
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1046
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, {
|
|
1047
|
+
endpoint: import("../route/client.js").CompactOperation;
|
|
1048
|
+
}>;
|
|
1049
|
+
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, {
|
|
1050
|
+
endpoint: import("../route/client.js").CompactOperation;
|
|
1051
|
+
}>;
|
|
1052
|
+
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, CompactionOperations | undefined>;
|
|
1053
|
+
messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.OptionsInput, CompactionOperations | undefined>;
|
|
1054
|
+
image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
1055
|
+
embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<import("../embedding.js").EmbeddingOptions>;
|
|
1056
|
+
configure: typeof configure;
|
|
1057
|
+
};
|
|
1058
|
+
export declare const provider: {
|
|
1059
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1060
|
+
configure: typeof configure;
|
|
1061
|
+
};
|
|
1062
|
+
export declare const responsesModel: ProviderPackage.Model<Settings, OpenAIProviderOptionsInput, typeof responsesRoute.compact>;
|
|
1063
|
+
export declare const chatModel: ProviderPackage.Model<Settings, OpenAIProviderOptionsInput>;
|
|
1064
|
+
export declare const messagesModel: ProviderPackage.Model<MessagesSettings, AnthropicMessages.ProviderOptionsInput>;
|
|
1065
|
+
export declare const imageModel: (modelID: string, settings: Settings) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
1066
|
+
export declare const embeddingModel: (modelID: string, settings: Settings) => import("../embedding.js").EmbeddingModel<import("../embedding.js").EmbeddingOptions>;
|
|
1067
|
+
export declare const model: ProviderPackage.Model<Settings<import("./openai-options.js").OpenAIOptionsInput>, import("./openai-options.js").OpenAIOptionsInput, {
|
|
1068
|
+
endpoint: import("../route/client.js").CompactOperation;
|
|
1069
|
+
}>;
|
|
1070
|
+
export declare const responses: ProviderPackage.Model<Settings<import("./openai-options.js").OpenAIOptionsInput>, import("./openai-options.js").OpenAIOptionsInput, {
|
|
1071
|
+
endpoint: import("../route/client.js").CompactOperation;
|
|
1072
|
+
}>;
|
|
1073
|
+
export declare const chat: ProviderPackage.Model<Settings<import("./openai-options.js").OpenAIOptionsInput>, import("./openai-options.js").OpenAIOptionsInput, CompactionOperations | undefined>;
|
|
1074
|
+
export {};
|