@alm-allen/dsh-multi-provider 0.0.0-stage → 0.90.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/CHANGELOG.md +70 -0
- package/LICENSE +21 -0
- package/README.md +229 -2
- package/cordis.patch.yml +6 -0
- package/icon.svg +28 -0
- package/lib/client.js +25708 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +93587 -0
- package/lib/types/client/CodexComposerQuota.d.ts +13 -0
- package/lib/types/client/CodexComposerQuota.d.ts.map +1 -0
- package/lib/types/client/CodexSubscriptionSection.d.ts +42 -0
- package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -0
- package/lib/types/client/ProviderHubSection.d.ts +21 -0
- package/lib/types/client/ProviderHubSection.d.ts.map +1 -0
- package/lib/types/client/api.d.ts +66 -0
- package/lib/types/client/api.d.ts.map +1 -0
- package/lib/types/client/claude/ClaudeComposerQuota.d.ts +29 -0
- package/lib/types/client/claude/ClaudeComposerQuota.d.ts.map +1 -0
- package/lib/types/client/claude/ClaudeSection.d.ts +12 -0
- package/lib/types/client/claude/ClaudeSection.d.ts.map +1 -0
- package/lib/types/client/claude/locales.d.ts +489 -0
- package/lib/types/client/claude/locales.d.ts.map +1 -0
- package/lib/types/client/claude/styles.d.ts +15 -0
- package/lib/types/client/claude/styles.d.ts.map +1 -0
- package/lib/types/client/claude/useClaudeSection.d.ts +106 -0
- package/lib/types/client/claude/useClaudeSection.d.ts.map +1 -0
- package/lib/types/client/claude-api/ClaudeApiSection.d.ts +5 -0
- package/lib/types/client/claude-api/ClaudeApiSection.d.ts.map +1 -0
- package/lib/types/client/claude-api/api.d.ts +23 -0
- package/lib/types/client/claude-api/api.d.ts.map +1 -0
- package/lib/types/client/claude-api/locales.d.ts +161 -0
- package/lib/types/client/claude-api/locales.d.ts.map +1 -0
- package/lib/types/client/claude-api/styles.d.ts +4 -0
- package/lib/types/client/claude-api/styles.d.ts.map +1 -0
- package/lib/types/client/claude-api/useClaudeApiSection.d.ts +37 -0
- package/lib/types/client/claude-api/useClaudeApiSection.d.ts.map +1 -0
- package/lib/types/client/cline-pass/ClinePassComposerQuota.d.ts +23 -0
- package/lib/types/client/cline-pass/ClinePassComposerQuota.d.ts.map +1 -0
- package/lib/types/client/cline-pass/ClinePassSection.d.ts +17 -0
- package/lib/types/client/cline-pass/ClinePassSection.d.ts.map +1 -0
- package/lib/types/client/cline-pass/api.d.ts +85 -0
- package/lib/types/client/cline-pass/api.d.ts.map +1 -0
- package/lib/types/client/cline-pass/locales.d.ts +911 -0
- package/lib/types/client/cline-pass/locales.d.ts.map +1 -0
- package/lib/types/client/cline-pass/styles.d.ts +7 -0
- package/lib/types/client/cline-pass/styles.d.ts.map +1 -0
- package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts +20 -0
- package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts.map +1 -0
- package/lib/types/client/command-code/CommandCodeSection.d.ts +8 -0
- package/lib/types/client/command-code/CommandCodeSection.d.ts.map +1 -0
- package/lib/types/client/command-code/locales.d.ts +305 -0
- package/lib/types/client/command-code/locales.d.ts.map +1 -0
- package/lib/types/client/common/AccountPoolSection.d.ts +104 -0
- package/lib/types/client/common/AccountPoolSection.d.ts.map +1 -0
- package/lib/types/client/common/ComposerQuotaBadge.d.ts +63 -0
- package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -0
- package/lib/types/client/common/ContextWindowEditor.d.ts +71 -0
- package/lib/types/client/common/ContextWindowEditor.d.ts.map +1 -0
- package/lib/types/client/common/LineProxySection.d.ts +78 -0
- package/lib/types/client/common/LineProxySection.d.ts.map +1 -0
- package/lib/types/client/common/ModelChecklist.d.ts +29 -0
- package/lib/types/client/common/ModelChecklist.d.ts.map +1 -0
- package/lib/types/client/common/account-pool-labels.d.ts +74 -0
- package/lib/types/client/common/account-pool-labels.d.ts.map +1 -0
- package/lib/types/client/common/account-quota.d.ts +60 -0
- package/lib/types/client/common/account-quota.d.ts.map +1 -0
- package/lib/types/client/common/format.d.ts +70 -0
- package/lib/types/client/common/format.d.ts.map +1 -0
- package/lib/types/client/common/host-locale-mirror.d.ts +24 -0
- package/lib/types/client/common/host-locale-mirror.d.ts.map +1 -0
- package/lib/types/client/common/line-api.d.ts +8 -0
- package/lib/types/client/common/line-api.d.ts.map +1 -0
- package/lib/types/client/common/line-locale.d.ts +21 -0
- package/lib/types/client/common/line-locale.d.ts.map +1 -0
- package/lib/types/client/common/model-checklist-styles.d.ts +2 -0
- package/lib/types/client/common/model-checklist-styles.d.ts.map +1 -0
- package/lib/types/client/common/plugin-style.d.ts +23 -0
- package/lib/types/client/common/plugin-style.d.ts.map +1 -0
- package/lib/types/client/common/quota-follow-up.d.ts +30 -0
- package/lib/types/client/common/quota-follow-up.d.ts.map +1 -0
- package/lib/types/client/common/styles.d.ts +11 -0
- package/lib/types/client/common/styles.d.ts.map +1 -0
- package/lib/types/client/common/use-store.d.ts +3 -0
- package/lib/types/client/common/use-store.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/GlmCodingPlanComposerQuota.d.ts +27 -0
- package/lib/types/client/glm-coding-plan/GlmCodingPlanComposerQuota.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/GlmCodingPlanSection.d.ts +22 -0
- package/lib/types/client/glm-coding-plan/GlmCodingPlanSection.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/api.d.ts +4 -0
- package/lib/types/client/glm-coding-plan/api.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/locales.d.ts +409 -0
- package/lib/types/client/glm-coding-plan/locales.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/styles.d.ts +16 -0
- package/lib/types/client/glm-coding-plan/styles.d.ts.map +1 -0
- package/lib/types/client/glm-coding-plan/useGlmCodingPlanSection.d.ts +65 -0
- package/lib/types/client/glm-coding-plan/useGlmCodingPlanSection.d.ts.map +1 -0
- package/lib/types/client/hub/HubOverview.d.ts +16 -0
- package/lib/types/client/hub/HubOverview.d.ts.map +1 -0
- package/lib/types/client/hub/brand-icons.d.ts +64 -0
- package/lib/types/client/hub/brand-icons.d.ts.map +1 -0
- package/lib/types/client/hub/brand-svg.d.ts +51 -0
- package/lib/types/client/hub/brand-svg.d.ts.map +1 -0
- package/lib/types/client/hub/hub-styles.d.ts +2 -0
- package/lib/types/client/hub/hub-styles.d.ts.map +1 -0
- package/lib/types/client/hub/providers.d.ts +55 -0
- package/lib/types/client/hub/providers.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +67 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts +21 -0
- package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts.map +1 -0
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts +8 -0
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -0
- package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts +16 -0
- package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts.map +1 -0
- package/lib/types/client/kimi-code/KimiQuotaCard.d.ts +31 -0
- package/lib/types/client/kimi-code/KimiQuotaCard.d.ts.map +1 -0
- package/lib/types/client/kimi-code/labels.d.ts +66 -0
- package/lib/types/client/kimi-code/labels.d.ts.map +1 -0
- package/lib/types/client/kimi-code/locales.d.ts +640 -0
- package/lib/types/client/kimi-code/locales.d.ts.map +1 -0
- package/lib/types/client/kimi-code/staff-art.d.ts +19 -0
- package/lib/types/client/kimi-code/staff-art.d.ts.map +1 -0
- package/lib/types/client/kimi-code/styles.d.ts +4 -0
- package/lib/types/client/kimi-code/styles.d.ts.map +1 -0
- package/lib/types/client/locales-ru/account-pool.d.ts +11 -0
- package/lib/types/client/locales-ru/account-pool.d.ts.map +1 -0
- package/lib/types/client/locales-ru/claude-api.d.ts +3 -0
- package/lib/types/client/locales-ru/claude-api.d.ts.map +1 -0
- package/lib/types/client/locales-ru/claude.d.ts +3 -0
- package/lib/types/client/locales-ru/claude.d.ts.map +1 -0
- package/lib/types/client/locales-ru/cline-pass.d.ts +11 -0
- package/lib/types/client/locales-ru/cline-pass.d.ts.map +1 -0
- package/lib/types/client/locales-ru/command-code.d.ts +9 -0
- package/lib/types/client/locales-ru/command-code.d.ts.map +1 -0
- package/lib/types/client/locales-ru/glm-coding-plan.d.ts +10 -0
- package/lib/types/client/locales-ru/glm-coding-plan.d.ts.map +1 -0
- package/lib/types/client/locales-ru/hub.d.ts +3 -0
- package/lib/types/client/locales-ru/hub.d.ts.map +1 -0
- package/lib/types/client/locales-ru/index.d.ts +26 -0
- package/lib/types/client/locales-ru/index.d.ts.map +1 -0
- package/lib/types/client/locales-ru/kimi-code.d.ts +10 -0
- package/lib/types/client/locales-ru/kimi-code.d.ts.map +1 -0
- package/lib/types/client/locales-ru/minimax-code.d.ts +9 -0
- package/lib/types/client/locales-ru/minimax-code.d.ts.map +1 -0
- package/lib/types/client/locales-ru/ollama.d.ts +10 -0
- package/lib/types/client/locales-ru/ollama.d.ts.map +1 -0
- package/lib/types/client/locales-ru/opencode-go.d.ts +3 -0
- package/lib/types/client/locales-ru/opencode-go.d.ts.map +1 -0
- package/lib/types/client/locales-ru/opendesign.d.ts +10 -0
- package/lib/types/client/locales-ru/opendesign.d.ts.map +1 -0
- package/lib/types/client/locales-ru/qianwen-token-plan.d.ts +3 -0
- package/lib/types/client/locales-ru/qianwen-token-plan.d.ts.map +1 -0
- package/lib/types/client/locales-ru/qoder.d.ts +11 -0
- package/lib/types/client/locales-ru/qoder.d.ts.map +1 -0
- package/lib/types/client/locales-ru/relayone.d.ts +3 -0
- package/lib/types/client/locales-ru/relayone.d.ts.map +1 -0
- package/lib/types/client/locales-ru/step-code.d.ts +9 -0
- package/lib/types/client/locales-ru/step-code.d.ts.map +1 -0
- package/lib/types/client/locales-ru/workbuddy.d.ts +10 -0
- package/lib/types/client/locales-ru/workbuddy.d.ts.map +1 -0
- package/lib/types/client/locales.d.ts +497 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/minimax-code/MinimaxCodeComposerQuota.d.ts +23 -0
- package/lib/types/client/minimax-code/MinimaxCodeComposerQuota.d.ts.map +1 -0
- package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts +23 -0
- package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts.map +1 -0
- package/lib/types/client/minimax-code/api.d.ts +35 -0
- package/lib/types/client/minimax-code/api.d.ts.map +1 -0
- package/lib/types/client/minimax-code/commands-contract.d.ts +46 -0
- package/lib/types/client/minimax-code/commands-contract.d.ts.map +1 -0
- package/lib/types/client/minimax-code/locales.d.ts +422 -0
- package/lib/types/client/minimax-code/locales.d.ts.map +1 -0
- package/lib/types/client/minimax-code/styles.d.ts +12 -0
- package/lib/types/client/minimax-code/styles.d.ts.map +1 -0
- package/lib/types/client/minimax-code/useMinimaxCodeSection.d.ts +164 -0
- package/lib/types/client/minimax-code/useMinimaxCodeSection.d.ts.map +1 -0
- package/lib/types/client/ollama/OllamaSection.d.ts +25 -0
- package/lib/types/client/ollama/OllamaSection.d.ts.map +1 -0
- package/lib/types/client/ollama/api.d.ts +49 -0
- package/lib/types/client/ollama/api.d.ts.map +1 -0
- package/lib/types/client/ollama/locales.d.ts +479 -0
- package/lib/types/client/ollama/locales.d.ts.map +1 -0
- package/lib/types/client/opencode-go/OpenCodeGoQuotaCard.d.ts +20 -0
- package/lib/types/client/opencode-go/OpenCodeGoQuotaCard.d.ts.map +1 -0
- package/lib/types/client/opencode-go/OpenCodeGoSection.d.ts +8 -0
- package/lib/types/client/opencode-go/OpenCodeGoSection.d.ts.map +1 -0
- package/lib/types/client/opencode-go/locales.d.ts +210 -0
- package/lib/types/client/opencode-go/locales.d.ts.map +1 -0
- package/lib/types/client/opencode-go/styles.d.ts +10 -0
- package/lib/types/client/opencode-go/styles.d.ts.map +1 -0
- package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts +26 -0
- package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts.map +1 -0
- package/lib/types/client/opendesign/OpenDesignSection.d.ts +19 -0
- package/lib/types/client/opendesign/OpenDesignSection.d.ts.map +1 -0
- package/lib/types/client/opendesign/api.d.ts +45 -0
- package/lib/types/client/opendesign/api.d.ts.map +1 -0
- package/lib/types/client/opendesign/locales.d.ts +815 -0
- package/lib/types/client/opendesign/locales.d.ts.map +1 -0
- package/lib/types/client/opendesign/styles.d.ts +16 -0
- package/lib/types/client/opendesign/styles.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/QianwenComposerQuota.d.ts +14 -0
- package/lib/types/client/qianwen-token-plan/QianwenComposerQuota.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/QianwenTokenPlanSection.d.ts +4 -0
- package/lib/types/client/qianwen-token-plan/QianwenTokenPlanSection.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/api.d.ts +5 -0
- package/lib/types/client/qianwen-token-plan/api.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/locales.d.ts +158 -0
- package/lib/types/client/qianwen-token-plan/locales.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/styles.d.ts +3 -0
- package/lib/types/client/qianwen-token-plan/styles.d.ts.map +1 -0
- package/lib/types/client/qianwen-token-plan/useQianwenSection.d.ts +32 -0
- package/lib/types/client/qianwen-token-plan/useQianwenSection.d.ts.map +1 -0
- package/lib/types/client/qoder/QoderComposerQuota.d.ts +41 -0
- package/lib/types/client/qoder/QoderComposerQuota.d.ts.map +1 -0
- package/lib/types/client/qoder/QoderSection.d.ts +37 -0
- package/lib/types/client/qoder/QoderSection.d.ts.map +1 -0
- package/lib/types/client/qoder/api.d.ts +4 -0
- package/lib/types/client/qoder/api.d.ts.map +1 -0
- package/lib/types/client/qoder/locales.d.ts +322 -0
- package/lib/types/client/qoder/locales.d.ts.map +1 -0
- package/lib/types/client/qoder/styles.d.ts +16 -0
- package/lib/types/client/qoder/styles.d.ts.map +1 -0
- package/lib/types/client/qoder/useQoderSection.d.ts +97 -0
- package/lib/types/client/qoder/useQoderSection.d.ts.map +1 -0
- package/lib/types/client/quota.d.ts +9 -0
- package/lib/types/client/quota.d.ts.map +1 -0
- package/lib/types/client/relayone/RelayOneComposerQuota.d.ts +14 -0
- package/lib/types/client/relayone/RelayOneComposerQuota.d.ts.map +1 -0
- package/lib/types/client/relayone/RelayOneSection.d.ts +4 -0
- package/lib/types/client/relayone/RelayOneSection.d.ts.map +1 -0
- package/lib/types/client/relayone/api.d.ts +5 -0
- package/lib/types/client/relayone/api.d.ts.map +1 -0
- package/lib/types/client/relayone/locales.d.ts +221 -0
- package/lib/types/client/relayone/locales.d.ts.map +1 -0
- package/lib/types/client/relayone/quota-format.d.ts +6 -0
- package/lib/types/client/relayone/quota-format.d.ts.map +1 -0
- package/lib/types/client/relayone/styles.d.ts +3 -0
- package/lib/types/client/relayone/styles.d.ts.map +1 -0
- package/lib/types/client/relayone/useRelayOneSection.d.ts +32 -0
- package/lib/types/client/relayone/useRelayOneSection.d.ts.map +1 -0
- package/lib/types/client/step-code/StepCodeComposerQuota.d.ts +50 -0
- package/lib/types/client/step-code/StepCodeComposerQuota.d.ts.map +1 -0
- package/lib/types/client/step-code/StepCodeSection.d.ts +28 -0
- package/lib/types/client/step-code/StepCodeSection.d.ts.map +1 -0
- package/lib/types/client/step-code/api.d.ts +4 -0
- package/lib/types/client/step-code/api.d.ts.map +1 -0
- package/lib/types/client/step-code/locales.d.ts +657 -0
- package/lib/types/client/step-code/locales.d.ts.map +1 -0
- package/lib/types/client/step-code/styles.d.ts +28 -0
- package/lib/types/client/step-code/styles.d.ts.map +1 -0
- package/lib/types/client/step-code/useStepCodeSection.d.ts +122 -0
- package/lib/types/client/step-code/useStepCodeSection.d.ts.map +1 -0
- package/lib/types/client/store.d.ts +19 -0
- package/lib/types/client/store.d.ts.map +1 -0
- package/lib/types/client/styles.d.ts +26 -0
- package/lib/types/client/styles.d.ts.map +1 -0
- package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts +34 -0
- package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts.map +1 -0
- package/lib/types/client/workbuddy/WorkBuddySection.d.ts +91 -0
- package/lib/types/client/workbuddy/WorkBuddySection.d.ts.map +1 -0
- package/lib/types/client/workbuddy/locales.d.ts +768 -0
- package/lib/types/client/workbuddy/locales.d.ts.map +1 -0
- package/lib/types/client/workbuddy/styles.d.ts +21 -0
- package/lib/types/client/workbuddy/styles.d.ts.map +1 -0
- package/lib/types/client/workbuddy/useWorkBuddySection.d.ts +149 -0
- package/lib/types/client/workbuddy/useWorkBuddySection.d.ts.map +1 -0
- package/lib/types/compat.d.ts +139 -0
- package/lib/types/compat.d.ts.map +1 -0
- package/lib/types/host/adapter.d.ts +43 -0
- package/lib/types/host/adapter.d.ts.map +1 -0
- package/lib/types/host/callback-server.d.ts +22 -0
- package/lib/types/host/callback-server.d.ts.map +1 -0
- package/lib/types/host/claude/account-pool.d.ts +583 -0
- package/lib/types/host/claude/account-pool.d.ts.map +1 -0
- package/lib/types/host/claude/adapter.d.ts +424 -0
- package/lib/types/host/claude/adapter.d.ts.map +1 -0
- package/lib/types/host/claude/adopt.d.ts +292 -0
- package/lib/types/host/claude/adopt.d.ts.map +1 -0
- package/lib/types/host/claude/client.d.ts +579 -0
- package/lib/types/host/claude/client.d.ts.map +1 -0
- package/lib/types/host/claude/mapper.d.ts +802 -0
- package/lib/types/host/claude/mapper.d.ts.map +1 -0
- package/lib/types/host/claude/model-catalog.d.ts +560 -0
- package/lib/types/host/claude/model-catalog.d.ts.map +1 -0
- package/lib/types/host/claude/oauth.d.ts +419 -0
- package/lib/types/host/claude/oauth.d.ts.map +1 -0
- package/lib/types/host/claude/routes.d.ts +131 -0
- package/lib/types/host/claude/routes.d.ts.map +1 -0
- package/lib/types/host/claude/token-store.d.ts +347 -0
- package/lib/types/host/claude/token-store.d.ts.map +1 -0
- package/lib/types/host/claude/types.d.ts +417 -0
- package/lib/types/host/claude/types.d.ts.map +1 -0
- package/lib/types/host/claude-api/adapter.d.ts +70 -0
- package/lib/types/host/claude-api/adapter.d.ts.map +1 -0
- package/lib/types/host/claude-api/capability-memory.d.ts +4 -0
- package/lib/types/host/claude-api/capability-memory.d.ts.map +1 -0
- package/lib/types/host/claude-api/catalog-manager.d.ts +57 -0
- package/lib/types/host/claude-api/catalog-manager.d.ts.map +1 -0
- package/lib/types/host/claude-api/client-version.d.ts +4 -0
- package/lib/types/host/claude-api/client-version.d.ts.map +1 -0
- package/lib/types/host/claude-api/client.d.ts +55 -0
- package/lib/types/host/claude-api/client.d.ts.map +1 -0
- package/lib/types/host/claude-api/compaction-instruction.d.ts +23 -0
- package/lib/types/host/claude-api/compaction-instruction.d.ts.map +1 -0
- package/lib/types/host/claude-api/compaction-store.d.ts +62 -0
- package/lib/types/host/claude-api/compaction-store.d.ts.map +1 -0
- package/lib/types/host/claude-api/compaction.d.ts +47 -0
- package/lib/types/host/claude-api/compaction.d.ts.map +1 -0
- package/lib/types/host/claude-api/mapper.d.ts +61 -0
- package/lib/types/host/claude-api/mapper.d.ts.map +1 -0
- package/lib/types/host/claude-api/model-catalog.d.ts +76 -0
- package/lib/types/host/claude-api/model-catalog.d.ts.map +1 -0
- package/lib/types/host/claude-api/routes.d.ts +22 -0
- package/lib/types/host/claude-api/routes.d.ts.map +1 -0
- package/lib/types/host/claude-api/stream.d.ts +88 -0
- package/lib/types/host/claude-api/stream.d.ts.map +1 -0
- package/lib/types/host/claude-api/token-store.d.ts +60 -0
- package/lib/types/host/claude-api/token-store.d.ts.map +1 -0
- package/lib/types/host/claude-api/types.d.ts +68 -0
- package/lib/types/host/claude-api/types.d.ts.map +1 -0
- package/lib/types/host/cline-pass/account-pool.d.ts +63 -0
- package/lib/types/host/cline-pass/account-pool.d.ts.map +1 -0
- package/lib/types/host/cline-pass/adapter.d.ts +60 -0
- package/lib/types/host/cline-pass/adapter.d.ts.map +1 -0
- package/lib/types/host/cline-pass/catalog.d.ts +49 -0
- package/lib/types/host/cline-pass/catalog.d.ts.map +1 -0
- package/lib/types/host/cline-pass/client.d.ts +109 -0
- package/lib/types/host/cline-pass/client.d.ts.map +1 -0
- package/lib/types/host/cline-pass/engine.d.ts +93 -0
- package/lib/types/host/cline-pass/engine.d.ts.map +1 -0
- package/lib/types/host/cline-pass/line.d.ts +55 -0
- package/lib/types/host/cline-pass/line.d.ts.map +1 -0
- package/lib/types/host/cline-pass/mapper.d.ts +138 -0
- package/lib/types/host/cline-pass/mapper.d.ts.map +1 -0
- package/lib/types/host/cline-pass/oauth.d.ts +134 -0
- package/lib/types/host/cline-pass/oauth.d.ts.map +1 -0
- package/lib/types/host/cline-pass/protocol.d.ts +44 -0
- package/lib/types/host/cline-pass/protocol.d.ts.map +1 -0
- package/lib/types/host/cline-pass/routes.d.ts +92 -0
- package/lib/types/host/cline-pass/routes.d.ts.map +1 -0
- package/lib/types/host/cline-pass/store.d.ts +75 -0
- package/lib/types/host/cline-pass/store.d.ts.map +1 -0
- package/lib/types/host/cline-pass/token-store.d.ts +170 -0
- package/lib/types/host/cline-pass/token-store.d.ts.map +1 -0
- package/lib/types/host/cline-pass/tools.d.ts +21 -0
- package/lib/types/host/cline-pass/tools.d.ts.map +1 -0
- package/lib/types/host/cline-pass/types.d.ts +127 -0
- package/lib/types/host/cline-pass/types.d.ts.map +1 -0
- package/lib/types/host/codex-account-pool.d.ts +223 -0
- package/lib/types/host/codex-account-pool.d.ts.map +1 -0
- package/lib/types/host/codex-adopt.d.ts +255 -0
- package/lib/types/host/codex-adopt.d.ts.map +1 -0
- package/lib/types/host/codex-catalog.d.ts +69 -0
- package/lib/types/host/codex-catalog.d.ts.map +1 -0
- package/lib/types/host/codex-fetch.d.ts +17 -0
- package/lib/types/host/codex-fetch.d.ts.map +1 -0
- package/lib/types/host/codex-file-import.d.ts +35 -0
- package/lib/types/host/codex-file-import.d.ts.map +1 -0
- package/lib/types/host/codex-identity.d.ts +132 -0
- package/lib/types/host/codex-identity.d.ts.map +1 -0
- package/lib/types/host/codex-remote-compaction.d.ts +41 -0
- package/lib/types/host/codex-remote-compaction.d.ts.map +1 -0
- package/lib/types/host/codex-search.d.ts +11 -0
- package/lib/types/host/codex-search.d.ts.map +1 -0
- package/lib/types/host/command-code/account-pool.d.ts +72 -0
- package/lib/types/host/command-code/account-pool.d.ts.map +1 -0
- package/lib/types/host/command-code/adapter.d.ts +89 -0
- package/lib/types/host/command-code/adapter.d.ts.map +1 -0
- package/lib/types/host/command-code/client.d.ts +126 -0
- package/lib/types/host/command-code/client.d.ts.map +1 -0
- package/lib/types/host/command-code/mapper.d.ts +199 -0
- package/lib/types/host/command-code/mapper.d.ts.map +1 -0
- package/lib/types/host/command-code/model-catalog.d.ts +90 -0
- package/lib/types/host/command-code/model-catalog.d.ts.map +1 -0
- package/lib/types/host/command-code/oauth.d.ts +95 -0
- package/lib/types/host/command-code/oauth.d.ts.map +1 -0
- package/lib/types/host/command-code/plans.d.ts +40 -0
- package/lib/types/host/command-code/plans.d.ts.map +1 -0
- package/lib/types/host/command-code/routes.d.ts +44 -0
- package/lib/types/host/command-code/routes.d.ts.map +1 -0
- package/lib/types/host/command-code/token-store.d.ts +100 -0
- package/lib/types/host/command-code/token-store.d.ts.map +1 -0
- package/lib/types/host/command-code/types.d.ts +222 -0
- package/lib/types/host/command-code/types.d.ts.map +1 -0
- package/lib/types/host/common/account-pool.d.ts +584 -0
- package/lib/types/host/common/account-pool.d.ts.map +1 -0
- package/lib/types/host/common/account-quota.d.ts +44 -0
- package/lib/types/host/common/account-quota.d.ts.map +1 -0
- package/lib/types/host/common/brand-compat.d.ts +4 -0
- package/lib/types/host/common/brand-compat.d.ts.map +1 -0
- package/lib/types/host/common/cache-activity.d.ts +16 -0
- package/lib/types/host/common/cache-activity.d.ts.map +1 -0
- package/lib/types/host/common/cache-affinity.d.ts +23 -0
- package/lib/types/host/common/cache-affinity.d.ts.map +1 -0
- package/lib/types/host/common/cache-hint.d.ts +18 -0
- package/lib/types/host/common/cache-hint.d.ts.map +1 -0
- package/lib/types/host/common/capabilities.d.ts +100 -0
- package/lib/types/host/common/capabilities.d.ts.map +1 -0
- package/lib/types/host/common/catalog-snapshot.d.ts +80 -0
- package/lib/types/host/common/catalog-snapshot.d.ts.map +1 -0
- package/lib/types/host/common/claude-capability-memory.d.ts +51 -0
- package/lib/types/host/common/claude-capability-memory.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-cch.d.ts +28 -0
- package/lib/types/host/common/claude-code-cch.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-corrections.d.ts +6 -0
- package/lib/types/host/common/claude-code-corrections.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-first-party.d.ts +68 -0
- package/lib/types/host/common/claude-code-first-party.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-version.d.ts +90 -0
- package/lib/types/host/common/claude-code-version.d.ts.map +1 -0
- package/lib/types/host/common/concurrency-gate.d.ts +46 -0
- package/lib/types/host/common/concurrency-gate.d.ts.map +1 -0
- package/lib/types/host/common/context-budget-fetch.d.ts +7 -0
- package/lib/types/host/common/context-budget-fetch.d.ts.map +1 -0
- package/lib/types/host/common/context-overflow.d.ts +7 -0
- package/lib/types/host/common/context-overflow.d.ts.map +1 -0
- package/lib/types/host/common/context-window-overrides.d.ts +12 -0
- package/lib/types/host/common/context-window-overrides.d.ts.map +1 -0
- package/lib/types/host/common/credential-read-cache.d.ts +82 -0
- package/lib/types/host/common/credential-read-cache.d.ts.map +1 -0
- package/lib/types/host/common/credentials-compat.d.ts +73 -0
- package/lib/types/host/common/credentials-compat.d.ts.map +1 -0
- package/lib/types/host/common/failure-classification.d.ts +21 -0
- package/lib/types/host/common/failure-classification.d.ts.map +1 -0
- package/lib/types/host/common/file-preferences.d.ts +49 -0
- package/lib/types/host/common/file-preferences.d.ts.map +1 -0
- package/lib/types/host/common/gpt-engineering-guidance.d.ts +16 -0
- package/lib/types/host/common/gpt-engineering-guidance.d.ts.map +1 -0
- package/lib/types/host/common/home.d.ts +8 -0
- package/lib/types/host/common/home.d.ts.map +1 -0
- package/lib/types/host/common/hosted-media.d.ts +36 -0
- package/lib/types/host/common/hosted-media.d.ts.map +1 -0
- package/lib/types/host/common/i18n/en.d.ts +9 -0
- package/lib/types/host/common/i18n/en.d.ts.map +1 -0
- package/lib/types/host/common/i18n/index.d.ts +13 -0
- package/lib/types/host/common/i18n/index.d.ts.map +1 -0
- package/lib/types/host/common/i18n/provider-name.d.ts +10 -0
- package/lib/types/host/common/i18n/provider-name.d.ts.map +1 -0
- package/lib/types/host/common/i18n/ru.d.ts +10 -0
- package/lib/types/host/common/i18n/ru.d.ts.map +1 -0
- package/lib/types/host/common/i18n/runtime.d.ts +54 -0
- package/lib/types/host/common/i18n/runtime.d.ts.map +1 -0
- package/lib/types/host/common/i18n/t.d.ts +38 -0
- package/lib/types/host/common/i18n/t.d.ts.map +1 -0
- package/lib/types/host/common/i18n/zh.d.ts +172 -0
- package/lib/types/host/common/i18n/zh.d.ts.map +1 -0
- package/lib/types/host/common/idle-watchdog.d.ts +58 -0
- package/lib/types/host/common/idle-watchdog.d.ts.map +1 -0
- package/lib/types/host/common/legacy-preferences.d.ts +29 -0
- package/lib/types/host/common/legacy-preferences.d.ts.map +1 -0
- package/lib/types/host/common/llm-compat.d.ts +157 -0
- package/lib/types/host/common/llm-compat.d.ts.map +1 -0
- package/lib/types/host/common/model-request-control.d.ts +21 -0
- package/lib/types/host/common/model-request-control.d.ts.map +1 -0
- package/lib/types/host/common/orphan-tool-calls.d.ts +47 -0
- package/lib/types/host/common/orphan-tool-calls.d.ts.map +1 -0
- package/lib/types/host/common/output-reservation.d.ts +11 -0
- package/lib/types/host/common/output-reservation.d.ts.map +1 -0
- package/lib/types/host/common/pool-storage-settings.d.ts +41 -0
- package/lib/types/host/common/pool-storage-settings.d.ts.map +1 -0
- package/lib/types/host/common/pool-storage.d.ts +143 -0
- package/lib/types/host/common/pool-storage.d.ts.map +1 -0
- package/lib/types/host/common/prefix-request-coordinator.d.ts +46 -0
- package/lib/types/host/common/prefix-request-coordinator.d.ts.map +1 -0
- package/lib/types/host/common/prefix-stability.d.ts +24 -0
- package/lib/types/host/common/prefix-stability.d.ts.map +1 -0
- package/lib/types/host/common/prompt-cache-policy.d.ts +47 -0
- package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -0
- package/lib/types/host/common/prompt-estimate.d.ts +22 -0
- package/lib/types/host/common/prompt-estimate.d.ts.map +1 -0
- package/lib/types/host/common/provider-route.d.ts +56 -0
- package/lib/types/host/common/provider-route.d.ts.map +1 -0
- package/lib/types/host/common/quota-refresh.d.ts +35 -0
- package/lib/types/host/common/quota-refresh.d.ts.map +1 -0
- package/lib/types/host/common/reasoning-dialect.d.ts +24 -0
- package/lib/types/host/common/reasoning-dialect.d.ts.map +1 -0
- package/lib/types/host/common/reasoning-efforts.d.ts +2 -0
- package/lib/types/host/common/reasoning-efforts.d.ts.map +1 -0
- package/lib/types/host/common/request-diagnostics.d.ts +79 -0
- package/lib/types/host/common/request-diagnostics.d.ts.map +1 -0
- package/lib/types/host/common/request-images.d.ts +275 -0
- package/lib/types/host/common/request-images.d.ts.map +1 -0
- package/lib/types/host/common/same-origin.d.ts +30 -0
- package/lib/types/host/common/same-origin.d.ts.map +1 -0
- package/lib/types/host/common/session-cache-state.d.ts +29 -0
- package/lib/types/host/common/session-cache-state.d.ts.map +1 -0
- package/lib/types/host/common/session-effort-memory.d.ts +35 -0
- package/lib/types/host/common/session-effort-memory.d.ts.map +1 -0
- package/lib/types/host/common/settings-compat.d.ts +55 -0
- package/lib/types/host/common/settings-compat.d.ts.map +1 -0
- package/lib/types/host/common/sticky-image-budget.d.ts +10 -0
- package/lib/types/host/common/sticky-image-budget.d.ts.map +1 -0
- package/lib/types/host/common/stream-error.d.ts +93 -0
- package/lib/types/host/common/stream-error.d.ts.map +1 -0
- package/lib/types/host/common/tool-schema.d.ts +27 -0
- package/lib/types/host/common/tool-schema.d.ts.map +1 -0
- package/lib/types/host/common/video-request.d.ts +81 -0
- package/lib/types/host/common/video-request.d.ts.map +1 -0
- package/lib/types/host/common/video.d.ts +90 -0
- package/lib/types/host/common/video.d.ts.map +1 -0
- package/lib/types/host/common/webserver-compat.d.ts +7 -0
- package/lib/types/host/common/webserver-compat.d.ts.map +1 -0
- package/lib/types/host/credential-store-secret-service.d.ts +66 -0
- package/lib/types/host/credential-store-secret-service.d.ts.map +1 -0
- package/lib/types/host/fetch-address-policy.d.ts +79 -0
- package/lib/types/host/fetch-address-policy.d.ts.map +1 -0
- package/lib/types/host/fetch-configuration.d.ts +6 -0
- package/lib/types/host/fetch-configuration.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/account-pool.d.ts +152 -0
- package/lib/types/host/glm-coding-plan/account-pool.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/adapter.d.ts +169 -0
- package/lib/types/host/glm-coding-plan/adapter.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/adopt.d.ts +354 -0
- package/lib/types/host/glm-coding-plan/adopt.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/biz-token-cache.d.ts +99 -0
- package/lib/types/host/glm-coding-plan/biz-token-cache.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/client.d.ts +218 -0
- package/lib/types/host/glm-coding-plan/client.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/exchange.d.ts +223 -0
- package/lib/types/host/glm-coding-plan/exchange.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/mapper-anthropic.d.ts +312 -0
- package/lib/types/host/glm-coding-plan/mapper-anthropic.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/mapper-openai.d.ts +213 -0
- package/lib/types/host/glm-coding-plan/mapper-openai.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/model-catalog.d.ts +241 -0
- package/lib/types/host/glm-coding-plan/model-catalog.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/oauth.d.ts +211 -0
- package/lib/types/host/glm-coding-plan/oauth.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/routes.d.ts +93 -0
- package/lib/types/host/glm-coding-plan/routes.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/token-store.d.ts +202 -0
- package/lib/types/host/glm-coding-plan/token-store.d.ts.map +1 -0
- package/lib/types/host/glm-coding-plan/types.d.ts +492 -0
- package/lib/types/host/glm-coding-plan/types.d.ts.map +1 -0
- package/lib/types/host/hub-overview.d.ts +32 -0
- package/lib/types/host/hub-overview.d.ts.map +1 -0
- package/lib/types/host/kimi-code/account-pool.d.ts +124 -0
- package/lib/types/host/kimi-code/account-pool.d.ts.map +1 -0
- package/lib/types/host/kimi-code/adapter.d.ts +451 -0
- package/lib/types/host/kimi-code/adapter.d.ts.map +1 -0
- package/lib/types/host/kimi-code/api-key.d.ts +55 -0
- package/lib/types/host/kimi-code/api-key.d.ts.map +1 -0
- package/lib/types/host/kimi-code/cache-affinity.d.ts +112 -0
- package/lib/types/host/kimi-code/cache-affinity.d.ts.map +1 -0
- package/lib/types/host/kimi-code/cache-hint.d.ts +65 -0
- package/lib/types/host/kimi-code/cache-hint.d.ts.map +1 -0
- package/lib/types/host/kimi-code/client.d.ts +306 -0
- package/lib/types/host/kimi-code/client.d.ts.map +1 -0
- package/lib/types/host/kimi-code/mapper.d.ts +913 -0
- package/lib/types/host/kimi-code/mapper.d.ts.map +1 -0
- package/lib/types/host/kimi-code/media-files.d.ts +206 -0
- package/lib/types/host/kimi-code/media-files.d.ts.map +1 -0
- package/lib/types/host/kimi-code/modalities.d.ts +23 -0
- package/lib/types/host/kimi-code/modalities.d.ts.map +1 -0
- package/lib/types/host/kimi-code/model-catalog.d.ts +125 -0
- package/lib/types/host/kimi-code/model-catalog.d.ts.map +1 -0
- package/lib/types/host/kimi-code/oauth.d.ts +213 -0
- package/lib/types/host/kimi-code/oauth.d.ts.map +1 -0
- package/lib/types/host/kimi-code/routes.d.ts +52 -0
- package/lib/types/host/kimi-code/routes.d.ts.map +1 -0
- package/lib/types/host/kimi-code/session-cache-state.d.ts +156 -0
- package/lib/types/host/kimi-code/session-cache-state.d.ts.map +1 -0
- package/lib/types/host/kimi-code/token-store.d.ts +182 -0
- package/lib/types/host/kimi-code/token-store.d.ts.map +1 -0
- package/lib/types/host/kimi-code/tool-argument-guard.d.ts +43 -0
- package/lib/types/host/kimi-code/tool-argument-guard.d.ts.map +1 -0
- package/lib/types/host/kimi-code/types.d.ts +458 -0
- package/lib/types/host/kimi-code/types.d.ts.map +1 -0
- package/lib/types/host/kimi-code/warmup-streak.d.ts +66 -0
- package/lib/types/host/kimi-code/warmup-streak.d.ts.map +1 -0
- package/lib/types/host/minimax-code/account-pool.d.ts +309 -0
- package/lib/types/host/minimax-code/account-pool.d.ts.map +1 -0
- package/lib/types/host/minimax-code/adapter.d.ts +207 -0
- package/lib/types/host/minimax-code/adapter.d.ts.map +1 -0
- package/lib/types/host/minimax-code/checkin-gateway.d.ts +145 -0
- package/lib/types/host/minimax-code/checkin-gateway.d.ts.map +1 -0
- package/lib/types/host/minimax-code/checkin.d.ts +207 -0
- package/lib/types/host/minimax-code/checkin.d.ts.map +1 -0
- package/lib/types/host/minimax-code/client.d.ts +242 -0
- package/lib/types/host/minimax-code/client.d.ts.map +1 -0
- package/lib/types/host/minimax-code/files-api.d.ts +117 -0
- package/lib/types/host/minimax-code/files-api.d.ts.map +1 -0
- package/lib/types/host/minimax-code/iso-bmff-duration.d.ts +84 -0
- package/lib/types/host/minimax-code/iso-bmff-duration.d.ts.map +1 -0
- package/lib/types/host/minimax-code/mapper.d.ts +351 -0
- package/lib/types/host/minimax-code/mapper.d.ts.map +1 -0
- package/lib/types/host/minimax-code/matrix-client.d.ts +168 -0
- package/lib/types/host/minimax-code/matrix-client.d.ts.map +1 -0
- package/lib/types/host/minimax-code/modalities.d.ts +20 -0
- package/lib/types/host/minimax-code/modalities.d.ts.map +1 -0
- package/lib/types/host/minimax-code/model-catalog.d.ts +227 -0
- package/lib/types/host/minimax-code/model-catalog.d.ts.map +1 -0
- package/lib/types/host/minimax-code/oauth.d.ts +220 -0
- package/lib/types/host/minimax-code/oauth.d.ts.map +1 -0
- package/lib/types/host/minimax-code/reset-card.d.ts +136 -0
- package/lib/types/host/minimax-code/reset-card.d.ts.map +1 -0
- package/lib/types/host/minimax-code/routes.d.ts +82 -0
- package/lib/types/host/minimax-code/routes.d.ts.map +1 -0
- package/lib/types/host/minimax-code/token-store.d.ts +328 -0
- package/lib/types/host/minimax-code/token-store.d.ts.map +1 -0
- package/lib/types/host/minimax-code/tool-argument-repair.d.ts +72 -0
- package/lib/types/host/minimax-code/tool-argument-repair.d.ts.map +1 -0
- package/lib/types/host/minimax-code/types.d.ts +378 -0
- package/lib/types/host/minimax-code/types.d.ts.map +1 -0
- package/lib/types/host/model-catalog.d.ts +43 -0
- package/lib/types/host/model-catalog.d.ts.map +1 -0
- package/lib/types/host/oauth-service.d.ts +242 -0
- package/lib/types/host/oauth-service.d.ts.map +1 -0
- package/lib/types/host/ollama/account-pool.d.ts +65 -0
- package/lib/types/host/ollama/account-pool.d.ts.map +1 -0
- package/lib/types/host/ollama/adapter.d.ts +90 -0
- package/lib/types/host/ollama/adapter.d.ts.map +1 -0
- package/lib/types/host/ollama/client.d.ts +166 -0
- package/lib/types/host/ollama/client.d.ts.map +1 -0
- package/lib/types/host/ollama/mapper.d.ts +49 -0
- package/lib/types/host/ollama/mapper.d.ts.map +1 -0
- package/lib/types/host/ollama/routes.d.ts +22 -0
- package/lib/types/host/ollama/routes.d.ts.map +1 -0
- package/lib/types/host/ollama/token-store.d.ts +78 -0
- package/lib/types/host/ollama/token-store.d.ts.map +1 -0
- package/lib/types/host/ollama/types.d.ts +247 -0
- package/lib/types/host/ollama/types.d.ts.map +1 -0
- package/lib/types/host/opencode-go/account-pool.d.ts +50 -0
- package/lib/types/host/opencode-go/account-pool.d.ts.map +1 -0
- package/lib/types/host/opencode-go/adapter.d.ts +38 -0
- package/lib/types/host/opencode-go/adapter.d.ts.map +1 -0
- package/lib/types/host/opencode-go/client.d.ts +13 -0
- package/lib/types/host/opencode-go/client.d.ts.map +1 -0
- package/lib/types/host/opencode-go/mapper-gemini.d.ts +13 -0
- package/lib/types/host/opencode-go/mapper-gemini.d.ts.map +1 -0
- package/lib/types/host/opencode-go/mapper-messages.d.ts +8 -0
- package/lib/types/host/opencode-go/mapper-messages.d.ts.map +1 -0
- package/lib/types/host/opencode-go/mapper-responses.d.ts +9 -0
- package/lib/types/host/opencode-go/mapper-responses.d.ts.map +1 -0
- package/lib/types/host/opencode-go/mapper.d.ts +38 -0
- package/lib/types/host/opencode-go/mapper.d.ts.map +1 -0
- package/lib/types/host/opencode-go/model-catalog.d.ts +57 -0
- package/lib/types/host/opencode-go/model-catalog.d.ts.map +1 -0
- package/lib/types/host/opencode-go/native-shared.d.ts +31 -0
- package/lib/types/host/opencode-go/native-shared.d.ts.map +1 -0
- package/lib/types/host/opencode-go/protocol.d.ts +13 -0
- package/lib/types/host/opencode-go/protocol.d.ts.map +1 -0
- package/lib/types/host/opencode-go/routes.d.ts +13 -0
- package/lib/types/host/opencode-go/routes.d.ts.map +1 -0
- package/lib/types/host/opencode-go/token-store.d.ts +29 -0
- package/lib/types/host/opencode-go/token-store.d.ts.map +1 -0
- package/lib/types/host/opencode-go/types.d.ts +20 -0
- package/lib/types/host/opencode-go/types.d.ts.map +1 -0
- package/lib/types/host/opendesign/account-pool.d.ts +54 -0
- package/lib/types/host/opendesign/account-pool.d.ts.map +1 -0
- package/lib/types/host/opendesign/adapter.d.ts +88 -0
- package/lib/types/host/opendesign/adapter.d.ts.map +1 -0
- package/lib/types/host/opendesign/catalog.d.ts +58 -0
- package/lib/types/host/opendesign/catalog.d.ts.map +1 -0
- package/lib/types/host/opendesign/client.d.ts +304 -0
- package/lib/types/host/opendesign/client.d.ts.map +1 -0
- package/lib/types/host/opendesign/line.d.ts +60 -0
- package/lib/types/host/opendesign/line.d.ts.map +1 -0
- package/lib/types/host/opendesign/mapper.d.ts +218 -0
- package/lib/types/host/opendesign/mapper.d.ts.map +1 -0
- package/lib/types/host/opendesign/oauth.d.ts +105 -0
- package/lib/types/host/opendesign/oauth.d.ts.map +1 -0
- package/lib/types/host/opendesign/routes.d.ts +75 -0
- package/lib/types/host/opendesign/routes.d.ts.map +1 -0
- package/lib/types/host/opendesign/token-store.d.ts +241 -0
- package/lib/types/host/opendesign/token-store.d.ts.map +1 -0
- package/lib/types/host/opendesign/types.d.ts +235 -0
- package/lib/types/host/opendesign/types.d.ts.map +1 -0
- package/lib/types/host/platform-token-store.d.ts +3 -0
- package/lib/types/host/platform-token-store.d.ts.map +1 -0
- package/lib/types/host/preferences.d.ts +26 -0
- package/lib/types/host/preferences.d.ts.map +1 -0
- package/lib/types/host/proxy-manager.d.ts +261 -0
- package/lib/types/host/proxy-manager.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/adapter.d.ts +37 -0
- package/lib/types/host/qianwen-token-plan/adapter.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/cache-stats.d.ts +17 -0
- package/lib/types/host/qianwen-token-plan/cache-stats.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/client.d.ts +5 -0
- package/lib/types/host/qianwen-token-plan/client.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/mapper.d.ts +71 -0
- package/lib/types/host/qianwen-token-plan/mapper.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/model-catalog.d.ts +28 -0
- package/lib/types/host/qianwen-token-plan/model-catalog.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/routes.d.ts +12 -0
- package/lib/types/host/qianwen-token-plan/routes.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/token-store.d.ts +56 -0
- package/lib/types/host/qianwen-token-plan/token-store.d.ts.map +1 -0
- package/lib/types/host/qianwen-token-plan/types.d.ts +13 -0
- package/lib/types/host/qianwen-token-plan/types.d.ts.map +1 -0
- package/lib/types/host/qoder/account-pool.d.ts +141 -0
- package/lib/types/host/qoder/account-pool.d.ts.map +1 -0
- package/lib/types/host/qoder/adapter.d.ts +167 -0
- package/lib/types/host/qoder/adapter.d.ts.map +1 -0
- package/lib/types/host/qoder/adopt.d.ts +146 -0
- package/lib/types/host/qoder/adopt.d.ts.map +1 -0
- package/lib/types/host/qoder/client.d.ts +323 -0
- package/lib/types/host/qoder/client.d.ts.map +1 -0
- package/lib/types/host/qoder/cosy.d.ts +173 -0
- package/lib/types/host/qoder/cosy.d.ts.map +1 -0
- package/lib/types/host/qoder/mapper.d.ts +332 -0
- package/lib/types/host/qoder/mapper.d.ts.map +1 -0
- package/lib/types/host/qoder/model-catalog.d.ts +231 -0
- package/lib/types/host/qoder/model-catalog.d.ts.map +1 -0
- package/lib/types/host/qoder/oauth.d.ts +151 -0
- package/lib/types/host/qoder/oauth.d.ts.map +1 -0
- package/lib/types/host/qoder/routes.d.ts +119 -0
- package/lib/types/host/qoder/routes.d.ts.map +1 -0
- package/lib/types/host/qoder/token-store.d.ts +280 -0
- package/lib/types/host/qoder/token-store.d.ts.map +1 -0
- package/lib/types/host/qoder/types.d.ts +262 -0
- package/lib/types/host/qoder/types.d.ts.map +1 -0
- package/lib/types/host/relayone/account-pool.d.ts +129 -0
- package/lib/types/host/relayone/account-pool.d.ts.map +1 -0
- package/lib/types/host/relayone/adapter.d.ts +87 -0
- package/lib/types/host/relayone/adapter.d.ts.map +1 -0
- package/lib/types/host/relayone/catalog-manager.d.ts +45 -0
- package/lib/types/host/relayone/catalog-manager.d.ts.map +1 -0
- package/lib/types/host/relayone/client.d.ts +5 -0
- package/lib/types/host/relayone/client.d.ts.map +1 -0
- package/lib/types/host/relayone/mapper-anthropic.d.ts +49 -0
- package/lib/types/host/relayone/mapper-anthropic.d.ts.map +1 -0
- package/lib/types/host/relayone/mapper-openai.d.ts +36 -0
- package/lib/types/host/relayone/mapper-openai.d.ts.map +1 -0
- package/lib/types/host/relayone/mapper-shared.d.ts +25 -0
- package/lib/types/host/relayone/mapper-shared.d.ts.map +1 -0
- package/lib/types/host/relayone/model-catalog.d.ts +70 -0
- package/lib/types/host/relayone/model-catalog.d.ts.map +1 -0
- package/lib/types/host/relayone/quota.d.ts +29 -0
- package/lib/types/host/relayone/quota.d.ts.map +1 -0
- package/lib/types/host/relayone/routes.d.ts +33 -0
- package/lib/types/host/relayone/routes.d.ts.map +1 -0
- package/lib/types/host/relayone/token-store.d.ts +49 -0
- package/lib/types/host/relayone/token-store.d.ts.map +1 -0
- package/lib/types/host/relayone/types.d.ts +22 -0
- package/lib/types/host/relayone/types.d.ts.map +1 -0
- package/lib/types/host/responses-client.d.ts +125 -0
- package/lib/types/host/responses-client.d.ts.map +1 -0
- package/lib/types/host/responses-mapper.d.ts +133 -0
- package/lib/types/host/responses-mapper.d.ts.map +1 -0
- package/lib/types/host/routes.d.ts +30 -0
- package/lib/types/host/routes.d.ts.map +1 -0
- package/lib/types/host/search-provider-switcher.d.ts +45 -0
- package/lib/types/host/search-provider-switcher.d.ts.map +1 -0
- package/lib/types/host/session-title-guard/index.d.ts +80 -0
- package/lib/types/host/session-title-guard/index.d.ts.map +1 -0
- package/lib/types/host/step-code/account-pool.d.ts +187 -0
- package/lib/types/host/step-code/account-pool.d.ts.map +1 -0
- package/lib/types/host/step-code/adapter.d.ts +156 -0
- package/lib/types/host/step-code/adapter.d.ts.map +1 -0
- package/lib/types/host/step-code/adopt.d.ts +201 -0
- package/lib/types/host/step-code/adopt.d.ts.map +1 -0
- package/lib/types/host/step-code/cache-stats.d.ts +181 -0
- package/lib/types/host/step-code/cache-stats.d.ts.map +1 -0
- package/lib/types/host/step-code/client.d.ts +339 -0
- package/lib/types/host/step-code/client.d.ts.map +1 -0
- package/lib/types/host/step-code/mapper.d.ts +305 -0
- package/lib/types/host/step-code/mapper.d.ts.map +1 -0
- package/lib/types/host/step-code/model-catalog.d.ts +247 -0
- package/lib/types/host/step-code/model-catalog.d.ts.map +1 -0
- package/lib/types/host/step-code/oauth.d.ts +265 -0
- package/lib/types/host/step-code/oauth.d.ts.map +1 -0
- package/lib/types/host/step-code/routes.d.ts +129 -0
- package/lib/types/host/step-code/routes.d.ts.map +1 -0
- package/lib/types/host/step-code/token-store.d.ts +325 -0
- package/lib/types/host/step-code/token-store.d.ts.map +1 -0
- package/lib/types/host/step-code/types.d.ts +492 -0
- package/lib/types/host/step-code/types.d.ts.map +1 -0
- package/lib/types/host/token-store-linux.d.ts +20 -0
- package/lib/types/host/token-store-linux.d.ts.map +1 -0
- package/lib/types/host/token-store-macos.d.ts +39 -0
- package/lib/types/host/token-store-macos.d.ts.map +1 -0
- package/lib/types/host/token-store-windows.d.ts +26 -0
- package/lib/types/host/token-store-windows.d.ts.map +1 -0
- package/lib/types/host/token-store.d.ts +81 -0
- package/lib/types/host/token-store.d.ts.map +1 -0
- package/lib/types/host/usage-service.d.ts +109 -0
- package/lib/types/host/usage-service.d.ts.map +1 -0
- package/lib/types/host/web-provider-reconciler.d.ts +34 -0
- package/lib/types/host/web-provider-reconciler.d.ts.map +1 -0
- package/lib/types/host/wire-auth.d.ts +63 -0
- package/lib/types/host/wire-auth.d.ts.map +1 -0
- package/lib/types/host/workbuddy/account-pool.d.ts +389 -0
- package/lib/types/host/workbuddy/account-pool.d.ts.map +1 -0
- package/lib/types/host/workbuddy/adapter.d.ts +248 -0
- package/lib/types/host/workbuddy/adapter.d.ts.map +1 -0
- package/lib/types/host/workbuddy/atrest.d.ts +98 -0
- package/lib/types/host/workbuddy/atrest.d.ts.map +1 -0
- package/lib/types/host/workbuddy/checkin.d.ts +150 -0
- package/lib/types/host/workbuddy/checkin.d.ts.map +1 -0
- package/lib/types/host/workbuddy/client.d.ts +214 -0
- package/lib/types/host/workbuddy/client.d.ts.map +1 -0
- package/lib/types/host/workbuddy/dsml.d.ts +55 -0
- package/lib/types/host/workbuddy/dsml.d.ts.map +1 -0
- package/lib/types/host/workbuddy/guardrails.d.ts +111 -0
- package/lib/types/host/workbuddy/guardrails.d.ts.map +1 -0
- package/lib/types/host/workbuddy/identity.d.ts +71 -0
- package/lib/types/host/workbuddy/identity.d.ts.map +1 -0
- package/lib/types/host/workbuddy/mapper.d.ts +238 -0
- package/lib/types/host/workbuddy/mapper.d.ts.map +1 -0
- package/lib/types/host/workbuddy/model-catalog.d.ts +239 -0
- package/lib/types/host/workbuddy/model-catalog.d.ts.map +1 -0
- package/lib/types/host/workbuddy/oauth.d.ts +47 -0
- package/lib/types/host/workbuddy/oauth.d.ts.map +1 -0
- package/lib/types/host/workbuddy/outbound-identity.d.ts +139 -0
- package/lib/types/host/workbuddy/outbound-identity.d.ts.map +1 -0
- package/lib/types/host/workbuddy/routes.d.ts +56 -0
- package/lib/types/host/workbuddy/routes.d.ts.map +1 -0
- package/lib/types/host/workbuddy/token-store.d.ts +370 -0
- package/lib/types/host/workbuddy/token-store.d.ts.map +1 -0
- package/lib/types/host/workbuddy/types.d.ts +185 -0
- package/lib/types/host/workbuddy/types.d.ts.map +1 -0
- package/lib/types/index.d.ts +248 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/shared/account-pool-contracts.d.ts +99 -0
- package/lib/types/shared/account-pool-contracts.d.ts.map +1 -0
- package/lib/types/shared/claude-api-contracts.d.ts +98 -0
- package/lib/types/shared/claude-api-contracts.d.ts.map +1 -0
- package/lib/types/shared/claude-contracts.d.ts +370 -0
- package/lib/types/shared/claude-contracts.d.ts.map +1 -0
- package/lib/types/shared/cline-pass-contracts.d.ts +234 -0
- package/lib/types/shared/cline-pass-contracts.d.ts.map +1 -0
- package/lib/types/shared/command-code-contracts.d.ts +163 -0
- package/lib/types/shared/command-code-contracts.d.ts.map +1 -0
- package/lib/types/shared/contracts.d.ts +343 -0
- package/lib/types/shared/contracts.d.ts.map +1 -0
- package/lib/types/shared/glm-coding-plan-contracts.d.ts +315 -0
- package/lib/types/shared/glm-coding-plan-contracts.d.ts.map +1 -0
- package/lib/types/shared/hub-contracts.d.ts +37 -0
- package/lib/types/shared/hub-contracts.d.ts.map +1 -0
- package/lib/types/shared/i18n-contracts.d.ts +35 -0
- package/lib/types/shared/i18n-contracts.d.ts.map +1 -0
- package/lib/types/shared/kimi-code-contracts.d.ts +435 -0
- package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -0
- package/lib/types/shared/minimax-code-contracts.d.ts +263 -0
- package/lib/types/shared/minimax-code-contracts.d.ts.map +1 -0
- package/lib/types/shared/model-catalog.d.ts +302 -0
- package/lib/types/shared/model-catalog.d.ts.map +1 -0
- package/lib/types/shared/ollama-contracts.d.ts +73 -0
- package/lib/types/shared/ollama-contracts.d.ts.map +1 -0
- package/lib/types/shared/opencode-go-contracts.d.ts +80 -0
- package/lib/types/shared/opencode-go-contracts.d.ts.map +1 -0
- package/lib/types/shared/opendesign-contracts.d.ts +262 -0
- package/lib/types/shared/opendesign-contracts.d.ts.map +1 -0
- package/lib/types/shared/preferences.d.ts +60 -0
- package/lib/types/shared/preferences.d.ts.map +1 -0
- package/lib/types/shared/qianwen-token-plan-contracts.d.ts +94 -0
- package/lib/types/shared/qianwen-token-plan-contracts.d.ts.map +1 -0
- package/lib/types/shared/qoder-contracts.d.ts +342 -0
- package/lib/types/shared/qoder-contracts.d.ts.map +1 -0
- package/lib/types/shared/relayone-contracts.d.ts +95 -0
- package/lib/types/shared/relayone-contracts.d.ts.map +1 -0
- package/lib/types/shared/step-code-contracts.d.ts +443 -0
- package/lib/types/shared/step-code-contracts.d.ts.map +1 -0
- package/lib/types/shared/workbuddy-contracts.d.ts +531 -0
- package/lib/types/shared/workbuddy-contracts.d.ts.map +1 -0
- package/package.json +147 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cosy.d.ts","sourceRoot":"","sources":["../../../../src/host/qoder/cosy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAwBH;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,yRAKhB,CAAA;AAMzB;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,C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E;IACjE,MAAM,EAAE,MAAM,CAAA;IACd,8DAA8D;IAC9D,eAAe,EAAE,OAAO,CAAA;IACxB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uBAAuB;IACvB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,MAAM,CAAA;IACtB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,MAAM,CAAA;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,EAAE,uBAAuB,GAC/B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAqDxB;AAMD,gEAAgE;AAChE,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAGlF;AAED,+CAA+C;AAC/C,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,IAAI,CASzF;AAKD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CA8BlF;AAED,mBAAmB;AACnB,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C"}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Qoder(订阅)线路对话端的 wire mapping。
|
|
3
|
+
*
|
|
4
|
+
* 这条线路的协议面**不是** OpenAI:它把一份 OpenAI 形状的对话包进 Qoder 自己的
|
|
5
|
+
* \`RemoteChatAsk\` 信封,过一道自定义 body codec,再用 COSY 头签名(cosy.ts)。
|
|
6
|
+
* 本文件只管「对话形状 ⇄ 信封里的 \`messages\`/\`parameters\`」与「信封 SSE ⇄ DSH chunks」;
|
|
7
|
+
* 签名与编码在 cosy.ts,传输在 adapter.ts——三层各管一层,是因为每层都有独立的
|
|
8
|
+
* fixture/测试锁定它(cosy 层有 frozen fixtures,本层有 mapper 测试)。
|
|
9
|
+
*
|
|
10
|
+
* 逐字来源(docs/qoder-line-plan.md §3.5/§3.6):
|
|
11
|
+
*
|
|
12
|
+
* - 请求信封字段集:qodercli2api \`infer-user-no-org.json\` 的 \`body_raw\`(frozen fixture);
|
|
13
|
+
* - \`parameters\` 里的思考控制:pi-provider \`stream.ts\`(\`enable_thinking\` 布尔 +
|
|
14
|
+
* \`reasoning_effort\` 档位,仅当目录的 \`thinking_config.enabled.efforts\` 存在才发档位);
|
|
15
|
+
* - 响应信封:\`data:{headers, body, statusCodeValue}\`,\`body\` 再解析出 OpenAI chunk;
|
|
16
|
+
* \`[DONE]\` 两种形态(裸帧与信封 \`body:"[DONE]"\`)都结束读取;\`event:finish\` 是
|
|
17
|
+
* 权威终止事件(qodercli2api §7);
|
|
18
|
+
* - usage 口径:\`prompt_tokens\` **含** \`cached_tokens\`,DSH 互斥计数所以减回去
|
|
19
|
+
* (pi-provider \`stream.ts\` 同一减法)。
|
|
20
|
+
*
|
|
21
|
+
* 与 step-code mapper 同源的辅助(消息投影、图片预算、tool_call 聚合)按同一套写,
|
|
22
|
+
* 因为上游信封里装的确实是 OpenAI 形状的消息数组。
|
|
23
|
+
*
|
|
24
|
+
* @module dsh-multi-provider/qoder-mapper
|
|
25
|
+
*/
|
|
26
|
+
import type { QoderModelEntry } from './model-catalog.ts';
|
|
27
|
+
import { LlmError, type GenerateOptions, type OutboundContentBlock, type StreamChunk, type TokenUsage } from '../common/llm-compat.ts';
|
|
28
|
+
import { resolveRequestImages, type AttachmentImageReader, type ResolvedRequestImage, type ResolvedRequestImages } from '../common/request-images.ts';
|
|
29
|
+
export { resolveRequestImages };
|
|
30
|
+
export type { AttachmentImageReader, ResolvedRequestImage, ResolvedRequestImages };
|
|
31
|
+
/**
|
|
32
|
+
* 一次请求允许携带的 Base64 图片总量。
|
|
33
|
+
*
|
|
34
|
+
* Qoder 没有公开的逐请求图片上限,所以这是防御性预算而不是文档化限制:
|
|
35
|
+
* 与 step-code 取同一个 12 MB,让失控的对话降级成占位文本而不是拖垮传输。
|
|
36
|
+
*/
|
|
37
|
+
export declare const QODER_MAX_REQUEST_IMAGE_BYTES: number;
|
|
38
|
+
/** 共享图片预算,供想要插件保守上限的调用方使用。 */
|
|
39
|
+
export declare const QODER_SHARED_IMAGE_BUDGET = 1500000;
|
|
40
|
+
/**
|
|
41
|
+
* \`request_id\` 重复时上游报的业务错误码(逐字 qodercli2api §5:
|
|
42
|
+
* 服务端对重复值返回 code 103)。它**不是**可安全自动重试的状态——
|
|
43
|
+
* 重试必须用新的 request_id,而不是重发同一份。
|
|
44
|
+
*/
|
|
45
|
+
export declare const QODER_ERROR_DUPLICATE_REQUEST_ID = "103";
|
|
46
|
+
/** token 失效的业务错误码(CN 报「Login expired」,pi-provider oauth.ts 注释)。 */
|
|
47
|
+
export declare const QODER_ERROR_LOGIN_EXPIRED = "105";
|
|
48
|
+
/**
|
|
49
|
+
* 响应侧「缓存读入量」的解析优先级,从先到后。
|
|
50
|
+
*
|
|
51
|
+
* 1. \`prompt_tokens_details.cached_tokens\` —— OpenAI 规范的字段(pi-provider 的主读法);
|
|
52
|
+
* 2. **顶层 \`cached_tokens\`** —— Qoder 网关可能直接平铺(step-code 线路的教训:
|
|
53
|
+
* 官方文档只展示顶层字段时,它必须在自己那条分支上被认);
|
|
54
|
+
* 3. \`prompt_cache_hit_tokens\` —— DeepSeek 一族网关的命名(Qoder 的部分模型上游是它);
|
|
55
|
+
* 4. 0。
|
|
56
|
+
*
|
|
57
|
+
* 都不命中时取 0:0 表示「上游没报」,而不是「一定没命中」。
|
|
58
|
+
*/
|
|
59
|
+
export declare const QODER_CACHE_READ_FIELD_ORDER: readonly ["prompt_tokens_details.cached_tokens", "cached_tokens", "prompt_cache_hit_tokens"];
|
|
60
|
+
/**
|
|
61
|
+
* 一次请求超过 {@link QODER_MAX_REQUEST_IMAGE_BYTES} 时,把最旧的内联图片换成
|
|
62
|
+
* 可见占位文本。持久历史不动,只有即将发出的这份请求变(与兄弟线路同一机制)。
|
|
63
|
+
*/
|
|
64
|
+
export declare function offloadOldestQoderRequestImages(options: GenerateOptions, images?: ResolvedRequestImages): GenerateOptions;
|
|
65
|
+
/** 信封里的消息形状(OpenAI Chat Completions 词汇)。 */
|
|
66
|
+
type QoderWireMessage = Record<string, unknown>;
|
|
67
|
+
/**
|
|
68
|
+
* 收窄一个 tool_call id 到 Qoder 接受的形状(\`^[a-zA-Z0-9_-]{1,64}$\`,
|
|
69
|
+
* 逐字 pi-provider transform.ts 的注释)。线上重写,映射不回内部——
|
|
70
|
+
* DSH 自己的 id 本来就在这个形状里,这只是对上游边界的防守。
|
|
71
|
+
*/
|
|
72
|
+
export declare function qoderWireToolCallId(id: string): string;
|
|
73
|
+
/** 线上请求需要的、而对话本身不携带的旋钮。 */
|
|
74
|
+
export interface QoderWireRequestOptions {
|
|
75
|
+
/** 所选模型是否声明图片输入(\`is_vl\`)。 */
|
|
76
|
+
supportsImages?: boolean;
|
|
77
|
+
/** 调用方没给输出上限时用的上限;通常取目录行的 \`defaultMaxTokens\`。 */
|
|
78
|
+
defaultMaxTokens?: number;
|
|
79
|
+
/** 该模型是否推理模型(不是推理模型就一个思考字段都不发)。 */
|
|
80
|
+
reasoning?: boolean;
|
|
81
|
+
/** 该模型声明的真实档位梯子;空 = 没有 effort 字段(toggle 形态或不推理)。 */
|
|
82
|
+
reasoningEfforts?: readonly string[];
|
|
83
|
+
/** 思考能否关闭(目录 \`thinking_config.disabled\`)。 */
|
|
84
|
+
thinkingDisableable?: boolean;
|
|
85
|
+
}
|
|
86
|
+
/** 出厂默认:不认图、不发思考字段、没有梯子。 */
|
|
87
|
+
export declare const DEFAULT_QODER_WIRE_REQUEST_OPTIONS: QoderWireRequestOptions;
|
|
88
|
+
/**
|
|
89
|
+
* 一行目录的线上旋钮(字段逐列复制只住在这一处;adapter 只加它自己的覆盖)。
|
|
90
|
+
*/
|
|
91
|
+
export declare function qoderRequestOptionsFor(entry: QoderModelEntry | undefined, overrides?: {
|
|
92
|
+
defaultMaxTokens?: number;
|
|
93
|
+
}): QoderWireRequestOptions;
|
|
94
|
+
/**
|
|
95
|
+
* 发到线上的思考控制(\`parameters\` 里的两个字段),或两个都不发。
|
|
96
|
+
*
|
|
97
|
+
* 逐字 pi-provider \`stream.ts\` 的语义(来源 \`@qoder-ai/qodercli\`):
|
|
98
|
+
*
|
|
99
|
+
* - 模型不是推理模型 → 一个字段都不发;
|
|
100
|
+
* - 推理模型但调用方没选档位 → \`enable_thinking: false\`(不默认让它想——
|
|
101
|
+
* 想了更慢更费额度,用户没要求);
|
|
102
|
+
* - 调用方选了档位:收敛到模型真实梯子(types.ts 的 convergeQoderEffort);
|
|
103
|
+
* 梯子是 effort 形态才发 \`reasoning_effort\`,toggle 形态只发开关;
|
|
104
|
+
* 收敛到 \`none\`(或模型说思考可关而调用方要关)→ \`enable_thinking: false\`。
|
|
105
|
+
*/
|
|
106
|
+
export declare function resolveQoderThinking(requested: unknown, request: QoderWireRequestOptions): {
|
|
107
|
+
enable_thinking: boolean;
|
|
108
|
+
reasoning_effort?: string;
|
|
109
|
+
} | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* 会话与请求的稳定 id(缓存亲和)。
|
|
112
|
+
*
|
|
113
|
+
* 逐字 pi-provider \`stream.ts\` 的设计:\`session_id\` 的稳定段来自账号+模型的哈希,
|
|
114
|
+
* 会话段来自宿主给的 sessionId(没有才现造一个);\`request_set_id\` 是会话内容的
|
|
115
|
+
* 稳定哈希(重试同一份请求时不变,服务端去重靠它配合 \`request_id\` 的分工:
|
|
116
|
+
* \`request_id\` 每次请求唯一,重复报 code 103)。
|
|
117
|
+
*/
|
|
118
|
+
export declare function qoderSessionId(uid: string, modelKey: string, sessionId: string | undefined): string;
|
|
119
|
+
/** 会话内容的稳定哈希(\`request_set_id\` / \`chat_record_id\`)。 */
|
|
120
|
+
export declare function qoderChatRecordId(modelKey: string, messages: readonly QoderWireMessage[], tools: unknown, maxTokens: number): string;
|
|
121
|
+
/** 装配一份 RemoteChatAsk 的调用方材料。 */
|
|
122
|
+
export interface QoderChatRequestContext {
|
|
123
|
+
/** 上行模型 key(\`X-Model-Key\` / \`model_config.key\`)。 */
|
|
124
|
+
modelKey: string;
|
|
125
|
+
/** 目录行(\`model_config\` 的其余字段从这里还原成上游形状)。 */
|
|
126
|
+
entry: QoderModelEntry | undefined;
|
|
127
|
+
/** 当前生效的 COSY 版本(\`business.version\` 填它,与官方 CLI 一致)。 */
|
|
128
|
+
cosyVersion: string;
|
|
129
|
+
/** DSH 会话 id(缓存亲和的稳定段之外的那一段)。 */
|
|
130
|
+
sessionId?: string;
|
|
131
|
+
/**
|
|
132
|
+
* 当前账号的 uid(上游账号 id,\`Cosy-User\` 头用的同一个值)。
|
|
133
|
+
*
|
|
134
|
+
* 它进 \`session_id\` 的**稳定段**:同一段对话在同一个账号下要落在同一段会话上
|
|
135
|
+
* (缓存亲和),换账号就必须换一段,否则两个账号的对话会串到同一段会话上去。
|
|
136
|
+
* 缺 uid 时退回旧兜底(稳定段只由模型决定)——那是「我们只知道这么多」,
|
|
137
|
+
* 不是编一个账号出来。
|
|
138
|
+
*/
|
|
139
|
+
uid?: string | null;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* 拼一份 RemoteChatAsk 请求体(**未编码**的 JSON 对象)。
|
|
143
|
+
*
|
|
144
|
+
* 字段集与取值逐字按 frozen fixture 的 \`body_raw\`(docs/qoder-line-plan.md §3.5);
|
|
145
|
+
* 顶层 \`system\` 与领头的 \`role:system\` 消息**都填**(官方 CLI 两处都填——
|
|
146
|
+
* fixture 锁定;pi-provider 实测顶层字段被服务端忽略,填两份是无害的冗余)。
|
|
147
|
+
*
|
|
148
|
+
* 返回对象之后,调用方(adapter)**必须**用 \`JSON.stringify\` 串行化一次、
|
|
149
|
+
* 拿那一份字节去编码+签名+发送:签名覆盖的是字节,任何中间的一道
|
|
150
|
+
* parse/re-marshal 都会让签名的字节与发送的字节漂移。
|
|
151
|
+
*/
|
|
152
|
+
export declare function buildQoderChatRequest(options: GenerateOptions, images: ResolvedRequestImages, request: QoderWireRequestOptions, context: QoderChatRequestContext): Record<string, unknown>;
|
|
153
|
+
/** 一帧 usage 读下来的归一化结果。 */
|
|
154
|
+
export interface QoderParsedUsage {
|
|
155
|
+
/** 端点的聚合 prompt 计数(缓存拆分前)。 */
|
|
156
|
+
promptTokens: number;
|
|
157
|
+
/** 未命中输入,与两个缓存桶互斥。 */
|
|
158
|
+
inputTokens: number;
|
|
159
|
+
outputTokens: number;
|
|
160
|
+
cacheReadTokens: number;
|
|
161
|
+
cacheWriteTokens: number;
|
|
162
|
+
reasoningTokens: number;
|
|
163
|
+
}
|
|
164
|
+
/** 一帧 usage 的缓存读入量,按 {@link QODER_CACHE_READ_FIELD_ORDER} 逐条走。 */
|
|
165
|
+
export declare function readQoderCacheReadTokens(usage: Record<string, unknown>): number;
|
|
166
|
+
/**
|
|
167
|
+
* 归一化一帧 \`usage\` 到 DSH 的互斥计数。
|
|
168
|
+
*
|
|
169
|
+
* Qoder 遵循 OpenAI 语义:\`prompt_tokens\` **含** \`cached_tokens\`,所以缓存两桶
|
|
170
|
+
* 从聚合里减回去(pi-provider \`stream.ts\` 的同一减法)。\`cacheable_tokens\` 是容量
|
|
171
|
+
* 指标而不是写入计数(首轮写入时它也是 0),**不**映射到 cacheWrite。
|
|
172
|
+
*
|
|
173
|
+
* \`usage.credits\` / \`billable\`(Qoder 的计费字段)不进 DSH 的 TokenUsage——
|
|
174
|
+
* 它没有对应的格子,而订阅单价未公开,折成金额是编造(计划 §5)。
|
|
175
|
+
*/
|
|
176
|
+
export declare function parseQoderUsage(raw: unknown): QoderParsedUsage | undefined;
|
|
177
|
+
interface PendingToolCall {
|
|
178
|
+
blockIndex: number;
|
|
179
|
+
id: string;
|
|
180
|
+
name: string;
|
|
181
|
+
arguments: string;
|
|
182
|
+
started: boolean;
|
|
183
|
+
}
|
|
184
|
+
/** 一条 Qoder 流式响应的累计状态。 */
|
|
185
|
+
export interface QoderStreamState {
|
|
186
|
+
blocks: OutboundContentBlock[];
|
|
187
|
+
current: OpenTextBlock | null;
|
|
188
|
+
/** wire tool index -> 累计中的调用。 */
|
|
189
|
+
toolCalls: Map<number, PendingToolCall>;
|
|
190
|
+
hasContent: boolean;
|
|
191
|
+
hasToolCall: boolean;
|
|
192
|
+
finishReason: string | null;
|
|
193
|
+
/** 终止依据到了(\`[DONE]\` 任一形态或 \`event:finish\`)。 */
|
|
194
|
+
done: boolean;
|
|
195
|
+
/** 终止 chunks 已经发出过。 */
|
|
196
|
+
finished: boolean;
|
|
197
|
+
inputTokens: number;
|
|
198
|
+
outputTokens: number;
|
|
199
|
+
cacheReadTokens: number;
|
|
200
|
+
cacheWriteTokens: number;
|
|
201
|
+
reasoningTokens: number;
|
|
202
|
+
sawUsage: boolean;
|
|
203
|
+
}
|
|
204
|
+
interface OpenTextBlock {
|
|
205
|
+
index: number;
|
|
206
|
+
type: 'text' | 'reasoning';
|
|
207
|
+
text: string;
|
|
208
|
+
}
|
|
209
|
+
export declare function createQoderStreamState(): QoderStreamState;
|
|
210
|
+
/**
|
|
211
|
+
* 喂一行 SSE。
|
|
212
|
+
*
|
|
213
|
+
* 信封形状(qodercli2api §7,pi-provider \`stream.ts\` 同一读法):
|
|
214
|
+
*
|
|
215
|
+
* - \`data:{"headers":{…},"body":"<inner JSON string>","statusCodeValue":200}\`:
|
|
216
|
+
* \`body\` 再解析一次得到 OpenAI \`chat.completion.chunk\`;
|
|
217
|
+
* - \`statusCodeValue != 200\` 是**错误信封**,转成 LlmError 抛出;
|
|
218
|
+
* - \`[DONE]\` 两种形态都结束:裸 \`data:[DONE]\` 与信封 \`body:"[DONE]"\`;
|
|
219
|
+
* - \`event:finish\` 是权威终止事件(它自己的 data 里是耗时统计,不是内容);
|
|
220
|
+
* - 心跳与其它 \`event:\` 帧不产生任何 chunk(调用方在字节层喂看门狗)。
|
|
221
|
+
*/
|
|
222
|
+
export declare function processQoderStreamLine(line: string, state: QoderStreamState): StreamChunk[];
|
|
223
|
+
/** 一次应答的 DSH 记账(缓存字段为 0 时省略)。 */
|
|
224
|
+
export declare function qoderStreamTokenUsage(state: QoderStreamState): TokenUsage;
|
|
225
|
+
/**
|
|
226
|
+
* 冲刷所有打开的块,然后发 usage 与终止 finish。
|
|
227
|
+
*
|
|
228
|
+
* 顺序是硬要求:DSH 在 \`finish\` 上结算一次调用,之后到达的 usage 永远入不了账。
|
|
229
|
+
*/
|
|
230
|
+
export declare function closeQoderStream(state: QoderStreamState): StreamChunk[];
|
|
231
|
+
/**
|
|
232
|
+
* 没有终止事件的流是被截断的回复,不是一份完整答案。
|
|
233
|
+
*/
|
|
234
|
+
export declare function assertQoderStreamComplete(state: QoderStreamState): void;
|
|
235
|
+
/**
|
|
236
|
+
* 上游「资源不足 / 排队中」的业务码与 subCode。
|
|
237
|
+
*
|
|
238
|
+
* 上游把它作为 **HTTP 200 + SSE 错误信封** 送达(\`statusCodeValue: 403\`),
|
|
239
|
+
* body 里带着 403 → 10605 的码链、\`subCode: RESOURCE_LIMIT\`、排队人数与
|
|
240
|
+
* \`retryAfterSeconds\`。它描述的是**上游容量**,不是凭据——把它分类成 AUTH
|
|
241
|
+
* 会把用户引向「重建令牌 / 重新登录」的死路,而那把令牌根本没坏。
|
|
242
|
+
*/
|
|
243
|
+
export declare const QODER_ERROR_RESOURCE_LIMIT = "10605";
|
|
244
|
+
/** 上游排队时的 subCode(与 {@link QODER_ERROR_RESOURCE_LIMIT} 成对出现)。 */
|
|
245
|
+
export declare const QODER_ERROR_SUB_RESOURCE_LIMIT = "RESOURCE_LIMIT";
|
|
246
|
+
/** 上游排队 subCode 的已知拼写变体(上游历史报文偶现 `REOSURCE_LIMIT`)。 */
|
|
247
|
+
export declare const QODER_ERROR_SUB_RESOURCE_LIMIT_TYPO = "REOSURCE_LIMIT";
|
|
248
|
+
/**
|
|
249
|
+
* 上游「额度用尽」的业务码(另一种 403,body 里带 `pricingUrl`)。
|
|
250
|
+
*
|
|
251
|
+
* 它与排队是**两回事**:排队等一会儿就好,额度用尽只能等周期重置或加购。
|
|
252
|
+
*/
|
|
253
|
+
export declare const QODER_ERROR_QUOTA_EXCEEDED = "112";
|
|
254
|
+
/**
|
|
255
|
+
* 一次失败里上游报出来的事实(信封层与 body 层都扫,所以字段在哪一层都不丢)。
|
|
256
|
+
*
|
|
257
|
+
* 这些字段是上游自己的词汇:`queueCount` / `retryAfterSeconds` /
|
|
258
|
+
* `serviceAvailable` / `isQueued` 描述的是上游当下的容量状态。
|
|
259
|
+
*/
|
|
260
|
+
export interface QoderFailureFacts {
|
|
261
|
+
/** 出现过的业务码(字符串化;码链可能不止一个,如 403 → 10605)。 */
|
|
262
|
+
codes: string[];
|
|
263
|
+
/** 出现过的 subCode。 */
|
|
264
|
+
subCodes: string[];
|
|
265
|
+
/** 收集到的错误消息文本(用于识别未带标准 subCode 的排队/容量提示)。 */
|
|
266
|
+
messages?: string[];
|
|
267
|
+
/** 排队人数(上游报「前面还有多少人在等」)。 */
|
|
268
|
+
queueCount?: number;
|
|
269
|
+
/** 上游建议的重试等待秒数。 */
|
|
270
|
+
retryAfterSeconds?: number;
|
|
271
|
+
/** 上游报的服务可用性。 */
|
|
272
|
+
serviceAvailable?: boolean;
|
|
273
|
+
/** 上游报「本次请求被排队」。 */
|
|
274
|
+
isQueued?: boolean;
|
|
275
|
+
/** 被排队的模型 key(上游的模型标识,不是 DSH 的公开 id)。 */
|
|
276
|
+
modelKey?: string;
|
|
277
|
+
/** 额度用尽时的购买页。 */
|
|
278
|
+
pricingUrl?: string;
|
|
279
|
+
/** 额度用尽时的升级页。 */
|
|
280
|
+
upgradeUrl?: string;
|
|
281
|
+
/** 上游报「额度已用尽」。 */
|
|
282
|
+
quotaExceeded?: boolean;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* 扫一遍上游的失败载荷,把认得的字段收成事实。
|
|
286
|
+
*
|
|
287
|
+
* 为什么要扫而不是只取顶层:上游把这几个字段放在**不同层**(信封外层 / body /
|
|
288
|
+
* body 里的 error / data / detail 对象,且其中某层还可能是再次 JSON.stringify 的字符串),
|
|
289
|
+
* 而码是**一条链**(403 → 10605)。逐层找比猜位置可靠:猜错位置就等于把「排队」读成「凭据被拒」。
|
|
290
|
+
*/
|
|
291
|
+
export declare function qoderFailureFacts(roots: readonly unknown[]): QoderFailureFacts;
|
|
292
|
+
/**
|
|
293
|
+
* 上游是不是在说「资源不足 / 排队中」。
|
|
294
|
+
*
|
|
295
|
+
* 认两种凭据:上游**点名**的(`RESOURCE_LIMIT` / `REOSURCE_LIMIT` / 10605)与 403 搭配的容量信号
|
|
296
|
+
* (服务不可用 / 这次在排队 / 前面排了人 / 消息明说排队)。点名的凭据压过状态码——429 带上
|
|
297
|
+
* RESOURCE_LIMIT 说的是「上游没容量」,不是「这个账号被限流」(与 kimi-code 把
|
|
298
|
+
* 「引擎过载」从 429 里分出来是同一判断);只有排队人数这种弱信号时,429 的含义
|
|
299
|
+
* 不变,号池照旧冷却账号并轮转。
|
|
300
|
+
*/
|
|
301
|
+
export declare function isQoderResourceLimited(facts: QoderFailureFacts, status: number | undefined, detail?: string): boolean;
|
|
302
|
+
/** 判断一个 {@link LlmError} 是否是 Qoder 上游模型排队 / 资源不足引起的失败。 */
|
|
303
|
+
export declare function isQoderQueueFailure(error: unknown): boolean;
|
|
304
|
+
/**
|
|
305
|
+
* 把一次失败(非 2xx 响应,或信封里的错误状态)分类成 DSH failure。
|
|
306
|
+
*
|
|
307
|
+
* 错误码是 harness 的共享词汇而不是本线路自己的:号池认得 `AUTH`
|
|
308
|
+
* (「这个账号必须重新登录」),而重试集合不会捡起一次套餐拒绝。
|
|
309
|
+
* Qoder 的业务码各有归处:
|
|
310
|
+
*
|
|
311
|
+
* - `103`(重复 request_id)不是可安全自动重试的状态(qodercli2api §8 原话);
|
|
312
|
+
* - `105`(Login expired)归 AUTH;
|
|
313
|
+
* - `10605` / `RESOURCE_LIMIT`(上游排队、资源不足)归 **SERVER**——它描述的是
|
|
314
|
+
* 上游容量,换账号与重新登录都救不了,退避重试才有意义(与 kimi-code 的
|
|
315
|
+
* 「引擎过载」同一判断:过载不是账号被限流,所以不借 RATE_LIMIT 的语义);
|
|
316
|
+
* - `112`(额度用尽,带 pricingUrl)归 **QUOTA**——额度恢复前这一请求不可能成功,
|
|
317
|
+
* 而 DSH 正是用这个码显示「当前请求的额度已用尽」。
|
|
318
|
+
*
|
|
319
|
+
* 剩下认不出原因的 403 仍然归 AUTH:那时「凭据被拒」是上游最常见的那一种。
|
|
320
|
+
* 但把一次排队误报成「API 密钥无效」会让人去重建一把根本没坏的令牌,
|
|
321
|
+
* 所以上面两条必须先于它判掉。
|
|
322
|
+
*/
|
|
323
|
+
export declare function classifyQoderFailure(status: number, detail: string): LlmError;
|
|
324
|
+
/**
|
|
325
|
+
* 信封路径的失败分类。
|
|
326
|
+
*
|
|
327
|
+
* 上游把排队人数、`subCode` 这些事实放在**信封层**还是 body 里都可能(body 本身
|
|
328
|
+
* 还是一段 JSON 字符串,要再解析一次),所以两处都扫:只读 body 会把「排队」读成
|
|
329
|
+
* 「凭据被拒」。
|
|
330
|
+
*/
|
|
331
|
+
export declare function classifyQoderEnvelopeFailure(status: number, envelope: Record<string, unknown>): LlmError;
|
|
332
|
+
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/qoder/mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAIzD,OAAO,EAGL,QAAQ,EAER,KAAK,eAAe,EAEpB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,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OAAO,CAAA;CACxB;AAgED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,iBAAiB,CAK9E;AAoHD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,SAAK,GACV,OAAO,CAWT;AAID,0DAA0D;AAC1D,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAI3D;AAwCD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CAG7E;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,CAKxG"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Qoder(订阅)线路的模型目录:目录解析、能力装配、随包兜底表。
|
|
3
|
+
*
|
|
4
|
+
* 存在的原因是本线路的一条硬规则(与兄弟线路同源):**能力不得从模型名推断**。
|
|
5
|
+
* 能力字段一律来自 `GET {base}/algo/api/v2/model/list?Encode=1` 的端点字段
|
|
6
|
+
* (`is_vl` / `is_reasoning` / `thinking_config` / `context_config`),拿不到的走区域兜底。
|
|
7
|
+
*
|
|
8
|
+
* ## 随包兜底表
|
|
9
|
+
*
|
|
10
|
+
* 与 step-code 不同,本线路**有**一张随包表:Qoder 的目录请求需要 COSY 签名,
|
|
11
|
+
* 没登录就拿不到目录,而官方 CLI 要求先登录才可用——随包表让「还没登录」的
|
|
12
|
+
* 选择器不为空。表的内容照录 pi-provider-qoder `src/catalog.ts` 的
|
|
13
|
+
* `staticModels` / `staticCnModels`(逐条在注释里给出处);它是**能力兜底**,
|
|
14
|
+
* 不是权威列表——登录后的运行时目录随时顶替它(client.ts 的缓存与快照)。
|
|
15
|
+
*
|
|
16
|
+
* 真正保证「取不到目录时选择器不为空」的另一半是 {@link undeclaredQoderModelEntry}:
|
|
17
|
+
* 上游给什么 id 就以未声明行进入目录,不猜窗口、不认图、不发档位。
|
|
18
|
+
*/
|
|
19
|
+
import type { QoderModelOption, QoderReasoningEffort, QoderRegion } from '../../shared/qoder-contracts.ts';
|
|
20
|
+
/**
|
|
21
|
+
* 一行模型能力。与 `QoderModelOption` 同义,去掉的只是「用户设置」那一半
|
|
22
|
+
* (见 {@link catalogModelOptions})。多了两个只在 host 侧有意义的字段:
|
|
23
|
+
* `upstreamKey`(线上请求用的上游 `key`,与公开 id 是两回事)与
|
|
24
|
+
* `source`(`X-Model-Source` 头与 `model_config.source` 的取值)。
|
|
25
|
+
*/
|
|
26
|
+
export interface QoderModelEntry {
|
|
27
|
+
/** 公开 id:上游 `display_name` 去空白。 */
|
|
28
|
+
id: string;
|
|
29
|
+
/** 显示名(上游 `display_name` 原样)。 */
|
|
30
|
+
name: string;
|
|
31
|
+
/** 上行请求用的上游 key(`X-Model-Key` 与 `model_config.key`)。 */
|
|
32
|
+
upstreamKey: string;
|
|
33
|
+
/** 模型来源(`X-Model-Source`,通常 `system` 或 `custom`;pi-provider stream.ts)。 */
|
|
34
|
+
source: string;
|
|
35
|
+
/** 一句话能力描述:思考形态 / 可选档位 / 输入模态 / 上下文窗口。由 {@link describeQoderModel} 生成。 */
|
|
36
|
+
hint: string;
|
|
37
|
+
/** 服务该模型的区域。 */
|
|
38
|
+
regions: readonly QoderRegion[];
|
|
39
|
+
/** 该模型是否推理模型(目录 `is_reasoning` / `thinking_config` 存在);`model_config` 照它填。 */
|
|
40
|
+
reasoning: boolean;
|
|
41
|
+
/** 该模型**真实**接受的思考档位梯子;空数组 = 不发任何思考控制字段。 */
|
|
42
|
+
reasoningEfforts: readonly QoderReasoningEffort[];
|
|
43
|
+
/** 思考能否关闭(目录 `thinking_config.disabled` 存在与否)。 */
|
|
44
|
+
thinkingDisableable: boolean;
|
|
45
|
+
/** 是否接受 image 输入(目录 `is_vl`)。 */
|
|
46
|
+
supportsImages: boolean;
|
|
47
|
+
/** 上下文窗口:`context_config` 里最大的 `token_count`,没有时走区域兜底。 */
|
|
48
|
+
defaultContextWindow: number;
|
|
49
|
+
/** 调用方不指定输出上限时的输出上限(目录不报,取文档化上限 131072)。 */
|
|
50
|
+
defaultMaxTokens: number;
|
|
51
|
+
/** 上游描述;没有逐字来源时为 null(不编文案)。 */
|
|
52
|
+
description: string | null;
|
|
53
|
+
}
|
|
54
|
+
/** 一行能力去掉 `hint` 的样子:hint 由 {@link withHint} 从其余字段生成,不手写。 */
|
|
55
|
+
export type QoderModelFacts = Omit<QoderModelEntry, 'hint'>;
|
|
56
|
+
/**
|
|
57
|
+
* 上游 `/algo/api/v2/model/list` 的一个条目(**任何字段都可能缺失**)。
|
|
58
|
+
*
|
|
59
|
+
* 逐字 pi-provider `catalog.ts` 的 `QoderModelEntry`。`max_input_tokens` 是陈旧的
|
|
60
|
+
* 180K 地板(pi-provider 注释:even for models that accept 1M-token prompts),
|
|
61
|
+
* 所以上下文窗口只信 `context_config` 里最大的 `token_count`。
|
|
62
|
+
*/
|
|
63
|
+
export interface QoderUpstreamModelRecord {
|
|
64
|
+
key?: unknown;
|
|
65
|
+
enable?: unknown;
|
|
66
|
+
display_name?: unknown;
|
|
67
|
+
max_input_tokens?: unknown;
|
|
68
|
+
context_config?: unknown;
|
|
69
|
+
is_vl?: unknown;
|
|
70
|
+
is_reasoning?: unknown;
|
|
71
|
+
thinking_config?: unknown;
|
|
72
|
+
source?: unknown;
|
|
73
|
+
description?: unknown;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* 上游 `display_name` → 公开模型 id:去掉全部空白字符
|
|
77
|
+
* (逐字 pi-provider `toQoderModelId`:`replace(/\s+/g, "")`)。
|
|
78
|
+
*/
|
|
79
|
+
export declare function toQoderModelId(displayName: string | undefined): string;
|
|
80
|
+
/** 上游 `context_config` → 上下文窗口:所有选项里最大的 `token_count`(pi-provider `contextWindowFromCatalog`)。 */
|
|
81
|
+
export declare function contextWindowFromRecord(record: QoderUpstreamModelRecord, region: QoderRegion): number;
|
|
82
|
+
/**
|
|
83
|
+
* 上游 `thinking_config` → 本线路的档位梯子。
|
|
84
|
+
*
|
|
85
|
+
* 逐字 pi-provider `buildThinkingLevelMap` 的两种形态:
|
|
86
|
+
*
|
|
87
|
+
* - **effort 形态**:`thinking_config.enabled.efforts` 的键集就是这个模型完整的档位集合
|
|
88
|
+
* (`none`/关闭值不在这个集合里,它在 `thinking_config.disabled` 里);
|
|
89
|
+
* - **toggle 形态**:`enabled` 存在但没有 `efforts`——只有开/关,没有档位,
|
|
90
|
+
* 梯子为空而 `thinkingDisableable` 照 `disabled` 是否存在决定。
|
|
91
|
+
*
|
|
92
|
+
* 认不出的档位名被丢弃而不是猜:上游加了一个我们没命名过的档位时,
|
|
93
|
+
* 猜一个近似的会让用户选到模型可能拒绝的值。
|
|
94
|
+
*/
|
|
95
|
+
export declare function readQoderThinkingConfig(record: QoderUpstreamModelRecord): {
|
|
96
|
+
efforts: readonly QoderReasoningEffort[];
|
|
97
|
+
thinkingDisableable: boolean;
|
|
98
|
+
isReasoning: boolean;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* 一行能力 → 落盘快照的条目:**快照读取侧的反格式**。
|
|
102
|
+
*
|
|
103
|
+
* 写成一处而不是各写一遍,是因为写入侧(client.ts 的 refreshQoderModelCatalog)与
|
|
104
|
+
* 读取侧(rehydrateQoderCatalogFromSnapshot)必须**互为反函数**。这两侧曾经对不上,
|
|
105
|
+
* 后果是静默的:写入侧存的是上游原始形状(`display_name` / `context_config`),
|
|
106
|
+
* 读取侧却拿 {@link parseQoderModelListing} 去解析它——那个解析器只认 `payload.chat`,
|
|
107
|
+
* 于是**任何**快照都解析成空数组,被当作「没有可用的快照」丢掉。冷启动于是永远
|
|
108
|
+
* 从兜底表起步,而磁盘上那份真实目录一次都没被读回来过。
|
|
109
|
+
*
|
|
110
|
+
* 形状与 {@link entryFromQoderRecord} 的输入完全对齐(`key` + `display_name` +
|
|
111
|
+
* `context_config.token_count`),所以真实载荷与快照走的是同一个解析器,字段缺了
|
|
112
|
+
* 也走同一套兜底。
|
|
113
|
+
*/
|
|
114
|
+
export declare function persistedQoderModelRecord(entry: QoderModelEntry): QoderUpstreamModelRecord;
|
|
115
|
+
/**
|
|
116
|
+
* 解析**落盘快照**的 `models` 字段(`persistedQoderModelRecord` 写出去的那一组)。
|
|
117
|
+
*
|
|
118
|
+
* 单独一个函数而不是把 {@link parseQoderModelListing} 放宽成「也认得裸数组」:
|
|
119
|
+
* 那个函数读的是上游应答(`{ chat: [...] }`)的契约,让它同时接受另一种形状,
|
|
120
|
+
* 下一次有人改上游解析规则时就会顺手改坏快照的回读。两个形状,两个入口,一处口径。
|
|
121
|
+
*
|
|
122
|
+
* @returns 解析出的能力行;一个都解析不出时是空数组(调用方据此判「没有可用快照」)。
|
|
123
|
+
*/
|
|
124
|
+
export declare function parsePersistedQoderModelEntries(value: unknown, region: QoderRegion): QoderModelEntry[];
|
|
125
|
+
/**
|
|
126
|
+
* 上游一个条目 → 一行能力。
|
|
127
|
+
*
|
|
128
|
+
* 每一个字段都按「端点说了就用,没说就走兜底」的顺序取值(计划 §4):
|
|
129
|
+
*
|
|
130
|
+
* - 公开 id:`display_name` 去空白;上行 key:`key`。两者缺一不可——
|
|
131
|
+
* 只有 id 没有 key 的条目发不出请求(`X-Model-Key` 是它的取值),跳过而不是猜。
|
|
132
|
+
* - `enable === false` 的条目跳过:它明说自己不可用。
|
|
133
|
+
* - 上下文窗口:`context_config` 最大 `token_count` → 区域兜底。
|
|
134
|
+
* - 思考:`thinking_config` / `is_reasoning`;输入模态:`is_vl`。
|
|
135
|
+
* - 输出上限:目录不报,取 {@link QODER_MAX_OUTPUT_TOKENS}。
|
|
136
|
+
*/
|
|
137
|
+
export declare function entryFromQoderRecord(record: QoderUpstreamModelRecord, region: QoderRegion): QoderModelEntry | null;
|
|
138
|
+
/**
|
|
139
|
+
* 解析上游 `GET {base}/algo/api/v2/model/list?Encode=1` 的应答。
|
|
140
|
+
*
|
|
141
|
+
* 应答形状 `{ chat: [...] }`(逐字 pi-provider `updateQoderModelsCache` 的读取)。
|
|
142
|
+
* 无 key / 无 display_name / 显式 `enable:false` 的条目被丢弃。
|
|
143
|
+
*
|
|
144
|
+
* @returns 能力行,顺序与上游一致;解析不出任何东西时是空数组。
|
|
145
|
+
*/
|
|
146
|
+
export declare function parseQoderModelListing(payload: unknown, region: QoderRegion): QoderModelEntry[];
|
|
147
|
+
/** 随包发布的全球区目录(能力兜底,登录后被运行时目录顶替)。 */
|
|
148
|
+
export declare const QODER_MODEL_CATALOG_GLOBAL: readonly QoderModelEntry[];
|
|
149
|
+
/** 随包发布的中国站目录。 */
|
|
150
|
+
export declare const QODER_MODEL_CATALOG_CN: readonly QoderModelEntry[];
|
|
151
|
+
/** 一个区域的随包兜底表。 */
|
|
152
|
+
export declare function bundledQoderCatalog(region: QoderRegion): readonly QoderModelEntry[];
|
|
153
|
+
/**
|
|
154
|
+
* 首次安装默认勾选的模型。
|
|
155
|
+
*
|
|
156
|
+
* 本线路的三态里「没挑过」是 `null`(不过滤),不是一张 id 表,所以这里刻意是
|
|
157
|
+
* 空数组、且**不再**参与设置装配——它只是历史常量,保留是为了不打断已有的导入面。
|
|
158
|
+
*/
|
|
159
|
+
export declare const DEFAULT_VISIBLE_MODEL_IDS: readonly string[];
|
|
160
|
+
/**
|
|
161
|
+
* 未知模型的**未声明**行。
|
|
162
|
+
*
|
|
163
|
+
* 什么都不主张:`reasoningEfforts: []`(不发思考字段)、`supportsImages: false`
|
|
164
|
+
* (不认图比乱认图安全)、窗口取区域兜底。未声明行**默认可见**:协议面是固定的
|
|
165
|
+
* COSY 对话面,调它是合法的,未知的只是能力(与 step-code 同一决定,与 glm 相反)。
|
|
166
|
+
*/
|
|
167
|
+
export declare function undeclaredQoderModelEntry(id: string, options?: {
|
|
168
|
+
region?: QoderRegion;
|
|
169
|
+
upstreamKey?: string;
|
|
170
|
+
}): QoderModelEntry;
|
|
171
|
+
/**
|
|
172
|
+
* 查一行模型能力;给定目录里没有时返回**未声明行**而不是 undefined。
|
|
173
|
+
* 先按公开 id 精确匹配,再按上游 key 匹配(请求面拿的是 key),都不中才未声明。
|
|
174
|
+
*/
|
|
175
|
+
export declare function resolveQoderModel(id: string, catalog: readonly QoderModelEntry[], region?: QoderRegion): QoderModelEntry;
|
|
176
|
+
/** 该模型真实接受的思考档位;不在目录里时是空数组(即「不发任何思考控制字段」)。 */
|
|
177
|
+
export declare function qoderReasoningEfforts(id: string, catalog: readonly QoderModelEntry[]): readonly QoderReasoningEffort[];
|
|
178
|
+
/** 该模型的输出上限;不在目录里时取 {@link QODER_MAX_OUTPUT_TOKENS}。 */
|
|
179
|
+
export declare function maxOutputTokensFor(id: string, catalog: readonly QoderModelEntry[]): number;
|
|
180
|
+
/** 该模型的上下文窗口;不在目录里时取区域兜底。 */
|
|
181
|
+
export declare function defaultContextWindowFor(id: string, catalog: readonly QoderModelEntry[], region?: QoderRegion): number;
|
|
182
|
+
/** 目录里的全部公开 id。 */
|
|
183
|
+
export declare function listModelIds(catalog: readonly QoderModelEntry[]): string[];
|
|
184
|
+
/**
|
|
185
|
+
* 把用户存下来的白名单收敛到「这个部署此刻真的有的模型」上。
|
|
186
|
+
*
|
|
187
|
+
* 为什么必须收敛:白名单是用户昨天在**昨天的目录**上勾的,而本线路的目录是登录后
|
|
188
|
+
* 从上游实时发现的(随包表只是兜底)。上游下线一个模型、或用户换了一个区登录,
|
|
189
|
+
* 残留的 id 就会一直留在设置里——它既让「已选 N / M」的分子大于目录条目数,
|
|
190
|
+
* 也让卡片上出现一个勾着却根本不存在的行。
|
|
191
|
+
*
|
|
192
|
+
* 口径只有这一处:适配器的过滤(listModels)与状态面的勾选标记(getQoderStatus)
|
|
193
|
+
* 都从这里读,避免两边各写一份「什么算可用」而慢慢漂移。
|
|
194
|
+
*
|
|
195
|
+
* @param stored - 存下来的选择:`null` = 不过滤(原样返回 null),否则是白名单。
|
|
196
|
+
* @param available - 当前目录里真实存在的 id。
|
|
197
|
+
* @returns `null`(不过滤)或收敛后的白名单;保持 `stored` 的顺序并去重。
|
|
198
|
+
*/
|
|
199
|
+
export declare function convergeQoderEnabledModelIds(stored: readonly string[] | null, available: readonly string[]): string[] | null;
|
|
200
|
+
/** 目录条目数,供 hub 概览显示「M 个模型可用」。 */
|
|
201
|
+
export declare function catalogSize(catalog: readonly QoderModelEntry[]): number;
|
|
202
|
+
/** {@link catalogSize} 的别名(与兄弟线路的调用形状一致)。 */
|
|
203
|
+
export declare const catalogTotal: typeof catalogSize;
|
|
204
|
+
/**
|
|
205
|
+
* 从一行能力生成设置卡上的一句话描述(四个要素:思考形态 / 档位 / 输入模态 / 上下文窗口)。
|
|
206
|
+
*
|
|
207
|
+
* 由数据生成而不是逐行手写,是为了让文案**不可能与能力表漂移**(同 step-code 的
|
|
208
|
+
* describeStepCodeModel,连理由都同源)。
|
|
209
|
+
*/
|
|
210
|
+
export declare function describeQoderModel(entry: QoderModelEntry, prefix?: string): string;
|
|
211
|
+
/** 用户设置对目录装配的两处覆盖。 */
|
|
212
|
+
export interface QoderCatalogOptionOverrides {
|
|
213
|
+
/**
|
|
214
|
+
* 用户勾选的模型 id,**三态**(与 token-store 的 `QoderModelSettings` 同源):
|
|
215
|
+
*
|
|
216
|
+
* - `null` / 缺省 = 不过滤,目录里的每一行都勾上;
|
|
217
|
+
* - `[]` = 用户明确全关,一个都不勾;
|
|
218
|
+
* - 非空 = 白名单,只有列出的那些勾上。
|
|
219
|
+
*/
|
|
220
|
+
enabledModelIds?: readonly string[] | null;
|
|
221
|
+
/** 逐模型上下文窗口覆盖;null / 非正数表示用目录默认值。 */
|
|
222
|
+
contextWindowOverrides?: Readonly<Record<string, number | null | undefined>>;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* 把目录装配成设置面的模型行。
|
|
226
|
+
*
|
|
227
|
+
* `hint` 在这里生成(而不是写死在表里),所以「文案与能力表一致」是结构保证的。
|
|
228
|
+
* 未声明行**默认可见**(见 {@link undeclaredQoderModelEntry})。
|
|
229
|
+
*/
|
|
230
|
+
export declare function catalogModelOptions(catalog: readonly QoderModelEntry[], overrides?: QoderCatalogOptionOverrides): QoderModelOption[];
|
|
231
|
+
//# sourceMappingURL=model-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/host/qoder/model-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EACZ,MAAM,iCAAiC,CAAA;AAUxC;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAA;IACnB,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAA;IACd,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB;IAChB,OAAO,EAAE,SAAS,WAAW,EAAE,CAAA;IAC/B,8EAA8E;IAC9E,SAAS,EAAE,OAAO,CAAA;IAClB,2CAA2C;IAC3C,gBAAgB,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACjD,kDAAkD;IAClD,mBAAmB,EAAE,OAAO,CAAA;IAC5B,iCAAiC;IACjC,cAAc,EAAE,OAAO,CAAA;IACvB,0DAA0D;IAC1D,oBAAoB,EAAE,MAAM,CAAA;IAC5B,4CAA4C;IAC5C,gBAAgB,EAAE,MAAM,CAAA;IACxB,gCAAgC;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED,6DAA6D;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