Persona chats from SMS threads (talk about / practice), date_info, photos never sent to OpenRouter #186

Merged
cameron merged 8 commits from feat/sms-anchored-persona-chat into master 2026-10-21 00:11:23 +00:00
Showing only changes of commit 7215c1bdfe - Show all commits
+8 -4
View File
@@ -935,10 +935,14 @@ impl PersonaChatSession {
// Build a no-photo tool catalog. `current_gate_opts_for_persona` // Build a no-photo tool catalog. `current_gate_opts_for_persona`
// already probes each tool's backing table for presence and // already probes each tool's backing table for presence and
// honours the persona's `allow_agent_corrections` toggle. // honours the persona's `allow_agent_corrections` toggle.
let mut gate_opts = self.generator.current_gate_opts_for_persona( // `has_vision` only gates `describe_photo`, which describes the file
backend.images_inline, // chat's photo. A persona chat has no photo, so the tool could only
Some((user_id, &persona.persona_id)), // ever answer "No image available" and waste a round. Vision in a
); // persona chat goes through the thread tools (look_at_message_image,
// look_at_photo), which use the local vision model directly.
let mut gate_opts = self
.generator
.current_gate_opts_for_persona(false, Some((user_id, &persona.persona_id)));
gate_opts.sms_thread_tools = row.anchor.is_some(); gate_opts.sms_thread_tools = row.anchor.is_some();
let tools = InsightGenerator::build_tool_definitions(gate_opts); let tools = InsightGenerator::build_tool_definitions(gate_opts);
// Practice mode narrows the catalog to the thread itself — no // Practice mode narrows the catalog to the thread itself — no