Add a Claude Agent SDK provider that uses your local Claude Code login - #368
Open
sstockdev wants to merge 2 commits into
Open
Add a Claude Agent SDK provider that uses your local Claude Code login#368sstockdev wants to merge 2 commits into
sstockdev wants to merge 2 commits into
Conversation
Uses your local Claude Code login instead of an API key. Adds a `claude_agent` entry in providers.json and a new ClaudeAgentProvider, wired into the config-driven provider setup. The SDK is an optional, lazily imported dependency, so a normal install doesn't need it.
The SDK provider joined text across every streamed assistant message, so a partial draft got glued onto the final answer and produced two JSON objects in a row. It also dropped the caller's schema, ran the subprocess with the host project's CLAUDE.md, settings, skills, and hooks loaded, and capped turns at 1. Together these broke resume extraction and scoring. - Keep only the last assistant message; prefer ResultMessage structured_output, then result. - Pass the caller's schema to output_format so the CLI returns validated JSON. - Run the subprocess in isolation mode: no filesystem settings, skills, or MCP servers. - Raise max_turns to 8 so structured output can finish. - Retry evaluate_resume up to 3 times on bad JSON. - Quiet the SDK's per-call bundled-CLI log line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a Claude Agent SDK provider so you can run the evaluator with a Claude model using your local Claude Code login, without setting an API key.
This is separate from the existing
anthropicprovider. That one calls the Anthropic API and needsANTHROPIC_API_KEY. This one rides on whatever you're already logged into in Claude Code.