@sayknow-cli/ai 0.5.9 → 0.5.10
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
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
-
## [0.5.
|
|
5
|
+
## [0.5.10] - 2026-09-10
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Enabled `reasoning_effort` for native xAI Grok chat-completions and pinned bundled `xai/grok-4.5` / `xai/grok-4.6` thinking ranges to the official docs (`high` for 4.5, `xhigh` for 4.6). Default xAI model is now `grok-4.6`.
|
|
6
10
|
|
|
7
11
|
## [0.5.7] - 2026-09-10
|
|
8
12
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@sayknow-cli/ai",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.10",
|
|
5
5
|
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
|
6
6
|
"homepage": "https://sayknow-cli.com",
|
|
7
7
|
"author": "jaybeyond",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@anthropic-ai/sdk": "^0.94.0",
|
|
45
45
|
"@bufbuild/protobuf": "^2.12.0",
|
|
46
|
-
"@sayknow-cli/utils": "0.5.
|
|
46
|
+
"@sayknow-cli/utils": "0.5.10",
|
|
47
47
|
"openai": "^6.36.0",
|
|
48
48
|
"partial-json": "^0.1.7",
|
|
49
49
|
"zod": "4.4.3"
|
package/src/model-thinking.ts
CHANGED
|
@@ -475,6 +475,35 @@ function applyGeneratedModelPolicy(model: ApiModel<Api>): void {
|
|
|
475
475
|
if (model.provider !== "opencode-go" && model.id === "minimax-m3") {
|
|
476
476
|
model.contextWindow = 512_000;
|
|
477
477
|
}
|
|
478
|
+
// xAI Grok 4.5/4.6: official reasoning docs (docs.x.ai) expose
|
|
479
|
+
// low/medium/high, with xhigh only on grok-4.6+. Catalog snapshots and
|
|
480
|
+
// openai-compat historically clamped everything to high because
|
|
481
|
+
// supportsReasoningEffort was false for Grok; pin the documented ranges so
|
|
482
|
+
// profile suffixes and requireSupportedEffort stay honest across regen.
|
|
483
|
+
if (model.provider === "xai" && /^grok-4\.6(?:$|[-.])/.test(model.id)) {
|
|
484
|
+
if (model.thinking) {
|
|
485
|
+
model.thinking = {
|
|
486
|
+
...model.thinking,
|
|
487
|
+
mode: "effort",
|
|
488
|
+
minLevel: Effort.Low,
|
|
489
|
+
maxLevel: Effort.XHigh,
|
|
490
|
+
defaultLevel: Effort.High,
|
|
491
|
+
};
|
|
492
|
+
delete model.thinking.levels;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
if (model.provider === "xai" && /^grok-4\.5(?:$|[-.])/.test(model.id)) {
|
|
496
|
+
if (model.thinking) {
|
|
497
|
+
model.thinking = {
|
|
498
|
+
...model.thinking,
|
|
499
|
+
mode: "effort",
|
|
500
|
+
minLevel: Effort.Low,
|
|
501
|
+
maxLevel: Effort.High,
|
|
502
|
+
defaultLevel: Effort.High,
|
|
503
|
+
};
|
|
504
|
+
delete model.thinking.levels;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
478
507
|
}
|
|
479
508
|
|
|
480
509
|
function scrubGeneratedModelName(name: string): string {
|
package/src/models.json
CHANGED
|
@@ -90830,8 +90830,9 @@
|
|
|
90830
90830
|
"maxTokens": 500000,
|
|
90831
90831
|
"thinking": {
|
|
90832
90832
|
"mode": "effort",
|
|
90833
|
-
"minLevel": "
|
|
90834
|
-
"maxLevel": "high"
|
|
90833
|
+
"minLevel": "low",
|
|
90834
|
+
"maxLevel": "high",
|
|
90835
|
+
"defaultLevel": "high"
|
|
90835
90836
|
}
|
|
90836
90837
|
},
|
|
90837
90838
|
"grok-4.6": {
|
|
@@ -90855,8 +90856,9 @@
|
|
|
90855
90856
|
"maxTokens": 500000,
|
|
90856
90857
|
"thinking": {
|
|
90857
90858
|
"mode": "effort",
|
|
90858
|
-
"minLevel": "
|
|
90859
|
-
"maxLevel": "
|
|
90859
|
+
"minLevel": "low",
|
|
90860
|
+
"maxLevel": "xhigh",
|
|
90861
|
+
"defaultLevel": "high"
|
|
90860
90862
|
}
|
|
90861
90863
|
},
|
|
90862
90864
|
"grok-beta": {
|
|
@@ -166,7 +166,7 @@ export const PROVIDER_DESCRIPTORS: readonly ProviderDescriptor[] = [
|
|
|
166
166
|
config => fuguModelManagerOptions(config),
|
|
167
167
|
catalog("Sakana Fugu", ["FUGU_API_KEY"]),
|
|
168
168
|
),
|
|
169
|
-
descriptor("xai", "grok-4
|
|
169
|
+
descriptor("xai", "grok-4.6", config => xaiModelManagerOptions(config)),
|
|
170
170
|
catalogDescriptor(
|
|
171
171
|
"deepseek",
|
|
172
172
|
"deepseek-v4-pro",
|
|
@@ -205,7 +205,10 @@ export function detectOpenAICompat(model: Model<"openai-completions">, resolvedB
|
|
|
205
205
|
supportsDeveloperRole: !isNonStandard,
|
|
206
206
|
sendSessionHeaders: false,
|
|
207
207
|
supportsMultipleSystemMessages: supportsMultipleSystemMessagesDefault,
|
|
208
|
-
|
|
208
|
+
// xAI Grok 4.5+ accepts reasoning_effort on chat-completions (and
|
|
209
|
+
// Responses). Older catalogs left this off; keeping it disabled
|
|
210
|
+
// silently drops profile effort suffixes like :xhigh for grok-4.6.
|
|
211
|
+
supportsReasoningEffort: !isZai,
|
|
209
212
|
reasoningEffortMap,
|
|
210
213
|
supportsUsageInStreaming: !isCerebras,
|
|
211
214
|
disableReasoningOnForcedToolChoice: isKimiModel || isAnthropicModel || isOpenCodeGoReasoning,
|