feat(llm): formal adapter registry for LLM backends (#1403)#1438
Merged
mrveiss merged 2 commits intoDev_new_guifrom Mar 7, 2026
Merged
feat(llm): formal adapter registry for LLM backends (#1403)#1438mrveiss merged 2 commits intoDev_new_guifrom
mrveiss merged 2 commits intoDev_new_guifrom
Conversation
PersonalitySettings fetched /autobot-api/voice/voices directly through nginx, but the main backend rejects the SLM JWT. Added voice_proxy.py (same pattern as personality_proxy) that forwards with X-Internal-API-Key.
Implement pluggable adapter registry with standard interface for all
LLM backends. Each adapter provides execute, test_environment,
list_models, and optional session_codec.
- AdapterBase ABC with DiagnosticLevel/Message/EnvironmentTestResult
- AdapterRegistry singleton with register/lookup/fallback/per-agent config
- OllamaAdapter wrapping existing OllamaProvider
- AIStackAdapter wrapping existing AIStackClient
- OpenAIAdapter wrapping existing OpenAIProvider
- AnthropicAdapter for Anthropic Claude API
- ProcessAdapter for CLI subprocess backends
- API endpoints: GET /api/adapters, GET /api/adapters/{type}/test,
GET /api/adapters/{type}/models, GET /api/adapters/health,
POST/DELETE /api/adapters/agent/{id}/override
- ProviderType enum extended with AI_STACK and PROCESS
- Registry auto-initialized during LLMInterface startup
|
| Metric | Count |
|---|---|
| Total Violations | 372 |
| SSOT Violations (high priority) | 287 |
| Other Violations | 85 |
⚠️ 287 values have SSOT config equivalents!
These should be replaced with SSOT config imports:
Python:
from src.config.ssot_config import config
# Use: config.vm.main, config.port.backend, config.backend_urlTypeScript:
import config from '@/config/ssot-config'
// Use: config.vm.main, config.port.backend, config.backendUrl📖 See SSOT_CONFIG_GUIDE.md for documentation.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
execute(),test_environment(),list_models(), optionalsession_codecOllamaAdapter— wraps existingOllamaProviderAIStackAdapter— wraps existingAIStackClientOpenAIAdapter— wraps existingOpenAIProviderAnthropicAdapter— Anthropic Claude API via SDKProcessAdapter— CLI subprocess backends (e.g. Claude Code)DiagnosticLevel(info/warn/error),DiagnosticMessage,EnvironmentTestResult/api/adapters:GET /— list all adaptersGET /{type}/test— environment self-diagnosisGET /{type}/models— dynamic model discoveryGET /health— test all adapters in parallelPOST /agent/{id}/override— per-agent adapter configDELETE /agent/{id}/override— clear per-agent overrideAI_STACKandPROCESSLLMInterfacestartupTest Plan
GET /api/adaptersreturns all 5 registered adaptersGET /api/adapters/ollama/testreturns structured diagnosticsGET /api/adapters/ollama/modelsreturns available modelsGET /api/adapters/healthtests all adapters in parallelPOST /api/adapters/agent/test-agent/overridesets per-agent configCloses #1403