feat(tools): add read_audio, read_video, create_video tools and fix system prompt tool filtering

- Add read_audio tool with Gemini File API, OpenAI input_audio, and fallback support
- Add read_video tool with Gemini File API and base64 fallback for video analysis
- Add create_video tool with Gemini Veo and OpenRouter chat completions support
- Add shared gemini_file_api.go for upload → poll → generateContent pipeline
- Add shared openai_compat_call.go for custom JSON chat completions
- Fix system prompt showing denied tools: use filteredToolNames() instead of tools.List()
- Wire audio/video MediaRef context propagation in agent loop
- Register new tools in seed data, policy groups, and web UI settings
- Enforce duration (max 30s) and aspect_ratio limits on create_video
This commit is contained in:
viettranx committed 2026-03-08 14:43:18 +07:00
1 parent ea185b3f6c
commit 691ddce8fb
15 files changed
+1484 -7

No files matched your search

+1 -1
View File
@@ -128,7 +128,7 @@ func (l *Loop) runMemoryFlush(ctx context.Context, sessionKey string, settings *
Model: l.model,
Workspace: l.workspace,
Mode: PromptMinimal,
ToolNames: l.tools.List(),
ToolNames: l.filteredToolNames(),
HasMemory: l.hasMemory,
})
systemPrompt += "\n\n" + settings.SystemPrompt