soul: let Neuron answer 'what model am I running on?' — inject current engine into system prompt
Neuron Soul CI / build (pull_request) Failing after 10m43s
Neuron Soul CI / deploy (pull_request) Has been skipped

Additive: appends a factual [CURRENT ENGINE: <model>] line to the system prompt (model from the
request body — accurate even under Auto routing; falls back to configured default). An LLM can't
know its own model from training (name/version assigned post-training), so the harness must tell it.
Identity-consistent: model = engine, self layered on top. Does NOT alter identity/values/safety.
PARSES (elc chat.el exit 0); NOT built/tested — ships with the soul rebuild.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tim Lingo
2026-06-30 19:13:10 -05:00
parent 933547265e
commit b24f6d645b
+21 -1
View File
@@ -602,6 +602,21 @@ fn json_safe(s: String) -> String {
return s4
}
// current_engine_note a short, FACTUAL line appended to the system prompt so Neuron can answer
// "what model/LLM are you running on?" truthfully. An LLM cannot know its own model from training
// (the name/version is assigned AFTER training finishes), so the harness must tell it. This is
// identity-consistent: the model is the ENGINE; the self (identity, values, memory) is layered on
// top. ADDITIVE it adds a fact, it does not alter identity, values, or the safety layer.
fn current_engine_note(model: String) -> String {
if str_eq(model, "") {
return ""
}
return "\n\n[CURRENT ENGINE: this turn is generated by the underlying model \"" + model
+ "\". It is the engine beneath your self — your identity, values, and memory are layered on"
+ " top of it. If the user asks which model or LLM you are running on, answer with this model"
+ " id plainly and truthfully; never guess a different one.]"
}
// build_system_prompt assemble the system prompt for a chat turn.
// chat_mode: Bool pass true from handle_chat (no tools), false from agentic paths.
// Issue #9 fix: no_tools_rule only included when chat_mode=true.
@@ -959,7 +974,12 @@ fn handle_chat(body: String) -> String {
}
let ctx: String = engram_compile(activation_seed)
let system: String = affective_prefix + build_system_prompt(ctx, true)
// Tell the LLM which engine it is running on this turn, so it can answer truthfully instead of
// guessing. The per-turn model rides in the request body (concrete even under Auto routing);
// fall back to the configured default when blank.
let sp_req_model: String = json_get(body, "model")
let sp_model: String = if str_eq(sp_req_model, "") { chat_default_model() } else { sp_req_model }
let system: String = affective_prefix + build_system_prompt(ctx, true) + current_engine_note(sp_model)
let seen_ids: String = state_get("engram_compile_seen_ids")