maka-agent 0.2.0-dev.28.20260911 → 0.2.0-dev.29.20260912
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/LICENSE +54 -3
- package/THIRD_PARTY_NOTICES.txt +14 -14
- package/dist/onboarding-catalog.js +1 -0
- package/dist/pi-tui-pickers.js +183 -21
- package/dist/pi-tui-runner.js +150 -18
- package/dist/runtime-host-onboarding.js +345 -5
- package/dist/runtime-host-session-driver.js +18 -0
- package/dist/runtime-host-tui-command.js +21 -5
- package/dist/runtime-host-tui-context.js +19 -5
- package/dist/tui-copy-catalog.js +93 -9
- package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
- package/node_modules/@ai-sdk/anthropic/CHANGELOG.md +66 -0
- package/node_modules/@ai-sdk/anthropic/dist/index.js +375 -197
- package/node_modules/@ai-sdk/anthropic/dist/internal/index.js +181 -74
- package/node_modules/@ai-sdk/anthropic/docs/05-anthropic.mdx +123 -43
- package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/CHANGELOG.md +32 -0
- package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/package.json +1 -1
- package/node_modules/@ai-sdk/anthropic/package.json +3 -3
- package/node_modules/@ai-sdk/cohere/CHANGELOG.md +53 -0
- package/node_modules/@ai-sdk/cohere/dist/index.js +1 -1
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/cohere/package.json +3 -3
- package/node_modules/@ai-sdk/google/CHANGELOG.md +92 -0
- package/node_modules/@ai-sdk/google/dist/index.js +941 -420
- package/node_modules/@ai-sdk/google/dist/internal/index.js +394 -103
- package/node_modules/@ai-sdk/google/docs/15-google.mdx +195 -85
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/google/package.json +3 -3
- package/node_modules/@ai-sdk/open-responses/CHANGELOG.md +65 -0
- package/node_modules/@ai-sdk/open-responses/dist/index.js +51 -13
- package/node_modules/@ai-sdk/open-responses/docs/06-open-responses.mdx +7 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/open-responses/package.json +3 -3
- package/node_modules/@ai-sdk/openai/CHANGELOG.md +118 -0
- package/node_modules/@ai-sdk/openai/dist/index.js +1080 -316
- package/node_modules/@ai-sdk/openai/dist/internal/index.js +549 -157
- package/node_modules/@ai-sdk/openai/docs/03-openai.mdx +202 -66
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/openai/package.json +3 -3
- package/node_modules/@ai-sdk/openai-compatible/CHANGELOG.md +60 -0
- package/node_modules/@ai-sdk/openai-compatible/dist/index.js +8 -2
- package/node_modules/@ai-sdk/openai-compatible/docs/index.mdx +0 -1
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/openai-compatible/package.json +3 -3
- package/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +48 -0
- package/node_modules/@ai-sdk/provider-utils/dist/index.js +485 -181
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/provider-utils/package.json +3 -3
- package/node_modules/@maka/core/dist/chat-model-choice.js +1 -2
- package/node_modules/@maka/core/dist/collaboration.js +12 -0
- package/node_modules/@maka/core/dist/llm-connections.js +1 -1
- package/node_modules/@maka/core/dist/model-catalog.js +26 -103
- package/node_modules/@maka/core/dist/model-facts.js +0 -74
- package/node_modules/@maka/core/dist/model-thinking.js +70 -38
- package/node_modules/@maka/core/dist/permission-profile.js +17 -0
- package/node_modules/@maka/core/dist/provider-registry.js +1 -3
- package/node_modules/@maka/core/dist/runtime-policy/connection-catalog-codec.js +68 -46
- package/node_modules/@maka/core/dist/runtime-policy/model-catalog-entry-codec.js +21 -12
- package/node_modules/@maka/core/dist/runtime-policy/policy-codec.js +43 -4
- package/node_modules/@maka/core/dist/runtime-policy.js +3 -2
- package/node_modules/@maka/core/dist/scheduled-task.js +8 -2
- package/node_modules/@maka/core/dist/settings.js +12 -0
- package/node_modules/@maka/runtime/dist/agent-run.js +8 -1
- package/node_modules/@maka/runtime/dist/agent-swarm-status-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +1 -0
- package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +42 -50
- package/node_modules/@maka/runtime/dist/ask-user-question-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/bots/dingtalk-bridge.js +86 -19
- package/node_modules/@maka/runtime/dist/code-mode.js +7 -4
- package/node_modules/@maka/runtime/dist/context-budget-policy.js +6 -24
- package/node_modules/@maka/runtime/dist/model-adapter.js +13 -3
- package/node_modules/@maka/runtime/dist/model-factory.js +1 -1
- package/node_modules/@maka/runtime/dist/plan-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/runtime-kernel.js +70 -14
- package/node_modules/@maka/runtime/dist/session-manager.js +137 -23
- package/node_modules/@maka/runtime/dist/session-trace-projection.js +22 -0
- package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/subagent-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/tool-availability.js +0 -1
- package/node_modules/@maka/runtime/dist/tool-runtime.js +27 -3
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/LICENSE +13 -0
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/run-code-mode.js +2 -0
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/package.json +3 -3
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/CHANGELOG.md +101 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/LICENSE +13 -0
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/dist/index.js +309 -244
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/docs/00-ai-gateway.mdx +29 -16
- package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/package.json +3 -3
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/CHANGELOG.md +152 -0
- package/node_modules/@maka/runtime/node_modules/ai/LICENSE +13 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/dist/index.js +2505 -1548
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/dist/internal/index.js +129 -107
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/02-providers-and-models.mdx +8 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/04-loop-control.mdx +5 -3
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-policy-tool-approvals.mdx +2 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-tool-approvals.mdx +13 -7
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/07-workflow-agent.mdx +94 -10
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/10-generating-structured-data.mdx +15 -3
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +2 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/16-mcp-tools.mdx +64 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/35-image-generation.mdx +11 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-transcription.mdx +36 -35
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/37-speech.mdx +0 -17
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/39-file-uploads.mdx +25 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/42-batch.mdx +372 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/50-error-handling.mdx +83 -6
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/60-telemetry.mdx +28 -5
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/index.mdx +5 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +40 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +47 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +23 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/20-streaming-data.mdx +11 -6
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/50-stream-protocol.mdx +6 -2
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/04-caching.mdx +7 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/11-secure-url-fetching.mdx +7 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +14 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +39 -5
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/05-embed.mdx +31 -5
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +32 -6
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +19 -5
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +2 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +37 -4
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/20-start-batch.mdx +154 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/21-get-batch-status.mdx +133 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/22-get-batch-results.mdx +109 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/23-cancel-batch.mdx +96 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/24-list-batches.mdx +121 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/28-output.mdx +27 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +63 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +1 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/index.mdx +25 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +1 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +4 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +6 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +101 -34
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +6 -1
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +7 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-tool-choice-violation-error.mdx +38 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/index.mdx +1 -0
- package/node_modules/{ai → @maka/runtime/node_modules/ai}/package.json +12 -12
- package/node_modules/@maka/runtime/package.json +9 -9
- package/node_modules/@maka/runtime-host/dist/adapter/session-projector.js +17 -36
- package/node_modules/@maka/runtime-host/dist/client/catalog-reader.js +5 -7
- package/node_modules/@maka/runtime-host/dist/protocol/external-agent-setup.js +149 -0
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +13 -1
- package/node_modules/@maka/runtime-host/dist/protocol/oauth.js +23 -4
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +4 -1
- package/node_modules/@maka/runtime-host/dist/protocol/runtime-policy.js +16 -20
- package/node_modules/@maka/runtime-host/dist/protocol/session-bundle.js +100 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/antigravity-install.js +242 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/antigravity.js +154 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/connection.js +116 -0
- package/node_modules/@maka/runtime-host/dist/server/artifact-coordinator.js +10 -10
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +56 -3
- package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +2 -2
- package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +4 -7
- package/node_modules/@maka/runtime-host/dist/server/external-agent-setup-coordinator.js +190 -0
- package/node_modules/@maka/runtime-host/dist/server/external-session-coordinator.js +7 -7
- package/node_modules/@maka/runtime-host/dist/server/json-array-page-budget.js +48 -0
- package/node_modules/@maka/runtime-host/dist/server/memory-projection.js +14 -15
- package/node_modules/@maka/runtime-host/dist/server/oauth-coordinator.js +13 -1
- package/node_modules/@maka/runtime-host/dist/server/plan-coordinator.js +11 -5
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform-coordinator.js +8 -6
- package/node_modules/@maka/runtime-host/dist/server/project-catalog-coordinator.js +10 -12
- package/node_modules/@maka/runtime-host/dist/server/project-directory-authority.js +4 -3
- package/node_modules/@maka/runtime-host/dist/server/runtime-policy-coordinator.js +23 -25
- package/node_modules/@maka/runtime-host/dist/server/runtime-resource-projection.js +9 -9
- package/node_modules/@maka/runtime-host/dist/server/scheduled-task-coordinator.js +15 -11
- package/node_modules/@maka/runtime-host/dist/server/session-bundle-coordinator.js +163 -0
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +24 -12
- package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +1 -0
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +16 -17
- package/node_modules/@maka/runtime-host/dist/server/usage-pricing-coordinator.js +16 -19
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +1 -0
- package/node_modules/@maka/runtime-host/package.json +1 -0
- package/node_modules/@maka/storage/dist/context-offload-snapshot.js +51 -1
- package/node_modules/@maka/storage/dist/model-facts-store.js +5 -28
- package/node_modules/@maka/storage/dist/project-catalog.js +6 -0
- package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +111 -38
- package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +46 -61
- package/node_modules/@maka/storage/dist/runtime-policy/oauth-login-receipt-document.js +25 -6
- package/node_modules/@maka/storage/dist/runtime-policy/onboarding-transaction.js +30 -14
- package/node_modules/@maka/storage/dist/runtime-policy/policy-document.js +10 -4
- package/node_modules/@maka/storage/dist/scheduled-task-store.js +8 -1
- package/node_modules/@maka/storage/dist/session-bundle-policy.js +127 -26
- package/node_modules/@maka/storage/dist/session-store.js +3 -0
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +3 -7
- package/node_modules/run/README.md +109 -18
- package/node_modules/run/THIRD_PARTY_NOTICES.md +11 -11
- package/node_modules/run/dist/continuation-validation.js +116 -1
- package/node_modules/run/dist/errors.js +12 -2
- package/node_modules/run/dist/host-function-invocation.js +2 -1
- package/node_modules/run/dist/run.js +30 -4
- package/node_modules/run/dist/runtime/guest-serde-source.js +1 -1
- package/node_modules/run/dist/runtime/guest-sources.js +214 -56
- package/node_modules/run/dist/runtime/manager.js +575 -116
- package/node_modules/run/dist/runtime/max-workers.js +8 -4
- package/node_modules/run/dist/runtime/protocol-validation.js +20 -7
- package/node_modules/run/dist/runtime/sync-bridge-protocol.js +135 -0
- package/node_modules/run/dist/runtime/worker-source.js +1 -1
- package/node_modules/run/dist/utils/options.js +7 -0
- package/node_modules/run/dist/utils/promise-with-resolvers.js +13 -1
- package/node_modules/run/dist/utils/serde.js +1 -7
- package/node_modules/run/dist/utils/source-cache.js +83 -13
- package/node_modules/run/package.json +6 -4
- package/package.json +1 -1
- package/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +0 -45
- /package/node_modules/@ai-sdk/{code-mode → anthropic/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/README.md +0 -0
- /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/dist/index.js +0 -0
- /package/node_modules/@ai-sdk/{gateway → cohere/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/@ai-sdk/{provider → google/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/{ai → @ai-sdk/open-responses/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/README.md +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval-continuation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/code-mode-tool.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/continuation-capability.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/direct-tool-call.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/errors.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/host-interrupt.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/index.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/interrupt-continuation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-invocation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-prompt.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/types.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/utils/serialization.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/src/tsconfig.json +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/README.md +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/README.md +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/00-introduction/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/03-prompts.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/04-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/05-streaming.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/06-provider-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/00-choosing-a-provider.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/01-navigating-the-library.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/02-nextjs-app-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/03-nextjs-pages-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/04-svelte.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/05-nuxt.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/06-nodejs.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/07-expo.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/08-tanstack-start.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/09-coding-agents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/02-building-agents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/03-workflows.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/05-configuring-call-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-memory.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-subagents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/08-terminal-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/05-generating-text.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-mcp-apps.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-runtime-and-tool-context.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/18-code-mode.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/20-prompt-engineering.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/25-settings.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/26-reasoning.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/30-embeddings.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/31-reranking.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-realtime.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-translation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/38-video-generation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/40-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/41-skill-uploads.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/45-provider-management.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/55-testing.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-devtools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/03-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/04-skills.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/07-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/02-chatbot.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-resume-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/04-generative-user-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/05-completion.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/08-object-generation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/21-error-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/21-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/24-reading-ui-message-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/25-message-metadata.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/02-streaming-react-components.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-generative-ui-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-saving-and-restoring-states.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/04-multistep-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/05-streaming-values.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/06-loading-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/08-error-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/09-authentication.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/01-prompt-engineering.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/02-stopping-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/03-backpressure.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/05-multiple-streamables.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/06-rate-limiting.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/07-rendering-ui-with-language-models.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/08-model-as-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-multistep-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-sequential-generations.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/10-vercel-deployment-guide.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-transcribe.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-translate.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/13-generate-video.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/14-upload-skill.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/15-agent.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/18-create-agent-ui-stream-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/18-pipe-agent-ui-stream-to-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/20-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-get-realtime-tool-definitions.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-apps.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-stdio-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/25-json-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/26-zod-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/27-valibot-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/29-filter-active-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/30-model-message.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/32-validate-ui-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/33-safe-validate-ui-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/34-sandbox.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/50-cosine-similarity.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/60-wrap-language-model.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/65-language-model-v2-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/66-extract-reasoning-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/67-simulate-streaming-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-instructions-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-settings-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/69-add-tool-input-examples-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-extract-json-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-is-step-count.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/71-has-tool-call.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/72-loop-finished.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/75-simulate-readable-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/90-generate-id.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/91-create-id-generator.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/92-default-generated-file.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/02-use-completion.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/03-use-object.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/32-prune-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/42-pipe-ui-message-stream-to-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/43-read-ui-message-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/46-infer-ui-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/47-infer-ui-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/48-mcp-app-renderer.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/50-direct-chat-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/02-create-ai.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/03-create-streamable-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/04-create-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/05-read-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/06-get-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/07-get-mutable-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/08-use-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/09-use-actions.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/10-use-ui-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/11-use-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/20-render.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/03-generate-video.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/04-ai-sdk-workflow/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-api-call-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-download-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-empty-response-body-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-data-content-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-message-role-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-prompt-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-response-data-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-signature-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-input-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-json-parse-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-api-key-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-setting-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-message-conversion-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-content-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-object-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-output-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-speech-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-model-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-reference-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-tool-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-transcript-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-translation-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-video-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-retry-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-stream-provider-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-too-many-embedding-values-for-call-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-not-found-for-approval-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-repair-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-type-validation-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-ui-message-stream-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-unsupported-functionality-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/01-run-agent-tui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/00-versioning.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/23-migration-guide-7-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/24-migration-guide-6-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/25-migration-guide-5-0-data.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/26-migration-guide-5-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/27-migration-guide-4-2.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/28-migration-guide-4-1.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/29-migration-guide-4-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/36-migration-guide-3-4.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/37-migration-guide-3-3.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/38-migration-guide-3-2.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/39-migration-guide-3-1.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/01-azure-stream-slow.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/03-server-actions-in-client-components.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/04-strange-stream-output.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-streamable-ui-errors.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-deployed.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-proxied.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-timeout-on-vercel.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/07-unclosed-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/08-use-chat-failed-to-parse-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/09-client-stream-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/10-use-chat-tools-no-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/11-use-chat-custom-request-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-typescript-performance-zod.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-use-chat-an-error-occurred.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/13-repeated-assistant-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-stream-abort-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-tool-calling-with-structured-outputs.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-abort-breaks-resumable-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-stream-text-not-working.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/16-streaming-status-delay.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/17-use-chat-stale-body-data.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/18-ontoolcall-type-narrowing.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/19-unsupported-model-version.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/20-no-object-generated-content-filter.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/21-missing-tool-results-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/30-model-is-not-assignable-to-type.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/40-typescript-cannot-find-namespace-jsx.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/50-react-maximum-update-depth-exceeded.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/60-jest-cannot-find-module-ai-rsc.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/70-high-memory-usage-with-images.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/index.mdx +0 -0
|
@@ -1010,218 +1010,28 @@ var gatewayGenerationInfoResponseSchema = lazySchema7(
|
|
|
1010
1010
|
)
|
|
1011
1011
|
);
|
|
1012
1012
|
|
|
1013
|
-
// src/gateway-
|
|
1013
|
+
// src/gateway-batch.ts
|
|
1014
1014
|
import {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
createJsonLinesResponseHandler,
|
|
1019
|
-
createJsonResponseHandler as createJsonResponseHandler5,
|
|
1020
|
-
getErrorMessage as getErrorMessage5,
|
|
1021
|
-
normalizeBatchRequestCounts,
|
|
1022
|
-
postJsonToApi as postJsonToApi2,
|
|
1023
|
-
resolve as resolve5,
|
|
1024
|
-
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE2,
|
|
1025
|
-
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE2
|
|
1026
|
-
} from "@ai-sdk/provider-utils";
|
|
1027
|
-
|
|
1028
|
-
// src/gateway-language-model.ts
|
|
1015
|
+
InvalidArgumentError,
|
|
1016
|
+
UnsupportedFunctionalityError
|
|
1017
|
+
} from "@ai-sdk/provider";
|
|
1029
1018
|
import {
|
|
1030
1019
|
combineHeaders,
|
|
1031
|
-
|
|
1020
|
+
convertAsyncIteratorToReadableStream,
|
|
1032
1021
|
createJsonErrorResponseHandler as createJsonErrorResponseHandler4,
|
|
1022
|
+
createJsonLinesResponseHandler,
|
|
1033
1023
|
createJsonResponseHandler as createJsonResponseHandler4,
|
|
1034
1024
|
getErrorMessage as getErrorMessage4,
|
|
1025
|
+
normalizeBatchRequestCounts,
|
|
1035
1026
|
postJsonToApi,
|
|
1036
|
-
resolve as resolve4
|
|
1037
|
-
serializeModelOptions,
|
|
1038
|
-
WORKFLOW_SERIALIZE,
|
|
1039
|
-
WORKFLOW_DESERIALIZE
|
|
1027
|
+
resolve as resolve4
|
|
1040
1028
|
} from "@ai-sdk/provider-utils";
|
|
1041
|
-
var
|
|
1042
|
-
constructor(
|
|
1043
|
-
this.modelId = modelId;
|
|
1029
|
+
var GatewayBatch = class {
|
|
1030
|
+
constructor(config) {
|
|
1044
1031
|
this.config = config;
|
|
1045
1032
|
this.specificationVersion = "v4";
|
|
1046
1033
|
this.supportedUrls = { "*/*": [/.*/] };
|
|
1047
|
-
|
|
1048
|
-
static [WORKFLOW_SERIALIZE](model) {
|
|
1049
|
-
return serializeModelOptions({
|
|
1050
|
-
modelId: model.modelId,
|
|
1051
|
-
config: model.config
|
|
1052
|
-
});
|
|
1053
|
-
}
|
|
1054
|
-
static [WORKFLOW_DESERIALIZE](options) {
|
|
1055
|
-
return new _GatewayLanguageModel(options.modelId, options.config);
|
|
1056
|
-
}
|
|
1057
|
-
get provider() {
|
|
1058
|
-
return this.config.provider;
|
|
1059
|
-
}
|
|
1060
|
-
async getArgs(options) {
|
|
1061
|
-
const { abortSignal: _abortSignal, ...optionsWithoutSignal } = options;
|
|
1062
|
-
return {
|
|
1063
|
-
args: this.maybeEncodeFileParts(optionsWithoutSignal),
|
|
1064
|
-
warnings: []
|
|
1065
|
-
};
|
|
1066
|
-
}
|
|
1067
|
-
async doGenerate(options) {
|
|
1068
|
-
const { args, warnings } = await this.getArgs(options);
|
|
1069
|
-
const { abortSignal } = options;
|
|
1070
|
-
const resolvedHeaders = this.config.headers ? await resolve4(this.config.headers) : void 0;
|
|
1071
|
-
try {
|
|
1072
|
-
const {
|
|
1073
|
-
responseHeaders,
|
|
1074
|
-
value: responseBody,
|
|
1075
|
-
rawValue: rawResponse
|
|
1076
|
-
} = await postJsonToApi({
|
|
1077
|
-
url: this.getUrl(),
|
|
1078
|
-
headers: combineHeaders(
|
|
1079
|
-
resolvedHeaders,
|
|
1080
|
-
options.headers,
|
|
1081
|
-
this.getModelConfigHeaders(this.modelId, false),
|
|
1082
|
-
await resolve4(this.config.o11yHeaders)
|
|
1083
|
-
),
|
|
1084
|
-
body: args,
|
|
1085
|
-
successfulResponseHandler: createJsonResponseHandler4(z.any()),
|
|
1086
|
-
failedResponseHandler: createJsonErrorResponseHandler4({
|
|
1087
|
-
errorSchema: z.any(),
|
|
1088
|
-
errorToMessage: (data) => {
|
|
1089
|
-
var _a12;
|
|
1090
|
-
return (_a12 = getErrorMessage4(data)) != null ? _a12 : "unknown error";
|
|
1091
|
-
}
|
|
1092
|
-
}),
|
|
1093
|
-
...abortSignal && { abortSignal },
|
|
1094
|
-
fetch: this.config.fetch
|
|
1095
|
-
});
|
|
1096
|
-
return {
|
|
1097
|
-
...responseBody,
|
|
1098
|
-
request: { body: args },
|
|
1099
|
-
response: { headers: responseHeaders, body: rawResponse },
|
|
1100
|
-
warnings
|
|
1101
|
-
};
|
|
1102
|
-
} catch (error) {
|
|
1103
|
-
throw await asGatewayError(
|
|
1104
|
-
error,
|
|
1105
|
-
await parseAuthMethod(resolvedHeaders != null ? resolvedHeaders : {})
|
|
1106
|
-
);
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
async doStream(options) {
|
|
1110
|
-
const { args, warnings } = await this.getArgs(options);
|
|
1111
|
-
const { abortSignal } = options;
|
|
1112
|
-
const resolvedHeaders = this.config.headers ? await resolve4(this.config.headers) : void 0;
|
|
1113
|
-
try {
|
|
1114
|
-
const { value: response, responseHeaders } = await postJsonToApi({
|
|
1115
|
-
url: this.getUrl(),
|
|
1116
|
-
headers: combineHeaders(
|
|
1117
|
-
resolvedHeaders,
|
|
1118
|
-
options.headers,
|
|
1119
|
-
this.getModelConfigHeaders(this.modelId, true),
|
|
1120
|
-
await resolve4(this.config.o11yHeaders)
|
|
1121
|
-
),
|
|
1122
|
-
body: args,
|
|
1123
|
-
successfulResponseHandler: createEventSourceResponseHandler(z.any()),
|
|
1124
|
-
failedResponseHandler: createJsonErrorResponseHandler4({
|
|
1125
|
-
errorSchema: z.any(),
|
|
1126
|
-
errorToMessage: (data) => {
|
|
1127
|
-
var _a12;
|
|
1128
|
-
return (_a12 = getErrorMessage4(data)) != null ? _a12 : "unknown error";
|
|
1129
|
-
}
|
|
1130
|
-
}),
|
|
1131
|
-
...abortSignal && { abortSignal },
|
|
1132
|
-
fetch: this.config.fetch
|
|
1133
|
-
});
|
|
1134
|
-
return {
|
|
1135
|
-
stream: response.pipeThrough(
|
|
1136
|
-
new TransformStream({
|
|
1137
|
-
start(controller) {
|
|
1138
|
-
if (warnings.length > 0) {
|
|
1139
|
-
controller.enqueue({ type: "stream-start", warnings });
|
|
1140
|
-
}
|
|
1141
|
-
},
|
|
1142
|
-
transform(chunk, controller) {
|
|
1143
|
-
if (chunk.success) {
|
|
1144
|
-
const streamPart = chunk.value;
|
|
1145
|
-
if (streamPart.type === "raw" && !options.includeRawChunks) {
|
|
1146
|
-
return;
|
|
1147
|
-
}
|
|
1148
|
-
if (streamPart.type === "response-metadata" && streamPart.timestamp && typeof streamPart.timestamp === "string") {
|
|
1149
|
-
streamPart.timestamp = new Date(streamPart.timestamp);
|
|
1150
|
-
}
|
|
1151
|
-
controller.enqueue(streamPart);
|
|
1152
|
-
} else {
|
|
1153
|
-
controller.error(
|
|
1154
|
-
chunk.error
|
|
1155
|
-
);
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
})
|
|
1159
|
-
),
|
|
1160
|
-
request: { body: args },
|
|
1161
|
-
response: { headers: responseHeaders }
|
|
1162
|
-
};
|
|
1163
|
-
} catch (error) {
|
|
1164
|
-
throw await asGatewayError(
|
|
1165
|
-
error,
|
|
1166
|
-
await parseAuthMethod(resolvedHeaders != null ? resolvedHeaders : {})
|
|
1167
|
-
);
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
/**
|
|
1171
|
-
* Encodes inline `Uint8Array` file data to a base64 string in place.
|
|
1172
|
-
* @param options - The options to encode.
|
|
1173
|
-
* @returns The options with the file data encoded.
|
|
1174
|
-
*/
|
|
1175
|
-
maybeEncodeFileParts(options) {
|
|
1176
|
-
for (const message of options.prompt) {
|
|
1177
|
-
if (!Array.isArray(message.content)) {
|
|
1178
|
-
continue;
|
|
1179
|
-
}
|
|
1180
|
-
for (const part of message.content) {
|
|
1181
|
-
if (part.type === "file" || part.type === "reasoning-file") {
|
|
1182
|
-
part.data = maybeBase64EncodeFileData(part.data);
|
|
1183
|
-
} else if (part.type === "tool-result" && part.output.type === "content") {
|
|
1184
|
-
for (const contentPart of part.output.value) {
|
|
1185
|
-
if (contentPart.type === "file") {
|
|
1186
|
-
contentPart.data = maybeBase64EncodeFileData(contentPart.data);
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
return options;
|
|
1193
|
-
}
|
|
1194
|
-
getUrl() {
|
|
1195
|
-
return `${this.config.baseURL}/language-model`;
|
|
1196
|
-
}
|
|
1197
|
-
getModelConfigHeaders(modelId, streaming) {
|
|
1198
|
-
return {
|
|
1199
|
-
"ai-language-model-specification-version": "4",
|
|
1200
|
-
"ai-language-model-id": modelId,
|
|
1201
|
-
"ai-language-model-streaming": String(streaming)
|
|
1202
|
-
};
|
|
1203
|
-
}
|
|
1204
|
-
};
|
|
1205
|
-
function maybeBase64EncodeFileData(data) {
|
|
1206
|
-
if (data.type === "data") {
|
|
1207
|
-
const bytes = data.data;
|
|
1208
|
-
if (bytes instanceof Uint8Array) {
|
|
1209
|
-
return { ...data, data: Buffer.from(bytes).toString("base64") };
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
return data;
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
// src/gateway-language-model-batch.ts
|
|
1216
|
-
var GatewayBatchLanguageModel = class _GatewayBatchLanguageModel extends GatewayLanguageModel {
|
|
1217
|
-
static [WORKFLOW_SERIALIZE2](model) {
|
|
1218
|
-
return GatewayLanguageModel[WORKFLOW_SERIALIZE2](model);
|
|
1219
|
-
}
|
|
1220
|
-
static [WORKFLOW_DESERIALIZE2](options) {
|
|
1221
|
-
return new _GatewayBatchLanguageModel(options.modelId, options.config);
|
|
1222
|
-
}
|
|
1223
|
-
constructor(modelId, config) {
|
|
1224
|
-
super(modelId, config);
|
|
1034
|
+
this.provider = `${config.provider}.batch`;
|
|
1225
1035
|
}
|
|
1226
1036
|
/**
|
|
1227
1037
|
* Starts a durable batch of text-generation requests through the Gateway's
|
|
@@ -1230,7 +1040,7 @@ var GatewayBatchLanguageModel = class _GatewayBatchLanguageModel extends Gateway
|
|
|
1230
1040
|
* server-side, so status and results always route back through the
|
|
1231
1041
|
* Gateway job.
|
|
1232
1042
|
*/
|
|
1233
|
-
async
|
|
1043
|
+
async doStartBatch({
|
|
1234
1044
|
requests,
|
|
1235
1045
|
providerOptions,
|
|
1236
1046
|
headers,
|
|
@@ -1238,38 +1048,41 @@ var GatewayBatchLanguageModel = class _GatewayBatchLanguageModel extends Gateway
|
|
|
1238
1048
|
webhookUrl
|
|
1239
1049
|
}) {
|
|
1240
1050
|
var _a12;
|
|
1241
|
-
|
|
1051
|
+
assertTextBatchRequests(requests);
|
|
1052
|
+
const modelId = validateSingleModel(requests);
|
|
1053
|
+
const resolvedHeaders = this.config.headers ? await resolve4(this.config.headers) : void 0;
|
|
1242
1054
|
const idempotencyKey = getGatewayBatchIdempotencyKey(providerOptions);
|
|
1243
1055
|
const forwardedProviderOptions = omitGatewayIdempotencyKey(providerOptions);
|
|
1244
1056
|
try {
|
|
1245
|
-
const { value: responseBody } = await
|
|
1057
|
+
const { value: responseBody } = await postJsonToApi({
|
|
1246
1058
|
url: this.getBatchUrl("start"),
|
|
1247
|
-
headers:
|
|
1059
|
+
headers: combineHeaders(
|
|
1248
1060
|
resolvedHeaders,
|
|
1249
1061
|
headers,
|
|
1250
|
-
|
|
1251
|
-
await
|
|
1062
|
+
{ "ai-model-id": modelId },
|
|
1063
|
+
await resolve4(this.config.o11yHeaders),
|
|
1252
1064
|
idempotencyKey != null ? { "idempotency-key": idempotencyKey } : void 0
|
|
1253
1065
|
),
|
|
1254
1066
|
body: {
|
|
1255
1067
|
...webhookUrl != null && { callbackUrl: webhookUrl },
|
|
1256
|
-
modelId: this.modelId,
|
|
1257
1068
|
requests: requests.map((request) => ({
|
|
1258
1069
|
id: request.id,
|
|
1259
|
-
|
|
1070
|
+
type: request.type,
|
|
1071
|
+
modelId: request.modelId,
|
|
1072
|
+
options: maybeEncodeBatchFileParts(request.options)
|
|
1260
1073
|
})),
|
|
1261
1074
|
...forwardedProviderOptions != null && {
|
|
1262
1075
|
providerOptions: forwardedProviderOptions
|
|
1263
1076
|
}
|
|
1264
1077
|
},
|
|
1265
|
-
successfulResponseHandler:
|
|
1078
|
+
successfulResponseHandler: createJsonResponseHandler4(
|
|
1266
1079
|
gatewayBatchStartResponseSchema
|
|
1267
1080
|
),
|
|
1268
|
-
failedResponseHandler:
|
|
1081
|
+
failedResponseHandler: createJsonErrorResponseHandler4({
|
|
1269
1082
|
errorSchema: z.any(),
|
|
1270
1083
|
errorToMessage: (data) => {
|
|
1271
1084
|
var _a13;
|
|
1272
|
-
return (_a13 =
|
|
1085
|
+
return (_a13 = getErrorMessage4(data)) != null ? _a13 : "unknown error";
|
|
1273
1086
|
}
|
|
1274
1087
|
}),
|
|
1275
1088
|
...abortSignal && { abortSignal },
|
|
@@ -1294,30 +1107,29 @@ var GatewayBatchLanguageModel = class _GatewayBatchLanguageModel extends Gateway
|
|
|
1294
1107
|
* Retrieves the lifecycle status of a Gateway batch job
|
|
1295
1108
|
* (`POST {baseURL}/batch/status`).
|
|
1296
1109
|
*/
|
|
1297
|
-
async
|
|
1110
|
+
async doGetBatchStatus({
|
|
1298
1111
|
batchId,
|
|
1299
1112
|
headers,
|
|
1300
1113
|
abortSignal
|
|
1301
1114
|
}) {
|
|
1302
|
-
const resolvedHeaders = this.config.headers ? await
|
|
1115
|
+
const resolvedHeaders = this.config.headers ? await resolve4(this.config.headers) : void 0;
|
|
1303
1116
|
try {
|
|
1304
|
-
const { value: responseBody } = await
|
|
1117
|
+
const { value: responseBody } = await postJsonToApi({
|
|
1305
1118
|
url: this.getBatchUrl("status"),
|
|
1306
|
-
headers:
|
|
1119
|
+
headers: combineHeaders(
|
|
1307
1120
|
resolvedHeaders,
|
|
1308
1121
|
headers,
|
|
1309
|
-
this.
|
|
1310
|
-
await resolve5(this.config.o11yHeaders)
|
|
1122
|
+
await resolve4(this.config.o11yHeaders)
|
|
1311
1123
|
),
|
|
1312
1124
|
body: { batchId },
|
|
1313
|
-
successfulResponseHandler:
|
|
1125
|
+
successfulResponseHandler: createJsonResponseHandler4(
|
|
1314
1126
|
gatewayBatchStatusResponseSchema
|
|
1315
1127
|
),
|
|
1316
|
-
failedResponseHandler:
|
|
1128
|
+
failedResponseHandler: createJsonErrorResponseHandler4({
|
|
1317
1129
|
errorSchema: z.any(),
|
|
1318
1130
|
errorToMessage: (data) => {
|
|
1319
1131
|
var _a12;
|
|
1320
|
-
return (_a12 =
|
|
1132
|
+
return (_a12 = getErrorMessage4(data)) != null ? _a12 : "unknown error";
|
|
1321
1133
|
}
|
|
1322
1134
|
}),
|
|
1323
1135
|
...abortSignal && { abortSignal },
|
|
@@ -1341,30 +1153,29 @@ var GatewayBatchLanguageModel = class _GatewayBatchLanguageModel extends Gateway
|
|
|
1341
1153
|
* (id + status) and passed through — the Gateway sanitizes them
|
|
1342
1154
|
* server-side. The route responds 400 while the batch is non-terminal.
|
|
1343
1155
|
*/
|
|
1344
|
-
async
|
|
1156
|
+
async doGetBatchResults({
|
|
1345
1157
|
batchId,
|
|
1346
1158
|
headers,
|
|
1347
1159
|
abortSignal
|
|
1348
1160
|
}) {
|
|
1349
|
-
const resolvedHeaders = this.config.headers ? await
|
|
1161
|
+
const resolvedHeaders = this.config.headers ? await resolve4(this.config.headers) : void 0;
|
|
1350
1162
|
try {
|
|
1351
|
-
const { value: lines } = await
|
|
1163
|
+
const { value: lines } = await postJsonToApi({
|
|
1352
1164
|
url: this.getBatchUrl("results"),
|
|
1353
|
-
headers:
|
|
1165
|
+
headers: combineHeaders(
|
|
1354
1166
|
resolvedHeaders,
|
|
1355
1167
|
headers,
|
|
1356
|
-
this.
|
|
1357
|
-
await resolve5(this.config.o11yHeaders)
|
|
1168
|
+
await resolve4(this.config.o11yHeaders)
|
|
1358
1169
|
),
|
|
1359
1170
|
body: { batchId },
|
|
1360
1171
|
successfulResponseHandler: createJsonLinesResponseHandler(
|
|
1361
1172
|
gatewayBatchItemResultLineSchema
|
|
1362
1173
|
),
|
|
1363
|
-
failedResponseHandler:
|
|
1174
|
+
failedResponseHandler: createJsonErrorResponseHandler4({
|
|
1364
1175
|
errorSchema: z.any(),
|
|
1365
1176
|
errorToMessage: (data) => {
|
|
1366
1177
|
var _a12;
|
|
1367
|
-
return (_a12 =
|
|
1178
|
+
return (_a12 = getErrorMessage4(data)) != null ? _a12 : "unknown error";
|
|
1368
1179
|
}
|
|
1369
1180
|
}),
|
|
1370
1181
|
...abortSignal && { abortSignal },
|
|
@@ -1386,12 +1197,65 @@ var GatewayBatchLanguageModel = class _GatewayBatchLanguageModel extends Gateway
|
|
|
1386
1197
|
getBatchUrl(path) {
|
|
1387
1198
|
return `${this.config.baseURL}/batch/${path}`;
|
|
1388
1199
|
}
|
|
1389
|
-
getBatchConfigHeaders() {
|
|
1390
|
-
return {
|
|
1391
|
-
"ai-model-id": this.modelId
|
|
1392
|
-
};
|
|
1393
|
-
}
|
|
1394
1200
|
};
|
|
1201
|
+
function maybeEncodeBatchFileParts(options) {
|
|
1202
|
+
for (const message of options.prompt) {
|
|
1203
|
+
if (!Array.isArray(message.content)) {
|
|
1204
|
+
continue;
|
|
1205
|
+
}
|
|
1206
|
+
for (const part of message.content) {
|
|
1207
|
+
if (part.type === "file" || part.type === "reasoning-file") {
|
|
1208
|
+
part.data = maybeBase64EncodeFileData(part.data);
|
|
1209
|
+
} else if (part.type === "tool-result" && part.output.type === "content") {
|
|
1210
|
+
for (const contentPart of part.output.value) {
|
|
1211
|
+
if (contentPart.type === "file") {
|
|
1212
|
+
contentPart.data = maybeBase64EncodeFileData(contentPart.data);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
return options;
|
|
1219
|
+
}
|
|
1220
|
+
function maybeBase64EncodeFileData(data) {
|
|
1221
|
+
if (data.type === "data") {
|
|
1222
|
+
const bytes = data.data;
|
|
1223
|
+
if (bytes instanceof Uint8Array) {
|
|
1224
|
+
return { ...data, data: Buffer.from(bytes).toString("base64") };
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
return data;
|
|
1228
|
+
}
|
|
1229
|
+
function validateSingleModel(requests) {
|
|
1230
|
+
var _a12;
|
|
1231
|
+
const modelId = (_a12 = requests[0]) == null ? void 0 : _a12.modelId;
|
|
1232
|
+
if (modelId == null) {
|
|
1233
|
+
throw new InvalidArgumentError({
|
|
1234
|
+
argument: "requests",
|
|
1235
|
+
message: "The AI Gateway Batch API requires at least one request."
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
for (const request of requests) {
|
|
1239
|
+
if (request.modelId !== modelId) {
|
|
1240
|
+
throw new InvalidArgumentError({
|
|
1241
|
+
argument: "requests",
|
|
1242
|
+
message: `The AI Gateway Batch API requires all requests in a batch to use the same model. Found "${modelId}" and "${request.modelId}".`
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
return modelId;
|
|
1247
|
+
}
|
|
1248
|
+
function assertTextBatchRequests(requests) {
|
|
1249
|
+
for (const request of requests) {
|
|
1250
|
+
const requestType = request.type;
|
|
1251
|
+
if (requestType !== "text") {
|
|
1252
|
+
throw new UnsupportedFunctionalityError({
|
|
1253
|
+
functionality: `batch request type: ${requestType}`,
|
|
1254
|
+
message: `The AI Gateway Batch API does not support batch requests with type "${requestType}".`
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1395
1259
|
function getGatewayBatchIdempotencyKey(providerOptions) {
|
|
1396
1260
|
const gatewayOptions = providerOptions == null ? void 0 : providerOptions.gateway;
|
|
1397
1261
|
if (gatewayOptions == null || typeof gatewayOptions !== "object" || Array.isArray(gatewayOptions)) {
|
|
@@ -1466,6 +1330,7 @@ async function* convertGatewayBatchResultLines(lines) {
|
|
|
1466
1330
|
}
|
|
1467
1331
|
}
|
|
1468
1332
|
var gatewayBatchItemResultLineSchema = z.object({
|
|
1333
|
+
type: z.literal("text"),
|
|
1469
1334
|
id: z.string(),
|
|
1470
1335
|
status: z.enum(["cancelled", "expired", "failed", "succeeded"])
|
|
1471
1336
|
}).catchall(z.unknown());
|
|
@@ -1505,6 +1370,194 @@ var gatewayBatchStartResponseSchema = gatewayBatchStatusFieldsSchema.extend({
|
|
|
1505
1370
|
});
|
|
1506
1371
|
var gatewayBatchStatusResponseSchema = gatewayBatchStatusFieldsSchema;
|
|
1507
1372
|
|
|
1373
|
+
// src/gateway-language-model.ts
|
|
1374
|
+
import {
|
|
1375
|
+
combineHeaders as combineHeaders2,
|
|
1376
|
+
createEventSourceResponseHandler,
|
|
1377
|
+
createJsonErrorResponseHandler as createJsonErrorResponseHandler5,
|
|
1378
|
+
createJsonResponseHandler as createJsonResponseHandler5,
|
|
1379
|
+
getErrorMessage as getErrorMessage5,
|
|
1380
|
+
postJsonToApi as postJsonToApi2,
|
|
1381
|
+
resolve as resolve5,
|
|
1382
|
+
serializeModelOptions,
|
|
1383
|
+
WORKFLOW_SERIALIZE,
|
|
1384
|
+
WORKFLOW_DESERIALIZE
|
|
1385
|
+
} from "@ai-sdk/provider-utils";
|
|
1386
|
+
var GatewayLanguageModel = class _GatewayLanguageModel {
|
|
1387
|
+
constructor(modelId, config) {
|
|
1388
|
+
this.modelId = modelId;
|
|
1389
|
+
this.config = config;
|
|
1390
|
+
this.specificationVersion = "v4";
|
|
1391
|
+
this.supportedUrls = { "*/*": [/.*/] };
|
|
1392
|
+
}
|
|
1393
|
+
static [WORKFLOW_SERIALIZE](model) {
|
|
1394
|
+
return serializeModelOptions({
|
|
1395
|
+
modelId: model.modelId,
|
|
1396
|
+
config: model.config
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
static [WORKFLOW_DESERIALIZE](options) {
|
|
1400
|
+
return new _GatewayLanguageModel(options.modelId, options.config);
|
|
1401
|
+
}
|
|
1402
|
+
get provider() {
|
|
1403
|
+
return this.config.provider;
|
|
1404
|
+
}
|
|
1405
|
+
async getArgs(options) {
|
|
1406
|
+
const { abortSignal: _abortSignal, ...optionsWithoutSignal } = options;
|
|
1407
|
+
return {
|
|
1408
|
+
args: this.maybeEncodeFileParts(optionsWithoutSignal),
|
|
1409
|
+
warnings: []
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
async doGenerate(options) {
|
|
1413
|
+
var _a12;
|
|
1414
|
+
const { args, warnings } = await this.getArgs(options);
|
|
1415
|
+
const { abortSignal } = options;
|
|
1416
|
+
const resolvedHeaders = this.config.headers ? await resolve5(this.config.headers) : void 0;
|
|
1417
|
+
try {
|
|
1418
|
+
const {
|
|
1419
|
+
responseHeaders,
|
|
1420
|
+
value: responseBody,
|
|
1421
|
+
rawValue: rawResponse
|
|
1422
|
+
} = await postJsonToApi2({
|
|
1423
|
+
url: this.getUrl(),
|
|
1424
|
+
headers: combineHeaders2(
|
|
1425
|
+
resolvedHeaders,
|
|
1426
|
+
options.headers,
|
|
1427
|
+
this.getModelConfigHeaders(this.modelId, false),
|
|
1428
|
+
await resolve5(this.config.o11yHeaders)
|
|
1429
|
+
),
|
|
1430
|
+
body: args,
|
|
1431
|
+
successfulResponseHandler: createJsonResponseHandler5(z.any()),
|
|
1432
|
+
failedResponseHandler: createJsonErrorResponseHandler5({
|
|
1433
|
+
errorSchema: z.any(),
|
|
1434
|
+
errorToMessage: (data) => {
|
|
1435
|
+
var _a13;
|
|
1436
|
+
return (_a13 = getErrorMessage5(data)) != null ? _a13 : "unknown error";
|
|
1437
|
+
}
|
|
1438
|
+
}),
|
|
1439
|
+
...abortSignal && { abortSignal },
|
|
1440
|
+
fetch: this.config.fetch
|
|
1441
|
+
});
|
|
1442
|
+
return {
|
|
1443
|
+
...responseBody,
|
|
1444
|
+
request: { body: args },
|
|
1445
|
+
response: { headers: responseHeaders, body: rawResponse },
|
|
1446
|
+
warnings: [...(_a12 = responseBody.warnings) != null ? _a12 : [], ...warnings]
|
|
1447
|
+
};
|
|
1448
|
+
} catch (error) {
|
|
1449
|
+
throw await asGatewayError(
|
|
1450
|
+
error,
|
|
1451
|
+
await parseAuthMethod(resolvedHeaders != null ? resolvedHeaders : {})
|
|
1452
|
+
);
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
async doStream(options) {
|
|
1456
|
+
const { args, warnings } = await this.getArgs(options);
|
|
1457
|
+
const { abortSignal } = options;
|
|
1458
|
+
const resolvedHeaders = this.config.headers ? await resolve5(this.config.headers) : void 0;
|
|
1459
|
+
try {
|
|
1460
|
+
const { value: response, responseHeaders } = await postJsonToApi2({
|
|
1461
|
+
url: this.getUrl(),
|
|
1462
|
+
headers: combineHeaders2(
|
|
1463
|
+
resolvedHeaders,
|
|
1464
|
+
options.headers,
|
|
1465
|
+
this.getModelConfigHeaders(this.modelId, true),
|
|
1466
|
+
await resolve5(this.config.o11yHeaders)
|
|
1467
|
+
),
|
|
1468
|
+
body: args,
|
|
1469
|
+
successfulResponseHandler: createEventSourceResponseHandler(z.any()),
|
|
1470
|
+
failedResponseHandler: createJsonErrorResponseHandler5({
|
|
1471
|
+
errorSchema: z.any(),
|
|
1472
|
+
errorToMessage: (data) => {
|
|
1473
|
+
var _a12;
|
|
1474
|
+
return (_a12 = getErrorMessage5(data)) != null ? _a12 : "unknown error";
|
|
1475
|
+
}
|
|
1476
|
+
}),
|
|
1477
|
+
...abortSignal && { abortSignal },
|
|
1478
|
+
fetch: this.config.fetch
|
|
1479
|
+
});
|
|
1480
|
+
return {
|
|
1481
|
+
stream: response.pipeThrough(
|
|
1482
|
+
new TransformStream({
|
|
1483
|
+
start(controller) {
|
|
1484
|
+
if (warnings.length > 0) {
|
|
1485
|
+
controller.enqueue({ type: "stream-start", warnings });
|
|
1486
|
+
}
|
|
1487
|
+
},
|
|
1488
|
+
transform(chunk, controller) {
|
|
1489
|
+
if (chunk.success) {
|
|
1490
|
+
const streamPart = chunk.value;
|
|
1491
|
+
if (streamPart.type === "raw" && !options.includeRawChunks) {
|
|
1492
|
+
return;
|
|
1493
|
+
}
|
|
1494
|
+
if (streamPart.type === "response-metadata" && streamPart.timestamp && typeof streamPart.timestamp === "string") {
|
|
1495
|
+
streamPart.timestamp = new Date(streamPart.timestamp);
|
|
1496
|
+
}
|
|
1497
|
+
controller.enqueue(streamPart);
|
|
1498
|
+
} else {
|
|
1499
|
+
controller.error(
|
|
1500
|
+
chunk.error
|
|
1501
|
+
);
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
})
|
|
1505
|
+
),
|
|
1506
|
+
request: { body: args },
|
|
1507
|
+
response: { headers: responseHeaders }
|
|
1508
|
+
};
|
|
1509
|
+
} catch (error) {
|
|
1510
|
+
throw await asGatewayError(
|
|
1511
|
+
error,
|
|
1512
|
+
await parseAuthMethod(resolvedHeaders != null ? resolvedHeaders : {})
|
|
1513
|
+
);
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* Encodes inline `Uint8Array` file data to a base64 string in place.
|
|
1518
|
+
* @param options - The options to encode.
|
|
1519
|
+
* @returns The options with the file data encoded.
|
|
1520
|
+
*/
|
|
1521
|
+
maybeEncodeFileParts(options) {
|
|
1522
|
+
for (const message of options.prompt) {
|
|
1523
|
+
if (!Array.isArray(message.content)) {
|
|
1524
|
+
continue;
|
|
1525
|
+
}
|
|
1526
|
+
for (const part of message.content) {
|
|
1527
|
+
if (part.type === "file" || part.type === "reasoning-file") {
|
|
1528
|
+
part.data = maybeBase64EncodeFileData2(part.data);
|
|
1529
|
+
} else if (part.type === "tool-result" && part.output.type === "content") {
|
|
1530
|
+
for (const contentPart of part.output.value) {
|
|
1531
|
+
if (contentPart.type === "file") {
|
|
1532
|
+
contentPart.data = maybeBase64EncodeFileData2(contentPart.data);
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
return options;
|
|
1539
|
+
}
|
|
1540
|
+
getUrl() {
|
|
1541
|
+
return `${this.config.baseURL}/language-model`;
|
|
1542
|
+
}
|
|
1543
|
+
getModelConfigHeaders(modelId, streaming) {
|
|
1544
|
+
return {
|
|
1545
|
+
"ai-language-model-specification-version": "4",
|
|
1546
|
+
"ai-language-model-id": modelId,
|
|
1547
|
+
"ai-language-model-streaming": String(streaming)
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
};
|
|
1551
|
+
function maybeBase64EncodeFileData2(data) {
|
|
1552
|
+
if (data.type === "data") {
|
|
1553
|
+
const bytes = data.data;
|
|
1554
|
+
if (bytes instanceof Uint8Array) {
|
|
1555
|
+
return { ...data, data: Buffer.from(bytes).toString("base64") };
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
return data;
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1508
1561
|
// src/gateway-embedding-model.ts
|
|
1509
1562
|
import {
|
|
1510
1563
|
combineHeaders as combineHeaders3,
|
|
@@ -1515,8 +1568,8 @@ import {
|
|
|
1515
1568
|
postJsonToApi as postJsonToApi3,
|
|
1516
1569
|
resolve as resolve6,
|
|
1517
1570
|
serializeModelOptions as serializeModelOptions2,
|
|
1518
|
-
WORKFLOW_SERIALIZE as
|
|
1519
|
-
WORKFLOW_DESERIALIZE as
|
|
1571
|
+
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE2,
|
|
1572
|
+
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE2,
|
|
1520
1573
|
zodSchema as zodSchema8
|
|
1521
1574
|
} from "@ai-sdk/provider-utils";
|
|
1522
1575
|
var GatewayEmbeddingModel = class _GatewayEmbeddingModel {
|
|
@@ -1527,13 +1580,13 @@ var GatewayEmbeddingModel = class _GatewayEmbeddingModel {
|
|
|
1527
1580
|
this.maxEmbeddingsPerCall = 2048;
|
|
1528
1581
|
this.supportsParallelCalls = true;
|
|
1529
1582
|
}
|
|
1530
|
-
static [
|
|
1583
|
+
static [WORKFLOW_SERIALIZE2](model) {
|
|
1531
1584
|
return serializeModelOptions2({
|
|
1532
1585
|
modelId: model.modelId,
|
|
1533
1586
|
config: model.config
|
|
1534
1587
|
});
|
|
1535
1588
|
}
|
|
1536
|
-
static [
|
|
1589
|
+
static [WORKFLOW_DESERIALIZE2](options) {
|
|
1537
1590
|
return new _GatewayEmbeddingModel(options.modelId, options.config);
|
|
1538
1591
|
}
|
|
1539
1592
|
get provider() {
|
|
@@ -1643,8 +1696,8 @@ import {
|
|
|
1643
1696
|
postJsonToApi as postJsonToApi4,
|
|
1644
1697
|
resolve as resolve7,
|
|
1645
1698
|
serializeModelOptions as serializeModelOptions3,
|
|
1646
|
-
WORKFLOW_SERIALIZE as
|
|
1647
|
-
WORKFLOW_DESERIALIZE as
|
|
1699
|
+
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE3,
|
|
1700
|
+
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE3
|
|
1648
1701
|
} from "@ai-sdk/provider-utils";
|
|
1649
1702
|
var GatewayImageModel = class _GatewayImageModel {
|
|
1650
1703
|
constructor(modelId, config) {
|
|
@@ -1654,13 +1707,13 @@ var GatewayImageModel = class _GatewayImageModel {
|
|
|
1654
1707
|
// Set a very large number to prevent client-side splitting of requests
|
|
1655
1708
|
this.maxImagesPerCall = Number.MAX_SAFE_INTEGER;
|
|
1656
1709
|
}
|
|
1657
|
-
static [
|
|
1710
|
+
static [WORKFLOW_SERIALIZE3](model) {
|
|
1658
1711
|
return serializeModelOptions3({
|
|
1659
1712
|
modelId: model.modelId,
|
|
1660
1713
|
config: model.config
|
|
1661
1714
|
});
|
|
1662
1715
|
}
|
|
1663
|
-
static [
|
|
1716
|
+
static [WORKFLOW_DESERIALIZE3](options) {
|
|
1664
1717
|
return new _GatewayImageModel(options.modelId, options.config);
|
|
1665
1718
|
}
|
|
1666
1719
|
get provider() {
|
|
@@ -1717,6 +1770,9 @@ var GatewayImageModel = class _GatewayImageModel {
|
|
|
1717
1770
|
return {
|
|
1718
1771
|
images: responseBody.images,
|
|
1719
1772
|
// Always base64 strings from server
|
|
1773
|
+
...responseBody.isRetryable != null && {
|
|
1774
|
+
isRetryable: responseBody.isRetryable
|
|
1775
|
+
},
|
|
1720
1776
|
warnings: (_a12 = responseBody.warnings) != null ? _a12 : [],
|
|
1721
1777
|
providerMetadata: responseBody.providerMetadata,
|
|
1722
1778
|
response: {
|
|
@@ -1790,6 +1846,7 @@ var gatewayImageUsageSchema = z.object({
|
|
|
1790
1846
|
var gatewayImageResponseSchema = z.object({
|
|
1791
1847
|
images: z.array(z.string()),
|
|
1792
1848
|
// Always base64 strings over the wire
|
|
1849
|
+
isRetryable: z.boolean().optional(),
|
|
1793
1850
|
warnings: z.array(gatewayImageWarningSchema).optional(),
|
|
1794
1851
|
providerMetadata: z.record(z.string(), providerMetadataEntrySchema).optional(),
|
|
1795
1852
|
usage: gatewayImageUsageSchema.optional()
|
|
@@ -3415,7 +3472,7 @@ async function getVercelRequestId() {
|
|
|
3415
3472
|
}
|
|
3416
3473
|
|
|
3417
3474
|
// src/version.ts
|
|
3418
|
-
var VERSION = true ? "4.0.
|
|
3475
|
+
var VERSION = true ? "4.0.80" : "0.0.0-test";
|
|
3419
3476
|
|
|
3420
3477
|
// src/gateway-provider.ts
|
|
3421
3478
|
var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
|
|
@@ -3529,7 +3586,7 @@ function createGateway(options = {}) {
|
|
|
3529
3586
|
};
|
|
3530
3587
|
};
|
|
3531
3588
|
const createLanguageModel = (modelId) => {
|
|
3532
|
-
return new
|
|
3589
|
+
return new GatewayLanguageModel(modelId, {
|
|
3533
3590
|
provider: "gateway",
|
|
3534
3591
|
baseURL,
|
|
3535
3592
|
headers: getHeaders,
|
|
@@ -3537,6 +3594,13 @@ function createGateway(options = {}) {
|
|
|
3537
3594
|
o11yHeaders: createO11yHeaders()
|
|
3538
3595
|
});
|
|
3539
3596
|
};
|
|
3597
|
+
const createBatch = () => new GatewayBatch({
|
|
3598
|
+
provider: "gateway",
|
|
3599
|
+
baseURL,
|
|
3600
|
+
headers: getHeaders,
|
|
3601
|
+
fetch: options.fetch,
|
|
3602
|
+
o11yHeaders: createO11yHeaders()
|
|
3603
|
+
});
|
|
3540
3604
|
const getAvailableModels = async () => {
|
|
3541
3605
|
var _a13, _b13, _c;
|
|
3542
3606
|
const now = (_c = (_b13 = (_a13 = options._internal) == null ? void 0 : _a13.currentDate) == null ? void 0 : _b13.call(_a13).getTime()) != null ? _c : Date.now();
|
|
@@ -3617,6 +3681,7 @@ function createGateway(options = {}) {
|
|
|
3617
3681
|
});
|
|
3618
3682
|
};
|
|
3619
3683
|
provider.languageModel = createLanguageModel;
|
|
3684
|
+
provider.experimental_batch = createBatch;
|
|
3620
3685
|
const createEmbeddingModel = (modelId) => {
|
|
3621
3686
|
return new GatewayEmbeddingModel(modelId, {
|
|
3622
3687
|
provider: "gateway",
|