Conversation
… providerOptions Remove the custom <thinking> tag prompting, parsing, and stripping infrastructure from the agent. Modern LLMs have native thinking/reasoning capabilities via their APIs, making our manual XML-based thinking tag handling unnecessary complexity. Instead, add a `thinkingEffort` option (CLI: `--thinking-effort`) that passes provider-specific thinking configuration through Vercel AI SDK's `providerOptions`: - Anthropic: `thinking.budgetTokens` - OpenAI: `reasoningEffort` - Google: `thinkingConfig.thinkingBudget` Accepts 'low', 'medium', 'high', or a custom token budget number. Disabled by default (no providerOptions sent). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PR Overview: Replace XML Tool Calling with Native Vercel AI SDK ToolsSummaryThis PR is a major architectural refactoring that replaces the custom XML-based tool calling infrastructure (~2000+ lines) with Vercel AI SDK native Files Changed Analysis
Architecture & Impact AssessmentWhat this PR accomplishes:
Key technical changes:
flowchart TB
subgraph "Before (XML-based)"
A1[System Prompt with XML Tool Definitions] --> A2[Manual While Loop]
A2 --> A3[XML Response Parsing]
A3 --> A4[Custom Thinking Tag Removal]
A4 --> A5[Tool Execution]
A5 --> A2
end
subgraph "After (Native Vercel AI SDK)"
B1["Native tool\(\) with Zod Schemas"] --> B2["streamText\(\) with tools"]
B2 --> B3[SDK Auto Tool-Use Loop]
B3 --> B4[Native providerOptions Thinking]
B4 --> B5[Automatic Tool Execution]
B5 --> B3
end
Affected system components:
Scope Discovery & Context ExpansionThe changes affect the entire agent execution pipeline. Related areas to verify:
Note: The diff shows significant simplification but the actual file content still contains XML parsing code. This discrepancy should be verified - the PR may be in progress or the diff represents the target state. Test Plan (from PR description)
Metadata
Powered by Visor from Probelabs Last updated: 2026-03-03T20:25:44.860Z | Triggered by: pr_updated | Commit: 7168b77 💡 TIP: You can chat with Visor using |
Architecture Issues (8)
Performance Issues (5)
Architecture Issues (8)
Powered by Visor from Probelabs Last updated: 2026-03-03T20:19:12.187Z | Triggered by: pr_updated | Commit: 7168b77 💡 TIP: You can chat with Visor using |
…port Replace custom XML-based tool calling (~2000+ lines of XML parsing, definitions, and error recovery) with Vercel AI SDK native tool() and streamText() with stopWhen/stepCountIs. The SDK now manages the entire tool-use/tool-result loop automatically. Key changes: - Add _buildNativeTools() that creates Vercel tool() objects with execute functions wrapping event emission, telemetry, and truncation - Replace manual while-loop agent iteration with streamText maxSteps - Use stepCountIs() and inputSchema (AI SDK v5 API) instead of maxSteps and parameters - Auto-wrap plain JSON Schema objects with jsonSchema() for SDK compat - Implement Gemini google_search/url_context as wrapper function tools using separate generateText calls (avoids provider tool mixing) - Remove XML parsing infrastructure: parseXmlToolCall, parseXmlToolCallWithRecovery, parseHybridXmlToolCall, xmlParsingUtils - Remove XML tool definition strings from common.js (~300 lines) - Remove stuck-loop detection, XML error recovery helpers - Simplify system message (remove XML format guidelines and tool defs) - Delete 6 obsolete test files, update 14 remaining test files Net reduction: ~5600 lines across 29 files. All 106 test suites pass (2619 tests). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ilure The npm link command re-triggers the postinstall script, which tries to import fs-extra before node_modules is properly resolved in the global link context. Since the binary is already manually placed in npm/bin/ by a prior step, the postinstall script is unnecessary here. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npm resolves `github:` dependencies via SSH by default, which fails when CI runners lack SSH keys for the org. Force HTTPS via git config since the SandboxJS dependency repo is public. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
tool()+streamText()withstopWhen/stepCountIs— the SDK now manages the entire tool-use/tool-result loop automaticallygenerateTextcalls (avoids provider-defined tool mixing restriction)providerOptionsinstead of custom thinking tagsWhat changed
tool()with Zod/JSON schemasstreamText()withmaxStepsviastopWhen: stepCountIs(N)generateTextcallstoolsparameterKey technical details
stopWhen: stepCountIs(N)(notmaxSteps),inputSchema(notparameters)jsonSchema()for SDK compatibility (edit/create tools)attempt_completiontool uses AbortController to cleanly exit the streamText loopTest plan
🤖 Generated with Claude Code