mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-08 03:10:26 +00:00
Store response.<node_id> in context after each LLM node
Downstream nodes in multi-model pipelines reference response.<node_id> context keys in their prompts. The codergen handler was only storing last_response (truncated) and last_stage, so these references resolved to nothing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
28cdefec67
commit
7222da1230
1 changed files with 8 additions and 0 deletions
|
|
@ -246,6 +246,10 @@ impl Handler for CodergenHandler {
|
|||
"last_response".to_string(),
|
||||
serde_json::json!(truncate(&response_text, 200)),
|
||||
);
|
||||
outcome.context_updates.insert(
|
||||
format!("response.{}", node.id),
|
||||
serde_json::json!(&response_text),
|
||||
);
|
||||
|
||||
// 7b. Parse routing directives from response text
|
||||
extract_status_fields(&response_text, &mut outcome);
|
||||
|
|
@ -375,6 +379,10 @@ mod tests {
|
|||
Some(&serde_json::json!("step"))
|
||||
);
|
||||
assert!(outcome.context_updates.contains_key("last_response"));
|
||||
assert_eq!(
|
||||
outcome.context_updates.get("response.step"),
|
||||
Some(&serde_json::json!("[Simulated] Response for stage: step"))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue