Repository navigation
Model routing: retain configured-model resolution and add the Model resolution section - #18757
Merged
Merged
Conversation
Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Contributor
Dashboard dead viewsDead element views (0):
|
Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Enhance model routing to expose configured model resolution and failures
Model routing: retain configured-model resolution and add the Model resolution section
Oct 18, 2026
…-enhancement Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.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.
Upstream gh-aw now writes one
model.resolutionevent per role intousage/aw_session.jsonl(T-UAS-074). CAO dropped most of each event: event engine, role, configured model, resolved model and cause were lost.model.resolutionwas also missing from therouting-session-observationsallowlist, so the Model routing page could not show how a configured model resolved, whether an alias moved, or which resolutions failed.Audit projection
adapters/model-routing.js: eachmodel.resolutionevent becomes one Audit record with the fields below. Every value must pass the existing identifier-shape check; anything else stays unknown.sourceEngine,resolutionRole,providerresolutionConfiguredModel,resolutionResolvedModel: kept exactly as recorded, including prefixes such ascopilot/gpt-5-mini. They are not passed through the served-model shortener.status: limited toresolved/exact/failed.code(cause): limited tomodel_unavailable/catalog_unavailable.nullresolved model stays unknown. Missing or unsafe values never become empty strings, zero, or a fallback model.queries/database.jsonandspecification.jsTABLE_FIELDS.audits.CANONICAL_SCHEMA_VERSION31 → 32 and IndexedDBDATABASE_VERSION41 → 42.server/spec/storage.tspupdated;schema.sqlandschema.gen.goregenerated throughserver/spec. Hosted PostgreSQL needs a fresh schema.Dashboard Language (
dashboard-fragments/model-routing.json)model.resolutionadded to therouting-session-observationsallowlist.alias movedrow; untimed runs are counted but never create a transition.routing-runpage: a Model resolution drill-down listing role, configured → resolved model, status, cause, engine and provider. Unknown values are shown as unknown. Routed and legacy sessions produce no rows.badge.js:alias moveddisplays as an attention state.catalog.generated.json,queries.generated.json) regenerated.Fixtures and tests
test/fixtures/model-resolution-sessions.json: minimized envelopes from the five github/gh-aw smoke runs (39091097441, 39091099406, 39091101641, 39091103540, 39091105929), with head SHA, artifact ID and path, and original line numbers. The Opus move, the two failure causes, unsafe values and the legacy session are clearly labelled controlled replays with test run IDs9900000xx. Providers for the copilot, claude and codex records aren't documented in the issue, so they are stored asnull(shown as unknown) rather than guessed.test/model-resolution-fixture.jsis shared by the unit and e2e tests.test/unit/model-resolution.test.jscovers the seven acceptance cases through ingestion →processDataRequest→ view payload.model-routing-contract.jsonandmodel-routing.test.jsextended only with the new views, queries and run-page views; the original expectations are unchanged.server/spec/storage.test.mjscovers the new optional columns.TestModelResolutionContractUsesPostgresruns the new queries in hosted Postgres, including null and unknown values and routed absence.e2e/model-routing.spec.js: server startup moved into a shared helper with no behaviour change, plus a new test at 1280px and 390px for both IndexedDB and SQLite. It checks alias and failure text, the Engine scope filter, navigation to the run drill-down, and that the mobile layout doesn't scroll horizontally.Docs
specs/dashboard-data.md("Model routing evidence" and version tables),docs/dashboard-data-ingestion.mdanddocs/dashboard-data-model.mdnow describe:Known failures not caused by this PR
TestPostgres*PrivilegeBoundary,TestPostgresProvisioningRequiredBeforeRuntime) fail the same way on the base commit because of local role password authentication.Needs checking before merge
lazy-page-chunksand tworepository-upgrade-batchtests.lazy-page-chunkschecks the core bundle size and this PR adds 17 queries, so that one may be caused by this change.