William Valentin
4316dbd3be
feat: add P2 features — retry policy, prompt templating, usage tracking, tech debt cleanup
...
- Extract shared splitMessage() into channels/utils.ts (dedup 4 adapters)
- Add Slack user name resolution with caching (users.info API)
- Add withRetry() with exponential backoff + jitter, isRetryable() filter
- Wire retry config into ModelRouter.chat() (non-streaming only)
- Add assembleSystemPrompt() multi-file template system (SOUL/AGENTS/IDENTITY/USER/TOOLS.md)
- Add usage tracking accumulators in NativeAgent + AgentOrchestrator
- Add estimateCost() with per-model pricing table
- Add /usage TUI command with full usage report formatting
- Add retrySchema and promptSchema to config schema
Tests: 569 passing, typecheck clean
2026-02-06 15:12:35 -08:00
William Valentin
e4b7f96d33
fix: provider-aware model routing with fallback visibility
...
- Extract createClientFromConfig() to dispatch on provider field instead
of hardcoding all tiers as AnthropicClient
- Add fallback/fallbackReason metadata to ChatResponse and ChatStreamEvent
so callers know when a fallback model was used
- Enhance doctor check to report full model stack and warn on missing
API keys for cloud providers
- Log fallback warnings in NativeAgent and display them in TUI
- Support tier names and local_providers entries in fallback_chain
- Add 8 tests for createClientFromConfig covering all provider types
2026-02-06 09:58:56 -08:00
William Valentin
96ade25e98
feat(models): add tool use support to OpenAIClient
2026-02-05 17:44:04 -08:00
William Valentin
36c1cfc768
feat(models): add tool use support to AnthropicClient
2026-02-05 17:44:00 -08:00
William Valentin
b00706325b
feat: add tool framework foundation (types, registry, executor, shell tool, model types, SOUL.md)
...
- Task 0: SOUL.md + loadSystemPrompt() in daemon
- Task 1: Tool type definitions (Tool, ToolCall, ToolResult, etc.)
- Task 2: ToolRegistry with Anthropic/OpenAI serialization
- Task 3: ToolExecutor with hooks, timeout, truncation
- Task 4: shell.exec builtin tool
- Task 8: Model types updated for tool use (ToolDefinition, ModelToolCall, etc.)
- Task 15: Model index exports for tool types
2026-02-05 17:39:40 -08:00
William Valentin
d2a597d49d
fix: add model parameter to LlamaCppClient requests
2026-02-05 15:51:33 -08:00
William Valentin
dbf1acd822
feat: add streaming support and num_gpu option to Ollama client
2026-02-05 15:51:28 -08:00
William Valentin
dbeaa78e2c
feat: add setLocalClient and getLocalProviderName to ModelRouter
2026-02-05 13:34:25 -08:00
William Valentin
d86710577d
feat: wire up LlamaCppClient to model router
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-05 13:20:20 -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
William Valentin
9a48c39b07
feat(models): add streaming and tier switching to ModelRouter
2026-02-05 10:48:41 -08:00
William Valentin
896a0da10e
feat(models): add streaming support to AnthropicClient
2026-02-05 10:47:42 -08:00
William Valentin
1f0cf28d1f
feat(models): add streaming types for chat responses
2026-02-05 10:46:53 -08:00
William Valentin
26bd6ce65d
feat: add model router with fallback chain support
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-03 00:29:52 -08:00
William Valentin
bb16732562
feat: add Ollama client for local LLM support
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-03 00:27:09 -08:00
William Valentin
633cfcf713
feat: add OpenAI client for fallback support
...
Implements ModelClient interface with OpenAI SDK to support GPT models
as fallback when local inference is unavailable. Includes tests with
mocked OpenAI API responses.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-02 21:10:46 -08:00
William Valentin
75e64b534d
feat: add Anthropic client wrapper
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-02 20:54:17 -08:00