Skip to content

feat(web-chat): OpenAI-compatible LLM provider (North Mini Code)#130

Open
robouden wants to merge 1 commit into
mainfrom
feat/web-chat-openai-provider
Open

feat(web-chat): OpenAI-compatible LLM provider (North Mini Code)#130
robouden wants to merge 1 commit into
mainfrom
feat/web-chat-openai-provider

Conversation

@robouden

Copy link
Copy Markdown
Contributor

What

Adds an env-gated OpenAI-compatible LLM path to cmd/web-chat alongside the existing Anthropic call, so the assistant can run non-Claude models — e.g. Cohere North Mini Code via OpenCode Zen (free) or self-hosted vLLM — without changing the agentic/tool loop.

A translation layer (callOpenAI + anthropicToOpenAIMessages) maps the internal Anthropic message/tool shape to/from OpenAI chat-completions.

Config (defaults preserve current Claude behavior)

  • LLM_PROVIDER = anthropic (default) | openai
  • LLM_BASE_URL, LLM_API_KEY, LLM_MODEL

Run with North Mini Code (OpenCode Zen, free)

LLM_PROVIDER=openai LLM_BASE_URL=https://opencode.ai/zen/v1 \
LLM_MODEL=north-mini-code-free LLM_API_KEY=<zen-key> \
MCP_URL=http://localhost:3333/mcp-http ./web-chat

Status

⚠️ Compiles and preserves the default Claude path, but the OpenAI path is not yet verified against a live model. Plan/verification steps in docs/plans/web-chat-openai-provider.md. Hold merge until local tool-call round-trip is confirmed.

🤖 Generated with Claude Code

Add an env-gated OpenAI-compatible path alongside the existing Anthropic
call so the assistant can run non-Claude models (e.g. Cohere North Mini
Code via OpenCode Zen or self-hosted vLLM) without touching the agentic
loop. Translates the internal Anthropic message/tool shape to/from the
OpenAI chat-completions format.

Config via LLM_PROVIDER/LLM_BASE_URL/LLM_API_KEY/LLM_MODEL; defaults
preserve the current Claude behavior.

Co-Authored-By: Claude Opus 4.8 <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