@openllmsh/sdk 2.10.12-alpha.1 → 2.10.12-alpha.2
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 +27 -7
- package/dist/client/chat.d.ts +38 -0
- package/dist/client/chat.js +77 -0
- package/dist/client/devices.d.ts +70 -0
- package/dist/client/devices.js +172 -0
- package/dist/client/http.d.ts +24 -0
- package/dist/client/http.js +34 -0
- package/dist/client/index.d.ts +43 -0
- package/dist/client/index.js +57 -0
- package/dist/client/relay-mux.d.ts +71 -0
- package/dist/client/relay-mux.js +394 -0
- package/dist/client/types.d.ts +47 -0
- package/dist/client/types.js +5 -0
- package/dist/client/vault.d.ts +68 -0
- package/dist/client/vault.js +113 -0
- package/dist/connect/chat.d.ts +24 -0
- package/dist/connect/chat.js +25 -0
- package/dist/connect/client.d.ts +50 -0
- package/dist/connect/client.js +141 -0
- package/dist/connect/config.d.ts +22 -0
- package/dist/connect/config.js +22 -0
- package/dist/connect/errors.d.ts +32 -0
- package/dist/connect/errors.js +85 -0
- package/{connect/index.ts → dist/connect/index.d.ts} +7 -7
- package/dist/connect/index.js +23 -0
- package/dist/connect/oauth.d.ts +51 -0
- package/dist/connect/oauth.js +150 -0
- package/dist/connect/routes.d.ts +38 -0
- package/dist/connect/routes.js +175 -0
- package/dist/connect/store.d.ts +26 -0
- package/dist/connect/store.js +65 -0
- package/dist/mcp/handle.d.ts +6 -0
- package/dist/mcp/handle.js +6 -0
- package/dist/mcp/index.d.ts +15 -0
- package/dist/mcp/index.js +10 -0
- package/dist/mcp/server.d.ts +84 -0
- package/dist/mcp/server.js +168 -0
- package/dist/mcp/tools/marketplace.d.ts +94 -0
- package/dist/mcp/tools/marketplace.js +303 -0
- package/dist/mcp/tools/memory-client.d.ts +109 -0
- package/dist/mcp/tools/memory-client.js +200 -0
- package/dist/mcp/tools/memory-config.d.ts +29 -0
- package/dist/mcp/tools/memory-config.js +12 -0
- package/dist/mcp/tools/memory.d.ts +92 -0
- package/dist/mcp/tools/memory.js +312 -0
- package/dist/mcp/tools/model-priority.d.ts +16 -0
- package/dist/mcp/tools/model-priority.js +87 -0
- package/dist/mcp/tools/openllm.d.ts +75 -0
- package/dist/mcp/tools/openllm.js +715 -0
- package/dist/mcp/types.d.ts +25 -0
- package/dist/mcp/types.js +7 -0
- package/dist/openapi/call.d.ts +26 -0
- package/dist/openapi/call.js +56 -0
- package/dist/openapi/index.d.ts +2 -0
- package/dist/openapi/index.js +2 -0
- package/dist/openapi/openapi.json +80213 -0
- package/dist/openapi/operations.d.ts +14 -0
- package/dist/openapi/operations.js +2060 -0
- package/dist/protocol/access.d.ts +81 -0
- package/dist/protocol/access.js +125 -0
- package/dist/protocol/agent-prompt-text.d.ts +15 -0
- package/{protocol/agent-prompt-text.ts → dist/protocol/agent-prompt-text.js} +9 -14
- package/dist/protocol/agent.d.ts +1487 -0
- package/dist/protocol/agent.js +787 -0
- package/dist/protocol/api-key-syntax.d.ts +58 -0
- package/dist/protocol/api-key-syntax.js +73 -0
- package/dist/protocol/audio.d.ts +18 -0
- package/dist/protocol/audio.js +21 -0
- package/dist/protocol/auth.d.ts +126 -0
- package/dist/protocol/auth.js +119 -0
- package/dist/protocol/changelog.d.ts +69 -0
- package/dist/protocol/changelog.js +107 -0
- package/dist/protocol/chat.d.ts +789 -0
- package/dist/protocol/chat.js +394 -0
- package/dist/protocol/client-registry.d.ts +151 -0
- package/dist/protocol/client-registry.js +238 -0
- package/dist/protocol/config.d.ts +508 -0
- package/dist/protocol/config.js +289 -0
- package/dist/protocol/control-channel.d.ts +102 -0
- package/{protocol/control-channel.ts → dist/protocol/control-channel.js} +33 -61
- package/dist/protocol/cooldown-reason.d.ts +30 -0
- package/dist/protocol/cooldown-reason.js +44 -0
- package/dist/protocol/cost.d.ts +9 -0
- package/dist/protocol/cost.js +8 -0
- package/dist/protocol/daemon-port.d.ts +2 -0
- package/dist/protocol/daemon-port.js +28 -0
- package/dist/protocol/daemon.d.ts +2034 -0
- package/dist/protocol/daemon.js +1286 -0
- package/dist/protocol/default-chains.d.ts +15 -0
- package/dist/protocol/default-chains.js +21 -0
- package/dist/protocol/device-state.d.ts +223 -0
- package/dist/protocol/device-state.js +52 -0
- package/dist/protocol/doctor-report-local.d.ts +105 -0
- package/{protocol/doctor-report-local.ts → dist/protocol/doctor-report-local.js} +92 -196
- package/dist/protocol/doctor-report-policy.d.ts +62 -0
- package/{protocol/doctor-report-policy.ts → dist/protocol/doctor-report-policy.js} +23 -76
- package/dist/protocol/doctor-report.d.ts +406 -0
- package/dist/protocol/doctor-report.js +645 -0
- package/dist/protocol/errors.d.ts +17 -0
- package/dist/protocol/errors.js +10 -0
- package/dist/protocol/execution-selection.d.ts +92 -0
- package/{protocol/execution-selection.ts → dist/protocol/execution-selection.js} +38 -63
- package/dist/protocol/hop-grant.d.ts +28 -0
- package/{protocol/hop-grant.ts → dist/protocol/hop-grant.js} +7 -13
- package/dist/protocol/image-edit-parse.d.ts +25 -0
- package/dist/protocol/image-edit-parse.js +196 -0
- package/dist/protocol/images.d.ts +288 -0
- package/dist/protocol/images.js +229 -0
- package/dist/protocol/index.d.ts +69 -0
- package/dist/protocol/index.js +74 -0
- package/dist/protocol/inference-headers.d.ts +3 -0
- package/dist/protocol/keepalive.d.ts +36 -0
- package/dist/protocol/keepalive.js +51 -0
- package/dist/protocol/local-auth.d.ts +125 -0
- package/dist/protocol/local-auth.js +227 -0
- package/dist/protocol/local-device-control.d.ts +108 -0
- package/{protocol/local-device-control.ts → dist/protocol/local-device-control.js} +40 -70
- package/dist/protocol/local-provider.d.ts +105 -0
- package/dist/protocol/local-provider.js +213 -0
- package/dist/protocol/local-session.d.ts +70 -0
- package/dist/protocol/local-session.js +87 -0
- package/dist/protocol/marketplace.d.ts +190 -0
- package/dist/protocol/marketplace.js +140 -0
- package/{protocol/media-attempt.ts → dist/protocol/media-attempt.d.ts} +11 -50
- package/dist/protocol/media-attempt.js +50 -0
- package/dist/protocol/media-bytes.d.ts +8 -0
- package/dist/protocol/media-bytes.js +21 -0
- package/dist/protocol/media-default.d.ts +56 -0
- package/dist/protocol/media-default.js +302 -0
- package/{protocol/media-dimensions.ts → dist/protocol/media-dimensions.d.ts} +11 -78
- package/dist/protocol/media-dimensions.js +90 -0
- package/dist/protocol/media-input.d.ts +20 -0
- package/dist/protocol/media-input.js +29 -0
- package/dist/protocol/media-model.d.ts +77 -0
- package/dist/protocol/media-model.js +89 -0
- package/{protocol/media-option-issue.ts → dist/protocol/media-option-issue.d.ts} +25 -53
- package/dist/protocol/media-option-issue.js +50 -0
- package/dist/protocol/media-types.d.ts +14 -0
- package/dist/protocol/media-types.js +61 -0
- package/dist/protocol/model-match.d.ts +254 -0
- package/dist/protocol/model-match.js +760 -0
- package/dist/protocol/model-settings.d.ts +153 -0
- package/dist/protocol/model-settings.js +246 -0
- package/dist/protocol/models.d.ts +1065 -0
- package/dist/protocol/models.js +638 -0
- package/dist/protocol/mux.d.ts +350 -0
- package/dist/protocol/mux.js +595 -0
- package/{protocol/plan-surface.ts → dist/protocol/plan-surface.d.ts} +12 -26
- package/dist/protocol/plan-surface.js +39 -0
- package/dist/protocol/provider-models.d.ts +8 -0
- package/{protocol/provider-models.ts → dist/protocol/provider-models.js} +7 -9
- package/dist/protocol/provider-status.d.ts +59 -0
- package/dist/protocol/provider-status.js +142 -0
- package/dist/protocol/provider-tier.d.ts +34 -0
- package/{protocol/provider-tier.ts → dist/protocol/provider-tier.js} +9 -34
- package/dist/protocol/provider-usage.d.ts +230 -0
- package/dist/protocol/provider-usage.js +214 -0
- package/dist/protocol/providers.d.ts +2496 -0
- package/dist/protocol/providers.js +723 -0
- package/dist/protocol/public-usage-index.d.ts +449 -0
- package/dist/protocol/public-usage-index.js +279 -0
- package/dist/protocol/realtime-generated.d.ts +29 -0
- package/{protocol/realtime-generated.ts → dist/protocol/realtime-generated.js} +3 -5
- package/dist/protocol/realtime.d.ts +241 -0
- package/{protocol/realtime.ts → dist/protocol/realtime.js} +88 -155
- package/dist/protocol/registry-pointer.d.ts +24 -0
- package/dist/protocol/registry-pointer.js +78 -0
- package/dist/protocol/relay.d.ts +1152 -0
- package/{protocol/relay.ts → dist/protocol/relay.js} +237 -370
- package/dist/protocol/replay-session.d.ts +4 -0
- package/{protocol/replay-session.ts → dist/protocol/replay-session.js} +1 -8
- package/dist/protocol/responses.d.ts +303 -0
- package/dist/protocol/responses.js +240 -0
- package/dist/protocol/semver.d.ts +59 -0
- package/dist/protocol/semver.js +171 -0
- package/{protocol/setup-mode.ts → dist/protocol/setup-mode.d.ts} +4 -12
- package/dist/protocol/setup-mode.js +18 -0
- package/dist/protocol/sha256-hex.d.ts +2 -0
- package/dist/protocol/sha256-hex.js +93 -0
- package/dist/protocol/stats.d.ts +711 -0
- package/dist/protocol/stats.js +353 -0
- package/dist/protocol/streaming.d.ts +16 -0
- package/dist/protocol/streaming.js +15 -0
- package/{protocol/subscription-daemon-floors.ts → dist/protocol/subscription-daemon-floors.d.ts} +8 -14
- package/dist/protocol/subscription-daemon-floors.js +4 -0
- package/dist/protocol/subscription-provider-compat.d.ts +44 -0
- package/dist/protocol/subscription-provider-compat.js +67 -0
- package/dist/protocol/subscription-provider.d.ts +15 -0
- package/dist/protocol/subscription-provider.js +17 -0
- package/dist/protocol/team-grant.d.ts +14 -0
- package/{protocol/team-grant.ts → dist/protocol/team-grant.js} +0 -3
- package/dist/protocol/team-shareable.d.ts +6 -0
- package/{protocol/team-shareable.ts → dist/protocol/team-shareable.js} +29 -33
- package/dist/protocol/transcription-encoding.d.ts +25 -0
- package/dist/protocol/transcription-encoding.js +47 -0
- package/{protocol/url-locality-dns.ts → dist/protocol/url-locality-dns.d.ts} +1 -23
- package/dist/protocol/url-locality-dns.js +33 -0
- package/dist/protocol/url-locality.d.ts +45 -0
- package/dist/protocol/url-locality.js +288 -0
- package/dist/protocol/usage-snapshots.d.ts +8 -0
- package/{protocol/usage-snapshots.ts → dist/protocol/usage-snapshots.js} +1 -2
- package/dist/protocol/vendor-cli-install.d.ts +20 -0
- package/{protocol/vendor-cli-install.ts → dist/protocol/vendor-cli-install.js} +10 -15
- package/dist/protocol/video-job-plan.d.ts +18 -0
- package/dist/protocol/video-job-plan.js +44 -0
- package/dist/protocol/videos.d.ts +107 -0
- package/dist/protocol/videos.js +154 -0
- package/dist/tunnel/channel-envelope.d.ts +53 -0
- package/dist/tunnel/channel-envelope.js +100 -0
- package/dist/tunnel/codec.d.ts +71 -0
- package/dist/tunnel/codec.js +151 -0
- package/dist/tunnel/device-anchor.d.ts +62 -0
- package/dist/tunnel/device-anchor.js +168 -0
- package/dist/tunnel/device-control.d.ts +50 -0
- package/dist/tunnel/device-control.js +88 -0
- package/dist/tunnel/device-grant.d.ts +91 -0
- package/dist/tunnel/device-grant.js +105 -0
- package/dist/tunnel/fleet.d.ts +28 -0
- package/dist/tunnel/fleet.js +41 -0
- package/dist/tunnel/index.d.ts +22 -0
- package/dist/tunnel/index.js +22 -0
- package/dist/tunnel/mux.d.ts +64 -0
- package/dist/tunnel/mux.js +449 -0
- package/dist/tunnel/peer-link.d.ts +88 -0
- package/dist/tunnel/peer-link.js +271 -0
- package/dist/tunnel/rtc-auth.d.ts +159 -0
- package/dist/tunnel/rtc-auth.js +340 -0
- package/dist/tunnel/rtc-duplex.d.ts +52 -0
- package/dist/tunnel/rtc-duplex.js +148 -0
- package/dist/tunnel/rtc-ice.d.ts +55 -0
- package/dist/tunnel/rtc-ice.js +100 -0
- package/dist/tunnel/secure.d.ts +179 -0
- package/dist/tunnel/secure.js +936 -0
- package/dist/tunnel/stream-reset-error.d.ts +6 -0
- package/dist/tunnel/stream-reset-error.js +9 -0
- package/dist/tunnel/streams.d.ts +244 -0
- package/dist/tunnel/streams.js +1071 -0
- package/dist/tunnel/team-grant.d.ts +90 -0
- package/dist/tunnel/team-grant.js +226 -0
- package/dist/tunnel/wire-bytes.d.ts +32 -0
- package/dist/tunnel/wire-bytes.js +90 -0
- package/dist/vault/api-key.d.ts +71 -0
- package/dist/vault/api-key.js +130 -0
- package/{vault/argon2.ts → dist/vault/argon2.d.ts} +18 -53
- package/dist/vault/argon2.js +82 -0
- package/dist/vault/cli-auth-seal.d.ts +35 -0
- package/dist/vault/cli-auth-seal.js +78 -0
- package/dist/vault/cred-seal.d.ts +18 -0
- package/dist/vault/cred-seal.js +86 -0
- package/dist/vault/credential.d.ts +21 -0
- package/dist/vault/credential.js +26 -0
- package/dist/vault/crypto.d.ts +51 -0
- package/dist/vault/crypto.js +156 -0
- package/dist/vault/daemon-attest.d.ts +68 -0
- package/dist/vault/daemon-attest.js +147 -0
- package/dist/vault/derive.d.ts +34 -0
- package/dist/vault/derive.js +84 -0
- package/dist/vault/device-access.d.ts +17 -0
- package/dist/vault/device-access.js +77 -0
- package/dist/vault/device-anchor.d.ts +42 -0
- package/dist/vault/device-anchor.js +90 -0
- package/dist/vault/device-control.d.ts +80 -0
- package/{vault/device-control.ts → dist/vault/device-control.js} +46 -104
- package/dist/vault/handoff.d.ts +102 -0
- package/dist/vault/handoff.js +236 -0
- package/dist/vault/index.d.ts +21 -0
- package/dist/vault/index.js +21 -0
- package/dist/vault/passkey.d.ts +82 -0
- package/{vault/passkey.ts → dist/vault/passkey.js} +63 -153
- package/dist/vault/phrase.d.ts +40 -0
- package/{vault/phrase.ts → dist/vault/phrase.js} +17 -23
- package/dist/vault/pin.d.ts +46 -0
- package/dist/vault/pin.js +92 -0
- package/dist/vault/public-key-seal.d.ts +17 -0
- package/dist/vault/public-key-seal.js +59 -0
- package/dist/vault/seed.d.ts +96 -0
- package/dist/vault/seed.js +179 -0
- package/dist/vault/team.d.ts +134 -0
- package/dist/vault/team.js +217 -0
- package/dist/vault/vault-item.d.ts +45 -0
- package/dist/vault/vault-item.js +62 -0
- package/dist/vault/vault-migrate-digest.d.ts +10 -0
- package/dist/vault/vault-migrate-digest.js +22 -0
- package/dist/vault/wrapped.d.ts +19 -0
- package/dist/vault/wrapped.js +52 -0
- package/dist/wire/adapters/messages/anthropic-map.d.ts +8 -0
- package/dist/wire/adapters/messages/anthropic-map.js +32 -0
- package/dist/wire/adapters/messages/index.d.ts +7 -0
- package/dist/wire/adapters/messages/index.js +7 -0
- package/dist/wire/adapters/messages/reasoning-from-items.d.ts +14 -0
- package/dist/wire/adapters/messages/reasoning-from-items.js +39 -0
- package/dist/wire/adapters/messages/reasoning-signature.d.ts +81 -0
- package/dist/wire/adapters/messages/reasoning-signature.js +180 -0
- package/dist/wire/adapters/messages/request.d.ts +28 -0
- package/dist/wire/adapters/messages/request.js +490 -0
- package/dist/wire/adapters/messages/response.d.ts +10 -0
- package/dist/wire/adapters/messages/response.js +177 -0
- package/dist/wire/adapters/messages/streaming.d.ts +134 -0
- package/dist/wire/adapters/messages/streaming.js +791 -0
- package/dist/wire/adapters/messages/usage.d.ts +20 -0
- package/dist/wire/adapters/messages/usage.js +10 -0
- package/dist/wire/adapters/responses/index.d.ts +3 -0
- package/dist/wire/adapters/responses/index.js +3 -0
- package/dist/wire/adapters/responses/request.d.ts +2 -0
- package/dist/wire/adapters/responses/request.js +287 -0
- package/dist/wire/adapters/responses/response.d.ts +11 -0
- package/dist/wire/adapters/responses/response.js +69 -0
- package/dist/wire/adapters/responses/streaming.d.ts +2 -0
- package/dist/wire/adapters/responses/streaming.js +267 -0
- package/dist/wire/features/account-rank.d.ts +61 -0
- package/dist/wire/features/account-rank.js +109 -0
- package/dist/wire/features/compaction/compact-request.d.ts +69 -0
- package/dist/wire/features/compaction/compact-request.js +667 -0
- package/dist/wire/features/compaction/compaction-text.d.ts +17 -0
- package/dist/wire/features/compaction/compaction-text.js +29 -0
- package/dist/wire/features/context-demote.d.ts +15 -0
- package/dist/wire/features/context-demote.js +45 -0
- package/dist/wire/features/context-overflow-strategy.d.ts +12 -0
- package/dist/wire/features/context-overflow-strategy.js +8 -0
- package/dist/wire/features/context-skip.d.ts +120 -0
- package/{wire/features/context-skip.ts → dist/wire/features/context-skip.js} +23 -57
- package/dist/wire/features/conversation-affinity.d.ts +49 -0
- package/dist/wire/features/conversation-affinity.js +121 -0
- package/dist/wire/features/max-tokens-backfill.d.ts +50 -0
- package/dist/wire/features/max-tokens-backfill.js +118 -0
- package/dist/wire/features/model-caps.d.ts +7 -0
- package/dist/wire/features/model-caps.js +40 -0
- package/dist/wire/features/model-settings.d.ts +3 -0
- package/dist/wire/features/model-settings.js +13 -0
- package/dist/wire/features/output-limit-clamp.d.ts +14 -0
- package/dist/wire/features/output-limit-clamp.js +36 -0
- package/dist/wire/features/quota-gate.d.ts +16 -0
- package/dist/wire/features/quota-gate.js +48 -0
- package/dist/wire/index.d.ts +44 -0
- package/dist/wire/index.js +44 -0
- package/dist/wire/lib/attempt-outcome.d.ts +19 -0
- package/dist/wire/lib/attempt-outcome.js +18 -0
- package/{wire/lib/canonical/content-part.ts → dist/wire/lib/canonical/content-part.d.ts} +12 -18
- package/dist/wire/lib/canonical/content-part.js +11 -0
- package/dist/wire/lib/canonical/count-tokens-capability.d.ts +52 -0
- package/dist/wire/lib/canonical/count-tokens-capability.js +109 -0
- package/{wire/lib/canonical/encoding-select.ts → dist/wire/lib/canonical/encoding-select.d.ts} +7 -24
- package/dist/wire/lib/canonical/encoding-select.js +26 -0
- package/dist/wire/lib/canonical/image-signature.d.ts +20 -0
- package/dist/wire/lib/canonical/image-signature.js +184 -0
- package/dist/wire/lib/canonical/image-sse.d.ts +88 -0
- package/dist/wire/lib/canonical/image-sse.js +173 -0
- package/{wire/lib/canonical/message.ts → dist/wire/lib/canonical/message.d.ts} +2 -20
- package/dist/wire/lib/canonical/message.js +31 -0
- package/dist/wire/lib/canonical/token-estimate.d.ts +98 -0
- package/dist/wire/lib/canonical/token-estimate.js +230 -0
- package/dist/wire/lib/encrypted-content.d.ts +22 -0
- package/dist/wire/lib/encrypted-content.js +55 -0
- package/dist/wire/lib/error-class.d.ts +57 -0
- package/dist/wire/lib/error-class.js +97 -0
- package/dist/wire/lib/error-envelope.d.ts +20 -0
- package/dist/wire/lib/error-envelope.js +53 -0
- package/dist/wire/lib/forwarded-headers.d.ts +16 -0
- package/{wire/lib/forwarded-headers.ts → dist/wire/lib/forwarded-headers.js} +62 -72
- package/dist/wire/lib/provider-error-rules.d.ts +21 -0
- package/dist/wire/lib/provider-error-rules.js +20 -0
- package/{wire/lib/refusal.ts → dist/wire/lib/refusal.d.ts} +3 -13
- package/dist/wire/lib/refusal.js +27 -0
- package/dist/wire/lib/responses-apply-patch.d.ts +57 -0
- package/dist/wire/lib/responses-apply-patch.js +81 -0
- package/dist/wire/lib/responses-namespace.d.ts +27 -0
- package/{wire/lib/responses-namespace.ts → dist/wire/lib/responses-namespace.js} +16 -32
- package/dist/wire/lib/secret-scrub.d.ts +23 -0
- package/dist/wire/lib/secret-scrub.js +72 -0
- package/dist/wire/lib/streaming/accumulate.d.ts +12 -0
- package/dist/wire/lib/streaming/accumulate.js +187 -0
- package/dist/wire/lib/streaming/finish-reason.d.ts +20 -0
- package/dist/wire/lib/streaming/finish-reason.js +15 -0
- package/{wire/lib/streaming/peek.ts → dist/wire/lib/streaming/peek.d.ts} +13 -82
- package/dist/wire/lib/streaming/peek.js +100 -0
- package/dist/wire/lib/streaming/provider-decode.d.ts +57 -0
- package/dist/wire/lib/streaming/provider-decode.js +210 -0
- package/dist/wire/lib/streaming/response-stream.d.ts +16 -0
- package/dist/wire/lib/streaming/response-stream.js +64 -0
- package/dist/wire/lib/streaming/sse.d.ts +130 -0
- package/dist/wire/lib/streaming/sse.js +600 -0
- package/dist/wire/lib/streaming/strip-tool-calls.d.ts +14 -0
- package/dist/wire/lib/streaming/strip-tool-calls.js +75 -0
- package/dist/wire/lib/streaming/upstream-error.d.ts +32 -0
- package/dist/wire/lib/streaming/upstream-error.js +45 -0
- package/dist/wire/lib/strip-subagent-isolation.d.ts +16 -0
- package/dist/wire/lib/strip-subagent-isolation.js +240 -0
- package/dist/wire/lib/thinking-signature.d.ts +56 -0
- package/{wire/lib/thinking-signature.ts → dist/wire/lib/thinking-signature.js} +77 -84
- package/dist/wire/lib/token-ruler/bpe-core.d.ts +105 -0
- package/dist/wire/lib/token-ruler/bpe-core.js +398 -0
- package/dist/wire/lib/token-ruler/index.d.ts +2 -0
- package/dist/wire/lib/token-ruler/index.js +2 -0
- package/dist/wire/lib/token-ruler/ruler.d.ts +36 -0
- package/dist/wire/lib/token-ruler/ruler.js +50 -0
- package/dist/wire/lib/token-ruler/vocab/claude-ranks.d.ts +14 -0
- package/dist/wire/lib/token-ruler/vocab/claude-ranks.js +16 -0
- package/{wire/lib/token-ruler/vocab/claude.ts → dist/wire/lib/token-ruler/vocab/claude.d.ts} +2 -12
- package/dist/wire/lib/token-ruler/vocab/claude.js +8 -0
- package/dist/wire/lib/token-ruler/vocab/o200k-ranks.d.ts +3 -0
- package/dist/wire/lib/token-ruler/vocab/o200k-ranks.js +18 -0
- package/dist/wire/lib/token-ruler/vocab/o200k.d.ts +11 -0
- package/dist/wire/lib/token-ruler/vocab/o200k.js +6 -0
- package/dist/wire/lib/tool-name-map.d.ts +44 -0
- package/dist/wire/lib/tool-name-map.js +186 -0
- package/dist/wire/lib/tool-schema.d.ts +15 -0
- package/dist/wire/lib/tool-schema.js +307 -0
- package/dist/wire/lib/usage-observer.d.ts +9 -0
- package/dist/wire/lib/usage-observer.js +108 -0
- package/dist/wire/providers/anthropic/adaptive-thinking.d.ts +125 -0
- package/dist/wire/providers/anthropic/adaptive-thinking.js +221 -0
- package/dist/wire/providers/anthropic/beta-headers.d.ts +44 -0
- package/{wire/providers/anthropic/beta-headers.ts → dist/wire/providers/anthropic/beta-headers.js} +57 -79
- package/dist/wire/providers/anthropic/index.d.ts +6 -0
- package/{wire/providers/anthropic/index.ts → dist/wire/providers/anthropic/index.js} +6 -6
- package/dist/wire/providers/anthropic/request.d.ts +12 -0
- package/dist/wire/providers/anthropic/request.js +456 -0
- package/dist/wire/providers/anthropic/response.d.ts +3 -0
- package/dist/wire/providers/anthropic/response.js +126 -0
- package/dist/wire/providers/anthropic/streaming.d.ts +28 -0
- package/dist/wire/providers/anthropic/streaming.js +268 -0
- package/dist/wire/providers/anthropic/web-search-domains.d.ts +7 -0
- package/dist/wire/providers/anthropic/web-search-domains.js +36 -0
- package/dist/wire/providers/chatgpt/common.d.ts +27 -0
- package/{wire/providers/chatgpt/common.ts → dist/wire/providers/chatgpt/common.js} +69 -89
- package/dist/wire/providers/chatgpt/index.d.ts +4 -0
- package/{wire/providers/chatgpt/index.ts → dist/wire/providers/chatgpt/index.js} +4 -4
- package/dist/wire/providers/chatgpt/request.d.ts +132 -0
- package/dist/wire/providers/chatgpt/request.js +696 -0
- package/dist/wire/providers/chatgpt/streaming.d.ts +69 -0
- package/dist/wire/providers/chatgpt/streaming.js +761 -0
- package/dist/wire/providers/chatgpt/web-search.d.ts +19 -0
- package/dist/wire/providers/chatgpt/web-search.js +55 -0
- package/dist/wire/providers/grok/web-search.d.ts +23 -0
- package/dist/wire/providers/grok/web-search.js +74 -0
- package/dist/wire/providers/kimi/web-search.d.ts +48 -0
- package/dist/wire/providers/kimi/web-search.js +106 -0
- package/dist/wire/providers/upstream-deny.d.ts +61 -0
- package/dist/wire/providers/upstream-deny.js +293 -0
- package/dist/wire/providers/upstream-request.d.ts +104 -0
- package/dist/wire/providers/upstream-request.js +411 -0
- package/package.json +105 -23
- package/ARCHITECTURE.md +0 -43
- package/client/chat.ts +0 -140
- package/client/devices.ts +0 -269
- package/client/http.ts +0 -72
- package/client/index.ts +0 -129
- package/client/relay-mux.ts +0 -547
- package/client/types.ts +0 -51
- package/client/vault.ts +0 -239
- package/connect/chat.ts +0 -58
- package/connect/client.ts +0 -240
- package/connect/config.ts +0 -47
- package/connect/errors.ts +0 -121
- package/connect/oauth.ts +0 -265
- package/connect/routes.ts +0 -234
- package/connect/store.ts +0 -107
- package/mcp/handle.ts +0 -24
- package/mcp/index.ts +0 -76
- package/mcp/server.ts +0 -319
- package/mcp/tools/marketplace.ts +0 -439
- package/mcp/tools/memory-client.ts +0 -297
- package/mcp/tools/memory-config.ts +0 -32
- package/mcp/tools/memory.ts +0 -369
- package/mcp/tools/model-priority.ts +0 -88
- package/mcp/tools/openllm.ts +0 -883
- package/mcp/types.ts +0 -28
- package/openapi/call.ts +0 -90
- package/openapi/index.ts +0 -8
- package/openapi/openapi.json +0 -80213
- package/openapi/operations.ts +0 -2075
- package/protocol/CONTRIBUTING.md +0 -21
- package/protocol/README.md +0 -134
- package/protocol/access.ts +0 -186
- package/protocol/agent.ts +0 -991
- package/protocol/api-key-syntax.ts +0 -105
- package/protocol/assets/openllm-light.svg +0 -18
- package/protocol/assets/openllm.svg +0 -18
- package/protocol/audio.ts +0 -29
- package/protocol/auth.ts +0 -142
- package/protocol/changelog.ts +0 -155
- package/protocol/chat.ts +0 -458
- package/protocol/client-registry.ts +0 -356
- package/protocol/config.ts +0 -345
- package/protocol/cooldown-reason.ts +0 -78
- package/protocol/cost.ts +0 -10
- package/protocol/daemon-port.ts +0 -31
- package/protocol/daemon.ts +0 -1524
- package/protocol/default-chains.ts +0 -66
- package/protocol/device-state.ts +0 -85
- package/protocol/doctor-report.ts +0 -947
- package/protocol/errors.ts +0 -14
- package/protocol/image-edit-parse.ts +0 -263
- package/protocol/images.ts +0 -298
- package/protocol/index.ts +0 -74
- package/protocol/keepalive.ts +0 -69
- package/protocol/local-auth.ts +0 -300
- package/protocol/local-provider.ts +0 -288
- package/protocol/local-session.ts +0 -118
- package/protocol/marketplace.ts +0 -187
- package/protocol/media-bytes.ts +0 -28
- package/protocol/media-default.ts +0 -357
- package/protocol/media-input.ts +0 -61
- package/protocol/media-model.ts +0 -142
- package/protocol/media-types.ts +0 -70
- package/protocol/model-match.ts +0 -1051
- package/protocol/model-settings.ts +0 -327
- package/protocol/models.ts +0 -767
- package/protocol/mux.ts +0 -722
- package/protocol/provider-status.ts +0 -206
- package/protocol/provider-usage.ts +0 -263
- package/protocol/providers.ts +0 -901
- package/protocol/public-usage-index.ts +0 -354
- package/protocol/registry-pointer.ts +0 -118
- package/protocol/responses.ts +0 -280
- package/protocol/semver.ts +0 -182
- package/protocol/sha256-hex.ts +0 -98
- package/protocol/stats.ts +0 -406
- package/protocol/streaming.ts +0 -19
- package/protocol/subscription-provider-compat.ts +0 -104
- package/protocol/subscription-provider.ts +0 -32
- package/protocol/transcription-encoding.ts +0 -76
- package/protocol/url-locality.ts +0 -288
- package/protocol/video-job-plan.ts +0 -50
- package/protocol/videos.ts +0 -227
- package/tsconfig.json +0 -14
- package/tunnel/ARCHITECTURE.md +0 -111
- package/tunnel/assets/openllm-light.svg +0 -18
- package/tunnel/assets/openllm.svg +0 -18
- package/tunnel/channel-envelope.ts +0 -139
- package/tunnel/codec.ts +0 -191
- package/tunnel/device-anchor.ts +0 -229
- package/tunnel/device-control.ts +0 -118
- package/tunnel/device-grant.ts +0 -173
- package/tunnel/fleet.ts +0 -77
- package/tunnel/index.ts +0 -22
- package/tunnel/mux.ts +0 -580
- package/tunnel/peer-link.ts +0 -390
- package/tunnel/rtc-auth.ts +0 -415
- package/tunnel/rtc-duplex.ts +0 -187
- package/tunnel/rtc-ice.ts +0 -136
- package/tunnel/secure.ts +0 -1298
- package/tunnel/stream-reset-error.ts +0 -14
- package/tunnel/streams.ts +0 -1430
- package/tunnel/team-grant.ts +0 -302
- package/tunnel/wire-bytes.ts +0 -102
- package/vault/ARCHITECTURE.md +0 -470
- package/vault/api-key.ts +0 -190
- package/vault/cli-auth-seal.ts +0 -157
- package/vault/cred-seal.ts +0 -146
- package/vault/credential.ts +0 -55
- package/vault/crypto.ts +0 -210
- package/vault/daemon-attest.ts +0 -229
- package/vault/derive.ts +0 -113
- package/vault/device-access.ts +0 -87
- package/vault/device-anchor.ts +0 -185
- package/vault/handoff.ts +0 -396
- package/vault/index.ts +0 -21
- package/vault/pin.ts +0 -153
- package/vault/public-key-seal.ts +0 -131
- package/vault/seed.ts +0 -272
- package/vault/team.ts +0 -355
- package/vault/vault-item.ts +0 -131
- package/vault/vault-migrate-digest.ts +0 -29
- package/vault/wrapped.ts +0 -77
- package/wire/ARCHITECTURE.md +0 -90
- package/wire/CONTRIBUTING.md +0 -19
- package/wire/adapters/messages/anthropic-map.ts +0 -37
- package/wire/adapters/messages/index.ts +0 -7
- package/wire/adapters/messages/reasoning-from-items.ts +0 -38
- package/wire/adapters/messages/reasoning-signature.ts +0 -243
- package/wire/adapters/messages/request.ts +0 -574
- package/wire/adapters/messages/response.ts +0 -215
- package/wire/adapters/messages/streaming.ts +0 -1027
- package/wire/adapters/messages/usage.ts +0 -43
- package/wire/adapters/responses/index.ts +0 -3
- package/wire/adapters/responses/request.ts +0 -395
- package/wire/adapters/responses/response.ts +0 -88
- package/wire/adapters/responses/streaming.ts +0 -344
- package/wire/assets/openllm-light.svg +0 -18
- package/wire/assets/openllm.svg +0 -18
- package/wire/features/account-rank.ts +0 -166
- package/wire/features/compaction/compact-request.ts +0 -862
- package/wire/features/compaction/compaction-text.ts +0 -43
- package/wire/features/context-demote.ts +0 -47
- package/wire/features/context-overflow-strategy.ts +0 -26
- package/wire/features/conversation-affinity.ts +0 -144
- package/wire/features/max-tokens-backfill.ts +0 -141
- package/wire/features/model-caps.ts +0 -53
- package/wire/features/model-settings.ts +0 -24
- package/wire/features/output-limit-clamp.ts +0 -64
- package/wire/features/quota-gate.ts +0 -85
- package/wire/index.ts +0 -44
- package/wire/lib/attempt-outcome.ts +0 -43
- package/wire/lib/canonical/count-tokens-capability.ts +0 -138
- package/wire/lib/canonical/image-signature.ts +0 -202
- package/wire/lib/canonical/image-sse.ts +0 -216
- package/wire/lib/canonical/token-estimate.ts +0 -266
- package/wire/lib/encrypted-content.ts +0 -66
- package/wire/lib/error-class.ts +0 -154
- package/wire/lib/error-envelope.ts +0 -56
- package/wire/lib/provider-error-rules.ts +0 -48
- package/wire/lib/responses-apply-patch.ts +0 -104
- package/wire/lib/secret-scrub.ts +0 -101
- package/wire/lib/streaming/accumulate.ts +0 -221
- package/wire/lib/streaming/finish-reason.ts +0 -33
- package/wire/lib/streaming/provider-decode.ts +0 -259
- package/wire/lib/streaming/response-stream.ts +0 -71
- package/wire/lib/streaming/sse.ts +0 -699
- package/wire/lib/streaming/strip-tool-calls.ts +0 -95
- package/wire/lib/streaming/upstream-error.ts +0 -58
- package/wire/lib/strip-subagent-isolation.ts +0 -284
- package/wire/lib/token-ruler/bpe-core.ts +0 -426
- package/wire/lib/token-ruler/index.ts +0 -2
- package/wire/lib/token-ruler/ruler.ts +0 -79
- package/wire/lib/token-ruler/vocab/claude-ranks.ts +0 -16
- package/wire/lib/token-ruler/vocab/o200k-ranks.ts +0 -18
- package/wire/lib/token-ruler/vocab/o200k.ts +0 -19
- package/wire/lib/tool-name-map.ts +0 -271
- package/wire/lib/tool-schema.ts +0 -353
- package/wire/lib/usage-observer.ts +0 -125
- package/wire/providers/anthropic/adaptive-thinking.ts +0 -291
- package/wire/providers/anthropic/request.ts +0 -607
- package/wire/providers/anthropic/response.ts +0 -155
- package/wire/providers/anthropic/streaming.ts +0 -315
- package/wire/providers/anthropic/web-search-domains.ts +0 -49
- package/wire/providers/chatgpt/request.ts +0 -959
- package/wire/providers/chatgpt/streaming.ts +0 -1007
- package/wire/providers/chatgpt/web-search.ts +0 -63
- package/wire/providers/grok/web-search.ts +0 -87
- package/wire/providers/kimi/web-search.ts +0 -145
- package/wire/providers/upstream-deny.ts +0 -355
- package/wire/providers/upstream-request.ts +0 -619
- /package/{protocol/inference-headers.ts → dist/protocol/inference-headers.js} +0 -0
|
@@ -0,0 +1,2496 @@
|
|
|
1
|
+
import { Schema as S } from "effect";
|
|
2
|
+
export declare const OpenAIProviderOptions: S.Struct<{
|
|
3
|
+
readonly providerModelId: S.String;
|
|
4
|
+
}>;
|
|
5
|
+
export type TOpenAIProviderOptions = S.Schema.Type<typeof OpenAIProviderOptions>;
|
|
6
|
+
export declare const OpenAIEndpointKind: S.Literals<readonly ["chat", "embeddings", "images", "videos", "audio_transcription", "audio_speech"]>;
|
|
7
|
+
export type TOpenAIEndpointKind = S.Schema.Type<typeof OpenAIEndpointKind>;
|
|
8
|
+
export declare const AnthropicTool: S.Struct<{
|
|
9
|
+
readonly name: S.String;
|
|
10
|
+
readonly description: S.optional<S.String>;
|
|
11
|
+
readonly input_schema: S.optional<S.Unknown>;
|
|
12
|
+
readonly type: S.optional<S.String>;
|
|
13
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
14
|
+
readonly type: S.Literal<"ephemeral">;
|
|
15
|
+
}>>>;
|
|
16
|
+
}>;
|
|
17
|
+
export type TAnthropicTool = S.Schema.Type<typeof AnthropicTool>;
|
|
18
|
+
declare const AnthropicDocumentBlock: S.Struct<{
|
|
19
|
+
readonly type: S.Literal<"document">;
|
|
20
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
21
|
+
readonly type: S.Literal<"base64">;
|
|
22
|
+
readonly media_type: S.String;
|
|
23
|
+
readonly data: S.String;
|
|
24
|
+
}>, S.Struct<{
|
|
25
|
+
readonly type: S.Literal<"url">;
|
|
26
|
+
readonly url: S.String;
|
|
27
|
+
}>, S.Struct<{
|
|
28
|
+
readonly type: S.Literal<"text">;
|
|
29
|
+
readonly media_type: S.String;
|
|
30
|
+
readonly data: S.String;
|
|
31
|
+
}>, S.Struct<{
|
|
32
|
+
readonly type: S.Literal<"content">;
|
|
33
|
+
readonly content: S.Unknown;
|
|
34
|
+
}>, S.Struct<{
|
|
35
|
+
readonly type: S.Literal<"file">;
|
|
36
|
+
readonly file_id: S.String;
|
|
37
|
+
}>]>;
|
|
38
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
39
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
40
|
+
readonly citations: S.optional<S.Struct<{
|
|
41
|
+
readonly enabled: S.Boolean;
|
|
42
|
+
}>>;
|
|
43
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
44
|
+
readonly type: S.Literal<"ephemeral">;
|
|
45
|
+
}>>>;
|
|
46
|
+
}>;
|
|
47
|
+
export type TAnthropicDocumentBlock = S.Schema.Type<typeof AnthropicDocumentBlock>;
|
|
48
|
+
/** RAG search-result blocks (citable sources supplied by the client). */
|
|
49
|
+
declare const AnthropicSearchResultBlock: S.Struct<{
|
|
50
|
+
readonly type: S.Literal<"search_result">;
|
|
51
|
+
readonly source: S.String;
|
|
52
|
+
readonly title: S.String;
|
|
53
|
+
readonly content: S.$Array<S.Struct<{
|
|
54
|
+
readonly type: S.Literal<"text">;
|
|
55
|
+
readonly text: S.String;
|
|
56
|
+
readonly citations: S.optional<S.Unknown>;
|
|
57
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
58
|
+
readonly type: S.Literal<"ephemeral">;
|
|
59
|
+
}>>>;
|
|
60
|
+
}>>;
|
|
61
|
+
readonly citations: S.optional<S.Unknown>;
|
|
62
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
63
|
+
readonly type: S.Literal<"ephemeral">;
|
|
64
|
+
}>>>;
|
|
65
|
+
}>;
|
|
66
|
+
export type TAnthropicSearchResultBlock = S.Schema.Type<typeof AnthropicSearchResultBlock>;
|
|
67
|
+
export declare const AnthropicContentBlock: S.Union<readonly [S.Struct<{
|
|
68
|
+
readonly type: S.Literal<"text">;
|
|
69
|
+
readonly text: S.String;
|
|
70
|
+
readonly citations: S.optional<S.Unknown>;
|
|
71
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
72
|
+
readonly type: S.Literal<"ephemeral">;
|
|
73
|
+
}>>>;
|
|
74
|
+
}>, S.Struct<{
|
|
75
|
+
readonly type: S.Literal<"image">;
|
|
76
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
77
|
+
readonly type: S.Literal<"base64">;
|
|
78
|
+
readonly media_type: S.String;
|
|
79
|
+
readonly data: S.String;
|
|
80
|
+
}>, S.Struct<{
|
|
81
|
+
readonly type: S.Literal<"url">;
|
|
82
|
+
readonly url: S.String;
|
|
83
|
+
}>, S.Struct<{
|
|
84
|
+
readonly type: S.Literal<"file">;
|
|
85
|
+
readonly file_id: S.String;
|
|
86
|
+
}>]>;
|
|
87
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
88
|
+
readonly type: S.Literal<"ephemeral">;
|
|
89
|
+
}>>>;
|
|
90
|
+
}>, S.Struct<{
|
|
91
|
+
readonly type: S.Literal<"document">;
|
|
92
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
93
|
+
readonly type: S.Literal<"base64">;
|
|
94
|
+
readonly media_type: S.String;
|
|
95
|
+
readonly data: S.String;
|
|
96
|
+
}>, S.Struct<{
|
|
97
|
+
readonly type: S.Literal<"url">;
|
|
98
|
+
readonly url: S.String;
|
|
99
|
+
}>, S.Struct<{
|
|
100
|
+
readonly type: S.Literal<"text">;
|
|
101
|
+
readonly media_type: S.String;
|
|
102
|
+
readonly data: S.String;
|
|
103
|
+
}>, S.Struct<{
|
|
104
|
+
readonly type: S.Literal<"content">;
|
|
105
|
+
readonly content: S.Unknown;
|
|
106
|
+
}>, S.Struct<{
|
|
107
|
+
readonly type: S.Literal<"file">;
|
|
108
|
+
readonly file_id: S.String;
|
|
109
|
+
}>]>;
|
|
110
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
111
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
112
|
+
readonly citations: S.optional<S.Struct<{
|
|
113
|
+
readonly enabled: S.Boolean;
|
|
114
|
+
}>>;
|
|
115
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
116
|
+
readonly type: S.Literal<"ephemeral">;
|
|
117
|
+
}>>>;
|
|
118
|
+
}>, S.Struct<{
|
|
119
|
+
readonly type: S.Literal<"search_result">;
|
|
120
|
+
readonly source: S.String;
|
|
121
|
+
readonly title: S.String;
|
|
122
|
+
readonly content: S.$Array<S.Struct<{
|
|
123
|
+
readonly type: S.Literal<"text">;
|
|
124
|
+
readonly text: S.String;
|
|
125
|
+
readonly citations: S.optional<S.Unknown>;
|
|
126
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
127
|
+
readonly type: S.Literal<"ephemeral">;
|
|
128
|
+
}>>>;
|
|
129
|
+
}>>;
|
|
130
|
+
readonly citations: S.optional<S.Unknown>;
|
|
131
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
132
|
+
readonly type: S.Literal<"ephemeral">;
|
|
133
|
+
}>>>;
|
|
134
|
+
}>, S.Struct<{
|
|
135
|
+
readonly type: S.Literal<"container_upload">;
|
|
136
|
+
readonly file_id: S.String;
|
|
137
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
138
|
+
readonly type: S.Literal<"ephemeral">;
|
|
139
|
+
}>>>;
|
|
140
|
+
}>, S.Struct<{
|
|
141
|
+
readonly type: S.Literal<"tool_use">;
|
|
142
|
+
readonly id: S.String;
|
|
143
|
+
readonly name: S.String;
|
|
144
|
+
readonly input: S.Unknown;
|
|
145
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
146
|
+
readonly type: S.Literal<"ephemeral">;
|
|
147
|
+
}>>>;
|
|
148
|
+
}>, S.Struct<{
|
|
149
|
+
readonly type: S.Literal<"tool_result">;
|
|
150
|
+
readonly tool_use_id: S.String;
|
|
151
|
+
readonly content: S.Union<readonly [S.String, S.$Array<S.Union<readonly [S.Struct<{
|
|
152
|
+
readonly type: S.Literal<"text">;
|
|
153
|
+
readonly text: S.String;
|
|
154
|
+
readonly citations: S.optional<S.Unknown>;
|
|
155
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
156
|
+
readonly type: S.Literal<"ephemeral">;
|
|
157
|
+
}>>>;
|
|
158
|
+
}>, S.Struct<{
|
|
159
|
+
readonly type: S.Literal<"image">;
|
|
160
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
161
|
+
readonly type: S.Literal<"base64">;
|
|
162
|
+
readonly media_type: S.String;
|
|
163
|
+
readonly data: S.String;
|
|
164
|
+
}>, S.Struct<{
|
|
165
|
+
readonly type: S.Literal<"url">;
|
|
166
|
+
readonly url: S.String;
|
|
167
|
+
}>, S.Struct<{
|
|
168
|
+
readonly type: S.Literal<"file">;
|
|
169
|
+
readonly file_id: S.String;
|
|
170
|
+
}>]>;
|
|
171
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
172
|
+
readonly type: S.Literal<"ephemeral">;
|
|
173
|
+
}>>>;
|
|
174
|
+
}>, S.Struct<{
|
|
175
|
+
readonly type: S.Literal<"document">;
|
|
176
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
177
|
+
readonly type: S.Literal<"base64">;
|
|
178
|
+
readonly media_type: S.String;
|
|
179
|
+
readonly data: S.String;
|
|
180
|
+
}>, S.Struct<{
|
|
181
|
+
readonly type: S.Literal<"url">;
|
|
182
|
+
readonly url: S.String;
|
|
183
|
+
}>, S.Struct<{
|
|
184
|
+
readonly type: S.Literal<"text">;
|
|
185
|
+
readonly media_type: S.String;
|
|
186
|
+
readonly data: S.String;
|
|
187
|
+
}>, S.Struct<{
|
|
188
|
+
readonly type: S.Literal<"content">;
|
|
189
|
+
readonly content: S.Unknown;
|
|
190
|
+
}>, S.Struct<{
|
|
191
|
+
readonly type: S.Literal<"file">;
|
|
192
|
+
readonly file_id: S.String;
|
|
193
|
+
}>]>;
|
|
194
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
195
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
196
|
+
readonly citations: S.optional<S.Struct<{
|
|
197
|
+
readonly enabled: S.Boolean;
|
|
198
|
+
}>>;
|
|
199
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
200
|
+
readonly type: S.Literal<"ephemeral">;
|
|
201
|
+
}>>>;
|
|
202
|
+
}>, S.Struct<{
|
|
203
|
+
readonly type: S.Literal<"search_result">;
|
|
204
|
+
readonly source: S.String;
|
|
205
|
+
readonly title: S.String;
|
|
206
|
+
readonly content: S.$Array<S.Struct<{
|
|
207
|
+
readonly type: S.Literal<"text">;
|
|
208
|
+
readonly text: S.String;
|
|
209
|
+
readonly citations: S.optional<S.Unknown>;
|
|
210
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
211
|
+
readonly type: S.Literal<"ephemeral">;
|
|
212
|
+
}>>>;
|
|
213
|
+
}>>;
|
|
214
|
+
readonly citations: S.optional<S.Unknown>;
|
|
215
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
216
|
+
readonly type: S.Literal<"ephemeral">;
|
|
217
|
+
}>>>;
|
|
218
|
+
}>, S.Struct<{
|
|
219
|
+
readonly type: S.Literal<"tool_reference">;
|
|
220
|
+
readonly tool_name: S.String;
|
|
221
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
222
|
+
readonly type: S.Literal<"ephemeral">;
|
|
223
|
+
}>>>;
|
|
224
|
+
}>]>>]>;
|
|
225
|
+
readonly is_error: S.optional<S.Boolean>;
|
|
226
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
227
|
+
readonly type: S.Literal<"ephemeral">;
|
|
228
|
+
}>>>;
|
|
229
|
+
}>, S.Struct<{
|
|
230
|
+
readonly type: S.Literal<"thinking">;
|
|
231
|
+
readonly thinking: S.String;
|
|
232
|
+
readonly signature: S.optional<S.String>;
|
|
233
|
+
}>, S.Struct<{
|
|
234
|
+
readonly type: S.Literal<"compaction">;
|
|
235
|
+
readonly content: S.optional<S.Unknown>;
|
|
236
|
+
}>, S.Struct<{
|
|
237
|
+
readonly type: S.Literal<"server_tool_use">;
|
|
238
|
+
readonly id: S.String;
|
|
239
|
+
readonly name: S.String;
|
|
240
|
+
readonly input: S.Unknown;
|
|
241
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
242
|
+
readonly type: S.Literal<"ephemeral">;
|
|
243
|
+
}>>>;
|
|
244
|
+
}>, S.Struct<{
|
|
245
|
+
readonly type: S.Literal<"web_search_tool_result">;
|
|
246
|
+
readonly tool_use_id: S.String;
|
|
247
|
+
readonly content: S.Unknown;
|
|
248
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
249
|
+
readonly type: S.Literal<"ephemeral">;
|
|
250
|
+
}>>>;
|
|
251
|
+
}>, S.Struct<{
|
|
252
|
+
readonly type: S.Literal<"web_fetch_tool_result">;
|
|
253
|
+
readonly tool_use_id: S.String;
|
|
254
|
+
readonly content: S.Unknown;
|
|
255
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
256
|
+
readonly type: S.Literal<"ephemeral">;
|
|
257
|
+
}>>>;
|
|
258
|
+
}>, S.Struct<{
|
|
259
|
+
readonly type: S.Literal<"code_execution_tool_result">;
|
|
260
|
+
readonly tool_use_id: S.String;
|
|
261
|
+
readonly content: S.Unknown;
|
|
262
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
263
|
+
readonly type: S.Literal<"ephemeral">;
|
|
264
|
+
}>>>;
|
|
265
|
+
}>, S.Struct<{
|
|
266
|
+
readonly type: S.Literal<"bash_code_execution_tool_result">;
|
|
267
|
+
readonly tool_use_id: S.String;
|
|
268
|
+
readonly content: S.Unknown;
|
|
269
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
270
|
+
readonly type: S.Literal<"ephemeral">;
|
|
271
|
+
}>>>;
|
|
272
|
+
}>, S.Struct<{
|
|
273
|
+
readonly type: S.Literal<"text_editor_code_execution_tool_result">;
|
|
274
|
+
readonly tool_use_id: S.String;
|
|
275
|
+
readonly content: S.Unknown;
|
|
276
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
277
|
+
readonly type: S.Literal<"ephemeral">;
|
|
278
|
+
}>>>;
|
|
279
|
+
}>, S.Struct<{
|
|
280
|
+
readonly type: S.Literal<"tool_search_tool_result">;
|
|
281
|
+
readonly tool_use_id: S.String;
|
|
282
|
+
readonly content: S.Unknown;
|
|
283
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
284
|
+
readonly type: S.Literal<"ephemeral">;
|
|
285
|
+
}>>>;
|
|
286
|
+
}>, S.Struct<{
|
|
287
|
+
readonly type: S.Literal<"mcp_tool_use">;
|
|
288
|
+
readonly id: S.String;
|
|
289
|
+
readonly name: S.String;
|
|
290
|
+
readonly server_name: S.optional<S.String>;
|
|
291
|
+
readonly input: S.Unknown;
|
|
292
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
293
|
+
readonly type: S.Literal<"ephemeral">;
|
|
294
|
+
}>>>;
|
|
295
|
+
}>, S.Struct<{
|
|
296
|
+
readonly type: S.Literal<"mcp_tool_result">;
|
|
297
|
+
readonly tool_use_id: S.String;
|
|
298
|
+
readonly content: S.Unknown;
|
|
299
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
300
|
+
readonly type: S.Literal<"ephemeral">;
|
|
301
|
+
}>>>;
|
|
302
|
+
}>, S.Struct<{
|
|
303
|
+
readonly type: S.Literal<"tool_reference">;
|
|
304
|
+
readonly tool_name: S.String;
|
|
305
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
306
|
+
readonly type: S.Literal<"ephemeral">;
|
|
307
|
+
}>>>;
|
|
308
|
+
}>, S.Struct<{
|
|
309
|
+
readonly type: S.Literal<"browser_state">;
|
|
310
|
+
readonly content: S.optional<S.Unknown>;
|
|
311
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
312
|
+
readonly type: S.Literal<"ephemeral">;
|
|
313
|
+
}>>>;
|
|
314
|
+
}>, S.Struct<{
|
|
315
|
+
readonly type: S.Literal<"tool_addition">;
|
|
316
|
+
readonly tool: S.Unknown;
|
|
317
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
318
|
+
readonly type: S.Literal<"ephemeral">;
|
|
319
|
+
}>>>;
|
|
320
|
+
}>, S.Struct<{
|
|
321
|
+
readonly type: S.Literal<"redacted_thinking">;
|
|
322
|
+
readonly data: S.String;
|
|
323
|
+
}>]>;
|
|
324
|
+
export type TAnthropicContentBlock = S.Schema.Type<typeof AnthropicContentBlock>;
|
|
325
|
+
export declare const AnthropicMessage: S.Struct<{
|
|
326
|
+
readonly role: S.Literals<readonly ["user", "assistant", "system"]>;
|
|
327
|
+
readonly content: S.Union<readonly [S.String, S.$Array<S.Union<readonly [S.Struct<{
|
|
328
|
+
readonly type: S.Literal<"text">;
|
|
329
|
+
readonly text: S.String;
|
|
330
|
+
readonly citations: S.optional<S.Unknown>;
|
|
331
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
332
|
+
readonly type: S.Literal<"ephemeral">;
|
|
333
|
+
}>>>;
|
|
334
|
+
}>, S.Struct<{
|
|
335
|
+
readonly type: S.Literal<"image">;
|
|
336
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
337
|
+
readonly type: S.Literal<"base64">;
|
|
338
|
+
readonly media_type: S.String;
|
|
339
|
+
readonly data: S.String;
|
|
340
|
+
}>, S.Struct<{
|
|
341
|
+
readonly type: S.Literal<"url">;
|
|
342
|
+
readonly url: S.String;
|
|
343
|
+
}>, S.Struct<{
|
|
344
|
+
readonly type: S.Literal<"file">;
|
|
345
|
+
readonly file_id: S.String;
|
|
346
|
+
}>]>;
|
|
347
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
348
|
+
readonly type: S.Literal<"ephemeral">;
|
|
349
|
+
}>>>;
|
|
350
|
+
}>, S.Struct<{
|
|
351
|
+
readonly type: S.Literal<"document">;
|
|
352
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
353
|
+
readonly type: S.Literal<"base64">;
|
|
354
|
+
readonly media_type: S.String;
|
|
355
|
+
readonly data: S.String;
|
|
356
|
+
}>, S.Struct<{
|
|
357
|
+
readonly type: S.Literal<"url">;
|
|
358
|
+
readonly url: S.String;
|
|
359
|
+
}>, S.Struct<{
|
|
360
|
+
readonly type: S.Literal<"text">;
|
|
361
|
+
readonly media_type: S.String;
|
|
362
|
+
readonly data: S.String;
|
|
363
|
+
}>, S.Struct<{
|
|
364
|
+
readonly type: S.Literal<"content">;
|
|
365
|
+
readonly content: S.Unknown;
|
|
366
|
+
}>, S.Struct<{
|
|
367
|
+
readonly type: S.Literal<"file">;
|
|
368
|
+
readonly file_id: S.String;
|
|
369
|
+
}>]>;
|
|
370
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
371
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
372
|
+
readonly citations: S.optional<S.Struct<{
|
|
373
|
+
readonly enabled: S.Boolean;
|
|
374
|
+
}>>;
|
|
375
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
376
|
+
readonly type: S.Literal<"ephemeral">;
|
|
377
|
+
}>>>;
|
|
378
|
+
}>, S.Struct<{
|
|
379
|
+
readonly type: S.Literal<"search_result">;
|
|
380
|
+
readonly source: S.String;
|
|
381
|
+
readonly title: S.String;
|
|
382
|
+
readonly content: S.$Array<S.Struct<{
|
|
383
|
+
readonly type: S.Literal<"text">;
|
|
384
|
+
readonly text: S.String;
|
|
385
|
+
readonly citations: S.optional<S.Unknown>;
|
|
386
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
387
|
+
readonly type: S.Literal<"ephemeral">;
|
|
388
|
+
}>>>;
|
|
389
|
+
}>>;
|
|
390
|
+
readonly citations: S.optional<S.Unknown>;
|
|
391
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
392
|
+
readonly type: S.Literal<"ephemeral">;
|
|
393
|
+
}>>>;
|
|
394
|
+
}>, S.Struct<{
|
|
395
|
+
readonly type: S.Literal<"container_upload">;
|
|
396
|
+
readonly file_id: S.String;
|
|
397
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
398
|
+
readonly type: S.Literal<"ephemeral">;
|
|
399
|
+
}>>>;
|
|
400
|
+
}>, S.Struct<{
|
|
401
|
+
readonly type: S.Literal<"tool_use">;
|
|
402
|
+
readonly id: S.String;
|
|
403
|
+
readonly name: S.String;
|
|
404
|
+
readonly input: S.Unknown;
|
|
405
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
406
|
+
readonly type: S.Literal<"ephemeral">;
|
|
407
|
+
}>>>;
|
|
408
|
+
}>, S.Struct<{
|
|
409
|
+
readonly type: S.Literal<"tool_result">;
|
|
410
|
+
readonly tool_use_id: S.String;
|
|
411
|
+
readonly content: S.Union<readonly [S.String, S.$Array<S.Union<readonly [S.Struct<{
|
|
412
|
+
readonly type: S.Literal<"text">;
|
|
413
|
+
readonly text: S.String;
|
|
414
|
+
readonly citations: S.optional<S.Unknown>;
|
|
415
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
416
|
+
readonly type: S.Literal<"ephemeral">;
|
|
417
|
+
}>>>;
|
|
418
|
+
}>, S.Struct<{
|
|
419
|
+
readonly type: S.Literal<"image">;
|
|
420
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
421
|
+
readonly type: S.Literal<"base64">;
|
|
422
|
+
readonly media_type: S.String;
|
|
423
|
+
readonly data: S.String;
|
|
424
|
+
}>, S.Struct<{
|
|
425
|
+
readonly type: S.Literal<"url">;
|
|
426
|
+
readonly url: S.String;
|
|
427
|
+
}>, S.Struct<{
|
|
428
|
+
readonly type: S.Literal<"file">;
|
|
429
|
+
readonly file_id: S.String;
|
|
430
|
+
}>]>;
|
|
431
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
432
|
+
readonly type: S.Literal<"ephemeral">;
|
|
433
|
+
}>>>;
|
|
434
|
+
}>, S.Struct<{
|
|
435
|
+
readonly type: S.Literal<"document">;
|
|
436
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
437
|
+
readonly type: S.Literal<"base64">;
|
|
438
|
+
readonly media_type: S.String;
|
|
439
|
+
readonly data: S.String;
|
|
440
|
+
}>, S.Struct<{
|
|
441
|
+
readonly type: S.Literal<"url">;
|
|
442
|
+
readonly url: S.String;
|
|
443
|
+
}>, S.Struct<{
|
|
444
|
+
readonly type: S.Literal<"text">;
|
|
445
|
+
readonly media_type: S.String;
|
|
446
|
+
readonly data: S.String;
|
|
447
|
+
}>, S.Struct<{
|
|
448
|
+
readonly type: S.Literal<"content">;
|
|
449
|
+
readonly content: S.Unknown;
|
|
450
|
+
}>, S.Struct<{
|
|
451
|
+
readonly type: S.Literal<"file">;
|
|
452
|
+
readonly file_id: S.String;
|
|
453
|
+
}>]>;
|
|
454
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
455
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
456
|
+
readonly citations: S.optional<S.Struct<{
|
|
457
|
+
readonly enabled: S.Boolean;
|
|
458
|
+
}>>;
|
|
459
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
460
|
+
readonly type: S.Literal<"ephemeral">;
|
|
461
|
+
}>>>;
|
|
462
|
+
}>, S.Struct<{
|
|
463
|
+
readonly type: S.Literal<"search_result">;
|
|
464
|
+
readonly source: S.String;
|
|
465
|
+
readonly title: S.String;
|
|
466
|
+
readonly content: S.$Array<S.Struct<{
|
|
467
|
+
readonly type: S.Literal<"text">;
|
|
468
|
+
readonly text: S.String;
|
|
469
|
+
readonly citations: S.optional<S.Unknown>;
|
|
470
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
471
|
+
readonly type: S.Literal<"ephemeral">;
|
|
472
|
+
}>>>;
|
|
473
|
+
}>>;
|
|
474
|
+
readonly citations: S.optional<S.Unknown>;
|
|
475
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
476
|
+
readonly type: S.Literal<"ephemeral">;
|
|
477
|
+
}>>>;
|
|
478
|
+
}>, S.Struct<{
|
|
479
|
+
readonly type: S.Literal<"tool_reference">;
|
|
480
|
+
readonly tool_name: S.String;
|
|
481
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
482
|
+
readonly type: S.Literal<"ephemeral">;
|
|
483
|
+
}>>>;
|
|
484
|
+
}>]>>]>;
|
|
485
|
+
readonly is_error: S.optional<S.Boolean>;
|
|
486
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
487
|
+
readonly type: S.Literal<"ephemeral">;
|
|
488
|
+
}>>>;
|
|
489
|
+
}>, S.Struct<{
|
|
490
|
+
readonly type: S.Literal<"thinking">;
|
|
491
|
+
readonly thinking: S.String;
|
|
492
|
+
readonly signature: S.optional<S.String>;
|
|
493
|
+
}>, S.Struct<{
|
|
494
|
+
readonly type: S.Literal<"compaction">;
|
|
495
|
+
readonly content: S.optional<S.Unknown>;
|
|
496
|
+
}>, S.Struct<{
|
|
497
|
+
readonly type: S.Literal<"server_tool_use">;
|
|
498
|
+
readonly id: S.String;
|
|
499
|
+
readonly name: S.String;
|
|
500
|
+
readonly input: S.Unknown;
|
|
501
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
502
|
+
readonly type: S.Literal<"ephemeral">;
|
|
503
|
+
}>>>;
|
|
504
|
+
}>, S.Struct<{
|
|
505
|
+
readonly type: S.Literal<"web_search_tool_result">;
|
|
506
|
+
readonly tool_use_id: S.String;
|
|
507
|
+
readonly content: S.Unknown;
|
|
508
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
509
|
+
readonly type: S.Literal<"ephemeral">;
|
|
510
|
+
}>>>;
|
|
511
|
+
}>, S.Struct<{
|
|
512
|
+
readonly type: S.Literal<"web_fetch_tool_result">;
|
|
513
|
+
readonly tool_use_id: S.String;
|
|
514
|
+
readonly content: S.Unknown;
|
|
515
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
516
|
+
readonly type: S.Literal<"ephemeral">;
|
|
517
|
+
}>>>;
|
|
518
|
+
}>, S.Struct<{
|
|
519
|
+
readonly type: S.Literal<"code_execution_tool_result">;
|
|
520
|
+
readonly tool_use_id: S.String;
|
|
521
|
+
readonly content: S.Unknown;
|
|
522
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
523
|
+
readonly type: S.Literal<"ephemeral">;
|
|
524
|
+
}>>>;
|
|
525
|
+
}>, S.Struct<{
|
|
526
|
+
readonly type: S.Literal<"bash_code_execution_tool_result">;
|
|
527
|
+
readonly tool_use_id: S.String;
|
|
528
|
+
readonly content: S.Unknown;
|
|
529
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
530
|
+
readonly type: S.Literal<"ephemeral">;
|
|
531
|
+
}>>>;
|
|
532
|
+
}>, S.Struct<{
|
|
533
|
+
readonly type: S.Literal<"text_editor_code_execution_tool_result">;
|
|
534
|
+
readonly tool_use_id: S.String;
|
|
535
|
+
readonly content: S.Unknown;
|
|
536
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
537
|
+
readonly type: S.Literal<"ephemeral">;
|
|
538
|
+
}>>>;
|
|
539
|
+
}>, S.Struct<{
|
|
540
|
+
readonly type: S.Literal<"tool_search_tool_result">;
|
|
541
|
+
readonly tool_use_id: S.String;
|
|
542
|
+
readonly content: S.Unknown;
|
|
543
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
544
|
+
readonly type: S.Literal<"ephemeral">;
|
|
545
|
+
}>>>;
|
|
546
|
+
}>, S.Struct<{
|
|
547
|
+
readonly type: S.Literal<"mcp_tool_use">;
|
|
548
|
+
readonly id: S.String;
|
|
549
|
+
readonly name: S.String;
|
|
550
|
+
readonly server_name: S.optional<S.String>;
|
|
551
|
+
readonly input: S.Unknown;
|
|
552
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
553
|
+
readonly type: S.Literal<"ephemeral">;
|
|
554
|
+
}>>>;
|
|
555
|
+
}>, S.Struct<{
|
|
556
|
+
readonly type: S.Literal<"mcp_tool_result">;
|
|
557
|
+
readonly tool_use_id: S.String;
|
|
558
|
+
readonly content: S.Unknown;
|
|
559
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
560
|
+
readonly type: S.Literal<"ephemeral">;
|
|
561
|
+
}>>>;
|
|
562
|
+
}>, S.Struct<{
|
|
563
|
+
readonly type: S.Literal<"tool_reference">;
|
|
564
|
+
readonly tool_name: S.String;
|
|
565
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
566
|
+
readonly type: S.Literal<"ephemeral">;
|
|
567
|
+
}>>>;
|
|
568
|
+
}>, S.Struct<{
|
|
569
|
+
readonly type: S.Literal<"browser_state">;
|
|
570
|
+
readonly content: S.optional<S.Unknown>;
|
|
571
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
572
|
+
readonly type: S.Literal<"ephemeral">;
|
|
573
|
+
}>>>;
|
|
574
|
+
}>, S.Struct<{
|
|
575
|
+
readonly type: S.Literal<"tool_addition">;
|
|
576
|
+
readonly tool: S.Unknown;
|
|
577
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
578
|
+
readonly type: S.Literal<"ephemeral">;
|
|
579
|
+
}>>>;
|
|
580
|
+
}>, S.Struct<{
|
|
581
|
+
readonly type: S.Literal<"redacted_thinking">;
|
|
582
|
+
readonly data: S.String;
|
|
583
|
+
}>]>>]>;
|
|
584
|
+
}>;
|
|
585
|
+
export type TAnthropicMessage = S.Schema.Type<typeof AnthropicMessage>;
|
|
586
|
+
/**
|
|
587
|
+
* Extended-thinking knob. `enabled` carries an explicit budget;
|
|
588
|
+
* `adaptive` lets Claude 4.6+ decide the budget itself (paired with
|
|
589
|
+
* `output_config.effort` to set the target effort level).
|
|
590
|
+
*/
|
|
591
|
+
export declare const AnthropicThinking: S.Union<readonly [S.Struct<{
|
|
592
|
+
readonly type: S.Literal<"enabled">;
|
|
593
|
+
readonly budget_tokens: S.Number;
|
|
594
|
+
}>, S.Struct<{
|
|
595
|
+
readonly type: S.Literal<"adaptive">;
|
|
596
|
+
}>, S.Struct<{
|
|
597
|
+
readonly type: S.Literal<"disabled">;
|
|
598
|
+
}>]>;
|
|
599
|
+
export type TAnthropicThinking = S.Schema.Type<typeof AnthropicThinking>;
|
|
600
|
+
/**
|
|
601
|
+
* Adaptive-thinking effort levels Anthropic accepts on
|
|
602
|
+
* `output_config.effort`. Only honoured by Claude 4.6+; other models
|
|
603
|
+
* 400 if this is set (see `providers/anthropic/adaptive-thinking.ts`).
|
|
604
|
+
*/
|
|
605
|
+
export declare const AnthropicEffort: S.Literals<readonly ["minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
606
|
+
export type TAnthropicEffort = S.Schema.Type<typeof AnthropicEffort>;
|
|
607
|
+
export declare const AnthropicOutputConfig: S.Struct<{
|
|
608
|
+
readonly effort: S.optional<S.Literals<readonly ["minimal", "low", "medium", "high", "xhigh", "max"]>>;
|
|
609
|
+
}>;
|
|
610
|
+
export type TAnthropicOutputConfig = S.Schema.Type<typeof AnthropicOutputConfig>;
|
|
611
|
+
export declare const AnthropicRequest: S.Struct<{
|
|
612
|
+
readonly model: S.String;
|
|
613
|
+
readonly messages: S.$Array<S.Struct<{
|
|
614
|
+
readonly role: S.Literals<readonly ["user", "assistant", "system"]>;
|
|
615
|
+
readonly content: S.Union<readonly [S.String, S.$Array<S.Union<readonly [S.Struct<{
|
|
616
|
+
readonly type: S.Literal<"text">;
|
|
617
|
+
readonly text: S.String;
|
|
618
|
+
readonly citations: S.optional<S.Unknown>;
|
|
619
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
620
|
+
readonly type: S.Literal<"ephemeral">;
|
|
621
|
+
}>>>;
|
|
622
|
+
}>, S.Struct<{
|
|
623
|
+
readonly type: S.Literal<"image">;
|
|
624
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
625
|
+
readonly type: S.Literal<"base64">;
|
|
626
|
+
readonly media_type: S.String;
|
|
627
|
+
readonly data: S.String;
|
|
628
|
+
}>, S.Struct<{
|
|
629
|
+
readonly type: S.Literal<"url">;
|
|
630
|
+
readonly url: S.String;
|
|
631
|
+
}>, S.Struct<{
|
|
632
|
+
readonly type: S.Literal<"file">;
|
|
633
|
+
readonly file_id: S.String;
|
|
634
|
+
}>]>;
|
|
635
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
636
|
+
readonly type: S.Literal<"ephemeral">;
|
|
637
|
+
}>>>;
|
|
638
|
+
}>, S.Struct<{
|
|
639
|
+
readonly type: S.Literal<"document">;
|
|
640
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
641
|
+
readonly type: S.Literal<"base64">;
|
|
642
|
+
readonly media_type: S.String;
|
|
643
|
+
readonly data: S.String;
|
|
644
|
+
}>, S.Struct<{
|
|
645
|
+
readonly type: S.Literal<"url">;
|
|
646
|
+
readonly url: S.String;
|
|
647
|
+
}>, S.Struct<{
|
|
648
|
+
readonly type: S.Literal<"text">;
|
|
649
|
+
readonly media_type: S.String;
|
|
650
|
+
readonly data: S.String;
|
|
651
|
+
}>, S.Struct<{
|
|
652
|
+
readonly type: S.Literal<"content">;
|
|
653
|
+
readonly content: S.Unknown;
|
|
654
|
+
}>, S.Struct<{
|
|
655
|
+
readonly type: S.Literal<"file">;
|
|
656
|
+
readonly file_id: S.String;
|
|
657
|
+
}>]>;
|
|
658
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
659
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
660
|
+
readonly citations: S.optional<S.Struct<{
|
|
661
|
+
readonly enabled: S.Boolean;
|
|
662
|
+
}>>;
|
|
663
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
664
|
+
readonly type: S.Literal<"ephemeral">;
|
|
665
|
+
}>>>;
|
|
666
|
+
}>, S.Struct<{
|
|
667
|
+
readonly type: S.Literal<"search_result">;
|
|
668
|
+
readonly source: S.String;
|
|
669
|
+
readonly title: S.String;
|
|
670
|
+
readonly content: S.$Array<S.Struct<{
|
|
671
|
+
readonly type: S.Literal<"text">;
|
|
672
|
+
readonly text: S.String;
|
|
673
|
+
readonly citations: S.optional<S.Unknown>;
|
|
674
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
675
|
+
readonly type: S.Literal<"ephemeral">;
|
|
676
|
+
}>>>;
|
|
677
|
+
}>>;
|
|
678
|
+
readonly citations: S.optional<S.Unknown>;
|
|
679
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
680
|
+
readonly type: S.Literal<"ephemeral">;
|
|
681
|
+
}>>>;
|
|
682
|
+
}>, S.Struct<{
|
|
683
|
+
readonly type: S.Literal<"container_upload">;
|
|
684
|
+
readonly file_id: S.String;
|
|
685
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
686
|
+
readonly type: S.Literal<"ephemeral">;
|
|
687
|
+
}>>>;
|
|
688
|
+
}>, S.Struct<{
|
|
689
|
+
readonly type: S.Literal<"tool_use">;
|
|
690
|
+
readonly id: S.String;
|
|
691
|
+
readonly name: S.String;
|
|
692
|
+
readonly input: S.Unknown;
|
|
693
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
694
|
+
readonly type: S.Literal<"ephemeral">;
|
|
695
|
+
}>>>;
|
|
696
|
+
}>, S.Struct<{
|
|
697
|
+
readonly type: S.Literal<"tool_result">;
|
|
698
|
+
readonly tool_use_id: S.String;
|
|
699
|
+
readonly content: S.Union<readonly [S.String, S.$Array<S.Union<readonly [S.Struct<{
|
|
700
|
+
readonly type: S.Literal<"text">;
|
|
701
|
+
readonly text: S.String;
|
|
702
|
+
readonly citations: S.optional<S.Unknown>;
|
|
703
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
704
|
+
readonly type: S.Literal<"ephemeral">;
|
|
705
|
+
}>>>;
|
|
706
|
+
}>, S.Struct<{
|
|
707
|
+
readonly type: S.Literal<"image">;
|
|
708
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
709
|
+
readonly type: S.Literal<"base64">;
|
|
710
|
+
readonly media_type: S.String;
|
|
711
|
+
readonly data: S.String;
|
|
712
|
+
}>, S.Struct<{
|
|
713
|
+
readonly type: S.Literal<"url">;
|
|
714
|
+
readonly url: S.String;
|
|
715
|
+
}>, S.Struct<{
|
|
716
|
+
readonly type: S.Literal<"file">;
|
|
717
|
+
readonly file_id: S.String;
|
|
718
|
+
}>]>;
|
|
719
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
720
|
+
readonly type: S.Literal<"ephemeral">;
|
|
721
|
+
}>>>;
|
|
722
|
+
}>, S.Struct<{
|
|
723
|
+
readonly type: S.Literal<"document">;
|
|
724
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
725
|
+
readonly type: S.Literal<"base64">;
|
|
726
|
+
readonly media_type: S.String;
|
|
727
|
+
readonly data: S.String;
|
|
728
|
+
}>, S.Struct<{
|
|
729
|
+
readonly type: S.Literal<"url">;
|
|
730
|
+
readonly url: S.String;
|
|
731
|
+
}>, S.Struct<{
|
|
732
|
+
readonly type: S.Literal<"text">;
|
|
733
|
+
readonly media_type: S.String;
|
|
734
|
+
readonly data: S.String;
|
|
735
|
+
}>, S.Struct<{
|
|
736
|
+
readonly type: S.Literal<"content">;
|
|
737
|
+
readonly content: S.Unknown;
|
|
738
|
+
}>, S.Struct<{
|
|
739
|
+
readonly type: S.Literal<"file">;
|
|
740
|
+
readonly file_id: S.String;
|
|
741
|
+
}>]>;
|
|
742
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
743
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
744
|
+
readonly citations: S.optional<S.Struct<{
|
|
745
|
+
readonly enabled: S.Boolean;
|
|
746
|
+
}>>;
|
|
747
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
748
|
+
readonly type: S.Literal<"ephemeral">;
|
|
749
|
+
}>>>;
|
|
750
|
+
}>, S.Struct<{
|
|
751
|
+
readonly type: S.Literal<"search_result">;
|
|
752
|
+
readonly source: S.String;
|
|
753
|
+
readonly title: S.String;
|
|
754
|
+
readonly content: S.$Array<S.Struct<{
|
|
755
|
+
readonly type: S.Literal<"text">;
|
|
756
|
+
readonly text: S.String;
|
|
757
|
+
readonly citations: S.optional<S.Unknown>;
|
|
758
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
759
|
+
readonly type: S.Literal<"ephemeral">;
|
|
760
|
+
}>>>;
|
|
761
|
+
}>>;
|
|
762
|
+
readonly citations: S.optional<S.Unknown>;
|
|
763
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
764
|
+
readonly type: S.Literal<"ephemeral">;
|
|
765
|
+
}>>>;
|
|
766
|
+
}>, S.Struct<{
|
|
767
|
+
readonly type: S.Literal<"tool_reference">;
|
|
768
|
+
readonly tool_name: S.String;
|
|
769
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
770
|
+
readonly type: S.Literal<"ephemeral">;
|
|
771
|
+
}>>>;
|
|
772
|
+
}>]>>]>;
|
|
773
|
+
readonly is_error: S.optional<S.Boolean>;
|
|
774
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
775
|
+
readonly type: S.Literal<"ephemeral">;
|
|
776
|
+
}>>>;
|
|
777
|
+
}>, S.Struct<{
|
|
778
|
+
readonly type: S.Literal<"thinking">;
|
|
779
|
+
readonly thinking: S.String;
|
|
780
|
+
readonly signature: S.optional<S.String>;
|
|
781
|
+
}>, S.Struct<{
|
|
782
|
+
readonly type: S.Literal<"compaction">;
|
|
783
|
+
readonly content: S.optional<S.Unknown>;
|
|
784
|
+
}>, S.Struct<{
|
|
785
|
+
readonly type: S.Literal<"server_tool_use">;
|
|
786
|
+
readonly id: S.String;
|
|
787
|
+
readonly name: S.String;
|
|
788
|
+
readonly input: S.Unknown;
|
|
789
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
790
|
+
readonly type: S.Literal<"ephemeral">;
|
|
791
|
+
}>>>;
|
|
792
|
+
}>, S.Struct<{
|
|
793
|
+
readonly type: S.Literal<"web_search_tool_result">;
|
|
794
|
+
readonly tool_use_id: S.String;
|
|
795
|
+
readonly content: S.Unknown;
|
|
796
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
797
|
+
readonly type: S.Literal<"ephemeral">;
|
|
798
|
+
}>>>;
|
|
799
|
+
}>, S.Struct<{
|
|
800
|
+
readonly type: S.Literal<"web_fetch_tool_result">;
|
|
801
|
+
readonly tool_use_id: S.String;
|
|
802
|
+
readonly content: S.Unknown;
|
|
803
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
804
|
+
readonly type: S.Literal<"ephemeral">;
|
|
805
|
+
}>>>;
|
|
806
|
+
}>, S.Struct<{
|
|
807
|
+
readonly type: S.Literal<"code_execution_tool_result">;
|
|
808
|
+
readonly tool_use_id: S.String;
|
|
809
|
+
readonly content: S.Unknown;
|
|
810
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
811
|
+
readonly type: S.Literal<"ephemeral">;
|
|
812
|
+
}>>>;
|
|
813
|
+
}>, S.Struct<{
|
|
814
|
+
readonly type: S.Literal<"bash_code_execution_tool_result">;
|
|
815
|
+
readonly tool_use_id: S.String;
|
|
816
|
+
readonly content: S.Unknown;
|
|
817
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
818
|
+
readonly type: S.Literal<"ephemeral">;
|
|
819
|
+
}>>>;
|
|
820
|
+
}>, S.Struct<{
|
|
821
|
+
readonly type: S.Literal<"text_editor_code_execution_tool_result">;
|
|
822
|
+
readonly tool_use_id: S.String;
|
|
823
|
+
readonly content: S.Unknown;
|
|
824
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
825
|
+
readonly type: S.Literal<"ephemeral">;
|
|
826
|
+
}>>>;
|
|
827
|
+
}>, S.Struct<{
|
|
828
|
+
readonly type: S.Literal<"tool_search_tool_result">;
|
|
829
|
+
readonly tool_use_id: S.String;
|
|
830
|
+
readonly content: S.Unknown;
|
|
831
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
832
|
+
readonly type: S.Literal<"ephemeral">;
|
|
833
|
+
}>>>;
|
|
834
|
+
}>, S.Struct<{
|
|
835
|
+
readonly type: S.Literal<"mcp_tool_use">;
|
|
836
|
+
readonly id: S.String;
|
|
837
|
+
readonly name: S.String;
|
|
838
|
+
readonly server_name: S.optional<S.String>;
|
|
839
|
+
readonly input: S.Unknown;
|
|
840
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
841
|
+
readonly type: S.Literal<"ephemeral">;
|
|
842
|
+
}>>>;
|
|
843
|
+
}>, S.Struct<{
|
|
844
|
+
readonly type: S.Literal<"mcp_tool_result">;
|
|
845
|
+
readonly tool_use_id: S.String;
|
|
846
|
+
readonly content: S.Unknown;
|
|
847
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
848
|
+
readonly type: S.Literal<"ephemeral">;
|
|
849
|
+
}>>>;
|
|
850
|
+
}>, S.Struct<{
|
|
851
|
+
readonly type: S.Literal<"tool_reference">;
|
|
852
|
+
readonly tool_name: S.String;
|
|
853
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
854
|
+
readonly type: S.Literal<"ephemeral">;
|
|
855
|
+
}>>>;
|
|
856
|
+
}>, S.Struct<{
|
|
857
|
+
readonly type: S.Literal<"browser_state">;
|
|
858
|
+
readonly content: S.optional<S.Unknown>;
|
|
859
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
860
|
+
readonly type: S.Literal<"ephemeral">;
|
|
861
|
+
}>>>;
|
|
862
|
+
}>, S.Struct<{
|
|
863
|
+
readonly type: S.Literal<"tool_addition">;
|
|
864
|
+
readonly tool: S.Unknown;
|
|
865
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
866
|
+
readonly type: S.Literal<"ephemeral">;
|
|
867
|
+
}>>>;
|
|
868
|
+
}>, S.Struct<{
|
|
869
|
+
readonly type: S.Literal<"redacted_thinking">;
|
|
870
|
+
readonly data: S.String;
|
|
871
|
+
}>]>>]>;
|
|
872
|
+
}>>;
|
|
873
|
+
readonly max_tokens: S.Number;
|
|
874
|
+
readonly system: S.optional<S.Union<readonly [S.String, S.$Array<S.Struct<{
|
|
875
|
+
readonly type: S.Literal<"text">;
|
|
876
|
+
readonly text: S.String;
|
|
877
|
+
readonly citations: S.optional<S.Unknown>;
|
|
878
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
879
|
+
readonly type: S.Literal<"ephemeral">;
|
|
880
|
+
}>>>;
|
|
881
|
+
}>>]>>;
|
|
882
|
+
readonly temperature: S.optional<S.Number>;
|
|
883
|
+
readonly top_p: S.optional<S.Number>;
|
|
884
|
+
readonly top_k: S.optional<S.Number>;
|
|
885
|
+
readonly stop_sequences: S.optional<S.$Array<S.String>>;
|
|
886
|
+
readonly stream: S.optional<S.Boolean>;
|
|
887
|
+
readonly tools: S.optional<S.$Array<S.Struct<{
|
|
888
|
+
readonly name: S.String;
|
|
889
|
+
readonly description: S.optional<S.String>;
|
|
890
|
+
readonly input_schema: S.optional<S.Unknown>;
|
|
891
|
+
readonly type: S.optional<S.String>;
|
|
892
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
893
|
+
readonly type: S.Literal<"ephemeral">;
|
|
894
|
+
}>>>;
|
|
895
|
+
}>>>;
|
|
896
|
+
readonly tool_choice: S.optional<S.Union<readonly [S.Struct<{
|
|
897
|
+
readonly type: S.Literal<"auto">;
|
|
898
|
+
readonly disable_parallel_tool_use: S.optional<S.Boolean>;
|
|
899
|
+
}>, S.Struct<{
|
|
900
|
+
readonly type: S.Literal<"any">;
|
|
901
|
+
readonly disable_parallel_tool_use: S.optional<S.Boolean>;
|
|
902
|
+
}>, S.Struct<{
|
|
903
|
+
readonly type: S.Literal<"tool">;
|
|
904
|
+
readonly name: S.String;
|
|
905
|
+
readonly disable_parallel_tool_use: S.optional<S.Boolean>;
|
|
906
|
+
}>, S.Struct<{
|
|
907
|
+
readonly type: S.Literal<"none">;
|
|
908
|
+
}>]>>;
|
|
909
|
+
readonly metadata: S.optional<S.Struct<{
|
|
910
|
+
readonly user_id: S.optional<S.String>;
|
|
911
|
+
}>>;
|
|
912
|
+
readonly thinking: S.optional<S.Union<readonly [S.Struct<{
|
|
913
|
+
readonly type: S.Literal<"enabled">;
|
|
914
|
+
readonly budget_tokens: S.Number;
|
|
915
|
+
}>, S.Struct<{
|
|
916
|
+
readonly type: S.Literal<"adaptive">;
|
|
917
|
+
}>, S.Struct<{
|
|
918
|
+
readonly type: S.Literal<"disabled">;
|
|
919
|
+
}>]>>;
|
|
920
|
+
readonly output_config: S.optional<S.Struct<{
|
|
921
|
+
readonly effort: S.optional<S.Literals<readonly ["minimal", "low", "medium", "high", "xhigh", "max"]>>;
|
|
922
|
+
}>>;
|
|
923
|
+
}>;
|
|
924
|
+
export type TAnthropicRequest = S.Schema.Type<typeof AnthropicRequest>;
|
|
925
|
+
/**
|
|
926
|
+
* `POST /v1/messages/count_tokens` — the Messages request with `max_tokens`
|
|
927
|
+
* OPTIONAL. The count endpoint has no output budget, so a real Claude Code
|
|
928
|
+
* preflight omits it; validating those bodies against `AnthropicRequest` would
|
|
929
|
+
* 400 every one of them.
|
|
930
|
+
*/
|
|
931
|
+
export declare const AnthropicCountTokensRequest: S.Struct<{
|
|
932
|
+
readonly model: S.String;
|
|
933
|
+
readonly messages: S.$Array<S.Struct<{
|
|
934
|
+
readonly role: S.Literals<readonly ["user", "assistant", "system"]>;
|
|
935
|
+
readonly content: S.Union<readonly [S.String, S.$Array<S.Union<readonly [S.Struct<{
|
|
936
|
+
readonly type: S.Literal<"text">;
|
|
937
|
+
readonly text: S.String;
|
|
938
|
+
readonly citations: S.optional<S.Unknown>;
|
|
939
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
940
|
+
readonly type: S.Literal<"ephemeral">;
|
|
941
|
+
}>>>;
|
|
942
|
+
}>, S.Struct<{
|
|
943
|
+
readonly type: S.Literal<"image">;
|
|
944
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
945
|
+
readonly type: S.Literal<"base64">;
|
|
946
|
+
readonly media_type: S.String;
|
|
947
|
+
readonly data: S.String;
|
|
948
|
+
}>, S.Struct<{
|
|
949
|
+
readonly type: S.Literal<"url">;
|
|
950
|
+
readonly url: S.String;
|
|
951
|
+
}>, S.Struct<{
|
|
952
|
+
readonly type: S.Literal<"file">;
|
|
953
|
+
readonly file_id: S.String;
|
|
954
|
+
}>]>;
|
|
955
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
956
|
+
readonly type: S.Literal<"ephemeral">;
|
|
957
|
+
}>>>;
|
|
958
|
+
}>, S.Struct<{
|
|
959
|
+
readonly type: S.Literal<"document">;
|
|
960
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
961
|
+
readonly type: S.Literal<"base64">;
|
|
962
|
+
readonly media_type: S.String;
|
|
963
|
+
readonly data: S.String;
|
|
964
|
+
}>, S.Struct<{
|
|
965
|
+
readonly type: S.Literal<"url">;
|
|
966
|
+
readonly url: S.String;
|
|
967
|
+
}>, S.Struct<{
|
|
968
|
+
readonly type: S.Literal<"text">;
|
|
969
|
+
readonly media_type: S.String;
|
|
970
|
+
readonly data: S.String;
|
|
971
|
+
}>, S.Struct<{
|
|
972
|
+
readonly type: S.Literal<"content">;
|
|
973
|
+
readonly content: S.Unknown;
|
|
974
|
+
}>, S.Struct<{
|
|
975
|
+
readonly type: S.Literal<"file">;
|
|
976
|
+
readonly file_id: S.String;
|
|
977
|
+
}>]>;
|
|
978
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
979
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
980
|
+
readonly citations: S.optional<S.Struct<{
|
|
981
|
+
readonly enabled: S.Boolean;
|
|
982
|
+
}>>;
|
|
983
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
984
|
+
readonly type: S.Literal<"ephemeral">;
|
|
985
|
+
}>>>;
|
|
986
|
+
}>, S.Struct<{
|
|
987
|
+
readonly type: S.Literal<"search_result">;
|
|
988
|
+
readonly source: S.String;
|
|
989
|
+
readonly title: S.String;
|
|
990
|
+
readonly content: S.$Array<S.Struct<{
|
|
991
|
+
readonly type: S.Literal<"text">;
|
|
992
|
+
readonly text: S.String;
|
|
993
|
+
readonly citations: S.optional<S.Unknown>;
|
|
994
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
995
|
+
readonly type: S.Literal<"ephemeral">;
|
|
996
|
+
}>>>;
|
|
997
|
+
}>>;
|
|
998
|
+
readonly citations: S.optional<S.Unknown>;
|
|
999
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1000
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1001
|
+
}>>>;
|
|
1002
|
+
}>, S.Struct<{
|
|
1003
|
+
readonly type: S.Literal<"container_upload">;
|
|
1004
|
+
readonly file_id: S.String;
|
|
1005
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1006
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1007
|
+
}>>>;
|
|
1008
|
+
}>, S.Struct<{
|
|
1009
|
+
readonly type: S.Literal<"tool_use">;
|
|
1010
|
+
readonly id: S.String;
|
|
1011
|
+
readonly name: S.String;
|
|
1012
|
+
readonly input: S.Unknown;
|
|
1013
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1014
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1015
|
+
}>>>;
|
|
1016
|
+
}>, S.Struct<{
|
|
1017
|
+
readonly type: S.Literal<"tool_result">;
|
|
1018
|
+
readonly tool_use_id: S.String;
|
|
1019
|
+
readonly content: S.Union<readonly [S.String, S.$Array<S.Union<readonly [S.Struct<{
|
|
1020
|
+
readonly type: S.Literal<"text">;
|
|
1021
|
+
readonly text: S.String;
|
|
1022
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1023
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1024
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1025
|
+
}>>>;
|
|
1026
|
+
}>, S.Struct<{
|
|
1027
|
+
readonly type: S.Literal<"image">;
|
|
1028
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1029
|
+
readonly type: S.Literal<"base64">;
|
|
1030
|
+
readonly media_type: S.String;
|
|
1031
|
+
readonly data: S.String;
|
|
1032
|
+
}>, S.Struct<{
|
|
1033
|
+
readonly type: S.Literal<"url">;
|
|
1034
|
+
readonly url: S.String;
|
|
1035
|
+
}>, S.Struct<{
|
|
1036
|
+
readonly type: S.Literal<"file">;
|
|
1037
|
+
readonly file_id: S.String;
|
|
1038
|
+
}>]>;
|
|
1039
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1040
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1041
|
+
}>>>;
|
|
1042
|
+
}>, S.Struct<{
|
|
1043
|
+
readonly type: S.Literal<"document">;
|
|
1044
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1045
|
+
readonly type: S.Literal<"base64">;
|
|
1046
|
+
readonly media_type: S.String;
|
|
1047
|
+
readonly data: S.String;
|
|
1048
|
+
}>, S.Struct<{
|
|
1049
|
+
readonly type: S.Literal<"url">;
|
|
1050
|
+
readonly url: S.String;
|
|
1051
|
+
}>, S.Struct<{
|
|
1052
|
+
readonly type: S.Literal<"text">;
|
|
1053
|
+
readonly media_type: S.String;
|
|
1054
|
+
readonly data: S.String;
|
|
1055
|
+
}>, S.Struct<{
|
|
1056
|
+
readonly type: S.Literal<"content">;
|
|
1057
|
+
readonly content: S.Unknown;
|
|
1058
|
+
}>, S.Struct<{
|
|
1059
|
+
readonly type: S.Literal<"file">;
|
|
1060
|
+
readonly file_id: S.String;
|
|
1061
|
+
}>]>;
|
|
1062
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
1063
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
1064
|
+
readonly citations: S.optional<S.Struct<{
|
|
1065
|
+
readonly enabled: S.Boolean;
|
|
1066
|
+
}>>;
|
|
1067
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1068
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1069
|
+
}>>>;
|
|
1070
|
+
}>, S.Struct<{
|
|
1071
|
+
readonly type: S.Literal<"search_result">;
|
|
1072
|
+
readonly source: S.String;
|
|
1073
|
+
readonly title: S.String;
|
|
1074
|
+
readonly content: S.$Array<S.Struct<{
|
|
1075
|
+
readonly type: S.Literal<"text">;
|
|
1076
|
+
readonly text: S.String;
|
|
1077
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1078
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1079
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1080
|
+
}>>>;
|
|
1081
|
+
}>>;
|
|
1082
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1083
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1084
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1085
|
+
}>>>;
|
|
1086
|
+
}>, S.Struct<{
|
|
1087
|
+
readonly type: S.Literal<"tool_reference">;
|
|
1088
|
+
readonly tool_name: S.String;
|
|
1089
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1090
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1091
|
+
}>>>;
|
|
1092
|
+
}>]>>]>;
|
|
1093
|
+
readonly is_error: S.optional<S.Boolean>;
|
|
1094
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1095
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1096
|
+
}>>>;
|
|
1097
|
+
}>, S.Struct<{
|
|
1098
|
+
readonly type: S.Literal<"thinking">;
|
|
1099
|
+
readonly thinking: S.String;
|
|
1100
|
+
readonly signature: S.optional<S.String>;
|
|
1101
|
+
}>, S.Struct<{
|
|
1102
|
+
readonly type: S.Literal<"compaction">;
|
|
1103
|
+
readonly content: S.optional<S.Unknown>;
|
|
1104
|
+
}>, S.Struct<{
|
|
1105
|
+
readonly type: S.Literal<"server_tool_use">;
|
|
1106
|
+
readonly id: S.String;
|
|
1107
|
+
readonly name: S.String;
|
|
1108
|
+
readonly input: S.Unknown;
|
|
1109
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1110
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1111
|
+
}>>>;
|
|
1112
|
+
}>, S.Struct<{
|
|
1113
|
+
readonly type: S.Literal<"web_search_tool_result">;
|
|
1114
|
+
readonly tool_use_id: S.String;
|
|
1115
|
+
readonly content: S.Unknown;
|
|
1116
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1117
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1118
|
+
}>>>;
|
|
1119
|
+
}>, S.Struct<{
|
|
1120
|
+
readonly type: S.Literal<"web_fetch_tool_result">;
|
|
1121
|
+
readonly tool_use_id: S.String;
|
|
1122
|
+
readonly content: S.Unknown;
|
|
1123
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1124
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1125
|
+
}>>>;
|
|
1126
|
+
}>, S.Struct<{
|
|
1127
|
+
readonly type: S.Literal<"code_execution_tool_result">;
|
|
1128
|
+
readonly tool_use_id: S.String;
|
|
1129
|
+
readonly content: S.Unknown;
|
|
1130
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1131
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1132
|
+
}>>>;
|
|
1133
|
+
}>, S.Struct<{
|
|
1134
|
+
readonly type: S.Literal<"bash_code_execution_tool_result">;
|
|
1135
|
+
readonly tool_use_id: S.String;
|
|
1136
|
+
readonly content: S.Unknown;
|
|
1137
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1138
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1139
|
+
}>>>;
|
|
1140
|
+
}>, S.Struct<{
|
|
1141
|
+
readonly type: S.Literal<"text_editor_code_execution_tool_result">;
|
|
1142
|
+
readonly tool_use_id: S.String;
|
|
1143
|
+
readonly content: S.Unknown;
|
|
1144
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1145
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1146
|
+
}>>>;
|
|
1147
|
+
}>, S.Struct<{
|
|
1148
|
+
readonly type: S.Literal<"tool_search_tool_result">;
|
|
1149
|
+
readonly tool_use_id: S.String;
|
|
1150
|
+
readonly content: S.Unknown;
|
|
1151
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1152
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1153
|
+
}>>>;
|
|
1154
|
+
}>, S.Struct<{
|
|
1155
|
+
readonly type: S.Literal<"mcp_tool_use">;
|
|
1156
|
+
readonly id: S.String;
|
|
1157
|
+
readonly name: S.String;
|
|
1158
|
+
readonly server_name: S.optional<S.String>;
|
|
1159
|
+
readonly input: S.Unknown;
|
|
1160
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1161
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1162
|
+
}>>>;
|
|
1163
|
+
}>, S.Struct<{
|
|
1164
|
+
readonly type: S.Literal<"mcp_tool_result">;
|
|
1165
|
+
readonly tool_use_id: S.String;
|
|
1166
|
+
readonly content: S.Unknown;
|
|
1167
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1168
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1169
|
+
}>>>;
|
|
1170
|
+
}>, S.Struct<{
|
|
1171
|
+
readonly type: S.Literal<"tool_reference">;
|
|
1172
|
+
readonly tool_name: S.String;
|
|
1173
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1174
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1175
|
+
}>>>;
|
|
1176
|
+
}>, S.Struct<{
|
|
1177
|
+
readonly type: S.Literal<"browser_state">;
|
|
1178
|
+
readonly content: S.optional<S.Unknown>;
|
|
1179
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1180
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1181
|
+
}>>>;
|
|
1182
|
+
}>, S.Struct<{
|
|
1183
|
+
readonly type: S.Literal<"tool_addition">;
|
|
1184
|
+
readonly tool: S.Unknown;
|
|
1185
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1186
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1187
|
+
}>>>;
|
|
1188
|
+
}>, S.Struct<{
|
|
1189
|
+
readonly type: S.Literal<"redacted_thinking">;
|
|
1190
|
+
readonly data: S.String;
|
|
1191
|
+
}>]>>]>;
|
|
1192
|
+
}>>;
|
|
1193
|
+
readonly system: S.optional<S.Union<readonly [S.String, S.$Array<S.Struct<{
|
|
1194
|
+
readonly type: S.Literal<"text">;
|
|
1195
|
+
readonly text: S.String;
|
|
1196
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1197
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1198
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1199
|
+
}>>>;
|
|
1200
|
+
}>>]>>;
|
|
1201
|
+
readonly temperature: S.optional<S.Number>;
|
|
1202
|
+
readonly top_p: S.optional<S.Number>;
|
|
1203
|
+
readonly top_k: S.optional<S.Number>;
|
|
1204
|
+
readonly stop_sequences: S.optional<S.$Array<S.String>>;
|
|
1205
|
+
readonly stream: S.optional<S.Boolean>;
|
|
1206
|
+
readonly tools: S.optional<S.$Array<S.Struct<{
|
|
1207
|
+
readonly name: S.String;
|
|
1208
|
+
readonly description: S.optional<S.String>;
|
|
1209
|
+
readonly input_schema: S.optional<S.Unknown>;
|
|
1210
|
+
readonly type: S.optional<S.String>;
|
|
1211
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1212
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1213
|
+
}>>>;
|
|
1214
|
+
}>>>;
|
|
1215
|
+
readonly tool_choice: S.optional<S.Union<readonly [S.Struct<{
|
|
1216
|
+
readonly type: S.Literal<"auto">;
|
|
1217
|
+
readonly disable_parallel_tool_use: S.optional<S.Boolean>;
|
|
1218
|
+
}>, S.Struct<{
|
|
1219
|
+
readonly type: S.Literal<"any">;
|
|
1220
|
+
readonly disable_parallel_tool_use: S.optional<S.Boolean>;
|
|
1221
|
+
}>, S.Struct<{
|
|
1222
|
+
readonly type: S.Literal<"tool">;
|
|
1223
|
+
readonly name: S.String;
|
|
1224
|
+
readonly disable_parallel_tool_use: S.optional<S.Boolean>;
|
|
1225
|
+
}>, S.Struct<{
|
|
1226
|
+
readonly type: S.Literal<"none">;
|
|
1227
|
+
}>]>>;
|
|
1228
|
+
readonly metadata: S.optional<S.Struct<{
|
|
1229
|
+
readonly user_id: S.optional<S.String>;
|
|
1230
|
+
}>>;
|
|
1231
|
+
readonly thinking: S.optional<S.Union<readonly [S.Struct<{
|
|
1232
|
+
readonly type: S.Literal<"enabled">;
|
|
1233
|
+
readonly budget_tokens: S.Number;
|
|
1234
|
+
}>, S.Struct<{
|
|
1235
|
+
readonly type: S.Literal<"adaptive">;
|
|
1236
|
+
}>, S.Struct<{
|
|
1237
|
+
readonly type: S.Literal<"disabled">;
|
|
1238
|
+
}>]>>;
|
|
1239
|
+
readonly output_config: S.optional<S.Struct<{
|
|
1240
|
+
readonly effort: S.optional<S.Literals<readonly ["minimal", "low", "medium", "high", "xhigh", "max"]>>;
|
|
1241
|
+
}>>;
|
|
1242
|
+
readonly max_tokens: S.optional<S.Number>;
|
|
1243
|
+
}>;
|
|
1244
|
+
export type TAnthropicCountTokensRequest = S.Schema.Type<typeof AnthropicCountTokensRequest>;
|
|
1245
|
+
export declare const AnthropicStopReason: S.Literals<readonly ["end_turn", "max_tokens", "stop_sequence", "tool_use", "pause_turn", "refusal", "model_context_window_exceeded"]>;
|
|
1246
|
+
export type TAnthropicStopReason = S.Schema.Type<typeof AnthropicStopReason>;
|
|
1247
|
+
export declare const AnthropicUsage: S.Struct<{
|
|
1248
|
+
readonly input_tokens: S.Number;
|
|
1249
|
+
readonly output_tokens: S.Number;
|
|
1250
|
+
readonly cache_creation_input_tokens: S.optional<S.NullOr<S.Number>>;
|
|
1251
|
+
readonly cache_read_input_tokens: S.optional<S.NullOr<S.Number>>;
|
|
1252
|
+
readonly server_tool_use: S.optional<S.NullOr<S.Struct<{
|
|
1253
|
+
readonly web_search_requests: S.optional<S.Number>;
|
|
1254
|
+
}>>>;
|
|
1255
|
+
}>;
|
|
1256
|
+
export type TAnthropicUsage = S.Schema.Type<typeof AnthropicUsage>;
|
|
1257
|
+
export declare const AnthropicResponse: S.Struct<{
|
|
1258
|
+
readonly id: S.String;
|
|
1259
|
+
readonly type: S.Literal<"message">;
|
|
1260
|
+
readonly role: S.Literal<"assistant">;
|
|
1261
|
+
readonly model: S.String;
|
|
1262
|
+
readonly content: S.$Array<S.Union<readonly [S.Struct<{
|
|
1263
|
+
readonly type: S.Literal<"text">;
|
|
1264
|
+
readonly text: S.String;
|
|
1265
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1266
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1267
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1268
|
+
}>>>;
|
|
1269
|
+
}>, S.Struct<{
|
|
1270
|
+
readonly type: S.Literal<"image">;
|
|
1271
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1272
|
+
readonly type: S.Literal<"base64">;
|
|
1273
|
+
readonly media_type: S.String;
|
|
1274
|
+
readonly data: S.String;
|
|
1275
|
+
}>, S.Struct<{
|
|
1276
|
+
readonly type: S.Literal<"url">;
|
|
1277
|
+
readonly url: S.String;
|
|
1278
|
+
}>, S.Struct<{
|
|
1279
|
+
readonly type: S.Literal<"file">;
|
|
1280
|
+
readonly file_id: S.String;
|
|
1281
|
+
}>]>;
|
|
1282
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1283
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1284
|
+
}>>>;
|
|
1285
|
+
}>, S.Struct<{
|
|
1286
|
+
readonly type: S.Literal<"document">;
|
|
1287
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1288
|
+
readonly type: S.Literal<"base64">;
|
|
1289
|
+
readonly media_type: S.String;
|
|
1290
|
+
readonly data: S.String;
|
|
1291
|
+
}>, S.Struct<{
|
|
1292
|
+
readonly type: S.Literal<"url">;
|
|
1293
|
+
readonly url: S.String;
|
|
1294
|
+
}>, S.Struct<{
|
|
1295
|
+
readonly type: S.Literal<"text">;
|
|
1296
|
+
readonly media_type: S.String;
|
|
1297
|
+
readonly data: S.String;
|
|
1298
|
+
}>, S.Struct<{
|
|
1299
|
+
readonly type: S.Literal<"content">;
|
|
1300
|
+
readonly content: S.Unknown;
|
|
1301
|
+
}>, S.Struct<{
|
|
1302
|
+
readonly type: S.Literal<"file">;
|
|
1303
|
+
readonly file_id: S.String;
|
|
1304
|
+
}>]>;
|
|
1305
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
1306
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
1307
|
+
readonly citations: S.optional<S.Struct<{
|
|
1308
|
+
readonly enabled: S.Boolean;
|
|
1309
|
+
}>>;
|
|
1310
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1311
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1312
|
+
}>>>;
|
|
1313
|
+
}>, S.Struct<{
|
|
1314
|
+
readonly type: S.Literal<"search_result">;
|
|
1315
|
+
readonly source: S.String;
|
|
1316
|
+
readonly title: S.String;
|
|
1317
|
+
readonly content: S.$Array<S.Struct<{
|
|
1318
|
+
readonly type: S.Literal<"text">;
|
|
1319
|
+
readonly text: S.String;
|
|
1320
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1321
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1322
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1323
|
+
}>>>;
|
|
1324
|
+
}>>;
|
|
1325
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1326
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1327
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1328
|
+
}>>>;
|
|
1329
|
+
}>, S.Struct<{
|
|
1330
|
+
readonly type: S.Literal<"container_upload">;
|
|
1331
|
+
readonly file_id: S.String;
|
|
1332
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1333
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1334
|
+
}>>>;
|
|
1335
|
+
}>, S.Struct<{
|
|
1336
|
+
readonly type: S.Literal<"tool_use">;
|
|
1337
|
+
readonly id: S.String;
|
|
1338
|
+
readonly name: S.String;
|
|
1339
|
+
readonly input: S.Unknown;
|
|
1340
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1341
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1342
|
+
}>>>;
|
|
1343
|
+
}>, S.Struct<{
|
|
1344
|
+
readonly type: S.Literal<"tool_result">;
|
|
1345
|
+
readonly tool_use_id: S.String;
|
|
1346
|
+
readonly content: S.Union<readonly [S.String, S.$Array<S.Union<readonly [S.Struct<{
|
|
1347
|
+
readonly type: S.Literal<"text">;
|
|
1348
|
+
readonly text: S.String;
|
|
1349
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1350
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1351
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1352
|
+
}>>>;
|
|
1353
|
+
}>, S.Struct<{
|
|
1354
|
+
readonly type: S.Literal<"image">;
|
|
1355
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1356
|
+
readonly type: S.Literal<"base64">;
|
|
1357
|
+
readonly media_type: S.String;
|
|
1358
|
+
readonly data: S.String;
|
|
1359
|
+
}>, S.Struct<{
|
|
1360
|
+
readonly type: S.Literal<"url">;
|
|
1361
|
+
readonly url: S.String;
|
|
1362
|
+
}>, S.Struct<{
|
|
1363
|
+
readonly type: S.Literal<"file">;
|
|
1364
|
+
readonly file_id: S.String;
|
|
1365
|
+
}>]>;
|
|
1366
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1367
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1368
|
+
}>>>;
|
|
1369
|
+
}>, S.Struct<{
|
|
1370
|
+
readonly type: S.Literal<"document">;
|
|
1371
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1372
|
+
readonly type: S.Literal<"base64">;
|
|
1373
|
+
readonly media_type: S.String;
|
|
1374
|
+
readonly data: S.String;
|
|
1375
|
+
}>, S.Struct<{
|
|
1376
|
+
readonly type: S.Literal<"url">;
|
|
1377
|
+
readonly url: S.String;
|
|
1378
|
+
}>, S.Struct<{
|
|
1379
|
+
readonly type: S.Literal<"text">;
|
|
1380
|
+
readonly media_type: S.String;
|
|
1381
|
+
readonly data: S.String;
|
|
1382
|
+
}>, S.Struct<{
|
|
1383
|
+
readonly type: S.Literal<"content">;
|
|
1384
|
+
readonly content: S.Unknown;
|
|
1385
|
+
}>, S.Struct<{
|
|
1386
|
+
readonly type: S.Literal<"file">;
|
|
1387
|
+
readonly file_id: S.String;
|
|
1388
|
+
}>]>;
|
|
1389
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
1390
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
1391
|
+
readonly citations: S.optional<S.Struct<{
|
|
1392
|
+
readonly enabled: S.Boolean;
|
|
1393
|
+
}>>;
|
|
1394
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1395
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1396
|
+
}>>>;
|
|
1397
|
+
}>, S.Struct<{
|
|
1398
|
+
readonly type: S.Literal<"search_result">;
|
|
1399
|
+
readonly source: S.String;
|
|
1400
|
+
readonly title: S.String;
|
|
1401
|
+
readonly content: S.$Array<S.Struct<{
|
|
1402
|
+
readonly type: S.Literal<"text">;
|
|
1403
|
+
readonly text: S.String;
|
|
1404
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1405
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1406
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1407
|
+
}>>>;
|
|
1408
|
+
}>>;
|
|
1409
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1410
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1411
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1412
|
+
}>>>;
|
|
1413
|
+
}>, S.Struct<{
|
|
1414
|
+
readonly type: S.Literal<"tool_reference">;
|
|
1415
|
+
readonly tool_name: S.String;
|
|
1416
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1417
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1418
|
+
}>>>;
|
|
1419
|
+
}>]>>]>;
|
|
1420
|
+
readonly is_error: S.optional<S.Boolean>;
|
|
1421
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1422
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1423
|
+
}>>>;
|
|
1424
|
+
}>, S.Struct<{
|
|
1425
|
+
readonly type: S.Literal<"thinking">;
|
|
1426
|
+
readonly thinking: S.String;
|
|
1427
|
+
readonly signature: S.optional<S.String>;
|
|
1428
|
+
}>, S.Struct<{
|
|
1429
|
+
readonly type: S.Literal<"compaction">;
|
|
1430
|
+
readonly content: S.optional<S.Unknown>;
|
|
1431
|
+
}>, S.Struct<{
|
|
1432
|
+
readonly type: S.Literal<"server_tool_use">;
|
|
1433
|
+
readonly id: S.String;
|
|
1434
|
+
readonly name: S.String;
|
|
1435
|
+
readonly input: S.Unknown;
|
|
1436
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1437
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1438
|
+
}>>>;
|
|
1439
|
+
}>, S.Struct<{
|
|
1440
|
+
readonly type: S.Literal<"web_search_tool_result">;
|
|
1441
|
+
readonly tool_use_id: S.String;
|
|
1442
|
+
readonly content: S.Unknown;
|
|
1443
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1444
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1445
|
+
}>>>;
|
|
1446
|
+
}>, S.Struct<{
|
|
1447
|
+
readonly type: S.Literal<"web_fetch_tool_result">;
|
|
1448
|
+
readonly tool_use_id: S.String;
|
|
1449
|
+
readonly content: S.Unknown;
|
|
1450
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1451
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1452
|
+
}>>>;
|
|
1453
|
+
}>, S.Struct<{
|
|
1454
|
+
readonly type: S.Literal<"code_execution_tool_result">;
|
|
1455
|
+
readonly tool_use_id: S.String;
|
|
1456
|
+
readonly content: S.Unknown;
|
|
1457
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1458
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1459
|
+
}>>>;
|
|
1460
|
+
}>, S.Struct<{
|
|
1461
|
+
readonly type: S.Literal<"bash_code_execution_tool_result">;
|
|
1462
|
+
readonly tool_use_id: S.String;
|
|
1463
|
+
readonly content: S.Unknown;
|
|
1464
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1465
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1466
|
+
}>>>;
|
|
1467
|
+
}>, S.Struct<{
|
|
1468
|
+
readonly type: S.Literal<"text_editor_code_execution_tool_result">;
|
|
1469
|
+
readonly tool_use_id: S.String;
|
|
1470
|
+
readonly content: S.Unknown;
|
|
1471
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1472
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1473
|
+
}>>>;
|
|
1474
|
+
}>, S.Struct<{
|
|
1475
|
+
readonly type: S.Literal<"tool_search_tool_result">;
|
|
1476
|
+
readonly tool_use_id: S.String;
|
|
1477
|
+
readonly content: S.Unknown;
|
|
1478
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1479
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1480
|
+
}>>>;
|
|
1481
|
+
}>, S.Struct<{
|
|
1482
|
+
readonly type: S.Literal<"mcp_tool_use">;
|
|
1483
|
+
readonly id: S.String;
|
|
1484
|
+
readonly name: S.String;
|
|
1485
|
+
readonly server_name: S.optional<S.String>;
|
|
1486
|
+
readonly input: S.Unknown;
|
|
1487
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1488
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1489
|
+
}>>>;
|
|
1490
|
+
}>, S.Struct<{
|
|
1491
|
+
readonly type: S.Literal<"mcp_tool_result">;
|
|
1492
|
+
readonly tool_use_id: S.String;
|
|
1493
|
+
readonly content: S.Unknown;
|
|
1494
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1495
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1496
|
+
}>>>;
|
|
1497
|
+
}>, S.Struct<{
|
|
1498
|
+
readonly type: S.Literal<"tool_reference">;
|
|
1499
|
+
readonly tool_name: S.String;
|
|
1500
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1501
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1502
|
+
}>>>;
|
|
1503
|
+
}>, S.Struct<{
|
|
1504
|
+
readonly type: S.Literal<"browser_state">;
|
|
1505
|
+
readonly content: S.optional<S.Unknown>;
|
|
1506
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1507
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1508
|
+
}>>>;
|
|
1509
|
+
}>, S.Struct<{
|
|
1510
|
+
readonly type: S.Literal<"tool_addition">;
|
|
1511
|
+
readonly tool: S.Unknown;
|
|
1512
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1513
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1514
|
+
}>>>;
|
|
1515
|
+
}>, S.Struct<{
|
|
1516
|
+
readonly type: S.Literal<"redacted_thinking">;
|
|
1517
|
+
readonly data: S.String;
|
|
1518
|
+
}>]>>;
|
|
1519
|
+
readonly stop_reason: S.NullOr<S.Literals<readonly ["end_turn", "max_tokens", "stop_sequence", "tool_use", "pause_turn", "refusal", "model_context_window_exceeded"]>>;
|
|
1520
|
+
readonly stop_sequence: S.NullOr<S.String>;
|
|
1521
|
+
readonly usage: S.Struct<{
|
|
1522
|
+
readonly input_tokens: S.Number;
|
|
1523
|
+
readonly output_tokens: S.Number;
|
|
1524
|
+
readonly cache_creation_input_tokens: S.optional<S.NullOr<S.Number>>;
|
|
1525
|
+
readonly cache_read_input_tokens: S.optional<S.NullOr<S.Number>>;
|
|
1526
|
+
readonly server_tool_use: S.optional<S.NullOr<S.Struct<{
|
|
1527
|
+
readonly web_search_requests: S.optional<S.Number>;
|
|
1528
|
+
}>>>;
|
|
1529
|
+
}>;
|
|
1530
|
+
}>;
|
|
1531
|
+
export type TAnthropicResponse = S.Schema.Type<typeof AnthropicResponse>;
|
|
1532
|
+
export declare const AnthropicStreamEvent: S.Union<readonly [S.Struct<{
|
|
1533
|
+
readonly type: S.Literal<"message_start">;
|
|
1534
|
+
readonly message: S.Struct<{
|
|
1535
|
+
readonly id: S.String;
|
|
1536
|
+
readonly type: S.Literal<"message">;
|
|
1537
|
+
readonly role: S.Literal<"assistant">;
|
|
1538
|
+
readonly model: S.String;
|
|
1539
|
+
readonly content: S.$Array<S.Union<readonly [S.Struct<{
|
|
1540
|
+
readonly type: S.Literal<"text">;
|
|
1541
|
+
readonly text: S.String;
|
|
1542
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1543
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1544
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1545
|
+
}>>>;
|
|
1546
|
+
}>, S.Struct<{
|
|
1547
|
+
readonly type: S.Literal<"image">;
|
|
1548
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1549
|
+
readonly type: S.Literal<"base64">;
|
|
1550
|
+
readonly media_type: S.String;
|
|
1551
|
+
readonly data: S.String;
|
|
1552
|
+
}>, S.Struct<{
|
|
1553
|
+
readonly type: S.Literal<"url">;
|
|
1554
|
+
readonly url: S.String;
|
|
1555
|
+
}>, S.Struct<{
|
|
1556
|
+
readonly type: S.Literal<"file">;
|
|
1557
|
+
readonly file_id: S.String;
|
|
1558
|
+
}>]>;
|
|
1559
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1560
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1561
|
+
}>>>;
|
|
1562
|
+
}>, S.Struct<{
|
|
1563
|
+
readonly type: S.Literal<"document">;
|
|
1564
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1565
|
+
readonly type: S.Literal<"base64">;
|
|
1566
|
+
readonly media_type: S.String;
|
|
1567
|
+
readonly data: S.String;
|
|
1568
|
+
}>, S.Struct<{
|
|
1569
|
+
readonly type: S.Literal<"url">;
|
|
1570
|
+
readonly url: S.String;
|
|
1571
|
+
}>, S.Struct<{
|
|
1572
|
+
readonly type: S.Literal<"text">;
|
|
1573
|
+
readonly media_type: S.String;
|
|
1574
|
+
readonly data: S.String;
|
|
1575
|
+
}>, S.Struct<{
|
|
1576
|
+
readonly type: S.Literal<"content">;
|
|
1577
|
+
readonly content: S.Unknown;
|
|
1578
|
+
}>, S.Struct<{
|
|
1579
|
+
readonly type: S.Literal<"file">;
|
|
1580
|
+
readonly file_id: S.String;
|
|
1581
|
+
}>]>;
|
|
1582
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
1583
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
1584
|
+
readonly citations: S.optional<S.Struct<{
|
|
1585
|
+
readonly enabled: S.Boolean;
|
|
1586
|
+
}>>;
|
|
1587
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1588
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1589
|
+
}>>>;
|
|
1590
|
+
}>, S.Struct<{
|
|
1591
|
+
readonly type: S.Literal<"search_result">;
|
|
1592
|
+
readonly source: S.String;
|
|
1593
|
+
readonly title: S.String;
|
|
1594
|
+
readonly content: S.$Array<S.Struct<{
|
|
1595
|
+
readonly type: S.Literal<"text">;
|
|
1596
|
+
readonly text: S.String;
|
|
1597
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1598
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1599
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1600
|
+
}>>>;
|
|
1601
|
+
}>>;
|
|
1602
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1603
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1604
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1605
|
+
}>>>;
|
|
1606
|
+
}>, S.Struct<{
|
|
1607
|
+
readonly type: S.Literal<"container_upload">;
|
|
1608
|
+
readonly file_id: S.String;
|
|
1609
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1610
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1611
|
+
}>>>;
|
|
1612
|
+
}>, S.Struct<{
|
|
1613
|
+
readonly type: S.Literal<"tool_use">;
|
|
1614
|
+
readonly id: S.String;
|
|
1615
|
+
readonly name: S.String;
|
|
1616
|
+
readonly input: S.Unknown;
|
|
1617
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1618
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1619
|
+
}>>>;
|
|
1620
|
+
}>, S.Struct<{
|
|
1621
|
+
readonly type: S.Literal<"tool_result">;
|
|
1622
|
+
readonly tool_use_id: S.String;
|
|
1623
|
+
readonly content: S.Union<readonly [S.String, S.$Array<S.Union<readonly [S.Struct<{
|
|
1624
|
+
readonly type: S.Literal<"text">;
|
|
1625
|
+
readonly text: S.String;
|
|
1626
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1627
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1628
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1629
|
+
}>>>;
|
|
1630
|
+
}>, S.Struct<{
|
|
1631
|
+
readonly type: S.Literal<"image">;
|
|
1632
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1633
|
+
readonly type: S.Literal<"base64">;
|
|
1634
|
+
readonly media_type: S.String;
|
|
1635
|
+
readonly data: S.String;
|
|
1636
|
+
}>, S.Struct<{
|
|
1637
|
+
readonly type: S.Literal<"url">;
|
|
1638
|
+
readonly url: S.String;
|
|
1639
|
+
}>, S.Struct<{
|
|
1640
|
+
readonly type: S.Literal<"file">;
|
|
1641
|
+
readonly file_id: S.String;
|
|
1642
|
+
}>]>;
|
|
1643
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1644
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1645
|
+
}>>>;
|
|
1646
|
+
}>, S.Struct<{
|
|
1647
|
+
readonly type: S.Literal<"document">;
|
|
1648
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1649
|
+
readonly type: S.Literal<"base64">;
|
|
1650
|
+
readonly media_type: S.String;
|
|
1651
|
+
readonly data: S.String;
|
|
1652
|
+
}>, S.Struct<{
|
|
1653
|
+
readonly type: S.Literal<"url">;
|
|
1654
|
+
readonly url: S.String;
|
|
1655
|
+
}>, S.Struct<{
|
|
1656
|
+
readonly type: S.Literal<"text">;
|
|
1657
|
+
readonly media_type: S.String;
|
|
1658
|
+
readonly data: S.String;
|
|
1659
|
+
}>, S.Struct<{
|
|
1660
|
+
readonly type: S.Literal<"content">;
|
|
1661
|
+
readonly content: S.Unknown;
|
|
1662
|
+
}>, S.Struct<{
|
|
1663
|
+
readonly type: S.Literal<"file">;
|
|
1664
|
+
readonly file_id: S.String;
|
|
1665
|
+
}>]>;
|
|
1666
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
1667
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
1668
|
+
readonly citations: S.optional<S.Struct<{
|
|
1669
|
+
readonly enabled: S.Boolean;
|
|
1670
|
+
}>>;
|
|
1671
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1672
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1673
|
+
}>>>;
|
|
1674
|
+
}>, S.Struct<{
|
|
1675
|
+
readonly type: S.Literal<"search_result">;
|
|
1676
|
+
readonly source: S.String;
|
|
1677
|
+
readonly title: S.String;
|
|
1678
|
+
readonly content: S.$Array<S.Struct<{
|
|
1679
|
+
readonly type: S.Literal<"text">;
|
|
1680
|
+
readonly text: S.String;
|
|
1681
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1682
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1683
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1684
|
+
}>>>;
|
|
1685
|
+
}>>;
|
|
1686
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1687
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1688
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1689
|
+
}>>>;
|
|
1690
|
+
}>, S.Struct<{
|
|
1691
|
+
readonly type: S.Literal<"tool_reference">;
|
|
1692
|
+
readonly tool_name: S.String;
|
|
1693
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1694
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1695
|
+
}>>>;
|
|
1696
|
+
}>]>>]>;
|
|
1697
|
+
readonly is_error: S.optional<S.Boolean>;
|
|
1698
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1699
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1700
|
+
}>>>;
|
|
1701
|
+
}>, S.Struct<{
|
|
1702
|
+
readonly type: S.Literal<"thinking">;
|
|
1703
|
+
readonly thinking: S.String;
|
|
1704
|
+
readonly signature: S.optional<S.String>;
|
|
1705
|
+
}>, S.Struct<{
|
|
1706
|
+
readonly type: S.Literal<"compaction">;
|
|
1707
|
+
readonly content: S.optional<S.Unknown>;
|
|
1708
|
+
}>, S.Struct<{
|
|
1709
|
+
readonly type: S.Literal<"server_tool_use">;
|
|
1710
|
+
readonly id: S.String;
|
|
1711
|
+
readonly name: S.String;
|
|
1712
|
+
readonly input: S.Unknown;
|
|
1713
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1714
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1715
|
+
}>>>;
|
|
1716
|
+
}>, S.Struct<{
|
|
1717
|
+
readonly type: S.Literal<"web_search_tool_result">;
|
|
1718
|
+
readonly tool_use_id: S.String;
|
|
1719
|
+
readonly content: S.Unknown;
|
|
1720
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1721
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1722
|
+
}>>>;
|
|
1723
|
+
}>, S.Struct<{
|
|
1724
|
+
readonly type: S.Literal<"web_fetch_tool_result">;
|
|
1725
|
+
readonly tool_use_id: S.String;
|
|
1726
|
+
readonly content: S.Unknown;
|
|
1727
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1728
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1729
|
+
}>>>;
|
|
1730
|
+
}>, S.Struct<{
|
|
1731
|
+
readonly type: S.Literal<"code_execution_tool_result">;
|
|
1732
|
+
readonly tool_use_id: S.String;
|
|
1733
|
+
readonly content: S.Unknown;
|
|
1734
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1735
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1736
|
+
}>>>;
|
|
1737
|
+
}>, S.Struct<{
|
|
1738
|
+
readonly type: S.Literal<"bash_code_execution_tool_result">;
|
|
1739
|
+
readonly tool_use_id: S.String;
|
|
1740
|
+
readonly content: S.Unknown;
|
|
1741
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1742
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1743
|
+
}>>>;
|
|
1744
|
+
}>, S.Struct<{
|
|
1745
|
+
readonly type: S.Literal<"text_editor_code_execution_tool_result">;
|
|
1746
|
+
readonly tool_use_id: S.String;
|
|
1747
|
+
readonly content: S.Unknown;
|
|
1748
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1749
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1750
|
+
}>>>;
|
|
1751
|
+
}>, S.Struct<{
|
|
1752
|
+
readonly type: S.Literal<"tool_search_tool_result">;
|
|
1753
|
+
readonly tool_use_id: S.String;
|
|
1754
|
+
readonly content: S.Unknown;
|
|
1755
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1756
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1757
|
+
}>>>;
|
|
1758
|
+
}>, S.Struct<{
|
|
1759
|
+
readonly type: S.Literal<"mcp_tool_use">;
|
|
1760
|
+
readonly id: S.String;
|
|
1761
|
+
readonly name: S.String;
|
|
1762
|
+
readonly server_name: S.optional<S.String>;
|
|
1763
|
+
readonly input: S.Unknown;
|
|
1764
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1765
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1766
|
+
}>>>;
|
|
1767
|
+
}>, S.Struct<{
|
|
1768
|
+
readonly type: S.Literal<"mcp_tool_result">;
|
|
1769
|
+
readonly tool_use_id: S.String;
|
|
1770
|
+
readonly content: S.Unknown;
|
|
1771
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1772
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1773
|
+
}>>>;
|
|
1774
|
+
}>, S.Struct<{
|
|
1775
|
+
readonly type: S.Literal<"tool_reference">;
|
|
1776
|
+
readonly tool_name: S.String;
|
|
1777
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1778
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1779
|
+
}>>>;
|
|
1780
|
+
}>, S.Struct<{
|
|
1781
|
+
readonly type: S.Literal<"browser_state">;
|
|
1782
|
+
readonly content: S.optional<S.Unknown>;
|
|
1783
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1784
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1785
|
+
}>>>;
|
|
1786
|
+
}>, S.Struct<{
|
|
1787
|
+
readonly type: S.Literal<"tool_addition">;
|
|
1788
|
+
readonly tool: S.Unknown;
|
|
1789
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1790
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1791
|
+
}>>>;
|
|
1792
|
+
}>, S.Struct<{
|
|
1793
|
+
readonly type: S.Literal<"redacted_thinking">;
|
|
1794
|
+
readonly data: S.String;
|
|
1795
|
+
}>]>>;
|
|
1796
|
+
readonly stop_reason: S.NullOr<S.Literals<readonly ["end_turn", "max_tokens", "stop_sequence", "tool_use", "pause_turn", "refusal", "model_context_window_exceeded"]>>;
|
|
1797
|
+
readonly stop_sequence: S.NullOr<S.String>;
|
|
1798
|
+
readonly usage: S.Struct<{
|
|
1799
|
+
readonly input_tokens: S.Number;
|
|
1800
|
+
readonly output_tokens: S.Number;
|
|
1801
|
+
readonly cache_creation_input_tokens: S.optional<S.NullOr<S.Number>>;
|
|
1802
|
+
readonly cache_read_input_tokens: S.optional<S.NullOr<S.Number>>;
|
|
1803
|
+
readonly server_tool_use: S.optional<S.NullOr<S.Struct<{
|
|
1804
|
+
readonly web_search_requests: S.optional<S.Number>;
|
|
1805
|
+
}>>>;
|
|
1806
|
+
}>;
|
|
1807
|
+
}>;
|
|
1808
|
+
}>, S.Struct<{
|
|
1809
|
+
readonly type: S.Literal<"content_block_start">;
|
|
1810
|
+
readonly index: S.Number;
|
|
1811
|
+
readonly content_block: S.Union<readonly [S.Struct<{
|
|
1812
|
+
readonly type: S.Literal<"text">;
|
|
1813
|
+
readonly text: S.String;
|
|
1814
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1815
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1816
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1817
|
+
}>>>;
|
|
1818
|
+
}>, S.Struct<{
|
|
1819
|
+
readonly type: S.Literal<"image">;
|
|
1820
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1821
|
+
readonly type: S.Literal<"base64">;
|
|
1822
|
+
readonly media_type: S.String;
|
|
1823
|
+
readonly data: S.String;
|
|
1824
|
+
}>, S.Struct<{
|
|
1825
|
+
readonly type: S.Literal<"url">;
|
|
1826
|
+
readonly url: S.String;
|
|
1827
|
+
}>, S.Struct<{
|
|
1828
|
+
readonly type: S.Literal<"file">;
|
|
1829
|
+
readonly file_id: S.String;
|
|
1830
|
+
}>]>;
|
|
1831
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1832
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1833
|
+
}>>>;
|
|
1834
|
+
}>, S.Struct<{
|
|
1835
|
+
readonly type: S.Literal<"document">;
|
|
1836
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1837
|
+
readonly type: S.Literal<"base64">;
|
|
1838
|
+
readonly media_type: S.String;
|
|
1839
|
+
readonly data: S.String;
|
|
1840
|
+
}>, S.Struct<{
|
|
1841
|
+
readonly type: S.Literal<"url">;
|
|
1842
|
+
readonly url: S.String;
|
|
1843
|
+
}>, S.Struct<{
|
|
1844
|
+
readonly type: S.Literal<"text">;
|
|
1845
|
+
readonly media_type: S.String;
|
|
1846
|
+
readonly data: S.String;
|
|
1847
|
+
}>, S.Struct<{
|
|
1848
|
+
readonly type: S.Literal<"content">;
|
|
1849
|
+
readonly content: S.Unknown;
|
|
1850
|
+
}>, S.Struct<{
|
|
1851
|
+
readonly type: S.Literal<"file">;
|
|
1852
|
+
readonly file_id: S.String;
|
|
1853
|
+
}>]>;
|
|
1854
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
1855
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
1856
|
+
readonly citations: S.optional<S.Struct<{
|
|
1857
|
+
readonly enabled: S.Boolean;
|
|
1858
|
+
}>>;
|
|
1859
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1860
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1861
|
+
}>>>;
|
|
1862
|
+
}>, S.Struct<{
|
|
1863
|
+
readonly type: S.Literal<"search_result">;
|
|
1864
|
+
readonly source: S.String;
|
|
1865
|
+
readonly title: S.String;
|
|
1866
|
+
readonly content: S.$Array<S.Struct<{
|
|
1867
|
+
readonly type: S.Literal<"text">;
|
|
1868
|
+
readonly text: S.String;
|
|
1869
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1870
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1871
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1872
|
+
}>>>;
|
|
1873
|
+
}>>;
|
|
1874
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1875
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1876
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1877
|
+
}>>>;
|
|
1878
|
+
}>, S.Struct<{
|
|
1879
|
+
readonly type: S.Literal<"container_upload">;
|
|
1880
|
+
readonly file_id: S.String;
|
|
1881
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1882
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1883
|
+
}>>>;
|
|
1884
|
+
}>, S.Struct<{
|
|
1885
|
+
readonly type: S.Literal<"tool_use">;
|
|
1886
|
+
readonly id: S.String;
|
|
1887
|
+
readonly name: S.String;
|
|
1888
|
+
readonly input: S.Unknown;
|
|
1889
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1890
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1891
|
+
}>>>;
|
|
1892
|
+
}>, S.Struct<{
|
|
1893
|
+
readonly type: S.Literal<"tool_result">;
|
|
1894
|
+
readonly tool_use_id: S.String;
|
|
1895
|
+
readonly content: S.Union<readonly [S.String, S.$Array<S.Union<readonly [S.Struct<{
|
|
1896
|
+
readonly type: S.Literal<"text">;
|
|
1897
|
+
readonly text: S.String;
|
|
1898
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1899
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1900
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1901
|
+
}>>>;
|
|
1902
|
+
}>, S.Struct<{
|
|
1903
|
+
readonly type: S.Literal<"image">;
|
|
1904
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1905
|
+
readonly type: S.Literal<"base64">;
|
|
1906
|
+
readonly media_type: S.String;
|
|
1907
|
+
readonly data: S.String;
|
|
1908
|
+
}>, S.Struct<{
|
|
1909
|
+
readonly type: S.Literal<"url">;
|
|
1910
|
+
readonly url: S.String;
|
|
1911
|
+
}>, S.Struct<{
|
|
1912
|
+
readonly type: S.Literal<"file">;
|
|
1913
|
+
readonly file_id: S.String;
|
|
1914
|
+
}>]>;
|
|
1915
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1916
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1917
|
+
}>>>;
|
|
1918
|
+
}>, S.Struct<{
|
|
1919
|
+
readonly type: S.Literal<"document">;
|
|
1920
|
+
readonly source: S.Union<readonly [S.Struct<{
|
|
1921
|
+
readonly type: S.Literal<"base64">;
|
|
1922
|
+
readonly media_type: S.String;
|
|
1923
|
+
readonly data: S.String;
|
|
1924
|
+
}>, S.Struct<{
|
|
1925
|
+
readonly type: S.Literal<"url">;
|
|
1926
|
+
readonly url: S.String;
|
|
1927
|
+
}>, S.Struct<{
|
|
1928
|
+
readonly type: S.Literal<"text">;
|
|
1929
|
+
readonly media_type: S.String;
|
|
1930
|
+
readonly data: S.String;
|
|
1931
|
+
}>, S.Struct<{
|
|
1932
|
+
readonly type: S.Literal<"content">;
|
|
1933
|
+
readonly content: S.Unknown;
|
|
1934
|
+
}>, S.Struct<{
|
|
1935
|
+
readonly type: S.Literal<"file">;
|
|
1936
|
+
readonly file_id: S.String;
|
|
1937
|
+
}>]>;
|
|
1938
|
+
readonly title: S.optional<S.NullOr<S.String>>;
|
|
1939
|
+
readonly context: S.optional<S.NullOr<S.String>>;
|
|
1940
|
+
readonly citations: S.optional<S.Struct<{
|
|
1941
|
+
readonly enabled: S.Boolean;
|
|
1942
|
+
}>>;
|
|
1943
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1944
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1945
|
+
}>>>;
|
|
1946
|
+
}>, S.Struct<{
|
|
1947
|
+
readonly type: S.Literal<"search_result">;
|
|
1948
|
+
readonly source: S.String;
|
|
1949
|
+
readonly title: S.String;
|
|
1950
|
+
readonly content: S.$Array<S.Struct<{
|
|
1951
|
+
readonly type: S.Literal<"text">;
|
|
1952
|
+
readonly text: S.String;
|
|
1953
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1954
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1955
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1956
|
+
}>>>;
|
|
1957
|
+
}>>;
|
|
1958
|
+
readonly citations: S.optional<S.Unknown>;
|
|
1959
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1960
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1961
|
+
}>>>;
|
|
1962
|
+
}>, S.Struct<{
|
|
1963
|
+
readonly type: S.Literal<"tool_reference">;
|
|
1964
|
+
readonly tool_name: S.String;
|
|
1965
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1966
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1967
|
+
}>>>;
|
|
1968
|
+
}>]>>]>;
|
|
1969
|
+
readonly is_error: S.optional<S.Boolean>;
|
|
1970
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1971
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1972
|
+
}>>>;
|
|
1973
|
+
}>, S.Struct<{
|
|
1974
|
+
readonly type: S.Literal<"thinking">;
|
|
1975
|
+
readonly thinking: S.String;
|
|
1976
|
+
readonly signature: S.optional<S.String>;
|
|
1977
|
+
}>, S.Struct<{
|
|
1978
|
+
readonly type: S.Literal<"compaction">;
|
|
1979
|
+
readonly content: S.optional<S.Unknown>;
|
|
1980
|
+
}>, S.Struct<{
|
|
1981
|
+
readonly type: S.Literal<"server_tool_use">;
|
|
1982
|
+
readonly id: S.String;
|
|
1983
|
+
readonly name: S.String;
|
|
1984
|
+
readonly input: S.Unknown;
|
|
1985
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1986
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1987
|
+
}>>>;
|
|
1988
|
+
}>, S.Struct<{
|
|
1989
|
+
readonly type: S.Literal<"web_search_tool_result">;
|
|
1990
|
+
readonly tool_use_id: S.String;
|
|
1991
|
+
readonly content: S.Unknown;
|
|
1992
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
1993
|
+
readonly type: S.Literal<"ephemeral">;
|
|
1994
|
+
}>>>;
|
|
1995
|
+
}>, S.Struct<{
|
|
1996
|
+
readonly type: S.Literal<"web_fetch_tool_result">;
|
|
1997
|
+
readonly tool_use_id: S.String;
|
|
1998
|
+
readonly content: S.Unknown;
|
|
1999
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
2000
|
+
readonly type: S.Literal<"ephemeral">;
|
|
2001
|
+
}>>>;
|
|
2002
|
+
}>, S.Struct<{
|
|
2003
|
+
readonly type: S.Literal<"code_execution_tool_result">;
|
|
2004
|
+
readonly tool_use_id: S.String;
|
|
2005
|
+
readonly content: S.Unknown;
|
|
2006
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
2007
|
+
readonly type: S.Literal<"ephemeral">;
|
|
2008
|
+
}>>>;
|
|
2009
|
+
}>, S.Struct<{
|
|
2010
|
+
readonly type: S.Literal<"bash_code_execution_tool_result">;
|
|
2011
|
+
readonly tool_use_id: S.String;
|
|
2012
|
+
readonly content: S.Unknown;
|
|
2013
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
2014
|
+
readonly type: S.Literal<"ephemeral">;
|
|
2015
|
+
}>>>;
|
|
2016
|
+
}>, S.Struct<{
|
|
2017
|
+
readonly type: S.Literal<"text_editor_code_execution_tool_result">;
|
|
2018
|
+
readonly tool_use_id: S.String;
|
|
2019
|
+
readonly content: S.Unknown;
|
|
2020
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
2021
|
+
readonly type: S.Literal<"ephemeral">;
|
|
2022
|
+
}>>>;
|
|
2023
|
+
}>, S.Struct<{
|
|
2024
|
+
readonly type: S.Literal<"tool_search_tool_result">;
|
|
2025
|
+
readonly tool_use_id: S.String;
|
|
2026
|
+
readonly content: S.Unknown;
|
|
2027
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
2028
|
+
readonly type: S.Literal<"ephemeral">;
|
|
2029
|
+
}>>>;
|
|
2030
|
+
}>, S.Struct<{
|
|
2031
|
+
readonly type: S.Literal<"mcp_tool_use">;
|
|
2032
|
+
readonly id: S.String;
|
|
2033
|
+
readonly name: S.String;
|
|
2034
|
+
readonly server_name: S.optional<S.String>;
|
|
2035
|
+
readonly input: S.Unknown;
|
|
2036
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
2037
|
+
readonly type: S.Literal<"ephemeral">;
|
|
2038
|
+
}>>>;
|
|
2039
|
+
}>, S.Struct<{
|
|
2040
|
+
readonly type: S.Literal<"mcp_tool_result">;
|
|
2041
|
+
readonly tool_use_id: S.String;
|
|
2042
|
+
readonly content: S.Unknown;
|
|
2043
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
2044
|
+
readonly type: S.Literal<"ephemeral">;
|
|
2045
|
+
}>>>;
|
|
2046
|
+
}>, S.Struct<{
|
|
2047
|
+
readonly type: S.Literal<"tool_reference">;
|
|
2048
|
+
readonly tool_name: S.String;
|
|
2049
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
2050
|
+
readonly type: S.Literal<"ephemeral">;
|
|
2051
|
+
}>>>;
|
|
2052
|
+
}>, S.Struct<{
|
|
2053
|
+
readonly type: S.Literal<"browser_state">;
|
|
2054
|
+
readonly content: S.optional<S.Unknown>;
|
|
2055
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
2056
|
+
readonly type: S.Literal<"ephemeral">;
|
|
2057
|
+
}>>>;
|
|
2058
|
+
}>, S.Struct<{
|
|
2059
|
+
readonly type: S.Literal<"tool_addition">;
|
|
2060
|
+
readonly tool: S.Unknown;
|
|
2061
|
+
readonly cache_control: S.optional<S.NullOr<S.Struct<{
|
|
2062
|
+
readonly type: S.Literal<"ephemeral">;
|
|
2063
|
+
}>>>;
|
|
2064
|
+
}>, S.Struct<{
|
|
2065
|
+
readonly type: S.Literal<"redacted_thinking">;
|
|
2066
|
+
readonly data: S.String;
|
|
2067
|
+
}>]>;
|
|
2068
|
+
}>, S.Struct<{
|
|
2069
|
+
readonly type: S.Literal<"content_block_delta">;
|
|
2070
|
+
readonly index: S.Number;
|
|
2071
|
+
readonly delta: S.Union<readonly [S.Struct<{
|
|
2072
|
+
readonly type: S.Literal<"text_delta">;
|
|
2073
|
+
readonly text: S.String;
|
|
2074
|
+
}>, S.Struct<{
|
|
2075
|
+
readonly type: S.Literal<"input_json_delta">;
|
|
2076
|
+
readonly partial_json: S.String;
|
|
2077
|
+
}>, S.Struct<{
|
|
2078
|
+
readonly type: S.Literal<"thinking_delta">;
|
|
2079
|
+
readonly thinking: S.String;
|
|
2080
|
+
}>, S.Struct<{
|
|
2081
|
+
readonly type: S.Literal<"signature_delta">;
|
|
2082
|
+
readonly signature: S.String;
|
|
2083
|
+
}>, S.Struct<{
|
|
2084
|
+
readonly type: S.Literal<"compaction_delta">;
|
|
2085
|
+
readonly content: S.optional<S.Unknown>;
|
|
2086
|
+
}>, S.Struct<{
|
|
2087
|
+
readonly type: S.Literal<"citations_delta">;
|
|
2088
|
+
readonly citation: S.Unknown;
|
|
2089
|
+
}>]>;
|
|
2090
|
+
}>, S.Struct<{
|
|
2091
|
+
readonly type: S.Literal<"content_block_stop">;
|
|
2092
|
+
readonly index: S.Number;
|
|
2093
|
+
}>, S.Struct<{
|
|
2094
|
+
readonly type: S.Literal<"message_delta">;
|
|
2095
|
+
readonly delta: S.Struct<{
|
|
2096
|
+
readonly stop_reason: S.NullOr<S.Literals<readonly ["end_turn", "max_tokens", "stop_sequence", "tool_use", "pause_turn", "refusal", "model_context_window_exceeded"]>>;
|
|
2097
|
+
readonly stop_sequence: S.NullOr<S.String>;
|
|
2098
|
+
}>;
|
|
2099
|
+
readonly usage: S.Struct<{
|
|
2100
|
+
readonly output_tokens: S.Number;
|
|
2101
|
+
readonly input_tokens: S.optional<S.NullOr<S.Number>>;
|
|
2102
|
+
readonly cache_creation_input_tokens: S.optional<S.NullOr<S.Number>>;
|
|
2103
|
+
readonly cache_read_input_tokens: S.optional<S.NullOr<S.Number>>;
|
|
2104
|
+
/** Server-tool counters on the terminal delta (mirrors `AnthropicUsage`). */
|
|
2105
|
+
readonly server_tool_use: S.optional<S.NullOr<S.Struct<{
|
|
2106
|
+
readonly web_search_requests: S.optional<S.Number>;
|
|
2107
|
+
}>>>;
|
|
2108
|
+
}>;
|
|
2109
|
+
}>, S.Struct<{
|
|
2110
|
+
readonly type: S.Literal<"message_stop">;
|
|
2111
|
+
}>, S.Struct<{
|
|
2112
|
+
readonly type: S.Literal<"ping">;
|
|
2113
|
+
}>, S.Struct<{
|
|
2114
|
+
readonly type: S.Literal<"error">;
|
|
2115
|
+
readonly error: S.Struct<{
|
|
2116
|
+
readonly type: S.String;
|
|
2117
|
+
readonly message: S.String;
|
|
2118
|
+
}>;
|
|
2119
|
+
}>]>;
|
|
2120
|
+
export type TAnthropicStreamEvent = S.Schema.Type<typeof AnthropicStreamEvent>;
|
|
2121
|
+
export declare const AnthropicProviderOptions: S.Struct<{
|
|
2122
|
+
readonly providerModelId: S.String;
|
|
2123
|
+
readonly apiVersion: S.optional<S.String>;
|
|
2124
|
+
readonly defaultMaxTokens: S.optional<S.Number>;
|
|
2125
|
+
/**
|
|
2126
|
+
* The resolved model card's caps. Carries `thinkingModes`, which is how
|
|
2127
|
+
* the encoder learns which thinking mode this model accepts WITHOUT the
|
|
2128
|
+
* wire package knowing any model names. Absent = unknown = permissive.
|
|
2129
|
+
*/
|
|
2130
|
+
readonly caps: S.optional<S.Struct<{
|
|
2131
|
+
readonly deniedParams: S.optional<S.$Array<S.String>>;
|
|
2132
|
+
readonly maxTokensField: S.optional<S.Literals<readonly ["max_tokens", "max_completion_tokens"]>>;
|
|
2133
|
+
readonly temperature: S.optional<S.Literals<readonly ["only-1", "clamp-0-1", "drop"]>>;
|
|
2134
|
+
readonly thinkingModes: S.optional<S.$Array<S.Literals<readonly ["enabled", "adaptive", "disabled"]>>>;
|
|
2135
|
+
readonly reasoningContexts: S.optional<S.$Array<S.Literals<readonly ["auto", "current_turn", "all_turns"]>>>;
|
|
2136
|
+
readonly inlineToolAdditions: S.optional<S.Boolean>;
|
|
2137
|
+
readonly inlineSystemMessages: S.optional<S.Boolean>;
|
|
2138
|
+
readonly upstreamAcceptsResponseFormat: S.optional<S.Boolean>;
|
|
2139
|
+
readonly upstreamAcceptsStream: S.optional<S.Boolean>;
|
|
2140
|
+
readonly supportsStyle: S.optional<S.Boolean>;
|
|
2141
|
+
readonly supportsGptImageOutputOptions: S.optional<S.Boolean>;
|
|
2142
|
+
readonly alwaysReturnsBase64: S.optional<S.Boolean>;
|
|
2143
|
+
readonly nativeProgressiveImages: S.optional<S.Boolean>;
|
|
2144
|
+
readonly maxNativePartialImages: S.optional<S.Number>;
|
|
2145
|
+
readonly nativeWire: S.optional<S.Literals<readonly ["generateContent", "predict"]>>;
|
|
2146
|
+
readonly videoResolutions: S.optional<S.$Array<S.String>>;
|
|
2147
|
+
readonly mediaVideoDurationsSeconds: S.optional<S.$Array<S.Number>>;
|
|
2148
|
+
readonly mediaVideoDurationRange: S.optional<S.Struct<{
|
|
2149
|
+
readonly min: S.Number;
|
|
2150
|
+
readonly max: S.Number;
|
|
2151
|
+
}>>;
|
|
2152
|
+
readonly mediaVideoDurationWithReferences: S.optional<S.Number>;
|
|
2153
|
+
readonly mediaVideoAspectRatios: S.optional<S.$Array<S.String>>;
|
|
2154
|
+
readonly mediaVideoMaxReferenceImages: S.optional<S.Number>;
|
|
2155
|
+
readonly mediaVideoMaxReferenceVoices: S.optional<S.Number>;
|
|
2156
|
+
readonly mediaVideoReferenceType: S.optional<S.String>;
|
|
2157
|
+
readonly mediaVideoStartingImageExclusiveWithReferences: S.optional<S.Boolean>;
|
|
2158
|
+
readonly mediaImageAspectRatios: S.optional<S.$Array<S.String>>;
|
|
2159
|
+
readonly mediaImageResolutions: S.optional<S.$Array<S.String>>;
|
|
2160
|
+
readonly mediaImageResolutionTiers: S.optional<S.$Array<S.Struct<{
|
|
2161
|
+
readonly resolution: S.String;
|
|
2162
|
+
readonly longEdge: S.Number;
|
|
2163
|
+
}>>>;
|
|
2164
|
+
readonly mediaImageDefaultResolution: S.optional<S.String>;
|
|
2165
|
+
readonly mediaImageSizeAspectRatios: S.optional<S.$Record<S.String, S.String>>;
|
|
2166
|
+
readonly mediaImageCountRange: S.optional<S.Struct<{
|
|
2167
|
+
readonly min: S.Number;
|
|
2168
|
+
readonly max: S.Number;
|
|
2169
|
+
}>>;
|
|
2170
|
+
readonly tokenizer: S.optional<S.Literals<readonly ["claude", "o200k"]>>;
|
|
2171
|
+
}>>;
|
|
2172
|
+
}>;
|
|
2173
|
+
export type TAnthropicProviderOptions = S.Schema.Type<typeof AnthropicProviderOptions>;
|
|
2174
|
+
export declare const GoogleImageRequest: S.Struct<{
|
|
2175
|
+
readonly contents: S.$Array<S.Struct<{
|
|
2176
|
+
readonly parts: S.$Array<S.Struct<{
|
|
2177
|
+
readonly text: S.String;
|
|
2178
|
+
}>>;
|
|
2179
|
+
}>>;
|
|
2180
|
+
readonly generationConfig: S.Struct<{
|
|
2181
|
+
readonly response_modalities: S.$Array<S.String>;
|
|
2182
|
+
readonly imageConfig: S.optional<S.Struct<{
|
|
2183
|
+
readonly aspectRatio: S.optional<S.String>;
|
|
2184
|
+
}>>;
|
|
2185
|
+
}>;
|
|
2186
|
+
}>;
|
|
2187
|
+
export type TGoogleImageRequest = S.Schema.Type<typeof GoogleImageRequest>;
|
|
2188
|
+
export declare const GoogleImageResponse: S.Struct<{
|
|
2189
|
+
readonly candidates: S.optional<S.$Array<S.Struct<{
|
|
2190
|
+
readonly content: S.optional<S.Struct<{
|
|
2191
|
+
readonly parts: S.optional<S.$Array<S.Union<readonly [S.Struct<{
|
|
2192
|
+
readonly text: S.String;
|
|
2193
|
+
}>, S.Struct<{
|
|
2194
|
+
readonly inlineData: S.Struct<{
|
|
2195
|
+
readonly mime_type: S.optional<S.String>;
|
|
2196
|
+
readonly mimeType: S.optional<S.String>;
|
|
2197
|
+
readonly data: S.String;
|
|
2198
|
+
}>;
|
|
2199
|
+
}>]>>>;
|
|
2200
|
+
readonly role: S.optional<S.String>;
|
|
2201
|
+
}>>;
|
|
2202
|
+
readonly finishReason: S.optional<S.NullOr<S.String>>;
|
|
2203
|
+
}>>>;
|
|
2204
|
+
readonly usageMetadata: S.optional<S.Struct<{
|
|
2205
|
+
readonly promptTokenCount: S.optional<S.NullOr<S.Number>>;
|
|
2206
|
+
readonly candidatesTokenCount: S.optional<S.NullOr<S.Number>>;
|
|
2207
|
+
readonly totalTokenCount: S.optional<S.NullOr<S.Number>>;
|
|
2208
|
+
readonly cachedContentTokenCount: S.optional<S.NullOr<S.Number>>;
|
|
2209
|
+
}>>;
|
|
2210
|
+
}>;
|
|
2211
|
+
export type TGoogleImageResponse = S.Schema.Type<typeof GoogleImageResponse>;
|
|
2212
|
+
export declare const GoogleImageProviderOptions: S.Struct<{
|
|
2213
|
+
readonly providerModelId: S.String;
|
|
2214
|
+
/**
|
|
2215
|
+
* Catalog-resolved facts for THIS model. Absent means unknown, and an
|
|
2216
|
+
* unknown limit never manufactures a refusal.
|
|
2217
|
+
*/
|
|
2218
|
+
readonly caps: S.optional<S.Struct<{
|
|
2219
|
+
readonly deniedParams: S.optional<S.$Array<S.String>>;
|
|
2220
|
+
readonly maxTokensField: S.optional<S.Literals<readonly ["max_tokens", "max_completion_tokens"]>>;
|
|
2221
|
+
readonly temperature: S.optional<S.Literals<readonly ["only-1", "clamp-0-1", "drop"]>>;
|
|
2222
|
+
readonly thinkingModes: S.optional<S.$Array<S.Literals<readonly ["enabled", "adaptive", "disabled"]>>>;
|
|
2223
|
+
readonly reasoningContexts: S.optional<S.$Array<S.Literals<readonly ["auto", "current_turn", "all_turns"]>>>;
|
|
2224
|
+
readonly inlineToolAdditions: S.optional<S.Boolean>;
|
|
2225
|
+
readonly inlineSystemMessages: S.optional<S.Boolean>;
|
|
2226
|
+
readonly upstreamAcceptsResponseFormat: S.optional<S.Boolean>;
|
|
2227
|
+
readonly upstreamAcceptsStream: S.optional<S.Boolean>;
|
|
2228
|
+
readonly supportsStyle: S.optional<S.Boolean>;
|
|
2229
|
+
readonly supportsGptImageOutputOptions: S.optional<S.Boolean>;
|
|
2230
|
+
readonly alwaysReturnsBase64: S.optional<S.Boolean>;
|
|
2231
|
+
readonly nativeProgressiveImages: S.optional<S.Boolean>;
|
|
2232
|
+
readonly maxNativePartialImages: S.optional<S.Number>;
|
|
2233
|
+
readonly nativeWire: S.optional<S.Literals<readonly ["generateContent", "predict"]>>;
|
|
2234
|
+
readonly videoResolutions: S.optional<S.$Array<S.String>>;
|
|
2235
|
+
readonly mediaVideoDurationsSeconds: S.optional<S.$Array<S.Number>>;
|
|
2236
|
+
readonly mediaVideoDurationRange: S.optional<S.Struct<{
|
|
2237
|
+
readonly min: S.Number;
|
|
2238
|
+
readonly max: S.Number;
|
|
2239
|
+
}>>;
|
|
2240
|
+
readonly mediaVideoDurationWithReferences: S.optional<S.Number>;
|
|
2241
|
+
readonly mediaVideoAspectRatios: S.optional<S.$Array<S.String>>;
|
|
2242
|
+
readonly mediaVideoMaxReferenceImages: S.optional<S.Number>;
|
|
2243
|
+
readonly mediaVideoMaxReferenceVoices: S.optional<S.Number>;
|
|
2244
|
+
readonly mediaVideoReferenceType: S.optional<S.String>;
|
|
2245
|
+
readonly mediaVideoStartingImageExclusiveWithReferences: S.optional<S.Boolean>;
|
|
2246
|
+
readonly mediaImageAspectRatios: S.optional<S.$Array<S.String>>;
|
|
2247
|
+
readonly mediaImageResolutions: S.optional<S.$Array<S.String>>;
|
|
2248
|
+
readonly mediaImageResolutionTiers: S.optional<S.$Array<S.Struct<{
|
|
2249
|
+
readonly resolution: S.String;
|
|
2250
|
+
readonly longEdge: S.Number;
|
|
2251
|
+
}>>>;
|
|
2252
|
+
readonly mediaImageDefaultResolution: S.optional<S.String>;
|
|
2253
|
+
readonly mediaImageSizeAspectRatios: S.optional<S.$Record<S.String, S.String>>;
|
|
2254
|
+
readonly mediaImageCountRange: S.optional<S.Struct<{
|
|
2255
|
+
readonly min: S.Number;
|
|
2256
|
+
readonly max: S.Number;
|
|
2257
|
+
}>>;
|
|
2258
|
+
readonly tokenizer: S.optional<S.Literals<readonly ["claude", "o200k"]>>;
|
|
2259
|
+
}>>;
|
|
2260
|
+
}>;
|
|
2261
|
+
export type TGoogleImageProviderOptions = S.Schema.Type<typeof GoogleImageProviderOptions>;
|
|
2262
|
+
export declare const OpenAIVideoJob: S.Struct<{
|
|
2263
|
+
readonly id: S.String;
|
|
2264
|
+
readonly status: S.String;
|
|
2265
|
+
readonly created_at: S.optional<S.Number>;
|
|
2266
|
+
readonly progress: S.optional<S.NullOr<S.Number>>;
|
|
2267
|
+
readonly seconds: S.optional<S.Union<readonly [S.String, S.Number]>>;
|
|
2268
|
+
readonly size: S.optional<S.String>;
|
|
2269
|
+
readonly error: S.optional<S.NullOr<S.Struct<{
|
|
2270
|
+
readonly code: S.optional<S.String>;
|
|
2271
|
+
readonly message: S.optional<S.String>;
|
|
2272
|
+
}>>>;
|
|
2273
|
+
}>;
|
|
2274
|
+
export type TOpenAIVideoJob = S.Schema.Type<typeof OpenAIVideoJob>;
|
|
2275
|
+
export declare const OpenAIVideoProviderOptions: S.Struct<{
|
|
2276
|
+
readonly providerModelId: S.String;
|
|
2277
|
+
}>;
|
|
2278
|
+
export type TOpenAIVideoProviderOptions = S.Schema.Type<typeof OpenAIVideoProviderOptions>;
|
|
2279
|
+
/**
|
|
2280
|
+
* Veo's `predictLongRunning` image shape on the Gemini DEVELOPER API.
|
|
2281
|
+
*
|
|
2282
|
+
* Source of truth is Google's own client, not the REST snippets in the
|
|
2283
|
+
* Veo guide (which show `inlineData` and are contradicted by the live
|
|
2284
|
+
* surface — it answers 400 INVALID_ARGUMENT "`inlineData` isn't
|
|
2285
|
+
* supported by this model"). `googleapis/python-genai` v2.24.0,
|
|
2286
|
+
* `google/genai/models.py::_Image_to_mldev`, serializes
|
|
2287
|
+
* `Image.image_bytes` → `bytesBase64Encoded` and `Image.mime_type` →
|
|
2288
|
+
* `mimeType` for Developer-API mode (`gcs_uri` raises there), and
|
|
2289
|
+
* `_GenerateVideosParameters_to_mldev` places that object at
|
|
2290
|
+
* `instances[0].image`, with `_VideoGenerationReferenceImage_to_mldev`
|
|
2291
|
+
* reusing it for `instances[0].referenceImages[].image`.
|
|
2292
|
+
*/
|
|
2293
|
+
export declare const GoogleVideoImage: S.Struct<{
|
|
2294
|
+
readonly bytesBase64Encoded: S.String;
|
|
2295
|
+
readonly mimeType: S.String;
|
|
2296
|
+
}>;
|
|
2297
|
+
export type TGoogleVideoImage = S.Schema.Type<typeof GoogleVideoImage>;
|
|
2298
|
+
export declare const GoogleVideoCreateRequest: S.Struct<{
|
|
2299
|
+
readonly instances: S.$Array<S.Struct<{
|
|
2300
|
+
readonly prompt: S.String;
|
|
2301
|
+
readonly image: S.optional<S.Struct<{
|
|
2302
|
+
readonly bytesBase64Encoded: S.String;
|
|
2303
|
+
readonly mimeType: S.String;
|
|
2304
|
+
}>>;
|
|
2305
|
+
readonly referenceImages: S.optional<S.$Array<S.Struct<{
|
|
2306
|
+
readonly image: S.Struct<{
|
|
2307
|
+
readonly bytesBase64Encoded: S.String;
|
|
2308
|
+
readonly mimeType: S.String;
|
|
2309
|
+
}>;
|
|
2310
|
+
readonly referenceType: S.Literal<"asset">;
|
|
2311
|
+
}>>>;
|
|
2312
|
+
}>>;
|
|
2313
|
+
readonly parameters: S.Struct<{
|
|
2314
|
+
readonly aspectRatio: S.optional<S.String>;
|
|
2315
|
+
readonly resolution: S.optional<S.String>;
|
|
2316
|
+
readonly durationSeconds: S.optional<S.Number>;
|
|
2317
|
+
}>;
|
|
2318
|
+
}>;
|
|
2319
|
+
export type TGoogleVideoCreateRequest = S.Schema.Type<typeof GoogleVideoCreateRequest>;
|
|
2320
|
+
export declare const GoogleVideoOperationRef: S.Struct<{
|
|
2321
|
+
readonly name: S.String;
|
|
2322
|
+
}>;
|
|
2323
|
+
export type TGoogleVideoOperationRef = S.Schema.Type<typeof GoogleVideoOperationRef>;
|
|
2324
|
+
export declare const GoogleVideoOperation: S.Struct<{
|
|
2325
|
+
readonly name: S.optional<S.String>;
|
|
2326
|
+
readonly done: S.optional<S.Boolean>;
|
|
2327
|
+
readonly error: S.optional<S.Struct<{
|
|
2328
|
+
readonly code: S.optional<S.Number>;
|
|
2329
|
+
readonly message: S.optional<S.String>;
|
|
2330
|
+
}>>;
|
|
2331
|
+
readonly response: S.optional<S.Unknown>;
|
|
2332
|
+
}>;
|
|
2333
|
+
export type TGoogleVideoOperation = S.Schema.Type<typeof GoogleVideoOperation>;
|
|
2334
|
+
export declare const GoogleVideoProviderOptions: S.Struct<{
|
|
2335
|
+
readonly providerModelId: S.String;
|
|
2336
|
+
/**
|
|
2337
|
+
* Catalog-resolved facts for THIS model (accepted durations, ratios,
|
|
2338
|
+
* resolutions, reference limits). Absent means unknown, and an
|
|
2339
|
+
* unknown limit never manufactures a refusal.
|
|
2340
|
+
*/
|
|
2341
|
+
readonly caps: S.optional<S.Struct<{
|
|
2342
|
+
readonly deniedParams: S.optional<S.$Array<S.String>>;
|
|
2343
|
+
readonly maxTokensField: S.optional<S.Literals<readonly ["max_tokens", "max_completion_tokens"]>>;
|
|
2344
|
+
readonly temperature: S.optional<S.Literals<readonly ["only-1", "clamp-0-1", "drop"]>>;
|
|
2345
|
+
readonly thinkingModes: S.optional<S.$Array<S.Literals<readonly ["enabled", "adaptive", "disabled"]>>>;
|
|
2346
|
+
readonly reasoningContexts: S.optional<S.$Array<S.Literals<readonly ["auto", "current_turn", "all_turns"]>>>;
|
|
2347
|
+
readonly inlineToolAdditions: S.optional<S.Boolean>;
|
|
2348
|
+
readonly inlineSystemMessages: S.optional<S.Boolean>;
|
|
2349
|
+
readonly upstreamAcceptsResponseFormat: S.optional<S.Boolean>;
|
|
2350
|
+
readonly upstreamAcceptsStream: S.optional<S.Boolean>;
|
|
2351
|
+
readonly supportsStyle: S.optional<S.Boolean>;
|
|
2352
|
+
readonly supportsGptImageOutputOptions: S.optional<S.Boolean>;
|
|
2353
|
+
readonly alwaysReturnsBase64: S.optional<S.Boolean>;
|
|
2354
|
+
readonly nativeProgressiveImages: S.optional<S.Boolean>;
|
|
2355
|
+
readonly maxNativePartialImages: S.optional<S.Number>;
|
|
2356
|
+
readonly nativeWire: S.optional<S.Literals<readonly ["generateContent", "predict"]>>;
|
|
2357
|
+
readonly videoResolutions: S.optional<S.$Array<S.String>>;
|
|
2358
|
+
readonly mediaVideoDurationsSeconds: S.optional<S.$Array<S.Number>>;
|
|
2359
|
+
readonly mediaVideoDurationRange: S.optional<S.Struct<{
|
|
2360
|
+
readonly min: S.Number;
|
|
2361
|
+
readonly max: S.Number;
|
|
2362
|
+
}>>;
|
|
2363
|
+
readonly mediaVideoDurationWithReferences: S.optional<S.Number>;
|
|
2364
|
+
readonly mediaVideoAspectRatios: S.optional<S.$Array<S.String>>;
|
|
2365
|
+
readonly mediaVideoMaxReferenceImages: S.optional<S.Number>;
|
|
2366
|
+
readonly mediaVideoMaxReferenceVoices: S.optional<S.Number>;
|
|
2367
|
+
readonly mediaVideoReferenceType: S.optional<S.String>;
|
|
2368
|
+
readonly mediaVideoStartingImageExclusiveWithReferences: S.optional<S.Boolean>;
|
|
2369
|
+
readonly mediaImageAspectRatios: S.optional<S.$Array<S.String>>;
|
|
2370
|
+
readonly mediaImageResolutions: S.optional<S.$Array<S.String>>;
|
|
2371
|
+
readonly mediaImageResolutionTiers: S.optional<S.$Array<S.Struct<{
|
|
2372
|
+
readonly resolution: S.String;
|
|
2373
|
+
readonly longEdge: S.Number;
|
|
2374
|
+
}>>>;
|
|
2375
|
+
readonly mediaImageDefaultResolution: S.optional<S.String>;
|
|
2376
|
+
readonly mediaImageSizeAspectRatios: S.optional<S.$Record<S.String, S.String>>;
|
|
2377
|
+
readonly mediaImageCountRange: S.optional<S.Struct<{
|
|
2378
|
+
readonly min: S.Number;
|
|
2379
|
+
readonly max: S.Number;
|
|
2380
|
+
}>>;
|
|
2381
|
+
readonly tokenizer: S.optional<S.Literals<readonly ["claude", "o200k"]>>;
|
|
2382
|
+
}>>;
|
|
2383
|
+
}>;
|
|
2384
|
+
export type TGoogleVideoProviderOptions = S.Schema.Type<typeof GoogleVideoProviderOptions>;
|
|
2385
|
+
export declare const BedrockTitanV2Request: S.Struct<{
|
|
2386
|
+
readonly inputText: S.String;
|
|
2387
|
+
readonly dimensions: S.optional<S.Number>;
|
|
2388
|
+
readonly normalize: S.optional<S.Boolean>;
|
|
2389
|
+
readonly embeddingTypes: S.optional<S.$Array<S.Literals<readonly ["float", "binary"]>>>;
|
|
2390
|
+
}>;
|
|
2391
|
+
export type TBedrockTitanV2Request = S.Schema.Type<typeof BedrockTitanV2Request>;
|
|
2392
|
+
export declare const BedrockTitanV2Response: S.Struct<{
|
|
2393
|
+
readonly embedding: S.optional<S.$Array<S.Number>>;
|
|
2394
|
+
readonly embeddingsByType: S.optional<S.Struct<{
|
|
2395
|
+
readonly float: S.optional<S.$Array<S.Number>>;
|
|
2396
|
+
readonly binary: S.optional<S.$Array<S.Number>>;
|
|
2397
|
+
}>>;
|
|
2398
|
+
readonly inputTextTokenCount: S.Number;
|
|
2399
|
+
}>;
|
|
2400
|
+
export type TBedrockTitanV2Response = S.Schema.Type<typeof BedrockTitanV2Response>;
|
|
2401
|
+
export declare const BedrockEmbedProviderOptions: S.Struct<{
|
|
2402
|
+
readonly providerModelId: S.String;
|
|
2403
|
+
readonly region: S.String;
|
|
2404
|
+
readonly accessKeyId: S.String;
|
|
2405
|
+
readonly secretAccessKey: S.String;
|
|
2406
|
+
readonly sessionToken: S.optional<S.String>;
|
|
2407
|
+
readonly dimensions: S.optional<S.Number>;
|
|
2408
|
+
readonly normalize: S.optional<S.Boolean>;
|
|
2409
|
+
}>;
|
|
2410
|
+
export type TBedrockEmbedProviderOptions = S.Schema.Type<typeof BedrockEmbedProviderOptions>;
|
|
2411
|
+
/**
|
|
2412
|
+
* Options for the `chatgpt` provider — chatgpt.com/backend-api/codex.
|
|
2413
|
+
*
|
|
2414
|
+
* `accountId` / `sessionId` ride in outbound headers per the Codex CLI
|
|
2415
|
+
* convention; both are pulled from the decrypted OAuth blob's `extras`.
|
|
2416
|
+
* `originator` and `userAgent` are server-tunable via environment
|
|
2417
|
+
* variables; defaults match the reference Python implementation.
|
|
2418
|
+
*/
|
|
2419
|
+
export declare const ChatGptProviderOptions: S.Struct<{
|
|
2420
|
+
readonly providerModelId: S.String;
|
|
2421
|
+
readonly accountId: S.optional<S.String>;
|
|
2422
|
+
readonly sessionId: S.optional<S.String>;
|
|
2423
|
+
readonly originator: S.optional<S.String>;
|
|
2424
|
+
readonly userAgent: S.optional<S.String>;
|
|
2425
|
+
/**
|
|
2426
|
+
* Select Codex-specific Responses-wire behavior. When `false` for a
|
|
2427
|
+
* non-Codex provider that shares the wire (xAI Grok),
|
|
2428
|
+
* `max_output_tokens` is forwarded; ChatGPT/Codex rejects that field.
|
|
2429
|
+
* System messages always become `developer` input items and never alter
|
|
2430
|
+
* top-level `instructions`, regardless of this flag. Defaults to TRUE when
|
|
2431
|
+
* omitted; the daemon walker passes `false` for non-`chatgpt`
|
|
2432
|
+
* Responses-wire providers.
|
|
2433
|
+
*/
|
|
2434
|
+
readonly codexInstructions: S.optional<S.Boolean>;
|
|
2435
|
+
/**
|
|
2436
|
+
* The resolved model card's caps. Carries `reasoningContexts`, which is how
|
|
2437
|
+
* the encoder learns that a model rejects `reasoning.context: "all_turns"`
|
|
2438
|
+
* — a fact it used to derive from a `spark` suffix on the model id. Absent
|
|
2439
|
+
* = unknown = permissive.
|
|
2440
|
+
*/
|
|
2441
|
+
readonly caps: S.optional<S.Struct<{
|
|
2442
|
+
readonly deniedParams: S.optional<S.$Array<S.String>>;
|
|
2443
|
+
readonly maxTokensField: S.optional<S.Literals<readonly ["max_tokens", "max_completion_tokens"]>>;
|
|
2444
|
+
readonly temperature: S.optional<S.Literals<readonly ["only-1", "clamp-0-1", "drop"]>>;
|
|
2445
|
+
readonly thinkingModes: S.optional<S.$Array<S.Literals<readonly ["enabled", "adaptive", "disabled"]>>>;
|
|
2446
|
+
readonly reasoningContexts: S.optional<S.$Array<S.Literals<readonly ["auto", "current_turn", "all_turns"]>>>;
|
|
2447
|
+
readonly inlineToolAdditions: S.optional<S.Boolean>;
|
|
2448
|
+
readonly inlineSystemMessages: S.optional<S.Boolean>;
|
|
2449
|
+
readonly upstreamAcceptsResponseFormat: S.optional<S.Boolean>;
|
|
2450
|
+
readonly upstreamAcceptsStream: S.optional<S.Boolean>;
|
|
2451
|
+
readonly supportsStyle: S.optional<S.Boolean>;
|
|
2452
|
+
readonly supportsGptImageOutputOptions: S.optional<S.Boolean>;
|
|
2453
|
+
readonly alwaysReturnsBase64: S.optional<S.Boolean>;
|
|
2454
|
+
readonly nativeProgressiveImages: S.optional<S.Boolean>;
|
|
2455
|
+
readonly maxNativePartialImages: S.optional<S.Number>;
|
|
2456
|
+
readonly nativeWire: S.optional<S.Literals<readonly ["generateContent", "predict"]>>;
|
|
2457
|
+
readonly videoResolutions: S.optional<S.$Array<S.String>>;
|
|
2458
|
+
readonly mediaVideoDurationsSeconds: S.optional<S.$Array<S.Number>>;
|
|
2459
|
+
readonly mediaVideoDurationRange: S.optional<S.Struct<{
|
|
2460
|
+
readonly min: S.Number;
|
|
2461
|
+
readonly max: S.Number;
|
|
2462
|
+
}>>;
|
|
2463
|
+
readonly mediaVideoDurationWithReferences: S.optional<S.Number>;
|
|
2464
|
+
readonly mediaVideoAspectRatios: S.optional<S.$Array<S.String>>;
|
|
2465
|
+
readonly mediaVideoMaxReferenceImages: S.optional<S.Number>;
|
|
2466
|
+
readonly mediaVideoMaxReferenceVoices: S.optional<S.Number>;
|
|
2467
|
+
readonly mediaVideoReferenceType: S.optional<S.String>;
|
|
2468
|
+
readonly mediaVideoStartingImageExclusiveWithReferences: S.optional<S.Boolean>;
|
|
2469
|
+
readonly mediaImageAspectRatios: S.optional<S.$Array<S.String>>;
|
|
2470
|
+
readonly mediaImageResolutions: S.optional<S.$Array<S.String>>;
|
|
2471
|
+
readonly mediaImageResolutionTiers: S.optional<S.$Array<S.Struct<{
|
|
2472
|
+
readonly resolution: S.String;
|
|
2473
|
+
readonly longEdge: S.Number;
|
|
2474
|
+
}>>>;
|
|
2475
|
+
readonly mediaImageDefaultResolution: S.optional<S.String>;
|
|
2476
|
+
readonly mediaImageSizeAspectRatios: S.optional<S.$Record<S.String, S.String>>;
|
|
2477
|
+
readonly mediaImageCountRange: S.optional<S.Struct<{
|
|
2478
|
+
readonly min: S.Number;
|
|
2479
|
+
readonly max: S.Number;
|
|
2480
|
+
}>>;
|
|
2481
|
+
readonly tokenizer: S.optional<S.Literals<readonly ["claude", "o200k"]>>;
|
|
2482
|
+
}>>;
|
|
2483
|
+
}>;
|
|
2484
|
+
export type TChatGptProviderOptions = S.Schema.Type<typeof ChatGptProviderOptions>;
|
|
2485
|
+
export declare const KimiCodeProviderOptions: S.Struct<{
|
|
2486
|
+
readonly providerModelId: S.String;
|
|
2487
|
+
readonly userAgent: S.optional<S.String>;
|
|
2488
|
+
readonly platform: S.optional<S.String>;
|
|
2489
|
+
readonly version: S.optional<S.String>;
|
|
2490
|
+
readonly deviceId: S.optional<S.String>;
|
|
2491
|
+
readonly deviceName: S.optional<S.String>;
|
|
2492
|
+
readonly deviceModel: S.optional<S.String>;
|
|
2493
|
+
readonly osVersion: S.optional<S.String>;
|
|
2494
|
+
}>;
|
|
2495
|
+
export type TKimiCodeProviderOptions = S.Schema.Type<typeof KimiCodeProviderOptions>;
|
|
2496
|
+
export {};
|