docs: align project documentation with ollama provider

This commit is contained in:
2026-06-15 14:05:05 +01:00
parent 7bc0622c9c
commit bc9eb4e040
5 changed files with 162 additions and 16 deletions
+33 -5
View File
@@ -61,16 +61,19 @@ OpenAI Provider → OpenAI Responses API
Advisory Response
```
The provider layer is configurable via `CHATGPT_MCP_PROVIDER` env var. Two providers are available:
The provider layer is configurable via `CHATGPT_MCP_PROVIDER` env var. Three providers are available:
| Value | Description | Use case |
| -------- | -------------------------------------------------------------- | ------------------------------------------- |
| `openai` | Default — calls ChatGPT via OpenAI API | Automated second-opinion queries |
| `manual` | Copy-paste — wraps prompts in a ready-to-copy format | Manual ChatGPT Web/Business as advisor |
| `ollama` | Local AI — uses Ollama `/api/chat` with Qwen3 model | Offline/local second-opinion via local LLM |
For the **manual** provider, set `CHATGPT_MCP_PROVIDER=manual`. Each tool call returns a copy-ready prompt block you can paste into ChatGPT Web or ChatGPT Business. This turns Claude Code into an orchestrator: it builds the perfect prompt and formats it for you to hand off to ChatGPT as a second-opinion advisor — all without API calls, quotas, or cost.
The factory pattern enables future providers (Ollama, Anthropic, custom) without touching tool handlers.
For the **ollama** provider, set `CHATGPT_MCP_PROVIDER=ollama` and ensure Ollama is running locally. The provider uses Qwen3 via Ollama's OpenAI-compatible `/api/chat` endpoint with no additional dependencies. This turns Claude Code into an orchestrator: it builds the perfect prompt and sends it directly to your local model — all without cloud API calls, quotas, or cost.
The factory pattern enables future providers (Anthropic, custom) without touching tool handlers.
All responses are advisory only.
@@ -98,6 +101,13 @@ All responses are advisory only.
- Structured error handling
- Safe error messages without secret leakage
### Local AI Provider (Ollama)
- Uses Ollama `/api/chat` endpoint via native `fetch()` — zero new dependencies
- Default model: `qwen3:latest` on `http://localhost:11434`
- Configurable temperature, timeout, and base URL
- Produces the same structured advisory responses as OpenAI provider
### Prompt System
- Shared base prompt layer
@@ -122,19 +132,20 @@ All responses are advisory only.
### Testing
- 523+ automated tests
- 644 automated tests across 21 files
- Unit-tested utilities
- Prompt builder coverage
- OpenAI integration coverage
- Tool handler orchestration coverage
- MCP registration verification
- Manual export provider coverage (56 tests)
---
## Requirements
- Node.js 20+
- OpenAI API key
- OpenAI API key **OR** Ollama (with `qwen3:latest` model pulled) **OR** use `manual` provider for zero-API workflow
- Claude Code (or another MCP-compatible client)
---
@@ -156,8 +167,23 @@ export OPENAI_API_KEY=sk-your-key
Optional environment variables:
```bash
# Provider selection (default: openai)
export CHATGPT_MCP_PROVIDER=openai # or "manual" or "ollama"
# OpenAI provider settings
export OPENAI_MODEL=gpt-5.1
export OPENAI_TEMPERATURE=0.2
export OPENAI_MAX_OUTPUT_TOKENS=2000
# Ollama provider settings (used when CHATGPT_MCP_PROVIDER=ollama)
export OLLAMA_BASE_URL=http://localhost:11434
export OLLAMA_MODEL=qwen3:latest
export OLLAMA_TEMPERATURE=0.2
export OLLAMA_TIMEOUT=60
# General settings
export CHATGPT_MCP_LOG_LEVEL=info
export CHATGPT_MCP_MAX_INPUT_CHARS=30000
```
---
@@ -215,6 +241,8 @@ After opening the project in Claude Code, the server should be automatically dis
Implemented:
- OpenAI Responses API integration
- Ollama local AI provider (`qwen3:latest`) — zero new dependencies
- Three configurable providers: `openai`, `manual`, `ollama`
- Shared validation and safety utilities
- Context budget management
- Five prompt builders
@@ -222,7 +250,7 @@ Implemented:
- MCP stdio server
- Registration of all five MCP tools
- Claude Code integration documentation
- Comprehensive automated test suite (523+ tests)
- Comprehensive automated test suite (644 tests across 21 files)
### Next Steps