Skip to content

fix(llm): correct triage routing debug dump and remove context bias#2244

Merged
bug-ops merged 1 commit intomainfrom
2229-triage-routing-debug
Mar 27, 2026
Merged

fix(llm): correct triage routing debug dump and remove context bias#2244
bug-ops merged 1 commit intomainfrom
2229-triage-routing-debug

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 27, 2026

Summary

Tests

Two regression tests added to crates/zeph-llm/src/router/triage.rs:

  • debug_request_json_reflects_last_provider_after_chat — verifies dump reflects last-routed provider, not first-tier
  • build_triage_prompt_has_no_context_size_metadata — asserts "messages" and "tokens" strings are absent from prompt

All 6708 tests pass.

Checklist

  • cargo +nightly fmt --check passed
  • cargo clippy --workspace --features full -- -D warnings passed
  • cargo nextest run --workspace --features full --lib --bins 6708/6708 passed
  • CHANGELOG.md updated

Closes #2229
Closes #2228

@github-actions github-actions bot added bug Something isn't working size/M Medium PR (51-200 lines) documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) rust Rust code changes and removed size/M Medium PR (51-200 lines) labels Mar 27, 2026
…2229, #2228)

- debug_request_json now reads last_provider_idx (same pattern as last_usage)
  instead of always returning the first-tier provider; falls back to first
  when no request has been made yet (#2229)
- removed msg_count/token_estimate from build_triage_prompt; classification
  now based on message content only, preventing long-session bias toward
  higher tiers (#2228)
@bug-ops bug-ops force-pushed the 2229-triage-routing-debug branch from 0fdbb7e to f6d9012 Compare March 27, 2026 10:25
@github-actions github-actions bot added the size/M Medium PR (51-200 lines) label Mar 27, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 27, 2026 10:26
@bug-ops bug-ops merged commit 95c0765 into main Mar 27, 2026
25 checks passed
@bug-ops bug-ops deleted the 2229-triage-routing-debug branch March 27, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

1 participant