Skip to content

Added OpenAI-compatible proxy for Claude Code - #136

Merged
oleg68 merged 3 commits into
nbplugins:mainfrom
oleg68:feature/openai-proxy
May 23, 2026
Merged

oleg68 merged 3 commits into
nbplugins:mainfrom
oleg68:feature/openai-proxy

Conversation

@oleg68

@oleg68 oleg68 commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • New OpenAI-compatible API connection type in profile settings routes Claude Code through any OpenAI-compatible provider (OpenAI, Azure, Groq, DeepSeek, Ollama, LM Studio, etc.) without any changes to the CLI
  • Internal HTTP proxy embedded in the existing MCPSseServer (no new port); each session gets a unique UUID path for isolation
  • AnthropicToOpenAITranslator: full bidirectional translation — requests (system prompt, tool use, tool results, multimodal, thinking/reasoning_content blocks), streaming SSE state machine, non-streaming responses, error normalization to Anthropic format
  • Profile HTTP proxy settings (system/none/custom) applied to outbound OpenAI requests via ProxyConfiguration
  • Renamed Other API → Claude-compatible API and OpenAI Compatible Proxy → OpenAI-compatible API in UI and docs
  • 20 unit tests for AnthropicToOpenAITranslator with JSON fixtures
  • User manual, README, CLAUDE.md updated; docs/testing-openai-proxy-opencode-zen.md added with free-model testing guide

Test plan

  • Create profile with OpenAI-compatible API, Base URL https://opencode.ai/zen, API key from opencode.ai
  • Add Model Alias claude-sonnet-4-5 → opencode/big-pickle (or other free model)
  • Start session — verify streaming response appears
  • Trigger a file edit — verify tool use round-trip works
  • Open two sessions with same profile simultaneously — both work independently
  • Verify provider errors (401, 429) are displayed with the actual provider message
  • Run mvn test — 20 translator tests + full suite pass

🤖 Generated with Claude Code

Oleg Samarin and others added 3 commits May 22, 2026 22:47
…ough any OpenAI-compatible API provider

- New OpenAI-compatible API connection type in profile settings
- Internal HTTP proxy embedded in MCPSseServer (no new port) with per-session UUID routing
- AnthropicToOpenAITranslator: full bidirectional translation including streaming SSE,
  tool use, thinking/reasoning_content blocks, and error normalization
- Profile proxy settings (system/none/custom) applied to outbound OpenAI requests
- Renamed Other API → Claude-compatible API, OpenAI Compatible Proxy → OpenAI-compatible API
- 20 unit tests for AnthropicToOpenAITranslator with JSON fixtures
- User manual, README, CLAUDE.md updated; testing guide added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r proxy→openaiproxy rename

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oleg68
oleg68 merged commit 014f32a into nbplugins:main May 23, 2026
3 checks passed
@oleg68
oleg68 deleted the feature/openai-proxy branch May 23, 2026 07:42
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