Skip to content

consolidate smart routing configuration env vars into SMART_ROUTER_CONFIG - #1051

Merged
lilly-luo merged 32 commits into
mainfrom
lillyluo/smart-routing-config-version
Oct 9, 2026
Merged

lilly-luo merged 32 commits into
mainfrom
lillyluo/smart-routing-config-version

Conversation

@lilly-luo

@lilly-luo lilly-luo commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

BEFORE: you had to set a million environment variables in order to configure smart routing. this is not scalable as we continue to add more configurations:
ENABLE_SMART_ROUTING_V2=1, ENABLE_SMART_ROUTING_SUBAGENT_ONLY, ENABLE_SMART_ROUTING_ORCH.

AFTER: instead, we will have an env var SMART_ROUTING_CONFIG=subagent_only_v1, subagent_only_v2, and then do the resolution of the config into diff env vars to preserve the behavior. that way, the call site only needs to pass in:
SMART_ROUTING_CONFIG=subagent_only_v1 ug to get the appropriate configuration.

testing:

  • ENABLE_SMART_ROUTING_V2=1 && ENABLE_SMART_ROUTING_SUBAGENT_ONLY=1 uv run ug claude is same as SMART_ROUTER_CONFIG_VERSION=subagent_only_v1 SMART_ROUTER_NAME=m2-r315-quality-20260929 uv run ug claude (what we have in isaac)
  • ENABLE_SMART_ROUTING_V2=1 && ENABLE_SMART_ROUTING_SUBAGENT_ONLY=1 && ENABLE_SMART_ROUTING_ORCH=1 uv run ug claude is same as SMART_ROUTER_CONFIG_VERSION=subagent_orch_v1 SMART_ROUTER_NAME=m2-r315-quality-20260929 uv run ug claude (what we have in isaac)
  • ENABLE_SMART_ROUTING_V2=1 uv run ug claude is same as SMART_ROUTER_CONFIG_VERSION=first_prompt_and_subagent_no_orch_v0 uv run ug claude (what customers will have)

the recipe name is a separate env var because we want to be able to change the recipe without needing to update ug

@lilly-luo lilly-luo changed the title Add backward-compatible smart routing configuration versions consolidate smart routing configuration env vars into SMART_ROUTING_CONFIG Oct 8, 2026
@lilly-luo lilly-luo changed the title consolidate smart routing configuration env vars into SMART_ROUTING_CONFIG consolidate smart routing configuration env vars into SMART_ROUTER_CONFIG Oct 8, 2026
Comment thread src/ucode/smart_routing/config.py
@lilly-luo
lilly-luo requested a review from JJ27 October 8, 2026 23:34
Comment thread tests/e2e_cuj/test_cuj4_smart_routing.py
@lilly-luo lilly-luo added the ug-review Run the automated UG review label Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

UG review

Reviewed preset precedence, CLI environment restoration, managed routing defaults, and session/orchestrator flag resolution, along with the supplied retry and transcript-evidence changes. No actionable regression is evident in the supplied patch.

No actionable findings.

Some patches were unavailable or truncated to fit the review context. Treat this as a partial review.

Automated advisory review of 2a44f77bf5ad using Lilly's UG review rubric. It does not approve or block this PR.

@JJ27 JJ27 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested locally and lgtm

@lilly-luo
lilly-luo enabled auto-merge October 9, 2026 05:22
lilly-luo and others added 11 commits October 9, 2026 06:07
Unrouted Claude sessions stay in auto mode, and their classifier requests
through the recording proxy raise an informational modal that blocked the
parent turn until the 240s timeout. Continue past that exact notice once.

Co-authored-by: Isaac <no-reply@databricks.com>
Wait for billing-notice input readiness and confirm dismissal instead of
leaving a visible notice blocked after the first Enter. Correlate native
peer hand-backs with successful Agent spawns so the final parent answer
remains in the requested turn. Accept only Claude child requests' single
transport newline after the routing checkpoint.

Add PTY and negative evidence regressions and update coverage docs.
Claude 2.1.290 retains finished children in a Completed task list instead
of showing the empty task view. Accept only a fully rendered native menu
whose completed count matches its checkmarked done rows, then observe
menu dismissal before submitting /exit. Continue waiting for running or
scheduled tasks.

Cover empty/completed views and negative controls with the offline PTY
regression and update the testing coverage docs.
@lilly-luo
lilly-luo added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit 29acfb4 Oct 9, 2026
95 of 98 checks passed
@lilly-luo
lilly-luo deleted the lillyluo/smart-routing-config-version branch October 9, 2026 19:08
tt-le added a commit that referenced this pull request Oct 9, 2026
Recount from collection on top of #1051/#1062/#1039: 85 live cases
(39 Claude, 46 Codex), 11 marked TUI, OpenCode adding one live headless
and two managed_fixture cases, and 129 executions (126 with Claude and
Codex selected).

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ug-review Run the automated UG review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants