Skip to content

feat(server): rip out @anthropic-ai/claude-agent-sdk entirely#3629

Merged
mabry1985 merged 1 commit into
mainfrom
feat/rip-anthropic-sdk-final-step
May 22, 2026
Merged

feat(server): rip out @anthropic-ai/claude-agent-sdk entirely#3629
mabry1985 merged 1 commit into
mainfrom
feat/rip-anthropic-sdk-final-step

Conversation

@mabry1985
Copy link
Copy Markdown
Contributor

Why

PR 4 — final step of the namesake SDK cutover. Removes @anthropic-ai/claude-agent-sdk from the codebase entirely. The runtime path already routed through @protolabsai/sdk/anthropic-compat (PR #3625, #3626, #3628); this PR closes the loop on the type-level dependency and the inert verify-claude-auth endpoint.

Changes

apps/server/src/lib/sdk-options.ts — inline the agent-SDK type shapes locally instead of importing from @anthropic-ai/claude-agent-sdk. The 1000-line option-builder module now owns the type contract it actually emits (Options, HookCallback, HookCallbackResult, HookCallbackMatcher, PreToolUseHookInput, PostToolUseHookInput, HookEventInput). Field set tracks what we actually populate. The compat layer's runtime translation absorbs any structural differences (proto SDK accepts the wider shapes — see proto-provider.ts adapters).

Also drops the pathToClaudeCodeExecutable field from getBaseOptions() — proto SDK bundles its own CLI binary; there's no path to pin, and the compat layer's runtime ignores the field anyway. The constant CLAUDE_CODE_EXECUTABLE and its fileURLToPath import go with it.

apps/server/src/routes/setup/routes/verify-claude-auth.ts — deleted. The endpoint spawned the Claude Agent SDK to verify direct-Anthropic auth (api key + OAuth flows). Under gateway-first routing (#3619 et al.) there's no Claude auth to verify; the endpoint has been inert for weeks. UI callers (4 sites in setup-view/ and settings-view/api-keys/) will receive a 404 and surface their existing error path — those surfaces are being removed in the upcoming protoCLI first-class provider work, so a stub here would be wasted code.

apps/server/src/routes/setup/index.ts — drop the createVerifyClaudeAuthHandler import and its router registration. Comment explains the deletion.

apps/server/package.json@anthropic-ai/claude-agent-sdk removed from dependencies. @anthropic-ai/sdk (the bare Anthropic API SDK) stays — different package, used for the analytics path, not the agent loop.

Validation

  • npm run typecheck clean across all 21 workspaces
  • vitest run in apps/server: 3431 passed, 23 skipped, 0 failed
  • grep -rn "@anthropic-ai/claude-agent-sdk" apps/server/src libs/ returns only comments referring to the historical migration — no live imports

Still-open follow-ups

  • protoCLI fix: remove duplicate roleRegistryService on main #256 — widen the @protolabsai/sdk/anthropic-compat types so consumers don't need any casts. Today's casts in claude-provider.ts (mcpServers, outputFormat) and the local type shims in sdk-options.ts can collapse into a single import type { ... } from '@protolabsai/sdk/anthropic-compat' after the upstream widens.
  • protomaker — UI surfaces in setup-view/steps/claude-setup-step.tsx, setup-view/steps/providers-setup-step.tsx, and settings-view/api-keys/hooks/use-api-key-management.ts still call api.setup.verifyClaudeAuth. Those are getting reworked as part of the protoCLI first-class provider work (separate PR): a new protoCLI onboarding step + settings tab + autodetect + the Claude-specific surfaces retire alongside.

After this lands

The codename "Automaker" stays internal, but the agent SDK underneath is now fully @protolabsai/sdk. Every model dispatch through ClaudeProvider or ProtoProvider runs proto's CLI under the hood, routed via the gateway. Anthropic SDK dep is gone.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Warning

Review limit reached

@mabry1985, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 2 reviews/hour. Refill in 21 minutes and 17 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e9265f45-f723-489e-a5be-4128e498f588

📥 Commits

Reviewing files that changed from the base of the PR and between 581bf0f and 1c0fefc.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • apps/server/package.json
  • apps/server/src/lib/sdk-options.ts
  • apps/server/src/routes/setup/index.ts
  • apps/server/src/routes/setup/routes/verify-claude-auth.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rip-anthropic-sdk-final-step

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

Code Review — ? finding(s)

Async review running parallel to CodeRabbit. Findings are advisory; not all are merge blockers.

protoLabs Code Review Report

  • Generated: 2026-05-22T22:43:37Z
  • Git head: 1098868c1cc53e3cfbf966f3c2904ccfd1193ede
  • Features mapped: 3
  • Findings: 0

No findings recorded.

@mabry1985 mabry1985 merged commit c515c00 into main May 22, 2026
7 checks passed
@mabry1985 mabry1985 deleted the feat/rip-anthropic-sdk-final-step branch May 22, 2026 22:46
mabry1985 pushed a commit that referenced this pull request May 23, 2026
Minor bump — the first release since the proto SDK cutover, beads
integration, and ~64 commits of fixes / cleanup. Per `npm run
release:prepare` (auto-classified from conventional-commit prefixes).

Highlights since v0.107.1:

- proto SDK is now the primary driver — `@anthropic-ai/claude-agent-sdk`
  ripped out (#3625-#3629). ProtoProvider wraps `@protolabsai/sdk`,
  routes through the LiteLLM gateway, default model `protolabs/smart`.
- beads (`br`) tracker replaces the in-app TODO surface (#3639) — single
  source of truth between UI and crew, JSONL is git-friendly.
- create-new-project picker trimmed: ai-agent-app, design-system, and
  browser-extension starters removed (#3638) — 53k LoC deleted.
- Fault tolerance round (today): #3635/#3613/#3568/#3594/#3596/#3483
  closed — error reasons now reach `feature.statusChangeReason`,
  merged-PR reconciler has a branch-fallback path, escalation router
  no longer self-loops, KnowledgeIngestion and LabsService have path
  containment, branch-name unsafe-char merge gate hard-fails cleanly.
- Significant dead-code purge across UI + server (#3577-#3591) — dead
  routes, services, hooks, view components.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant