@omnicross/contracts 0.3.0 → 0.4.0
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/dist/account-tokens-types.d.cts +76 -1
- package/dist/account-tokens-types.d.ts +76 -1
- package/dist/canonical-models.cjs +49 -4
- package/dist/canonical-models.d.cts +1 -1
- package/dist/canonical-models.d.ts +1 -1
- package/dist/canonical-models.js +49 -4
- package/dist/endpoint-resolver.d.cts +1 -1
- package/dist/endpoint-resolver.d.ts +1 -1
- package/dist/index.cjs +328 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +328 -6
- package/dist/{llm-config-DeWNx1ig.d.cts → llm-config-CEZvId7g.d.cts} +18 -0
- package/dist/{llm-config-CKOaFFdy.d.ts → llm-config-Dxw7F1_U.d.ts} +18 -0
- package/dist/llm-config.d.cts +1 -1
- package/dist/llm-config.d.ts +1 -1
- package/dist/provider-presets/index.cjs +209 -0
- package/dist/provider-presets/index.d.cts +2 -2
- package/dist/provider-presets/index.d.ts +2 -2
- package/dist/provider-presets/index.js +209 -0
- package/dist/subscription-model-catalog.cjs +70 -2
- package/dist/subscription-model-catalog.d.cts +1 -1
- package/dist/subscription-model-catalog.d.ts +1 -1
- package/dist/subscription-model-catalog.js +70 -2
- package/dist/subscription-types.d.cts +1 -1
- package/dist/subscription-types.d.ts +1 -1
- package/dist/thinking-config.cjs +49 -4
- package/dist/thinking-config.d.cts +1 -1
- package/dist/thinking-config.d.ts +1 -1
- package/dist/thinking-config.js +49 -4
- package/package.json +1 -1
|
@@ -122,6 +122,72 @@ type GeminiTokenConfig = {
|
|
|
122
122
|
lastRefreshedAt?: string;
|
|
123
123
|
errorMessage?: string;
|
|
124
124
|
};
|
|
125
|
+
/**
|
|
126
|
+
* Kimi Code (Moonshot) token configuration. OAuth is a RFC 8628 device flow
|
|
127
|
+
* (`auth.kimi.com`); the access token serves BOTH inference
|
|
128
|
+
* (`api.kimi.com/coding/v1`, anthropic + openai faces) and the
|
|
129
|
+
* `/coding/v1/usages` quota endpoint. `accountId` is the access-token JWT's
|
|
130
|
+
* `user_id | sub` claim; `deviceId` backs the `X-Msh-Device-Id` fingerprint
|
|
131
|
+
* header Kimi expects (stable per account, minted at login).
|
|
132
|
+
*/
|
|
133
|
+
type KimiTokenConfig = {
|
|
134
|
+
authMethod: AuthMethod;
|
|
135
|
+
status: TokenStatus;
|
|
136
|
+
accessToken?: string;
|
|
137
|
+
refreshToken?: string;
|
|
138
|
+
expiresAt?: string;
|
|
139
|
+
accountId?: string;
|
|
140
|
+
deviceId?: string;
|
|
141
|
+
lastRefreshedAt?: string;
|
|
142
|
+
errorMessage?: string;
|
|
143
|
+
/** Managed-account credential warning (duplicate-token, projected on listing). */
|
|
144
|
+
syncWarning?: SyncWarningCode;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Grok (xAI SuperGrok) token configuration. OAuth is a RFC 8628 device flow
|
|
148
|
+
* at `auth.x.ai` (token endpoint resolved + host-pinned via OIDC discovery);
|
|
149
|
+
* the access token serves BOTH inference (`api.x.ai/v1/responses`) and the
|
|
150
|
+
* `cli-chat-proxy.grok.com/v1/billing` quota endpoint. `accountId` is the
|
|
151
|
+
* access-token JWT's `sub` claim.
|
|
152
|
+
*/
|
|
153
|
+
type GrokTokenConfig = {
|
|
154
|
+
authMethod: AuthMethod;
|
|
155
|
+
status: TokenStatus;
|
|
156
|
+
accessToken?: string;
|
|
157
|
+
refreshToken?: string;
|
|
158
|
+
expiresAt?: string;
|
|
159
|
+
accountId?: string;
|
|
160
|
+
lastRefreshedAt?: string;
|
|
161
|
+
errorMessage?: string;
|
|
162
|
+
/** Managed-account credential warning (duplicate-token, projected on listing). */
|
|
163
|
+
syncWarning?: SyncWarningCode;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* GitHub Copilot token configuration. OAuth is a RFC 8628 device flow at
|
|
167
|
+
* `github.com` (official Copilot CLI app, scope `read:user`); the minted
|
|
168
|
+
* `ghu_` token is LONG-LIVED — refresh is a LOCAL no-op (access and refresh
|
|
169
|
+
* are the same token, far-future expiry), so no refresh network call exists.
|
|
170
|
+
* Inference rides the Copilot API (`api.githubcopilot.com` by default; the
|
|
171
|
+
* plan-advertised `apiEndpoint` discovered at login wins); the quota endpoint
|
|
172
|
+
* is `api.github.com/copilot_internal/user`. `accountId` is the GitHub login.
|
|
173
|
+
*/
|
|
174
|
+
type CopilotTokenConfig = {
|
|
175
|
+
authMethod: AuthMethod;
|
|
176
|
+
status: TokenStatus;
|
|
177
|
+
accessToken?: string;
|
|
178
|
+
refreshToken?: string;
|
|
179
|
+
expiresAt?: string;
|
|
180
|
+
accountId?: string;
|
|
181
|
+
email?: string;
|
|
182
|
+
/** Plan-advertised Copilot API endpoint (from `copilot_internal/user.endpoints.api`). */
|
|
183
|
+
apiEndpoint?: string;
|
|
184
|
+
/** GitHub Enterprise domain (e.g. `company.ghe.com`); personal accounts leave it unset. */
|
|
185
|
+
enterpriseUrl?: string;
|
|
186
|
+
lastRefreshedAt?: string;
|
|
187
|
+
errorMessage?: string;
|
|
188
|
+
/** Managed-account credential warning (duplicate-token, projected on listing). */
|
|
189
|
+
syncWarning?: SyncWarningCode;
|
|
190
|
+
};
|
|
125
191
|
/**
|
|
126
192
|
* A single subscription account entry. The provider's existing token config
|
|
127
193
|
* is carried verbatim under a nested `tokens` field; entry metadata
|
|
@@ -210,6 +276,9 @@ type AccountTokensConfig = {
|
|
|
210
276
|
codex?: CodexTokenConfig;
|
|
211
277
|
gemini?: GeminiTokenConfig;
|
|
212
278
|
opencodego?: OpenCodeGoTokenConfig;
|
|
279
|
+
kimi?: KimiTokenConfig;
|
|
280
|
+
grok?: GrokTokenConfig;
|
|
281
|
+
copilot?: CopilotTokenConfig;
|
|
213
282
|
claudeAccounts?: SubscriptionAccountEntry<ClaudeTokenConfig>[];
|
|
214
283
|
activeClaudeAccountId?: string;
|
|
215
284
|
codexAccounts?: SubscriptionAccountEntry<CodexTokenConfig>[];
|
|
@@ -218,6 +287,12 @@ type AccountTokensConfig = {
|
|
|
218
287
|
activeGeminiAccountId?: string;
|
|
219
288
|
opencodegoAccounts?: SubscriptionAccountEntry<OpenCodeGoTokenConfig>[];
|
|
220
289
|
activeOpencodegoAccountId?: string;
|
|
290
|
+
kimiAccounts?: SubscriptionAccountEntry<KimiTokenConfig>[];
|
|
291
|
+
activeKimiAccountId?: string;
|
|
292
|
+
grokAccounts?: SubscriptionAccountEntry<GrokTokenConfig>[];
|
|
293
|
+
activeGrokAccountId?: string;
|
|
294
|
+
copilotAccounts?: SubscriptionAccountEntry<CopilotTokenConfig>[];
|
|
295
|
+
activeCopilotAccountId?: string;
|
|
221
296
|
updatedAt: string;
|
|
222
297
|
};
|
|
223
298
|
/**
|
|
@@ -340,4 +415,4 @@ type TokenExchangeRequest = {
|
|
|
340
415
|
state: string;
|
|
341
416
|
};
|
|
342
417
|
|
|
343
|
-
export type { AccountClientIdentity, AccountTokensConfig, AuthMethod, ClaudeAuthMethod, ClaudeTokenConfig, CodexTokenConfig, GeminiTokenConfig, OAuthParams, ProxyConfig, SanitizedProxyConfig, SubscriptionAccountEntry, SubscriptionAccountSanitized, SubscriptionLevel, SyncWarningCode, TokenExchangeRequest, TokenStatus };
|
|
418
|
+
export type { AccountClientIdentity, AccountTokensConfig, AuthMethod, ClaudeAuthMethod, ClaudeTokenConfig, CodexTokenConfig, CopilotTokenConfig, GeminiTokenConfig, GrokTokenConfig, KimiTokenConfig, OAuthParams, ProxyConfig, SanitizedProxyConfig, SubscriptionAccountEntry, SubscriptionAccountSanitized, SubscriptionLevel, SyncWarningCode, TokenExchangeRequest, TokenStatus };
|
|
@@ -122,6 +122,72 @@ type GeminiTokenConfig = {
|
|
|
122
122
|
lastRefreshedAt?: string;
|
|
123
123
|
errorMessage?: string;
|
|
124
124
|
};
|
|
125
|
+
/**
|
|
126
|
+
* Kimi Code (Moonshot) token configuration. OAuth is a RFC 8628 device flow
|
|
127
|
+
* (`auth.kimi.com`); the access token serves BOTH inference
|
|
128
|
+
* (`api.kimi.com/coding/v1`, anthropic + openai faces) and the
|
|
129
|
+
* `/coding/v1/usages` quota endpoint. `accountId` is the access-token JWT's
|
|
130
|
+
* `user_id | sub` claim; `deviceId` backs the `X-Msh-Device-Id` fingerprint
|
|
131
|
+
* header Kimi expects (stable per account, minted at login).
|
|
132
|
+
*/
|
|
133
|
+
type KimiTokenConfig = {
|
|
134
|
+
authMethod: AuthMethod;
|
|
135
|
+
status: TokenStatus;
|
|
136
|
+
accessToken?: string;
|
|
137
|
+
refreshToken?: string;
|
|
138
|
+
expiresAt?: string;
|
|
139
|
+
accountId?: string;
|
|
140
|
+
deviceId?: string;
|
|
141
|
+
lastRefreshedAt?: string;
|
|
142
|
+
errorMessage?: string;
|
|
143
|
+
/** Managed-account credential warning (duplicate-token, projected on listing). */
|
|
144
|
+
syncWarning?: SyncWarningCode;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Grok (xAI SuperGrok) token configuration. OAuth is a RFC 8628 device flow
|
|
148
|
+
* at `auth.x.ai` (token endpoint resolved + host-pinned via OIDC discovery);
|
|
149
|
+
* the access token serves BOTH inference (`api.x.ai/v1/responses`) and the
|
|
150
|
+
* `cli-chat-proxy.grok.com/v1/billing` quota endpoint. `accountId` is the
|
|
151
|
+
* access-token JWT's `sub` claim.
|
|
152
|
+
*/
|
|
153
|
+
type GrokTokenConfig = {
|
|
154
|
+
authMethod: AuthMethod;
|
|
155
|
+
status: TokenStatus;
|
|
156
|
+
accessToken?: string;
|
|
157
|
+
refreshToken?: string;
|
|
158
|
+
expiresAt?: string;
|
|
159
|
+
accountId?: string;
|
|
160
|
+
lastRefreshedAt?: string;
|
|
161
|
+
errorMessage?: string;
|
|
162
|
+
/** Managed-account credential warning (duplicate-token, projected on listing). */
|
|
163
|
+
syncWarning?: SyncWarningCode;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* GitHub Copilot token configuration. OAuth is a RFC 8628 device flow at
|
|
167
|
+
* `github.com` (official Copilot CLI app, scope `read:user`); the minted
|
|
168
|
+
* `ghu_` token is LONG-LIVED — refresh is a LOCAL no-op (access and refresh
|
|
169
|
+
* are the same token, far-future expiry), so no refresh network call exists.
|
|
170
|
+
* Inference rides the Copilot API (`api.githubcopilot.com` by default; the
|
|
171
|
+
* plan-advertised `apiEndpoint` discovered at login wins); the quota endpoint
|
|
172
|
+
* is `api.github.com/copilot_internal/user`. `accountId` is the GitHub login.
|
|
173
|
+
*/
|
|
174
|
+
type CopilotTokenConfig = {
|
|
175
|
+
authMethod: AuthMethod;
|
|
176
|
+
status: TokenStatus;
|
|
177
|
+
accessToken?: string;
|
|
178
|
+
refreshToken?: string;
|
|
179
|
+
expiresAt?: string;
|
|
180
|
+
accountId?: string;
|
|
181
|
+
email?: string;
|
|
182
|
+
/** Plan-advertised Copilot API endpoint (from `copilot_internal/user.endpoints.api`). */
|
|
183
|
+
apiEndpoint?: string;
|
|
184
|
+
/** GitHub Enterprise domain (e.g. `company.ghe.com`); personal accounts leave it unset. */
|
|
185
|
+
enterpriseUrl?: string;
|
|
186
|
+
lastRefreshedAt?: string;
|
|
187
|
+
errorMessage?: string;
|
|
188
|
+
/** Managed-account credential warning (duplicate-token, projected on listing). */
|
|
189
|
+
syncWarning?: SyncWarningCode;
|
|
190
|
+
};
|
|
125
191
|
/**
|
|
126
192
|
* A single subscription account entry. The provider's existing token config
|
|
127
193
|
* is carried verbatim under a nested `tokens` field; entry metadata
|
|
@@ -210,6 +276,9 @@ type AccountTokensConfig = {
|
|
|
210
276
|
codex?: CodexTokenConfig;
|
|
211
277
|
gemini?: GeminiTokenConfig;
|
|
212
278
|
opencodego?: OpenCodeGoTokenConfig;
|
|
279
|
+
kimi?: KimiTokenConfig;
|
|
280
|
+
grok?: GrokTokenConfig;
|
|
281
|
+
copilot?: CopilotTokenConfig;
|
|
213
282
|
claudeAccounts?: SubscriptionAccountEntry<ClaudeTokenConfig>[];
|
|
214
283
|
activeClaudeAccountId?: string;
|
|
215
284
|
codexAccounts?: SubscriptionAccountEntry<CodexTokenConfig>[];
|
|
@@ -218,6 +287,12 @@ type AccountTokensConfig = {
|
|
|
218
287
|
activeGeminiAccountId?: string;
|
|
219
288
|
opencodegoAccounts?: SubscriptionAccountEntry<OpenCodeGoTokenConfig>[];
|
|
220
289
|
activeOpencodegoAccountId?: string;
|
|
290
|
+
kimiAccounts?: SubscriptionAccountEntry<KimiTokenConfig>[];
|
|
291
|
+
activeKimiAccountId?: string;
|
|
292
|
+
grokAccounts?: SubscriptionAccountEntry<GrokTokenConfig>[];
|
|
293
|
+
activeGrokAccountId?: string;
|
|
294
|
+
copilotAccounts?: SubscriptionAccountEntry<CopilotTokenConfig>[];
|
|
295
|
+
activeCopilotAccountId?: string;
|
|
221
296
|
updatedAt: string;
|
|
222
297
|
};
|
|
223
298
|
/**
|
|
@@ -340,4 +415,4 @@ type TokenExchangeRequest = {
|
|
|
340
415
|
state: string;
|
|
341
416
|
};
|
|
342
417
|
|
|
343
|
-
export type { AccountClientIdentity, AccountTokensConfig, AuthMethod, ClaudeAuthMethod, ClaudeTokenConfig, CodexTokenConfig, GeminiTokenConfig, OAuthParams, ProxyConfig, SanitizedProxyConfig, SubscriptionAccountEntry, SubscriptionAccountSanitized, SubscriptionLevel, SyncWarningCode, TokenExchangeRequest, TokenStatus };
|
|
418
|
+
export type { AccountClientIdentity, AccountTokensConfig, AuthMethod, ClaudeAuthMethod, ClaudeTokenConfig, CodexTokenConfig, CopilotTokenConfig, GeminiTokenConfig, GrokTokenConfig, KimiTokenConfig, OAuthParams, ProxyConfig, SanitizedProxyConfig, SubscriptionAccountEntry, SubscriptionAccountSanitized, SubscriptionLevel, SyncWarningCode, TokenExchangeRequest, TokenStatus };
|
|
@@ -55,19 +55,56 @@ var ANTHROPIC_MODELS = {
|
|
|
55
55
|
"claude-opus-4-6[1m]": { category: "reasoning", contextLength: 1e6, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high", "xhigh", "max"], thinkingTokenLimit: { min: 1024, max: 128e3 } },
|
|
56
56
|
"claude-sonnet-4-6": { category: "chat", contextLength: 2e5, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high", "xhigh", "max"], thinkingTokenLimit: { min: 1024, max: 64e3 } },
|
|
57
57
|
"claude-sonnet-4-6[1m]": { category: "chat", contextLength: 1e6, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high", "xhigh", "max"], thinkingTokenLimit: { min: 1024, max: 64e3 } },
|
|
58
|
-
"claude-haiku-4-5": { category: "chat", contextLength: 2e5, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high", "xhigh", "max"], thinkingTokenLimit: { min: 1024, max: 64e3 } }
|
|
58
|
+
"claude-haiku-4-5": { category: "chat", contextLength: 2e5, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high", "xhigh", "max"], thinkingTokenLimit: { min: 1024, max: 64e3 } },
|
|
59
|
+
// Copilot-served variants (same model family on the Copilot API; context
|
|
60
|
+
// windows per the Copilot catalog where it diverges from the family default).
|
|
61
|
+
"claude-opus-4-5": { category: "reasoning", contextLength: 2e5, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true },
|
|
62
|
+
"claude-sonnet-4-5": { category: "chat", contextLength: 2e5, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true },
|
|
63
|
+
"claude-sonnet-4": { category: "chat", contextLength: 216e3, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true }
|
|
59
64
|
};
|
|
60
65
|
var GEMINI_MODELS = {
|
|
61
66
|
"gemini-3.5-flash": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 24576 } },
|
|
62
67
|
"gemini-3-flash": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 24576 } },
|
|
63
|
-
"gemini-3.1-pro": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 128, max: 32768 } }
|
|
68
|
+
"gemini-3.1-pro": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 128, max: 32768 } },
|
|
69
|
+
// Copilot-served variants (chat-completions wire on the Copilot API).
|
|
70
|
+
"gemini-3.1-pro-preview": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"] },
|
|
71
|
+
"gemini-3.6-flash": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"] },
|
|
72
|
+
"gemini-3.7-flash": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"] },
|
|
73
|
+
"gemini-3-pro-preview": { category: "chat", contextLength: 128e3, maxTokens: 65536, vision: true, functionCall: true, reasoning: true },
|
|
74
|
+
"gemini-3-flash-preview": { category: "chat", contextLength: 128e3, maxTokens: 65536, vision: true, functionCall: true, reasoning: true },
|
|
75
|
+
"gemini-2.5-pro": { category: "chat", contextLength: 128e3, maxTokens: 65536, vision: true, functionCall: true, reasoning: true }
|
|
64
76
|
};
|
|
65
77
|
var GROK_MODELS = {
|
|
66
78
|
"grok-4.5": { category: "chat", contextLength: 5e5, maxTokens: 32768, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
67
79
|
"grok-4.3": { category: "chat", contextLength: 1e6, maxTokens: 32768, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
68
80
|
"grok-4.20": { category: "chat", contextLength: 131072, maxTokens: 32768, vision: true, functionCall: true },
|
|
69
81
|
"grok-4.20-reasoning": { category: "reasoning", contextLength: 131072, maxTokens: 32768, reasoning: true, vision: true, functionCall: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
70
|
-
"grok-4.20-multi-agent": { category: "reasoning", contextLength: 131072, maxTokens: 32768, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } }
|
|
82
|
+
"grok-4.20-multi-agent": { category: "reasoning", contextLength: 131072, maxTokens: 32768, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
83
|
+
// SuperGrok subscription ids (Responses wire). Upstream context/output caps
|
|
84
|
+
// per the audit source; the effort-taking models accept low/medium/high only
|
|
85
|
+
// (minimal→low, xhigh/max→high), and the omit-effort models carry
|
|
86
|
+
// `thinkingLevels: ['none']` so the effort negotiation drops the
|
|
87
|
+
// `reasoning.effort` field entirely (sending it upstream is a 400).
|
|
88
|
+
"grok-4.6": { category: "chat", contextLength: 5e5, maxTokens: 5e5, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
89
|
+
"grok-4.20-0309-non-reasoning": { category: "chat", contextLength: 2e6, maxTokens: 2e6, vision: true, functionCall: true, thinkingLevels: ["none"] },
|
|
90
|
+
"grok-4.20-0309-reasoning": { category: "reasoning", contextLength: 2e6, maxTokens: 2e6, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none"] },
|
|
91
|
+
"grok-4.20-multi-agent-0309": { category: "reasoning", contextLength: 2e6, maxTokens: 2e6, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
92
|
+
"grok-build": { category: "reasoning", contextLength: 512e3, maxTokens: 512e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none"] },
|
|
93
|
+
"grok-build-0.1": { category: "reasoning", contextLength: 256e3, maxTokens: 256e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none"] },
|
|
94
|
+
"grok-composer-2.5-fast": { category: "chat", contextLength: 2e5, maxTokens: 2e5, functionCall: true, thinkingLevels: ["none"] }
|
|
95
|
+
};
|
|
96
|
+
var COPILOT_MODELS = {
|
|
97
|
+
"gpt-5.1-codex-max": { category: "code", contextLength: 272e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
98
|
+
"gpt-5.1-codex-mini": { category: "code", contextLength: 272e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
99
|
+
"gpt-5.2-codex": { category: "code", contextLength: 272e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
100
|
+
"gpt-5.1-codex": { category: "code", contextLength: 272e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
101
|
+
"gpt-5.1": { category: "reasoning", contextLength: 264e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
102
|
+
"gpt-5-mini": { category: "reasoning", contextLength: 264e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
103
|
+
"gpt-5.4-nano": { category: "reasoning", contextLength: 4e5, maxTokens: 128e3, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
104
|
+
"grok-code-fast-1": { category: "code", contextLength: 192e3, maxTokens: 32768, functionCall: true, reasoning: true },
|
|
105
|
+
"raptor-mini": { category: "reasoning", contextLength: 4e5, maxTokens: 65536, functionCall: true, reasoning: true, vision: true },
|
|
106
|
+
"mai-code-1-flash-picker": { category: "code", contextLength: 256e3, maxTokens: 65536, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"] },
|
|
107
|
+
"mai-code-1.1-flash": { category: "code", contextLength: 256e3, maxTokens: 65536, functionCall: true, reasoning: true, vision: true, thinkingLevels: ["none", "low", "medium", "high"] }
|
|
71
108
|
};
|
|
72
109
|
var DEEPSEEK_MODELS = {
|
|
73
110
|
"deepseek-v4-flash": { category: "chat", contextLength: 1e6, maxTokens: 384e3, functionCall: true, reasoning: true, thinkingLevels: ["none", "high", "max"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
@@ -77,6 +114,8 @@ var DEEPSEEK_MODELS = {
|
|
|
77
114
|
"deepseek-r1": { category: "reasoning", contextLength: 64e3, maxTokens: 8192, reasoning: true, thinkingTokenLimit: { min: 0, max: 32768 } }
|
|
78
115
|
};
|
|
79
116
|
var ZHIPU_MODELS = {
|
|
117
|
+
"glm-5.3": { category: "chat", contextLength: 1048576, maxTokens: 131072, functionCall: true },
|
|
118
|
+
"glm-5.3-flash": { category: "chat", contextLength: 1048576, maxTokens: 131072, functionCall: true },
|
|
80
119
|
"glm-5.2": { category: "chat", contextLength: 1048576, maxTokens: 131072, functionCall: true },
|
|
81
120
|
"glm-5": { category: "chat", contextLength: 2e5, maxTokens: 128e3, functionCall: true },
|
|
82
121
|
"glm-5.1": { category: "chat", contextLength: 2e5, maxTokens: 128e3, functionCall: true },
|
|
@@ -111,10 +150,15 @@ var TENCENT_HUNYUAN_MODELS = {
|
|
|
111
150
|
"hunyuan-turbos": { category: "chat", functionCall: true }
|
|
112
151
|
};
|
|
113
152
|
var MINIMAX_MODELS = {
|
|
153
|
+
"minimax-m3": { category: "code", contextLength: 204800, functionCall: true, reasoning: true },
|
|
154
|
+
"minimax-m2.7": { category: "code", contextLength: 204800, functionCall: true },
|
|
155
|
+
"minimax-m2.7-highspeed": { category: "code", contextLength: 204800, functionCall: true },
|
|
114
156
|
"minimax-m2.5": { category: "code", contextLength: 204800, functionCall: true },
|
|
115
157
|
"minimax-m2.5-highspeed": { category: "code", contextLength: 204800, functionCall: true },
|
|
158
|
+
"minimax-m2.5-lightning": { category: "code", contextLength: 204800, functionCall: true },
|
|
116
159
|
"minimax-m2.1": { category: "code", contextLength: 204800, functionCall: true },
|
|
117
|
-
"minimax-m2.1-
|
|
160
|
+
"minimax-m2.1-lightning": { category: "code", contextLength: 204800, functionCall: true },
|
|
161
|
+
"minimax-m2": { category: "code", contextLength: 204800, functionCall: true }
|
|
118
162
|
};
|
|
119
163
|
var XIAOMI_MIMO_CANONICAL = {
|
|
120
164
|
"mimo-v2.5": { category: "code", contextLength: 1e6, maxTokens: 32768, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
@@ -156,6 +200,7 @@ var VENDOR_GROUPS = [
|
|
|
156
200
|
{ name: "ANTHROPIC_MODELS", entries: ANTHROPIC_MODELS },
|
|
157
201
|
{ name: "GEMINI_MODELS", entries: GEMINI_MODELS },
|
|
158
202
|
{ name: "GROK_MODELS", entries: GROK_MODELS },
|
|
203
|
+
{ name: "COPILOT_MODELS", entries: COPILOT_MODELS },
|
|
159
204
|
{ name: "DEEPSEEK_MODELS", entries: DEEPSEEK_MODELS },
|
|
160
205
|
{ name: "ZHIPU_MODELS", entries: ZHIPU_MODELS },
|
|
161
206
|
{ name: "KIMI_MODELS", entries: KIMI_MODELS },
|
package/dist/canonical-models.js
CHANGED
|
@@ -26,19 +26,56 @@ var ANTHROPIC_MODELS = {
|
|
|
26
26
|
"claude-opus-4-6[1m]": { category: "reasoning", contextLength: 1e6, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high", "xhigh", "max"], thinkingTokenLimit: { min: 1024, max: 128e3 } },
|
|
27
27
|
"claude-sonnet-4-6": { category: "chat", contextLength: 2e5, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high", "xhigh", "max"], thinkingTokenLimit: { min: 1024, max: 64e3 } },
|
|
28
28
|
"claude-sonnet-4-6[1m]": { category: "chat", contextLength: 1e6, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high", "xhigh", "max"], thinkingTokenLimit: { min: 1024, max: 64e3 } },
|
|
29
|
-
"claude-haiku-4-5": { category: "chat", contextLength: 2e5, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high", "xhigh", "max"], thinkingTokenLimit: { min: 1024, max: 64e3 } }
|
|
29
|
+
"claude-haiku-4-5": { category: "chat", contextLength: 2e5, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high", "xhigh", "max"], thinkingTokenLimit: { min: 1024, max: 64e3 } },
|
|
30
|
+
// Copilot-served variants (same model family on the Copilot API; context
|
|
31
|
+
// windows per the Copilot catalog where it diverges from the family default).
|
|
32
|
+
"claude-opus-4-5": { category: "reasoning", contextLength: 2e5, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true },
|
|
33
|
+
"claude-sonnet-4-5": { category: "chat", contextLength: 2e5, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true },
|
|
34
|
+
"claude-sonnet-4": { category: "chat", contextLength: 216e3, maxTokens: 64e3, vision: true, functionCall: true, reasoning: true }
|
|
30
35
|
};
|
|
31
36
|
var GEMINI_MODELS = {
|
|
32
37
|
"gemini-3.5-flash": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 24576 } },
|
|
33
38
|
"gemini-3-flash": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 24576 } },
|
|
34
|
-
"gemini-3.1-pro": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 128, max: 32768 } }
|
|
39
|
+
"gemini-3.1-pro": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 128, max: 32768 } },
|
|
40
|
+
// Copilot-served variants (chat-completions wire on the Copilot API).
|
|
41
|
+
"gemini-3.1-pro-preview": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"] },
|
|
42
|
+
"gemini-3.6-flash": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"] },
|
|
43
|
+
"gemini-3.7-flash": { category: "chat", contextLength: 1e6, maxTokens: 65536, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"] },
|
|
44
|
+
"gemini-3-pro-preview": { category: "chat", contextLength: 128e3, maxTokens: 65536, vision: true, functionCall: true, reasoning: true },
|
|
45
|
+
"gemini-3-flash-preview": { category: "chat", contextLength: 128e3, maxTokens: 65536, vision: true, functionCall: true, reasoning: true },
|
|
46
|
+
"gemini-2.5-pro": { category: "chat", contextLength: 128e3, maxTokens: 65536, vision: true, functionCall: true, reasoning: true }
|
|
35
47
|
};
|
|
36
48
|
var GROK_MODELS = {
|
|
37
49
|
"grok-4.5": { category: "chat", contextLength: 5e5, maxTokens: 32768, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
38
50
|
"grok-4.3": { category: "chat", contextLength: 1e6, maxTokens: 32768, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
39
51
|
"grok-4.20": { category: "chat", contextLength: 131072, maxTokens: 32768, vision: true, functionCall: true },
|
|
40
52
|
"grok-4.20-reasoning": { category: "reasoning", contextLength: 131072, maxTokens: 32768, reasoning: true, vision: true, functionCall: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
41
|
-
"grok-4.20-multi-agent": { category: "reasoning", contextLength: 131072, maxTokens: 32768, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } }
|
|
53
|
+
"grok-4.20-multi-agent": { category: "reasoning", contextLength: 131072, maxTokens: 32768, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
54
|
+
// SuperGrok subscription ids (Responses wire). Upstream context/output caps
|
|
55
|
+
// per the audit source; the effort-taking models accept low/medium/high only
|
|
56
|
+
// (minimal→low, xhigh/max→high), and the omit-effort models carry
|
|
57
|
+
// `thinkingLevels: ['none']` so the effort negotiation drops the
|
|
58
|
+
// `reasoning.effort` field entirely (sending it upstream is a 400).
|
|
59
|
+
"grok-4.6": { category: "chat", contextLength: 5e5, maxTokens: 5e5, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
60
|
+
"grok-4.20-0309-non-reasoning": { category: "chat", contextLength: 2e6, maxTokens: 2e6, vision: true, functionCall: true, thinkingLevels: ["none"] },
|
|
61
|
+
"grok-4.20-0309-reasoning": { category: "reasoning", contextLength: 2e6, maxTokens: 2e6, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none"] },
|
|
62
|
+
"grok-4.20-multi-agent-0309": { category: "reasoning", contextLength: 2e6, maxTokens: 2e6, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
63
|
+
"grok-build": { category: "reasoning", contextLength: 512e3, maxTokens: 512e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none"] },
|
|
64
|
+
"grok-build-0.1": { category: "reasoning", contextLength: 256e3, maxTokens: 256e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none"] },
|
|
65
|
+
"grok-composer-2.5-fast": { category: "chat", contextLength: 2e5, maxTokens: 2e5, functionCall: true, thinkingLevels: ["none"] }
|
|
66
|
+
};
|
|
67
|
+
var COPILOT_MODELS = {
|
|
68
|
+
"gpt-5.1-codex-max": { category: "code", contextLength: 272e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
69
|
+
"gpt-5.1-codex-mini": { category: "code", contextLength: 272e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
70
|
+
"gpt-5.2-codex": { category: "code", contextLength: 272e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
71
|
+
"gpt-5.1-codex": { category: "code", contextLength: 272e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
72
|
+
"gpt-5.1": { category: "reasoning", contextLength: 264e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
73
|
+
"gpt-5-mini": { category: "reasoning", contextLength: 264e3, maxTokens: 128e3, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
74
|
+
"gpt-5.4-nano": { category: "reasoning", contextLength: 4e5, maxTokens: 128e3, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 128e3 } },
|
|
75
|
+
"grok-code-fast-1": { category: "code", contextLength: 192e3, maxTokens: 32768, functionCall: true, reasoning: true },
|
|
76
|
+
"raptor-mini": { category: "reasoning", contextLength: 4e5, maxTokens: 65536, functionCall: true, reasoning: true, vision: true },
|
|
77
|
+
"mai-code-1-flash-picker": { category: "code", contextLength: 256e3, maxTokens: 65536, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"] },
|
|
78
|
+
"mai-code-1.1-flash": { category: "code", contextLength: 256e3, maxTokens: 65536, functionCall: true, reasoning: true, vision: true, thinkingLevels: ["none", "low", "medium", "high"] }
|
|
42
79
|
};
|
|
43
80
|
var DEEPSEEK_MODELS = {
|
|
44
81
|
"deepseek-v4-flash": { category: "chat", contextLength: 1e6, maxTokens: 384e3, functionCall: true, reasoning: true, thinkingLevels: ["none", "high", "max"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
@@ -48,6 +85,8 @@ var DEEPSEEK_MODELS = {
|
|
|
48
85
|
"deepseek-r1": { category: "reasoning", contextLength: 64e3, maxTokens: 8192, reasoning: true, thinkingTokenLimit: { min: 0, max: 32768 } }
|
|
49
86
|
};
|
|
50
87
|
var ZHIPU_MODELS = {
|
|
88
|
+
"glm-5.3": { category: "chat", contextLength: 1048576, maxTokens: 131072, functionCall: true },
|
|
89
|
+
"glm-5.3-flash": { category: "chat", contextLength: 1048576, maxTokens: 131072, functionCall: true },
|
|
51
90
|
"glm-5.2": { category: "chat", contextLength: 1048576, maxTokens: 131072, functionCall: true },
|
|
52
91
|
"glm-5": { category: "chat", contextLength: 2e5, maxTokens: 128e3, functionCall: true },
|
|
53
92
|
"glm-5.1": { category: "chat", contextLength: 2e5, maxTokens: 128e3, functionCall: true },
|
|
@@ -82,10 +121,15 @@ var TENCENT_HUNYUAN_MODELS = {
|
|
|
82
121
|
"hunyuan-turbos": { category: "chat", functionCall: true }
|
|
83
122
|
};
|
|
84
123
|
var MINIMAX_MODELS = {
|
|
124
|
+
"minimax-m3": { category: "code", contextLength: 204800, functionCall: true, reasoning: true },
|
|
125
|
+
"minimax-m2.7": { category: "code", contextLength: 204800, functionCall: true },
|
|
126
|
+
"minimax-m2.7-highspeed": { category: "code", contextLength: 204800, functionCall: true },
|
|
85
127
|
"minimax-m2.5": { category: "code", contextLength: 204800, functionCall: true },
|
|
86
128
|
"minimax-m2.5-highspeed": { category: "code", contextLength: 204800, functionCall: true },
|
|
129
|
+
"minimax-m2.5-lightning": { category: "code", contextLength: 204800, functionCall: true },
|
|
87
130
|
"minimax-m2.1": { category: "code", contextLength: 204800, functionCall: true },
|
|
88
|
-
"minimax-m2.1-
|
|
131
|
+
"minimax-m2.1-lightning": { category: "code", contextLength: 204800, functionCall: true },
|
|
132
|
+
"minimax-m2": { category: "code", contextLength: 204800, functionCall: true }
|
|
89
133
|
};
|
|
90
134
|
var XIAOMI_MIMO_CANONICAL = {
|
|
91
135
|
"mimo-v2.5": { category: "code", contextLength: 1e6, maxTokens: 32768, vision: true, functionCall: true, reasoning: true, thinkingLevels: ["none", "low", "medium", "high"], thinkingTokenLimit: { min: 0, max: 32768 } },
|
|
@@ -127,6 +171,7 @@ var VENDOR_GROUPS = [
|
|
|
127
171
|
{ name: "ANTHROPIC_MODELS", entries: ANTHROPIC_MODELS },
|
|
128
172
|
{ name: "GEMINI_MODELS", entries: GEMINI_MODELS },
|
|
129
173
|
{ name: "GROK_MODELS", entries: GROK_MODELS },
|
|
174
|
+
{ name: "COPILOT_MODELS", entries: COPILOT_MODELS },
|
|
130
175
|
{ name: "DEEPSEEK_MODELS", entries: DEEPSEEK_MODELS },
|
|
131
176
|
{ name: "ZHIPU_MODELS", entries: ZHIPU_MODELS },
|
|
132
177
|
{ name: "KIMI_MODELS", entries: KIMI_MODELS },
|