graphlit-client 1.0.20260626005 → 1.0.20260626006

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.
Files changed (2) hide show
  1. package/dist/client.js +12 -2
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -8631,8 +8631,18 @@ class Graphlit {
8631
8631
  if (process.env.DEBUG_GRAPHLIT_SDK_STREAMING) {
8632
8632
  console.log(`🚀 [Graphlit SDK] Routing to Anthropic streaming provider | Spec: ${specification.name} (${specification.id}) | Messages: ${messages.length} | Tools: ${tools?.length || 0} | SystemPrompt: ${systemPrompt ? "Yes" : "No"}`);
8633
8633
  }
8634
- // Get thinking configuration from specification
8635
- const thinkingConfig = this.getThinkingConfig(specification);
8634
+ // Get thinking configuration from specification. Anthropic rejects native
8635
+ // tool_choice when thinking is enabled, but required tool rounds must be
8636
+ // deterministic. For those rounds, temporarily suppress thinking so the
8637
+ // provider can enforce the requested tool natively; normal thinking resumes
8638
+ // on subsequent non-forced rounds.
8639
+ const configuredThinkingConfig = this.getThinkingConfig(specification);
8640
+ const thinkingConfig = toolChoice ? undefined : configuredThinkingConfig;
8641
+ if (toolChoice &&
8642
+ configuredThinkingConfig &&
8643
+ process.env.DEBUG_GRAPHLIT_SDK_STREAMING) {
8644
+ console.log("🧠 [Graphlit SDK] Anthropic thinking disabled for required tool_choice round");
8645
+ }
8636
8646
  if (thinkingConfig && process.env.DEBUG_GRAPHLIT_SDK_STREAMING) {
8637
8647
  if (thinkingConfig.type === "adaptive") {
8638
8648
  console.log(`🧠 [Graphlit SDK] Anthropic adaptive thinking enabled | Effort: ${thinkingConfig.effort ?? "default"}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphlit-client",
3
- "version": "1.0.20260626005",
3
+ "version": "1.0.20260626006",
4
4
  "description": "Graphlit API Client for TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/client.js",