@f5-sales-demo/pi-ai 21.44.0 → 21.45.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/providers/anthropic.ts +7 -5
- package/src/types.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
### Added
|
|
8
8
|
|
|
9
|
+
- Added route metadata for the current internal GPT-6 and Claude models and compatibility metadata
|
|
10
|
+
that suppresses forced tool selection for native Anthropic proxy routes
|
|
11
|
+
([#4279](https://github.com/f5-sales-demo/xcsh/issues/4279)).
|
|
9
12
|
- Added Claude Opus 5.5 and OpenAI Codex GPT-6 Luna/Sol model metadata, including current
|
|
10
13
|
reasoning controls, tool capabilities, pricing, and published 1M/1.05M context and 128K output
|
|
11
14
|
limits ([#4240](https://github.com/f5-sales-demo/xcsh/issues/4240)).
|
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.45.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.45.0",
|
|
50
50
|
"@google/genai": "2.21.0",
|
|
51
51
|
"@sinclair/typebox": "0.34.52",
|
|
52
52
|
"@smithy/node-http-handler": "4.12.1",
|
|
@@ -1559,11 +1559,13 @@ function buildParams(
|
|
|
1559
1559
|
): MessageCreateParamsStreaming {
|
|
1560
1560
|
const { cacheControl } = getCacheControl(baseUrl, options?.cacheRetention);
|
|
1561
1561
|
const alwaysThinking = isAnthropicAlwaysThinkingModel(model);
|
|
1562
|
+
const requestedToolChoice = model.compat?.supportsToolChoice === false ? undefined : options?.toolChoice;
|
|
1562
1563
|
const toolChoice =
|
|
1563
1564
|
alwaysThinking &&
|
|
1564
|
-
(
|
|
1565
|
+
(requestedToolChoice === "any" ||
|
|
1566
|
+
(typeof requestedToolChoice === "object" && requestedToolChoice.type === "tool"))
|
|
1565
1567
|
? "auto"
|
|
1566
|
-
:
|
|
1568
|
+
: requestedToolChoice;
|
|
1567
1569
|
const params: AnthropicSamplingParams = {
|
|
1568
1570
|
model: model.id,
|
|
1569
1571
|
messages: convertAnthropicMessages(context.messages, model, isOAuthToken),
|
|
@@ -1585,9 +1587,9 @@ function buildParams(
|
|
|
1585
1587
|
const forcedToolName =
|
|
1586
1588
|
model.provider === "anthropic" &&
|
|
1587
1589
|
supportsAnthropicStrictToolUse(model.id) &&
|
|
1588
|
-
typeof
|
|
1589
|
-
|
|
1590
|
-
?
|
|
1590
|
+
typeof requestedToolChoice === "object" &&
|
|
1591
|
+
requestedToolChoice.type === "tool"
|
|
1592
|
+
? requestedToolChoice.name
|
|
1591
1593
|
: undefined;
|
|
1592
1594
|
params.tools = convertTools(context.tools, isOAuthToken, forcedToolName);
|
|
1593
1595
|
}
|
package/src/types.ts
CHANGED
|
@@ -645,6 +645,6 @@ export interface Model<TApi extends Api = any> {
|
|
|
645
645
|
tier?: string;
|
|
646
646
|
/** Canonical thinking capability metadata for this model. */
|
|
647
647
|
thinking?: ThinkingConfig;
|
|
648
|
-
/**
|
|
649
|
-
compat?: TApi extends "openai-completions" ? OpenAICompat : never;
|
|
648
|
+
/** Provider-specific request compatibility overrides. */
|
|
649
|
+
compat?: TApi extends "openai-completions" | "anthropic-messages" ? OpenAICompat : never;
|
|
650
650
|
}
|