Commit Graph

9 Commits

Author SHA1 Message Date
William Valentin ae70818ec1 fix: resolve strict typecheck fallout in setup, routing, and tests 2026-02-15 23:22:05 -08:00
William Valentin 803cf1da11 audit follow-up: reduce warning debt in local model tests 2026-02-15 22:53:12 -08:00
William Valentin 955b9e28e0 feat: add OpenAI OAuth, strict model overrides, and Gmail pull mode 2026-02-13 14:55:40 -08:00
William Valentin c01de7d097 feat: native tool calling message normalization for Ollama and llama.cpp
- ollama.ts: add normalizeMessagesForOllama() converting Anthropic-style
  tool_use/tool_result blocks to Ollama's native tool_calls + role:tool format
- llamacpp.ts: add normalizeMessagesForLlamaCpp() with hybrid approach —
  assistant tool_calls in native format, but tool results as structured user
  messages (many GGUF templates silently drop role:tool messages)
- llamacpp.ts: add configurable requestTimeout with AbortController (default 3min)
- Both use fast-path when no tool blocks are present (zero overhead)
- Full test coverage for both normalizers: plain text passthrough, tool_use
  conversion, tool_result mapping, multi-tool round trips, error results
2026-02-11 09:33:21 -08:00
William Valentin fb20acfbcd feat: add tool calling support to Ollama and llama.cpp clients
- Ollama: pass tools to API, parse tool_calls responses, handle thinking field from reasoning models (deepseek-r1, glm-4.7-flash)
- llama.cpp: pass tools via OpenAI-compatible endpoint, parse tool_calls, accumulate streaming tool call deltas
- Both clients now set stopReason to 'tool_use' when tool calls are present
- Tests: 12 new tests (8 Ollama + 5 llama.cpp, total 983→995)
2026-02-07 17:20:27 -08:00
William Valentin d2a597d49d fix: add model parameter to LlamaCppClient requests 2026-02-05 15:51:33 -08:00
William Valentin 8e7fa24fd6 feat: add clear error message when llama-server not running 2026-02-05 13:17:56 -08:00
William Valentin e8079347c7 feat: add streaming support to LlamaCppClient
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:15:18 -08:00
William Valentin a20156f8db feat: add LlamaCppClient with basic chat support
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:11:56 -08:00