@theokit/sdk 2.12.0 → 2.13.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 +6 -0
- package/dist/a2a/index.cjs +14 -3
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +14 -3
- package/dist/a2a/index.js.map +1 -1
- package/dist/{cron-BchPdvs2.d.ts → cron-CL_9nfhQ.d.ts} +11 -0
- package/dist/{cron-Dv94Lgat.d.cts → cron-CpxLdAXc.d.cts} +11 -0
- package/dist/cron.cjs +14 -3
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.d.cts +1 -1
- package/dist/cron.d.ts +1 -1
- package/dist/cron.js +14 -3
- package/dist/cron.js.map +1 -1
- package/dist/eval.cjs +14 -3
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +14 -3
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/internal/llm/router.d.ts +8 -0
- package/dist/types/providers.d.ts +11 -0
- package/package.json +1 -1
|
@@ -7,6 +7,14 @@ export interface ProviderRouterOptions {
|
|
|
7
7
|
apiKeys?: Record<string, string[]>;
|
|
8
8
|
/** Pool rotation strategy per provider. Optional; default `"fill_first"`. */
|
|
9
9
|
credentialPoolStrategy?: Record<string, CredentialPoolStrategy>;
|
|
10
|
+
/**
|
|
11
|
+
* Per-run opt-in leaked-dialect safe-parse derived from the chat route
|
|
12
|
+
* (theokit#58 follow-up). When `true`, the resolved profile is cloned with
|
|
13
|
+
* `extractToolCallsFromContent: true` so the OpenAI-compatible transport
|
|
14
|
+
* recovers Hermes `<function=…></tool_call>` dialect leaked as text. Applied
|
|
15
|
+
* to the resolved chain; fail-open, so a non-leaking provider is unaffected.
|
|
16
|
+
*/
|
|
17
|
+
extractToolCallsFromContent?: boolean;
|
|
10
18
|
}
|
|
11
19
|
export declare function resolveProviderChainAsync(options: ProviderRouterOptions): Promise<LlmClient[]>;
|
|
12
20
|
/**
|
|
@@ -14,6 +14,17 @@ export interface ProviderRoute {
|
|
|
14
14
|
capability: ProviderCapability;
|
|
15
15
|
provider: string;
|
|
16
16
|
model?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Opt-in leaked-dialect safe-parse for this route's provider (theokit#58
|
|
19
|
+
* follow-up). When `true`, a `chat_completions` finish that carries ZERO
|
|
20
|
+
* native `tool_calls` has its assistant text scanned for the Hermes
|
|
21
|
+
* `<function=…></tool_call>` dialect, and any recovered calls are surfaced as
|
|
22
|
+
* real `tool_calls` so the loop executes them — for models (qwen3-coder via
|
|
23
|
+
* OpenRouter) that intermittently leak tool calls as text. Default `false`;
|
|
24
|
+
* fail-open (a partial/unclosed block never fabricates a call). Scoped to the
|
|
25
|
+
* resolved chat chain, so a non-leaking route is unaffected.
|
|
26
|
+
*/
|
|
27
|
+
extractToolCallsFromContent?: boolean;
|
|
17
28
|
}
|
|
18
29
|
/**
|
|
19
30
|
* Provider routing configuration accepted by `Agent.create()` via
|
package/package.json
CHANGED