feat: Inject model identity into system prompt
Without this, the model has no way to know which model is serving
its responses — needed for accurate Assisted-by commit footers.

Assisted-by: Claude Opus 4.6 via pi
change psxzlnoopptplzzxnqtlqqqqsomptrxl
commit bbadae733f0a1c01da6b36618f76a582aa21dce6
author Alpha Chen <alpha@kejadlen.dev>
date
parent lvwlunxo
diff --git a/.pi/agent/extensions/model-identity.ts b/.pi/agent/extensions/model-identity.ts
new file mode 100644
index 00000000..e0228747
--- /dev/null
+++ b/.pi/agent/extensions/model-identity.ts
@@ -0,0 +1,17 @@
+/**
+ * Model Identity Extension
+ *
+ * Injects the current model name into the system prompt so the model
+ * knows what it's running as (useful for Assisted-by footers, etc.)
+ */
+
+import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
+
+export default function (pi: ExtensionAPI) {
+	pi.on("before_agent_start", async (event, ctx) => {
+		const model = ctx.model;
+		return {
+			systemPrompt: event.systemPrompt + `\n\nYou are running as: ${model.provider}/${model.id}`,
+		};
+	});
+}