The agent was calling generate() — pure model memory — which caused Mistral
to hallucinate specs for older devices (e.g. i5-1135G7 instead of i3-3120M).
generateWithWebSearch() is now used so Mistral queries live sources.
OllamaClientInterface gains generateWithWebSearch(); OllamaClient falls back
to generate() since Ollama has no built-in search tool.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All agent prompts are now stored in app.prompt_templates (migration 20260519000000)
and editable by admins via the new AI Prompts CRUD page. If no DB entry exists
for a key the hardcoded default is used automatically as fallback.
PromptTemplateService renders templates with {{variable}} substitution.
All four agents (SpecsResearch, JsonCoding, EbayText, OllamaVision) use the service.
SpecsResearchAgent now receives the articleType name (e.g. "Laptop") so the
specs prompt is scoped to the correct device category instead of being generic.
SpecsResearchHandler loads the ArticleType from the repository for this purpose.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Messages and handlers for the full AI pipeline:
DraftArticle → Validation → SpecsResearch → PhotoUpload → EbayText →
JsonCoding → PublishToChannel / DeactivateListingMessage / TrackingPush /
UpdateStockOnChannels / OrderReceived.
OllamaClient and OllamaClientInterface provide the base LLM backend.
AI agents (EbayTextAgent, JsonCodingAgent, OllamaVisionAgent,
SpecsResearchAgent) wrap the client with task-specific prompts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>