@f5-sales-demo/pi-ai 21.42.0 → 21.43.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/CHANGELOG.md +3 -0
- package/package.json +2 -2
- package/src/model-thinking.ts +27 -5
- package/src/models.json +73 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
### Added
|
|
8
8
|
|
|
9
|
+
- Added Claude Opus 5.5 and OpenAI Codex GPT-6 Luna/Sol model metadata, including current
|
|
10
|
+
reasoning controls, tool capabilities, pricing, and published 1M/1.05M context and 128K output
|
|
11
|
+
limits ([#4240](https://github.com/f5-sales-demo/xcsh/issues/4240)).
|
|
9
12
|
- Added native Anthropic Claude Fable 5 and 5.1 catalog and transport support, including always-on
|
|
10
13
|
adaptive thinking, accurate limits and pricing, strict-tool compatibility, and permanent
|
|
11
14
|
entitlement/client-version error handling.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/pi-ai",
|
|
4
|
-
"version": "21.
|
|
4
|
+
"version": "21.43.0",
|
|
5
5
|
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
|
6
6
|
"homepage": "https://github.com/f5-sales-demo/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@anthropic-ai/sdk": "0.123.0",
|
|
47
47
|
"@aws-sdk/client-bedrock-runtime": "3.1126.0",
|
|
48
48
|
"@bufbuild/protobuf": "2.14.1",
|
|
49
|
-
"@f5-sales-demo/pi-utils": "21.
|
|
49
|
+
"@f5-sales-demo/pi-utils": "21.43.0",
|
|
50
50
|
"@google/genai": "2.21.0",
|
|
51
51
|
"@sinclair/typebox": "0.34.52",
|
|
52
52
|
"@smithy/node-http-handler": "4.12.1",
|
package/src/model-thinking.ts
CHANGED
|
@@ -124,8 +124,10 @@ const ANTHROPIC_EXTENDED_EFFORT_MODELS: ReadonlySet<string> = new Set([
|
|
|
124
124
|
"fable-5.0",
|
|
125
125
|
"fable-5.1",
|
|
126
126
|
"opus-5.0",
|
|
127
|
+
"opus-5.5",
|
|
127
128
|
"sonnet-5.0",
|
|
128
129
|
]);
|
|
130
|
+
const ANTHROPIC_OPUS_55_EFFORTS: readonly Effort[] = [Effort.Low, Effort.Medium, Effort.High, Effort.XHigh, Effort.Max];
|
|
129
131
|
|
|
130
132
|
const GEMINI_3_PRO_EFFORTS: readonly Effort[] = [Effort.Low, Effort.Medium, Effort.High];
|
|
131
133
|
const GEMINI_3_FLASH_EFFORTS: readonly Effort[] = [Effort.Minimal, Effort.Low, Effort.Medium, Effort.High];
|
|
@@ -404,6 +406,13 @@ function applyGeneratedModelPolicy(model: ApiModel<Api>): void {
|
|
|
404
406
|
}
|
|
405
407
|
|
|
406
408
|
function applyAnthropicCatalogPolicy(model: ApiModel<Api>, parsedModel: AnthropicModel): void {
|
|
409
|
+
if (model.provider === "anthropic" && parsedModel.kind === "opus" && semverEqual(parsedModel.version, "5.5")) {
|
|
410
|
+
model.name = "Claude Opus 5.5";
|
|
411
|
+
model.input = ["text", "image"];
|
|
412
|
+
model.cost = { input: 4, output: 20, cacheRead: 0.2, cacheWrite: 5 };
|
|
413
|
+
model.contextWindow = 1_000_000;
|
|
414
|
+
model.maxTokens = 128_000;
|
|
415
|
+
}
|
|
407
416
|
// Claude Opus 4.5: models.dev reports 3x the correct cache pricing.
|
|
408
417
|
if (model.provider === "anthropic" && parsedModel.kind === "opus" && semverEqual(parsedModel.version, "4.5")) {
|
|
409
418
|
model.cost.cacheRead = 0.5;
|
|
@@ -420,12 +429,18 @@ function applyAnthropicCatalogPolicy(model: ApiModel<Api>, parsedModel: Anthropi
|
|
|
420
429
|
}
|
|
421
430
|
|
|
422
431
|
function applyOpenAICatalogPolicy(model: ApiModel<Api>, parsedModel: OpenAIModel): void {
|
|
423
|
-
// The ChatGPT Codex subscription transport
|
|
424
|
-
// short-context tier
|
|
425
|
-
// full
|
|
426
|
-
if (model.provider === "openai-codex" &&
|
|
432
|
+
// The ChatGPT Codex subscription transport defaults to the lower-cost
|
|
433
|
+
// short-context tier. The coding-agent registry can opt Luna and Sol into
|
|
434
|
+
// their full published window without changing generated catalog defaults.
|
|
435
|
+
if (model.provider === "openai-codex" && /^gpt-6-(?:astra|luna|sol)$/.test(model.id)) {
|
|
427
436
|
model.contextWindow = 272000;
|
|
428
437
|
model.maxTokens = 128000;
|
|
438
|
+
model.input = ["text", "image"];
|
|
439
|
+
if (model.id === "gpt-6-luna") {
|
|
440
|
+
model.cost = { input: 0.1, output: 0.5, cacheRead: 0.01, cacheWrite: 0.125 };
|
|
441
|
+
} else if (model.id === "gpt-6-sol") {
|
|
442
|
+
model.cost = { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 };
|
|
443
|
+
}
|
|
429
444
|
}
|
|
430
445
|
|
|
431
446
|
// LiteLLM's GPT-5.6 Sol route accepts image input, but upstream catalog
|
|
@@ -555,6 +570,9 @@ function inferAnthropicSupportedEfforts<TApi extends Api>(
|
|
|
555
570
|
(model.api === "anthropic-messages" || model.api === "bedrock-converse-stream") &&
|
|
556
571
|
semverGte(parsedModel.version, "4.6")
|
|
557
572
|
) {
|
|
573
|
+
if (parsedModel.kind === "opus" && semverEqual(parsedModel.version, "5.5")) {
|
|
574
|
+
return ANTHROPIC_OPUS_55_EFFORTS;
|
|
575
|
+
}
|
|
558
576
|
// Only 5.x accepts the extended range. Probed against the live gateway on
|
|
559
577
|
// 2026-07-30 with a bogus control value (rejected everywhere, so the accepts
|
|
560
578
|
// mean something) — #2630:
|
|
@@ -699,7 +717,11 @@ function parseAnthropicModel(modelId: string): AnthropicModel | null {
|
|
|
699
717
|
/** Whether the model requires adaptive thinking on every request. */
|
|
700
718
|
export function isAnthropicAlwaysThinkingModel<TApi extends Api>(model: ApiModel<TApi>): boolean {
|
|
701
719
|
const parsed = parseKnownModel(model.id);
|
|
702
|
-
return
|
|
720
|
+
return (
|
|
721
|
+
model.api === "anthropic-messages" &&
|
|
722
|
+
parsed.family === "anthropic" &&
|
|
723
|
+
(parsed.kind === "fable" || (parsed.kind === "opus" && semverEqual(parsed.version, "5.5")))
|
|
724
|
+
);
|
|
703
725
|
}
|
|
704
726
|
|
|
705
727
|
function parseOpenAIModel(modelId: string): OpenAIModel | null {
|
package/src/models.json
CHANGED
|
@@ -3826,6 +3826,29 @@
|
|
|
3826
3826
|
"defaultLevel": "medium"
|
|
3827
3827
|
}
|
|
3828
3828
|
},
|
|
3829
|
+
"claude-opus-5-5": {
|
|
3830
|
+
"id": "claude-opus-5-5",
|
|
3831
|
+
"name": "Claude Opus 5.5",
|
|
3832
|
+
"api": "anthropic-messages",
|
|
3833
|
+
"provider": "anthropic",
|
|
3834
|
+
"baseUrl": "https://api.anthropic.com",
|
|
3835
|
+
"reasoning": true,
|
|
3836
|
+
"input": ["text", "image"],
|
|
3837
|
+
"cost": { "input": 4, "output": 20, "cacheRead": 0.2, "cacheWrite": 5 },
|
|
3838
|
+
"contextWindow": 1000000,
|
|
3839
|
+
"maxTokens": 128000,
|
|
3840
|
+
"thinking": {
|
|
3841
|
+
"mode": "anthropic-adaptive",
|
|
3842
|
+
"supportedLevels": [
|
|
3843
|
+
{ "effort": "low", "description": "Light reasoning" },
|
|
3844
|
+
{ "effort": "medium", "description": "Balanced reasoning" },
|
|
3845
|
+
{ "effort": "high", "description": "Deep reasoning" },
|
|
3846
|
+
{ "effort": "xhigh", "description": "Very deep reasoning" },
|
|
3847
|
+
{ "effort": "max", "description": "Maximum reasoning" }
|
|
3848
|
+
],
|
|
3849
|
+
"defaultLevel": "medium"
|
|
3850
|
+
}
|
|
3851
|
+
},
|
|
3829
3852
|
"claude-sonnet-4-0": {
|
|
3830
3853
|
"id": "claude-sonnet-4-0",
|
|
3831
3854
|
"name": "Claude Sonnet 4 (latest)",
|
|
@@ -42616,6 +42639,56 @@
|
|
|
42616
42639
|
],
|
|
42617
42640
|
"defaultLevel": "medium"
|
|
42618
42641
|
}
|
|
42642
|
+
},
|
|
42643
|
+
"gpt-6-luna": {
|
|
42644
|
+
"id": "gpt-6-luna",
|
|
42645
|
+
"name": "GPT-6 Luna",
|
|
42646
|
+
"api": "openai-codex-responses",
|
|
42647
|
+
"provider": "openai-codex",
|
|
42648
|
+
"baseUrl": "https://chatgpt.com/backend-api",
|
|
42649
|
+
"reasoning": true,
|
|
42650
|
+
"input": ["text", "image"],
|
|
42651
|
+
"cost": { "input": 0.1, "output": 0.5, "cacheRead": 0.01, "cacheWrite": 0.125 },
|
|
42652
|
+
"contextWindow": 272000,
|
|
42653
|
+
"maxTokens": 128000,
|
|
42654
|
+
"preferWebsockets": true,
|
|
42655
|
+
"thinking": {
|
|
42656
|
+
"mode": "effort",
|
|
42657
|
+
"supportedLevels": [
|
|
42658
|
+
{ "effort": "none", "description": "No reasoning" },
|
|
42659
|
+
{ "effort": "low", "description": "Light reasoning" },
|
|
42660
|
+
{ "effort": "medium", "description": "Balanced reasoning" },
|
|
42661
|
+
{ "effort": "high", "description": "Deep reasoning" },
|
|
42662
|
+
{ "effort": "xhigh", "description": "Very deep reasoning" },
|
|
42663
|
+
{ "effort": "max", "description": "Maximum reasoning" }
|
|
42664
|
+
],
|
|
42665
|
+
"defaultLevel": "medium"
|
|
42666
|
+
}
|
|
42667
|
+
},
|
|
42668
|
+
"gpt-6-sol": {
|
|
42669
|
+
"id": "gpt-6-sol",
|
|
42670
|
+
"name": "GPT-6 Sol",
|
|
42671
|
+
"api": "openai-codex-responses",
|
|
42672
|
+
"provider": "openai-codex",
|
|
42673
|
+
"baseUrl": "https://chatgpt.com/backend-api",
|
|
42674
|
+
"reasoning": true,
|
|
42675
|
+
"input": ["text", "image"],
|
|
42676
|
+
"cost": { "input": 2, "output": 10, "cacheRead": 0.2, "cacheWrite": 2.5 },
|
|
42677
|
+
"contextWindow": 272000,
|
|
42678
|
+
"maxTokens": 128000,
|
|
42679
|
+
"preferWebsockets": true,
|
|
42680
|
+
"thinking": {
|
|
42681
|
+
"mode": "effort",
|
|
42682
|
+
"supportedLevels": [
|
|
42683
|
+
{ "effort": "none", "description": "No reasoning" },
|
|
42684
|
+
{ "effort": "low", "description": "Light reasoning" },
|
|
42685
|
+
{ "effort": "medium", "description": "Balanced reasoning" },
|
|
42686
|
+
{ "effort": "high", "description": "Deep reasoning" },
|
|
42687
|
+
{ "effort": "xhigh", "description": "Very deep reasoning" },
|
|
42688
|
+
{ "effort": "max", "description": "Maximum reasoning" }
|
|
42689
|
+
],
|
|
42690
|
+
"defaultLevel": "medium"
|
|
42691
|
+
}
|
|
42619
42692
|
}
|
|
42620
42693
|
},
|
|
42621
42694
|
"opencode": {
|