Skip to content

feat: adopt engine routes across text workflows - #1080

Closed
arberx wants to merge 6 commits into
arberx/generic-engine-routes-researchfrom
arberx/exploratory-competitors-openrouter
Closed

feat: adopt engine routes across text workflows#1080
arberx wants to merge 6 commits into
arberx/generic-engine-routes-researchfrom
arberx/exploratory-competitors-openrouter

Conversation

@arberx

@arberx arberx commented Sep 2, 2026

Copy link
Copy Markdown
Member

Withdrawn

The user removed the new generic model-router feature from this work.
Competitor history, model comparisons, UI improvements, and direct-provider documentation are consolidated in #1078.
This PR is closed without merging. Its branch remains available for history.

Summary

  • Use text routes in Aero, recommendations, snapshot analysis, and discovery classification.
  • Add CLI settings operations and safe MCP route reads.
  • Add optional per-model competitor comparisons through API, CLI, and MCP.
  • Show query classes in query evidence and remove suggested-query signals from the Simple overview.
  • Explain direct-provider answer and citation measurement, plus behavior for existing projects.
  • Integrate all reviewed fixes and resolve current-main conflicts across the existing PR stack.

Stack

3 of 3. Depends on #1079, which depends on #1078.
The latest fixes from the review branch are now included here. No replacement PR was created.

Validation

  • Focused combined checks passed: 205 backend, 97 competitor/draft, and 226 UI tests.
  • Full typecheck, lint, and production build passed.
  • Generated client, plugin, and Val skill checks passed.
  • Full local run: 10,021 tests passed; four tests exceeded the five-second timeout.
  • All four affected files passed unchanged on retry: 18 tests, two workers, same timeout.
  • Fresh GitHub CI is still pending for the updated head; no failed jobs at the last check.

@arberx
arberx force-pushed the arberx/generic-engine-routes-research branch from bd43e27 to ef09a51 Compare September 2, 2026 15:37
@arberx
arberx force-pushed the arberx/exploratory-competitors-openrouter branch from 6ae07a8 to ab11468 Compare September 2, 2026 15:38
@arberx
arberx force-pushed the arberx/generic-engine-routes-research branch from ef09a51 to fac693b Compare September 4, 2026 00:02
arberx and others added 2 commits September 4, 2026 00:02
Applies 12 of 15 review findings.

Route execution gate:
- alignModel swapped the model but not streamFn, which the Agent fixes at
  construction. A session switched TO a route streamed outside its
  connection's quota entirely; one switched to a native provider stayed
  wrapped in the gateway's concurrency limit. The stream builder is now
  exported and the gate moves with the provider.
- Transcript compaction called pi-ai directly, spending the same gateway
  budget outside the gate. It now runs inside it.
- A stored `route:*` deleted from config.yaml bricked its persisted Aero
  session forever (every prompt 500'd, recovery meant editing the DB). It
  now falls back to the detected default and persists the correction.

Honest state:
- Routes reported `configured: true` with no API key, so a keyless gateway
  rendered with no "Needs setup" badge and the doctor check titled "Agent
  provider keys" returned OK on an install holding zero credentials.
- The provider picker vanished entirely when its list was empty, which
  also covers a loading and a failed read. It now renders disabled.
- Text-only routes were listed under an "Answer engine" heading, claiming
  the one capability the docs say they do not have. The heading is now
  "Model" and route rows carry a "Text only" badge.

Boundaries:
- POST /agent/prompt cast the body's provider instead of validating it, so
  an unknown route id returned 500 with an internal message. Now a 400.
- The OpenAPI request still pinned provider to the native enum while the
  response emitted route ids; it now mirrors aeroProviderIdSchema.
- The CLI derived route readiness from capabilities alone, ignoring
  source, and could print "measurement-ready" where the API said
  "text-ready". It now calls the shared engineRouteReadiness helper.
- The CLI named one benign cause for a model-catalog failure that is
  really a catch-all over auth, timeout and unreachable-host errors.
- envVarHint's new `default` branch made its switch trivially total,
  discarding the compile error that forced a hint per native provider. A
  Record over the closed native enum restores it.

Three findings were NOT applied. Offloading domain classification to a
text route is deliberate and asserted by a test that makes Gemini throw if
used, protecting its discovery quota. Route cost cannot be recorded as
unknown: costMillicents is a non-negative int on a NOT NULL column, so an
honest value needs a contract change and a migration. Caching parsed route
config would go stale, because the server mutates config.engineRoutes in
place on a settings write.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@arberx
arberx force-pushed the arberx/exploratory-competitors-openrouter branch from ab11468 to 18d23d6 Compare September 4, 2026 00:10
@arberx arberx closed this Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant