fix: port tms#73 provider resolution to bogocat-tmq events.py#7
Merged
Conversation
Add _resolve_dispatch_model + MODEL_TO_PROVIDER to events.py, mirroring tms#73. When --model is passed without --provider, derive provider from the fleet map. Model-to-provider mapping is authoritative — a known model always resolves to its provider, ignoring stale defaults. Falls back to pi settings defaults only when no model is provided. Closes tms#83 (backfill script is in the tms repo).
- Update resolver comments to say 'refines' not 'mirrors' tms#73 - Document intentional divergence from tms#73 in docstring - Remove unused test helpers (MODEL_TO_PROVIDER, _resolve_dispatch_model, _resolve_default_model) that were never called by tests
Contributor
Author
Code Review — tms#86 + bogocat-tmq#7Mode: ConsensusBoth PRs are correct and well-tested. No Critical (P0) findings. P1 Warnings (all addressed)
SummaryThe resolver correctly handles all 4 dispatch scenarios: explicit model→provider, stale default override, unknown-model pass-through, and both-empty fallback. <<REVIEW-VERDICT: PASS sha=34394953fc0a84c0eacbc226b1293a4e6d77eddf rounds=1 panel=deepseek-v4-pro,minimax-m3>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port
_resolve_dispatch_model+MODEL_TO_PROVIDERfrom tms#73 tobogocat-tmq
src/tmq/events.py. The plugin was the second writer totms_review.eventsand passed provider/model through without resolution,leaving 27 dispatch rows with empty provider (Jul 14-16).
What changed
_resolve_default_model()— reads pi settings.json for default model_resolve_dispatch_model(provider, model)— mirrors tms#73 resolver:known fleet model → derives provider from mapping (authoritative);
unknown model → preserves explicit provider;
no model → falls back to pi settings defaults
log_dispatchandlog_dispatch_failedtests/test_events.pywith 10 parameterized tests covering:explicit model without provider, explicit model+provider, each fleet model,
stale default override, both-empty resolution, and dispatch_failed path
Out of scope
Review
Test plan
Verification
_resolve_dispatch_model)Follow-ups