@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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theokit/sdk",
3
- "version": "2.12.0",
3
+ "version": "2.13.0",
4
4
  "description": "TypeScript SDK for the Theo agent harness — same surface, local or cloud.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/usetheo/theokit-sdk#readme",