docs: align project documentation with ollama provider
This commit is contained in:
+42
-5
@@ -6,11 +6,11 @@ ChatGPT MCP Server
|
||||
|
||||
## Status
|
||||
|
||||
Planning complete. Phase 0 complete. Phase 1 complete. Phase 2 complete. Phase 3 complete. Phase 4 complete. Task 5.1 complete. Task 5.2 complete. Task 5.3 complete. Task 5.4 complete. Task 5.5 complete. Phase 6 complete. Phase 7 complete. Phase 8 complete (Task 8.0 — Manual Export Provider).
|
||||
Planning complete. Phase 0 complete. Phase 1 complete. Phase 2 complete. Phase 3 complete. Phase 4 complete. Task 5.1 complete. Task 5.2 complete. Task 5.3 complete. Task 5.4 complete. Task 5.5 complete. Phase 6 complete. Phase 7 complete. Phase 8 complete (Task 8.0 — Manual Export Provider). Phase 9 complete (Task 9.1 — Ollama Provider).
|
||||
|
||||
## Current Phase
|
||||
|
||||
All planned phases complete. Provider abstraction (Phase 6), integration tests (Phase 7), and manual export provider (Phase 8) finished.
|
||||
All planned phases complete. Provider abstraction (Phase 6), integration tests (Phase 7), manual export provider (Phase 8), and Ollama provider (Phase 9) finished. **3 supported providers: openai, manual, ollama.**
|
||||
|
||||
## Completed Tasks
|
||||
|
||||
@@ -137,6 +137,43 @@ Project-local Claude Code discovery configured:
|
||||
**Tests:** 56 new tests in `test/providers/manual-export.test.js` + 9 new in `test/providers/factory.test.js`
|
||||
- Total: 644 passing tests across 21 test files, zero regressions
|
||||
- `.claude/` added to `.gitignore` (no machine-specific paths committed)
|
||||
|
||||
- Task 9.1 — Ollama Provider Implementation ✅
|
||||
|
||||
**Provider implementation:**
|
||||
- `src/providers/ollama.js` — Local AI provider using Ollama `/api/chat` endpoint via native `fetch()` (zero new dependencies)
|
||||
- Implements `{ send(request, config) => Promise<{ content: string }> }` interface
|
||||
- Returns structured advisory responses from local LLM
|
||||
- Error categories: `OllamaTimeoutError`, `OllamaModelNotFoundError`, `OllamaValidationError`, `OllamaApiNotAvailableError`, `OllamaRequestError`
|
||||
|
||||
**Defaults:**
|
||||
- Base URL: `http://localhost:11434`
|
||||
- Model: `qwen3:latest`
|
||||
- Temperature: `0.2`
|
||||
- Timeout: `60` seconds
|
||||
|
||||
**Environment variables:**
|
||||
- `OLLAMA_BASE_URL` — Ollama API endpoint (default: `http://localhost:11434`)
|
||||
- `OLLAMA_MODEL` — Model name (default: `qwen3:latest`)
|
||||
- `OLLAMA_TEMPERATURE` — Sampling temperature (default: `0.2`)
|
||||
- `OLLAMA_TIMEOUT` — Request timeout in seconds (default: `60`)
|
||||
|
||||
**Factory integration:**
|
||||
- `"ollama"` added to SUPPORTED_PROVIDERS whitelist alongside `"openai"` and `"manual"`
|
||||
- `CHATGPT_MCP_PROVIDER=ollama` switches all tool handlers to local Ollama mode
|
||||
- Defaults to `"openai"` when not set — OpenAI behaviour unchanged
|
||||
- Same provider interface as openai and manual providers
|
||||
|
||||
## Phase 9 Completion Summary — Ollama Provider ✅
|
||||
|
||||
Three providers now supported: `openai`, `manual`, `ollama`.
|
||||
|
||||
- Factory in `src/providers/factory.js`: `SUPPORTED_PROVIDERS = Set(["openai", "manual", "ollama"])`
|
||||
- All three providers implement `{ send(request, config) => Promise<{ content: string }> }`
|
||||
- Provider selection via `CHATGPT_MCP_PROVIDER` environment variable
|
||||
- Zero additional dependencies — Ollama provider uses native `fetch()` only
|
||||
|
||||
## Next Pending
|
||||
- README.md updated with Setup, MCP Tools, and Running sections
|
||||
- MCP config snippet uses `"command": "npm"`, `"args": ["start"]` — no absolute paths
|
||||
- All 5 tools documented in README
|
||||
@@ -203,11 +240,11 @@ Provider abstraction layer decouples tool handlers from OpenAI implementation:
|
||||
## Phase 7 Completion Summary — Tests ✅
|
||||
|
||||
All tests rewritten and verified:
|
||||
- 579 passing tests across 20 test files (up from ~523)
|
||||
- 28 new provider/config tests in factory.test.js, openai.test.js, env.test.js
|
||||
- 644 passing tests across 21 test files (Phase 8 added 65 tests; Phase 9 has no new tests yet)
|
||||
- Provider/config tests in factory.test.js, openai.test.js, env.test.js, manual-export.test.js
|
||||
- All handler tests use `{ loadConfig, createProvider }` mock pattern
|
||||
- `npm start` → tools/list shows identical 5 tools with unchanged schemas
|
||||
|
||||
## Next Pending
|
||||
|
||||
No pending tasks. MVP is complete. Future work roadmap: Ollama provider implementation, Anthropic provider, streaming responses, response caching, structured output parsing.
|
||||
No pending tasks. MVP is complete. Future work roadmap: Anthropic provider, streaming responses, response caching, structured output parsing, cost tracking per tool call.
|
||||
|
||||
Reference in New Issue
Block a user