Skip to content

feat(anthropic): add opt-in native passthrough - #133

Closed
srnnkls wants to merge 1 commit into
raine:mainfrom
srnnkls:feat/anthropic-passthrough
Closed

srnnkls wants to merge 1 commit into
raine:mainfrom
srnnkls:feat/anthropic-passthrough

Conversation

@srnnkls

@srnnkls srnnkls commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for the feedback, and sorry my earlier description made the motivation hard to find.

Why

I use the proxy for multiple backends, but sometimes need to switch a task back to native Claude. Today that means changing the client setup or bypassing the proxy, which also loses the proxy's single model-routing path and monitor history.

This adds an opt-in Anthropic provider. With aliasProvider: anthropic, Claude model IDs use the credentials already sent by Claude Code, while GPT, Kimi, Grok, OpenCode Go, and Cursor IDs keep their existing routes.

What changes

  • Relays the original Messages request and stream to Anthropic, preserving native fields and thinking blocks.
  • Keeps requests visible in the existing monitor and handles token counting.
  • Stores no Anthropic credentials; authentication stays with Claude Code.

Nothing changes for existing users unless they select aliasProvider: anthropic.

Verification

Local mock-server tests cover buffered and streaming responses, errors, token counting, credential forwarding, and provider switching. The full Rust test suite and lint checks pass.

@srnnkls
srnnkls marked this pull request as ready for review September 14, 2026 09:18
@srnnkls

srnnkls commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Is anybody caring about PRs on this project?

@raine raine closed this Sep 14, 2026
@raine

raine commented Sep 14, 2026

Copy link
Copy Markdown
Owner

If you want your PR merged, I'd recommend a different strategy.

You could for example try a concise human readable explanation why you think it would be a good addition to the tool

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.

2 participants