@oh-my-pi/pi-catalog 15.13.2 → 15.13.3
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 +22 -0
- package/dist/types/compat/openai.d.ts +6 -4
- package/dist/types/identity/family.d.ts +2 -0
- package/dist/types/identity/tool-syntax.d.ts +1 -1
- package/dist/types/provider-models/descriptors.d.ts +24 -20
- package/package.json +3 -3
- package/src/compat/openai.ts +11 -12
- package/src/identity/family.ts +6 -0
- package/src/identity/tool-syntax.ts +16 -1
- package/src/model-thinking.ts +6 -2
- package/src/models.json +30703 -23929
- package/src/provider-models/descriptors.ts +25 -20
- package/src/provider-models/ollama.ts +10 -3
- package/src/provider-models/openai-compat.ts +44 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [15.13.3] - 2026-06-15
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added Azure OpenAI as a catalog provider (`azure`, default model `gpt-5.5`, env var `AZURE_OPENAI_API_KEY`), bundling the OpenAI-family models Azure serves over the Responses API (GPT-4/4.1/4o, GPT-5 family, o-series, Codex). Like Amazon Bedrock it is catalog-only — models ship in the bundle and become selectable once the env key is set, with the deployment base URL resolved at runtime from `AZURE_OPENAI_BASE_URL`/`AZURE_OPENAI_RESOURCE_NAME`.
|
|
10
|
+
- Added models.dev-backed bundled catalogs for providers that previously shipped no offline models: Hugging Face, Kilo, Moonshot, NanoGPT, Synthetic, Venice, Ollama Cloud, and the Xiaomi Token Plan regions (ams/cn/sgp). They still discover live when credentialed; the bundle is now a non-empty baseline.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Updated stale provider default models to their latest bundled versions: OpenAI-family providers (`azure`, `github-copilot`, `aimlapi`) → GPT-5.5; Gemini providers (`google`, `google-gemini-cli`, `google-vertex`) → `gemini-3.1-pro-preview`; GLM providers (`zai`, `zhipu-coding-plan`) → `glm-5.2`, `cerebras` → `zai-glm-4.7`; Kimi providers (`fireworks`, `opencode-go`, `moonshot`) → `kimi-k2.7-code`, `kimi-code` → `kimi-for-coding`, `together` → `moonshotai/Kimi-K2.7-Code`; `alibaba-coding-plan` → `qwen3.7-plus`; and Claude-Sonnet defaults (`cloudflare-ai-gateway`, `cursor`, `gitlab-duo`, `kilo`, `opencode-zen`, `vercel-ai-gateway`) → Claude Opus 4.x.
|
|
15
|
+
- Restricted models.dev Azure discovery to OpenAI-family IDs (`gpt-`, `o1`, `o3`, `o4`, `codex`, `chatgpt`), excluding Foundry-hosted third parties (Claude/DeepSeek/Llama/Mistral/Phi) that Azure serves through non-Responses APIs.
|
|
16
|
+
- Detected the Azure OpenAI Responses compat surface (developer role, strict tool mode, strict tool-result pairing) by provider id as well as base URL, so bundled `azure` models whose deployment host is only known at runtime still get the right wire behavior.
|
|
17
|
+
- Renamed the `Qwen3-ASR-Flash` model label to `Qwen3 ASR Flash`
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Fixed tool syntax selection for Gemini-family and Gemma model IDs by routing them to dedicated `gemini` and `gemma` formats instead of generic XML
|
|
22
|
+
- Fixed `zhipu-coding-plan` and `together` shipping no bundled models: their descriptors referenced non-existent models.dev keys (`zhipu-coding-plan`, `together`); pointed them at the real keys (`zhipuai-coding-plan`, `togetherai`) so they bundle their GLM and full catalogs respectively.
|
|
23
|
+
- Folded the `azure-openai-responses` API into the OpenAI Responses thinking-inference branches so Azure reasoning models (o-series, GPT-5, Codex) resolve the discrete effort vocabulary (including `xhigh`) and effort-control mode instead of falling through to generic defaults.
|
|
24
|
+
- Fixed `ollama-cloud` discovery inheriting an unsafe cross-provider `contextWindow`/`maxTokens` when `/api/show` returns no size metadata; it now falls back to the safe 128K context / 8K output caps.
|
|
25
|
+
- Dropped internal Fireworks control-plane resource ids (`accounts/fireworks/{models,routers}/…`) from the bundle; only the public request ids ship.
|
|
26
|
+
|
|
5
27
|
## [15.13.2] - 2026-06-15
|
|
6
28
|
|
|
7
29
|
### Added
|
|
@@ -14,10 +14,12 @@ interface OpenAIResponsesSpecLike {
|
|
|
14
14
|
* Build the resolved Responses-API compat record. The Responses flavor
|
|
15
15
|
* deliberately differs from chat-completions: GitHub Copilot's responses
|
|
16
16
|
* endpoint accepts the `developer` role, while strict tool mode is scoped to
|
|
17
|
-
* first-party OpenAI/Azure/Copilot providers.
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* first-party OpenAI/Azure/Copilot providers. Azure is detected by provider id
|
|
18
|
+
* as well as URL — bundled `azure` models carry no baseUrl (the deployment host
|
|
19
|
+
* is per-resource, resolved at runtime) — while OpenAI/Copilot developer-role
|
|
20
|
+
* and prompt-cache detection stay URL-keyed, as the historical call sites were.
|
|
21
|
+
* The GPT-5 juice-zero hack keys on the model name, matching the historical
|
|
22
|
+
* request-time check.
|
|
21
23
|
*/
|
|
22
24
|
export declare function buildOpenAIResponsesCompat(spec: OpenAIResponsesSpecLike): ResolvedOpenAIResponsesCompat;
|
|
23
25
|
export {};
|
|
@@ -16,6 +16,8 @@ export declare function isClaudeModelId(modelId: string): boolean;
|
|
|
16
16
|
export declare function isAnthropicNamespacedModelId(modelId: string): boolean;
|
|
17
17
|
/** Qwen family ids (substring match — Qwen SKUs have no stable prefix shape). */
|
|
18
18
|
export declare function isQwenModelId(modelId: string): boolean;
|
|
19
|
+
/** Gemma open-weights family (`gemma-3-27b-it`, `google/gemma-4-E2B-it`, `gemma2-9b`). */
|
|
20
|
+
export declare function isGemmaModelId(modelId: string): boolean;
|
|
19
21
|
/** DeepSeek family by id or display name (proxies often rename the id but keep the name). */
|
|
20
22
|
export declare function isDeepseekModelIdOrName(value: string): boolean;
|
|
21
23
|
/** Xiaomi MiMo family by id or display name. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type ToolCallSyntax = "glm" | "hermes" | "kimi" | "xml" | "anthropic" | "deepseek" | "harmony" | "pi" | "qwen3";
|
|
1
|
+
export type ToolCallSyntax = "glm" | "hermes" | "kimi" | "xml" | "anthropic" | "deepseek" | "harmony" | "pi" | "qwen3" | "gemini" | "gemma";
|
|
2
2
|
export declare const FALLBACK_TOOL_SYNTAX: ToolCallSyntax;
|
|
3
3
|
export declare function preferredToolSyntax(modelId: string): ToolCallSyntax;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import type { ModelManagerConfig, ProviderCatalogEntry, ProviderDescriptor } from "./descriptor-types";
|
|
9
9
|
export declare const CATALOG_PROVIDERS: readonly [{
|
|
10
10
|
readonly id: "aimlapi";
|
|
11
|
-
readonly defaultModel: "gpt-
|
|
11
|
+
readonly defaultModel: "gpt-5.5-2026-04-23";
|
|
12
12
|
readonly envVars: readonly ["AIMLAPI_API_KEY"];
|
|
13
13
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
14
14
|
readonly dynamicModelsAuthoritative: true;
|
|
@@ -17,7 +17,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
17
17
|
};
|
|
18
18
|
}, {
|
|
19
19
|
readonly id: "alibaba-coding-plan";
|
|
20
|
-
readonly defaultModel: "qwen3.
|
|
20
|
+
readonly defaultModel: "qwen3.7-plus";
|
|
21
21
|
readonly envVars: readonly ["ALIBABA_CODING_PLAN_API_KEY"];
|
|
22
22
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
23
23
|
readonly catalogDiscovery: {
|
|
@@ -30,9 +30,13 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
30
30
|
readonly id: "anthropic";
|
|
31
31
|
readonly defaultModel: "claude-opus-4-8";
|
|
32
32
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"anthropic-messages", unknown>;
|
|
33
|
+
}, {
|
|
34
|
+
readonly id: "azure";
|
|
35
|
+
readonly defaultModel: "gpt-5.5";
|
|
36
|
+
readonly envVars: readonly ["AZURE_OPENAI_API_KEY"];
|
|
33
37
|
}, {
|
|
34
38
|
readonly id: "cerebras";
|
|
35
|
-
readonly defaultModel: "zai-glm-4.
|
|
39
|
+
readonly defaultModel: "zai-glm-4.7";
|
|
36
40
|
readonly envVars: readonly ["CEREBRAS_API_KEY"];
|
|
37
41
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
38
42
|
readonly catalogDiscovery: {
|
|
@@ -40,7 +44,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
40
44
|
};
|
|
41
45
|
}, {
|
|
42
46
|
readonly id: "cloudflare-ai-gateway";
|
|
43
|
-
readonly defaultModel: "claude-
|
|
47
|
+
readonly defaultModel: "anthropic/claude-opus-4-8";
|
|
44
48
|
readonly envVars: readonly ["CLOUDFLARE_AI_GATEWAY_API_KEY"];
|
|
45
49
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"anthropic-messages", unknown>;
|
|
46
50
|
readonly catalogDiscovery: {
|
|
@@ -48,7 +52,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
48
52
|
};
|
|
49
53
|
}, {
|
|
50
54
|
readonly id: "cursor";
|
|
51
|
-
readonly defaultModel: "claude-
|
|
55
|
+
readonly defaultModel: "claude-4.6-opus-high";
|
|
52
56
|
readonly envVars: readonly ["CURSOR_ACCESS_TOKEN"];
|
|
53
57
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"cursor-agent", unknown>;
|
|
54
58
|
readonly catalogDiscovery: {
|
|
@@ -71,7 +75,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
71
75
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
72
76
|
}, {
|
|
73
77
|
readonly id: "fireworks";
|
|
74
|
-
readonly defaultModel: "kimi-k2.
|
|
78
|
+
readonly defaultModel: "kimi-k2.7-code";
|
|
75
79
|
readonly envVars: readonly ["FIREWORKS_API_KEY"];
|
|
76
80
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
77
81
|
readonly catalogDiscovery: {
|
|
@@ -79,16 +83,16 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
79
83
|
};
|
|
80
84
|
}, {
|
|
81
85
|
readonly id: "github-copilot";
|
|
82
|
-
readonly defaultModel: "gpt-
|
|
86
|
+
readonly defaultModel: "gpt-5.5";
|
|
83
87
|
readonly envVars: readonly ["COPILOT_GITHUB_TOKEN"];
|
|
84
88
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<import("..").Api, unknown>;
|
|
85
89
|
}, {
|
|
86
90
|
readonly id: "gitlab-duo";
|
|
87
|
-
readonly defaultModel: "duo-chat-
|
|
91
|
+
readonly defaultModel: "duo-chat-opus-4-6";
|
|
88
92
|
readonly envVars: readonly ["GITLAB_TOKEN"];
|
|
89
93
|
}, {
|
|
90
94
|
readonly id: "google";
|
|
91
|
-
readonly defaultModel: "gemini-
|
|
95
|
+
readonly defaultModel: "gemini-3.1-pro-preview";
|
|
92
96
|
readonly envVars: readonly ["GEMINI_API_KEY"];
|
|
93
97
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"google-generative-ai", unknown>;
|
|
94
98
|
}, {
|
|
@@ -97,11 +101,11 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
97
101
|
readonly specialModelManager: true;
|
|
98
102
|
}, {
|
|
99
103
|
readonly id: "google-gemini-cli";
|
|
100
|
-
readonly defaultModel: "gemini-
|
|
104
|
+
readonly defaultModel: "gemini-3.1-pro-preview";
|
|
101
105
|
readonly specialModelManager: true;
|
|
102
106
|
}, {
|
|
103
107
|
readonly id: "google-vertex";
|
|
104
|
-
readonly defaultModel: "gemini-3-pro-preview";
|
|
108
|
+
readonly defaultModel: "gemini-3.1-pro-preview";
|
|
105
109
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<import("..").Api, unknown>;
|
|
106
110
|
readonly allowUnauthenticated: true;
|
|
107
111
|
}, {
|
|
@@ -119,7 +123,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
119
123
|
};
|
|
120
124
|
}, {
|
|
121
125
|
readonly id: "kilo";
|
|
122
|
-
readonly defaultModel: "anthropic/claude-
|
|
126
|
+
readonly defaultModel: "anthropic/claude-opus-4.8";
|
|
123
127
|
readonly envVars: readonly ["KILO_API_KEY"];
|
|
124
128
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
125
129
|
readonly catalogDiscovery: {
|
|
@@ -128,7 +132,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
128
132
|
};
|
|
129
133
|
}, {
|
|
130
134
|
readonly id: "kimi-code";
|
|
131
|
-
readonly defaultModel: "kimi-
|
|
135
|
+
readonly defaultModel: "kimi-for-coding";
|
|
132
136
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
133
137
|
readonly catalogDiscovery: {
|
|
134
138
|
readonly label: "Kimi Code";
|
|
@@ -168,7 +172,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
168
172
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
169
173
|
}, {
|
|
170
174
|
readonly id: "moonshot";
|
|
171
|
-
readonly defaultModel: "kimi-k2.
|
|
175
|
+
readonly defaultModel: "kimi-k2.7-code";
|
|
172
176
|
readonly envVars: readonly ["MOONSHOT_API_KEY"];
|
|
173
177
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
174
178
|
readonly catalogDiscovery: {
|
|
@@ -217,12 +221,12 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
217
221
|
readonly specialModelManager: true;
|
|
218
222
|
}, {
|
|
219
223
|
readonly id: "opencode-go";
|
|
220
|
-
readonly defaultModel: "kimi-k2.
|
|
224
|
+
readonly defaultModel: "kimi-k2.7-code";
|
|
221
225
|
readonly envVars: readonly ["OPENCODE_API_KEY"];
|
|
222
226
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<import("..").Api, unknown>;
|
|
223
227
|
}, {
|
|
224
228
|
readonly id: "opencode-zen";
|
|
225
|
-
readonly defaultModel: "claude-
|
|
229
|
+
readonly defaultModel: "claude-opus-4-8";
|
|
226
230
|
readonly envVars: readonly ["OPENCODE_API_KEY"];
|
|
227
231
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<import("..").Api, unknown>;
|
|
228
232
|
}, {
|
|
@@ -262,7 +266,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
262
266
|
};
|
|
263
267
|
}, {
|
|
264
268
|
readonly id: "together";
|
|
265
|
-
readonly defaultModel: "moonshotai/Kimi-K2.
|
|
269
|
+
readonly defaultModel: "moonshotai/Kimi-K2.7-Code";
|
|
266
270
|
readonly envVars: readonly ["TOGETHER_API_KEY"];
|
|
267
271
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
268
272
|
readonly catalogDiscovery: {
|
|
@@ -279,7 +283,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
279
283
|
};
|
|
280
284
|
}, {
|
|
281
285
|
readonly id: "vercel-ai-gateway";
|
|
282
|
-
readonly defaultModel: "anthropic/claude-
|
|
286
|
+
readonly defaultModel: "anthropic/claude-opus-4.8";
|
|
283
287
|
readonly envVars: readonly ["AI_GATEWAY_API_KEY"];
|
|
284
288
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"anthropic-messages", unknown>;
|
|
285
289
|
readonly catalogDiscovery: {
|
|
@@ -353,7 +357,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
353
357
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
354
358
|
}, {
|
|
355
359
|
readonly id: "zai";
|
|
356
|
-
readonly defaultModel: "glm-5.
|
|
360
|
+
readonly defaultModel: "glm-5.2";
|
|
357
361
|
readonly envVars: readonly ["ZAI_API_KEY"];
|
|
358
362
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"anthropic-messages", unknown>;
|
|
359
363
|
readonly catalogDiscovery: {
|
|
@@ -369,7 +373,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
369
373
|
};
|
|
370
374
|
}, {
|
|
371
375
|
readonly id: "zhipu-coding-plan";
|
|
372
|
-
readonly defaultModel: "glm-5.
|
|
376
|
+
readonly defaultModel: "glm-5.2";
|
|
373
377
|
readonly envVars: readonly ["ZHIPU_API_KEY"];
|
|
374
378
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
375
379
|
readonly catalogDiscovery: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-catalog",
|
|
4
|
-
"version": "15.13.
|
|
4
|
+
"version": "15.13.3",
|
|
5
5
|
"description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@bufbuild/protobuf": "^2.12.0",
|
|
37
|
-
"@oh-my-pi/pi-utils": "15.13.
|
|
37
|
+
"@oh-my-pi/pi-utils": "15.13.3",
|
|
38
38
|
"zod": "^4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@oh-my-pi/pi-ai": "15.13.
|
|
41
|
+
"@oh-my-pi/pi-ai": "15.13.3",
|
|
42
42
|
"@types/bun": "^1.3.14"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
package/src/compat/openai.ts
CHANGED
|
@@ -301,29 +301,28 @@ interface OpenAIResponsesSpecLike {
|
|
|
301
301
|
* Build the resolved Responses-API compat record. The Responses flavor
|
|
302
302
|
* deliberately differs from chat-completions: GitHub Copilot's responses
|
|
303
303
|
* endpoint accepts the `developer` role, while strict tool mode is scoped to
|
|
304
|
-
* first-party OpenAI/Azure/Copilot providers.
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
304
|
+
* first-party OpenAI/Azure/Copilot providers. Azure is detected by provider id
|
|
305
|
+
* as well as URL — bundled `azure` models carry no baseUrl (the deployment host
|
|
306
|
+
* is per-resource, resolved at runtime) — while OpenAI/Copilot developer-role
|
|
307
|
+
* and prompt-cache detection stay URL-keyed, as the historical call sites were.
|
|
308
|
+
* The GPT-5 juice-zero hack keys on the model name, matching the historical
|
|
309
|
+
* request-time check.
|
|
308
310
|
*/
|
|
309
311
|
export function buildOpenAIResponsesCompat(spec: OpenAIResponsesSpecLike): ResolvedOpenAIResponsesCompat {
|
|
310
312
|
const baseUrl = spec.baseUrl ?? "";
|
|
313
|
+
const isAzure = modelMatchesHost({ provider: spec.provider, baseUrl }, "azureOpenAI");
|
|
311
314
|
const compat: ResolvedOpenAIResponsesCompat = {
|
|
312
|
-
supportsDeveloperRole:
|
|
313
|
-
hostMatchesUrl(baseUrl, "openai") ||
|
|
314
|
-
hostMatchesUrl(baseUrl, "azureOpenAI") ||
|
|
315
|
-
hostMatchesUrl(baseUrl, "githubCopilot"),
|
|
315
|
+
supportsDeveloperRole: isAzure || hostMatchesUrl(baseUrl, "openai") || hostMatchesUrl(baseUrl, "githubCopilot"),
|
|
316
316
|
supportsStrictMode:
|
|
317
317
|
spec.provider === "openai" ||
|
|
318
|
-
|
|
318
|
+
isAzure ||
|
|
319
319
|
spec.provider === "github-copilot" ||
|
|
320
|
-
hostMatchesUrl(baseUrl, "openai")
|
|
321
|
-
hostMatchesUrl(baseUrl, "azureOpenAI"),
|
|
320
|
+
hostMatchesUrl(baseUrl, "openai"),
|
|
322
321
|
supportsReasoningEffort: true,
|
|
323
322
|
supportsLongPromptCacheRetention: hostMatchesUrl(baseUrl, "openai"),
|
|
324
323
|
// Azure OpenAI and GitHub Copilot Responses paths require tool results
|
|
325
324
|
// to strictly match prior tool calls when building Responses inputs.
|
|
326
|
-
strictResponsesPairing:
|
|
325
|
+
strictResponsesPairing: isAzure || spec.provider === "github-copilot",
|
|
327
326
|
requiresJuiceZeroHack: spec.name.toLowerCase().startsWith("gpt-5"),
|
|
328
327
|
reasoningEffortMap: {},
|
|
329
328
|
};
|
package/src/identity/family.ts
CHANGED
|
@@ -41,6 +41,11 @@ export function isQwenModelId(modelId: string): boolean {
|
|
|
41
41
|
return modelId.toLowerCase().includes("qwen");
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/** Gemma open-weights family (`gemma-3-27b-it`, `google/gemma-4-E2B-it`, `gemma2-9b`). */
|
|
45
|
+
export function isGemmaModelId(modelId: string): boolean {
|
|
46
|
+
return /(^|\/)gemma[-.]?\d/i.test(modelId);
|
|
47
|
+
}
|
|
48
|
+
|
|
44
49
|
/** DeepSeek family by id or display name (proxies often rename the id but keep the name). */
|
|
45
50
|
export function isDeepseekModelIdOrName(value: string): boolean {
|
|
46
51
|
return value.toLowerCase().includes("deepseek");
|
|
@@ -127,6 +132,7 @@ export function modelFamilyToken(modelId: string): string {
|
|
|
127
132
|
if (isOpenAIGptOssModelId(modelId)) return "gpt-oss";
|
|
128
133
|
if (isDeepseekModelIdOrName(modelId)) return "deepseek";
|
|
129
134
|
if (isMimoModelIdOrName(modelId)) return "mimo";
|
|
135
|
+
if (isGemmaModelId(modelId)) return "gemma";
|
|
130
136
|
if (parseGlmModel(bareModelId(modelId))) return "glm";
|
|
131
137
|
return "";
|
|
132
138
|
}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { modelFamilyToken } from "./family";
|
|
2
2
|
|
|
3
|
-
export type ToolCallSyntax =
|
|
3
|
+
export type ToolCallSyntax =
|
|
4
|
+
| "glm"
|
|
5
|
+
| "hermes"
|
|
6
|
+
| "kimi"
|
|
7
|
+
| "xml"
|
|
8
|
+
| "anthropic"
|
|
9
|
+
| "deepseek"
|
|
10
|
+
| "harmony"
|
|
11
|
+
| "pi"
|
|
12
|
+
| "qwen3"
|
|
13
|
+
| "gemini"
|
|
14
|
+
| "gemma";
|
|
4
15
|
|
|
5
16
|
export const FALLBACK_TOOL_SYNTAX: ToolCallSyntax = "xml";
|
|
6
17
|
|
|
@@ -10,6 +21,10 @@ export function preferredToolSyntax(modelId: string): ToolCallSyntax {
|
|
|
10
21
|
return "anthropic";
|
|
11
22
|
case "glm":
|
|
12
23
|
return "glm";
|
|
24
|
+
case "gemini":
|
|
25
|
+
return "gemini";
|
|
26
|
+
case "gemma":
|
|
27
|
+
return "gemma";
|
|
13
28
|
case "kimi":
|
|
14
29
|
return "kimi";
|
|
15
30
|
case "qwen":
|
package/src/model-thinking.ts
CHANGED
|
@@ -219,7 +219,7 @@ export function deriveThinking<TApi extends Api>(spec: ModelSpec<TApi>, compat:
|
|
|
219
219
|
* through other request fields.
|
|
220
220
|
*/
|
|
221
221
|
function omitsWireReasoningEffort(api: Api, compat: CompatOf<Api>): boolean {
|
|
222
|
-
if (api !== "openai-responses" && api !== "openai-codex-responses") {
|
|
222
|
+
if (api !== "openai-responses" && api !== "openai-codex-responses" && api !== "azure-openai-responses") {
|
|
223
223
|
return false;
|
|
224
224
|
}
|
|
225
225
|
return (compat as ResolvedOpenAIResponsesCompat | undefined)?.supportsReasoningEffort === false;
|
|
@@ -426,7 +426,11 @@ function inferFallbackEfforts<TApi extends Api>(spec: ModelSpec<TApi>, compat: C
|
|
|
426
426
|
return DEFAULT_REASONING_EFFORTS;
|
|
427
427
|
}
|
|
428
428
|
// OpenAI Responses APIs encode discrete effort levels, including xhigh.
|
|
429
|
-
if (
|
|
429
|
+
if (
|
|
430
|
+
spec.api === "openai-responses" ||
|
|
431
|
+
spec.api === "openai-codex-responses" ||
|
|
432
|
+
spec.api === "azure-openai-responses"
|
|
433
|
+
) {
|
|
430
434
|
return DEFAULT_REASONING_EFFORTS_WITH_XHIGH;
|
|
431
435
|
}
|
|
432
436
|
return DEFAULT_REASONING_EFFORTS;
|