[Improve] Route tasks using linked issue context#693
Merged
Conversation
Contributor
Author
|
No code issues found. See task
Reviewed 838a2af |
daniel-lxs
marked this pull request as ready for review
July 23, 2026 13:58
daniel-lxs
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
July 23, 2026 13:58
daniel-lxs
added a commit
that referenced
this pull request
Jul 23, 2026
…t routing to Gemini 3.6 Flash (#716) * [Improve] Gate the linked-issue fetch on the routing precheck and default routing to Gemini 3.6 Flash The external issue fetch added in #693 ran before every routing call with a pasted GitHub/Linear issue link, paying up to the 8s lookup deadline even when the message alone already routed. Routing now runs a tool-free precheck first and only fetches when it returns needsExternalLookup=true, then re-routes with the issue as untrusted context. Fail-open behavior is unchanged: an unavailable integration or empty fetch keeps the precheck decision. Routing inference now resolves context.routingModel, then the new R_ROUTER_MODEL deployment override, then defaults to google/gemini-3.6-flash instead of falling through to the deployment small model. In the router external-lookup gate eval (4 repetitions, 5 candidates), Gemini 3.6 Flash was the only stable gate: it asked for the issue exactly when the message alone couldn't route (0% false lookups, 100% recall) at ~4.5s per call. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Keep DEFAULT_ROUTING_MODEL module-private to satisfy Knip Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
daniel-lxs
added a commit
that referenced
this pull request
Jul 23, 2026
…xpires A new fake-timer test for the shared 8s deadline exposed that withExternalLookupTimeout received an already-invoked promise, so an exhausted deadline still fired the next MCP call and merely ignored its result (pre-existing since #693). The helper now takes a thunk and checks the remaining budget before dispatching. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What changed
Pasted GitHub and configured Linear issue URLs are now resolved before workspace routing. Their issue details are supplied as bounded, untrusted routing context, with one shared 8-second fail-open lookup deadline. Trailing URL punctuation, including ellipses, is removed before lookup. GitHub routing now exposes the read-only issue tools required for this lookup.
Why this change was made
The router previously classified a task from the message and environment descriptions alone, even when a linked issue contained the information needed to choose the correct workspace.
Impact
Tasks started with a supported issue link can route using the linked issue's title and description. Punctuation from ordinary prose no longer prevents supported issue links from being recognized, while unavailable integrations and slow MCP responses continue routing without external context or extending the shared lookup budget.