Dungeon lanes: Opus for the narrator and Personas, Sonnet for play, elaborator and seed, Haiku for the interpreter

Per ruling dungeon-model-per-role-answer (opus-voice); each lane still reads its own env override.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-02 19:11:57 +01:00
commit 4d1e4859f4

View file

@ -90,13 +90,20 @@ fn connector_binding() -> anyhow::Result<ConnectorBinding> {
})
}
/// The model each lane runs on, from env with the tiered defaults.
/// The model each lane runs on, from env over the defaults the rulings set
/// (dungeon-model-per-role-answer): Opus for the narrator (the projector) and
/// the NPC Personas, Sonnet for the play table and the elaborator (which also
/// seeds), Haiku for the interpreter and the operational agent.
fn lane_models() -> (ControllerModels, String) {
let lane = |name: &str, default: &str| std::env::var(name).unwrap_or_else(|_| default.into());
lane_models_from(|name| std::env::var(name).ok())
}
fn lane_models_from(read: impl Fn(&str) -> Option<String>) -> (ControllerModels, String) {
let lane = |name: &str, default: &str| read(name).unwrap_or_else(|| default.into());
(
ControllerModels {
projector: lane("GHOSTLIGHT_CONTROLLER_PROJECTOR_MODEL", "claude-sonnet-5-5"),
persona: lane("GHOSTLIGHT_CONTROLLER_PERSONA_MODEL", "claude-sonnet-5-5"),
projector: lane("GHOSTLIGHT_CONTROLLER_PROJECTOR_MODEL", "claude-opus-5-5"),
persona: lane("GHOSTLIGHT_CONTROLLER_PERSONA_MODEL", "claude-opus-5-5"),
interpreter: lane("GHOSTLIGHT_CONTROLLER_INTERPRETER_MODEL", "claude-haiku-5-5"),
operational_agent: lane("GHOSTLIGHT_CONTROLLER_OPERATIONAL_MODEL", "claude-haiku-5-5"),
elaborator: lane("GHOSTLIGHT_CONTROLLER_ELABORATOR_MODEL", "claude-sonnet-5-5"),
@ -565,6 +572,36 @@ fn require_no_runtime_custody_failure(
mod tests {
use super::*;
#[test]
fn lanes_default_to_the_ruled_tiers_and_each_reads_its_own_override() {
let (models, play) = lane_models_from(|_| None);
assert_eq!(models.projector, "claude-opus-5-5", "the narrator");
assert_eq!(models.persona, "claude-opus-5-5");
assert_eq!(models.elaborator, "claude-sonnet-5-5");
assert_eq!(play, "claude-sonnet-5-5");
assert_eq!(models.interpreter, "claude-haiku-5-5");
assert_eq!(models.operational_agent, "claude-haiku-5-5");
for (name, lane) in [
("GHOSTLIGHT_CONTROLLER_PROJECTOR_MODEL", 0),
("GHOSTLIGHT_CONTROLLER_PERSONA_MODEL", 1),
("GHOSTLIGHT_CONTROLLER_INTERPRETER_MODEL", 2),
("GHOSTLIGHT_CONTROLLER_OPERATIONAL_MODEL", 3),
("GHOSTLIGHT_CONTROLLER_ELABORATOR_MODEL", 4),
("GHOSTLIGHT_PLAY_MODEL", 5),
] {
let (models, play) = lane_models_from(|asked| (asked == name).then(|| "override".to_owned()));
let mut all = models.each().to_vec();
all.push(&play);
let overridden: Vec<usize> = all
.iter()
.enumerate()
.filter(|(_, model)| **model == "override")
.map(|(index, _)| index)
.collect();
assert_eq!(overridden, vec![lane], "{name} moves exactly its own lane");
}
}
struct FakeClock {
now: std::cell::Cell<Instant>,
}
@ -637,15 +674,6 @@ mod tests {
assert_eq!(calls, 6);
}
#[test]
fn lanes_default_to_the_tiered_claude_models() {
let (models, play) = lane_models();
assert_eq!(play, "claude-sonnet-5-5");
assert_eq!(models.interpreter, "claude-haiku-5-5");
assert_eq!(models.operational_agent, "claude-haiku-5-5");
assert_eq!(models.persona, "claude-sonnet-5-5");
}
/// The connector key is a credential path, never a value: the binding
/// carries the path under CREDENTIALS_DIRECTORY and the caller id, and
/// nothing else of it.