Skip to content

Commit 8e454cb

Browse files
authored
fix(orchestrator): respect KG action template CLI tool in routing engine (#819)
When use_routing_engine is enabled, the RoutingDecisionEngine returns both model and cli_tool from the KG route action template, but spawn_agent() only extracted the model and discarded the CLI tool. Also updates taxonomy model names from version-pinned to aliases (haiku/sonnet/opus) so Claude CLI resolves to latest automatically. Refs #579
1 parent c3c1f37 commit 8e454cb

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

crates/terraphim_orchestrator/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,11 @@ impl AgentOrchestrator {
10001000
if decision.candidate.model.is_empty() {
10011001
None
10021002
} else {
1003+
// Extract CLI tool override from routing decision so that
1004+
// anthropic models routed via KG use claude CLI, not opencode.
1005+
if decision.candidate.cli_tool != def.cli_tool {
1006+
kg_cli_override = Some(decision.candidate.cli_tool.clone());
1007+
}
10031008
Some(decision.candidate.model)
10041009
}
10051010
} else if supports_model_flag {

docs/taxonomy/routing_scenarios/adf/implementation_tier.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ synonyms:: disciplined-implementation
2121

2222
trigger:: code writing, review, testing, and mid-complexity development tasks
2323

24-
route:: anthropic, claude-sonnet-4-6
24+
route:: anthropic, sonnet
2525
action:: /home/alex/.local/bin/claude --model {{ model }} -p "{{ prompt }}" --max-turns 50
2626

2727
route:: kimi, kimi-for-coding/k2p5

docs/taxonomy/routing_scenarios/adf/planning_tier.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ synonyms:: disciplined-research, disciplined-design
1616

1717
trigger:: tasks requiring deep reasoning, architecture decisions, or strategic planning
1818

19-
route:: anthropic, claude-opus-4-6
19+
route:: anthropic, opus
2020
action:: /home/alex/.local/bin/claude --model {{ model }} -p "{{ prompt }}" --max-turns 50
2121

2222
route:: openai, openai/gpt-5.4

docs/taxonomy/routing_scenarios/adf/review_tier.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ synonyms:: disciplined-verification, disciplined-validation
1717

1818
trigger:: verification, validation, and review tasks that check existing work
1919

20-
route:: anthropic, claude-haiku-4-5
20+
route:: anthropic, haiku
2121
action:: /home/alex/.local/bin/claude --model {{ model }} -p "{{ prompt }}" --max-turns 30
2222

2323
route:: openai, openai/gpt-5.4-mini

0 commit comments

Comments
 (0)