Skip to content

fix(auto-routing): increase Auto Efficient decision timeout - #5994

Merged
chrarnoldus merged 1 commit into
mainfrom
slimy-tv
Sep 9, 2026
Merged

chrarnoldus merged 1 commit into
mainfrom
slimy-tv

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • increase the efficient auto-routing decision budget from 2 seconds to 5 seconds
  • keep a single attempt because a timed-out worker request may already have completed a billable classifier call
  • update the routing ADR and worker budget comment, with a regression assertion for the timeout

Cause

The gateway aborts /decide after 2 seconds and logs Efficient auto decision request failed when fetch rejects with the resulting TimeoutError. The worker now has sequential settings, cache, coding-plan, and classifier work; its coding-plan database query alone permits a 2-second statement timeout, so the original end-to-end budget is too tight for cold or classifier-miss paths.

Verification

  • node_modules/.bin/oxfmt apps/web/src/lib/ai-gateway/auto-routing-decision.ts apps/web/src/lib/ai-gateway/auto-routing-decision.test.ts services/auto-routing/src/model-capabilities.ts docs/adr/0002-auto-routing-efficient.md
  • git diff --check
  • automated tests and type checks left to CI as requested

@chrarnoldus chrarnoldus self-assigned this Sep 9, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the 2s→5s /decide timeout bump across gateway, ADR, worker comment, and regression assertion; the single-attempt abort path is unchanged and no runtime or security issues were found.

Files Reviewed (4 files)
  • apps/web/src/lib/ai-gateway/auto-routing-decision.ts
  • apps/web/src/lib/ai-gateway/auto-routing-decision.test.ts
  • docs/adr/0002-auto-routing-efficient.md
  • services/auto-routing/src/model-capabilities.ts

Reviewed by grok-4.6 · Input: 84.5K · Output: 7.1K · Cached: 339.2K

Review guidance: REVIEW.md from base branch main

@chrarnoldus chrarnoldus changed the title fix(auto-routing): increase decision timeout fix(auto-routing): increase Auto Efficient decision timeout Sep 9, 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.

2 participants