From e99aca98abe082d5cdcbfaf0e8549a7b14b5858f Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 18 Mar 2026 04:18:26 -0700 Subject: [PATCH] feat: inject model and provider into system prompt Adds model name and provider to the system prompt metadata block, alongside the existing session ID and timestamp. These are frozen at session start and don't change mid-conversation, so they won't break prompt caching. --- run_agent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run_agent.py b/run_agent.py index fee04f396..e5c89abb3 100644 --- a/run_agent.py +++ b/run_agent.py @@ -2061,6 +2061,10 @@ class AIAgent: timestamp_line = f"Conversation started: {now.strftime('%A, %B %d, %Y %I:%M %p')}" if self.pass_session_id and self.session_id: timestamp_line += f"\nSession ID: {self.session_id}" + if self.model: + timestamp_line += f"\nModel: {self.model}" + if self.provider: + timestamp_line += f"\nProvider: {self.provider}" prompt_parts.append(timestamp_line) platform_key = (self.platform or "").lower().strip()