feat: add POST /insights/generate/agentic handler and route

Register the agentic insight endpoint that validates tool-calling capability,
runs the agentic loop, and returns the stored PhotoInsightResponse. Returns 400
for unsupported models, 500 for other errors. Max iterations configurable via
AGENTIC_MAX_ITERATIONS env var (default 10).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Cameron
2026-03-18 23:01:25 -04:00
parent 7615b9c99b
commit 091327e5d9
3 changed files with 105 additions and 2 deletions

View File

@@ -1189,6 +1189,7 @@ fn main() -> std::io::Result<()> {
.service(get_file_metadata)
.service(memories::list_memories)
.service(ai::generate_insight_handler)
.service(ai::generate_agentic_insight_handler)
.service(ai::get_insight_handler)
.service(ai::delete_insight_handler)
.service(ai::get_all_insights_handler)