refactor: make routing system extensible with provider/builder interfaces
ci / test (push) Failing after 3m24s

BREAKING: LLMRouter now requires explicit LLMProvider

New Abstractions:
- LLMProvider interface: swap providers (OpenAI, Claude, local, etc)
- SpecBuilder interface: custom spec generation strategies
- ParameterBinder interface: flexible parameter resolution
- ActivityExecutor interface: pluggable activity execution
- WorkflowValidator interface: composable validation

Provider System:
- ProviderRegistry: manage multiple LLM providers
- RoutingProviderLLM: fallback across providers
- CachingLLMProvider: caching wrapper
- RetryingLLMProvider: retry wrapper

Spec Building:
- DefaultSpecBuilder: basic spec generation
- CronSpecBuilder: cron workflow specialization
- SpecBuilderFactory: builder selection
- CompositeSpecBuilder: multi-strategy fallback
- BuildMetadata: context for builders

Validators:
- StateGraphValidator: DAG structure
- ActivityAvailabilityValidator: activity existence
- TimeoutValidator: timeout format
- CompositeValidator: multiple validators
- TransitionValidator: state transitions

Refactored Components:
- LLMRouter: config-driven, provider-agnostic
- LLMClient: now implements LLMProvider
- llm_router.go: 97 fewer lines (delegated to builders)

Migration Path:
OLD: NewLLMRouter(kb)
NEW: NewLLMRouter(LLMRouterConfig{Provider: ..., KB: ...})
This commit is contained in:
Test
2026-09-03 09:17:38 -07:00
parent fd2ebce8e1
commit 0d70da4f31
7 changed files with 856 additions and 27 deletions
+1 -1
View File
@@ -9,6 +9,6 @@ metadata:
app.kubernetes.io/name: poimen
app.kubernetes.io/component: orchestrator
data:
GIT_COMMIT: "b37319a9" # Updated automatically by CI/CD
GIT_COMMIT: "ca0a9376" # Updated automatically by CI/CD
GIT_BRANCH: "main"
DEPLOYMENT_DATE: "2026-09-03"
+1 -1
View File
@@ -13,7 +13,7 @@ spec:
labels:
app: poimen-worker
annotations:
git-commit: "b37319a9" # ✅ Updated on each push, triggers rolling restart
git-commit: "ca0a9376" # ✅ Updated on each push, triggers rolling restart
deployment-date: "2026-09-03"
spec:
containers: