You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(ai): define server-side AI adapter interface with Gemma mock provider #9
Implement the provider-agnostic server-side AI adapter interface in lib/ai/ with a mock provider and Gemma inference integration.
Context
Per docs/ARCHITECTURE.md (Section 7), AI is a supporting tool for categorization, summarization, and duplicate suggestions, not an authoritative judge. The web application must remain fully usable when the AI service is unavailable or offline.
Scope
AI Adapter Interface (lib/ai/adapter.ts):
suggestCategory(title, description)
generateSummary(description)
findPotentialDuplicates(title, description)
Provider Implementations:
MockAIProvider for testing and local development without an active model server.
GemmaAIProvider connecting to an HTTP inference endpoint configured via GEMMA_BASE_URL and GEMMA_API_TOKEN.
Resilience & Fallback:
Non-blocking async execution; submission does not stall or fail if AI inference errors or times out.
Acceptance Criteria
Type-safe provider interface implemented.
Mock provider delivers instant deterministic responses in dev/test environments.
Failure in AI inference leaves manual user submissions unimpaired.
Activity