Repository navigation
feat: add direct Anthropic API authentication and completions - #281
Merged
Merged
Conversation
danielkov
commented
Oct 17, 2026
danielkov
enabled auto-merge (squash)
October 17, 2026 23:16
danielkov
disabled auto-merge
October 17, 2026 23:16
danielkov
enabled auto-merge (squash)
October 18, 2026 09:16
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.
Summary
Add direct Anthropic API completions using AgentKit鈥檚 existing Anthropic adapter, with
kit auth login|status|logout anthropic,ANTHROPIC_API_KEY, and provider/model selection across CLI, TUI, and ACP.Motivation
Claude Max subscribers can claim API credits into a Claude Console organization and use that organization鈥檚 API key with Kit. Direct API requests draw from Anthropic billing without using Claude subscription OAuth credentials.
Impact
Existing provider defaults remain unchanged. Anthropic login accepts a single-workspace API key at a hidden prompt, validates it through the non-inference Models API, and stores it in the selected persistent credential backend. A nonempty environment key overrides the saved key; logout removes only local credentials.
Document direct API setup and credential behavior. Credit balances remain in Claude Console rather than
kit usage.Technical details
Native completion adapter
Pin
agentkit-provider-anthropicto0.10.11; no transitive package versions change. The published archive checksum and packaged source match registry metadata and the upstream commit; provenance remains sole-owner and commit-based without a matching release tag.Discover models through the authenticated, paginated Anthropic Models API. Resolve selected IDs and aliases through the model-detail endpoint; use returned context limits, output ceilings, and thinking capabilities instead of hardcoded model-name rules. Requests are bounded by time and response size with redirects disabled. Preserve explicitly selected models with default reasoning when discovery is unavailable.
Cross-provider sessions
Remove unsigned foreign reasoning only from the Anthropic-bound transcript projection while preserving Anthropic signed and redacted thinking blocks. This permits switching existing sessions to Anthropic without sending invalid thinking blocks.