@code-yeongyu/senpi-ai 2026.9.30 → 2026.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +189 -19
- package/dist/api/anthropic-messages.js +168 -32
- package/dist/api/azure-openai-responses.js +23 -10
- package/dist/api/bedrock-converse-stream.js +12 -4
- package/dist/api/cloudflare-workers-ai-system-one.d.ts +4 -0
- package/dist/api/cloudflare-workers-ai-system-one.js +43 -0
- package/dist/api/cloudflare-workers-ai-system-one.lazy.d.ts +3 -0
- package/dist/api/cloudflare-workers-ai-system-one.lazy.js +4 -0
- package/dist/api/cloudflare.d.ts +2 -0
- package/dist/api/cloudflare.js +2 -0
- package/dist/api/context-room.d.ts +2 -2
- package/dist/api/cursor-agent.js +19 -10
- package/dist/api/devin-agent/request.d.ts +9 -9
- package/dist/api/devin-agent/request.js +14 -10
- package/dist/api/google-generative-ai.js +20 -80
- package/dist/api/google-shared.d.ts +13 -4
- package/dist/api/google-shared.js +54 -4
- package/dist/api/google-vertex.js +19 -62
- package/dist/api/llama-cpp-classify.d.ts +33 -0
- package/dist/api/llama-cpp-classify.js +365 -0
- package/dist/api/llama-cpp-classify.lazy.d.ts +3 -0
- package/dist/api/llama-cpp-classify.lazy.js +4 -0
- package/dist/api/mistral-conversations.d.ts +1 -1
- package/dist/api/mistral-conversations.js +36 -29
- package/dist/api/openai-codex-responses.d.ts +1 -1
- package/dist/api/openai-codex-responses.js +72 -37
- package/dist/api/openai-completions.d.ts +3 -2
- package/dist/api/openai-completions.js +76 -50
- package/dist/api/openai-images-params.d.ts +2 -2
- package/dist/api/openai-images.d.ts +1 -1
- package/dist/api/openai-responses-shared.d.ts +31 -8
- package/dist/api/openai-responses-shared.js +115 -27
- package/dist/api/openai-responses.d.ts +1 -1
- package/dist/api/openai-responses.js +38 -33
- package/dist/api/openrouter-images.d.ts +2 -1
- package/dist/api/openrouter-images.js +1 -0
- package/dist/api/pi-messages.d.ts +3 -3
- package/dist/api/pi-messages.js +3 -2
- package/dist/api/simple-options.d.ts +2 -2
- package/dist/api/simple-options.js +1 -0
- package/dist/api/system-one-shared.d.ts +23 -0
- package/dist/api/system-one-shared.js +183 -0
- package/dist/api/transform-messages.js +5 -2
- package/dist/api/typesafe-system-one.d.ts +4 -0
- package/dist/api/typesafe-system-one.js +19 -0
- package/dist/api/typesafe-system-one.lazy.d.ts +3 -0
- package/dist/api/typesafe-system-one.lazy.js +4 -0
- package/dist/api-registry.d.ts +3 -3
- package/dist/auth/helpers.js +1 -1
- package/dist/auth/oauth/anthropic-callback-listener.js +1 -1
- package/dist/auth/oauth/callback-server.d.ts +55 -0
- package/dist/auth/oauth/callback-server.js +146 -0
- package/dist/auth/oauth/chatgpt-subscription.d.ts +1 -1
- package/dist/auth/oauth/chatgpt-subscription.js +20 -124
- package/dist/auth/oauth/devin-callback.js +1 -1
- package/dist/auth/oauth/load.d.ts +4 -0
- package/dist/auth/oauth/load.js +10 -0
- package/dist/auth/oauth/meta.d.ts +17 -0
- package/dist/auth/oauth/meta.js +190 -0
- package/dist/auth/oauth/openai-chatgpt.d.ts +9 -0
- package/dist/auth/oauth/openai-chatgpt.js +266 -0
- package/dist/auth/oauth/openrouter.d.ts +1 -1
- package/dist/auth/oauth/openrouter.js +19 -138
- package/dist/auth/oauth/radius.d.ts +1 -1
- package/dist/auth/oauth/radius.js +21 -89
- package/dist/auth/resolve.d.ts +3 -8
- package/dist/auth/resolve.js +3 -18
- package/dist/auth/types.d.ts +10 -1
- package/dist/bun-oauth.js +4 -0
- package/dist/cli.js +3 -1
- package/dist/compat.js +17 -14
- package/dist/env-api-keys.js +2 -0
- package/dist/image-models.d.ts +19 -8
- package/dist/image-models.js +14 -13
- package/dist/images-api-registry.d.ts +8 -8
- package/dist/images.d.ts +7 -2
- package/dist/images.js +5 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/model-catalog.d.ts +27 -9
- package/dist/model-catalog.js +24 -2
- package/dist/model.d.ts +13 -13
- package/dist/models-store.d.ts +3 -2
- package/dist/models.d.ts +106 -36
- package/dist/models.generated.d.ts +142 -42
- package/dist/models.generated.js +142 -42
- package/dist/models.js +174 -36
- package/dist/providers/alibaba-token-plan.models.d.ts +4 -2
- package/dist/providers/alibaba-token-plan.models.js +4 -2
- package/dist/providers/all.d.ts +72 -19
- package/dist/providers/all.js +28 -22
- package/dist/providers/amazon-bedrock.models.d.ts +4 -2
- package/dist/providers/amazon-bedrock.models.js +4 -2
- package/dist/providers/ant-ling.models.d.ts +4 -2
- package/dist/providers/ant-ling.models.js +4 -2
- package/dist/providers/anthropic.models.d.ts +4 -2
- package/dist/providers/anthropic.models.js +4 -2
- package/dist/providers/azure-openai-responses.models.d.ts +4 -2
- package/dist/providers/azure-openai-responses.models.js +4 -2
- package/dist/providers/bai.models.d.ts +4 -2
- package/dist/providers/bai.models.js +4 -2
- package/dist/providers/baseten.models.d.ts +4 -2
- package/dist/providers/baseten.models.js +4 -2
- package/dist/providers/cerebras.models.d.ts +4 -2
- package/dist/providers/cerebras.models.js +4 -2
- package/dist/providers/chatgpt-subscription.models.d.ts +4 -2
- package/dist/providers/chatgpt-subscription.models.js +4 -2
- package/dist/providers/cloudflare-ai-gateway.models.d.ts +4 -2
- package/dist/providers/cloudflare-ai-gateway.models.js +4 -2
- package/dist/providers/cloudflare-stream.d.ts +6 -2
- package/dist/providers/cloudflare-stream.js +6 -0
- package/dist/providers/cloudflare-workers-ai.js +10 -3
- package/dist/providers/cloudflare-workers-ai.models.d.ts +4 -2
- package/dist/providers/cloudflare-workers-ai.models.js +4 -2
- package/dist/providers/data/.manifest.json +1 -1
- package/dist/providers/data/alibaba-token-plan.json +1 -1
- package/dist/providers/data/amazon-bedrock.json +1 -1
- package/dist/providers/data/ant-ling.json +1 -1
- package/dist/providers/data/anthropic.json +1 -1
- package/dist/providers/data/azure-openai-responses.json +1 -1
- package/dist/providers/data/bai.json +1 -1
- package/dist/providers/data/baseten.json +1 -1
- package/dist/providers/data/cerebras.json +1 -1
- package/dist/providers/data/chatgpt-subscription.json +1 -1
- package/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/dist/providers/data/deepseek.json +1 -1
- package/dist/providers/data/fireworks.json +1 -1
- package/dist/providers/data/github-copilot.json +1 -1
- package/dist/providers/data/google-vertex.json +1 -1
- package/dist/providers/data/google.json +1 -1
- package/dist/providers/data/groq.json +1 -1
- package/dist/providers/data/huggingface.json +1 -1
- package/dist/providers/data/meta.json +1 -0
- package/dist/providers/data/minimax-cn.json +1 -1
- package/dist/providers/data/minimax.json +1 -1
- package/dist/providers/data/mistral.json +1 -1
- package/dist/providers/data/moonshotai-cn.json +1 -1
- package/dist/providers/data/moonshotai.json +1 -1
- package/dist/providers/data/nvidia.json +1 -1
- package/dist/providers/data/openai.json +1 -1
- package/dist/providers/data/opencode-go.json +1 -1
- package/dist/providers/data/opencode.json +1 -1
- package/dist/providers/data/opengateway.json +1 -1
- package/dist/providers/data/openrouter.json +1 -1
- package/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/dist/providers/data/qwen-token-plan.json +1 -1
- package/dist/providers/data/radius.json +1 -0
- package/dist/providers/data/together.json +1 -1
- package/dist/providers/data/typesafe.json +1 -0
- package/dist/providers/data/venice.json +1 -1
- package/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/dist/providers/data/xai.json +1 -1
- package/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/dist/providers/data/xiaomi.json +1 -1
- package/dist/providers/data/zai-coding-cn.json +1 -1
- package/dist/providers/data/zai.json +1 -1
- package/dist/providers/deepseek.models.d.ts +4 -2
- package/dist/providers/deepseek.models.js +4 -2
- package/dist/providers/faux.d.ts +7 -2
- package/dist/providers/faux.js +31 -22
- package/dist/providers/fireworks.models.d.ts +4 -2
- package/dist/providers/fireworks.models.js +4 -2
- package/dist/providers/github-copilot.models.d.ts +4 -2
- package/dist/providers/github-copilot.models.js +4 -2
- package/dist/providers/google-vertex.models.d.ts +4 -2
- package/dist/providers/google-vertex.models.js +4 -2
- package/dist/providers/google.models.d.ts +4 -2
- package/dist/providers/google.models.js +4 -2
- package/dist/providers/groq.models.d.ts +4 -2
- package/dist/providers/groq.models.js +4 -2
- package/dist/providers/huggingface.models.d.ts +4 -2
- package/dist/providers/huggingface.models.js +4 -2
- package/dist/providers/images/register-builtins.d.ts +2 -2
- package/dist/providers/kimi-coding.models.d.ts +54 -7
- package/dist/providers/kimi-coding.models.js +34 -7
- package/dist/providers/meta.d.ts +3 -0
- package/dist/providers/meta.js +24 -0
- package/dist/providers/meta.models.d.ts +6 -0
- package/dist/providers/meta.models.js +8 -0
- package/dist/providers/minimax-cn.models.d.ts +4 -2
- package/dist/providers/minimax-cn.models.js +4 -2
- package/dist/providers/minimax.models.d.ts +4 -2
- package/dist/providers/minimax.models.js +4 -2
- package/dist/providers/mistral.models.d.ts +4 -2
- package/dist/providers/mistral.models.js +4 -2
- package/dist/providers/moonshotai-cn.models.d.ts +4 -2
- package/dist/providers/moonshotai-cn.models.js +4 -2
- package/dist/providers/moonshotai.models.d.ts +4 -2
- package/dist/providers/moonshotai.models.js +4 -2
- package/dist/providers/nvidia.models.d.ts +4 -2
- package/dist/providers/nvidia.models.js +4 -2
- package/dist/providers/openai.js +4 -2
- package/dist/providers/openai.models.d.ts +4 -2
- package/dist/providers/openai.models.js +4 -2
- package/dist/providers/opencode-go.models.d.ts +4 -2
- package/dist/providers/opencode-go.models.js +4 -2
- package/dist/providers/opencode.d.ts +3 -1
- package/dist/providers/opencode.js +5 -2
- package/dist/providers/opencode.models.d.ts +4 -2
- package/dist/providers/opencode.models.js +4 -2
- package/dist/providers/opengateway.models.d.ts +4 -2
- package/dist/providers/opengateway.models.js +4 -2
- package/dist/providers/openrouter.js +11 -2
- package/dist/providers/openrouter.models.d.ts +4 -2
- package/dist/providers/openrouter.models.js +4 -2
- package/dist/providers/qwen-token-plan-cn.models.d.ts +4 -2
- package/dist/providers/qwen-token-plan-cn.models.js +4 -2
- package/dist/providers/qwen-token-plan-individual.models.d.ts +4 -2
- package/dist/providers/qwen-token-plan-individual.models.js +4 -2
- package/dist/providers/qwen-token-plan.models.d.ts +4 -2
- package/dist/providers/qwen-token-plan.models.js +4 -2
- package/dist/providers/radius.js +19 -5
- package/dist/providers/radius.models.d.ts +6 -0
- package/dist/providers/radius.models.js +8 -0
- package/dist/providers/together.models.d.ts +4 -2
- package/dist/providers/together.models.js +4 -2
- package/dist/providers/typesafe.d.ts +3 -0
- package/dist/providers/typesafe.js +18 -0
- package/dist/providers/typesafe.models.d.ts +6 -0
- package/dist/providers/typesafe.models.js +8 -0
- package/dist/providers/venice.models.d.ts +4 -2
- package/dist/providers/venice.models.js +4 -2
- package/dist/providers/vercel-ai-gateway.js +5 -2
- package/dist/providers/vercel-ai-gateway.models.d.ts +4 -2
- package/dist/providers/vercel-ai-gateway.models.js +4 -2
- package/dist/providers/xai.models.d.ts +4 -2
- package/dist/providers/xai.models.js +4 -2
- package/dist/providers/xiaomi-token-plan-ams.models.d.ts +4 -2
- package/dist/providers/xiaomi-token-plan-ams.models.js +4 -2
- package/dist/providers/xiaomi-token-plan-cn.models.d.ts +4 -2
- package/dist/providers/xiaomi-token-plan-cn.models.js +4 -2
- package/dist/providers/xiaomi-token-plan-sgp.models.d.ts +4 -2
- package/dist/providers/xiaomi-token-plan-sgp.models.js +4 -2
- package/dist/providers/xiaomi.models.d.ts +4 -2
- package/dist/providers/xiaomi.models.js +4 -2
- package/dist/providers/zai-coding-cn.models.d.ts +4 -2
- package/dist/providers/zai-coding-cn.models.js +4 -2
- package/dist/providers/zai.models.d.ts +4 -2
- package/dist/providers/zai.models.js +4 -2
- package/dist/tool-call-middleware/context-transformer.d.ts +8 -5
- package/dist/tool-call-middleware/context-transformer.js +44 -15
- package/dist/types.d.ts +262 -28
- package/dist/utils/diagnostics.d.ts +3 -2
- package/dist/utils/estimate.d.ts +2 -2
- package/dist/utils/estimate.js +22 -30
- package/dist/utils/headers.d.ts +1 -1
- package/dist/utils/headers.js +10 -8
- package/dist/utils/model-operations.d.ts +11 -0
- package/dist/utils/model-operations.js +47 -0
- package/dist/utils/models-error.d.ts +8 -0
- package/dist/utils/models-error.js +18 -0
- package/dist/utils/overflow.d.ts +1 -0
- package/dist/utils/overflow.js +11 -5
- package/dist/utils/prompt-cache-ttl.js +10 -3
- package/dist/utils/retry.js +9 -0
- package/dist/utils/text.d.ts +9 -1
- package/dist/utils/text.js +26 -0
- package/dist/utils/transcript.d.ts +85 -0
- package/dist/utils/transcript.js +205 -0
- package/package.json +3 -4
- package/dist/image-models.generated.d.ts +0 -925
- package/dist/image-models.generated.js +0 -927
- package/dist/images-models.d.ts +0 -95
- package/dist/images-models.js +0 -141
- package/dist/providers/openai-images.d.ts +0 -3
- package/dist/providers/openai-images.js +0 -16
- package/dist/providers/openrouter-images.d.ts +0 -3
- package/dist/providers/openrouter-images.js +0 -22
- /package/dist/{auth/oauth → utils}/oauth-page.d.ts +0 -0
- /package/dist/{auth/oauth → utils}/oauth-page.js +0 -0
package/dist/models.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type AuthResolutionOverrides } from "./auth/resolve.ts";
|
|
2
|
-
import type { AuthCheck, AuthContext, AuthInteraction, AuthOperationOptions, AuthResult, AuthType, Credential, CredentialStore, ProviderAuth } from "./auth/types.ts";
|
|
2
|
+
import type { AuthCheck, AuthContext, AuthInteraction, AuthOperationOptions, AuthResult, AuthType, Credential, CredentialStore, LoginOptions, ProviderAuth } from "./auth/types.ts";
|
|
3
3
|
import { type ModelsStore, type ModelsStoreEntry } from "./models-store.ts";
|
|
4
|
-
import type { Api, ApiStreamOptions, AssistantMessage, AssistantMessageEventStream, Context, DeferredCancelOptions, DeferredFetchOptions, DeferredHandle, Model, ModelThinkingLevel, ProviderHeaders, ProviderStreams, SimpleStreamOptions, ThinkingLevelMap, Usage } from "./types.ts";
|
|
4
|
+
import type { AnyModel, Api, ApiStreamOptions, AssistantImages, AssistantMessage, AssistantMessageEventStream, ClassifierApi, ClassifierContext, ClassifierModel, ClassifierOptions, ClassifierResult, Context, DeferredCancelOptions, DeferredFetchOptions, DeferredHandle, ImageApi, ImageModel, ImagesContext, ImagesOptions, Model, ModelThinkingLevel, ModelType, ModelTypeMap, ProviderClassifier, ProviderHeaders, ProviderImages, ProviderStreams, SimpleStreamOptions, ThinkingLevelMap, TranscriptContext, Usage } from "./types.ts";
|
|
5
5
|
import type { RetryPolicyProfile } from "./utils/retry-profile/types.ts";
|
|
6
6
|
export { ModelsError, type ModelsErrorCode, PROVIDER_NOT_CONFIGURED_PREFIX, providerNotConfiguredMessage, } from "./auth/resolve.ts";
|
|
7
|
+
export { getModelType, isModelType } from "./utils/model-operations.ts";
|
|
7
8
|
export interface ModelsPublication {
|
|
8
9
|
/** Provider-selected persisted catalog. Omit to leave storage unchanged; null deletes it. */
|
|
9
10
|
persist?: ModelsStoreEntry | null;
|
|
@@ -47,14 +48,20 @@ export type ModelsApiStreamOptions<TApi extends Api> = ApiStreamOptions<TApi> &
|
|
|
47
48
|
export type ModelsSimpleStreamOptions = SimpleStreamOptions & ModelsRequestTransforms;
|
|
48
49
|
export type ModelsDeferredFetchOptions = DeferredFetchOptions & ModelsRequestTransforms;
|
|
49
50
|
export type ModelsDeferredCancelOptions = DeferredCancelOptions & ModelsRequestTransforms;
|
|
51
|
+
export type ModelsImagesOptions = ImagesOptions & ModelsRequestTransforms;
|
|
52
|
+
export type ModelsClassifierOptions = ClassifierOptions & ModelsRequestTransforms;
|
|
53
|
+
/** Any model a provider with chat APIs `TApi` can list. */
|
|
54
|
+
type ProviderModel<TApi extends Api> = Model<TApi> | ImageModel<ImageApi> | ClassifierModel<ClassifierApi>;
|
|
50
55
|
/**
|
|
51
56
|
* A provider is the concrete runtime unit. It owns id/name/base metadata,
|
|
52
|
-
* auth methods, model listing, and
|
|
57
|
+
* auth methods, model listing, and the operations its models support
|
|
58
|
+
* (streaming, image generation, classification).
|
|
53
59
|
*
|
|
54
|
-
* `TApi` lets concrete provider factories declare which APIs their models
|
|
60
|
+
* `TApi` lets concrete provider factories declare which chat APIs their models
|
|
55
61
|
* use (e.g. `openaiProvider(): Provider<"openai-responses" | "openai-completions">`),
|
|
56
|
-
* giving typed model lists to direct factory users.
|
|
57
|
-
*
|
|
62
|
+
* giving typed chat model lists to direct factory users. Other model types use
|
|
63
|
+
* their operation-specific API unions. Inside a `Models` collection providers
|
|
64
|
+
* are held as `Provider<Api>`.
|
|
58
65
|
*/
|
|
59
66
|
export interface Provider<TApi extends Api = Api> {
|
|
60
67
|
readonly id: string;
|
|
@@ -72,12 +79,19 @@ export interface Provider<TApi extends Api = Api> {
|
|
|
72
79
|
*/
|
|
73
80
|
readonly auth: ProviderAuth;
|
|
74
81
|
/**
|
|
75
|
-
* Current known models, sync. Static providers return their catalog;
|
|
76
|
-
* dynamic providers return the list as of the last `refreshModels()`
|
|
77
|
-
*
|
|
82
|
+
* Current known chat models, sync. Static providers return their catalog;
|
|
83
|
+
* dynamic providers return the list as of the last `refreshModels()` (empty
|
|
84
|
+
* before the first). Must not throw; `Models` treats a throwing
|
|
78
85
|
* implementation as having no models.
|
|
79
86
|
*/
|
|
80
87
|
getModels(): readonly Model<TApi>[];
|
|
88
|
+
/**
|
|
89
|
+
* Current known models of every type, sync, with the same contract as
|
|
90
|
+
* `getModels()`. Providers with only chat models may omit it; `Models` then
|
|
91
|
+
* uses `getModels()`. Model ids are unique within each type; one upstream
|
|
92
|
+
* model may have separate entries for different operations.
|
|
93
|
+
*/
|
|
94
|
+
getAllModels?(): readonly ProviderModel<TApi>[];
|
|
81
95
|
/**
|
|
82
96
|
* Dynamic providers only: restore `context.stored` and optionally fetch a newer list using
|
|
83
97
|
* the effective credential. Implementations retain their previous list on failure, publish
|
|
@@ -87,33 +101,54 @@ export interface Provider<TApi extends Api = Api> {
|
|
|
87
101
|
refreshModels?(context: RefreshModelsContext): Promise<void>;
|
|
88
102
|
/**
|
|
89
103
|
* Optional provider policy for credential-specific model availability.
|
|
90
|
-
* `getModels()` remains the complete synchronous catalog; `Models.getAvailable()`
|
|
104
|
+
* `getModels()` remains the complete synchronous chat catalog; `Models.getAvailable()`
|
|
91
105
|
* applies this filter after confirming that provider auth is configured.
|
|
92
106
|
*/
|
|
93
107
|
filterModels?(models: readonly Model<TApi>[], credential: Credential | undefined): readonly Model<TApi>[];
|
|
94
|
-
|
|
95
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Optional credential-specific availability policy across every model type.
|
|
110
|
+
* Without it, `Models.getAllAvailable()` applies `filterModels` to chat models
|
|
111
|
+
* and keeps every other model.
|
|
112
|
+
*/
|
|
113
|
+
filterAllModels?(models: readonly ProviderModel<TApi>[], credential: Credential | undefined): readonly ProviderModel<TApi>[];
|
|
114
|
+
/** Stream a normalized transcript. `Models` normalizes the caller's `Context` before dispatching here. */
|
|
115
|
+
stream<T extends TApi>(model: Model<T>, context: TranscriptContext, options?: ApiStreamOptions<T>): AssistantMessageEventStream;
|
|
116
|
+
streamSimple(model: Model<TApi>, context: TranscriptContext, options?: SimpleStreamOptions): AssistantMessageEventStream;
|
|
96
117
|
fetchDeferred?(model: Model<TApi>, handle: DeferredHandle, options?: DeferredFetchOptions): AssistantMessageEventStream;
|
|
97
118
|
cancelDeferred?(model: Model<TApi>, handle: DeferredHandle, options?: DeferredCancelOptions): Promise<void>;
|
|
119
|
+
/** Present when the provider supports dedicated image models. Never rejects. */
|
|
120
|
+
generateImages?(model: ImageModel<ImageApi>, context: ImagesContext, options?: ImagesOptions): Promise<AssistantImages>;
|
|
121
|
+
/** Present when the provider supports structured classifier models. Never rejects. */
|
|
122
|
+
classify?(model: ClassifierModel<ClassifierApi>, context: ClassifierContext, options?: ClassifierOptions): Promise<ClassifierResult>;
|
|
98
123
|
}
|
|
99
124
|
/**
|
|
100
|
-
* Runtime collection of providers plus auth application and
|
|
101
|
-
* convenience. Providers own
|
|
125
|
+
* Runtime collection of providers plus auth application and request
|
|
126
|
+
* convenience. Providers own request behavior; `Models` resolves auth and
|
|
102
127
|
* delegates each request to the provider that owns the model.
|
|
128
|
+
*
|
|
129
|
+
* Read accessors come in three flavors: the unqualified ones (`getModels`,
|
|
130
|
+
* `getModel`, `getAvailable`) return chat models, the `*OfType` accessors
|
|
131
|
+
* return one model type, and `getAllModels`/`getAllAvailable` return every type.
|
|
103
132
|
*/
|
|
104
133
|
export interface Models {
|
|
105
134
|
getProviders(): readonly Provider[];
|
|
106
135
|
getProvider(id: string): Provider | undefined;
|
|
107
136
|
/**
|
|
108
|
-
* Sync read of last-known models from one provider or all providers.
|
|
137
|
+
* Sync read of last-known chat models from one provider or all providers.
|
|
109
138
|
* Best-effort: a provider whose `getModels()` throws yields no models.
|
|
110
139
|
*/
|
|
111
140
|
getModels(provider?: string): readonly Model<Api>[];
|
|
112
141
|
/**
|
|
113
|
-
* Sync runtime model lookup against last-known lists. Dynamic model lists
|
|
142
|
+
* Sync runtime chat model lookup against last-known lists. Dynamic model lists
|
|
114
143
|
* are typed as `Model<Api>`; narrow with the `hasApi()` type guard.
|
|
115
144
|
*/
|
|
116
145
|
getModel(provider: string, id: string): Model<Api> | undefined;
|
|
146
|
+
/** Sync read of last-known models of one type from one provider or all providers. */
|
|
147
|
+
getModelsOfType<TType extends ModelType>(type: TType, provider?: string): readonly ModelTypeMap[TType][];
|
|
148
|
+
/** Sync runtime lookup of a model of one type against last-known lists. */
|
|
149
|
+
getModelOfType<TType extends ModelType>(type: TType, provider: string, id: string): ModelTypeMap[TType] | undefined;
|
|
150
|
+
/** Sync read of last-known models of every type from one provider or all providers. */
|
|
151
|
+
getAllModels(provider?: string): readonly AnyModel[];
|
|
117
152
|
/**
|
|
118
153
|
* Refresh selected configured dynamic providers concurrently (all when `providers` is omitted).
|
|
119
154
|
* Provider errors and cancellation are returned without rejecting; static, unknown, and
|
|
@@ -122,8 +157,12 @@ export interface Models {
|
|
|
122
157
|
refresh(options?: ModelsRefreshOptions): Promise<ModelsRefreshResult>;
|
|
123
158
|
/** Check whether a provider has complete auth configuration without refreshing OAuth. */
|
|
124
159
|
checkAuth(providerId: string, options?: AuthOperationOptions): Promise<AuthCheck | undefined>;
|
|
125
|
-
/** Return models whose providers have complete auth configuration. */
|
|
160
|
+
/** Return chat models whose providers have complete auth configuration. */
|
|
126
161
|
getAvailable(providerId?: string, options?: AuthOperationOptions): Promise<readonly Model<Api>[]>;
|
|
162
|
+
/** Return models of one type whose providers have complete auth configuration. */
|
|
163
|
+
getAvailableOfType<TType extends ModelType>(type: TType, providerId?: string, options?: AuthOperationOptions): Promise<readonly ModelTypeMap[TType][]>;
|
|
164
|
+
/** Return models of every type whose providers have complete auth configuration. */
|
|
165
|
+
getAllAvailable(providerId?: string, options?: AuthOperationOptions): Promise<readonly AnyModel[]>;
|
|
127
166
|
/**
|
|
128
167
|
* Resolve provider-scoped auth by provider id, or provider auth plus static
|
|
129
168
|
* model headers when passed a model. Includes a source label for status UI.
|
|
@@ -134,9 +173,9 @@ export interface Models {
|
|
|
134
173
|
* surface rejections as stream errors.
|
|
135
174
|
*/
|
|
136
175
|
getAuth(providerId: string, overrides?: AuthResolutionOverrides): Promise<AuthResult | undefined>;
|
|
137
|
-
getAuth(model:
|
|
176
|
+
getAuth(model: AnyModel, overrides?: AuthResolutionOverrides): Promise<AuthResult | undefined>;
|
|
138
177
|
/** Run a provider-owned login flow and persist its returned credential. */
|
|
139
|
-
login(providerId: string, type: AuthType, interaction: AuthInteraction): Promise<Credential>;
|
|
178
|
+
login(providerId: string, type: AuthType, interaction: AuthInteraction, options?: LoginOptions): Promise<Credential>;
|
|
140
179
|
/** Remove the stored credential for a provider. */
|
|
141
180
|
logout(providerId: string, options?: AuthOperationOptions & {
|
|
142
181
|
slotId?: string;
|
|
@@ -148,6 +187,14 @@ export interface Models {
|
|
|
148
187
|
streamDeferred(model: Model<Api>, handle: DeferredHandle, options?: ModelsDeferredFetchOptions): AssistantMessageEventStream;
|
|
149
188
|
fetchDeferred(model: Model<Api>, handle: DeferredHandle, options?: ModelsDeferredFetchOptions): Promise<AssistantMessage>;
|
|
150
189
|
cancelDeferred(model: Model<Api>, handle: DeferredHandle, options?: ModelsDeferredCancelOptions): Promise<void>;
|
|
190
|
+
/**
|
|
191
|
+
* Generate images through the owning provider with auth resolved like
|
|
192
|
+
* `stream()`. Never rejects: unknown providers, unconfigured auth, and
|
|
193
|
+
* providers without `generateImages` return an error `AssistantImages`.
|
|
194
|
+
*/
|
|
195
|
+
generateImages(model: ImageModel<ImageApi>, context: ImagesContext, options?: ModelsImagesOptions): Promise<AssistantImages>;
|
|
196
|
+
/** Classify structured state through the owning provider. Never rejects. */
|
|
197
|
+
classify(model: ClassifierModel<ClassifierApi>, context: ClassifierContext, options?: ModelsClassifierOptions): Promise<ClassifierResult>;
|
|
151
198
|
}
|
|
152
199
|
export interface MutableModels extends Models {
|
|
153
200
|
/** Upsert/replace by provider.id. Provider ids are unique. */
|
|
@@ -171,25 +218,45 @@ export interface CreateProviderOptions<TApi extends Api = Api> {
|
|
|
171
218
|
retryPolicy?: RetryPolicyProfile;
|
|
172
219
|
/** Required — every provider has auth semantics, even ambient/keyless ones. */
|
|
173
220
|
auth: ProviderAuth;
|
|
174
|
-
/** Static baseline model list (empty for purely dynamic providers). */
|
|
175
|
-
models: readonly Model<TApi>[];
|
|
176
|
-
/** Fetch a dynamic model overlay. createProvider restores and publishes it transactionally. */
|
|
177
|
-
fetchModels?: (context: RefreshModelsContext) => Promise<readonly Model<TApi>[]>;
|
|
178
221
|
/**
|
|
179
|
-
*
|
|
222
|
+
* Static baseline models of every type (empty for purely dynamic providers).
|
|
223
|
+
* Models without `type` are chat models.
|
|
224
|
+
*/
|
|
225
|
+
models: readonly ProviderModel<TApi>[];
|
|
226
|
+
/**
|
|
227
|
+
* Fetch a dynamic model overlay of every type. createProvider restores and
|
|
228
|
+
* publishes it transactionally and drops models of unknown types.
|
|
229
|
+
*/
|
|
230
|
+
fetchModels?: (context: RefreshModelsContext) => Promise<readonly ProviderModel<TApi>[]>;
|
|
231
|
+
/**
|
|
232
|
+
* Optional transform applied to restored stored chat models before publication,
|
|
180
233
|
* letting a provider migrate an old catalog shape without a network refresh.
|
|
181
|
-
* A throwing transform publishes the
|
|
234
|
+
* Non-chat models are published unchanged. A throwing transform publishes the
|
|
235
|
+
* stored list unchanged.
|
|
182
236
|
*/
|
|
183
237
|
restoreModels?: (models: readonly Model<TApi>[]) => readonly Model<TApi>[];
|
|
238
|
+
/** Credential-specific chat model availability. See `Provider.filterModels`. */
|
|
184
239
|
filterModels?: (models: readonly Model<TApi>[], credential: Credential | undefined) => readonly Model<TApi>[];
|
|
185
|
-
/**
|
|
186
|
-
|
|
240
|
+
/** Credential-specific availability across every model type. See `Provider.filterAllModels`. */
|
|
241
|
+
filterAllModels?: (models: readonly ProviderModel<TApi>[], credential: Credential | undefined) => readonly ProviderModel<TApi>[];
|
|
242
|
+
/**
|
|
243
|
+
* Chat implementation: a single one for all chat models, or a map keyed by
|
|
244
|
+
* `model.api` for mixed-API providers. Optional when `images` or
|
|
245
|
+
* `classifiers` is given.
|
|
246
|
+
*/
|
|
247
|
+
api?: ProviderStreams | Partial<Record<TApi, ProviderStreams>>;
|
|
248
|
+
/** Image-generation implementations keyed by `model.api`. */
|
|
249
|
+
images?: Partial<Record<ImageApi, ProviderImages>>;
|
|
250
|
+
/** Classifier implementations keyed by `model.api`. */
|
|
251
|
+
classifiers?: Partial<Record<ClassifierApi, ProviderClassifier>>;
|
|
187
252
|
}
|
|
188
253
|
/**
|
|
189
254
|
* Builds a provider from parts. Built-in provider factories and models.json
|
|
190
|
-
* custom providers both go through this. A single `api` streams all
|
|
191
|
-
* an `api` map dispatches on `model.api`, and a model whose api has
|
|
192
|
-
* produces a stream error.
|
|
255
|
+
* custom providers both go through this. A single `api` streams all chat
|
|
256
|
+
* models; an `api` map dispatches on `model.api`, and a model whose api has
|
|
257
|
+
* no entry produces a stream error. One-shot operation maps dispatch on
|
|
258
|
+
* `model.api` the same way. At least one concrete implementation across
|
|
259
|
+
* `api`/`images`/`classifiers` is required; empty maps are rejected.
|
|
193
260
|
*/
|
|
194
261
|
export declare function createProvider<TApi extends Api = Api>(input: CreateProviderOptions<TApi>): Provider<TApi>;
|
|
195
262
|
/**
|
|
@@ -201,9 +268,11 @@ export declare function createProvider<TApi extends Api = Api>(input: CreateProv
|
|
|
201
268
|
* // model: Model<"anthropic-messages">, stream options fully typed
|
|
202
269
|
* }
|
|
203
270
|
* ```
|
|
271
|
+
*
|
|
272
|
+
* Non-chat models never match, even when their api id equals `api`.
|
|
204
273
|
*/
|
|
205
|
-
export declare function hasApi<TApi extends Api>(model:
|
|
206
|
-
export declare function calculateCost
|
|
274
|
+
export declare function hasApi<TApi extends Api>(model: AnyModel, api: TApi): model is Model<TApi>;
|
|
275
|
+
export declare function calculateCost(model: AnyModel, usage: Usage): Usage["cost"];
|
|
207
276
|
/** Infer documented OpenAI reasoning controls only when generated metadata is absent. */
|
|
208
277
|
export declare function inferOpenAIThinkingLevelMap<TApi extends Api>(model: Model<TApi>): ThinkingLevelMap | undefined;
|
|
209
278
|
export declare function getSupportedThinkingLevels<TApi extends Api>(model: Model<TApi>): ModelThinkingLevel[];
|
|
@@ -219,8 +288,9 @@ export declare function supportsXhigh<TApi extends Api>(model: Model<TApi>): boo
|
|
|
219
288
|
/**
|
|
220
289
|
* Whether the model exposes the `max` tier.
|
|
221
290
|
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
291
|
+
* Discovery writes valid endpoint efforts as an authoritative `thinkingLevelMap`; unusable
|
|
292
|
+
* advertised efforts disable reasoning, while absent metadata leaves the model map-less. A map-less
|
|
293
|
+
* model then inherits max from an exact-id built-in catalog entry before the legacy id floors apply.
|
|
224
294
|
*/
|
|
225
295
|
export declare function supportsMax<TApi extends Api>(model: Model<TApi>): boolean;
|
|
226
296
|
/**
|
|
@@ -230,8 +300,8 @@ export declare function supportsMax<TApi extends Api>(model: Model<TApi>): boole
|
|
|
230
300
|
*/
|
|
231
301
|
export declare function supportsConfigurationUpdate<TApi extends Api>(model: Model<TApi>): boolean;
|
|
232
302
|
/**
|
|
233
|
-
* Check if two models are equal by comparing
|
|
303
|
+
* Check if two models are equal by comparing their type, id, and provider.
|
|
234
304
|
* Returns false if either model is null or undefined.
|
|
235
305
|
*/
|
|
236
|
-
export declare function modelsAreEqual
|
|
306
|
+
export declare function modelsAreEqual(a: AnyModel | null | undefined, b: AnyModel | null | undefined): boolean;
|
|
237
307
|
//# sourceMappingURL=models.d.ts.map
|
|
@@ -1,45 +1,48 @@
|
|
|
1
|
-
import { ALIBABA_TOKEN_PLAN_MODELS } from "./providers/alibaba-token-plan.models.ts";
|
|
2
|
-
import { AMAZON_BEDROCK_MODELS } from "./providers/amazon-bedrock.models.ts";
|
|
3
|
-
import { ANT_LING_MODELS } from "./providers/ant-ling.models.ts";
|
|
4
|
-
import { ANTHROPIC_MODELS } from "./providers/anthropic.models.ts";
|
|
5
|
-
import { AZURE_OPENAI_RESPONSES_MODELS } from "./providers/azure-openai-responses.models.ts";
|
|
6
|
-
import { BAI_MODELS } from "./providers/bai.models.ts";
|
|
7
|
-
import { BASETEN_MODELS } from "./providers/baseten.models.ts";
|
|
8
|
-
import { CEREBRAS_MODELS } from "./providers/cerebras.models.ts";
|
|
9
|
-
import { CHATGPT_SUBSCRIPTION_MODELS } from "./providers/chatgpt-subscription.models.ts";
|
|
10
|
-
import { CLOUDFLARE_AI_GATEWAY_MODELS } from "./providers/cloudflare-ai-gateway.models.ts";
|
|
11
|
-
import { CLOUDFLARE_WORKERS_AI_MODELS } from "./providers/cloudflare-workers-ai.models.ts";
|
|
12
|
-
import { DEEPSEEK_MODELS } from "./providers/deepseek.models.ts";
|
|
13
|
-
import { FIREWORKS_MODELS } from "./providers/fireworks.models.ts";
|
|
14
|
-
import { GITHUB_COPILOT_MODELS } from "./providers/github-copilot.models.ts";
|
|
15
|
-
import { GOOGLE_MODELS } from "./providers/google.models.ts";
|
|
16
|
-
import { GOOGLE_VERTEX_MODELS } from "./providers/google-vertex.models.ts";
|
|
17
|
-
import { GROQ_MODELS } from "./providers/groq.models.ts";
|
|
18
|
-
import { HUGGINGFACE_MODELS } from "./providers/huggingface.models.ts";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
1
|
+
import { ALIBABA_TOKEN_PLAN_CLASSIFIER_MODELS, ALIBABA_TOKEN_PLAN_IMAGE_MODELS, ALIBABA_TOKEN_PLAN_MODELS } from "./providers/alibaba-token-plan.models.ts";
|
|
2
|
+
import { AMAZON_BEDROCK_CLASSIFIER_MODELS, AMAZON_BEDROCK_IMAGE_MODELS, AMAZON_BEDROCK_MODELS } from "./providers/amazon-bedrock.models.ts";
|
|
3
|
+
import { ANT_LING_CLASSIFIER_MODELS, ANT_LING_IMAGE_MODELS, ANT_LING_MODELS } from "./providers/ant-ling.models.ts";
|
|
4
|
+
import { ANTHROPIC_CLASSIFIER_MODELS, ANTHROPIC_IMAGE_MODELS, ANTHROPIC_MODELS } from "./providers/anthropic.models.ts";
|
|
5
|
+
import { AZURE_OPENAI_RESPONSES_CLASSIFIER_MODELS, AZURE_OPENAI_RESPONSES_IMAGE_MODELS, AZURE_OPENAI_RESPONSES_MODELS } from "./providers/azure-openai-responses.models.ts";
|
|
6
|
+
import { BAI_CLASSIFIER_MODELS, BAI_IMAGE_MODELS, BAI_MODELS } from "./providers/bai.models.ts";
|
|
7
|
+
import { BASETEN_CLASSIFIER_MODELS, BASETEN_IMAGE_MODELS, BASETEN_MODELS } from "./providers/baseten.models.ts";
|
|
8
|
+
import { CEREBRAS_CLASSIFIER_MODELS, CEREBRAS_IMAGE_MODELS, CEREBRAS_MODELS } from "./providers/cerebras.models.ts";
|
|
9
|
+
import { CHATGPT_SUBSCRIPTION_CLASSIFIER_MODELS, CHATGPT_SUBSCRIPTION_IMAGE_MODELS, CHATGPT_SUBSCRIPTION_MODELS } from "./providers/chatgpt-subscription.models.ts";
|
|
10
|
+
import { CLOUDFLARE_AI_GATEWAY_CLASSIFIER_MODELS, CLOUDFLARE_AI_GATEWAY_IMAGE_MODELS, CLOUDFLARE_AI_GATEWAY_MODELS } from "./providers/cloudflare-ai-gateway.models.ts";
|
|
11
|
+
import { CLOUDFLARE_WORKERS_AI_CLASSIFIER_MODELS, CLOUDFLARE_WORKERS_AI_IMAGE_MODELS, CLOUDFLARE_WORKERS_AI_MODELS } from "./providers/cloudflare-workers-ai.models.ts";
|
|
12
|
+
import { DEEPSEEK_CLASSIFIER_MODELS, DEEPSEEK_IMAGE_MODELS, DEEPSEEK_MODELS } from "./providers/deepseek.models.ts";
|
|
13
|
+
import { FIREWORKS_CLASSIFIER_MODELS, FIREWORKS_IMAGE_MODELS, FIREWORKS_MODELS } from "./providers/fireworks.models.ts";
|
|
14
|
+
import { GITHUB_COPILOT_CLASSIFIER_MODELS, GITHUB_COPILOT_IMAGE_MODELS, GITHUB_COPILOT_MODELS } from "./providers/github-copilot.models.ts";
|
|
15
|
+
import { GOOGLE_CLASSIFIER_MODELS, GOOGLE_IMAGE_MODELS, GOOGLE_MODELS } from "./providers/google.models.ts";
|
|
16
|
+
import { GOOGLE_VERTEX_CLASSIFIER_MODELS, GOOGLE_VERTEX_IMAGE_MODELS, GOOGLE_VERTEX_MODELS } from "./providers/google-vertex.models.ts";
|
|
17
|
+
import { GROQ_CLASSIFIER_MODELS, GROQ_IMAGE_MODELS, GROQ_MODELS } from "./providers/groq.models.ts";
|
|
18
|
+
import { HUGGINGFACE_CLASSIFIER_MODELS, HUGGINGFACE_IMAGE_MODELS, HUGGINGFACE_MODELS } from "./providers/huggingface.models.ts";
|
|
19
|
+
import { META_CLASSIFIER_MODELS, META_IMAGE_MODELS, META_MODELS } from "./providers/meta.models.ts";
|
|
20
|
+
import { MINIMAX_CLASSIFIER_MODELS, MINIMAX_IMAGE_MODELS, MINIMAX_MODELS } from "./providers/minimax.models.ts";
|
|
21
|
+
import { MINIMAX_CN_CLASSIFIER_MODELS, MINIMAX_CN_IMAGE_MODELS, MINIMAX_CN_MODELS } from "./providers/minimax-cn.models.ts";
|
|
22
|
+
import { MISTRAL_CLASSIFIER_MODELS, MISTRAL_IMAGE_MODELS, MISTRAL_MODELS } from "./providers/mistral.models.ts";
|
|
23
|
+
import { MOONSHOTAI_CLASSIFIER_MODELS, MOONSHOTAI_IMAGE_MODELS, MOONSHOTAI_MODELS } from "./providers/moonshotai.models.ts";
|
|
24
|
+
import { MOONSHOTAI_CN_CLASSIFIER_MODELS, MOONSHOTAI_CN_IMAGE_MODELS, MOONSHOTAI_CN_MODELS } from "./providers/moonshotai-cn.models.ts";
|
|
25
|
+
import { NVIDIA_CLASSIFIER_MODELS, NVIDIA_IMAGE_MODELS, NVIDIA_MODELS } from "./providers/nvidia.models.ts";
|
|
26
|
+
import { OPENAI_CLASSIFIER_MODELS, OPENAI_IMAGE_MODELS, OPENAI_MODELS } from "./providers/openai.models.ts";
|
|
27
|
+
import { OPENCODE_CLASSIFIER_MODELS, OPENCODE_IMAGE_MODELS, OPENCODE_MODELS } from "./providers/opencode.models.ts";
|
|
28
|
+
import { OPENCODE_GO_CLASSIFIER_MODELS, OPENCODE_GO_IMAGE_MODELS, OPENCODE_GO_MODELS } from "./providers/opencode-go.models.ts";
|
|
29
|
+
import { OPENGATEWAY_CLASSIFIER_MODELS, OPENGATEWAY_IMAGE_MODELS, OPENGATEWAY_MODELS } from "./providers/opengateway.models.ts";
|
|
30
|
+
import { OPENROUTER_CLASSIFIER_MODELS, OPENROUTER_IMAGE_MODELS, OPENROUTER_MODELS } from "./providers/openrouter.models.ts";
|
|
31
|
+
import { QWEN_TOKEN_PLAN_CLASSIFIER_MODELS, QWEN_TOKEN_PLAN_IMAGE_MODELS, QWEN_TOKEN_PLAN_MODELS } from "./providers/qwen-token-plan.models.ts";
|
|
32
|
+
import { QWEN_TOKEN_PLAN_CN_CLASSIFIER_MODELS, QWEN_TOKEN_PLAN_CN_IMAGE_MODELS, QWEN_TOKEN_PLAN_CN_MODELS } from "./providers/qwen-token-plan-cn.models.ts";
|
|
33
|
+
import { QWEN_TOKEN_PLAN_INDIVIDUAL_CLASSIFIER_MODELS, QWEN_TOKEN_PLAN_INDIVIDUAL_IMAGE_MODELS, QWEN_TOKEN_PLAN_INDIVIDUAL_MODELS } from "./providers/qwen-token-plan-individual.models.ts";
|
|
34
|
+
import { RADIUS_CLASSIFIER_MODELS, RADIUS_IMAGE_MODELS, RADIUS_MODELS } from "./providers/radius.models.ts";
|
|
35
|
+
import { TOGETHER_CLASSIFIER_MODELS, TOGETHER_IMAGE_MODELS, TOGETHER_MODELS } from "./providers/together.models.ts";
|
|
36
|
+
import { TYPESAFE_CLASSIFIER_MODELS, TYPESAFE_IMAGE_MODELS, TYPESAFE_MODELS } from "./providers/typesafe.models.ts";
|
|
37
|
+
import { VENICE_CLASSIFIER_MODELS, VENICE_IMAGE_MODELS, VENICE_MODELS } from "./providers/venice.models.ts";
|
|
38
|
+
import { VERCEL_AI_GATEWAY_CLASSIFIER_MODELS, VERCEL_AI_GATEWAY_IMAGE_MODELS, VERCEL_AI_GATEWAY_MODELS } from "./providers/vercel-ai-gateway.models.ts";
|
|
39
|
+
import { XAI_CLASSIFIER_MODELS, XAI_IMAGE_MODELS, XAI_MODELS } from "./providers/xai.models.ts";
|
|
40
|
+
import { XIAOMI_CLASSIFIER_MODELS, XIAOMI_IMAGE_MODELS, XIAOMI_MODELS } from "./providers/xiaomi.models.ts";
|
|
41
|
+
import { XIAOMI_TOKEN_PLAN_AMS_CLASSIFIER_MODELS, XIAOMI_TOKEN_PLAN_AMS_IMAGE_MODELS, XIAOMI_TOKEN_PLAN_AMS_MODELS } from "./providers/xiaomi-token-plan-ams.models.ts";
|
|
42
|
+
import { XIAOMI_TOKEN_PLAN_CN_CLASSIFIER_MODELS, XIAOMI_TOKEN_PLAN_CN_IMAGE_MODELS, XIAOMI_TOKEN_PLAN_CN_MODELS } from "./providers/xiaomi-token-plan-cn.models.ts";
|
|
43
|
+
import { XIAOMI_TOKEN_PLAN_SGP_CLASSIFIER_MODELS, XIAOMI_TOKEN_PLAN_SGP_IMAGE_MODELS, XIAOMI_TOKEN_PLAN_SGP_MODELS } from "./providers/xiaomi-token-plan-sgp.models.ts";
|
|
44
|
+
import { ZAI_CLASSIFIER_MODELS, ZAI_IMAGE_MODELS, ZAI_MODELS } from "./providers/zai.models.ts";
|
|
45
|
+
import { ZAI_CODING_CN_CLASSIFIER_MODELS, ZAI_CODING_CN_IMAGE_MODELS, ZAI_CODING_CN_MODELS } from "./providers/zai-coding-cn.models.ts";
|
|
43
46
|
export declare const MODELS: {
|
|
44
47
|
readonly "alibaba-token-plan": typeof ALIBABA_TOKEN_PLAN_MODELS;
|
|
45
48
|
readonly "amazon-bedrock": typeof AMAZON_BEDROCK_MODELS;
|
|
@@ -59,6 +62,7 @@ export declare const MODELS: {
|
|
|
59
62
|
readonly "google-vertex": typeof GOOGLE_VERTEX_MODELS;
|
|
60
63
|
readonly "groq": typeof GROQ_MODELS;
|
|
61
64
|
readonly "huggingface": typeof HUGGINGFACE_MODELS;
|
|
65
|
+
readonly "meta": typeof META_MODELS;
|
|
62
66
|
readonly "minimax": typeof MINIMAX_MODELS;
|
|
63
67
|
readonly "minimax-cn": typeof MINIMAX_CN_MODELS;
|
|
64
68
|
readonly "mistral": typeof MISTRAL_MODELS;
|
|
@@ -73,7 +77,9 @@ export declare const MODELS: {
|
|
|
73
77
|
readonly "qwen-token-plan": typeof QWEN_TOKEN_PLAN_MODELS;
|
|
74
78
|
readonly "qwen-token-plan-cn": typeof QWEN_TOKEN_PLAN_CN_MODELS;
|
|
75
79
|
readonly "qwen-token-plan-individual": typeof QWEN_TOKEN_PLAN_INDIVIDUAL_MODELS;
|
|
80
|
+
readonly "radius": typeof RADIUS_MODELS;
|
|
76
81
|
readonly "together": typeof TOGETHER_MODELS;
|
|
82
|
+
readonly "typesafe": typeof TYPESAFE_MODELS;
|
|
77
83
|
readonly "venice": typeof VENICE_MODELS;
|
|
78
84
|
readonly "vercel-ai-gateway": typeof VERCEL_AI_GATEWAY_MODELS;
|
|
79
85
|
readonly "xai": typeof XAI_MODELS;
|
|
@@ -84,4 +90,98 @@ export declare const MODELS: {
|
|
|
84
90
|
readonly "zai": typeof ZAI_MODELS;
|
|
85
91
|
readonly "zai-coding-cn": typeof ZAI_CODING_CN_MODELS;
|
|
86
92
|
};
|
|
93
|
+
export declare const IMAGE_MODELS: {
|
|
94
|
+
readonly "alibaba-token-plan": typeof ALIBABA_TOKEN_PLAN_IMAGE_MODELS;
|
|
95
|
+
readonly "amazon-bedrock": typeof AMAZON_BEDROCK_IMAGE_MODELS;
|
|
96
|
+
readonly "ant-ling": typeof ANT_LING_IMAGE_MODELS;
|
|
97
|
+
readonly "anthropic": typeof ANTHROPIC_IMAGE_MODELS;
|
|
98
|
+
readonly "azure-openai-responses": typeof AZURE_OPENAI_RESPONSES_IMAGE_MODELS;
|
|
99
|
+
readonly "bai": typeof BAI_IMAGE_MODELS;
|
|
100
|
+
readonly "baseten": typeof BASETEN_IMAGE_MODELS;
|
|
101
|
+
readonly "cerebras": typeof CEREBRAS_IMAGE_MODELS;
|
|
102
|
+
readonly "chatgpt-subscription": typeof CHATGPT_SUBSCRIPTION_IMAGE_MODELS;
|
|
103
|
+
readonly "cloudflare-ai-gateway": typeof CLOUDFLARE_AI_GATEWAY_IMAGE_MODELS;
|
|
104
|
+
readonly "cloudflare-workers-ai": typeof CLOUDFLARE_WORKERS_AI_IMAGE_MODELS;
|
|
105
|
+
readonly "deepseek": typeof DEEPSEEK_IMAGE_MODELS;
|
|
106
|
+
readonly "fireworks": typeof FIREWORKS_IMAGE_MODELS;
|
|
107
|
+
readonly "github-copilot": typeof GITHUB_COPILOT_IMAGE_MODELS;
|
|
108
|
+
readonly "google": typeof GOOGLE_IMAGE_MODELS;
|
|
109
|
+
readonly "google-vertex": typeof GOOGLE_VERTEX_IMAGE_MODELS;
|
|
110
|
+
readonly "groq": typeof GROQ_IMAGE_MODELS;
|
|
111
|
+
readonly "huggingface": typeof HUGGINGFACE_IMAGE_MODELS;
|
|
112
|
+
readonly "meta": typeof META_IMAGE_MODELS;
|
|
113
|
+
readonly "minimax": typeof MINIMAX_IMAGE_MODELS;
|
|
114
|
+
readonly "minimax-cn": typeof MINIMAX_CN_IMAGE_MODELS;
|
|
115
|
+
readonly "mistral": typeof MISTRAL_IMAGE_MODELS;
|
|
116
|
+
readonly "moonshotai": typeof MOONSHOTAI_IMAGE_MODELS;
|
|
117
|
+
readonly "moonshotai-cn": typeof MOONSHOTAI_CN_IMAGE_MODELS;
|
|
118
|
+
readonly "nvidia": typeof NVIDIA_IMAGE_MODELS;
|
|
119
|
+
readonly "openai": typeof OPENAI_IMAGE_MODELS;
|
|
120
|
+
readonly "opencode": typeof OPENCODE_IMAGE_MODELS;
|
|
121
|
+
readonly "opencode-go": typeof OPENCODE_GO_IMAGE_MODELS;
|
|
122
|
+
readonly "opengateway": typeof OPENGATEWAY_IMAGE_MODELS;
|
|
123
|
+
readonly "openrouter": typeof OPENROUTER_IMAGE_MODELS;
|
|
124
|
+
readonly "qwen-token-plan": typeof QWEN_TOKEN_PLAN_IMAGE_MODELS;
|
|
125
|
+
readonly "qwen-token-plan-cn": typeof QWEN_TOKEN_PLAN_CN_IMAGE_MODELS;
|
|
126
|
+
readonly "qwen-token-plan-individual": typeof QWEN_TOKEN_PLAN_INDIVIDUAL_IMAGE_MODELS;
|
|
127
|
+
readonly "radius": typeof RADIUS_IMAGE_MODELS;
|
|
128
|
+
readonly "together": typeof TOGETHER_IMAGE_MODELS;
|
|
129
|
+
readonly "typesafe": typeof TYPESAFE_IMAGE_MODELS;
|
|
130
|
+
readonly "venice": typeof VENICE_IMAGE_MODELS;
|
|
131
|
+
readonly "vercel-ai-gateway": typeof VERCEL_AI_GATEWAY_IMAGE_MODELS;
|
|
132
|
+
readonly "xai": typeof XAI_IMAGE_MODELS;
|
|
133
|
+
readonly "xiaomi": typeof XIAOMI_IMAGE_MODELS;
|
|
134
|
+
readonly "xiaomi-token-plan-ams": typeof XIAOMI_TOKEN_PLAN_AMS_IMAGE_MODELS;
|
|
135
|
+
readonly "xiaomi-token-plan-cn": typeof XIAOMI_TOKEN_PLAN_CN_IMAGE_MODELS;
|
|
136
|
+
readonly "xiaomi-token-plan-sgp": typeof XIAOMI_TOKEN_PLAN_SGP_IMAGE_MODELS;
|
|
137
|
+
readonly "zai": typeof ZAI_IMAGE_MODELS;
|
|
138
|
+
readonly "zai-coding-cn": typeof ZAI_CODING_CN_IMAGE_MODELS;
|
|
139
|
+
};
|
|
140
|
+
export declare const CLASSIFIER_MODELS: {
|
|
141
|
+
readonly "alibaba-token-plan": typeof ALIBABA_TOKEN_PLAN_CLASSIFIER_MODELS;
|
|
142
|
+
readonly "amazon-bedrock": typeof AMAZON_BEDROCK_CLASSIFIER_MODELS;
|
|
143
|
+
readonly "ant-ling": typeof ANT_LING_CLASSIFIER_MODELS;
|
|
144
|
+
readonly "anthropic": typeof ANTHROPIC_CLASSIFIER_MODELS;
|
|
145
|
+
readonly "azure-openai-responses": typeof AZURE_OPENAI_RESPONSES_CLASSIFIER_MODELS;
|
|
146
|
+
readonly "bai": typeof BAI_CLASSIFIER_MODELS;
|
|
147
|
+
readonly "baseten": typeof BASETEN_CLASSIFIER_MODELS;
|
|
148
|
+
readonly "cerebras": typeof CEREBRAS_CLASSIFIER_MODELS;
|
|
149
|
+
readonly "chatgpt-subscription": typeof CHATGPT_SUBSCRIPTION_CLASSIFIER_MODELS;
|
|
150
|
+
readonly "cloudflare-ai-gateway": typeof CLOUDFLARE_AI_GATEWAY_CLASSIFIER_MODELS;
|
|
151
|
+
readonly "cloudflare-workers-ai": typeof CLOUDFLARE_WORKERS_AI_CLASSIFIER_MODELS;
|
|
152
|
+
readonly "deepseek": typeof DEEPSEEK_CLASSIFIER_MODELS;
|
|
153
|
+
readonly "fireworks": typeof FIREWORKS_CLASSIFIER_MODELS;
|
|
154
|
+
readonly "github-copilot": typeof GITHUB_COPILOT_CLASSIFIER_MODELS;
|
|
155
|
+
readonly "google": typeof GOOGLE_CLASSIFIER_MODELS;
|
|
156
|
+
readonly "google-vertex": typeof GOOGLE_VERTEX_CLASSIFIER_MODELS;
|
|
157
|
+
readonly "groq": typeof GROQ_CLASSIFIER_MODELS;
|
|
158
|
+
readonly "huggingface": typeof HUGGINGFACE_CLASSIFIER_MODELS;
|
|
159
|
+
readonly "meta": typeof META_CLASSIFIER_MODELS;
|
|
160
|
+
readonly "minimax": typeof MINIMAX_CLASSIFIER_MODELS;
|
|
161
|
+
readonly "minimax-cn": typeof MINIMAX_CN_CLASSIFIER_MODELS;
|
|
162
|
+
readonly "mistral": typeof MISTRAL_CLASSIFIER_MODELS;
|
|
163
|
+
readonly "moonshotai": typeof MOONSHOTAI_CLASSIFIER_MODELS;
|
|
164
|
+
readonly "moonshotai-cn": typeof MOONSHOTAI_CN_CLASSIFIER_MODELS;
|
|
165
|
+
readonly "nvidia": typeof NVIDIA_CLASSIFIER_MODELS;
|
|
166
|
+
readonly "openai": typeof OPENAI_CLASSIFIER_MODELS;
|
|
167
|
+
readonly "opencode": typeof OPENCODE_CLASSIFIER_MODELS;
|
|
168
|
+
readonly "opencode-go": typeof OPENCODE_GO_CLASSIFIER_MODELS;
|
|
169
|
+
readonly "opengateway": typeof OPENGATEWAY_CLASSIFIER_MODELS;
|
|
170
|
+
readonly "openrouter": typeof OPENROUTER_CLASSIFIER_MODELS;
|
|
171
|
+
readonly "qwen-token-plan": typeof QWEN_TOKEN_PLAN_CLASSIFIER_MODELS;
|
|
172
|
+
readonly "qwen-token-plan-cn": typeof QWEN_TOKEN_PLAN_CN_CLASSIFIER_MODELS;
|
|
173
|
+
readonly "qwen-token-plan-individual": typeof QWEN_TOKEN_PLAN_INDIVIDUAL_CLASSIFIER_MODELS;
|
|
174
|
+
readonly "radius": typeof RADIUS_CLASSIFIER_MODELS;
|
|
175
|
+
readonly "together": typeof TOGETHER_CLASSIFIER_MODELS;
|
|
176
|
+
readonly "typesafe": typeof TYPESAFE_CLASSIFIER_MODELS;
|
|
177
|
+
readonly "venice": typeof VENICE_CLASSIFIER_MODELS;
|
|
178
|
+
readonly "vercel-ai-gateway": typeof VERCEL_AI_GATEWAY_CLASSIFIER_MODELS;
|
|
179
|
+
readonly "xai": typeof XAI_CLASSIFIER_MODELS;
|
|
180
|
+
readonly "xiaomi": typeof XIAOMI_CLASSIFIER_MODELS;
|
|
181
|
+
readonly "xiaomi-token-plan-ams": typeof XIAOMI_TOKEN_PLAN_AMS_CLASSIFIER_MODELS;
|
|
182
|
+
readonly "xiaomi-token-plan-cn": typeof XIAOMI_TOKEN_PLAN_CN_CLASSIFIER_MODELS;
|
|
183
|
+
readonly "xiaomi-token-plan-sgp": typeof XIAOMI_TOKEN_PLAN_SGP_CLASSIFIER_MODELS;
|
|
184
|
+
readonly "zai": typeof ZAI_CLASSIFIER_MODELS;
|
|
185
|
+
readonly "zai-coding-cn": typeof ZAI_CODING_CN_CLASSIFIER_MODELS;
|
|
186
|
+
};
|
|
87
187
|
//# sourceMappingURL=models.generated.d.ts.map
|